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 13 matching lines...) Expand all Loading... | |
52 "srtpfilter.h", | 52 "srtpfilter.h", |
53 "voicechannel.h", | 53 "voicechannel.h", |
54 ] | 54 ] |
55 | 55 |
56 deps = [ | 56 deps = [ |
57 "..:webrtc_common", | 57 "..:webrtc_common", |
58 "../api:call_api", | 58 "../api:call_api", |
59 "../api:libjingle_peerconnection_api", | 59 "../api:libjingle_peerconnection_api", |
60 "../api:ortc_api", | 60 "../api:ortc_api", |
61 "../base:rtc_base", | 61 "../base:rtc_base", |
62 "../common_video:common_video", | 62 "../base:rtc_task_queue", |
63 "../media", | 63 "../media:rtc_data", |
64 "../media:rtc_media_base_data", | |
64 "../p2p:rtc_p2p", | 65 "../p2p:rtc_p2p", |
65 ] | 66 ] |
66 | 67 |
67 if (rtc_build_libsrtp) { | 68 if (rtc_build_libsrtp) { |
68 deps += [ "//third_party/libsrtp" ] | 69 deps += [ "//third_party/libsrtp" ] |
69 } | 70 } |
70 | 71 |
71 public_configs = [ ":rtc_pc_config" ] | 72 public_configs = [ ":rtc_pc_config" ] |
72 | 73 |
73 if (!build_with_chromium && is_clang) { | 74 if (!build_with_chromium && is_clang) { |
74 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 75 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
75 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 76 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
76 } | 77 } |
77 } | 78 } |
78 | 79 |
80 # TODO(zhihuang): Remove this once the downstream dependencies start using the | |
81 # modular targets. | |
82 rtc_source_set("rtc_pc") { | |
83 public_deps = [ | |
84 ":rtc_pc_base", | |
85 ] | |
86 | |
87 deps = [ | |
88 "../media:rtc_audio_video", | |
89 ] | |
90 } | |
91 | |
79 config("libjingle_peerconnection_warnings_config") { | 92 config("libjingle_peerconnection_warnings_config") { |
80 # GN orders flags on a target before flags from configs. The default config | 93 # GN orders flags on a target before flags from configs. The default config |
81 # adds these flags so to cancel them out they need to come from a config and | 94 # adds these flags so to cancel them out they need to come from a config and |
82 # cannot be on the target directly. | 95 # cannot be on the target directly. |
83 if (!is_win && !is_clang) { | 96 if (!is_win && !is_clang) { |
84 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC. | 97 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC. |
85 } | 98 } |
86 } | 99 } |
87 | 100 |
88 rtc_static_library("libjingle_peerconnection") { | 101 rtc_static_library("peerconnection") { |
89 cflags = [] | 102 cflags = [] |
90 sources = [ | 103 sources = [ |
91 "audiotrack.cc", | 104 "audiotrack.cc", |
92 "audiotrack.h", | 105 "audiotrack.h", |
93 "datachannel.cc", | 106 "datachannel.cc", |
94 "datachannel.h", | 107 "datachannel.h", |
95 "dtmfsender.cc", | 108 "dtmfsender.cc", |
96 "dtmfsender.h", | 109 "dtmfsender.h", |
97 "iceserverparsing.cc", | 110 "iceserverparsing.cc", |
98 "iceserverparsing.h", | 111 "iceserverparsing.h", |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
139 ] | 152 ] |
140 | 153 |
141 configs += [ ":libjingle_peerconnection_warnings_config" ] | 154 configs += [ ":libjingle_peerconnection_warnings_config" ] |
142 | 155 |
143 if (!build_with_chromium && is_clang) { | 156 if (!build_with_chromium && is_clang) { |
144 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 157 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
145 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 158 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
146 } | 159 } |
147 | 160 |
148 deps = [ | 161 deps = [ |
149 ":rtc_pc", | 162 ":rtc_pc_base", |
150 "..:webrtc_common", | 163 "..:webrtc_common", |
151 "../api:call_api", | 164 "../api:call_api", |
152 "../api:rtc_stats_api", | 165 "../api:rtc_stats_api", |
153 "../api/audio_codecs:builtin_audio_decoder_factory", | |
154 "../api/audio_codecs:builtin_audio_encoder_factory", | |
155 "../api/video_codecs:video_codecs_api", | 166 "../api/video_codecs:video_codecs_api", |
156 "../base:rtc_base", | 167 "../base:rtc_base", |
157 "../base:rtc_base_approved", | 168 "../base:rtc_base_approved", |
158 "../call", | 169 "../call:call_interfaces", |
159 "../logging:rtc_event_log_api", | 170 "../logging:rtc_event_log_api", |
160 "../media", | 171 "../media:rtc_data", |
161 "../modules/audio_device:audio_device", | 172 "../media:rtc_media_base_data", |
162 "../p2p:rtc_p2p", | 173 "../p2p:rtc_p2p", |
163 "../stats", | 174 "../stats", |
164 "../system_wrappers:system_wrappers", | 175 "../system_wrappers:system_wrappers", |
165 ] | 176 ] |
166 | 177 |
167 public_deps = [ | 178 public_deps = [ |
168 "../api:libjingle_peerconnection_api", | 179 "../api:libjingle_peerconnection_api", |
169 ] | 180 ] |
181 } | |
182 | |
183 # This target implements the CreatePeerConnectionFactory methods to build WebRTC | |
184 # with full support(audio, video and datachannel). The applications would be | |
185 # responsible to create their own implementation of CreatePeerConnectionFactory | |
186 # methods with different dependencies based on their requirements. | |
187 # The target "create_pc_factory_datachannelonly" is an example. | |
the sun
2017/06/12 20:58:41
I'd think create_pc_factory is example enough and
Zhi Huang
2017/06/12 22:18:58
Acknowledged.
| |
188 rtc_static_library("create_pc_factory") { | |
189 sources = [ | |
190 "createpeerconnectionfactory.cc", | |
191 ] | |
192 | |
193 deps = [ | |
194 "../api:audio_mixer_api", | |
195 "../api:libjingle_peerconnection_api", | |
196 "../api/audio_codecs:audio_codecs_api", | |
197 "../api/audio_codecs:builtin_audio_decoder_factory", | |
198 "../api/audio_codecs:builtin_audio_encoder_factory", | |
199 "../base:rtc_base", | |
200 "../base:rtc_base_approved", | |
201 "../call", | |
202 "../call:call_interfaces", | |
203 "../logging:rtc_event_log_api", | |
204 "../media:rtc_audio_video", | |
205 "../modules/audio_device:audio_device", | |
206 ] | |
207 | |
208 configs += [ ":libjingle_peerconnection_warnings_config" ] | |
209 | |
210 if (!build_with_chromium && is_clang) { | |
211 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
212 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
213 } | |
214 } | |
215 | |
216 # This target implements the CreatePeerConnectionFactory methods to build WebRTC | |
217 # with datachannel only support. | |
218 rtc_static_library("create_pc_factory_datachannelonly") { | |
the sun
2017/06/12 20:58:41
Is it possible to move these variants to the JNI c
Zhi Huang
2017/06/12 22:18:58
So you are suggesting to compile this file in the
| |
219 sources = [ | |
220 "createpeerconnectionfactory_datachannelonly.cc", | |
221 ] | |
222 | |
223 deps = [ | |
224 "../api:audio_mixer_api", | |
225 "../api:libjingle_peerconnection_api", | |
226 "../base:rtc_base", | |
227 "../base:rtc_base_approved", | |
228 "../call:call_interfaces", | |
229 "../logging:rtc_event_log_api", | |
230 ] | |
231 | |
232 configs += [ ":libjingle_peerconnection_warnings_config" ] | |
233 | |
234 if (!build_with_chromium && is_clang) { | |
235 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
236 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
237 } | |
238 } | |
239 | |
240 # TODO(zhihuang): Remove this once the downstream dependencies start using the | |
241 # modular targets. | |
242 rtc_source_set("libjingle_peerconnection") { | |
243 public_deps = [ | |
244 ":create_pc_factory", | |
245 ":peerconnection", | |
246 "../api:libjingle_peerconnection_api", | |
247 ] | |
170 | 248 |
171 if (rtc_use_quic) { | 249 if (rtc_use_quic) { |
172 sources += [ | 250 sources += [ |
173 "quicdatachannel.cc", | 251 "quicdatachannel.cc", |
174 "quicdatachannel.h", | 252 "quicdatachannel.h", |
175 "quicdatatransport.cc", | 253 "quicdatatransport.cc", |
176 "quicdatatransport.h", | 254 "quicdatatransport.h", |
177 ] | 255 ] |
178 deps += [ "//third_party/libquic" ] | 256 deps += [ "//third_party/libquic" ] |
179 public_deps = [ | 257 public_deps = [ |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
237 if (rtc_build_libsrtp) { | 315 if (rtc_build_libsrtp) { |
238 deps += [ "//third_party/libsrtp" ] | 316 deps += [ "//third_party/libsrtp" ] |
239 } | 317 } |
240 | 318 |
241 if (is_android) { | 319 if (is_android) { |
242 deps += [ "//testing/android/native_test:native_test_support" ] | 320 deps += [ "//testing/android/native_test:native_test_support" ] |
243 } | 321 } |
244 } | 322 } |
245 | 323 |
246 rtc_source_set("pc_test_utils") { | 324 rtc_source_set("pc_test_utils") { |
325 # Cannot have GN check enabled because this target would also be used in the | |
326 # "peerconnection_datachannelonly_unittests" and we don't want to depend on | |
327 # the target "media:rtc_media_tests_utils" indrectly since it contains all | |
328 # the audio and video related classes. | |
329 # TODO(zhihuang): Enable the check once the "media:rtc_media_tests_utils" is | |
330 # broken down to modular sub-targets. | |
331 check_includes = false | |
247 testonly = true | 332 testonly = true |
248 sources = [ | 333 sources = [ |
249 "test/fakeaudiocapturemodule.cc", | 334 "test/fakeaudiocapturemodule.cc", |
250 "test/fakeaudiocapturemodule.h", | 335 "test/fakeaudiocapturemodule.h", |
251 "test/fakedatachannelprovider.h", | 336 "test/fakedatachannelprovider.h", |
252 "test/fakeperiodicvideocapturer.h", | 337 "test/fakeperiodicvideocapturer.h", |
253 "test/fakertccertificategenerator.h", | 338 "test/fakertccertificategenerator.h", |
254 "test/fakevideotrackrenderer.h", | 339 "test/fakevideotrackrenderer.h", |
255 "test/fakevideotracksource.h", | 340 "test/fakevideotracksource.h", |
256 "test/mock_datachannel.h", | 341 "test/mock_datachannel.h", |
257 "test/mock_peerconnection.h", | 342 "test/mock_peerconnection.h", |
258 "test/mock_webrtcsession.h", | 343 "test/mock_webrtcsession.h", |
259 "test/mockpeerconnectionobservers.h", | 344 "test/mockpeerconnectionobservers.h", |
260 "test/peerconnectiontestwrapper.cc", | 345 "test/peerconnectiontestwrapper.cc", |
261 "test/peerconnectiontestwrapper.h", | 346 "test/peerconnectiontestwrapper.h", |
262 "test/rtcstatsobtainer.h", | 347 "test/rtcstatsobtainer.h", |
263 "test/testsdpstrings.h", | 348 "test/testsdpstrings.h", |
264 ] | 349 ] |
265 | 350 |
266 deps = [ | 351 deps = [ |
267 ":libjingle_peerconnection", | 352 ":peerconnection", |
268 "..:webrtc_common", | 353 "..:webrtc_common", |
269 "../api:libjingle_peerconnection_test_api", | 354 "../api:libjingle_peerconnection_test_api", |
270 "../api:rtc_stats_api", | 355 "../api:rtc_stats_api", |
271 "../base:rtc_base", | 356 "../base:rtc_base", |
272 "../base:rtc_base_approved", | 357 "../base:rtc_base_approved", |
273 "../base:rtc_base_tests_utils", | 358 "../base:rtc_base_tests_utils", |
274 "../media:rtc_media", | |
275 "../media:rtc_media_tests_utils", | |
276 "../modules/audio_device:audio_device", | 359 "../modules/audio_device:audio_device", |
277 "../p2p:p2p_test_utils", | 360 "../p2p:p2p_test_utils", |
278 "../test:test_support", | 361 "../test:test_support", |
279 "//testing/gmock", | 362 "//testing/gmock", |
280 ] | 363 ] |
281 | 364 |
282 if (!build_with_chromium && is_clang) { | 365 if (!build_with_chromium && is_clang) { |
283 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 366 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
284 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 367 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
285 } | 368 } |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
391 "../system_wrappers:metrics_default", | 474 "../system_wrappers:metrics_default", |
392 "//testing/gmock", | 475 "//testing/gmock", |
393 ] | 476 ] |
394 | 477 |
395 if (is_android) { | 478 if (is_android) { |
396 deps += [ "//testing/android/native_test:native_test_support" ] | 479 deps += [ "//testing/android/native_test:native_test_support" ] |
397 | 480 |
398 shard_timeout = 900 | 481 shard_timeout = 900 |
399 } | 482 } |
400 } | 483 } |
484 | |
485 rtc_test("peerconnection_datachannelonly_unittests") { | |
the sun
2017/06/12 20:58:41
You shouldn't need a separate target for this - th
Zhi Huang
2017/06/12 22:18:58
Acknowledged.
| |
486 check_includes = false # TODO(zhihuang): Remove (bugs.webrtc.org/6828) | |
487 testonly = true | |
488 sources = [ | |
489 "peerconnection_datachannelonly_unittest.cc", | |
490 ] | |
491 | |
492 configs += [ ":peerconnection_unittests_config" ] | |
493 | |
494 if (!build_with_chromium && is_clang) { | |
495 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
496 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
497 } | |
498 | |
499 # TODO(jschuh): Bug 1348: fix this warning. | |
500 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | |
501 | |
502 if (is_win) { | |
503 cflags = [ | |
504 "/wd4245", # conversion from int to size_t, signed/unsigned mismatch. | |
505 "/wd4389", # signed/unsigned mismatch. | |
506 ] | |
507 } | |
508 | |
509 deps = [] | |
510 if (is_android) { | |
511 sources += [ | |
512 "test/androidtestinitializer.cc", | |
513 "test/androidtestinitializer.h", | |
514 ] | |
515 deps += [ | |
516 "//testing/android/native_test:native_test_support", | |
517 "//webrtc/sdk/android:base_jni", | |
518 "//webrtc/sdk/android:libjingle_peerconnection_java", | |
519 "//webrtc/sdk/android:null_video_jni", | |
520 ] | |
521 } | |
522 | |
523 deps += [ | |
524 ":create_pc_factory_datachannelonly", | |
525 ":pc_test_utils", | |
526 ":peerconnection", | |
527 "..:webrtc_common", | |
528 "../api:fakemetricsobserver", | |
529 "../base:rtc_base_approved", | |
530 "../base:rtc_base_tests_main", | |
531 "../base:rtc_base_tests_utils", | |
532 "../modules/utility", | |
533 "../pc:rtc_pc_base", | |
534 "../system_wrappers:metrics_default", | |
535 "//testing/gmock", | |
536 ] | |
537 | |
538 if (is_android) { | |
539 deps += [ "//testing/android/native_test:native_test_support" ] | |
540 shard_timeout = 900 | |
541 } | |
542 } | |
401 } | 543 } |
OLD | NEW |