blob: d6260a984b4c9aeec3c2e8f947789386c783205a [file] [log] [blame]
kjellanderc76dc952016-06-03 03:09:32 -07001# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
2#
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
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
mbonadei9aa3f0a2017-01-24 06:58:22 -08009import("../webrtc.gni")
ossu7bb87ee2017-01-23 04:56:25 -080010if (is_android) {
11 import("//build/config/android/config.gni")
12 import("//build/config/android/rules.gni")
13}
kjellanderc76dc952016-06-03 03:09:32 -070014
15group("pc") {
kjellander705ecc52016-09-15 00:53:26 -070016 public_deps = [
kjellanderc76dc952016-06-03 03:09:32 -070017 ":rtc_pc",
18 ]
19}
20
21config("rtc_pc_config") {
jbaucheaa9c1d2017-03-06 11:32:22 -080022 defines = []
deadbeef40610e22016-12-22 10:53:38 -080023 if (rtc_enable_sctp) {
24 defines += [ "HAVE_SCTP" ]
25 }
kjellanderc76dc952016-06-03 03:09:32 -070026}
27
zhihuang38ede132017-06-15 12:52:32 -070028rtc_static_library("rtc_pc_base") {
kjellanderc76dc952016-06-03 03:09:32 -070029 defines = []
30 sources = [
31 "audiomonitor.cc",
32 "audiomonitor.h",
33 "bundlefilter.cc",
34 "bundlefilter.h",
35 "channel.cc",
36 "channel.h",
37 "channelmanager.cc",
38 "channelmanager.h",
39 "currentspeakermonitor.cc",
40 "currentspeakermonitor.h",
Zhi Huangf2d7beb2017-11-20 14:35:11 -080041 "dtlssrtptransport.cc",
42 "dtlssrtptransport.h",
jbauchdfcab722017-03-06 00:14:10 -080043 "externalhmac.cc",
44 "externalhmac.h",
kjellanderc76dc952016-06-03 03:09:32 -070045 "mediamonitor.cc",
46 "mediamonitor.h",
47 "mediasession.cc",
48 "mediasession.h",
kjellanderc76dc952016-06-03 03:09:32 -070049 "rtcpmuxfilter.cc",
50 "rtcpmuxfilter.h",
Steve Anton1d03a752017-11-27 14:30:09 -080051 "rtpmediautils.cc",
52 "rtpmediautils.h",
zsteind48dbda2017-04-04 19:45:57 -070053 "rtptransport.cc",
54 "rtptransport.h",
zstein398c3fd2017-07-19 13:38:02 -070055 "rtptransportinternal.h",
Zhi Huangf2d7beb2017-11-20 14:35:11 -080056 "rtptransportinternaladapter.h",
kjellanderc76dc952016-06-03 03:09:32 -070057 "srtpfilter.cc",
58 "srtpfilter.h",
zstein4dde3df2017-07-07 14:26:25 -070059 "srtpsession.cc",
60 "srtpsession.h",
zstein398c3fd2017-07-19 13:38:02 -070061 "srtptransport.cc",
62 "srtptransport.h",
Zhi Huangb5261582017-09-29 10:51:43 -070063 "transportcontroller.cc",
64 "transportcontroller.h",
kjellanderc76dc952016-06-03 03:09:32 -070065 "voicechannel.h",
66 ]
67
68 deps = [
mbonadei7d9a55b2017-06-01 13:01:48 -070069 "..:webrtc_common",
kjellandera69d9732016-08-31 07:33:05 -070070 "../api:call_api",
mbonadei7d9a55b2017-06-01 13:01:48 -070071 "../api:libjingle_peerconnection_api",
kwiberg84f6a3f2017-09-05 08:43:13 -070072 "../api:optional",
mbonadei7d9a55b2017-06-01 13:01:48 -070073 "../api:ortc_api",
zhihuang38ede132017-06-15 12:52:32 -070074 "../media:rtc_data",
zhihuang130ca7e2017-06-21 01:02:59 -070075 "../media:rtc_h264_profile_id",
zhihuang38ede132017-06-15 12:52:32 -070076 "../media:rtc_media_base",
mbonadei7d9a55b2017-06-01 13:01:48 -070077 "../p2p:rtc_p2p",
ehmaldonadof6a861a2017-07-19 10:40:47 -070078 "../rtc_base:rtc_base",
79 "../rtc_base:rtc_task_queue",
kjellanderc76dc952016-06-03 03:09:32 -070080 ]
81
kjellanderc76dc952016-06-03 03:09:32 -070082 if (rtc_build_libsrtp) {
83 deps += [ "//third_party/libsrtp" ]
84 }
85
ehmaldonadoe9cc6862016-09-05 06:10:18 -070086 public_configs = [ ":rtc_pc_config" ]
kjellanderc76dc952016-06-03 03:09:32 -070087
kjellandere40a7ee2016-10-16 23:56:12 -070088 if (!build_with_chromium && is_clang) {
kjellander142f8c52016-06-13 00:08:24 -070089 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070090 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -070091 }
92}
kjellander142f8c52016-06-13 00:08:24 -070093
zhihuang38ede132017-06-15 12:52:32 -070094rtc_source_set("rtc_pc") {
95 public_deps = [
96 ":rtc_pc_base",
97 ]
98
99 deps = [
100 "../media:rtc_audio_video",
101 ]
102}
103
ossu7bb87ee2017-01-23 04:56:25 -0800104config("libjingle_peerconnection_warnings_config") {
105 # GN orders flags on a target before flags from configs. The default config
106 # adds these flags so to cancel them out they need to come from a config and
107 # cannot be on the target directly.
108 if (!is_win && !is_clang) {
109 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC.
110 }
111}
112
zhihuang38ede132017-06-15 12:52:32 -0700113rtc_static_library("peerconnection") {
ossu7bb87ee2017-01-23 04:56:25 -0800114 cflags = []
115 sources = [
116 "audiotrack.cc",
117 "audiotrack.h",
118 "datachannel.cc",
119 "datachannel.h",
120 "dtmfsender.cc",
121 "dtmfsender.h",
deadbeef1dcb1642017-03-29 21:08:16 -0700122 "iceserverparsing.cc",
123 "iceserverparsing.h",
ossu7bb87ee2017-01-23 04:56:25 -0800124 "jsepicecandidate.cc",
125 "jsepsessiondescription.cc",
126 "localaudiosource.cc",
127 "localaudiosource.h",
ossu7bb87ee2017-01-23 04:56:25 -0800128 "mediastream.cc",
129 "mediastream.h",
130 "mediastreamobserver.cc",
131 "mediastreamobserver.h",
132 "mediastreamtrack.h",
ossu7bb87ee2017-01-23 04:56:25 -0800133 "peerconnection.cc",
134 "peerconnection.h",
135 "peerconnectionfactory.cc",
136 "peerconnectionfactory.h",
137 "remoteaudiosource.cc",
138 "remoteaudiosource.h",
139 "rtcstatscollector.cc",
140 "rtcstatscollector.h",
141 "rtpreceiver.cc",
142 "rtpreceiver.h",
143 "rtpsender.cc",
144 "rtpsender.h",
Steve Anton6e634bf2017-11-13 10:44:53 -0800145 "rtptransceiver.cc",
146 "rtptransceiver.h",
ossu7bb87ee2017-01-23 04:56:25 -0800147 "sctputils.cc",
148 "sctputils.h",
Steve Anton97a9f762017-10-06 10:14:03 -0700149 "sdputils.cc",
150 "sdputils.h",
ossu7bb87ee2017-01-23 04:56:25 -0800151 "statscollector.cc",
152 "statscollector.h",
153 "streamcollection.h",
deadbeef804c1af2017-02-11 19:07:31 -0800154 "trackmediainfomap.cc",
155 "trackmediainfomap.h",
ossu7bb87ee2017-01-23 04:56:25 -0800156 "videocapturertracksource.cc",
157 "videocapturertracksource.h",
158 "videotrack.cc",
159 "videotrack.h",
160 "videotracksource.cc",
161 "videotracksource.h",
162 "webrtcsdp.cc",
163 "webrtcsdp.h",
ossu7bb87ee2017-01-23 04:56:25 -0800164 "webrtcsessiondescriptionfactory.cc",
165 "webrtcsessiondescriptionfactory.h",
166 ]
167
168 configs += [ ":libjingle_peerconnection_warnings_config" ]
169
170 if (!build_with_chromium && is_clang) {
171 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
172 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
173 }
174
175 deps = [
zhihuang38ede132017-06-15 12:52:32 -0700176 ":rtc_pc_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700177 "..:webrtc_common",
ossu7bb87ee2017-01-23 04:56:25 -0800178 "../api:call_api",
kwiberg84f6a3f2017-09-05 08:43:13 -0700179 "../api:optional",
ossu7bb87ee2017-01-23 04:56:25 -0800180 "../api:rtc_stats_api",
ilnikd60d06a2017-04-05 03:02:20 -0700181 "../api/video_codecs:video_codecs_api",
zhihuang38ede132017-06-15 12:52:32 -0700182 "../call:call_interfaces",
mbonadei7d9a55b2017-06-01 13:01:48 -0700183 "../logging:rtc_event_log_api",
zhihuang38ede132017-06-15 12:52:32 -0700184 "../media:rtc_data",
185 "../media:rtc_media_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700186 "../p2p:rtc_p2p",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700187 "../rtc_base:rtc_base",
188 "../rtc_base:rtc_base_approved",
ossu7bb87ee2017-01-23 04:56:25 -0800189 "../stats",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100190 "../system_wrappers",
191 "../system_wrappers:field_trial_api",
ossu7bb87ee2017-01-23 04:56:25 -0800192 ]
193
ossuda250062017-01-23 07:37:43 -0800194 public_deps = [
195 "../api:libjingle_peerconnection_api",
196 ]
zhihuang38ede132017-06-15 12:52:32 -0700197}
198
199# This target implements CreatePeerConnectionFactory methods that will create a
200# PeerConnection will full functionality (audio, video and data). Applications
201# that wish to reduce their binary size by ommitting functionality they don't
202# need should use CreateModularCreatePeerConnectionFactory instead, using the
203# "peerconnection" build target and other targets specific to their
204# requrements. See comment in peerconnectionfactoryinterface.h.
zhihuangab97e182017-06-22 01:28:59 -0700205rtc_static_library("create_pc_factory") {
zhihuang38ede132017-06-15 12:52:32 -0700206 sources = [
207 "createpeerconnectionfactory.cc",
208 ]
209
210 deps = [
211 "../api:audio_mixer_api",
212 "../api:libjingle_peerconnection_api",
Edward Lemur872cf382017-11-20 18:41:50 +0100213 "../api:peerconnection_and_implicit_call_api",
zhihuang38ede132017-06-15 12:52:32 -0700214 "../api/audio_codecs:audio_codecs_api",
Magnus Jedvert58b03162017-09-15 19:02:47 +0200215 "../api/video_codecs:video_codecs_api",
zhihuang38ede132017-06-15 12:52:32 -0700216 "../call",
217 "../call:call_interfaces",
218 "../logging:rtc_event_log_api",
219 "../media:rtc_audio_video",
Edward Lemur872cf382017-11-20 18:41:50 +0100220 "../media:rtc_media_base",
zhihuang38ede132017-06-15 12:52:32 -0700221 "../modules/audio_device:audio_device",
peaha9cc40b2017-06-29 08:32:09 -0700222 "../modules/audio_processing:audio_processing",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700223 "../rtc_base:rtc_base",
224 "../rtc_base:rtc_base_approved",
zhihuang38ede132017-06-15 12:52:32 -0700225 ]
226
227 configs += [ ":libjingle_peerconnection_warnings_config" ]
228
229 if (!build_with_chromium && is_clang) {
230 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
231 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
232 }
233}
234
235rtc_source_set("libjingle_peerconnection") {
236 public_deps = [
237 ":create_pc_factory",
238 ":peerconnection",
239 "../api:libjingle_peerconnection_api",
240 ]
ossu7bb87ee2017-01-23 04:56:25 -0800241}
242
kjellander142f8c52016-06-13 00:08:24 -0700243if (rtc_include_tests) {
244 config("rtc_pc_unittests_config") {
245 # GN orders flags on a target before flags from configs. The default config
246 # adds -Wall, and this flag have to be after -Wall -- so they need to
247 # come from a config and can't be on the target directly.
248 if (!is_win && !is_clang) {
249 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC.
250 }
251 }
252
ehmaldonado38a21322016-09-02 04:10:34 -0700253 rtc_test("rtc_pc_unittests") {
kjellander142f8c52016-06-13 00:08:24 -0700254 testonly = true
255
256 sources = [
257 "bundlefilter_unittest.cc",
258 "channel_unittest.cc",
259 "channelmanager_unittest.cc",
260 "currentspeakermonitor_unittest.cc",
Zhi Huangf2d7beb2017-11-20 14:35:11 -0800261 "dtlssrtptransport_unittest.cc",
kjellander142f8c52016-06-13 00:08:24 -0700262 "mediasession_unittest.cc",
263 "rtcpmuxfilter_unittest.cc",
zstein56162b92017-04-24 16:54:35 -0700264 "rtptransport_unittest.cc",
zstein398c3fd2017-07-19 13:38:02 -0700265 "rtptransporttestutil.h",
kjellander142f8c52016-06-13 00:08:24 -0700266 "srtpfilter_unittest.cc",
zstein4dde3df2017-07-07 14:26:25 -0700267 "srtpsession_unittest.cc",
268 "srtptestutil.h",
zstein398c3fd2017-07-19 13:38:02 -0700269 "srtptransport_unittest.cc",
Zhi Huangb5261582017-09-29 10:51:43 -0700270 "transportcontroller_unittest.cc",
kjellander142f8c52016-06-13 00:08:24 -0700271 ]
272
273 include_dirs = [ "//third_party/libsrtp/srtp" ]
274
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700275 configs += [ ":rtc_pc_unittests_config" ]
kjellander142f8c52016-06-13 00:08:24 -0700276
kjellandere40a7ee2016-10-16 23:56:12 -0700277 if (!build_with_chromium && is_clang) {
kjellander142f8c52016-06-13 00:08:24 -0700278 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700279 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander142f8c52016-06-13 00:08:24 -0700280 }
281
282 if (is_win) {
283 libs = [ "strmiids.lib" ]
284 }
285
286 deps = [
ossu7bb87ee2017-01-23 04:56:25 -0800287 ":libjingle_peerconnection",
Zhi Huangb5261582017-09-29 10:51:43 -0700288 ":pc_test_utils",
kjellander142f8c52016-06-13 00:08:24 -0700289 ":rtc_pc",
kwiberg529662a2017-09-04 05:43:17 -0700290 "../api:array_view",
mbonadei7d9a55b2017-06-01 13:01:48 -0700291 "../logging:rtc_event_log_api",
292 "../media:rtc_media_base",
mbonadei9087d492017-04-25 00:35:35 -0700293 "../media:rtc_media_tests_utils",
mbonadei7d9a55b2017-06-01 13:01:48 -0700294 "../p2p:p2p_test_utils",
295 "../p2p:rtc_p2p",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700296 "../rtc_base:rtc_base",
297 "../rtc_base:rtc_base_approved",
298 "../rtc_base:rtc_base_tests_main",
299 "../rtc_base:rtc_base_tests_utils",
kjellander142f8c52016-06-13 00:08:24 -0700300 "../system_wrappers:metrics_default",
zstein398c3fd2017-07-19 13:38:02 -0700301 "../test:test_support",
kjellander142f8c52016-06-13 00:08:24 -0700302 ]
303
304 if (rtc_build_libsrtp) {
305 deps += [ "//third_party/libsrtp" ]
306 }
307
308 if (is_android) {
309 deps += [ "//testing/android/native_test:native_test_support" ]
310 }
311 }
ossu7bb87ee2017-01-23 04:56:25 -0800312
deadbeefe814a0d2017-02-25 18:15:09 -0800313 rtc_source_set("pc_test_utils") {
314 testonly = true
315 sources = [
316 "test/fakeaudiocapturemodule.cc",
317 "test/fakeaudiocapturemodule.h",
318 "test/fakedatachannelprovider.h",
319 "test/fakeperiodicvideocapturer.h",
320 "test/fakertccertificategenerator.h",
Steve Antonda6c0952017-10-23 11:41:54 -0700321 "test/fakesctptransport.h",
Zhi Huangb5261582017-09-29 10:51:43 -0700322 "test/faketransportcontroller.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800323 "test/fakevideotrackrenderer.h",
324 "test/fakevideotracksource.h",
325 "test/mock_datachannel.h",
326 "test/mock_peerconnection.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800327 "test/mockpeerconnectionobservers.h",
328 "test/peerconnectiontestwrapper.cc",
329 "test/peerconnectiontestwrapper.h",
330 "test/rtcstatsobtainer.h",
331 "test/testsdpstrings.h",
332 ]
333
334 deps = [
335 ":libjingle_peerconnection",
Zhi Huangb5261582017-09-29 10:51:43 -0700336 ":rtc_pc_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700337 "..:webrtc_common",
338 "../api:libjingle_peerconnection_test_api",
Edward Lemur872cf382017-11-20 18:41:50 +0100339 "../api:peerconnection_and_implicit_call_api",
mbonadei7d9a55b2017-06-01 13:01:48 -0700340 "../api:rtc_stats_api",
zhihuang38ede132017-06-15 12:52:32 -0700341 "../call:call_interfaces",
342 "../logging:rtc_event_log_api",
mbonadei7d9a55b2017-06-01 13:01:48 -0700343 "../media:rtc_media",
Edward Lemur872cf382017-11-20 18:41:50 +0100344 "../media:rtc_media_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700345 "../media:rtc_media_tests_utils",
346 "../modules/audio_device:audio_device",
347 "../p2p:p2p_test_utils",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700348 "../rtc_base:rtc_base",
349 "../rtc_base:rtc_base_approved",
350 "../rtc_base:rtc_base_tests_utils",
mbonadei7d9a55b2017-06-01 13:01:48 -0700351 "../test:test_support",
deadbeefe814a0d2017-02-25 18:15:09 -0800352 "//testing/gmock",
353 ]
354
355 if (!build_with_chromium && is_clang) {
356 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
357 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
358 }
359 }
360
ossu7bb87ee2017-01-23 04:56:25 -0800361 config("peerconnection_unittests_config") {
362 # The warnings below are enabled by default. Since GN orders compiler flags
363 # for a target before flags from configs, the only way to disable such
364 # warnings is by having them in a separate config, loaded from the target.
365 # TODO(kjellander): Make the code compile without disabling these flags.
366 # See https://bugs.webrtc.org/3307.
367 if (is_clang && is_win) {
368 cflags = [
369 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6267
370 # for -Wno-sign-compare
371 "-Wno-sign-compare",
ossu7bb87ee2017-01-23 04:56:25 -0800372 ]
373 }
374
375 if (!is_win) {
376 cflags = [ "-Wno-sign-compare" ]
377 }
378 }
379
380 rtc_test("peerconnection_unittests") {
ossu7bb87ee2017-01-23 04:56:25 -0800381 testonly = true
382 sources = [
383 "datachannel_unittest.cc",
384 "dtmfsender_unittest.cc",
deadbeef1dcb1642017-03-29 21:08:16 -0700385 "iceserverparsing_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800386 "jsepsessiondescription_unittest.cc",
387 "localaudiosource_unittest.cc",
388 "mediaconstraintsinterface_unittest.cc",
389 "mediastream_unittest.cc",
Steve Anton6f25b092017-10-23 09:39:20 -0700390 "peerconnection_bundle_unittest.cc",
Steve Anton6b63cd52017-10-06 11:20:31 -0700391 "peerconnection_crypto_unittest.cc",
Steve Antonda6c0952017-10-23 11:41:54 -0700392 "peerconnection_datachannel_unittest.cc",
Steve Antonf1c6db12017-10-13 11:13:35 -0700393 "peerconnection_ice_unittest.cc",
deadbeef1dcb1642017-03-29 21:08:16 -0700394 "peerconnection_integrationtest.cc",
Steve Anton8d3444d2017-10-20 15:30:51 -0700395 "peerconnection_media_unittest.cc",
Henrik Boström933d8b02017-10-10 10:05:16 -0700396 "peerconnection_rtp_unittest.cc",
Steve Anton8d3444d2017-10-20 15:30:51 -0700397 "peerconnection_signaling_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800398 "peerconnectionendtoend_unittest.cc",
399 "peerconnectionfactory_unittest.cc",
400 "peerconnectioninterface_unittest.cc",
Steve Anton94286cb2017-09-26 16:20:19 -0700401 "peerconnectionwrapper.cc",
402 "peerconnectionwrapper.h",
ossu7bb87ee2017-01-23 04:56:25 -0800403 "proxy_unittest.cc",
404 "rtcstats_integrationtest.cc",
405 "rtcstatscollector_unittest.cc",
Steve Anton1d03a752017-11-27 14:30:09 -0800406 "rtpmediautils_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800407 "rtpsenderreceiver_unittest.cc",
408 "sctputils_unittest.cc",
409 "statscollector_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800410 "test/fakeaudiocapturemodule_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800411 "test/testsdpstrings.h",
deadbeef804c1af2017-02-11 19:07:31 -0800412 "trackmediainfomap_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800413 "videocapturertracksource_unittest.cc",
414 "videotrack_unittest.cc",
415 "webrtcsdp_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800416 ]
417
418 if (rtc_enable_sctp) {
419 defines = [ "HAVE_SCTP" ]
420 }
421
422 configs += [ ":peerconnection_unittests_config" ]
423
424 if (!build_with_chromium && is_clang) {
425 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
426 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
427 }
428
429 # TODO(jschuh): Bug 1348: fix this warning.
430 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
431
432 if (is_win) {
433 cflags = [
434 "/wd4245", # conversion from int to size_t, signed/unsigned mismatch.
435 "/wd4389", # signed/unsigned mismatch.
436 ]
437 }
438
ossu7bb87ee2017-01-23 04:56:25 -0800439 deps = []
440 if (is_android) {
Patrik Höglund563934e2017-09-15 09:04:28 +0200441 deps += [ ":android_black_magic" ]
ossu7bb87ee2017-01-23 04:56:25 -0800442 }
443
444 deps += [
445 ":libjingle_peerconnection",
deadbeefe814a0d2017-02-25 18:15:09 -0800446 ":pc_test_utils",
ossu7bb87ee2017-01-23 04:56:25 -0800447 "..:webrtc_common",
448 "../api:fakemetricsobserver",
Patrik Höglund563934e2017-09-15 09:04:28 +0200449 "../api:libjingle_peerconnection_test_api",
Henrik Boström31638672017-11-23 17:48:32 +0100450 "../api:optional",
Patrik Höglund563934e2017-09-15 09:04:28 +0200451 "../api:rtc_stats_api",
Karl Wibergc5bb00b2017-10-10 23:17:17 +0200452 "../api/audio_codecs:audio_codecs_api",
Patrik Höglund563934e2017-09-15 09:04:28 +0200453 "../api/audio_codecs:builtin_audio_decoder_factory",
454 "../api/audio_codecs:builtin_audio_encoder_factory",
Karl Wibergc5bb00b2017-10-10 23:17:17 +0200455 "../api/audio_codecs/L16:audio_decoder_L16",
456 "../api/audio_codecs/L16:audio_encoder_L16",
Steve Anton8d3444d2017-10-20 15:30:51 -0700457 "../call:call_interfaces",
Elad Alon99c3fe52017-10-13 16:29:40 +0200458 "../logging:rtc_event_log_api",
Steve Anton8d3444d2017-10-20 15:30:51 -0700459 "../logging:rtc_event_log_impl",
Patrik Höglund563934e2017-09-15 09:04:28 +0200460 "../media:rtc_audio_video",
461 "../media:rtc_data", # TODO(phoglund): AFAIK only used for one sctp constant.
462 "../media:rtc_media_base",
mbonadei9087d492017-04-25 00:35:35 -0700463 "../media:rtc_media_tests_utils",
Patrik Höglund563934e2017-09-15 09:04:28 +0200464 "../modules/audio_processing:audio_processing",
465 "../modules/utility:utility",
466 "../p2p:p2p_test_utils",
467 "../p2p:rtc_p2p",
ossu7bb87ee2017-01-23 04:56:25 -0800468 "../pc:rtc_pc",
Henrik Boström933d8b02017-10-10 10:05:16 -0700469 "../rtc_base:rtc_base",
Patrik Höglund563934e2017-09-15 09:04:28 +0200470 "../rtc_base:rtc_base_approved",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700471 "../rtc_base:rtc_base_tests_main",
472 "../rtc_base:rtc_base_tests_utils",
ossu7bb87ee2017-01-23 04:56:25 -0800473 "../system_wrappers:metrics_default",
kwiberg2b3aa142017-06-14 03:31:17 -0700474 "../test:audio_codec_mocks",
Patrik Höglund563934e2017-09-15 09:04:28 +0200475 "../test:test_support",
ossu7bb87ee2017-01-23 04:56:25 -0800476 ]
477
478 if (is_android) {
Patrik Höglund563934e2017-09-15 09:04:28 +0200479 deps += [
480 "//testing/android/native_test:native_test_support",
481
482 # We need to depend on this one directly, or classloads will fail for
483 # the voice engine BuildInfo, for instance.
484 "../sdk/android:libjingle_peerconnection_java",
485 ]
ossu7bb87ee2017-01-23 04:56:25 -0800486
487 shard_timeout = 900
488 }
489 }
Patrik Höglund563934e2017-09-15 09:04:28 +0200490
491 if (is_android) {
492 rtc_source_set("android_black_magic") {
493 # The android code uses hacky includes to chromium-base and the ssl code;
494 # having this in a separate target enables us to keep the peerconnection
495 # unit tests clean.
496 check_includes = false
497 testonly = true
498 sources = [
499 "test/androidtestinitializer.cc",
500 "test/androidtestinitializer.h",
501 ]
502 deps = [
503 "../sdk/android:libjingle_peerconnection_jni",
504 "//testing/android/native_test:native_test_support",
505 ]
506 }
507 }
kjellander142f8c52016-06-13 00:08:24 -0700508}