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