OLD | NEW |
1 # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license | 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 | 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 | 5 # tree. An additional intellectual property rights grant can be found |
6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
8 | 8 |
9 import("../build/webrtc.gni") | 9 import("../build/webrtc.gni") |
10 if (is_android) { | 10 if (is_android) { |
11 import("//build/config/android/config.gni") | 11 import("//build/config/android/config.gni") |
12 import("//build/config/android/rules.gni") | 12 import("//build/config/android/rules.gni") |
13 } | 13 } |
14 | 14 |
15 group("api") { | 15 group("api") { |
16 public_deps = [ | 16 public_deps = [ |
17 ":libjingle_peerconnection", | 17 ":libjingle_peerconnection_api", |
18 ] | 18 ] |
19 } | 19 } |
20 | 20 |
21 rtc_source_set("call_api") { | 21 rtc_source_set("call_api") { |
22 sources = [ | 22 sources = [ |
23 "call/audio_sink.h", | 23 "call/audio_sink.h", |
24 ] | 24 ] |
25 | 25 |
26 deps = [ | 26 deps = [ |
27 # TODO(kjellander): Add remaining dependencies when webrtc:4243 is done. | 27 # TODO(kjellander): Add remaining dependencies when webrtc:4243 is done. |
28 ":audio_mixer_api", | 28 ":audio_mixer_api", |
29 ":transport_api", | 29 ":transport_api", |
30 "..:webrtc_common", | 30 "..:webrtc_common", |
31 "../base:rtc_base_approved", | 31 "../base:rtc_base_approved", |
32 "../modules/audio_coding:audio_decoder_factory_interface", | 32 "../modules/audio_coding:audio_decoder_factory_interface", |
33 "../modules/audio_coding:audio_encoder_interface", | 33 "../modules/audio_coding:audio_encoder_interface", |
34 ] | 34 ] |
35 } | 35 } |
36 | 36 |
37 config("libjingle_peerconnection_warnings_config") { | 37 rtc_static_library("libjingle_peerconnection_api") { |
38 # GN orders flags on a target before flags from configs. The default config | |
39 # adds these flags so to cancel them out they need to come from a config and | |
40 # cannot be on the target directly. | |
41 if (!is_win && !is_clang) { | |
42 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC. | |
43 } | |
44 } | |
45 | |
46 rtc_static_library("libjingle_peerconnection") { | |
47 check_includes = false # TODO(kjellander): Remove (bugs.webrtc.org/6828) | 38 check_includes = false # TODO(kjellander): Remove (bugs.webrtc.org/6828) |
48 cflags = [] | 39 cflags = [] |
49 sources = [ | 40 sources = [ |
50 "audiotrack.cc", | |
51 "audiotrack.h", | |
52 "datachannel.cc", | |
53 "datachannel.h", | 41 "datachannel.h", |
54 "datachannelinterface.h", | 42 "datachannelinterface.h", |
55 "dtmfsender.cc", | |
56 "dtmfsender.h", | |
57 "dtmfsenderinterface.h", | 43 "dtmfsenderinterface.h", |
58 "jsep.h", | 44 "jsep.h", |
59 "jsepicecandidate.cc", | |
60 "jsepicecandidate.h", | 45 "jsepicecandidate.h", |
61 "jsepsessiondescription.cc", | |
62 "jsepsessiondescription.h", | 46 "jsepsessiondescription.h", |
63 "localaudiosource.cc", | |
64 "localaudiosource.h", | |
65 "mediaconstraintsinterface.cc", | 47 "mediaconstraintsinterface.cc", |
66 "mediaconstraintsinterface.h", | 48 "mediaconstraintsinterface.h", |
67 "mediacontroller.cc", | |
68 "mediacontroller.h", | 49 "mediacontroller.h", |
69 "mediastream.cc", | |
70 "mediastream.h", | 50 "mediastream.h", |
| 51 "mediastreaminterface.cc", |
71 "mediastreaminterface.h", | 52 "mediastreaminterface.h", |
72 "mediastreamobserver.cc", | |
73 "mediastreamobserver.h", | |
74 "mediastreamproxy.h", | 53 "mediastreamproxy.h", |
75 "mediastreamtrack.h", | 54 "mediastreamtrack.h", |
76 "mediastreamtrackproxy.h", | 55 "mediastreamtrackproxy.h", |
| 56 "mediatypes.cc", |
| 57 "mediatypes.h", |
77 "notifier.h", | 58 "notifier.h", |
78 "ortcfactory.cc", | |
79 "ortcfactory.h", | |
80 "ortcfactoryinterface.h", | 59 "ortcfactoryinterface.h", |
81 "peerconnection.cc", | |
82 "peerconnection.h", | |
83 "peerconnectionfactory.cc", | |
84 "peerconnectionfactory.h", | |
85 "peerconnectionfactoryproxy.h", | 60 "peerconnectionfactoryproxy.h", |
86 "peerconnectioninterface.h", | 61 "peerconnectioninterface.h", |
87 "peerconnectionproxy.h", | 62 "peerconnectionproxy.h", |
88 "proxy.h", | 63 "proxy.h", |
89 "remoteaudiosource.cc", | |
90 "remoteaudiosource.h", | |
91 "rtcstatscollector.cc", | |
92 "rtcstatscollector.h", | |
93 "rtpparameters.h", | 64 "rtpparameters.h", |
94 "rtpreceiver.cc", | |
95 "rtpreceiver.h", | |
96 "rtpreceiverinterface.h", | 65 "rtpreceiverinterface.h", |
97 "rtpsender.cc", | |
98 "rtpsender.h", | 66 "rtpsender.h", |
99 "rtpsenderinterface.h", | 67 "rtpsenderinterface.h", |
100 "sctputils.cc", | |
101 "sctputils.h", | |
102 "statscollector.cc", | |
103 "statscollector.h", | |
104 "statstypes.cc", | 68 "statstypes.cc", |
105 "statstypes.h", | 69 "statstypes.h", |
106 "streamcollection.h", | 70 "streamcollection.h", |
107 "trackmediainfomap.cc", | 71 "trackmediainfomap.cc", |
108 "trackmediainfomap.h", | 72 "trackmediainfomap.h", |
109 "udptransportinterface.h", | 73 "udptransportinterface.h", |
110 "videocapturertracksource.cc", | 74 "umametrics.h", |
111 "videocapturertracksource.h", | |
112 "videosourceproxy.h", | 75 "videosourceproxy.h", |
113 "videotrack.cc", | |
114 "videotrack.h", | |
115 "videotracksource.cc", | |
116 "videotracksource.h", | 76 "videotracksource.h", |
117 "webrtcsdp.cc", | |
118 "webrtcsdp.h", | |
119 "webrtcsession.cc", | |
120 "webrtcsession.h", | |
121 "webrtcsessiondescriptionfactory.cc", | |
122 "webrtcsessiondescriptionfactory.h", | |
123 ] | 77 ] |
124 | 78 |
125 configs += [ ":libjingle_peerconnection_warnings_config" ] | |
126 | |
127 if (!build_with_chromium && is_clang) { | 79 if (!build_with_chromium && is_clang) { |
128 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 80 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
129 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 81 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
130 } | 82 } |
131 | 83 |
132 deps = [ | 84 deps = [ |
133 ":call_api", | |
134 ":rtc_stats_api", | 85 ":rtc_stats_api", |
135 "../call", | |
136 "../media", | |
137 "../pc", | |
138 "../stats", | |
139 ] | 86 ] |
| 87 } |
140 | 88 |
141 if (rtc_use_quic) { | 89 # TODO(ossu): Remove once downstream projects have updated. |
142 sources += [ | 90 rtc_source_set("libjingle_peerconnection") { |
143 "quicdatachannel.cc", | 91 deps = [ |
144 "quicdatachannel.h", | 92 "../pc:libjingle_peerconnection", |
145 "quicdatatransport.cc", | 93 ] |
146 "quicdatatransport.h", | |
147 ] | |
148 deps += [ "//third_party/libquic" ] | |
149 public_deps = [ | |
150 "//third_party/libquic", | |
151 ] | |
152 } | |
153 } | 94 } |
154 | 95 |
155 rtc_source_set("rtc_stats_api") { | 96 rtc_source_set("rtc_stats_api") { |
156 cflags = [] | 97 cflags = [] |
157 sources = [ | 98 sources = [ |
158 "stats/rtcstats.h", | 99 "stats/rtcstats.h", |
159 "stats/rtcstats_objects.h", | 100 "stats/rtcstats_objects.h", |
| 101 "stats/rtcstatscollectorcallback.h", |
160 "stats/rtcstatsreport.h", | 102 "stats/rtcstatsreport.h", |
161 ] | 103 ] |
162 | 104 |
163 deps = [ | 105 deps = [ |
164 "../base:rtc_base_approved", | 106 "../base:rtc_base_approved", |
165 ] | 107 ] |
166 } | 108 } |
167 | 109 |
168 rtc_source_set("audio_mixer_api") { | 110 rtc_source_set("audio_mixer_api") { |
169 sources = [ | 111 sources = [ |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 public_deps = [ | 145 public_deps = [ |
204 "$rtc_libyuv_dir", | 146 "$rtc_libyuv_dir", |
205 ] | 147 ] |
206 } else { | 148 } else { |
207 # Need to add a directory normally exported by libyuv. | 149 # Need to add a directory normally exported by libyuv. |
208 include_dirs = [ "$rtc_libyuv_dir/include" ] | 150 include_dirs = [ "$rtc_libyuv_dir/include" ] |
209 } | 151 } |
210 } | 152 } |
211 | 153 |
212 if (rtc_include_tests) { | 154 if (rtc_include_tests) { |
213 config("peerconnection_unittests_config") { | |
214 # The warnings below are enabled by default. Since GN orders compiler flags | |
215 # for a target before flags from configs, the only way to disable such | |
216 # warnings is by having them in a separate config, loaded from the target. | |
217 # TODO(kjellander): Make the code compile without disabling these flags. | |
218 # See https://bugs.webrtc.org/3307. | |
219 if (is_clang && is_win) { | |
220 cflags = [ | |
221 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6267 | |
222 # for -Wno-sign-compare | |
223 "-Wno-sign-compare", | |
224 "-Wno-unused-function", | |
225 ] | |
226 } | |
227 | |
228 if (!is_win) { | |
229 cflags = [ "-Wno-sign-compare" ] | |
230 } | |
231 } | |
232 | |
233 rtc_test("peerconnection_unittests") { | |
234 check_includes = false # TODO(kjellander): Remove (bugs.webrtc.org/6828) | |
235 testonly = true | |
236 sources = [ | |
237 "datachannel_unittest.cc", | |
238 "dtmfsender_unittest.cc", | |
239 "jsepsessiondescription_unittest.cc", | |
240 "localaudiosource_unittest.cc", | |
241 "mediaconstraintsinterface_unittest.cc", | |
242 "mediastream_unittest.cc", | |
243 "ortcfactory_unittest.cc", | |
244 "peerconnection_unittest.cc", | |
245 "peerconnectionendtoend_unittest.cc", | |
246 "peerconnectionfactory_unittest.cc", | |
247 "peerconnectioninterface_unittest.cc", | |
248 "proxy_unittest.cc", | |
249 "rtcstats_integrationtest.cc", | |
250 "rtcstatscollector_unittest.cc", | |
251 "rtpsenderreceiver_unittest.cc", | |
252 "sctputils_unittest.cc", | |
253 "statscollector_unittest.cc", | |
254 "test/fakeaudiocapturemodule.cc", | |
255 "test/fakeaudiocapturemodule.h", | |
256 "test/fakeaudiocapturemodule_unittest.cc", | |
257 "test/fakeconstraints.h", | |
258 "test/fakedatachannelprovider.h", | |
259 "test/fakeperiodicvideocapturer.h", | |
260 "test/fakertccertificategenerator.h", | |
261 "test/fakevideotrackrenderer.h", | |
262 "test/mock_datachannel.h", | |
263 "test/mock_peerconnection.h", | |
264 "test/mock_rtpreceiver.h", | |
265 "test/mock_rtpsender.h", | |
266 "test/mock_webrtcsession.h", | |
267 "test/mockpeerconnectionobservers.h", | |
268 "test/peerconnectiontestwrapper.cc", | |
269 "test/peerconnectiontestwrapper.h", | |
270 "test/rtcstatsobtainer.h", | |
271 "test/testsdpstrings.h", | |
272 "trackmediainfomap_unittest.cc", | |
273 "videocapturertracksource_unittest.cc", | |
274 "videotrack_unittest.cc", | |
275 "webrtcsdp_unittest.cc", | |
276 "webrtcsession_unittest.cc", | |
277 ] | |
278 | |
279 if (rtc_enable_sctp) { | |
280 defines = [ "HAVE_SCTP" ] | |
281 } | |
282 | |
283 configs += [ ":peerconnection_unittests_config" ] | |
284 | |
285 if (!build_with_chromium && is_clang) { | |
286 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
287 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
288 } | |
289 | |
290 # TODO(jschuh): Bug 1348: fix this warning. | |
291 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | |
292 | |
293 if (is_win) { | |
294 cflags = [ | |
295 "/wd4245", # conversion from int to size_t, signed/unsigned mismatch. | |
296 "/wd4389", # signed/unsigned mismatch. | |
297 ] | |
298 } | |
299 | |
300 if (rtc_use_quic) { | |
301 public_deps = [ | |
302 "//third_party/libquic", | |
303 ] | |
304 sources += [ | |
305 "quicdatachannel_unittest.cc", | |
306 "quicdatatransport_unittest.cc", | |
307 ] | |
308 } | |
309 | |
310 deps = [] | |
311 if (is_android) { | |
312 sources += [ | |
313 "test/androidtestinitializer.cc", | |
314 "test/androidtestinitializer.h", | |
315 ] | |
316 deps += [ | |
317 "//testing/android/native_test:native_test_support", | |
318 "//webrtc/sdk/android:libjingle_peerconnection_java", | |
319 "//webrtc/sdk/android:libjingle_peerconnection_jni", | |
320 ] | |
321 } | |
322 | |
323 deps += [ | |
324 ":fakemetricsobserver", | |
325 ":libjingle_peerconnection", | |
326 "..:webrtc_common", | |
327 "../base:rtc_base_tests_utils", | |
328 "../media:rtc_unittest_main", | |
329 "../pc:rtc_pc", | |
330 "../system_wrappers:metrics_default", | |
331 "//testing/gmock", | |
332 ] | |
333 | |
334 if (is_android) { | |
335 deps += [ "//testing/android/native_test:native_test_support" ] | |
336 | |
337 shard_timeout = 900 | |
338 } | |
339 } | |
340 | |
341 rtc_source_set("mock_audio_mixer") { | 155 rtc_source_set("mock_audio_mixer") { |
342 testonly = true | 156 testonly = true |
343 sources = [ | 157 sources = [ |
344 "test/mock_audio_mixer.h", | 158 "test/mock_audio_mixer.h", |
345 ] | 159 ] |
346 | 160 |
347 public_deps = [ | 161 public_deps = [ |
348 ":audio_mixer_api", | 162 ":audio_mixer_api", |
349 ] | 163 ] |
350 | 164 |
351 deps = [ | 165 deps = [ |
352 "//testing/gmock", | 166 "//testing/gmock", |
353 "//webrtc/test:test_support", | 167 "//webrtc/test:test_support", |
354 ] | 168 ] |
355 } | 169 } |
| 170 |
| 171 rtc_source_set("libjingle_peerconnection_test_api") { |
| 172 testonly = true |
| 173 sources = [ |
| 174 "test/fakeconstraints.h", |
| 175 ] |
| 176 |
| 177 public_deps = [ |
| 178 ":libjingle_peerconnection_api", |
| 179 ] |
| 180 |
| 181 deps = [ |
| 182 "../base:rtc_base_approved", |
| 183 "//webrtc/test:test_support", |
| 184 ] |
| 185 } |
356 | 186 |
357 rtc_source_set("fakemetricsobserver") { | 187 rtc_source_set("fakemetricsobserver") { |
358 testonly = true | 188 testonly = true |
359 sources = [ | 189 sources = [ |
360 "fakemetricsobserver.cc", | 190 "fakemetricsobserver.cc", |
361 "fakemetricsobserver.h", | 191 "fakemetricsobserver.h", |
362 ] | 192 ] |
363 deps = [ | 193 deps = [ |
364 ":libjingle_peerconnection", | 194 ":libjingle_peerconnection_api", |
365 "../base:rtc_base_approved", | 195 "../base:rtc_base_approved", |
366 ] | 196 ] |
367 if (!build_with_chromium && is_clang) { | 197 if (!build_with_chromium && is_clang) { |
368 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 198 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
369 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 199 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
370 } | 200 } |
371 } | 201 } |
372 } | 202 } |
OLD | NEW |