Add gn configs to remove the dependency to audio and video codecs.

Actually, I don't think there is any strong reason to keep these
deps in `webrtc` target except some downstream projects need it.

Making a GN config for now.

Bug: webrtc:10306
Change-Id: Id714faeabf4daaf3cc88d1f6224ae89ca8715e48
Reviewed-on: https://webrtc-review.googlesource.com/c/122420
Commit-Queue: Jiawei Ou <ouj@fb.com>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26653}
This commit is contained in:
Jiawei Ou
2019-02-12 11:36:13 -08:00
committed by Commit Bot
parent 3329be4f3d
commit 0874530b78
2 changed files with 25 additions and 7 deletions

View File

@ -406,13 +406,19 @@ if (!build_with_chromium) {
"video",
]
# Include audio and video codecs by default.
if (rtc_include_builtin_audio_codecs) {
deps += [
"api/audio_codecs:builtin_audio_decoder_factory",
"api/audio_codecs:builtin_audio_encoder_factory",
]
}
if (rtc_include_builtin_video_codecs) {
deps += [
"api/video_codecs:builtin_video_decoder_factory",
"api/video_codecs:builtin_video_encoder_factory",
]
}
if (build_with_mozilla) {
deps += [ "api/video:video_frame" ]

View File

@ -180,6 +180,18 @@ declare_args() {
# Determines whether Metal is available on iOS/macOS.
rtc_use_metal_rendering = is_mac || (is_ios && current_cpu == "arm64")
# When set to false, builtin audio encoder/decoder factories and all the
# audio codecs they depend on will not be included in libwebrtc.{a|lib}
# (they will still be included in libjingle_peerconnection_so.so and
# WebRTC.framework)
rtc_include_builtin_audio_codecs = true
# When set to false, builtin video encoder/decoder factories and all the
# video codecs they depends on will not be included in libwebrtc.{a|lib}
# (they will still be included in libjingle_peerconnection_so.so and
# WebRTC.framework)
rtc_include_builtin_video_codecs = true
}
if (!build_with_mozilla) {