blob: 225f7f47423c172726ab4ba66e82220464d972a4 [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") {
Mirko Bonadeie51f7852017-12-06 11:23:19 +010016 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",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010078 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -070079 "../rtc_base:rtc_base",
80 "../rtc_base:rtc_task_queue",
kjellanderc76dc952016-06-03 03:09:32 -070081 ]
82
kjellanderc76dc952016-06-03 03:09:32 -070083 if (rtc_build_libsrtp) {
84 deps += [ "//third_party/libsrtp" ]
85 }
86
ehmaldonadoe9cc6862016-09-05 06:10:18 -070087 public_configs = [ ":rtc_pc_config" ]
kjellanderc76dc952016-06-03 03:09:32 -070088
kjellandere40a7ee2016-10-16 23:56:12 -070089 if (!build_with_chromium && is_clang) {
kjellander142f8c52016-06-13 00:08:24 -070090 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070091 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -070092 }
93}
kjellander142f8c52016-06-13 00:08:24 -070094
zhihuang38ede132017-06-15 12:52:32 -070095rtc_source_set("rtc_pc") {
zhihuang38ede132017-06-15 12:52:32 -070096 deps = [
Mirko Bonadeie51f7852017-12-06 11:23:19 +010097 ":rtc_pc_base",
zhihuang38ede132017-06-15 12:52:32 -070098 "../media:rtc_audio_video",
99 ]
100}
101
ossu7bb87ee2017-01-23 04:56:25 -0800102config("libjingle_peerconnection_warnings_config") {
103 # GN orders flags on a target before flags from configs. The default config
104 # adds these flags so to cancel them out they need to come from a config and
105 # cannot be on the target directly.
106 if (!is_win && !is_clang) {
107 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC.
108 }
109}
110
zhihuang38ede132017-06-15 12:52:32 -0700111rtc_static_library("peerconnection") {
ossu7bb87ee2017-01-23 04:56:25 -0800112 cflags = []
113 sources = [
114 "audiotrack.cc",
115 "audiotrack.h",
116 "datachannel.cc",
117 "datachannel.h",
118 "dtmfsender.cc",
119 "dtmfsender.h",
deadbeef1dcb1642017-03-29 21:08:16 -0700120 "iceserverparsing.cc",
121 "iceserverparsing.h",
ossu7bb87ee2017-01-23 04:56:25 -0800122 "jsepicecandidate.cc",
123 "jsepsessiondescription.cc",
124 "localaudiosource.cc",
125 "localaudiosource.h",
ossu7bb87ee2017-01-23 04:56:25 -0800126 "mediastream.cc",
127 "mediastream.h",
128 "mediastreamobserver.cc",
129 "mediastreamobserver.h",
130 "mediastreamtrack.h",
ossu7bb87ee2017-01-23 04:56:25 -0800131 "peerconnection.cc",
132 "peerconnection.h",
133 "peerconnectionfactory.cc",
134 "peerconnectionfactory.h",
135 "remoteaudiosource.cc",
136 "remoteaudiosource.h",
137 "rtcstatscollector.cc",
138 "rtcstatscollector.h",
139 "rtpreceiver.cc",
140 "rtpreceiver.h",
141 "rtpsender.cc",
142 "rtpsender.h",
Steve Anton6e634bf2017-11-13 10:44:53 -0800143 "rtptransceiver.cc",
144 "rtptransceiver.h",
ossu7bb87ee2017-01-23 04:56:25 -0800145 "sctputils.cc",
146 "sctputils.h",
Steve Anton97a9f762017-10-06 10:14:03 -0700147 "sdputils.cc",
148 "sdputils.h",
ossu7bb87ee2017-01-23 04:56:25 -0800149 "statscollector.cc",
150 "statscollector.h",
151 "streamcollection.h",
deadbeef804c1af2017-02-11 19:07:31 -0800152 "trackmediainfomap.cc",
153 "trackmediainfomap.h",
ossu7bb87ee2017-01-23 04:56:25 -0800154 "videocapturertracksource.cc",
155 "videocapturertracksource.h",
156 "videotrack.cc",
157 "videotrack.h",
158 "videotracksource.cc",
159 "videotracksource.h",
160 "webrtcsdp.cc",
161 "webrtcsdp.h",
ossu7bb87ee2017-01-23 04:56:25 -0800162 "webrtcsessiondescriptionfactory.cc",
163 "webrtcsessiondescriptionfactory.h",
164 ]
165
166 configs += [ ":libjingle_peerconnection_warnings_config" ]
167
168 if (!build_with_chromium && is_clang) {
169 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
170 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
171 }
172
173 deps = [
zhihuang38ede132017-06-15 12:52:32 -0700174 ":rtc_pc_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700175 "..:webrtc_common",
ossu7bb87ee2017-01-23 04:56:25 -0800176 "../api:call_api",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100177 "../api:libjingle_peerconnection_api",
kwiberg84f6a3f2017-09-05 08:43:13 -0700178 "../api:optional",
ossu7bb87ee2017-01-23 04:56:25 -0800179 "../api:rtc_stats_api",
ilnikd60d06a2017-04-05 03:02:20 -0700180 "../api/video_codecs:video_codecs_api",
zhihuang38ede132017-06-15 12:52:32 -0700181 "../call:call_interfaces",
mbonadei7d9a55b2017-06-01 13:01:48 -0700182 "../logging:rtc_event_log_api",
zhihuang38ede132017-06-15 12:52:32 -0700183 "../media:rtc_data",
184 "../media:rtc_media_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700185 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100186 "../rtc_base:checks",
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 ]
zhihuang38ede132017-06-15 12:52:32 -0700193}
194
195# This target implements CreatePeerConnectionFactory methods that will create a
196# PeerConnection will full functionality (audio, video and data). Applications
197# that wish to reduce their binary size by ommitting functionality they don't
198# need should use CreateModularCreatePeerConnectionFactory instead, using the
199# "peerconnection" build target and other targets specific to their
200# requrements. See comment in peerconnectionfactoryinterface.h.
zhihuangab97e182017-06-22 01:28:59 -0700201rtc_static_library("create_pc_factory") {
zhihuang38ede132017-06-15 12:52:32 -0700202 sources = [
203 "createpeerconnectionfactory.cc",
204 ]
205
206 deps = [
207 "../api:audio_mixer_api",
208 "../api:libjingle_peerconnection_api",
Edward Lemur872cf382017-11-20 18:41:50 +0100209 "../api:peerconnection_and_implicit_call_api",
zhihuang38ede132017-06-15 12:52:32 -0700210 "../api/audio_codecs:audio_codecs_api",
Magnus Jedvert58b03162017-09-15 19:02:47 +0200211 "../api/video_codecs:video_codecs_api",
zhihuang38ede132017-06-15 12:52:32 -0700212 "../call",
213 "../call:call_interfaces",
214 "../logging:rtc_event_log_api",
215 "../media:rtc_audio_video",
Edward Lemur872cf382017-11-20 18:41:50 +0100216 "../media:rtc_media_base",
zhihuang38ede132017-06-15 12:52:32 -0700217 "../modules/audio_device:audio_device",
peaha9cc40b2017-06-29 08:32:09 -0700218 "../modules/audio_processing:audio_processing",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700219 "../rtc_base:rtc_base",
220 "../rtc_base:rtc_base_approved",
zhihuang38ede132017-06-15 12:52:32 -0700221 ]
222
223 configs += [ ":libjingle_peerconnection_warnings_config" ]
224
225 if (!build_with_chromium && is_clang) {
226 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
227 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
228 }
229}
230
231rtc_source_set("libjingle_peerconnection") {
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100232 deps = [
zhihuang38ede132017-06-15 12:52:32 -0700233 ":create_pc_factory",
234 ":peerconnection",
235 "../api:libjingle_peerconnection_api",
236 ]
ossu7bb87ee2017-01-23 04:56:25 -0800237}
238
kjellander142f8c52016-06-13 00:08:24 -0700239if (rtc_include_tests) {
240 config("rtc_pc_unittests_config") {
241 # GN orders flags on a target before flags from configs. The default config
242 # adds -Wall, and this flag have to be after -Wall -- so they need to
243 # come from a config and can't be on the target directly.
244 if (!is_win && !is_clang) {
245 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC.
246 }
247 }
248
ehmaldonado38a21322016-09-02 04:10:34 -0700249 rtc_test("rtc_pc_unittests") {
kjellander142f8c52016-06-13 00:08:24 -0700250 testonly = true
251
252 sources = [
253 "bundlefilter_unittest.cc",
254 "channel_unittest.cc",
255 "channelmanager_unittest.cc",
256 "currentspeakermonitor_unittest.cc",
Zhi Huangf2d7beb2017-11-20 14:35:11 -0800257 "dtlssrtptransport_unittest.cc",
kjellander142f8c52016-06-13 00:08:24 -0700258 "mediasession_unittest.cc",
259 "rtcpmuxfilter_unittest.cc",
zstein56162b92017-04-24 16:54:35 -0700260 "rtptransport_unittest.cc",
zstein398c3fd2017-07-19 13:38:02 -0700261 "rtptransporttestutil.h",
kjellander142f8c52016-06-13 00:08:24 -0700262 "srtpfilter_unittest.cc",
zstein4dde3df2017-07-07 14:26:25 -0700263 "srtpsession_unittest.cc",
264 "srtptestutil.h",
zstein398c3fd2017-07-19 13:38:02 -0700265 "srtptransport_unittest.cc",
Zhi Huangb5261582017-09-29 10:51:43 -0700266 "transportcontroller_unittest.cc",
kjellander142f8c52016-06-13 00:08:24 -0700267 ]
268
269 include_dirs = [ "//third_party/libsrtp/srtp" ]
270
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700271 configs += [ ":rtc_pc_unittests_config" ]
kjellander142f8c52016-06-13 00:08:24 -0700272
kjellandere40a7ee2016-10-16 23:56:12 -0700273 if (!build_with_chromium && is_clang) {
kjellander142f8c52016-06-13 00:08:24 -0700274 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700275 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander142f8c52016-06-13 00:08:24 -0700276 }
277
278 if (is_win) {
279 libs = [ "strmiids.lib" ]
280 }
281
282 deps = [
ossu7bb87ee2017-01-23 04:56:25 -0800283 ":libjingle_peerconnection",
Zhi Huangb5261582017-09-29 10:51:43 -0700284 ":pc_test_utils",
kjellander142f8c52016-06-13 00:08:24 -0700285 ":rtc_pc",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100286 ":rtc_pc_base",
kwiberg529662a2017-09-04 05:43:17 -0700287 "../api:array_view",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100288 "../api:libjingle_peerconnection_api",
mbonadei7d9a55b2017-06-01 13:01:48 -0700289 "../logging:rtc_event_log_api",
290 "../media:rtc_media_base",
mbonadei9087d492017-04-25 00:35:35 -0700291 "../media:rtc_media_tests_utils",
mbonadei7d9a55b2017-06-01 13:01:48 -0700292 "../p2p:p2p_test_utils",
293 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100294 "../rtc_base:checks",
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",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100335 ":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",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100348 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700349 "../rtc_base:rtc_base",
350 "../rtc_base:rtc_base_approved",
351 "../rtc_base:rtc_base_tests_utils",
mbonadei7d9a55b2017-06-01 13:01:48 -0700352 "../test:test_support",
deadbeefe814a0d2017-02-25 18:15:09 -0800353 "//testing/gmock",
354 ]
355
356 if (!build_with_chromium && is_clang) {
357 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
358 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
359 }
360 }
361
ossu7bb87ee2017-01-23 04:56:25 -0800362 config("peerconnection_unittests_config") {
363 # The warnings below are enabled by default. Since GN orders compiler flags
364 # for a target before flags from configs, the only way to disable such
365 # warnings is by having them in a separate config, loaded from the target.
366 # TODO(kjellander): Make the code compile without disabling these flags.
367 # See https://bugs.webrtc.org/3307.
368 if (is_clang && is_win) {
369 cflags = [
370 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6267
371 # for -Wno-sign-compare
372 "-Wno-sign-compare",
ossu7bb87ee2017-01-23 04:56:25 -0800373 ]
374 }
375
376 if (!is_win) {
377 cflags = [ "-Wno-sign-compare" ]
378 }
379 }
380
381 rtc_test("peerconnection_unittests") {
ossu7bb87ee2017-01-23 04:56:25 -0800382 testonly = true
383 sources = [
384 "datachannel_unittest.cc",
385 "dtmfsender_unittest.cc",
deadbeef1dcb1642017-03-29 21:08:16 -0700386 "iceserverparsing_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800387 "jsepsessiondescription_unittest.cc",
388 "localaudiosource_unittest.cc",
389 "mediaconstraintsinterface_unittest.cc",
390 "mediastream_unittest.cc",
Steve Anton6f25b092017-10-23 09:39:20 -0700391 "peerconnection_bundle_unittest.cc",
Steve Anton6b63cd52017-10-06 11:20:31 -0700392 "peerconnection_crypto_unittest.cc",
Steve Antonda6c0952017-10-23 11:41:54 -0700393 "peerconnection_datachannel_unittest.cc",
Steve Antonf1c6db12017-10-13 11:13:35 -0700394 "peerconnection_ice_unittest.cc",
deadbeef1dcb1642017-03-29 21:08:16 -0700395 "peerconnection_integrationtest.cc",
Steve Anton8d3444d2017-10-20 15:30:51 -0700396 "peerconnection_media_unittest.cc",
Henrik Boström933d8b02017-10-10 10:05:16 -0700397 "peerconnection_rtp_unittest.cc",
Steve Anton8d3444d2017-10-20 15:30:51 -0700398 "peerconnection_signaling_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800399 "peerconnectionendtoend_unittest.cc",
400 "peerconnectionfactory_unittest.cc",
401 "peerconnectioninterface_unittest.cc",
Steve Anton94286cb2017-09-26 16:20:19 -0700402 "peerconnectionwrapper.cc",
403 "peerconnectionwrapper.h",
ossu7bb87ee2017-01-23 04:56:25 -0800404 "proxy_unittest.cc",
405 "rtcstats_integrationtest.cc",
406 "rtcstatscollector_unittest.cc",
Steve Anton1d03a752017-11-27 14:30:09 -0800407 "rtpmediautils_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800408 "rtpsenderreceiver_unittest.cc",
409 "sctputils_unittest.cc",
410 "statscollector_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800411 "test/fakeaudiocapturemodule_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800412 "test/testsdpstrings.h",
deadbeef804c1af2017-02-11 19:07:31 -0800413 "trackmediainfomap_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800414 "videocapturertracksource_unittest.cc",
415 "videotrack_unittest.cc",
416 "webrtcsdp_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800417 ]
418
419 if (rtc_enable_sctp) {
420 defines = [ "HAVE_SCTP" ]
421 }
422
423 configs += [ ":peerconnection_unittests_config" ]
424
425 if (!build_with_chromium && is_clang) {
426 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
427 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
428 }
429
430 # TODO(jschuh): Bug 1348: fix this warning.
431 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
432
433 if (is_win) {
434 cflags = [
435 "/wd4245", # conversion from int to size_t, signed/unsigned mismatch.
436 "/wd4389", # signed/unsigned mismatch.
437 ]
438 }
439
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100440 deps = [
441 ":peerconnection",
442 ":rtc_pc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100443 "../rtc_base:checks",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100444 ]
ossu7bb87ee2017-01-23 04:56:25 -0800445 if (is_android) {
Patrik Höglund563934e2017-09-15 09:04:28 +0200446 deps += [ ":android_black_magic" ]
ossu7bb87ee2017-01-23 04:56:25 -0800447 }
448
449 deps += [
450 ":libjingle_peerconnection",
deadbeefe814a0d2017-02-25 18:15:09 -0800451 ":pc_test_utils",
ossu7bb87ee2017-01-23 04:56:25 -0800452 "..:webrtc_common",
453 "../api:fakemetricsobserver",
Patrik Höglund563934e2017-09-15 09:04:28 +0200454 "../api:libjingle_peerconnection_test_api",
Henrik Boström31638672017-11-23 17:48:32 +0100455 "../api:optional",
Patrik Höglund563934e2017-09-15 09:04:28 +0200456 "../api:rtc_stats_api",
Karl Wibergc5bb00b2017-10-10 23:17:17 +0200457 "../api/audio_codecs:audio_codecs_api",
Patrik Höglund563934e2017-09-15 09:04:28 +0200458 "../api/audio_codecs:builtin_audio_decoder_factory",
459 "../api/audio_codecs:builtin_audio_encoder_factory",
Karl Wibergc5bb00b2017-10-10 23:17:17 +0200460 "../api/audio_codecs/L16:audio_decoder_L16",
461 "../api/audio_codecs/L16:audio_encoder_L16",
Steve Anton8d3444d2017-10-20 15:30:51 -0700462 "../call:call_interfaces",
Elad Alon99c3fe52017-10-13 16:29:40 +0200463 "../logging:rtc_event_log_api",
Steve Anton8d3444d2017-10-20 15:30:51 -0700464 "../logging:rtc_event_log_impl",
Patrik Höglund563934e2017-09-15 09:04:28 +0200465 "../media:rtc_audio_video",
466 "../media:rtc_data", # TODO(phoglund): AFAIK only used for one sctp constant.
467 "../media:rtc_media_base",
mbonadei9087d492017-04-25 00:35:35 -0700468 "../media:rtc_media_tests_utils",
Patrik Höglund563934e2017-09-15 09:04:28 +0200469 "../modules/audio_processing:audio_processing",
470 "../modules/utility:utility",
471 "../p2p:p2p_test_utils",
472 "../p2p:rtc_p2p",
ossu7bb87ee2017-01-23 04:56:25 -0800473 "../pc:rtc_pc",
Henrik Boström933d8b02017-10-10 10:05:16 -0700474 "../rtc_base:rtc_base",
Patrik Höglund563934e2017-09-15 09:04:28 +0200475 "../rtc_base:rtc_base_approved",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700476 "../rtc_base:rtc_base_tests_main",
477 "../rtc_base:rtc_base_tests_utils",
ossu7bb87ee2017-01-23 04:56:25 -0800478 "../system_wrappers:metrics_default",
kwiberg2b3aa142017-06-14 03:31:17 -0700479 "../test:audio_codec_mocks",
Patrik Höglund563934e2017-09-15 09:04:28 +0200480 "../test:test_support",
ossu7bb87ee2017-01-23 04:56:25 -0800481 ]
482
483 if (is_android) {
Patrik Höglund563934e2017-09-15 09:04:28 +0200484 deps += [
485 "//testing/android/native_test:native_test_support",
486
487 # We need to depend on this one directly, or classloads will fail for
488 # the voice engine BuildInfo, for instance.
489 "../sdk/android:libjingle_peerconnection_java",
490 ]
ossu7bb87ee2017-01-23 04:56:25 -0800491
492 shard_timeout = 900
493 }
494 }
Patrik Höglund563934e2017-09-15 09:04:28 +0200495
496 if (is_android) {
497 rtc_source_set("android_black_magic") {
498 # The android code uses hacky includes to chromium-base and the ssl code;
499 # having this in a separate target enables us to keep the peerconnection
500 # unit tests clean.
501 check_includes = false
502 testonly = true
503 sources = [
504 "test/androidtestinitializer.cc",
505 "test/androidtestinitializer.h",
506 ]
507 deps = [
508 "../sdk/android:libjingle_peerconnection_jni",
509 "//testing/android/native_test:native_test_support",
510 ]
511 }
512 }
kjellander142f8c52016-06-13 00:08:24 -0700513}