blob: b494b14986968fd79f34168a73c5dcd1fb2c9329 [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") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000029 visibility = [ "*" ]
kjellanderc76dc952016-06-03 03:09:32 -070030 defines = []
31 sources = [
32 "audiomonitor.cc",
33 "audiomonitor.h",
34 "bundlefilter.cc",
35 "bundlefilter.h",
36 "channel.cc",
37 "channel.h",
38 "channelmanager.cc",
39 "channelmanager.h",
40 "currentspeakermonitor.cc",
41 "currentspeakermonitor.h",
Zhi Huangf2d7beb2017-11-20 14:35:11 -080042 "dtlssrtptransport.cc",
43 "dtlssrtptransport.h",
jbauchdfcab722017-03-06 00:14:10 -080044 "externalhmac.cc",
45 "externalhmac.h",
Taylor Brandstetter6e2e7ce2017-12-19 10:26:23 -080046 "jseptransport.cc",
47 "jseptransport.h",
kjellanderc76dc952016-06-03 03:09:32 -070048 "mediamonitor.cc",
49 "mediamonitor.h",
50 "mediasession.cc",
51 "mediasession.h",
kjellanderc76dc952016-06-03 03:09:32 -070052 "rtcpmuxfilter.cc",
53 "rtcpmuxfilter.h",
Steve Anton1d03a752017-11-27 14:30:09 -080054 "rtpmediautils.cc",
55 "rtpmediautils.h",
zsteind48dbda2017-04-04 19:45:57 -070056 "rtptransport.cc",
57 "rtptransport.h",
zstein398c3fd2017-07-19 13:38:02 -070058 "rtptransportinternal.h",
Zhi Huangf2d7beb2017-11-20 14:35:11 -080059 "rtptransportinternaladapter.h",
Steve Anton4ab68ee2017-12-19 14:26:11 -080060 "sessiondescription.cc",
61 "sessiondescription.h",
kjellanderc76dc952016-06-03 03:09:32 -070062 "srtpfilter.cc",
63 "srtpfilter.h",
zstein4dde3df2017-07-07 14:26:25 -070064 "srtpsession.cc",
65 "srtpsession.h",
zstein398c3fd2017-07-19 13:38:02 -070066 "srtptransport.cc",
67 "srtptransport.h",
Zhi Huangb5261582017-09-29 10:51:43 -070068 "transportcontroller.cc",
69 "transportcontroller.h",
kjellanderc76dc952016-06-03 03:09:32 -070070 "voicechannel.h",
71 ]
72
73 deps = [
mbonadei7d9a55b2017-06-01 13:01:48 -070074 "..:webrtc_common",
kjellandera69d9732016-08-31 07:33:05 -070075 "../api:call_api",
mbonadei7d9a55b2017-06-01 13:01:48 -070076 "../api:libjingle_peerconnection_api",
kwiberg84f6a3f2017-09-05 08:43:13 -070077 "../api:optional",
mbonadei7d9a55b2017-06-01 13:01:48 -070078 "../api:ortc_api",
Patrik Höglundbe214a22018-01-04 12:14:35 +010079 "../common_video:common_video",
zhihuang38ede132017-06-15 12:52:32 -070080 "../media:rtc_data",
zhihuang130ca7e2017-06-21 01:02:59 -070081 "../media:rtc_h264_profile_id",
zhihuang38ede132017-06-15 12:52:32 -070082 "../media:rtc_media_base",
mbonadei7d9a55b2017-06-01 13:01:48 -070083 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010084 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -070085 "../rtc_base:rtc_base",
86 "../rtc_base:rtc_task_queue",
Patrik Höglund3e113432017-12-15 14:40:10 +010087 "../rtc_base:stringutils",
kjellanderc76dc952016-06-03 03:09:32 -070088 ]
89
kjellanderc76dc952016-06-03 03:09:32 -070090 if (rtc_build_libsrtp) {
91 deps += [ "//third_party/libsrtp" ]
92 }
93
ehmaldonadoe9cc6862016-09-05 06:10:18 -070094 public_configs = [ ":rtc_pc_config" ]
kjellanderc76dc952016-06-03 03:09:32 -070095
kjellandere40a7ee2016-10-16 23:56:12 -070096 if (!build_with_chromium && is_clang) {
kjellander142f8c52016-06-13 00:08:24 -070097 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070098 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -070099 }
100}
kjellander142f8c52016-06-13 00:08:24 -0700101
zhihuang38ede132017-06-15 12:52:32 -0700102rtc_source_set("rtc_pc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000103 visibility = [ "*" ]
zhihuang38ede132017-06-15 12:52:32 -0700104 deps = [
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100105 ":rtc_pc_base",
zhihuang38ede132017-06-15 12:52:32 -0700106 "../media:rtc_audio_video",
107 ]
108}
109
ossu7bb87ee2017-01-23 04:56:25 -0800110config("libjingle_peerconnection_warnings_config") {
111 # GN orders flags on a target before flags from configs. The default config
112 # adds these flags so to cancel them out they need to come from a config and
113 # cannot be on the target directly.
114 if (!is_win && !is_clang) {
115 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC.
116 }
117}
118
zhihuang38ede132017-06-15 12:52:32 -0700119rtc_static_library("peerconnection") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000120 visibility = [ "*" ]
ossu7bb87ee2017-01-23 04:56:25 -0800121 cflags = []
122 sources = [
123 "audiotrack.cc",
124 "audiotrack.h",
125 "datachannel.cc",
126 "datachannel.h",
127 "dtmfsender.cc",
128 "dtmfsender.h",
deadbeef1dcb1642017-03-29 21:08:16 -0700129 "iceserverparsing.cc",
130 "iceserverparsing.h",
ossu7bb87ee2017-01-23 04:56:25 -0800131 "jsepicecandidate.cc",
132 "jsepsessiondescription.cc",
133 "localaudiosource.cc",
134 "localaudiosource.h",
ossu7bb87ee2017-01-23 04:56:25 -0800135 "mediastream.cc",
136 "mediastream.h",
137 "mediastreamobserver.cc",
138 "mediastreamobserver.h",
139 "mediastreamtrack.h",
ossu7bb87ee2017-01-23 04:56:25 -0800140 "peerconnection.cc",
141 "peerconnection.h",
142 "peerconnectionfactory.cc",
143 "peerconnectionfactory.h",
144 "remoteaudiosource.cc",
145 "remoteaudiosource.h",
146 "rtcstatscollector.cc",
147 "rtcstatscollector.h",
148 "rtpreceiver.cc",
149 "rtpreceiver.h",
150 "rtpsender.cc",
151 "rtpsender.h",
Steve Anton6e634bf2017-11-13 10:44:53 -0800152 "rtptransceiver.cc",
153 "rtptransceiver.h",
ossu7bb87ee2017-01-23 04:56:25 -0800154 "sctputils.cc",
155 "sctputils.h",
Steve Anton97a9f762017-10-06 10:14:03 -0700156 "sdputils.cc",
157 "sdputils.h",
ossu7bb87ee2017-01-23 04:56:25 -0800158 "statscollector.cc",
159 "statscollector.h",
160 "streamcollection.h",
deadbeef804c1af2017-02-11 19:07:31 -0800161 "trackmediainfomap.cc",
162 "trackmediainfomap.h",
ossu7bb87ee2017-01-23 04:56:25 -0800163 "videocapturertracksource.cc",
164 "videocapturertracksource.h",
165 "videotrack.cc",
166 "videotrack.h",
167 "videotracksource.cc",
168 "videotracksource.h",
169 "webrtcsdp.cc",
170 "webrtcsdp.h",
ossu7bb87ee2017-01-23 04:56:25 -0800171 "webrtcsessiondescriptionfactory.cc",
172 "webrtcsessiondescriptionfactory.h",
173 ]
174
175 configs += [ ":libjingle_peerconnection_warnings_config" ]
176
177 if (!build_with_chromium && is_clang) {
178 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
179 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
180 }
181
182 deps = [
zhihuang38ede132017-06-15 12:52:32 -0700183 ":rtc_pc_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700184 "..:webrtc_common",
ossu7bb87ee2017-01-23 04:56:25 -0800185 "../api:call_api",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100186 "../api:libjingle_peerconnection_api",
kwiberg84f6a3f2017-09-05 08:43:13 -0700187 "../api:optional",
Mirko Bonadei34814c72018-01-11 10:13:56 +0100188 "../api:peerconnection_and_implicit_call_api",
ossu7bb87ee2017-01-23 04:56:25 -0800189 "../api:rtc_stats_api",
ilnikd60d06a2017-04-05 03:02:20 -0700190 "../api/video_codecs:video_codecs_api",
zhihuang38ede132017-06-15 12:52:32 -0700191 "../call:call_interfaces",
Patrik Höglundbe214a22018-01-04 12:14:35 +0100192 "../common_video:common_video",
mbonadei7d9a55b2017-06-01 13:01:48 -0700193 "../logging:rtc_event_log_api",
zhihuang38ede132017-06-15 12:52:32 -0700194 "../media:rtc_data",
195 "../media:rtc_media_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700196 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100197 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700198 "../rtc_base:rtc_base",
199 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100200 "../rtc_base:stringutils",
ossu7bb87ee2017-01-23 04:56:25 -0800201 "../stats",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100202 "../system_wrappers",
203 "../system_wrappers:field_trial_api",
ossu7bb87ee2017-01-23 04:56:25 -0800204 ]
zhihuang38ede132017-06-15 12:52:32 -0700205}
206
207# This target implements CreatePeerConnectionFactory methods that will create a
208# PeerConnection will full functionality (audio, video and data). Applications
209# that wish to reduce their binary size by ommitting functionality they don't
210# need should use CreateModularCreatePeerConnectionFactory instead, using the
211# "peerconnection" build target and other targets specific to their
212# requrements. See comment in peerconnectionfactoryinterface.h.
zhihuangab97e182017-06-22 01:28:59 -0700213rtc_static_library("create_pc_factory") {
zhihuang38ede132017-06-15 12:52:32 -0700214 sources = [
215 "createpeerconnectionfactory.cc",
216 ]
217
218 deps = [
219 "../api:audio_mixer_api",
220 "../api:libjingle_peerconnection_api",
Edward Lemur872cf382017-11-20 18:41:50 +0100221 "../api:peerconnection_and_implicit_call_api",
zhihuang38ede132017-06-15 12:52:32 -0700222 "../api/audio_codecs:audio_codecs_api",
Magnus Jedvert58b03162017-09-15 19:02:47 +0200223 "../api/video_codecs:video_codecs_api",
zhihuang38ede132017-06-15 12:52:32 -0700224 "../call",
225 "../call:call_interfaces",
226 "../logging:rtc_event_log_api",
227 "../media:rtc_audio_video",
Edward Lemur872cf382017-11-20 18:41:50 +0100228 "../media:rtc_media_base",
zhihuang38ede132017-06-15 12:52:32 -0700229 "../modules/audio_device:audio_device",
peaha9cc40b2017-06-29 08:32:09 -0700230 "../modules/audio_processing:audio_processing",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700231 "../rtc_base:rtc_base",
232 "../rtc_base:rtc_base_approved",
zhihuang38ede132017-06-15 12:52:32 -0700233 ]
234
235 configs += [ ":libjingle_peerconnection_warnings_config" ]
236
237 if (!build_with_chromium && is_clang) {
238 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
239 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
240 }
241}
242
243rtc_source_set("libjingle_peerconnection") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000244 visibility = [ "*" ]
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100245 deps = [
zhihuang38ede132017-06-15 12:52:32 -0700246 ":create_pc_factory",
247 ":peerconnection",
248 "../api:libjingle_peerconnection_api",
249 ]
ossu7bb87ee2017-01-23 04:56:25 -0800250}
251
kjellander142f8c52016-06-13 00:08:24 -0700252if (rtc_include_tests) {
253 config("rtc_pc_unittests_config") {
254 # GN orders flags on a target before flags from configs. The default config
255 # adds -Wall, and this flag have to be after -Wall -- so they need to
256 # come from a config and can't be on the target directly.
257 if (!is_win && !is_clang) {
258 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC.
259 }
260 }
261
ehmaldonado38a21322016-09-02 04:10:34 -0700262 rtc_test("rtc_pc_unittests") {
kjellander142f8c52016-06-13 00:08:24 -0700263 testonly = true
264
265 sources = [
266 "bundlefilter_unittest.cc",
267 "channel_unittest.cc",
268 "channelmanager_unittest.cc",
269 "currentspeakermonitor_unittest.cc",
Zhi Huangf2d7beb2017-11-20 14:35:11 -0800270 "dtlssrtptransport_unittest.cc",
Taylor Brandstetter6e2e7ce2017-12-19 10:26:23 -0800271 "jseptransport_unittest.cc",
kjellander142f8c52016-06-13 00:08:24 -0700272 "mediasession_unittest.cc",
273 "rtcpmuxfilter_unittest.cc",
zstein56162b92017-04-24 16:54:35 -0700274 "rtptransport_unittest.cc",
zstein398c3fd2017-07-19 13:38:02 -0700275 "rtptransporttestutil.h",
kjellander142f8c52016-06-13 00:08:24 -0700276 "srtpfilter_unittest.cc",
zstein4dde3df2017-07-07 14:26:25 -0700277 "srtpsession_unittest.cc",
278 "srtptestutil.h",
zstein398c3fd2017-07-19 13:38:02 -0700279 "srtptransport_unittest.cc",
Zhi Huangb5261582017-09-29 10:51:43 -0700280 "transportcontroller_unittest.cc",
kjellander142f8c52016-06-13 00:08:24 -0700281 ]
282
283 include_dirs = [ "//third_party/libsrtp/srtp" ]
284
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700285 configs += [ ":rtc_pc_unittests_config" ]
kjellander142f8c52016-06-13 00:08:24 -0700286
kjellandere40a7ee2016-10-16 23:56:12 -0700287 if (!build_with_chromium && is_clang) {
kjellander142f8c52016-06-13 00:08:24 -0700288 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700289 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander142f8c52016-06-13 00:08:24 -0700290 }
291
292 if (is_win) {
293 libs = [ "strmiids.lib" ]
294 }
295
296 deps = [
ossu7bb87ee2017-01-23 04:56:25 -0800297 ":libjingle_peerconnection",
Zhi Huangb5261582017-09-29 10:51:43 -0700298 ":pc_test_utils",
kjellander142f8c52016-06-13 00:08:24 -0700299 ":rtc_pc",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100300 ":rtc_pc_base",
kwiberg529662a2017-09-04 05:43:17 -0700301 "../api:array_view",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100302 "../api:libjingle_peerconnection_api",
mbonadei7d9a55b2017-06-01 13:01:48 -0700303 "../logging:rtc_event_log_api",
304 "../media:rtc_media_base",
mbonadei9087d492017-04-25 00:35:35 -0700305 "../media:rtc_media_tests_utils",
mbonadei7d9a55b2017-06-01 13:01:48 -0700306 "../p2p:p2p_test_utils",
307 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100308 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700309 "../rtc_base:rtc_base",
310 "../rtc_base:rtc_base_approved",
311 "../rtc_base:rtc_base_tests_main",
312 "../rtc_base:rtc_base_tests_utils",
kjellander142f8c52016-06-13 00:08:24 -0700313 "../system_wrappers:metrics_default",
zstein398c3fd2017-07-19 13:38:02 -0700314 "../test:test_support",
kjellander142f8c52016-06-13 00:08:24 -0700315 ]
316
317 if (rtc_build_libsrtp) {
318 deps += [ "//third_party/libsrtp" ]
319 }
320
321 if (is_android) {
322 deps += [ "//testing/android/native_test:native_test_support" ]
323 }
324 }
ossu7bb87ee2017-01-23 04:56:25 -0800325
deadbeefe814a0d2017-02-25 18:15:09 -0800326 rtc_source_set("pc_test_utils") {
327 testonly = true
328 sources = [
329 "test/fakeaudiocapturemodule.cc",
330 "test/fakeaudiocapturemodule.h",
331 "test/fakedatachannelprovider.h",
332 "test/fakeperiodicvideocapturer.h",
333 "test/fakertccertificategenerator.h",
Steve Antonda6c0952017-10-23 11:41:54 -0700334 "test/fakesctptransport.h",
Zhi Huangb5261582017-09-29 10:51:43 -0700335 "test/faketransportcontroller.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800336 "test/fakevideotrackrenderer.h",
337 "test/fakevideotracksource.h",
338 "test/mock_datachannel.h",
339 "test/mock_peerconnection.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800340 "test/mockpeerconnectionobservers.h",
341 "test/peerconnectiontestwrapper.cc",
342 "test/peerconnectiontestwrapper.h",
343 "test/rtcstatsobtainer.h",
344 "test/testsdpstrings.h",
345 ]
346
347 deps = [
348 ":libjingle_peerconnection",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100349 ":peerconnection",
Zhi Huangb5261582017-09-29 10:51:43 -0700350 ":rtc_pc_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700351 "..:webrtc_common",
Mirko Bonadei34814c72018-01-11 10:13:56 +0100352 "../api:libjingle_peerconnection_api",
mbonadei7d9a55b2017-06-01 13:01:48 -0700353 "../api:libjingle_peerconnection_test_api",
Edward Lemur872cf382017-11-20 18:41:50 +0100354 "../api:peerconnection_and_implicit_call_api",
mbonadei7d9a55b2017-06-01 13:01:48 -0700355 "../api:rtc_stats_api",
zhihuang38ede132017-06-15 12:52:32 -0700356 "../call:call_interfaces",
357 "../logging:rtc_event_log_api",
mbonadei7d9a55b2017-06-01 13:01:48 -0700358 "../media:rtc_media",
Edward Lemur872cf382017-11-20 18:41:50 +0100359 "../media:rtc_media_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700360 "../media:rtc_media_tests_utils",
361 "../modules/audio_device:audio_device",
362 "../p2p:p2p_test_utils",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100363 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700364 "../rtc_base:rtc_base",
365 "../rtc_base:rtc_base_approved",
366 "../rtc_base:rtc_base_tests_utils",
mbonadei7d9a55b2017-06-01 13:01:48 -0700367 "../test:test_support",
deadbeefe814a0d2017-02-25 18:15:09 -0800368 "//testing/gmock",
369 ]
370
371 if (!build_with_chromium && is_clang) {
372 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
373 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
374 }
375 }
376
ossu7bb87ee2017-01-23 04:56:25 -0800377 config("peerconnection_unittests_config") {
378 # The warnings below are enabled by default. Since GN orders compiler flags
379 # for a target before flags from configs, the only way to disable such
380 # warnings is by having them in a separate config, loaded from the target.
381 # TODO(kjellander): Make the code compile without disabling these flags.
382 # See https://bugs.webrtc.org/3307.
383 if (is_clang && is_win) {
384 cflags = [
385 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6267
386 # for -Wno-sign-compare
387 "-Wno-sign-compare",
ossu7bb87ee2017-01-23 04:56:25 -0800388 ]
389 }
390
391 if (!is_win) {
392 cflags = [ "-Wno-sign-compare" ]
393 }
394 }
395
396 rtc_test("peerconnection_unittests") {
ossu7bb87ee2017-01-23 04:56:25 -0800397 testonly = true
398 sources = [
399 "datachannel_unittest.cc",
400 "dtmfsender_unittest.cc",
deadbeef1dcb1642017-03-29 21:08:16 -0700401 "iceserverparsing_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800402 "jsepsessiondescription_unittest.cc",
403 "localaudiosource_unittest.cc",
404 "mediaconstraintsinterface_unittest.cc",
405 "mediastream_unittest.cc",
Steve Anton6f25b092017-10-23 09:39:20 -0700406 "peerconnection_bundle_unittest.cc",
Steve Anton6b63cd52017-10-06 11:20:31 -0700407 "peerconnection_crypto_unittest.cc",
Steve Antonda6c0952017-10-23 11:41:54 -0700408 "peerconnection_datachannel_unittest.cc",
Steve Antonf1c6db12017-10-13 11:13:35 -0700409 "peerconnection_ice_unittest.cc",
deadbeef1dcb1642017-03-29 21:08:16 -0700410 "peerconnection_integrationtest.cc",
Steve Antondcc3c022017-12-22 16:02:54 -0800411 "peerconnection_jsep_unittest.cc",
Steve Anton8d3444d2017-10-20 15:30:51 -0700412 "peerconnection_media_unittest.cc",
Henrik Boström933d8b02017-10-10 10:05:16 -0700413 "peerconnection_rtp_unittest.cc",
Steve Anton8d3444d2017-10-20 15:30:51 -0700414 "peerconnection_signaling_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800415 "peerconnectionendtoend_unittest.cc",
416 "peerconnectionfactory_unittest.cc",
417 "peerconnectioninterface_unittest.cc",
Steve Anton94286cb2017-09-26 16:20:19 -0700418 "peerconnectionwrapper.cc",
419 "peerconnectionwrapper.h",
ossu7bb87ee2017-01-23 04:56:25 -0800420 "proxy_unittest.cc",
421 "rtcstats_integrationtest.cc",
422 "rtcstatscollector_unittest.cc",
Steve Anton1d03a752017-11-27 14:30:09 -0800423 "rtpmediautils_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800424 "rtpsenderreceiver_unittest.cc",
425 "sctputils_unittest.cc",
426 "statscollector_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800427 "test/fakeaudiocapturemodule_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800428 "test/testsdpstrings.h",
deadbeef804c1af2017-02-11 19:07:31 -0800429 "trackmediainfomap_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800430 "videocapturertracksource_unittest.cc",
431 "videotrack_unittest.cc",
432 "webrtcsdp_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800433 ]
434
435 if (rtc_enable_sctp) {
436 defines = [ "HAVE_SCTP" ]
437 }
438
439 configs += [ ":peerconnection_unittests_config" ]
440
441 if (!build_with_chromium && is_clang) {
442 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
443 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
444 }
445
446 # TODO(jschuh): Bug 1348: fix this warning.
447 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
448
449 if (is_win) {
450 cflags = [
451 "/wd4245", # conversion from int to size_t, signed/unsigned mismatch.
452 "/wd4389", # signed/unsigned mismatch.
453 ]
454 }
455
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100456 deps = [
457 ":peerconnection",
458 ":rtc_pc_base",
Mirko Bonadei34814c72018-01-11 10:13:56 +0100459 "../api:libjingle_peerconnection_api",
Patrik Höglund4b9e6ba2017-12-19 10:32:11 +0100460 "../api:mock_rtp",
Mirko Bonadei34814c72018-01-11 10:13:56 +0100461 "../api:peerconnection_and_implicit_call_api",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100462 "../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100463 "../rtc_base:stringutils",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100464 ]
ossu7bb87ee2017-01-23 04:56:25 -0800465 if (is_android) {
Patrik Höglund563934e2017-09-15 09:04:28 +0200466 deps += [ ":android_black_magic" ]
ossu7bb87ee2017-01-23 04:56:25 -0800467 }
468
469 deps += [
470 ":libjingle_peerconnection",
deadbeefe814a0d2017-02-25 18:15:09 -0800471 ":pc_test_utils",
ossu7bb87ee2017-01-23 04:56:25 -0800472 "..:webrtc_common",
473 "../api:fakemetricsobserver",
Patrik Höglund563934e2017-09-15 09:04:28 +0200474 "../api:libjingle_peerconnection_test_api",
Henrik Boström31638672017-11-23 17:48:32 +0100475 "../api:optional",
Patrik Höglund563934e2017-09-15 09:04:28 +0200476 "../api:rtc_stats_api",
Karl Wibergc5bb00b2017-10-10 23:17:17 +0200477 "../api/audio_codecs:audio_codecs_api",
Patrik Höglund563934e2017-09-15 09:04:28 +0200478 "../api/audio_codecs:builtin_audio_decoder_factory",
479 "../api/audio_codecs:builtin_audio_encoder_factory",
Karl Wibergc5bb00b2017-10-10 23:17:17 +0200480 "../api/audio_codecs/L16:audio_decoder_L16",
481 "../api/audio_codecs/L16:audio_encoder_L16",
Steve Anton8d3444d2017-10-20 15:30:51 -0700482 "../call:call_interfaces",
Elad Alon99c3fe52017-10-13 16:29:40 +0200483 "../logging:rtc_event_log_api",
Steve Anton8d3444d2017-10-20 15:30:51 -0700484 "../logging:rtc_event_log_impl",
Patrik Höglund563934e2017-09-15 09:04:28 +0200485 "../media:rtc_audio_video",
486 "../media:rtc_data", # TODO(phoglund): AFAIK only used for one sctp constant.
487 "../media:rtc_media_base",
mbonadei9087d492017-04-25 00:35:35 -0700488 "../media:rtc_media_tests_utils",
Patrik Höglund563934e2017-09-15 09:04:28 +0200489 "../modules/audio_processing:audio_processing",
490 "../modules/utility:utility",
491 "../p2p:p2p_test_utils",
492 "../p2p:rtc_p2p",
ossu7bb87ee2017-01-23 04:56:25 -0800493 "../pc:rtc_pc",
Henrik Boström933d8b02017-10-10 10:05:16 -0700494 "../rtc_base:rtc_base",
Patrik Höglund563934e2017-09-15 09:04:28 +0200495 "../rtc_base:rtc_base_approved",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700496 "../rtc_base:rtc_base_tests_main",
497 "../rtc_base:rtc_base_tests_utils",
ossu7bb87ee2017-01-23 04:56:25 -0800498 "../system_wrappers:metrics_default",
kwiberg2b3aa142017-06-14 03:31:17 -0700499 "../test:audio_codec_mocks",
Patrik Höglund563934e2017-09-15 09:04:28 +0200500 "../test:test_support",
ossu7bb87ee2017-01-23 04:56:25 -0800501 ]
502
503 if (is_android) {
Patrik Höglund563934e2017-09-15 09:04:28 +0200504 deps += [
505 "//testing/android/native_test:native_test_support",
506
507 # We need to depend on this one directly, or classloads will fail for
508 # the voice engine BuildInfo, for instance.
509 "../sdk/android:libjingle_peerconnection_java",
510 ]
ossu7bb87ee2017-01-23 04:56:25 -0800511
512 shard_timeout = 900
513 }
514 }
Patrik Höglund563934e2017-09-15 09:04:28 +0200515
516 if (is_android) {
517 rtc_source_set("android_black_magic") {
518 # The android code uses hacky includes to chromium-base and the ssl code;
519 # having this in a separate target enables us to keep the peerconnection
520 # unit tests clean.
521 check_includes = false
522 testonly = true
523 sources = [
524 "test/androidtestinitializer.cc",
525 "test/androidtestinitializer.h",
526 ]
527 deps = [
528 "../sdk/android:libjingle_peerconnection_jni",
529 "//testing/android/native_test:native_test_support",
530 ]
531 }
532 }
kjellander142f8c52016-06-13 00:08:24 -0700533}