blob: b0822142ea7a9f03f754d6eacde617315d564bec [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 = [
Patrik Höglunde2d6a062017-10-05 14:53:33 +020039 "candidate.h",
kjellanderc76dc952016-06-03 03:09:32 -070040 "datachannelinterface.h",
kjellanderc76dc952016-06-03 03:09:32 -070041 "dtmfsenderinterface.h",
42 "jsep.h",
kjellanderc76dc952016-06-03 03:09:32 -070043 "jsepicecandidate.h",
kjellanderc76dc952016-06-03 03:09:32 -070044 "jsepsessiondescription.h",
kjellanderc76dc952016-06-03 03:09:32 -070045 "mediaconstraintsinterface.cc",
46 "mediaconstraintsinterface.h",
ossu7bb87ee2017-01-23 04:56:25 -080047 "mediastreaminterface.cc",
kjellanderc76dc952016-06-03 03:09:32 -070048 "mediastreamproxy.h",
kjellanderc76dc952016-06-03 03:09:32 -070049 "mediastreamtrackproxy.h",
ossu7bb87ee2017-01-23 04:56:25 -080050 "mediatypes.cc",
51 "mediatypes.h",
kjellanderc76dc952016-06-03 03:09:32 -070052 "notifier.h",
kjellanderc76dc952016-06-03 03:09:32 -070053 "peerconnectionfactoryproxy.h",
kjellanderc76dc952016-06-03 03:09:32 -070054 "peerconnectionproxy.h",
55 "proxy.h",
deadbeef6038e972017-02-16 23:31:33 -080056 "rtcerror.cc",
57 "rtcerror.h",
Stefan Holmer1acbd682017-09-01 15:29:28 +020058 "rtpparameters.cc",
kjellanderc76dc952016-06-03 03:09:32 -070059 "rtpparameters.h",
kjellanderc76dc952016-06-03 03:09:32 -070060 "rtpreceiverinterface.h",
kjellanderc76dc952016-06-03 03:09:32 -070061 "rtpsenderinterface.h",
kjellanderc76dc952016-06-03 03:09:32 -070062 "statstypes.cc",
63 "statstypes.h",
Jonas Orelandbdcee282017-10-10 14:01:40 +020064 "turncustomizer.h",
ossu7bb87ee2017-01-23 04:56:25 -080065 "umametrics.h",
kjellanderc76dc952016-06-03 03:09:32 -070066 "videosourceproxy.h",
kjellanderc76dc952016-06-03 03:09:32 -070067 ]
68
kjellandere40a7ee2016-10-16 23:56:12 -070069 if (!build_with_chromium && is_clang) {
kjellanderfd5b4e92016-06-13 12:08:33 -070070 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070071 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -070072 }
73
Patrik Höglunde2d6a062017-10-05 14:53:33 +020074 public_deps = [
75 ":libjingle_api_deprecated_headers",
76 ":mediastream_interface_and_implicit_video_frame_api",
77 ":peerconnection_and_implicit_call_api",
78 ]
79
kjellanderc76dc952016-06-03 03:09:32 -070080 deps = [
Patrik Höglunde2d6a062017-10-05 14:53:33 +020081 # Basically, don't add stuff here. You might break sensitive downstream
82 # targets like pnacl. API should not depend on anything, really. All these
83 # should go away, in time.
84 ":optional",
hbos74e1a4f2016-09-15 23:33:01 -070085 ":rtc_stats_api",
kjellander8a116632017-04-21 05:17:08 -070086 "..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -070087 "../rtc_base:rtc_base",
88 "../rtc_base:rtc_base_approved",
kjellander8a116632017-04-21 05:17:08 -070089 "audio_codecs:audio_codecs_api",
kjellanderc76dc952016-06-03 03:09:32 -070090 ]
kjellander8a116632017-04-21 05:17:08 -070091
92 # This is needed until bugs.webrtc.org/7504 is removed so this target can
93 # properly depend on ../media:rtc_media_base
94 # TODO(kjellander): Remove this dependency.
95 if (is_nacl) {
96 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
97 }
ossu7bb87ee2017-01-23 04:56:25 -080098}
kjellanderc76dc952016-06-03 03:09:32 -070099
Patrik Höglunde2d6a062017-10-05 14:53:33 +0200100rtc_source_set("peerconnection_and_implicit_call_api") {
101 # The peerconnectioninterface.h file pulls in call/callfactoryinterface.h
102 # and the entire call module with it. We need to either get rid of this
103 # dependency or pull most of call/ into the API. For now, silence the warnings
104 # this creates since it creates a circular dependency (call very much depends
105 # on API). See bugs.webrtc.org/7504.
106 check_includes = false
107 sources = [
108 "peerconnectioninterface.h",
109 ]
110}
111
112rtc_source_set("mediastream_interface_and_implicit_video_frame_api") {
113 # The mediastreaminterface.h file pulls in in video_frame.h, but the
114 # system_wrappers dependency that comes with that breaks pnacl downstream.
115 # TODO(phoglund): solve this (see bugs.webrtc.org/7504).
116 check_includes = false
117 sources = [
118 "mediastreaminterface.h",
119 ]
120}
121
122rtc_source_set("libjingle_api_deprecated_headers") {
123 # We need to include headers from undeclared targets here, since they cause
124 # circular dependencies. These deprecated headers are going away anyway.
125 # See http://bugs.webrtc.org/5883.
126 check_includes = false
127 sources = [
128 "datachannel.h",
129 "mediastream.h",
130 "mediastreamtrack.h",
131 "rtpsender.h",
132 "streamcollection.h",
133 "videotracksource.h",
134 "webrtcsdp.h",
135 ]
136}
137
Elad Alon80810732017-10-06 13:07:32 +0200138rtc_source_set("libjingle_logging_api") {
139 sources = [
140 "rtceventlogoutput.h",
141 ]
142}
143
deadbeefe814a0d2017-02-25 18:15:09 -0800144rtc_source_set("ortc_api") {
145 check_includes = false # TODO(deadbeef): Remove (bugs.webrtc.org/6828)
146 sources = [
zhihuang55adc0e2017-03-10 18:33:45 -0800147 "ortc/mediadescription.cc",
148 "ortc/mediadescription.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800149 "ortc/ortcfactoryinterface.h",
150 "ortc/ortcrtpreceiverinterface.h",
151 "ortc/ortcrtpsenderinterface.h",
152 "ortc/packettransportinterface.h",
153 "ortc/rtptransportcontrollerinterface.h",
154 "ortc/rtptransportinterface.h",
zhihuang55adc0e2017-03-10 18:33:45 -0800155 "ortc/sessiondescription.cc",
156 "ortc/sessiondescription.h",
zhihuangd3501ad2017-03-03 14:39:06 -0800157 "ortc/srtptransportinterface.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800158 "ortc/udptransportinterface.h",
159 ]
160
161 # For mediastreaminterface.h, etc.
162 # TODO(deadbeef): Create a separate target for the common things ORTC and
163 # PeerConnection code shares, so that ortc_api can depend on that instead of
164 # libjingle_peerconnection_api.
165 public_deps = [
166 ":libjingle_peerconnection_api",
167 ]
zhihuang55adc0e2017-03-10 18:33:45 -0800168 if (!build_with_chromium && is_clang) {
169 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
170 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
171 }
deadbeefe814a0d2017-02-25 18:15:09 -0800172}
173
ossu7bb87ee2017-01-23 04:56:25 -0800174# TODO(ossu): Remove once downstream projects have updated.
175rtc_source_set("libjingle_peerconnection") {
ossuda250062017-01-23 07:37:43 -0800176 public_deps = [
ossu7bb87ee2017-01-23 04:56:25 -0800177 "../pc:libjingle_peerconnection",
178 ]
kjellanderc76dc952016-06-03 03:09:32 -0700179}
kjellanderfd5b4e92016-06-13 12:08:33 -0700180
hbos74e1a4f2016-09-15 23:33:01 -0700181rtc_source_set("rtc_stats_api") {
182 cflags = []
183 sources = [
184 "stats/rtcstats.h",
185 "stats/rtcstats_objects.h",
ossu7bb87ee2017-01-23 04:56:25 -0800186 "stats/rtcstatscollectorcallback.h",
hbos74e1a4f2016-09-15 23:33:01 -0700187 "stats/rtcstatsreport.h",
188 ]
189
190 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700191 "../rtc_base:rtc_base_approved",
hbos74e1a4f2016-09-15 23:33:01 -0700192 ]
193}
194
aleloi201dfe92016-10-20 05:06:39 -0700195rtc_source_set("audio_mixer_api") {
196 sources = [
197 "audio/audio_mixer.h",
198 ]
199
200 deps = [
mbonadei1140f972017-04-26 03:38:35 -0700201 "../modules:module_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700202 "../rtc_base:rtc_base_approved",
aleloi201dfe92016-10-20 05:06:39 -0700203 ]
204}
205
aleloia8eb7562016-11-28 07:02:13 -0800206rtc_source_set("transport_api") {
207 sources = [
208 "call/transport.h",
209 ]
210}
nisseb2250e52016-12-02 04:01:14 -0800211
212rtc_source_set("video_frame_api") {
213 sources = [
nisseaf916892017-01-10 07:44:26 -0800214 "video/i420_buffer.cc",
215 "video/i420_buffer.h",
ilnik6d5b4d62017-08-30 03:32:14 -0700216 "video/video_content_type.cc",
217 "video/video_content_type.h",
nisseaf916892017-01-10 07:44:26 -0800218 "video/video_frame.cc",
219 "video/video_frame.h",
magjed712338e2017-05-11 05:11:57 -0700220 "video/video_frame_buffer.cc",
nisseaf916892017-01-10 07:44:26 -0800221 "video/video_frame_buffer.h",
nisseb2250e52016-12-02 04:01:14 -0800222 "video/video_rotation.h",
ilnik2edc6842017-07-06 03:06:50 -0700223 "video/video_timing.cc",
ilnik04f4d122017-06-19 07:18:55 -0700224 "video/video_timing.h",
nisseb2250e52016-12-02 04:01:14 -0800225 ]
226
227 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700228 "../rtc_base:rtc_base_approved",
nisseaf916892017-01-10 07:44:26 -0800229 "../system_wrappers",
nisseb2250e52016-12-02 04:01:14 -0800230 ]
231
232 # TODO(nisse): This logic is duplicated in multiple places.
233 # Define in a single place.
234 if (rtc_build_libyuv) {
235 deps += [ "$rtc_libyuv_dir" ]
236 public_deps = [
237 "$rtc_libyuv_dir",
238 ]
239 } else {
240 # Need to add a directory normally exported by libyuv.
241 include_dirs = [ "$rtc_libyuv_dir/include" ]
242 }
243}
244
kwiberg529662a2017-09-04 05:43:17 -0700245rtc_source_set("array_view") {
246 sources = [
247 "array_view.h",
248 ]
249 deps = [
250 "../rtc_base:rtc_base_approved",
251 ]
252}
253
kwiberg84f6a3f2017-09-05 08:43:13 -0700254rtc_source_set("optional") {
255 sources = [
256 "optional.cc",
257 "optional.h",
258 ]
259 deps = [
260 ":array_view",
261 "../rtc_base:rtc_base_approved",
262 ]
263}
264
Niels Möller9155e492017-10-23 11:22:30 +0200265rtc_source_set("refcountedbase") {
266 sources = [
267 "refcountedbase.h",
268 ]
269 deps = [
270 "../rtc_base:rtc_base_approved",
271 ]
272}
273
kjellander1993b1d2017-03-06 00:29:21 -0800274rtc_source_set("libjingle_peerconnection_test_api") {
275 testonly = true
276 sources = [
277 "test/fakeconstraints.h",
278 ]
279
280 public_deps = [
281 ":libjingle_peerconnection_api",
282 ]
283
284 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700285 "../rtc_base:rtc_base_approved",
kjellander1993b1d2017-03-06 00:29:21 -0800286 ]
287}
288
kjellanderfd5b4e92016-06-13 12:08:33 -0700289if (rtc_include_tests) {
kjellander2f6af9c2017-03-02 22:26:23 -0800290 rtc_source_set("mock_audio_mixer") {
291 testonly = true
292 sources = [
293 "test/mock_audio_mixer.h",
294 ]
295
296 public_deps = [
297 ":audio_mixer_api",
298 ]
299
300 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700301 "../test:test_support",
kjellander2f6af9c2017-03-02 22:26:23 -0800302 "//testing/gmock",
kjellander2f6af9c2017-03-02 22:26:23 -0800303 ]
304 }
305
kjellander2f6af9c2017-03-02 22:26:23 -0800306 rtc_source_set("fakemetricsobserver") {
307 testonly = true
308 sources = [
309 "fakemetricsobserver.cc",
310 "fakemetricsobserver.h",
311 ]
312 deps = [
313 ":libjingle_peerconnection_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700314 "../rtc_base:rtc_base_approved",
kjellander2f6af9c2017-03-02 22:26:23 -0800315 ]
316 if (!build_with_chromium && is_clang) {
317 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
318 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
319 }
320 }
321
deadbeefb5388d72017-02-24 01:17:43 -0800322 rtc_source_set("rtc_api_unittests") {
deadbeef6038e972017-02-16 23:31:33 -0800323 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700324
325 # Skip restricting visibility on mobile platforms since the tests on those
326 # gets additional generated targets which would require many lines here to
327 # cover (which would be confusing to read and hard to maintain).
328 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700329 visibility = [ "..:rtc_unittests" ]
kjellandere0629c02017-04-25 04:04:50 -0700330 }
deadbeef6038e972017-02-16 23:31:33 -0800331 sources = [
kwiberg529662a2017-09-04 05:43:17 -0700332 "array_view_unittest.cc",
kwiberg84f6a3f2017-09-05 08:43:13 -0700333 "optional_unittest.cc",
zhihuang55adc0e2017-03-10 18:33:45 -0800334 "ortc/mediadescription_unittest.cc",
335 "ortc/sessiondescription_unittest.cc",
deadbeef6038e972017-02-16 23:31:33 -0800336 "rtcerror_unittest.cc",
Stefan Holmer1acbd682017-09-01 15:29:28 +0200337 "rtpparameters_unittest.cc",
deadbeef6038e972017-02-16 23:31:33 -0800338 ]
339
340 if (!build_with_chromium && is_clang) {
341 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
342 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
343 }
344
345 deps = [
kwiberg529662a2017-09-04 05:43:17 -0700346 ":array_view",
deadbeef6038e972017-02-16 23:31:33 -0800347 ":libjingle_peerconnection_api",
kwiberg84f6a3f2017-09-05 08:43:13 -0700348 ":optional",
zhihuang55adc0e2017-03-10 18:33:45 -0800349 ":ortc_api",
kwiberg529662a2017-09-04 05:43:17 -0700350 "../rtc_base:rtc_base_approved",
351 "../rtc_base:rtc_base_tests_utils",
jianjun.zhuc0247402017-07-11 06:20:45 -0700352 "../test:test_support",
deadbeef6038e972017-02-16 23:31:33 -0800353 ]
deadbeef6038e972017-02-16 23:31:33 -0800354 }
kjellanderfd5b4e92016-06-13 12:08:33 -0700355}