Add a gyp/gn variable for whether to use iLBC or not
BUG=webrtc:5415 Review URL: https://codereview.webrtc.org/1578953003 Cr-Commit-Position: refs/heads/master@{#11291}
This commit is contained in:
parent
f5a3a93d26
commit
f8c2baca4e
@ -19,6 +19,9 @@
|
||||
},
|
||||
'build_with_chromium%': '<(build_with_chromium)',
|
||||
|
||||
# Enable to use the Mozilla internal settings.
|
||||
'build_with_mozilla%': 0,
|
||||
|
||||
'conditions': [
|
||||
['build_with_chromium==1', {
|
||||
'webrtc_root%': '<(DEPTH)/third_party/webrtc',
|
||||
@ -32,6 +35,7 @@
|
||||
],
|
||||
},
|
||||
'build_with_chromium%': '<(build_with_chromium)',
|
||||
'build_with_mozilla%': '<(build_with_mozilla)',
|
||||
'webrtc_root%': '<(webrtc_root)',
|
||||
'apk_tests_path%': '<(apk_tests_path)',
|
||||
'modules_java_gyp_path%': '<(modules_java_gyp_path)',
|
||||
@ -40,8 +44,14 @@
|
||||
'include_opus%': 1,
|
||||
'opus_dir%': '<(DEPTH)/third_party/opus',
|
||||
|
||||
# Enable to use the Mozilla internal settings.
|
||||
'build_with_mozilla%': 0,
|
||||
# Include the iLBC audio codec?
|
||||
'conditions': [
|
||||
['build_with_chromium==1 or build_with_mozilla==1', {
|
||||
'include_ilbc%': 0,
|
||||
}, {
|
||||
'include_ilbc%': 1,
|
||||
}],
|
||||
],
|
||||
},
|
||||
'build_with_chromium%': '<(build_with_chromium)',
|
||||
'build_with_mozilla%': '<(build_with_mozilla)',
|
||||
@ -50,6 +60,7 @@
|
||||
'modules_java_gyp_path%': '<(modules_java_gyp_path)',
|
||||
'webrtc_vp8_dir%': '<(webrtc_vp8_dir)',
|
||||
'webrtc_vp9_dir%': '<(webrtc_vp9_dir)',
|
||||
'include_ilbc%': '<(include_ilbc)',
|
||||
'include_opus%': '<(include_opus)',
|
||||
'rtc_relative_path%': 1,
|
||||
'external_libraries%': '0',
|
||||
|
||||
@ -103,6 +103,14 @@ declare_args() {
|
||||
use_third_party_h264 = false # TODO(hbos): To be used in follow-up CL(s).
|
||||
}
|
||||
|
||||
# A second declare_args block, so that declarations within it can
|
||||
# depend on the possibly overridden variables in the first
|
||||
# declare_args block.
|
||||
declare_args() {
|
||||
# Include the iLBC audio codec?
|
||||
rtc_include_ilbc = !(build_with_chromium || build_with_mozilla)
|
||||
}
|
||||
|
||||
# Make it possible to provide custom locations for some libraries (move these
|
||||
# up into declare_args should we need to actually use them for the GN build).
|
||||
rtc_libvpx_dir = "//third_party/libvpx_new"
|
||||
|
||||
@ -23,6 +23,9 @@ source_set("rent_a_codec") {
|
||||
]
|
||||
|
||||
defines = []
|
||||
if (rtc_include_ilbc) {
|
||||
defines += [ "WEBRTC_CODEC_ILBC" ]
|
||||
}
|
||||
if (rtc_include_opus) {
|
||||
defines += [ "WEBRTC_CODEC_OPUS" ]
|
||||
}
|
||||
@ -35,10 +38,7 @@ source_set("rent_a_codec") {
|
||||
defines += [ "WEBRTC_CODEC_G722" ]
|
||||
}
|
||||
if (!build_with_mozilla && !build_with_chromium) {
|
||||
defines += [
|
||||
"WEBRTC_CODEC_ILBC",
|
||||
"WEBRTC_CODEC_RED",
|
||||
]
|
||||
defines += [ "WEBRTC_CODEC_RED" ]
|
||||
}
|
||||
}
|
||||
|
||||
@ -103,6 +103,10 @@ source_set("audio_coding") {
|
||||
"../../system_wrappers",
|
||||
]
|
||||
|
||||
if (rtc_include_ilbc) {
|
||||
defines += [ "WEBRTC_CODEC_ILBC" ]
|
||||
deps += [ ":ilbc" ]
|
||||
}
|
||||
if (rtc_include_opus) {
|
||||
defines += [ "WEBRTC_CODEC_OPUS" ]
|
||||
deps += [ ":webrtc_opus" ]
|
||||
@ -119,14 +123,8 @@ source_set("audio_coding") {
|
||||
deps += [ ":g722" ]
|
||||
}
|
||||
if (!build_with_mozilla && !build_with_chromium) {
|
||||
defines += [
|
||||
"WEBRTC_CODEC_ILBC",
|
||||
"WEBRTC_CODEC_RED",
|
||||
]
|
||||
deps += [
|
||||
":ilbc",
|
||||
":red",
|
||||
]
|
||||
defines += [ "WEBRTC_CODEC_RED" ]
|
||||
deps += [ ":red" ]
|
||||
}
|
||||
}
|
||||
|
||||
@ -850,6 +848,10 @@ source_set("neteq") {
|
||||
|
||||
defines = []
|
||||
|
||||
if (rtc_include_ilbc) {
|
||||
defines += [ "WEBRTC_CODEC_ILBC" ]
|
||||
deps += [ ":ilbc" ]
|
||||
}
|
||||
if (rtc_include_opus) {
|
||||
defines += [ "WEBRTC_CODEC_OPUS" ]
|
||||
deps += [ ":webrtc_opus" ]
|
||||
@ -865,8 +867,4 @@ source_set("neteq") {
|
||||
defines += [ "WEBRTC_CODEC_G722" ]
|
||||
deps += [ ":g722" ]
|
||||
}
|
||||
if (!build_with_mozilla && !build_with_chromium) {
|
||||
defines += [ "WEBRTC_CODEC_ILBC" ]
|
||||
deps += [ ":ilbc" ]
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,6 +32,10 @@
|
||||
],
|
||||
'audio_coding_defines': [],
|
||||
'conditions': [
|
||||
['include_ilbc==1', {
|
||||
'audio_coding_dependencies': ['ilbc',],
|
||||
'audio_coding_defines': ['WEBRTC_CODEC_ILBC',],
|
||||
}],
|
||||
['include_opus==1', {
|
||||
'audio_coding_dependencies': ['webrtc_opus',],
|
||||
'audio_coding_defines': ['WEBRTC_CODEC_OPUS',],
|
||||
@ -50,8 +54,8 @@
|
||||
'audio_coding_defines': ['WEBRTC_CODEC_G722',],
|
||||
}],
|
||||
['build_with_mozilla==0 and build_with_chromium==0', {
|
||||
'audio_coding_dependencies': ['ilbc', 'red',],
|
||||
'audio_coding_defines': ['WEBRTC_CODEC_ILBC', 'WEBRTC_CODEC_RED',],
|
||||
'audio_coding_dependencies': ['red',],
|
||||
'audio_coding_defines': ['WEBRTC_CODEC_RED',],
|
||||
}],
|
||||
],
|
||||
},
|
||||
|
||||
@ -15,6 +15,10 @@
|
||||
],
|
||||
'neteq_defines': [],
|
||||
'conditions': [
|
||||
['include_ilbc==1', {
|
||||
'codecs': ['ilbc',],
|
||||
'neteq_defines': ['WEBRTC_CODEC_ILBC',],
|
||||
}],
|
||||
['include_opus==1', {
|
||||
'codecs': ['webrtc_opus',],
|
||||
'neteq_defines': ['WEBRTC_CODEC_OPUS',],
|
||||
@ -32,10 +36,6 @@
|
||||
'codecs': ['g722',],
|
||||
'neteq_defines': ['WEBRTC_CODEC_G722',],
|
||||
}],
|
||||
['build_with_mozilla==0 and build_with_chromium==0', {
|
||||
'codecs': ['ilbc',],
|
||||
'neteq_defines': ['WEBRTC_CODEC_ILBC',],
|
||||
}],
|
||||
],
|
||||
'neteq_dependencies': [
|
||||
'<@(codecs)',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user