blob: cd1a489d7879c7a670e0805fc70f9776e244c296 [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",
Taylor Brandstetter6e2e7ce2017-12-19 10:26:23 -080045 "jseptransport.cc",
46 "jseptransport.h",
kjellanderc76dc952016-06-03 03:09:32 -070047 "mediamonitor.cc",
48 "mediamonitor.h",
49 "mediasession.cc",
50 "mediasession.h",
kjellanderc76dc952016-06-03 03:09:32 -070051 "rtcpmuxfilter.cc",
52 "rtcpmuxfilter.h",
Steve Anton1d03a752017-11-27 14:30:09 -080053 "rtpmediautils.cc",
54 "rtpmediautils.h",
zsteind48dbda2017-04-04 19:45:57 -070055 "rtptransport.cc",
56 "rtptransport.h",
zstein398c3fd2017-07-19 13:38:02 -070057 "rtptransportinternal.h",
Zhi Huangf2d7beb2017-11-20 14:35:11 -080058 "rtptransportinternaladapter.h",
Steve Anton4ab68ee2017-12-19 14:26:11 -080059 "sessiondescription.cc",
60 "sessiondescription.h",
kjellanderc76dc952016-06-03 03:09:32 -070061 "srtpfilter.cc",
62 "srtpfilter.h",
zstein4dde3df2017-07-07 14:26:25 -070063 "srtpsession.cc",
64 "srtpsession.h",
zstein398c3fd2017-07-19 13:38:02 -070065 "srtptransport.cc",
66 "srtptransport.h",
Zhi Huangb5261582017-09-29 10:51:43 -070067 "transportcontroller.cc",
68 "transportcontroller.h",
kjellanderc76dc952016-06-03 03:09:32 -070069 "voicechannel.h",
70 ]
71
72 deps = [
mbonadei7d9a55b2017-06-01 13:01:48 -070073 "..:webrtc_common",
kjellandera69d9732016-08-31 07:33:05 -070074 "../api:call_api",
mbonadei7d9a55b2017-06-01 13:01:48 -070075 "../api:libjingle_peerconnection_api",
kwiberg84f6a3f2017-09-05 08:43:13 -070076 "../api:optional",
mbonadei7d9a55b2017-06-01 13:01:48 -070077 "../api:ortc_api",
Patrik Höglundbe214a22018-01-04 12:14:35 +010078 "../common_video:common_video",
zhihuang38ede132017-06-15 12:52:32 -070079 "../media:rtc_data",
zhihuang130ca7e2017-06-21 01:02:59 -070080 "../media:rtc_h264_profile_id",
zhihuang38ede132017-06-15 12:52:32 -070081 "../media:rtc_media_base",
mbonadei7d9a55b2017-06-01 13:01:48 -070082 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010083 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -070084 "../rtc_base:rtc_base",
85 "../rtc_base:rtc_task_queue",
Patrik Höglund3e113432017-12-15 14:40:10 +010086 "../rtc_base:stringutils",
kjellanderc76dc952016-06-03 03:09:32 -070087 ]
88
kjellanderc76dc952016-06-03 03:09:32 -070089 if (rtc_build_libsrtp) {
90 deps += [ "//third_party/libsrtp" ]
91 }
92
ehmaldonadoe9cc6862016-09-05 06:10:18 -070093 public_configs = [ ":rtc_pc_config" ]
kjellanderc76dc952016-06-03 03:09:32 -070094
kjellandere40a7ee2016-10-16 23:56:12 -070095 if (!build_with_chromium && is_clang) {
kjellander142f8c52016-06-13 00:08:24 -070096 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070097 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -070098 }
99}
kjellander142f8c52016-06-13 00:08:24 -0700100
zhihuang38ede132017-06-15 12:52:32 -0700101rtc_source_set("rtc_pc") {
zhihuang38ede132017-06-15 12:52:32 -0700102 deps = [
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100103 ":rtc_pc_base",
zhihuang38ede132017-06-15 12:52:32 -0700104 "../media:rtc_audio_video",
105 ]
106}
107
ossu7bb87ee2017-01-23 04:56:25 -0800108config("libjingle_peerconnection_warnings_config") {
109 # GN orders flags on a target before flags from configs. The default config
110 # adds these flags so to cancel them out they need to come from a config and
111 # cannot be on the target directly.
112 if (!is_win && !is_clang) {
113 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC.
114 }
115}
116
zhihuang38ede132017-06-15 12:52:32 -0700117rtc_static_library("peerconnection") {
ossu7bb87ee2017-01-23 04:56:25 -0800118 cflags = []
119 sources = [
120 "audiotrack.cc",
121 "audiotrack.h",
122 "datachannel.cc",
123 "datachannel.h",
124 "dtmfsender.cc",
125 "dtmfsender.h",
deadbeef1dcb1642017-03-29 21:08:16 -0700126 "iceserverparsing.cc",
127 "iceserverparsing.h",
ossu7bb87ee2017-01-23 04:56:25 -0800128 "jsepicecandidate.cc",
129 "jsepsessiondescription.cc",
130 "localaudiosource.cc",
131 "localaudiosource.h",
ossu7bb87ee2017-01-23 04:56:25 -0800132 "mediastream.cc",
133 "mediastream.h",
134 "mediastreamobserver.cc",
135 "mediastreamobserver.h",
136 "mediastreamtrack.h",
ossu7bb87ee2017-01-23 04:56:25 -0800137 "peerconnection.cc",
138 "peerconnection.h",
139 "peerconnectionfactory.cc",
140 "peerconnectionfactory.h",
141 "remoteaudiosource.cc",
142 "remoteaudiosource.h",
143 "rtcstatscollector.cc",
144 "rtcstatscollector.h",
145 "rtpreceiver.cc",
146 "rtpreceiver.h",
147 "rtpsender.cc",
148 "rtpsender.h",
Steve Anton6e634bf2017-11-13 10:44:53 -0800149 "rtptransceiver.cc",
150 "rtptransceiver.h",
ossu7bb87ee2017-01-23 04:56:25 -0800151 "sctputils.cc",
152 "sctputils.h",
Steve Anton97a9f762017-10-06 10:14:03 -0700153 "sdputils.cc",
154 "sdputils.h",
ossu7bb87ee2017-01-23 04:56:25 -0800155 "statscollector.cc",
156 "statscollector.h",
157 "streamcollection.h",
deadbeef804c1af2017-02-11 19:07:31 -0800158 "trackmediainfomap.cc",
159 "trackmediainfomap.h",
ossu7bb87ee2017-01-23 04:56:25 -0800160 "videocapturertracksource.cc",
161 "videocapturertracksource.h",
162 "videotrack.cc",
163 "videotrack.h",
164 "videotracksource.cc",
165 "videotracksource.h",
166 "webrtcsdp.cc",
167 "webrtcsdp.h",
ossu7bb87ee2017-01-23 04:56:25 -0800168 "webrtcsessiondescriptionfactory.cc",
169 "webrtcsessiondescriptionfactory.h",
170 ]
171
172 configs += [ ":libjingle_peerconnection_warnings_config" ]
173
174 if (!build_with_chromium && is_clang) {
175 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
176 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
177 }
178
179 deps = [
zhihuang38ede132017-06-15 12:52:32 -0700180 ":rtc_pc_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700181 "..:webrtc_common",
ossu7bb87ee2017-01-23 04:56:25 -0800182 "../api:call_api",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100183 "../api:libjingle_peerconnection_api",
kwiberg84f6a3f2017-09-05 08:43:13 -0700184 "../api:optional",
ossu7bb87ee2017-01-23 04:56:25 -0800185 "../api:rtc_stats_api",
ilnikd60d06a2017-04-05 03:02:20 -0700186 "../api/video_codecs:video_codecs_api",
zhihuang38ede132017-06-15 12:52:32 -0700187 "../call:call_interfaces",
Patrik Höglundbe214a22018-01-04 12:14:35 +0100188 "../common_video:common_video",
mbonadei7d9a55b2017-06-01 13:01:48 -0700189 "../logging:rtc_event_log_api",
zhihuang38ede132017-06-15 12:52:32 -0700190 "../media:rtc_data",
191 "../media:rtc_media_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700192 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100193 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700194 "../rtc_base:rtc_base",
195 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100196 "../rtc_base:stringutils",
ossu7bb87ee2017-01-23 04:56:25 -0800197 "../stats",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100198 "../system_wrappers",
199 "../system_wrappers:field_trial_api",
ossu7bb87ee2017-01-23 04:56:25 -0800200 ]
zhihuang38ede132017-06-15 12:52:32 -0700201}
202
203# This target implements CreatePeerConnectionFactory methods that will create a
204# PeerConnection will full functionality (audio, video and data). Applications
205# that wish to reduce their binary size by ommitting functionality they don't
206# need should use CreateModularCreatePeerConnectionFactory instead, using the
207# "peerconnection" build target and other targets specific to their
208# requrements. See comment in peerconnectionfactoryinterface.h.
zhihuangab97e182017-06-22 01:28:59 -0700209rtc_static_library("create_pc_factory") {
zhihuang38ede132017-06-15 12:52:32 -0700210 sources = [
211 "createpeerconnectionfactory.cc",
212 ]
213
214 deps = [
215 "../api:audio_mixer_api",
216 "../api:libjingle_peerconnection_api",
Edward Lemur872cf382017-11-20 18:41:50 +0100217 "../api:peerconnection_and_implicit_call_api",
zhihuang38ede132017-06-15 12:52:32 -0700218 "../api/audio_codecs:audio_codecs_api",
Magnus Jedvert58b03162017-09-15 19:02:47 +0200219 "../api/video_codecs:video_codecs_api",
zhihuang38ede132017-06-15 12:52:32 -0700220 "../call",
221 "../call:call_interfaces",
222 "../logging:rtc_event_log_api",
223 "../media:rtc_audio_video",
Edward Lemur872cf382017-11-20 18:41:50 +0100224 "../media:rtc_media_base",
zhihuang38ede132017-06-15 12:52:32 -0700225 "../modules/audio_device:audio_device",
peaha9cc40b2017-06-29 08:32:09 -0700226 "../modules/audio_processing:audio_processing",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700227 "../rtc_base:rtc_base",
228 "../rtc_base:rtc_base_approved",
zhihuang38ede132017-06-15 12:52:32 -0700229 ]
230
231 configs += [ ":libjingle_peerconnection_warnings_config" ]
232
233 if (!build_with_chromium && is_clang) {
234 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
235 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
236 }
237}
238
239rtc_source_set("libjingle_peerconnection") {
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100240 deps = [
zhihuang38ede132017-06-15 12:52:32 -0700241 ":create_pc_factory",
242 ":peerconnection",
243 "../api:libjingle_peerconnection_api",
244 ]
ossu7bb87ee2017-01-23 04:56:25 -0800245}
246
kjellander142f8c52016-06-13 00:08:24 -0700247if (rtc_include_tests) {
248 config("rtc_pc_unittests_config") {
249 # GN orders flags on a target before flags from configs. The default config
250 # adds -Wall, and this flag have to be after -Wall -- so they need to
251 # come from a config and can't be on the target directly.
252 if (!is_win && !is_clang) {
253 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC.
254 }
255 }
256
ehmaldonado38a21322016-09-02 04:10:34 -0700257 rtc_test("rtc_pc_unittests") {
kjellander142f8c52016-06-13 00:08:24 -0700258 testonly = true
259
260 sources = [
261 "bundlefilter_unittest.cc",
262 "channel_unittest.cc",
263 "channelmanager_unittest.cc",
264 "currentspeakermonitor_unittest.cc",
Zhi Huangf2d7beb2017-11-20 14:35:11 -0800265 "dtlssrtptransport_unittest.cc",
Taylor Brandstetter6e2e7ce2017-12-19 10:26:23 -0800266 "jseptransport_unittest.cc",
kjellander142f8c52016-06-13 00:08:24 -0700267 "mediasession_unittest.cc",
268 "rtcpmuxfilter_unittest.cc",
zstein56162b92017-04-24 16:54:35 -0700269 "rtptransport_unittest.cc",
zstein398c3fd2017-07-19 13:38:02 -0700270 "rtptransporttestutil.h",
kjellander142f8c52016-06-13 00:08:24 -0700271 "srtpfilter_unittest.cc",
zstein4dde3df2017-07-07 14:26:25 -0700272 "srtpsession_unittest.cc",
273 "srtptestutil.h",
zstein398c3fd2017-07-19 13:38:02 -0700274 "srtptransport_unittest.cc",
Zhi Huangb5261582017-09-29 10:51:43 -0700275 "transportcontroller_unittest.cc",
kjellander142f8c52016-06-13 00:08:24 -0700276 ]
277
278 include_dirs = [ "//third_party/libsrtp/srtp" ]
279
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700280 configs += [ ":rtc_pc_unittests_config" ]
kjellander142f8c52016-06-13 00:08:24 -0700281
kjellandere40a7ee2016-10-16 23:56:12 -0700282 if (!build_with_chromium && is_clang) {
kjellander142f8c52016-06-13 00:08:24 -0700283 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700284 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander142f8c52016-06-13 00:08:24 -0700285 }
286
287 if (is_win) {
288 libs = [ "strmiids.lib" ]
289 }
290
291 deps = [
ossu7bb87ee2017-01-23 04:56:25 -0800292 ":libjingle_peerconnection",
Zhi Huangb5261582017-09-29 10:51:43 -0700293 ":pc_test_utils",
kjellander142f8c52016-06-13 00:08:24 -0700294 ":rtc_pc",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100295 ":rtc_pc_base",
kwiberg529662a2017-09-04 05:43:17 -0700296 "../api:array_view",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100297 "../api:libjingle_peerconnection_api",
mbonadei7d9a55b2017-06-01 13:01:48 -0700298 "../logging:rtc_event_log_api",
299 "../media:rtc_media_base",
mbonadei9087d492017-04-25 00:35:35 -0700300 "../media:rtc_media_tests_utils",
mbonadei7d9a55b2017-06-01 13:01:48 -0700301 "../p2p:p2p_test_utils",
302 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100303 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700304 "../rtc_base:rtc_base",
305 "../rtc_base:rtc_base_approved",
306 "../rtc_base:rtc_base_tests_main",
307 "../rtc_base:rtc_base_tests_utils",
kjellander142f8c52016-06-13 00:08:24 -0700308 "../system_wrappers:metrics_default",
zstein398c3fd2017-07-19 13:38:02 -0700309 "../test:test_support",
kjellander142f8c52016-06-13 00:08:24 -0700310 ]
311
312 if (rtc_build_libsrtp) {
313 deps += [ "//third_party/libsrtp" ]
314 }
315
316 if (is_android) {
317 deps += [ "//testing/android/native_test:native_test_support" ]
318 }
319 }
ossu7bb87ee2017-01-23 04:56:25 -0800320
deadbeefe814a0d2017-02-25 18:15:09 -0800321 rtc_source_set("pc_test_utils") {
322 testonly = true
323 sources = [
324 "test/fakeaudiocapturemodule.cc",
325 "test/fakeaudiocapturemodule.h",
326 "test/fakedatachannelprovider.h",
327 "test/fakeperiodicvideocapturer.h",
328 "test/fakertccertificategenerator.h",
Steve Antonda6c0952017-10-23 11:41:54 -0700329 "test/fakesctptransport.h",
Zhi Huangb5261582017-09-29 10:51:43 -0700330 "test/faketransportcontroller.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800331 "test/fakevideotrackrenderer.h",
332 "test/fakevideotracksource.h",
333 "test/mock_datachannel.h",
334 "test/mock_peerconnection.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800335 "test/mockpeerconnectionobservers.h",
336 "test/peerconnectiontestwrapper.cc",
337 "test/peerconnectiontestwrapper.h",
338 "test/rtcstatsobtainer.h",
339 "test/testsdpstrings.h",
340 ]
341
342 deps = [
343 ":libjingle_peerconnection",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100344 ":peerconnection",
Zhi Huangb5261582017-09-29 10:51:43 -0700345 ":rtc_pc_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700346 "..:webrtc_common",
347 "../api:libjingle_peerconnection_test_api",
Edward Lemur872cf382017-11-20 18:41:50 +0100348 "../api:peerconnection_and_implicit_call_api",
mbonadei7d9a55b2017-06-01 13:01:48 -0700349 "../api:rtc_stats_api",
zhihuang38ede132017-06-15 12:52:32 -0700350 "../call:call_interfaces",
351 "../logging:rtc_event_log_api",
mbonadei7d9a55b2017-06-01 13:01:48 -0700352 "../media:rtc_media",
Edward Lemur872cf382017-11-20 18:41:50 +0100353 "../media:rtc_media_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700354 "../media:rtc_media_tests_utils",
355 "../modules/audio_device:audio_device",
356 "../p2p:p2p_test_utils",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100357 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700358 "../rtc_base:rtc_base",
359 "../rtc_base:rtc_base_approved",
360 "../rtc_base:rtc_base_tests_utils",
mbonadei7d9a55b2017-06-01 13:01:48 -0700361 "../test:test_support",
deadbeefe814a0d2017-02-25 18:15:09 -0800362 "//testing/gmock",
363 ]
364
365 if (!build_with_chromium && is_clang) {
366 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
367 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
368 }
369 }
370
ossu7bb87ee2017-01-23 04:56:25 -0800371 config("peerconnection_unittests_config") {
372 # The warnings below are enabled by default. Since GN orders compiler flags
373 # for a target before flags from configs, the only way to disable such
374 # warnings is by having them in a separate config, loaded from the target.
375 # TODO(kjellander): Make the code compile without disabling these flags.
376 # See https://bugs.webrtc.org/3307.
377 if (is_clang && is_win) {
378 cflags = [
379 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6267
380 # for -Wno-sign-compare
381 "-Wno-sign-compare",
ossu7bb87ee2017-01-23 04:56:25 -0800382 ]
383 }
384
385 if (!is_win) {
386 cflags = [ "-Wno-sign-compare" ]
387 }
388 }
389
390 rtc_test("peerconnection_unittests") {
ossu7bb87ee2017-01-23 04:56:25 -0800391 testonly = true
392 sources = [
393 "datachannel_unittest.cc",
394 "dtmfsender_unittest.cc",
deadbeef1dcb1642017-03-29 21:08:16 -0700395 "iceserverparsing_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800396 "jsepsessiondescription_unittest.cc",
397 "localaudiosource_unittest.cc",
398 "mediaconstraintsinterface_unittest.cc",
399 "mediastream_unittest.cc",
Steve Anton6f25b092017-10-23 09:39:20 -0700400 "peerconnection_bundle_unittest.cc",
Steve Anton6b63cd52017-10-06 11:20:31 -0700401 "peerconnection_crypto_unittest.cc",
Steve Antonda6c0952017-10-23 11:41:54 -0700402 "peerconnection_datachannel_unittest.cc",
Steve Antonf1c6db12017-10-13 11:13:35 -0700403 "peerconnection_ice_unittest.cc",
deadbeef1dcb1642017-03-29 21:08:16 -0700404 "peerconnection_integrationtest.cc",
Steve Antondcc3c022017-12-22 16:02:54 -0800405 "peerconnection_jsep_unittest.cc",
Steve Anton8d3444d2017-10-20 15:30:51 -0700406 "peerconnection_media_unittest.cc",
Henrik Boström933d8b02017-10-10 10:05:16 -0700407 "peerconnection_rtp_unittest.cc",
Steve Anton8d3444d2017-10-20 15:30:51 -0700408 "peerconnection_signaling_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800409 "peerconnectionendtoend_unittest.cc",
410 "peerconnectionfactory_unittest.cc",
411 "peerconnectioninterface_unittest.cc",
Steve Anton94286cb2017-09-26 16:20:19 -0700412 "peerconnectionwrapper.cc",
413 "peerconnectionwrapper.h",
ossu7bb87ee2017-01-23 04:56:25 -0800414 "proxy_unittest.cc",
415 "rtcstats_integrationtest.cc",
416 "rtcstatscollector_unittest.cc",
Steve Anton1d03a752017-11-27 14:30:09 -0800417 "rtpmediautils_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800418 "rtpsenderreceiver_unittest.cc",
419 "sctputils_unittest.cc",
420 "statscollector_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800421 "test/fakeaudiocapturemodule_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800422 "test/testsdpstrings.h",
deadbeef804c1af2017-02-11 19:07:31 -0800423 "trackmediainfomap_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800424 "videocapturertracksource_unittest.cc",
425 "videotrack_unittest.cc",
426 "webrtcsdp_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800427 ]
428
429 if (rtc_enable_sctp) {
430 defines = [ "HAVE_SCTP" ]
431 }
432
433 configs += [ ":peerconnection_unittests_config" ]
434
435 if (!build_with_chromium && is_clang) {
436 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
437 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
438 }
439
440 # TODO(jschuh): Bug 1348: fix this warning.
441 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
442
443 if (is_win) {
444 cflags = [
445 "/wd4245", # conversion from int to size_t, signed/unsigned mismatch.
446 "/wd4389", # signed/unsigned mismatch.
447 ]
448 }
449
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100450 deps = [
451 ":peerconnection",
452 ":rtc_pc_base",
Patrik Höglund4b9e6ba2017-12-19 10:32:11 +0100453 "../api:mock_rtp",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100454 "../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100455 "../rtc_base:stringutils",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100456 ]
ossu7bb87ee2017-01-23 04:56:25 -0800457 if (is_android) {
Patrik Höglund563934e2017-09-15 09:04:28 +0200458 deps += [ ":android_black_magic" ]
ossu7bb87ee2017-01-23 04:56:25 -0800459 }
460
461 deps += [
462 ":libjingle_peerconnection",
deadbeefe814a0d2017-02-25 18:15:09 -0800463 ":pc_test_utils",
ossu7bb87ee2017-01-23 04:56:25 -0800464 "..:webrtc_common",
465 "../api:fakemetricsobserver",
Patrik Höglund563934e2017-09-15 09:04:28 +0200466 "../api:libjingle_peerconnection_test_api",
Henrik Boström31638672017-11-23 17:48:32 +0100467 "../api:optional",
Patrik Höglund563934e2017-09-15 09:04:28 +0200468 "../api:rtc_stats_api",
Karl Wibergc5bb00b2017-10-10 23:17:17 +0200469 "../api/audio_codecs:audio_codecs_api",
Patrik Höglund563934e2017-09-15 09:04:28 +0200470 "../api/audio_codecs:builtin_audio_decoder_factory",
471 "../api/audio_codecs:builtin_audio_encoder_factory",
Karl Wibergc5bb00b2017-10-10 23:17:17 +0200472 "../api/audio_codecs/L16:audio_decoder_L16",
473 "../api/audio_codecs/L16:audio_encoder_L16",
Steve Anton8d3444d2017-10-20 15:30:51 -0700474 "../call:call_interfaces",
Elad Alon99c3fe52017-10-13 16:29:40 +0200475 "../logging:rtc_event_log_api",
Steve Anton8d3444d2017-10-20 15:30:51 -0700476 "../logging:rtc_event_log_impl",
Patrik Höglund563934e2017-09-15 09:04:28 +0200477 "../media:rtc_audio_video",
478 "../media:rtc_data", # TODO(phoglund): AFAIK only used for one sctp constant.
479 "../media:rtc_media_base",
mbonadei9087d492017-04-25 00:35:35 -0700480 "../media:rtc_media_tests_utils",
Patrik Höglund563934e2017-09-15 09:04:28 +0200481 "../modules/audio_processing:audio_processing",
482 "../modules/utility:utility",
483 "../p2p:p2p_test_utils",
484 "../p2p:rtc_p2p",
ossu7bb87ee2017-01-23 04:56:25 -0800485 "../pc:rtc_pc",
Henrik Boström933d8b02017-10-10 10:05:16 -0700486 "../rtc_base:rtc_base",
Patrik Höglund563934e2017-09-15 09:04:28 +0200487 "../rtc_base:rtc_base_approved",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700488 "../rtc_base:rtc_base_tests_main",
489 "../rtc_base:rtc_base_tests_utils",
ossu7bb87ee2017-01-23 04:56:25 -0800490 "../system_wrappers:metrics_default",
kwiberg2b3aa142017-06-14 03:31:17 -0700491 "../test:audio_codec_mocks",
Patrik Höglund563934e2017-09-15 09:04:28 +0200492 "../test:test_support",
ossu7bb87ee2017-01-23 04:56:25 -0800493 ]
494
495 if (is_android) {
Patrik Höglund563934e2017-09-15 09:04:28 +0200496 deps += [
497 "//testing/android/native_test:native_test_support",
498
499 # We need to depend on this one directly, or classloads will fail for
500 # the voice engine BuildInfo, for instance.
501 "../sdk/android:libjingle_peerconnection_java",
502 ]
ossu7bb87ee2017-01-23 04:56:25 -0800503
504 shard_timeout = 900
505 }
506 }
Patrik Höglund563934e2017-09-15 09:04:28 +0200507
508 if (is_android) {
509 rtc_source_set("android_black_magic") {
510 # The android code uses hacky includes to chromium-base and the ssl code;
511 # having this in a separate target enables us to keep the peerconnection
512 # unit tests clean.
513 check_includes = false
514 testonly = true
515 sources = [
516 "test/androidtestinitializer.cc",
517 "test/androidtestinitializer.h",
518 ]
519 deps = [
520 "../sdk/android:libjingle_peerconnection_jni",
521 "//testing/android/native_test:native_test_support",
522 ]
523 }
524 }
kjellander142f8c52016-06-13 00:08:24 -0700525}