| Index: webrtc/pc/BUILD.gn
|
| diff --git a/webrtc/pc/BUILD.gn b/webrtc/pc/BUILD.gn
|
| index 483485012da481803fe641f220ef643832af61bb..8a20af00804360d5ae5711a6f6671c1b0647320d 100644
|
| --- a/webrtc/pc/BUILD.gn
|
| +++ b/webrtc/pc/BUILD.gn
|
| @@ -25,7 +25,7 @@ config("rtc_pc_config") {
|
| }
|
| }
|
|
|
| -rtc_static_library("rtc_pc") {
|
| +rtc_static_library("rtc_pc_base") {
|
| defines = []
|
| sources = [
|
| "audiomonitor.cc",
|
| @@ -56,7 +56,7 @@ rtc_static_library("rtc_pc") {
|
| deps = [
|
| "../api:call_api",
|
| "../base:rtc_base",
|
| - "../media",
|
| + "../media:rtc_data",
|
| ]
|
|
|
| if (rtc_build_libsrtp) {
|
| @@ -71,6 +71,18 @@ rtc_static_library("rtc_pc") {
|
| }
|
| }
|
|
|
| +# TODO(zhihuang): Remove this once the downstream dependencies start using the
|
| +# modular targets.
|
| +rtc_static_library("rtc_pc") {
|
| + public_deps = [
|
| + ":rtc_pc_base",
|
| + ]
|
| +
|
| + deps = [
|
| + "../media:rtc_audio_video",
|
| + ]
|
| +}
|
| +
|
| config("libjingle_peerconnection_warnings_config") {
|
| # GN orders flags on a target before flags from configs. The default config
|
| # adds these flags so to cancel them out they need to come from a config and
|
| @@ -80,7 +92,60 @@ config("libjingle_peerconnection_warnings_config") {
|
| }
|
| }
|
|
|
| -rtc_static_library("libjingle_peerconnection") {
|
| +rtc_static_library("webrtc_null_audio") {
|
| + sources = [
|
| + "nullaudiofactory.cc",
|
| + ]
|
| +
|
| + 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" ]
|
| + }
|
| +}
|
| +
|
| +rtc_static_library("webrtc_audio") {
|
| + sources = [
|
| + "audiofactory.cc",
|
| + ]
|
| +
|
| + public_deps = [
|
| + "../media:rtc_audio_video",
|
| + ]
|
| +
|
| + 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" ]
|
| + }
|
| +}
|
| +
|
| +rtc_static_library("webrtc_null_media") {
|
| + sources = [
|
| + "nullmediafactory.cc",
|
| + ]
|
| +
|
| + 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" ]
|
| + }
|
| +}
|
| +
|
| +rtc_static_library("webrtc_media") {
|
| + sources = [
|
| + "mediafactory.cc",
|
| + ]
|
| +
|
| + deps = [
|
| + "../call",
|
| + "../media:rtc_audio_video",
|
| + ]
|
| +
|
| + 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" ]
|
| + }
|
| +}
|
| +
|
| +rtc_static_library("webrtc_base") {
|
| cflags = []
|
| sources = [
|
| "audiotrack.cc",
|
| @@ -141,18 +206,28 @@ rtc_static_library("libjingle_peerconnection") {
|
| }
|
|
|
| deps = [
|
| - ":rtc_pc",
|
| + ":rtc_pc_base",
|
| "../api:call_api",
|
| "../api:rtc_stats_api",
|
| "../api/video_codecs:video_codecs_api",
|
| - "../call",
|
| - "../media",
|
| + "../logging:rtc_event_log_api",
|
| "../stats",
|
| ]
|
|
|
| public_deps = [
|
| "../api:libjingle_peerconnection_api",
|
| ]
|
| +}
|
| +
|
| +# TODO(zhihuang): Remove this once the downstream dependencies start using the
|
| +# modular targets.
|
| +rtc_static_library("libjingle_peerconnection") {
|
| + public_deps = [
|
| + ":webrtc_audio",
|
| + ":webrtc_base",
|
| + ":webrtc_media",
|
| + "../api:libjingle_peerconnection_api",
|
| + ]
|
|
|
| if (rtc_use_quic) {
|
| sources += [
|
| @@ -244,7 +319,6 @@ if (rtc_include_tests) {
|
| ]
|
|
|
| deps = [
|
| - ":libjingle_peerconnection",
|
| "../base:rtc_base_tests_utils",
|
| "//testing/gmock",
|
| ]
|
| @@ -368,4 +442,69 @@ if (rtc_include_tests) {
|
| shard_timeout = 900
|
| }
|
| }
|
| +
|
| + rtc_test("peerconnection_datachannelonly_unittests") {
|
| + check_includes = false # TODO(kjellander): Remove (bugs.webrtc.org/6828)
|
| + testonly = true
|
| + sources = [
|
| + "peerconnection_datachannelonly_unittest.cc",
|
| + ]
|
| +
|
| + if (rtc_enable_sctp) {
|
| + defines = [ "HAVE_SCTP" ]
|
| + }
|
| +
|
| + configs += [ ":peerconnection_unittests_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" ]
|
| + }
|
| +
|
| + # TODO(jschuh): Bug 1348: fix this warning.
|
| + configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
|
| +
|
| + if (is_win) {
|
| + cflags = [
|
| + "/wd4245", # conversion from int to size_t, signed/unsigned mismatch.
|
| + "/wd4389", # signed/unsigned mismatch.
|
| + ]
|
| + }
|
| +
|
| + deps = []
|
| + if (is_android) {
|
| + sources += [
|
| + "test/androidtestinitializer.cc",
|
| + "test/androidtestinitializer.h",
|
| + ]
|
| + deps += [
|
| + "//testing/android/native_test:native_test_support",
|
| + "//webrtc/sdk/android:libjingle_peerconnection_java",
|
| + "//webrtc/sdk/android:webrtc_base_jni",
|
| + "//webrtc/sdk/android:webrtc_null_audio_jni",
|
| + "//webrtc/sdk/android:webrtc_null_video_jni",
|
| + ]
|
| + }
|
| +
|
| + deps += [
|
| + ":pc_test_utils",
|
| + ":webrtc_base",
|
| + ":webrtc_null_audio",
|
| + ":webrtc_null_media",
|
| + "..:webrtc_common",
|
| + "../api:fakemetricsobserver",
|
| + "../base:rtc_base_tests_main",
|
| + "../base:rtc_base_tests_utils",
|
| + "../media:rtc_media_tests_utils",
|
| + "../pc:rtc_pc_base",
|
| + "../system_wrappers:metrics_default",
|
| + "//testing/gmock",
|
| + ]
|
| +
|
| + if (is_android) {
|
| + deps += [ "//testing/android/native_test:native_test_support" ]
|
| +
|
| + shard_timeout = 900
|
| + }
|
| + }
|
| }
|
|
|