blob: bad3a51b30e864094828b3133cf6da51c4fdea34 [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",
kjellanderc76dc952016-06-03 03:09:32 -070064 "statstypes.cc",
65 "statstypes.h",
Jonas Orelandbdcee282017-10-10 14:01:40 +020066 "turncustomizer.h",
Steve Antonf2737d22017-10-31 16:27:34 -070067 "umametrics.cc",
ossu7bb87ee2017-01-23 04:56:25 -080068 "umametrics.h",
kjellanderc76dc952016-06-03 03:09:32 -070069 "videosourceproxy.h",
kjellanderc76dc952016-06-03 03:09:32 -070070 ]
71
kjellandere40a7ee2016-10-16 23:56:12 -070072 if (!build_with_chromium && is_clang) {
kjellanderfd5b4e92016-06-13 12:08:33 -070073 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070074 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -070075 }
76
Patrik Höglunde2d6a062017-10-05 14:53:33 +020077 public_deps = [
78 ":libjingle_api_deprecated_headers",
79 ":mediastream_interface_and_implicit_video_frame_api",
80 ":peerconnection_and_implicit_call_api",
81 ]
82
kjellanderc76dc952016-06-03 03:09:32 -070083 deps = [
Patrik Höglunde2d6a062017-10-05 14:53:33 +020084 # Basically, don't add stuff here. You might break sensitive downstream
85 # targets like pnacl. API should not depend on anything, really. All these
86 # should go away, in time.
87 ":optional",
hbos74e1a4f2016-09-15 23:33:01 -070088 ":rtc_stats_api",
kjellander8a116632017-04-21 05:17:08 -070089 "..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -070090 "../rtc_base:rtc_base",
91 "../rtc_base:rtc_base_approved",
kjellander8a116632017-04-21 05:17:08 -070092 "audio_codecs:audio_codecs_api",
kjellanderc76dc952016-06-03 03:09:32 -070093 ]
kjellander8a116632017-04-21 05:17:08 -070094
95 # This is needed until bugs.webrtc.org/7504 is removed so this target can
96 # properly depend on ../media:rtc_media_base
97 # TODO(kjellander): Remove this dependency.
98 if (is_nacl) {
99 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
100 }
ossu7bb87ee2017-01-23 04:56:25 -0800101}
kjellanderc76dc952016-06-03 03:09:32 -0700102
Patrik Höglunde2d6a062017-10-05 14:53:33 +0200103rtc_source_set("peerconnection_and_implicit_call_api") {
104 # The peerconnectioninterface.h file pulls in call/callfactoryinterface.h
105 # and the entire call module with it. We need to either get rid of this
106 # dependency or pull most of call/ into the API. For now, silence the warnings
107 # this creates since it creates a circular dependency (call very much depends
108 # on API). See bugs.webrtc.org/7504.
109 check_includes = false
110 sources = [
111 "peerconnectioninterface.h",
112 ]
113}
114
115rtc_source_set("mediastream_interface_and_implicit_video_frame_api") {
116 # The mediastreaminterface.h file pulls in in video_frame.h, but the
117 # system_wrappers dependency that comes with that breaks pnacl downstream.
118 # TODO(phoglund): solve this (see bugs.webrtc.org/7504).
119 check_includes = false
120 sources = [
121 "mediastreaminterface.h",
122 ]
123}
124
125rtc_source_set("libjingle_api_deprecated_headers") {
126 # We need to include headers from undeclared targets here, since they cause
127 # circular dependencies. These deprecated headers are going away anyway.
128 # See http://bugs.webrtc.org/5883.
129 check_includes = false
130 sources = [
131 "datachannel.h",
132 "mediastream.h",
133 "mediastreamtrack.h",
134 "rtpsender.h",
135 "streamcollection.h",
136 "videotracksource.h",
137 "webrtcsdp.h",
138 ]
139}
140
Elad Alon80810732017-10-06 13:07:32 +0200141rtc_source_set("libjingle_logging_api") {
142 sources = [
143 "rtceventlogoutput.h",
144 ]
145}
146
deadbeefe814a0d2017-02-25 18:15:09 -0800147rtc_source_set("ortc_api") {
148 check_includes = false # TODO(deadbeef): Remove (bugs.webrtc.org/6828)
149 sources = [
zhihuang55adc0e2017-03-10 18:33:45 -0800150 "ortc/mediadescription.cc",
151 "ortc/mediadescription.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800152 "ortc/ortcfactoryinterface.h",
153 "ortc/ortcrtpreceiverinterface.h",
154 "ortc/ortcrtpsenderinterface.h",
155 "ortc/packettransportinterface.h",
156 "ortc/rtptransportcontrollerinterface.h",
157 "ortc/rtptransportinterface.h",
zhihuang55adc0e2017-03-10 18:33:45 -0800158 "ortc/sessiondescription.cc",
159 "ortc/sessiondescription.h",
zhihuangd3501ad2017-03-03 14:39:06 -0800160 "ortc/srtptransportinterface.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800161 "ortc/udptransportinterface.h",
162 ]
163
164 # For mediastreaminterface.h, etc.
165 # TODO(deadbeef): Create a separate target for the common things ORTC and
166 # PeerConnection code shares, so that ortc_api can depend on that instead of
167 # libjingle_peerconnection_api.
168 public_deps = [
169 ":libjingle_peerconnection_api",
170 ]
zhihuang55adc0e2017-03-10 18:33:45 -0800171 if (!build_with_chromium && is_clang) {
172 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
173 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
174 }
deadbeefe814a0d2017-02-25 18:15:09 -0800175}
176
ossu7bb87ee2017-01-23 04:56:25 -0800177# TODO(ossu): Remove once downstream projects have updated.
178rtc_source_set("libjingle_peerconnection") {
ossuda250062017-01-23 07:37:43 -0800179 public_deps = [
ossu7bb87ee2017-01-23 04:56:25 -0800180 "../pc:libjingle_peerconnection",
181 ]
kjellanderc76dc952016-06-03 03:09:32 -0700182}
kjellanderfd5b4e92016-06-13 12:08:33 -0700183
hbos74e1a4f2016-09-15 23:33:01 -0700184rtc_source_set("rtc_stats_api") {
185 cflags = []
186 sources = [
187 "stats/rtcstats.h",
188 "stats/rtcstats_objects.h",
ossu7bb87ee2017-01-23 04:56:25 -0800189 "stats/rtcstatscollectorcallback.h",
hbos74e1a4f2016-09-15 23:33:01 -0700190 "stats/rtcstatsreport.h",
191 ]
192
193 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700194 "../rtc_base:rtc_base_approved",
hbos74e1a4f2016-09-15 23:33:01 -0700195 ]
196}
197
aleloi201dfe92016-10-20 05:06:39 -0700198rtc_source_set("audio_mixer_api") {
199 sources = [
200 "audio/audio_mixer.h",
201 ]
202
203 deps = [
mbonadei1140f972017-04-26 03:38:35 -0700204 "../modules:module_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700205 "../rtc_base:rtc_base_approved",
aleloi201dfe92016-10-20 05:06:39 -0700206 ]
207}
208
aleloia8eb7562016-11-28 07:02:13 -0800209rtc_source_set("transport_api") {
210 sources = [
211 "call/transport.h",
212 ]
213}
nisseb2250e52016-12-02 04:01:14 -0800214
215rtc_source_set("video_frame_api") {
216 sources = [
nisseaf916892017-01-10 07:44:26 -0800217 "video/i420_buffer.cc",
218 "video/i420_buffer.h",
ilnik6d5b4d62017-08-30 03:32:14 -0700219 "video/video_content_type.cc",
220 "video/video_content_type.h",
nisseaf916892017-01-10 07:44:26 -0800221 "video/video_frame.cc",
222 "video/video_frame.h",
magjed712338e2017-05-11 05:11:57 -0700223 "video/video_frame_buffer.cc",
nisseaf916892017-01-10 07:44:26 -0800224 "video/video_frame_buffer.h",
nisseb2250e52016-12-02 04:01:14 -0800225 "video/video_rotation.h",
ilnik2edc6842017-07-06 03:06:50 -0700226 "video/video_timing.cc",
ilnik04f4d122017-06-19 07:18:55 -0700227 "video/video_timing.h",
nisseb2250e52016-12-02 04:01:14 -0800228 ]
229
230 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700231 "../rtc_base:rtc_base_approved",
nisseaf916892017-01-10 07:44:26 -0800232 "../system_wrappers",
nisseb2250e52016-12-02 04:01:14 -0800233 ]
234
235 # TODO(nisse): This logic is duplicated in multiple places.
236 # Define in a single place.
237 if (rtc_build_libyuv) {
238 deps += [ "$rtc_libyuv_dir" ]
239 public_deps = [
240 "$rtc_libyuv_dir",
241 ]
242 } else {
243 # Need to add a directory normally exported by libyuv.
244 include_dirs = [ "$rtc_libyuv_dir/include" ]
245 }
246}
247
kwiberg529662a2017-09-04 05:43:17 -0700248rtc_source_set("array_view") {
249 sources = [
250 "array_view.h",
251 ]
252 deps = [
253 "../rtc_base:rtc_base_approved",
254 ]
255}
256
kwiberg84f6a3f2017-09-05 08:43:13 -0700257rtc_source_set("optional") {
258 sources = [
259 "optional.cc",
260 "optional.h",
261 ]
262 deps = [
263 ":array_view",
264 "../rtc_base:rtc_base_approved",
265 ]
266}
267
Niels Möller9155e492017-10-23 11:22:30 +0200268rtc_source_set("refcountedbase") {
269 sources = [
270 "refcountedbase.h",
271 ]
272 deps = [
273 "../rtc_base:rtc_base_approved",
274 ]
275}
276
kjellander1993b1d2017-03-06 00:29:21 -0800277rtc_source_set("libjingle_peerconnection_test_api") {
278 testonly = true
279 sources = [
280 "test/fakeconstraints.h",
281 ]
282
283 public_deps = [
284 ":libjingle_peerconnection_api",
285 ]
286
287 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700288 "../rtc_base:rtc_base_approved",
kjellander1993b1d2017-03-06 00:29:21 -0800289 ]
290}
291
kjellanderfd5b4e92016-06-13 12:08:33 -0700292if (rtc_include_tests) {
kjellander2f6af9c2017-03-02 22:26:23 -0800293 rtc_source_set("mock_audio_mixer") {
294 testonly = true
295 sources = [
296 "test/mock_audio_mixer.h",
297 ]
298
299 public_deps = [
300 ":audio_mixer_api",
301 ]
302
303 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700304 "../test:test_support",
kjellander2f6af9c2017-03-02 22:26:23 -0800305 "//testing/gmock",
kjellander2f6af9c2017-03-02 22:26:23 -0800306 ]
307 }
308
Emircan Uysalerdbcac7f2017-10-30 23:10:12 -0700309 rtc_source_set("mock_video_codec_factory") {
310 testonly = true
311 sources = [
312 "test/mock_video_decoder_factory.h",
313 "test/mock_video_encoder_factory.h",
314 ]
315
316 public_deps = [
317 "../api/video_codecs:video_codecs_api",
318 ]
319
320 deps = [
321 "../test:test_support",
322 "//testing/gmock",
323 ]
324 }
325
kjellander2f6af9c2017-03-02 22:26:23 -0800326 rtc_source_set("fakemetricsobserver") {
327 testonly = true
328 sources = [
329 "fakemetricsobserver.cc",
330 "fakemetricsobserver.h",
331 ]
332 deps = [
333 ":libjingle_peerconnection_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700334 "../rtc_base:rtc_base_approved",
kjellander2f6af9c2017-03-02 22:26:23 -0800335 ]
336 if (!build_with_chromium && is_clang) {
337 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
338 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
339 }
340 }
341
deadbeefb5388d72017-02-24 01:17:43 -0800342 rtc_source_set("rtc_api_unittests") {
deadbeef6038e972017-02-16 23:31:33 -0800343 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700344
345 # Skip restricting visibility on mobile platforms since the tests on those
346 # gets additional generated targets which would require many lines here to
347 # cover (which would be confusing to read and hard to maintain).
348 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700349 visibility = [ "..:rtc_unittests" ]
kjellandere0629c02017-04-25 04:04:50 -0700350 }
deadbeef6038e972017-02-16 23:31:33 -0800351 sources = [
kwiberg529662a2017-09-04 05:43:17 -0700352 "array_view_unittest.cc",
kwiberg84f6a3f2017-09-05 08:43:13 -0700353 "optional_unittest.cc",
zhihuang55adc0e2017-03-10 18:33:45 -0800354 "ortc/mediadescription_unittest.cc",
355 "ortc/sessiondescription_unittest.cc",
deadbeef6038e972017-02-16 23:31:33 -0800356 "rtcerror_unittest.cc",
Stefan Holmer1acbd682017-09-01 15:29:28 +0200357 "rtpparameters_unittest.cc",
deadbeef6038e972017-02-16 23:31:33 -0800358 ]
359
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 deps = [
kwiberg529662a2017-09-04 05:43:17 -0700366 ":array_view",
deadbeef6038e972017-02-16 23:31:33 -0800367 ":libjingle_peerconnection_api",
kwiberg84f6a3f2017-09-05 08:43:13 -0700368 ":optional",
zhihuang55adc0e2017-03-10 18:33:45 -0800369 ":ortc_api",
kwiberg529662a2017-09-04 05:43:17 -0700370 "../rtc_base:rtc_base_approved",
371 "../rtc_base:rtc_base_tests_utils",
jianjun.zhuc0247402017-07-11 06:20:45 -0700372 "../test:test_support",
deadbeef6038e972017-02-16 23:31:33 -0800373 ]
deadbeef6038e972017-02-16 23:31:33 -0800374 }
kjellanderfd5b4e92016-06-13 12:08:33 -0700375}