Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
| 2 # | 2 # |
| 3 # Use of this source code is governed by a BSD-style license | 3 # Use of this source code is governed by a BSD-style license |
| 4 # that can be found in the LICENSE file in the root of the source | 4 # that can be found in the LICENSE file in the root of the source |
| 5 # tree. An additional intellectual property rights grant can be found | 5 # tree. An additional intellectual property rights grant can be found |
| 6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
| 7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
| 8 | 8 |
| 9 import("../webrtc.gni") | 9 import("../webrtc.gni") |
| 10 if (is_android) { | 10 if (is_android) { |
| 11 import("//build/config/android/config.gni") | 11 import("//build/config/android/config.gni") |
| 12 import("//build/config/android/rules.gni") | 12 import("//build/config/android/rules.gni") |
| 13 } | 13 } |
| 14 | 14 |
| 15 group("pc") { | 15 group("pc") { |
| 16 public_deps = [ | 16 public_deps = [ |
| 17 ":rtc_pc", | 17 ":rtc_pc", |
| 18 ] | 18 ] |
| 19 } | 19 } |
| 20 | 20 |
| 21 config("rtc_pc_config") { | 21 config("rtc_pc_config") { |
| 22 defines = [] | 22 defines = [] |
| 23 if (rtc_enable_sctp) { | 23 if (rtc_enable_sctp) { |
| 24 defines += [ "HAVE_SCTP" ] | 24 defines += [ "HAVE_SCTP" ] |
| 25 } | 25 } |
| 26 } | 26 } |
| 27 | 27 |
| 28 rtc_static_library("rtc_pc") { | 28 rtc_static_library("rtc_pc_base") { |
| 29 defines = [] | 29 defines = [] |
| 30 sources = [ | 30 sources = [ |
| 31 "audiomonitor.cc", | 31 "audiomonitor.cc", |
| 32 "audiomonitor.h", | 32 "audiomonitor.h", |
| 33 "bundlefilter.cc", | 33 "bundlefilter.cc", |
| 34 "bundlefilter.h", | 34 "bundlefilter.h", |
| 35 "channel.cc", | 35 "channel.cc", |
| 36 "channel.h", | 36 "channel.h", |
| 37 "channelmanager.cc", | 37 "channelmanager.cc", |
| 38 "channelmanager.h", | 38 "channelmanager.h", |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 49 "rtptransport.cc", | 49 "rtptransport.cc", |
| 50 "rtptransport.h", | 50 "rtptransport.h", |
| 51 "srtpfilter.cc", | 51 "srtpfilter.cc", |
| 52 "srtpfilter.h", | 52 "srtpfilter.h", |
| 53 "voicechannel.h", | 53 "voicechannel.h", |
| 54 ] | 54 ] |
| 55 | 55 |
| 56 deps = [ | 56 deps = [ |
| 57 "../api:call_api", | 57 "../api:call_api", |
| 58 "../base:rtc_base", | 58 "../base:rtc_base", |
| 59 "../media", | 59 "../media:rtc_data", |
| 60 ] | 60 ] |
| 61 | 61 |
| 62 if (rtc_build_libsrtp) { | 62 if (rtc_build_libsrtp) { |
| 63 deps += [ "//third_party/libsrtp" ] | 63 deps += [ "//third_party/libsrtp" ] |
| 64 } | 64 } |
| 65 | 65 |
| 66 public_configs = [ ":rtc_pc_config" ] | 66 public_configs = [ ":rtc_pc_config" ] |
| 67 | 67 |
| 68 if (!build_with_chromium && is_clang) { | 68 if (!build_with_chromium && is_clang) { |
| 69 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 69 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 70 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 70 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 71 } | 71 } |
| 72 } | 72 } |
| 73 | 73 |
| 74 # TODO(zhihuang): Remove this once the downstream dependencies start using the | |
| 75 # modular targets. | |
| 76 rtc_source_set("rtc_pc") { | |
| 77 public_deps = [ | |
| 78 ":rtc_pc_base", | |
| 79 ] | |
| 80 | |
| 81 deps = [ | |
| 82 "../media:rtc_audio_video", | |
| 83 ] | |
| 84 } | |
| 85 | |
| 74 config("libjingle_peerconnection_warnings_config") { | 86 config("libjingle_peerconnection_warnings_config") { |
| 75 # GN orders flags on a target before flags from configs. The default config | 87 # GN orders flags on a target before flags from configs. The default config |
| 76 # adds these flags so to cancel them out they need to come from a config and | 88 # adds these flags so to cancel them out they need to come from a config and |
| 77 # cannot be on the target directly. | 89 # cannot be on the target directly. |
| 78 if (!is_win && !is_clang) { | 90 if (!is_win && !is_clang) { |
| 79 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC. | 91 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC. |
| 80 } | 92 } |
| 81 } | 93 } |
| 82 | 94 |
| 83 rtc_static_library("libjingle_peerconnection") { | 95 # This target contains the null implementation of the audio module and it is |
| 96 # used to build WebRTC without audio support. | |
| 97 rtc_static_library("rtc_null_audio") { | |
| 98 sources = [ | |
| 99 "nullaudiofactory.cc", | |
| 100 ] | |
| 101 | |
| 102 if (!build_with_chromium && is_clang) { | |
| 103 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
| 104 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
| 105 } | |
| 106 } | |
| 107 | |
| 108 # This target contains the real implementation of the audio module and it is | |
| 109 # used to build WebRTC with audio support. It should never be used with | |
| 110 # "rtc_null_audio" at the same time and it should always be linked with the | |
| 111 # "rtc_media". | |
| 112 rtc_static_library("rtc_audio") { | |
| 113 sources = [ | |
| 114 "audiofactory.cc", | |
| 115 ] | |
| 116 | |
| 117 public_deps = [ | |
| 118 "../media:rtc_audio_video", | |
| 119 ] | |
| 120 | |
| 121 if (!build_with_chromium && is_clang) { | |
| 122 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
| 123 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
| 124 } | |
| 125 } | |
| 126 | |
| 127 # This target contains the null implementation of the audio/video related | |
| 128 # objects and it is used to build WebRTC without audio and video support. | |
| 129 rtc_source_set("rtc_null_media") { | |
| 130 sources = [ | |
| 131 "nullmediafactory.cc", | |
| 132 ] | |
| 133 | |
| 134 if (!build_with_chromium && is_clang) { | |
| 135 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
| 136 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
| 137 } | |
| 138 } | |
| 139 | |
| 140 # This target contains the real implementation of the audio/video related | |
| 141 # objects and it is used to build WebRTC with audio and video support. | |
| 142 rtc_source_set("rtc_media") { | |
| 143 deps = [ | |
| 144 "../call", | |
| 145 "../media:rtc_audio_video", | |
| 146 ] | |
| 147 | |
| 148 if (!build_with_chromium && is_clang) { | |
| 149 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
| 150 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
| 151 } | |
| 152 } | |
| 153 | |
| 154 # The modular build targets can be used to build WebRTC with different | |
| 155 # functionalities. The users can choose either the real implemenation | |
| 156 # or the null implementation of the audio/video modules based on their | |
| 157 # requirments. | |
| 158 # | |
| 159 # For example, to build WebRTC with datachannel support only, we would need the | |
| 160 # the peerconnection and the null implementation of the audio and video modules. | |
| 161 # | |
| 162 # rtc_source_set("webrtc_datachannel_only") { | |
| 163 # deps = [ | |
| 164 # ":rtc_null_audio", | |
| 165 # ":rtc_null_media", | |
| 166 # ":rtc_peerconnection", | |
| 167 # ] | |
| 168 # } | |
| 169 # | |
| 170 # To build WebRTC with all the audio, video and datachannel support, we would | |
| 171 # need the peerconnection and the real implementation of the audio and video | |
| 172 # modules. | |
| 173 # | |
| 174 # rtc_source_set("webrtc_full") { | |
| 175 # deps = [ | |
| 176 # ":rtc_audio", | |
| 177 # ":rtc_media", | |
| 178 # ":rtc_peerconnection", | |
| 179 # ] | |
| 180 # } | |
| 181 rtc_static_library("rtc_peerconnection") { | |
| 84 cflags = [] | 182 cflags = [] |
| 85 sources = [ | 183 sources = [ |
| 86 "audiotrack.cc", | 184 "audiotrack.cc", |
| 87 "audiotrack.h", | 185 "audiotrack.h", |
| 88 "datachannel.cc", | 186 "datachannel.cc", |
| 89 "datachannel.h", | 187 "datachannel.h", |
| 90 "dtmfsender.cc", | 188 "dtmfsender.cc", |
| 91 "dtmfsender.h", | 189 "dtmfsender.h", |
| 92 "iceserverparsing.cc", | 190 "iceserverparsing.cc", |
| 93 "iceserverparsing.h", | 191 "iceserverparsing.h", |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 134 ] | 232 ] |
| 135 | 233 |
| 136 configs += [ ":libjingle_peerconnection_warnings_config" ] | 234 configs += [ ":libjingle_peerconnection_warnings_config" ] |
| 137 | 235 |
| 138 if (!build_with_chromium && is_clang) { | 236 if (!build_with_chromium && is_clang) { |
| 139 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 237 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 140 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 238 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 141 } | 239 } |
| 142 | 240 |
| 143 deps = [ | 241 deps = [ |
| 144 ":rtc_pc", | 242 ":rtc_pc_base", |
| 145 "../api:call_api", | 243 "../api:call_api", |
| 146 "../api:rtc_stats_api", | 244 "../api:rtc_stats_api", |
| 147 "../api/video_codecs:video_codecs_api", | 245 "../api/video_codecs:video_codecs_api", |
| 148 "../call", | 246 "../logging:rtc_event_log_api", |
| 149 "../media", | |
| 150 "../stats", | 247 "../stats", |
| 151 ] | 248 ] |
| 152 | 249 |
| 153 public_deps = [ | 250 public_deps = [ |
| 154 "../api:libjingle_peerconnection_api", | 251 "../api:libjingle_peerconnection_api", |
| 155 ] | 252 ] |
| 253 } | |
| 254 | |
| 255 # TODO(zhihuang): Remove this once the downstream dependencies start using the | |
| 256 # modular targets. | |
| 257 rtc_source_set("libjingle_peerconnection") { | |
|
Zhi Huang
2017/05/31 03:55:37
I think we might have to revert the changes here i
| |
| 258 public_deps = [ | |
| 259 ":rtc_audio", | |
| 260 ":rtc_media", | |
| 261 ":rtc_peerconnection", | |
| 262 "../api:libjingle_peerconnection_api", | |
| 263 ] | |
| 156 | 264 |
| 157 if (rtc_use_quic) { | 265 if (rtc_use_quic) { |
| 158 sources += [ | 266 sources += [ |
| 159 "quicdatachannel.cc", | 267 "quicdatachannel.cc", |
| 160 "quicdatachannel.h", | 268 "quicdatachannel.h", |
| 161 "quicdatatransport.cc", | 269 "quicdatatransport.cc", |
| 162 "quicdatatransport.h", | 270 "quicdatatransport.h", |
| 163 ] | 271 ] |
| 164 deps += [ "//third_party/libquic" ] | 272 deps += [ "//third_party/libquic" ] |
| 165 public_deps = [ | 273 public_deps = [ |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 237 "test/mock_peerconnection.h", | 345 "test/mock_peerconnection.h", |
| 238 "test/mock_webrtcsession.h", | 346 "test/mock_webrtcsession.h", |
| 239 "test/mockpeerconnectionobservers.h", | 347 "test/mockpeerconnectionobservers.h", |
| 240 "test/peerconnectiontestwrapper.cc", | 348 "test/peerconnectiontestwrapper.cc", |
| 241 "test/peerconnectiontestwrapper.h", | 349 "test/peerconnectiontestwrapper.h", |
| 242 "test/rtcstatsobtainer.h", | 350 "test/rtcstatsobtainer.h", |
| 243 "test/testsdpstrings.h", | 351 "test/testsdpstrings.h", |
| 244 ] | 352 ] |
| 245 | 353 |
| 246 deps = [ | 354 deps = [ |
| 247 ":libjingle_peerconnection", | |
| 248 "../base:rtc_base_tests_utils", | 355 "../base:rtc_base_tests_utils", |
| 249 "//testing/gmock", | 356 "//testing/gmock", |
| 250 ] | 357 ] |
| 251 | 358 |
| 252 if (!build_with_chromium && is_clang) { | 359 if (!build_with_chromium && is_clang) { |
| 253 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 360 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 254 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 361 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 255 } | 362 } |
| 256 } | 363 } |
| 257 | 364 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 361 "../system_wrappers:metrics_default", | 468 "../system_wrappers:metrics_default", |
| 362 "//testing/gmock", | 469 "//testing/gmock", |
| 363 ] | 470 ] |
| 364 | 471 |
| 365 if (is_android) { | 472 if (is_android) { |
| 366 deps += [ "//testing/android/native_test:native_test_support" ] | 473 deps += [ "//testing/android/native_test:native_test_support" ] |
| 367 | 474 |
| 368 shard_timeout = 900 | 475 shard_timeout = 900 |
| 369 } | 476 } |
| 370 } | 477 } |
| 478 | |
| 479 rtc_test("peerconnection_datachannelonly_unittests") { | |
| 480 testonly = true | |
| 481 sources = [ | |
| 482 "peerconnection_datachannelonly_unittest.cc", | |
| 483 ] | |
| 484 | |
| 485 defines = [ "HAVE_SCTP" ] | |
| 486 | |
| 487 configs += [ ":peerconnection_unittests_config" ] | |
| 488 | |
| 489 if (!build_with_chromium && is_clang) { | |
| 490 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
| 491 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
| 492 } | |
| 493 | |
| 494 # TODO(jschuh): Bug 1348: fix this warning. | |
| 495 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | |
| 496 | |
| 497 if (is_win) { | |
| 498 cflags = [ | |
| 499 "/wd4245", # conversion from int to size_t, signed/unsigned mismatch. | |
| 500 "/wd4389", # signed/unsigned mismatch. | |
| 501 ] | |
| 502 } | |
| 503 | |
| 504 deps = [] | |
| 505 if (is_android) { | |
| 506 sources += [ | |
| 507 "test/androidtestinitializer.cc", | |
| 508 "test/androidtestinitializer.h", | |
| 509 ] | |
| 510 deps += [ | |
| 511 "//testing/android/native_test:native_test_support", | |
| 512 "//webrtc/sdk/android:base_jni", | |
| 513 "//webrtc/sdk/android:libjingle_peerconnection_java", | |
| 514 "//webrtc/sdk/android:null_audio_jni", | |
| 515 "//webrtc/sdk/android:null_video_jni", | |
| 516 ] | |
| 517 } | |
| 518 | |
| 519 deps += [ | |
| 520 ":pc_test_utils", | |
| 521 ":rtc_null_audio", | |
| 522 ":rtc_null_media", | |
| 523 ":rtc_peerconnection", | |
| 524 "..:webrtc_common", | |
| 525 "../api:fakemetricsobserver", | |
| 526 "../base:rtc_base_tests_main", | |
| 527 "../base:rtc_base_tests_utils", | |
| 528 "../modules/utility", | |
| 529 "../pc:rtc_pc_base", | |
| 530 "../system_wrappers:metrics_default", | |
| 531 "//testing/gmock", | |
| 532 ] | |
| 533 | |
| 534 if (is_android) { | |
| 535 deps += [ "//testing/android/native_test:native_test_support" ] | |
| 536 shard_timeout = 900 | |
| 537 } | |
| 538 } | |
| 371 } | 539 } |
| OLD | NEW |