Index: webrtc/media/BUILD.gn |
diff --git a/webrtc/media/BUILD.gn b/webrtc/media/BUILD.gn |
index 6f4a7c8d05c26d9ba6ad32a888c915432c407e5d..dc632b30886b9bbb6e61f7656c62eccdadef3215 100644 |
--- a/webrtc/media/BUILD.gn |
+++ b/webrtc/media/BUILD.gn |
@@ -32,7 +32,7 @@ config("rtc_media_warnings_config") { |
} |
} |
-rtc_static_library("rtc_media_base") { |
+rtc_static_library("rtc_media_base_datachannel_only") { |
# TODO(kjellander): Remove (bugs.webrtc.org/6828) |
# Enabling GN check triggers cyclic dependency error: |
# //webrtc/media:rtc_media_base -> |
@@ -96,6 +96,88 @@ rtc_static_library("rtc_media_base") { |
include_dirs += [ "$rtc_libyuv_dir/include" ] |
} |
+ deps += [ |
+ "..:webrtc_common", |
+ "../api:libjingle_peerconnection_api", |
+ "../api/audio_codecs:audio_codecs_api", |
+ "../base:rtc_base", |
+ "../base:rtc_base_approved", |
+ "../call:call_interfaces", |
+ "../p2p", |
+ ] |
+ |
+ if (is_nacl) { |
+ deps += [ "//native_client_sdk/src/libraries/nacl_io" ] |
+ } |
+} |
+ |
+rtc_static_library("rtc_media_base") { |
kjellander_webrtc
2017/05/10 14:20:37
Can we avoid the duplication here and split out th
Zhi Huang
2017/05/10 21:00:35
Yeah, I can do it here but I need "check_includes
|
+ # TODO(kjellander): Remove (bugs.webrtc.org/6828) |
+ # Enabling GN check triggers cyclic dependency error: |
+ # //webrtc/media:rtc_media_base -> |
+ # //webrtc/pc:rtc_pc -> |
+ # //webrtc/media:media -> |
+ # //webrtc/media:rtc_media_base |
+ check_includes = false |
+ defines = [ |
+ "HAVE_WEBRTC_VOICE", |
+ "HAVE_WEBRTC_VIDEO", |
+ ] |
+ libs = [] |
+ deps = [] |
+ sources = [ |
+ "base/adaptedvideotracksource.cc", |
kjellander_webrtc
2017/05/10 14:20:37
I thought duplicating the same sources in multiple
Zhi Huang
2017/05/10 21:00:35
Yes, this is very fortunate.
But we probably wan
|
+ "base/adaptedvideotracksource.h", |
+ "base/audiosource.h", |
+ "base/codec.cc", |
+ "base/codec.h", |
+ "base/cryptoparams.h", |
+ "base/device.h", |
+ "base/mediachannel.h", |
+ "base/mediaconstants.cc", |
+ "base/mediaconstants.h", |
+ "base/mediaengine.cc", |
+ "base/mediaengine.h", |
+ "base/rtpdataengine.cc", |
+ "base/rtpdataengine.h", |
+ "base/rtputils.cc", |
+ "base/rtputils.h", |
+ "base/streamparams.cc", |
+ "base/streamparams.h", |
+ "base/turnutils.cc", |
+ "base/turnutils.h", |
+ "base/videoadapter.cc", |
+ "base/videoadapter.h", |
+ "base/videobroadcaster.cc", |
+ "base/videobroadcaster.h", |
+ "base/videocapturer.cc", |
+ "base/videocapturer.h", |
+ "base/videocapturerfactory.h", |
+ "base/videocommon.cc", |
+ "base/videocommon.h", |
+ "base/videoframe.h", |
+ "base/videosourcebase.cc", |
+ "base/videosourcebase.h", |
+ ] |
+ |
+ configs += [ ":rtc_media_warnings_config" ] |
+ |
+ if (!build_with_chromium && is_clang) { |
+ # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
+ suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
+ } |
+ |
+ include_dirs = [] |
+ if (rtc_build_libyuv) { |
+ deps += [ "$rtc_libyuv_dir" ] |
+ public_deps = [ |
+ "$rtc_libyuv_dir", |
+ ] |
+ } else { |
+ # Need to add a directory normally exported by libyuv. |
+ include_dirs += [ "$rtc_libyuv_dir/include" ] |
+ } |
+ |
deps += [ |
"..:webrtc_common", |
"../api:libjingle_peerconnection_api", |
@@ -114,6 +196,58 @@ rtc_static_library("rtc_media_base") { |
} |
} |
+rtc_static_library("rtc_media_datachannel_only") { |
+ # TODO(kjellander): Remove (bugs.webrtc.org/6828) |
+ # Enabling GN check triggers cyclic dependency error: |
+ # //webrtc/media:media -> |
+ # //webrtc/media:rtc_media -> |
+ # //webrtc/pc:rtc_pc -> |
+ # //webrtc/media:media |
+ check_includes = false |
+ defines = [] |
+ deps = [] |
+ sources = [ |
+ "sctp/sctptransport.cc", |
+ "sctp/sctptransport.h", |
+ "sctp/sctptransportinternal.h", |
+ ] |
+ |
+ configs += [ ":rtc_media_warnings_config" ] |
+ |
+ if (!build_with_chromium && is_clang) { |
+ # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
+ suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
+ } |
+ |
+ if (is_win) { |
+ cflags = [ |
+ "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. |
+ "/wd4267", # conversion from "size_t" to "int", possible loss of data. |
+ "/wd4389", # signed/unsigned mismatch. |
+ ] |
+ } |
+ |
+ if (rtc_enable_sctp && rtc_build_usrsctp) { |
+ include_dirs = [ |
+ # TODO(jiayl): move this into the public_configs of |
+ # //third_party/usrsctp/BUILD.gn. |
+ "//third_party/usrsctp/usrsctplib", |
+ ] |
+ deps += [ "//third_party/usrsctp" ] |
+ } |
+ |
+ deps += [ |
+ ":rtc_media_base_datachannel_only", |
+ "..:webrtc_common", |
+ "../api:call_api", |
+ "../api:transport_api", |
+ "../base:rtc_base", |
+ "../base:rtc_base_approved", |
+ "../p2p:rtc_p2p", |
+ "../system_wrappers", |
+ ] |
+} |
+ |
rtc_static_library("rtc_media") { |
# TODO(kjellander): Remove (bugs.webrtc.org/6828) |
# Enabling GN check triggers cyclic dependency error: |