blob: 165be5600bddac811dd992142a3516172fcc103d [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",
mbonadei7d9a55b2017-06-01 13:01:48 -0700190 "../system_wrappers:system_wrappers",
ossu7bb87ee2017-01-23 04:56:25 -0800191 ]
192
ossuda250062017-01-23 07:37:43 -0800193 public_deps = [
194 "../api:libjingle_peerconnection_api",
195 ]
zhihuang38ede132017-06-15 12:52:32 -0700196}
197
198# This target implements CreatePeerConnectionFactory methods that will create a
199# PeerConnection will full functionality (audio, video and data). Applications
200# that wish to reduce their binary size by ommitting functionality they don't
201# need should use CreateModularCreatePeerConnectionFactory instead, using the
202# "peerconnection" build target and other targets specific to their
203# requrements. See comment in peerconnectionfactoryinterface.h.
zhihuangab97e182017-06-22 01:28:59 -0700204rtc_static_library("create_pc_factory") {
zhihuang38ede132017-06-15 12:52:32 -0700205 sources = [
206 "createpeerconnectionfactory.cc",
207 ]
208
209 deps = [
210 "../api:audio_mixer_api",
211 "../api:libjingle_peerconnection_api",
Edward Lemur872cf382017-11-20 18:41:50 +0100212 "../api:peerconnection_and_implicit_call_api",
zhihuang38ede132017-06-15 12:52:32 -0700213 "../api/audio_codecs:audio_codecs_api",
Magnus Jedvert58b03162017-09-15 19:02:47 +0200214 "../api/video_codecs:video_codecs_api",
zhihuang38ede132017-06-15 12:52:32 -0700215 "../call",
216 "../call:call_interfaces",
217 "../logging:rtc_event_log_api",
218 "../media:rtc_audio_video",
Edward Lemur872cf382017-11-20 18:41:50 +0100219 "../media:rtc_media_base",
zhihuang38ede132017-06-15 12:52:32 -0700220 "../modules/audio_device:audio_device",
peaha9cc40b2017-06-29 08:32:09 -0700221 "../modules/audio_processing:audio_processing",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700222 "../rtc_base:rtc_base",
223 "../rtc_base:rtc_base_approved",
zhihuang38ede132017-06-15 12:52:32 -0700224 ]
225
226 configs += [ ":libjingle_peerconnection_warnings_config" ]
227
228 if (!build_with_chromium && is_clang) {
229 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
230 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
231 }
232}
233
234rtc_source_set("libjingle_peerconnection") {
235 public_deps = [
236 ":create_pc_factory",
237 ":peerconnection",
238 "../api:libjingle_peerconnection_api",
239 ]
ossu7bb87ee2017-01-23 04:56:25 -0800240}
241
kjellander142f8c52016-06-13 00:08:24 -0700242if (rtc_include_tests) {
243 config("rtc_pc_unittests_config") {
244 # GN orders flags on a target before flags from configs. The default config
245 # adds -Wall, and this flag have to be after -Wall -- so they need to
246 # come from a config and can't be on the target directly.
247 if (!is_win && !is_clang) {
248 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC.
249 }
250 }
251
ehmaldonado38a21322016-09-02 04:10:34 -0700252 rtc_test("rtc_pc_unittests") {
kjellander142f8c52016-06-13 00:08:24 -0700253 testonly = true
254
255 sources = [
256 "bundlefilter_unittest.cc",
257 "channel_unittest.cc",
258 "channelmanager_unittest.cc",
259 "currentspeakermonitor_unittest.cc",
Zhi Huangf2d7beb2017-11-20 14:35:11 -0800260 "dtlssrtptransport_unittest.cc",
kjellander142f8c52016-06-13 00:08:24 -0700261 "mediasession_unittest.cc",
262 "rtcpmuxfilter_unittest.cc",
zstein56162b92017-04-24 16:54:35 -0700263 "rtptransport_unittest.cc",
zstein398c3fd2017-07-19 13:38:02 -0700264 "rtptransporttestutil.h",
kjellander142f8c52016-06-13 00:08:24 -0700265 "srtpfilter_unittest.cc",
zstein4dde3df2017-07-07 14:26:25 -0700266 "srtpsession_unittest.cc",
267 "srtptestutil.h",
zstein398c3fd2017-07-19 13:38:02 -0700268 "srtptransport_unittest.cc",
Zhi Huangb5261582017-09-29 10:51:43 -0700269 "transportcontroller_unittest.cc",
kjellander142f8c52016-06-13 00:08:24 -0700270 ]
271
272 include_dirs = [ "//third_party/libsrtp/srtp" ]
273
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700274 configs += [ ":rtc_pc_unittests_config" ]
kjellander142f8c52016-06-13 00:08:24 -0700275
kjellandere40a7ee2016-10-16 23:56:12 -0700276 if (!build_with_chromium && is_clang) {
kjellander142f8c52016-06-13 00:08:24 -0700277 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700278 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander142f8c52016-06-13 00:08:24 -0700279 }
280
281 if (is_win) {
282 libs = [ "strmiids.lib" ]
283 }
284
285 deps = [
ossu7bb87ee2017-01-23 04:56:25 -0800286 ":libjingle_peerconnection",
Zhi Huangb5261582017-09-29 10:51:43 -0700287 ":pc_test_utils",
kjellander142f8c52016-06-13 00:08:24 -0700288 ":rtc_pc",
kwiberg529662a2017-09-04 05:43:17 -0700289 "../api:array_view",
mbonadei7d9a55b2017-06-01 13:01:48 -0700290 "../logging:rtc_event_log_api",
291 "../media:rtc_media_base",
mbonadei9087d492017-04-25 00:35:35 -0700292 "../media:rtc_media_tests_utils",
mbonadei7d9a55b2017-06-01 13:01:48 -0700293 "../p2p:p2p_test_utils",
294 "../p2p:rtc_p2p",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700295 "../rtc_base:rtc_base",
296 "../rtc_base:rtc_base_approved",
297 "../rtc_base:rtc_base_tests_main",
298 "../rtc_base:rtc_base_tests_utils",
kjellander142f8c52016-06-13 00:08:24 -0700299 "../system_wrappers:metrics_default",
zstein398c3fd2017-07-19 13:38:02 -0700300 "../test:test_support",
kjellander142f8c52016-06-13 00:08:24 -0700301 ]
302
303 if (rtc_build_libsrtp) {
304 deps += [ "//third_party/libsrtp" ]
305 }
306
307 if (is_android) {
308 deps += [ "//testing/android/native_test:native_test_support" ]
309 }
310 }
ossu7bb87ee2017-01-23 04:56:25 -0800311
deadbeefe814a0d2017-02-25 18:15:09 -0800312 rtc_source_set("pc_test_utils") {
313 testonly = true
314 sources = [
315 "test/fakeaudiocapturemodule.cc",
316 "test/fakeaudiocapturemodule.h",
317 "test/fakedatachannelprovider.h",
318 "test/fakeperiodicvideocapturer.h",
319 "test/fakertccertificategenerator.h",
Steve Antonda6c0952017-10-23 11:41:54 -0700320 "test/fakesctptransport.h",
Zhi Huangb5261582017-09-29 10:51:43 -0700321 "test/faketransportcontroller.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800322 "test/fakevideotrackrenderer.h",
323 "test/fakevideotracksource.h",
324 "test/mock_datachannel.h",
325 "test/mock_peerconnection.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800326 "test/mockpeerconnectionobservers.h",
327 "test/peerconnectiontestwrapper.cc",
328 "test/peerconnectiontestwrapper.h",
329 "test/rtcstatsobtainer.h",
330 "test/testsdpstrings.h",
331 ]
332
333 deps = [
334 ":libjingle_peerconnection",
Zhi Huangb5261582017-09-29 10:51:43 -0700335 ":rtc_pc_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700336 "..:webrtc_common",
337 "../api:libjingle_peerconnection_test_api",
Edward Lemur872cf382017-11-20 18:41:50 +0100338 "../api:peerconnection_and_implicit_call_api",
mbonadei7d9a55b2017-06-01 13:01:48 -0700339 "../api:rtc_stats_api",
zhihuang38ede132017-06-15 12:52:32 -0700340 "../call:call_interfaces",
341 "../logging:rtc_event_log_api",
mbonadei7d9a55b2017-06-01 13:01:48 -0700342 "../media:rtc_media",
Edward Lemur872cf382017-11-20 18:41:50 +0100343 "../media:rtc_media_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700344 "../media:rtc_media_tests_utils",
345 "../modules/audio_device:audio_device",
346 "../p2p:p2p_test_utils",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700347 "../rtc_base:rtc_base",
348 "../rtc_base:rtc_base_approved",
349 "../rtc_base:rtc_base_tests_utils",
mbonadei7d9a55b2017-06-01 13:01:48 -0700350 "../test:test_support",
deadbeefe814a0d2017-02-25 18:15:09 -0800351 "//testing/gmock",
352 ]
353
354 if (!build_with_chromium && is_clang) {
355 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
356 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
357 }
358 }
359
ossu7bb87ee2017-01-23 04:56:25 -0800360 config("peerconnection_unittests_config") {
361 # The warnings below are enabled by default. Since GN orders compiler flags
362 # for a target before flags from configs, the only way to disable such
363 # warnings is by having them in a separate config, loaded from the target.
364 # TODO(kjellander): Make the code compile without disabling these flags.
365 # See https://bugs.webrtc.org/3307.
366 if (is_clang && is_win) {
367 cflags = [
368 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6267
369 # for -Wno-sign-compare
370 "-Wno-sign-compare",
ossu7bb87ee2017-01-23 04:56:25 -0800371 ]
372 }
373
374 if (!is_win) {
375 cflags = [ "-Wno-sign-compare" ]
376 }
377 }
378
379 rtc_test("peerconnection_unittests") {
ossu7bb87ee2017-01-23 04:56:25 -0800380 testonly = true
381 sources = [
382 "datachannel_unittest.cc",
383 "dtmfsender_unittest.cc",
deadbeef1dcb1642017-03-29 21:08:16 -0700384 "iceserverparsing_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800385 "jsepsessiondescription_unittest.cc",
386 "localaudiosource_unittest.cc",
387 "mediaconstraintsinterface_unittest.cc",
388 "mediastream_unittest.cc",
Steve Anton6f25b092017-10-23 09:39:20 -0700389 "peerconnection_bundle_unittest.cc",
Steve Anton6b63cd52017-10-06 11:20:31 -0700390 "peerconnection_crypto_unittest.cc",
Steve Antonda6c0952017-10-23 11:41:54 -0700391 "peerconnection_datachannel_unittest.cc",
Steve Antonf1c6db12017-10-13 11:13:35 -0700392 "peerconnection_ice_unittest.cc",
deadbeef1dcb1642017-03-29 21:08:16 -0700393 "peerconnection_integrationtest.cc",
Steve Anton8d3444d2017-10-20 15:30:51 -0700394 "peerconnection_media_unittest.cc",
Henrik Boström933d8b02017-10-10 10:05:16 -0700395 "peerconnection_rtp_unittest.cc",
Steve Anton8d3444d2017-10-20 15:30:51 -0700396 "peerconnection_signaling_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800397 "peerconnectionendtoend_unittest.cc",
398 "peerconnectionfactory_unittest.cc",
399 "peerconnectioninterface_unittest.cc",
Steve Anton94286cb2017-09-26 16:20:19 -0700400 "peerconnectionwrapper.cc",
401 "peerconnectionwrapper.h",
ossu7bb87ee2017-01-23 04:56:25 -0800402 "proxy_unittest.cc",
403 "rtcstats_integrationtest.cc",
404 "rtcstatscollector_unittest.cc",
Steve Anton1d03a752017-11-27 14:30:09 -0800405 "rtpmediautils_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800406 "rtpsenderreceiver_unittest.cc",
407 "sctputils_unittest.cc",
408 "statscollector_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800409 "test/fakeaudiocapturemodule_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800410 "test/testsdpstrings.h",
deadbeef804c1af2017-02-11 19:07:31 -0800411 "trackmediainfomap_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800412 "videocapturertracksource_unittest.cc",
413 "videotrack_unittest.cc",
414 "webrtcsdp_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800415 ]
416
417 if (rtc_enable_sctp) {
418 defines = [ "HAVE_SCTP" ]
419 }
420
421 configs += [ ":peerconnection_unittests_config" ]
422
423 if (!build_with_chromium && is_clang) {
424 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
425 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
426 }
427
428 # TODO(jschuh): Bug 1348: fix this warning.
429 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
430
431 if (is_win) {
432 cflags = [
433 "/wd4245", # conversion from int to size_t, signed/unsigned mismatch.
434 "/wd4389", # signed/unsigned mismatch.
435 ]
436 }
437
ossu7bb87ee2017-01-23 04:56:25 -0800438 deps = []
439 if (is_android) {
Patrik Höglund563934e2017-09-15 09:04:28 +0200440 deps += [ ":android_black_magic" ]
ossu7bb87ee2017-01-23 04:56:25 -0800441 }
442
443 deps += [
444 ":libjingle_peerconnection",
deadbeefe814a0d2017-02-25 18:15:09 -0800445 ":pc_test_utils",
ossu7bb87ee2017-01-23 04:56:25 -0800446 "..:webrtc_common",
447 "../api:fakemetricsobserver",
Patrik Höglund563934e2017-09-15 09:04:28 +0200448 "../api:libjingle_peerconnection_test_api",
Henrik Boström31638672017-11-23 17:48:32 +0100449 "../api:optional",
Patrik Höglund563934e2017-09-15 09:04:28 +0200450 "../api:rtc_stats_api",
Karl Wibergc5bb00b2017-10-10 23:17:17 +0200451 "../api/audio_codecs:audio_codecs_api",
Patrik Höglund563934e2017-09-15 09:04:28 +0200452 "../api/audio_codecs:builtin_audio_decoder_factory",
453 "../api/audio_codecs:builtin_audio_encoder_factory",
Karl Wibergc5bb00b2017-10-10 23:17:17 +0200454 "../api/audio_codecs/L16:audio_decoder_L16",
455 "../api/audio_codecs/L16:audio_encoder_L16",
Steve Anton8d3444d2017-10-20 15:30:51 -0700456 "../call:call_interfaces",
Elad Alon99c3fe52017-10-13 16:29:40 +0200457 "../logging:rtc_event_log_api",
Steve Anton8d3444d2017-10-20 15:30:51 -0700458 "../logging:rtc_event_log_impl",
Patrik Höglund563934e2017-09-15 09:04:28 +0200459 "../media:rtc_audio_video",
460 "../media:rtc_data", # TODO(phoglund): AFAIK only used for one sctp constant.
461 "../media:rtc_media_base",
mbonadei9087d492017-04-25 00:35:35 -0700462 "../media:rtc_media_tests_utils",
Patrik Höglund563934e2017-09-15 09:04:28 +0200463 "../modules/audio_processing:audio_processing",
464 "../modules/utility:utility",
465 "../p2p:p2p_test_utils",
466 "../p2p:rtc_p2p",
ossu7bb87ee2017-01-23 04:56:25 -0800467 "../pc:rtc_pc",
Henrik Boström933d8b02017-10-10 10:05:16 -0700468 "../rtc_base:rtc_base",
Patrik Höglund563934e2017-09-15 09:04:28 +0200469 "../rtc_base:rtc_base_approved",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700470 "../rtc_base:rtc_base_tests_main",
471 "../rtc_base:rtc_base_tests_utils",
ossu7bb87ee2017-01-23 04:56:25 -0800472 "../system_wrappers:metrics_default",
kwiberg2b3aa142017-06-14 03:31:17 -0700473 "../test:audio_codec_mocks",
Patrik Höglund563934e2017-09-15 09:04:28 +0200474 "../test:test_support",
ossu7bb87ee2017-01-23 04:56:25 -0800475 ]
476
477 if (is_android) {
Patrik Höglund563934e2017-09-15 09:04:28 +0200478 deps += [
479 "//testing/android/native_test:native_test_support",
480
481 # We need to depend on this one directly, or classloads will fail for
482 # the voice engine BuildInfo, for instance.
483 "../sdk/android:libjingle_peerconnection_java",
484 ]
ossu7bb87ee2017-01-23 04:56:25 -0800485
486 shard_timeout = 900
487 }
488 }
Patrik Höglund563934e2017-09-15 09:04:28 +0200489
490 if (is_android) {
491 rtc_source_set("android_black_magic") {
492 # The android code uses hacky includes to chromium-base and the ssl code;
493 # having this in a separate target enables us to keep the peerconnection
494 # unit tests clean.
495 check_includes = false
496 testonly = true
497 sources = [
498 "test/androidtestinitializer.cc",
499 "test/androidtestinitializer.h",
500 ]
501 deps = [
502 "../sdk/android:libjingle_peerconnection_jni",
503 "//testing/android/native_test:native_test_support",
504 ]
505 }
506 }
kjellander142f8c52016-06-13 00:08:24 -0700507}