blob: 606e9d99174a7f382645c77327dd9b70c3d6422d [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",
kjellanderc76dc952016-06-03 03:09:32 -070041 "datachannelinterface.h",
kjellanderc76dc952016-06-03 03:09:32 -070042 "dtmfsenderinterface.h",
43 "jsep.h",
kjellanderc76dc952016-06-03 03:09:32 -070044 "jsepicecandidate.h",
kjellanderc76dc952016-06-03 03:09:32 -070045 "jsepsessiondescription.h",
kjellanderc76dc952016-06-03 03:09:32 -070046 "mediaconstraintsinterface.cc",
47 "mediaconstraintsinterface.h",
ossu7bb87ee2017-01-23 04:56:25 -080048 "mediastreaminterface.cc",
kjellanderc76dc952016-06-03 03:09:32 -070049 "mediastreamproxy.h",
kjellanderc76dc952016-06-03 03:09:32 -070050 "mediastreamtrackproxy.h",
ossu7bb87ee2017-01-23 04:56:25 -080051 "mediatypes.cc",
52 "mediatypes.h",
kjellanderc76dc952016-06-03 03:09:32 -070053 "notifier.h",
kjellanderc76dc952016-06-03 03:09:32 -070054 "peerconnectionfactoryproxy.h",
kjellanderc76dc952016-06-03 03:09:32 -070055 "peerconnectionproxy.h",
Steve Antonf2737d22017-10-31 16:27:34 -070056 "proxy.cc",
kjellanderc76dc952016-06-03 03:09:32 -070057 "proxy.h",
deadbeef6038e972017-02-16 23:31:33 -080058 "rtcerror.cc",
59 "rtcerror.h",
Stefan Holmer1acbd682017-09-01 15:29:28 +020060 "rtpparameters.cc",
kjellanderc76dc952016-06-03 03:09:32 -070061 "rtpparameters.h",
kjellanderc76dc952016-06-03 03:09:32 -070062 "rtpreceiverinterface.h",
kjellanderc76dc952016-06-03 03:09:32 -070063 "rtpsenderinterface.h",
Steve Anton6e634bf2017-11-13 10:44:53 -080064 "rtptransceiverinterface.h",
kjellanderc76dc952016-06-03 03:09:32 -070065 "statstypes.cc",
66 "statstypes.h",
Jonas Orelandbdcee282017-10-10 14:01:40 +020067 "turncustomizer.h",
Steve Antonf2737d22017-10-31 16:27:34 -070068 "umametrics.cc",
ossu7bb87ee2017-01-23 04:56:25 -080069 "umametrics.h",
kjellanderc76dc952016-06-03 03:09:32 -070070 "videosourceproxy.h",
kjellanderc76dc952016-06-03 03:09:32 -070071 ]
72
kjellandere40a7ee2016-10-16 23:56:12 -070073 if (!build_with_chromium && is_clang) {
kjellanderfd5b4e92016-06-13 12:08:33 -070074 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070075 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -070076 }
77
Patrik Höglunde2d6a062017-10-05 14:53:33 +020078 public_deps = [
79 ":libjingle_api_deprecated_headers",
80 ":mediastream_interface_and_implicit_video_frame_api",
81 ":peerconnection_and_implicit_call_api",
82 ]
83
kjellanderc76dc952016-06-03 03:09:32 -070084 deps = [
Patrik Höglunde2d6a062017-10-05 14:53:33 +020085 ":optional",
hbos74e1a4f2016-09-15 23:33:01 -070086 ":rtc_stats_api",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +010087 "audio_codecs:audio_codecs_api",
88
89 # Basically, don't add stuff here. You might break sensitive downstream
90 # targets like pnacl. API should not depend on anything outside of this
91 # file, really. All these should arguably go away in time.
kjellander8a116632017-04-21 05:17:08 -070092 "..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -070093 "../rtc_base:rtc_base",
94 "../rtc_base:rtc_base_approved",
kjellanderc76dc952016-06-03 03:09:32 -070095 ]
kjellander8a116632017-04-21 05:17:08 -070096
97 # This is needed until bugs.webrtc.org/7504 is removed so this target can
98 # properly depend on ../media:rtc_media_base
99 # TODO(kjellander): Remove this dependency.
100 if (is_nacl) {
101 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
102 }
ossu7bb87ee2017-01-23 04:56:25 -0800103}
kjellanderc76dc952016-06-03 03:09:32 -0700104
Patrik Höglunde2d6a062017-10-05 14:53:33 +0200105rtc_source_set("peerconnection_and_implicit_call_api") {
106 # The peerconnectioninterface.h file pulls in call/callfactoryinterface.h
107 # and the entire call module with it. We need to either get rid of this
108 # dependency or pull most of call/ into the API. For now, silence the warnings
109 # this creates since it creates a circular dependency (call very much depends
110 # on API). See bugs.webrtc.org/7504.
111 check_includes = false
112 sources = [
113 "peerconnectioninterface.h",
114 ]
115}
116
117rtc_source_set("mediastream_interface_and_implicit_video_frame_api") {
118 # The mediastreaminterface.h file pulls in in video_frame.h, but the
119 # system_wrappers dependency that comes with that breaks pnacl downstream.
120 # TODO(phoglund): solve this (see bugs.webrtc.org/7504).
121 check_includes = false
122 sources = [
123 "mediastreaminterface.h",
124 ]
125}
126
127rtc_source_set("libjingle_api_deprecated_headers") {
128 # We need to include headers from undeclared targets here, since they cause
129 # circular dependencies. These deprecated headers are going away anyway.
130 # See http://bugs.webrtc.org/5883.
131 check_includes = false
132 sources = [
133 "datachannel.h",
134 "mediastream.h",
135 "mediastreamtrack.h",
136 "rtpsender.h",
137 "streamcollection.h",
138 "videotracksource.h",
139 "webrtcsdp.h",
140 ]
141}
142
Elad Alon80810732017-10-06 13:07:32 +0200143rtc_source_set("libjingle_logging_api") {
144 sources = [
145 "rtceventlogoutput.h",
146 ]
147}
148
deadbeefe814a0d2017-02-25 18:15:09 -0800149rtc_source_set("ortc_api") {
150 check_includes = false # TODO(deadbeef): Remove (bugs.webrtc.org/6828)
151 sources = [
zhihuang55adc0e2017-03-10 18:33:45 -0800152 "ortc/mediadescription.cc",
153 "ortc/mediadescription.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800154 "ortc/ortcfactoryinterface.h",
155 "ortc/ortcrtpreceiverinterface.h",
156 "ortc/ortcrtpsenderinterface.h",
157 "ortc/packettransportinterface.h",
158 "ortc/rtptransportcontrollerinterface.h",
159 "ortc/rtptransportinterface.h",
zhihuang55adc0e2017-03-10 18:33:45 -0800160 "ortc/sessiondescription.cc",
161 "ortc/sessiondescription.h",
zhihuangd3501ad2017-03-03 14:39:06 -0800162 "ortc/srtptransportinterface.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800163 "ortc/udptransportinterface.h",
164 ]
165
166 # For mediastreaminterface.h, etc.
167 # TODO(deadbeef): Create a separate target for the common things ORTC and
168 # PeerConnection code shares, so that ortc_api can depend on that instead of
169 # libjingle_peerconnection_api.
170 public_deps = [
171 ":libjingle_peerconnection_api",
172 ]
zhihuang55adc0e2017-03-10 18:33:45 -0800173 if (!build_with_chromium && is_clang) {
174 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
175 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
176 }
deadbeefe814a0d2017-02-25 18:15:09 -0800177}
178
ossu7bb87ee2017-01-23 04:56:25 -0800179# TODO(ossu): Remove once downstream projects have updated.
180rtc_source_set("libjingle_peerconnection") {
ossuda250062017-01-23 07:37:43 -0800181 public_deps = [
ossu7bb87ee2017-01-23 04:56:25 -0800182 "../pc:libjingle_peerconnection",
183 ]
kjellanderc76dc952016-06-03 03:09:32 -0700184}
kjellanderfd5b4e92016-06-13 12:08:33 -0700185
hbos74e1a4f2016-09-15 23:33:01 -0700186rtc_source_set("rtc_stats_api") {
187 cflags = []
188 sources = [
189 "stats/rtcstats.h",
190 "stats/rtcstats_objects.h",
ossu7bb87ee2017-01-23 04:56:25 -0800191 "stats/rtcstatscollectorcallback.h",
hbos74e1a4f2016-09-15 23:33:01 -0700192 "stats/rtcstatsreport.h",
193 ]
194
195 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700196 "../rtc_base:rtc_base_approved",
hbos74e1a4f2016-09-15 23:33:01 -0700197 ]
198}
199
aleloi201dfe92016-10-20 05:06:39 -0700200rtc_source_set("audio_mixer_api") {
201 sources = [
202 "audio/audio_mixer.h",
203 ]
204
205 deps = [
mbonadei1140f972017-04-26 03:38:35 -0700206 "../modules:module_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700207 "../rtc_base:rtc_base_approved",
aleloi201dfe92016-10-20 05:06:39 -0700208 ]
209}
210
aleloia8eb7562016-11-28 07:02:13 -0800211rtc_source_set("transport_api") {
212 sources = [
213 "call/transport.h",
214 ]
215}
nisseb2250e52016-12-02 04:01:14 -0800216
217rtc_source_set("video_frame_api") {
218 sources = [
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100219 # TODO(phoglund): move i420 files to video_frame_api_i420 after updating
220 # downstream. See bugs.webrtc.org/7504.
nisseaf916892017-01-10 07:44:26 -0800221 "video/i420_buffer.cc",
222 "video/i420_buffer.h",
ilnik6d5b4d62017-08-30 03:32:14 -0700223 "video/video_content_type.cc",
224 "video/video_content_type.h",
nisseaf916892017-01-10 07:44:26 -0800225 "video/video_frame.cc",
226 "video/video_frame.h",
magjed712338e2017-05-11 05:11:57 -0700227 "video/video_frame_buffer.cc",
nisseaf916892017-01-10 07:44:26 -0800228 "video/video_frame_buffer.h",
nisseb2250e52016-12-02 04:01:14 -0800229 "video/video_rotation.h",
ilnik2edc6842017-07-06 03:06:50 -0700230 "video/video_timing.cc",
ilnik04f4d122017-06-19 07:18:55 -0700231 "video/video_timing.h",
nisseb2250e52016-12-02 04:01:14 -0800232 ]
233
234 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700235 "../rtc_base:rtc_base_approved",
nisseaf916892017-01-10 07:44:26 -0800236 "../system_wrappers",
nisseb2250e52016-12-02 04:01:14 -0800237 ]
238
239 # TODO(nisse): This logic is duplicated in multiple places.
240 # Define in a single place.
241 if (rtc_build_libyuv) {
242 deps += [ "$rtc_libyuv_dir" ]
243 public_deps = [
244 "$rtc_libyuv_dir",
245 ]
246 } else {
247 # Need to add a directory normally exported by libyuv.
248 include_dirs = [ "$rtc_libyuv_dir/include" ]
249 }
250}
251
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100252rtc_source_set("video_frame_api_i420") {
253 sources = [
254 "video/i420_buffer.h",
255 ]
256 deps = [
257 ":video_frame_api",
258 "../rtc_base:rtc_base_approved",
259 "../system_wrappers",
260 ]
261}
262
kwiberg529662a2017-09-04 05:43:17 -0700263rtc_source_set("array_view") {
264 sources = [
265 "array_view.h",
266 ]
267 deps = [
268 "../rtc_base:rtc_base_approved",
269 ]
270}
271
kwiberg84f6a3f2017-09-05 08:43:13 -0700272rtc_source_set("optional") {
273 sources = [
274 "optional.cc",
275 "optional.h",
276 ]
277 deps = [
278 ":array_view",
279 "../rtc_base:rtc_base_approved",
280 ]
281}
282
Niels Möller9155e492017-10-23 11:22:30 +0200283rtc_source_set("refcountedbase") {
284 sources = [
285 "refcountedbase.h",
286 ]
287 deps = [
288 "../rtc_base:rtc_base_approved",
289 ]
290}
291
kjellander1993b1d2017-03-06 00:29:21 -0800292rtc_source_set("libjingle_peerconnection_test_api") {
293 testonly = true
294 sources = [
295 "test/fakeconstraints.h",
296 ]
297
298 public_deps = [
299 ":libjingle_peerconnection_api",
300 ]
301
302 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700303 "../rtc_base:rtc_base_approved",
kjellander1993b1d2017-03-06 00:29:21 -0800304 ]
305}
306
kjellanderfd5b4e92016-06-13 12:08:33 -0700307if (rtc_include_tests) {
kjellander2f6af9c2017-03-02 22:26:23 -0800308 rtc_source_set("mock_audio_mixer") {
309 testonly = true
310 sources = [
311 "test/mock_audio_mixer.h",
312 ]
313
314 public_deps = [
315 ":audio_mixer_api",
316 ]
317
318 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700319 "../test:test_support",
kjellander2f6af9c2017-03-02 22:26:23 -0800320 "//testing/gmock",
kjellander2f6af9c2017-03-02 22:26:23 -0800321 ]
322 }
323
Emircan Uysalerdbcac7f2017-10-30 23:10:12 -0700324 rtc_source_set("mock_video_codec_factory") {
325 testonly = true
326 sources = [
327 "test/mock_video_decoder_factory.h",
328 "test/mock_video_encoder_factory.h",
329 ]
330
331 public_deps = [
332 "../api/video_codecs:video_codecs_api",
333 ]
334
335 deps = [
336 "../test:test_support",
337 "//testing/gmock",
338 ]
339 }
340
kjellander2f6af9c2017-03-02 22:26:23 -0800341 rtc_source_set("fakemetricsobserver") {
342 testonly = true
343 sources = [
344 "fakemetricsobserver.cc",
345 "fakemetricsobserver.h",
346 ]
347 deps = [
348 ":libjingle_peerconnection_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700349 "../rtc_base:rtc_base_approved",
kjellander2f6af9c2017-03-02 22:26:23 -0800350 ]
351 if (!build_with_chromium && is_clang) {
352 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
353 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
354 }
355 }
356
deadbeefb5388d72017-02-24 01:17:43 -0800357 rtc_source_set("rtc_api_unittests") {
deadbeef6038e972017-02-16 23:31:33 -0800358 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700359
deadbeef6038e972017-02-16 23:31:33 -0800360 sources = [
kwiberg529662a2017-09-04 05:43:17 -0700361 "array_view_unittest.cc",
kwiberg84f6a3f2017-09-05 08:43:13 -0700362 "optional_unittest.cc",
zhihuang55adc0e2017-03-10 18:33:45 -0800363 "ortc/mediadescription_unittest.cc",
364 "ortc/sessiondescription_unittest.cc",
deadbeef6038e972017-02-16 23:31:33 -0800365 "rtcerror_unittest.cc",
Stefan Holmer1acbd682017-09-01 15:29:28 +0200366 "rtpparameters_unittest.cc",
deadbeef6038e972017-02-16 23:31:33 -0800367 ]
368
369 if (!build_with_chromium && is_clang) {
370 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
371 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
372 }
373
374 deps = [
kwiberg529662a2017-09-04 05:43:17 -0700375 ":array_view",
deadbeef6038e972017-02-16 23:31:33 -0800376 ":libjingle_peerconnection_api",
kwiberg84f6a3f2017-09-05 08:43:13 -0700377 ":optional",
zhihuang55adc0e2017-03-10 18:33:45 -0800378 ":ortc_api",
kwiberg529662a2017-09-04 05:43:17 -0700379 "../rtc_base:rtc_base_approved",
380 "../rtc_base:rtc_base_tests_utils",
jianjun.zhuc0247402017-07-11 06:20:45 -0700381 "../test:test_support",
deadbeef6038e972017-02-16 23:31:33 -0800382 ]
deadbeef6038e972017-02-16 23:31:33 -0800383 }
kjellanderfd5b4e92016-06-13 12:08:33 -0700384}