Commit a36cfd32 authored by dalecurtis's avatar dalecurtis Committed by Commit bot

Convert various media options into proper declare_args().

BUG=none
TEST=gn gen.

Review URL: https://codereview.chromium.org/609293004

Cr-Commit-Position: refs/heads/master@{#297449}
parent 2c9345eb
......@@ -17,7 +17,7 @@ config("media_config") {
}
if (use_pulseaudio) {
defines += [ "USE_PULSEAUDIO" ]
if (!linux_link_pulseaudio) {
if (!link_pulseaudio) {
defines += [ "DLOPEN_PULSEAUDIO" ]
}
}
......
......@@ -6,7 +6,7 @@ import("//media/media_options.gni")
# When libpulse is not directly linked, use stubs to allow for dlopening of the
# binary.
if (!linux_link_pulseaudio) {
if (!link_pulseaudio) {
action("pulse_generate_stubs") {
extra_header = "pulse/pulse_stub_header.fragment"
......@@ -219,7 +219,7 @@ source_set("audio") {
"pulse/pulse_util.h",
]
if (linux_link_pulseaudio) {
if (link_pulseaudio) {
pkg_config("libpulse") {
packages = [ "libpulse" ]
}
......
......@@ -2,44 +2,56 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# These variables need to be args.
# Override to dynamically link the cras (ChromeOS audio) library.
use_cras = false
# Option e.g. for Linux distributions to link pulseaudio directly
# (DT_NEEDED) instead of using dlopen. This helps with automated
# detection of ABI mismatches and prevents silent errors.
#
# TODO(ajwong): Why is this prefixed "linux_"?
linux_link_pulseaudio = false
# TODO(ajwong): Enable libvpx once that's converted.
media_use_ffmpeg = true
media_use_libvpx = true
if (is_android || is_ios) {
# Android and iOS don't use ffmpeg or libvpx.
declare_args() {
# Enables proprietary codecs and demuxers; e.g. H264, MOV, AAC, and MP3.
proprietary_codecs = false
# Allows distributions to link pulseaudio directly (DT_NEEDED) instead of
# using dlopen. This helps with automated detection of ABI mismatches and
# prevents silent errors.
link_pulseaudio = false
# Enable usage of FFmpeg within the media library. Used for most software
# based decoding, demuxing, and sometimes optimized FFTs. If disabled,
# implementors must provide their own demuxers and decoders.
media_use_ffmpeg = true
# Enable usage of libvpx within the media library. Used for software based
# decoding of VP9 and VP8A type content.
media_use_libvpx = true
# Neither Android nor iOS use ffmpeg or libvpx.
if (is_android || is_ios) {
media_use_ffmpeg = false
media_use_libvpx = false
}
}
# Override to dynamically link the cras (ChromeOS audio) library.
use_cras = false
# Enables runtime selection of PulseAudio library.
use_pulseaudio = false
# TODO(ajwong): how to disable embedded?
# Original conditional: (OS=="linux" or OS=="freebsd" or OS=="solaris") and embedded!=1
use_alsa = false
use_pulseaudio = false
if (is_posix && !is_android && !is_mac) {
# Enables runtime selection of ALSA library for audio.
use_alsa = false
# TODO(GYP): How to handled the "embedded" use case?
# Original conditional: (OS=="linux" or OS=="freebsd" or OS=="solaris") and embedded!=1
if (is_posix && !is_android && !is_mac) {
use_alsa = true
if (!use_cras) {
use_pulseaudio = true
}
}
}
# TODO(ajwong): is_openbsd should be a platform define.
is_openbsd = false
# Enables the MPEG2-TS stream parser for use with Media Source. Disabled by
# default since it's not available on the normal Web Platform and costs money.
enable_mpeg2ts_stream_parser = false
# TODO(ajwong): This should be branding controlled?
proprietary_codecs = false
# Enables browser side Content Decryption Modules. Required for android where
# the typical PPAPI based CDM is not available.
enable_browser_cdms = is_android
# TODO(ajwong): Where are these coming from?jk
enable_mpeg2ts_stream_parser = false
enable_browser_cdms = is_android
# TODO(GYP): This should be a platform define.
is_openbsd = false
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment