blob: 8a76f2548b44c559ebd3aa037aa35438524c359b [file] [log] [blame]
hjonaa32c3e2015-12-13 19:58:11 -08001# Copyright (c) 2015 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")
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020010if (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("api") {
kjellander705ecc52016-09-15 00:53:26 -070016 public_deps = [
ossu7bb87ee2017-01-23 04:56:25 -080017 ":libjingle_peerconnection_api",
kjellanderc76dc952016-06-03 03:09:32 -070018 ]
19}
20
ehmaldonado38a21322016-09-02 04:10:34 -070021rtc_source_set("call_api") {
kjellandera69d9732016-08-31 07:33:05 -070022 sources = [
kjellandera69d9732016-08-31 07:33:05 -070023 "call/audio_sink.h",
kjellandera69d9732016-08-31 07:33:05 -070024 ]
25
kjellandera69d9732016-08-31 07:33:05 -070026 deps = [
27 # TODO(kjellander): Add remaining dependencies when webrtc:4243 is done.
aleloi81da4882016-11-08 04:26:30 -080028 ":audio_mixer_api",
aleloia8eb7562016-11-28 07:02:13 -080029 ":transport_api",
kjellandera69d9732016-08-31 07:33:05 -070030 "..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -070031 "../rtc_base:rtc_base_approved",
kwiberg087bd342017-02-10 08:15:44 -080032 "audio_codecs:audio_codecs_api",
kjellandera69d9732016-08-31 07:33:05 -070033 ]
34}
35
ossu7bb87ee2017-01-23 04:56:25 -080036rtc_static_library("libjingle_peerconnection_api") {
kjellanderc76dc952016-06-03 03:09:32 -070037 cflags = []
38 sources = [
Steve Anton36b28db2017-10-26 11:27:17 -070039 "candidate.cc",
Patrik Höglunde2d6a062017-10-05 14:53:33 +020040 "candidate.h",
Patrik Höglund7aee3d52017-11-15 13:15:17 +010041 "cryptoparams.h",
kjellanderc76dc952016-06-03 03:09:32 -070042 "datachannelinterface.h",
kjellanderc76dc952016-06-03 03:09:32 -070043 "dtmfsenderinterface.h",
44 "jsep.h",
kjellanderc76dc952016-06-03 03:09:32 -070045 "jsepicecandidate.h",
kjellanderc76dc952016-06-03 03:09:32 -070046 "jsepsessiondescription.h",
kjellanderc76dc952016-06-03 03:09:32 -070047 "mediaconstraintsinterface.cc",
48 "mediaconstraintsinterface.h",
ossu7bb87ee2017-01-23 04:56:25 -080049 "mediastreaminterface.cc",
kjellanderc76dc952016-06-03 03:09:32 -070050 "mediastreamproxy.h",
kjellanderc76dc952016-06-03 03:09:32 -070051 "mediastreamtrackproxy.h",
ossu7bb87ee2017-01-23 04:56:25 -080052 "mediatypes.cc",
53 "mediatypes.h",
kjellanderc76dc952016-06-03 03:09:32 -070054 "notifier.h",
kjellanderc76dc952016-06-03 03:09:32 -070055 "peerconnectionfactoryproxy.h",
kjellanderc76dc952016-06-03 03:09:32 -070056 "peerconnectionproxy.h",
Steve Antonf2737d22017-10-31 16:27:34 -070057 "proxy.cc",
kjellanderc76dc952016-06-03 03:09:32 -070058 "proxy.h",
deadbeef6038e972017-02-16 23:31:33 -080059 "rtcerror.cc",
60 "rtcerror.h",
Stefan Holmer1acbd682017-09-01 15:29:28 +020061 "rtpparameters.cc",
kjellanderc76dc952016-06-03 03:09:32 -070062 "rtpparameters.h",
kjellanderc76dc952016-06-03 03:09:32 -070063 "rtpreceiverinterface.h",
kjellanderc76dc952016-06-03 03:09:32 -070064 "rtpsenderinterface.h",
Steve Anton6e634bf2017-11-13 10:44:53 -080065 "rtptransceiverinterface.h",
Henrik Boström31638672017-11-23 17:48:32 +010066 "setremotedescriptionobserverinterface.h",
kjellanderc76dc952016-06-03 03:09:32 -070067 "statstypes.cc",
68 "statstypes.h",
Jonas Orelandbdcee282017-10-10 14:01:40 +020069 "turncustomizer.h",
Steve Antonf2737d22017-10-31 16:27:34 -070070 "umametrics.cc",
ossu7bb87ee2017-01-23 04:56:25 -080071 "umametrics.h",
kjellanderc76dc952016-06-03 03:09:32 -070072 "videosourceproxy.h",
kjellanderc76dc952016-06-03 03:09:32 -070073 ]
74
kjellandere40a7ee2016-10-16 23:56:12 -070075 if (!build_with_chromium && is_clang) {
kjellanderfd5b4e92016-06-13 12:08:33 -070076 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070077 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -070078 }
79
Patrik Höglunde2d6a062017-10-05 14:53:33 +020080 public_deps = [
81 ":libjingle_api_deprecated_headers",
82 ":mediastream_interface_and_implicit_video_frame_api",
83 ":peerconnection_and_implicit_call_api",
84 ]
85
kjellanderc76dc952016-06-03 03:09:32 -070086 deps = [
Patrik Höglunde2d6a062017-10-05 14:53:33 +020087 ":optional",
hbos74e1a4f2016-09-15 23:33:01 -070088 ":rtc_stats_api",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +010089 "audio_codecs:audio_codecs_api",
90
91 # Basically, don't add stuff here. You might break sensitive downstream
92 # targets like pnacl. API should not depend on anything outside of this
93 # file, really. All these should arguably go away in time.
kjellander8a116632017-04-21 05:17:08 -070094 "..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -070095 "../rtc_base:rtc_base",
96 "../rtc_base:rtc_base_approved",
kjellanderc76dc952016-06-03 03:09:32 -070097 ]
kjellander8a116632017-04-21 05:17:08 -070098
99 # This is needed until bugs.webrtc.org/7504 is removed so this target can
100 # properly depend on ../media:rtc_media_base
101 # TODO(kjellander): Remove this dependency.
102 if (is_nacl) {
103 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
104 }
ossu7bb87ee2017-01-23 04:56:25 -0800105}
kjellanderc76dc952016-06-03 03:09:32 -0700106
Patrik Höglunde2d6a062017-10-05 14:53:33 +0200107rtc_source_set("peerconnection_and_implicit_call_api") {
108 # The peerconnectioninterface.h file pulls in call/callfactoryinterface.h
109 # and the entire call module with it. We need to either get rid of this
110 # dependency or pull most of call/ into the API. For now, silence the warnings
111 # this creates since it creates a circular dependency (call very much depends
112 # on API). See bugs.webrtc.org/7504.
113 check_includes = false
114 sources = [
115 "peerconnectioninterface.h",
116 ]
117}
118
119rtc_source_set("mediastream_interface_and_implicit_video_frame_api") {
120 # The mediastreaminterface.h file pulls in in video_frame.h, but the
121 # system_wrappers dependency that comes with that breaks pnacl downstream.
122 # TODO(phoglund): solve this (see bugs.webrtc.org/7504).
123 check_includes = false
124 sources = [
125 "mediastreaminterface.h",
126 ]
Ivo Creusen56d46092017-11-24 17:29:59 +0100127 deps = [
128 "../modules/audio_processing:audio_processing_statistics",
129 ]
Patrik Höglunde2d6a062017-10-05 14:53:33 +0200130}
131
132rtc_source_set("libjingle_api_deprecated_headers") {
133 # We need to include headers from undeclared targets here, since they cause
134 # circular dependencies. These deprecated headers are going away anyway.
135 # See http://bugs.webrtc.org/5883.
136 check_includes = false
137 sources = [
138 "datachannel.h",
139 "mediastream.h",
140 "mediastreamtrack.h",
141 "rtpsender.h",
142 "streamcollection.h",
143 "videotracksource.h",
144 "webrtcsdp.h",
145 ]
146}
147
Elad Alon80810732017-10-06 13:07:32 +0200148rtc_source_set("libjingle_logging_api") {
149 sources = [
150 "rtceventlogoutput.h",
151 ]
152}
153
deadbeefe814a0d2017-02-25 18:15:09 -0800154rtc_source_set("ortc_api") {
deadbeefe814a0d2017-02-25 18:15:09 -0800155 sources = [
zhihuang55adc0e2017-03-10 18:33:45 -0800156 "ortc/mediadescription.cc",
157 "ortc/mediadescription.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800158 "ortc/ortcfactoryinterface.h",
159 "ortc/ortcrtpreceiverinterface.h",
160 "ortc/ortcrtpsenderinterface.h",
161 "ortc/packettransportinterface.h",
162 "ortc/rtptransportcontrollerinterface.h",
163 "ortc/rtptransportinterface.h",
zhihuang55adc0e2017-03-10 18:33:45 -0800164 "ortc/sessiondescription.cc",
165 "ortc/sessiondescription.h",
zhihuangd3501ad2017-03-03 14:39:06 -0800166 "ortc/srtptransportinterface.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800167 "ortc/udptransportinterface.h",
168 ]
169
170 # For mediastreaminterface.h, etc.
171 # TODO(deadbeef): Create a separate target for the common things ORTC and
172 # PeerConnection code shares, so that ortc_api can depend on that instead of
173 # libjingle_peerconnection_api.
Patrik Höglund7aee3d52017-11-15 13:15:17 +0100174 deps = [
deadbeefe814a0d2017-02-25 18:15:09 -0800175 ":libjingle_peerconnection_api",
Patrik Höglund7aee3d52017-11-15 13:15:17 +0100176 ":optional",
177 "..:webrtc_common",
178 "../rtc_base:rtc_base",
deadbeefe814a0d2017-02-25 18:15:09 -0800179 ]
zhihuang55adc0e2017-03-10 18:33:45 -0800180 if (!build_with_chromium && is_clang) {
181 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
182 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
183 }
deadbeefe814a0d2017-02-25 18:15:09 -0800184}
185
ossu7bb87ee2017-01-23 04:56:25 -0800186# TODO(ossu): Remove once downstream projects have updated.
187rtc_source_set("libjingle_peerconnection") {
ossuda250062017-01-23 07:37:43 -0800188 public_deps = [
ossu7bb87ee2017-01-23 04:56:25 -0800189 "../pc:libjingle_peerconnection",
190 ]
kjellanderc76dc952016-06-03 03:09:32 -0700191}
kjellanderfd5b4e92016-06-13 12:08:33 -0700192
hbos74e1a4f2016-09-15 23:33:01 -0700193rtc_source_set("rtc_stats_api") {
194 cflags = []
195 sources = [
196 "stats/rtcstats.h",
197 "stats/rtcstats_objects.h",
ossu7bb87ee2017-01-23 04:56:25 -0800198 "stats/rtcstatscollectorcallback.h",
hbos74e1a4f2016-09-15 23:33:01 -0700199 "stats/rtcstatsreport.h",
200 ]
201
202 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700203 "../rtc_base:rtc_base_approved",
hbos74e1a4f2016-09-15 23:33:01 -0700204 ]
205}
206
aleloi201dfe92016-10-20 05:06:39 -0700207rtc_source_set("audio_mixer_api") {
208 sources = [
209 "audio/audio_mixer.h",
210 ]
211
212 deps = [
mbonadei1140f972017-04-26 03:38:35 -0700213 "../modules:module_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700214 "../rtc_base:rtc_base_approved",
aleloi201dfe92016-10-20 05:06:39 -0700215 ]
216}
217
aleloia8eb7562016-11-28 07:02:13 -0800218rtc_source_set("transport_api") {
219 sources = [
220 "call/transport.h",
221 ]
222}
nisseb2250e52016-12-02 04:01:14 -0800223
224rtc_source_set("video_frame_api") {
225 sources = [
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100226 # TODO(phoglund): move i420 files to video_frame_api_i420 after updating
227 # downstream. See bugs.webrtc.org/7504.
nisseaf916892017-01-10 07:44:26 -0800228 "video/i420_buffer.cc",
229 "video/i420_buffer.h",
ilnik6d5b4d62017-08-30 03:32:14 -0700230 "video/video_content_type.cc",
231 "video/video_content_type.h",
nisseaf916892017-01-10 07:44:26 -0800232 "video/video_frame.cc",
233 "video/video_frame.h",
magjed712338e2017-05-11 05:11:57 -0700234 "video/video_frame_buffer.cc",
nisseaf916892017-01-10 07:44:26 -0800235 "video/video_frame_buffer.h",
nisseb2250e52016-12-02 04:01:14 -0800236 "video/video_rotation.h",
ilnik2edc6842017-07-06 03:06:50 -0700237 "video/video_timing.cc",
ilnik04f4d122017-06-19 07:18:55 -0700238 "video/video_timing.h",
nisseb2250e52016-12-02 04:01:14 -0800239 ]
240
241 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700242 "../rtc_base:rtc_base_approved",
nisseaf916892017-01-10 07:44:26 -0800243 "../system_wrappers",
nisseb2250e52016-12-02 04:01:14 -0800244 ]
245
246 # TODO(nisse): This logic is duplicated in multiple places.
247 # Define in a single place.
248 if (rtc_build_libyuv) {
249 deps += [ "$rtc_libyuv_dir" ]
250 public_deps = [
251 "$rtc_libyuv_dir",
252 ]
253 } else {
254 # Need to add a directory normally exported by libyuv.
255 include_dirs = [ "$rtc_libyuv_dir/include" ]
256 }
257}
258
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100259rtc_source_set("video_frame_api_i420") {
260 sources = [
261 "video/i420_buffer.h",
262 ]
263 deps = [
264 ":video_frame_api",
265 "../rtc_base:rtc_base_approved",
266 "../system_wrappers",
267 ]
268}
269
kwiberg529662a2017-09-04 05:43:17 -0700270rtc_source_set("array_view") {
271 sources = [
272 "array_view.h",
273 ]
274 deps = [
275 "../rtc_base:rtc_base_approved",
276 ]
277}
278
kwiberg84f6a3f2017-09-05 08:43:13 -0700279rtc_source_set("optional") {
280 sources = [
281 "optional.cc",
282 "optional.h",
283 ]
284 deps = [
285 ":array_view",
286 "../rtc_base:rtc_base_approved",
287 ]
288}
289
Niels Möller9155e492017-10-23 11:22:30 +0200290rtc_source_set("refcountedbase") {
291 sources = [
292 "refcountedbase.h",
293 ]
294 deps = [
295 "../rtc_base:rtc_base_approved",
296 ]
297}
298
kjellander1993b1d2017-03-06 00:29:21 -0800299rtc_source_set("libjingle_peerconnection_test_api") {
300 testonly = true
301 sources = [
302 "test/fakeconstraints.h",
303 ]
304
305 public_deps = [
306 ":libjingle_peerconnection_api",
307 ]
308
309 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700310 "../rtc_base:rtc_base_approved",
kjellander1993b1d2017-03-06 00:29:21 -0800311 ]
312}
313
kjellanderfd5b4e92016-06-13 12:08:33 -0700314if (rtc_include_tests) {
kjellander2f6af9c2017-03-02 22:26:23 -0800315 rtc_source_set("mock_audio_mixer") {
316 testonly = true
317 sources = [
318 "test/mock_audio_mixer.h",
319 ]
320
321 public_deps = [
322 ":audio_mixer_api",
323 ]
324
325 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700326 "../test:test_support",
kjellander2f6af9c2017-03-02 22:26:23 -0800327 "//testing/gmock",
kjellander2f6af9c2017-03-02 22:26:23 -0800328 ]
329 }
330
Emircan Uysalerdbcac7f2017-10-30 23:10:12 -0700331 rtc_source_set("mock_video_codec_factory") {
332 testonly = true
333 sources = [
334 "test/mock_video_decoder_factory.h",
335 "test/mock_video_encoder_factory.h",
336 ]
337
338 public_deps = [
339 "../api/video_codecs:video_codecs_api",
340 ]
341
342 deps = [
343 "../test:test_support",
344 "//testing/gmock",
345 ]
346 }
347
kjellander2f6af9c2017-03-02 22:26:23 -0800348 rtc_source_set("fakemetricsobserver") {
349 testonly = true
350 sources = [
351 "fakemetricsobserver.cc",
352 "fakemetricsobserver.h",
353 ]
354 deps = [
355 ":libjingle_peerconnection_api",
Edward Lemur872cf382017-11-20 18:41:50 +0100356 "../api:peerconnection_and_implicit_call_api",
357 "../media:rtc_media_base",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700358 "../rtc_base:rtc_base_approved",
kjellander2f6af9c2017-03-02 22:26:23 -0800359 ]
360 if (!build_with_chromium && is_clang) {
361 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
362 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
363 }
364 }
365
deadbeefb5388d72017-02-24 01:17:43 -0800366 rtc_source_set("rtc_api_unittests") {
deadbeef6038e972017-02-16 23:31:33 -0800367 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700368
deadbeef6038e972017-02-16 23:31:33 -0800369 sources = [
kwiberg529662a2017-09-04 05:43:17 -0700370 "array_view_unittest.cc",
kwiberg84f6a3f2017-09-05 08:43:13 -0700371 "optional_unittest.cc",
zhihuang55adc0e2017-03-10 18:33:45 -0800372 "ortc/mediadescription_unittest.cc",
373 "ortc/sessiondescription_unittest.cc",
deadbeef6038e972017-02-16 23:31:33 -0800374 "rtcerror_unittest.cc",
Stefan Holmer1acbd682017-09-01 15:29:28 +0200375 "rtpparameters_unittest.cc",
deadbeef6038e972017-02-16 23:31:33 -0800376 ]
377
378 if (!build_with_chromium && is_clang) {
379 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
380 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
381 }
382
383 deps = [
kwiberg529662a2017-09-04 05:43:17 -0700384 ":array_view",
deadbeef6038e972017-02-16 23:31:33 -0800385 ":libjingle_peerconnection_api",
Henrik Boström31638672017-11-23 17:48:32 +0100386 ":libjingle_peerconnection_test_api",
kwiberg84f6a3f2017-09-05 08:43:13 -0700387 ":optional",
zhihuang55adc0e2017-03-10 18:33:45 -0800388 ":ortc_api",
kwiberg529662a2017-09-04 05:43:17 -0700389 "../rtc_base:rtc_base_approved",
390 "../rtc_base:rtc_base_tests_utils",
jianjun.zhuc0247402017-07-11 06:20:45 -0700391 "../test:test_support",
deadbeef6038e972017-02-16 23:31:33 -0800392 ]
deadbeef6038e972017-02-16 23:31:33 -0800393 }
kjellanderfd5b4e92016-06-13 12:08:33 -0700394}