blob: a2c36acd788b1d275847596f3349f053f88441a0 [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",
ossu7bb87ee2017-01-23 04:56:25 -080064 "umametrics.h",
kjellanderc76dc952016-06-03 03:09:32 -070065 "videosourceproxy.h",
kjellanderc76dc952016-06-03 03:09:32 -070066 ]
67
kjellandere40a7ee2016-10-16 23:56:12 -070068 if (!build_with_chromium && is_clang) {
kjellanderfd5b4e92016-06-13 12:08:33 -070069 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070070 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -070071 }
72
Patrik Höglunde2d6a062017-10-05 14:53:33 +020073 public_deps = [
74 ":libjingle_api_deprecated_headers",
75 ":mediastream_interface_and_implicit_video_frame_api",
76 ":peerconnection_and_implicit_call_api",
77 ]
78
kjellanderc76dc952016-06-03 03:09:32 -070079 deps = [
Patrik Höglunde2d6a062017-10-05 14:53:33 +020080 # Basically, don't add stuff here. You might break sensitive downstream
81 # targets like pnacl. API should not depend on anything, really. All these
82 # should go away, in time.
83 ":optional",
hbos74e1a4f2016-09-15 23:33:01 -070084 ":rtc_stats_api",
kjellander8a116632017-04-21 05:17:08 -070085 "..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -070086 "../rtc_base:rtc_base",
87 "../rtc_base:rtc_base_approved",
kjellander8a116632017-04-21 05:17:08 -070088 "audio_codecs:audio_codecs_api",
kjellanderc76dc952016-06-03 03:09:32 -070089 ]
kjellander8a116632017-04-21 05:17:08 -070090
91 # This is needed until bugs.webrtc.org/7504 is removed so this target can
92 # properly depend on ../media:rtc_media_base
93 # TODO(kjellander): Remove this dependency.
94 if (is_nacl) {
95 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
96 }
ossu7bb87ee2017-01-23 04:56:25 -080097}
kjellanderc76dc952016-06-03 03:09:32 -070098
Patrik Höglunde2d6a062017-10-05 14:53:33 +020099rtc_source_set("peerconnection_and_implicit_call_api") {
100 # The peerconnectioninterface.h file pulls in call/callfactoryinterface.h
101 # and the entire call module with it. We need to either get rid of this
102 # dependency or pull most of call/ into the API. For now, silence the warnings
103 # this creates since it creates a circular dependency (call very much depends
104 # on API). See bugs.webrtc.org/7504.
105 check_includes = false
106 sources = [
107 "peerconnectioninterface.h",
108 ]
109}
110
111rtc_source_set("mediastream_interface_and_implicit_video_frame_api") {
112 # The mediastreaminterface.h file pulls in in video_frame.h, but the
113 # system_wrappers dependency that comes with that breaks pnacl downstream.
114 # TODO(phoglund): solve this (see bugs.webrtc.org/7504).
115 check_includes = false
116 sources = [
117 "mediastreaminterface.h",
118 ]
119}
120
121rtc_source_set("libjingle_api_deprecated_headers") {
122 # We need to include headers from undeclared targets here, since they cause
123 # circular dependencies. These deprecated headers are going away anyway.
124 # See http://bugs.webrtc.org/5883.
125 check_includes = false
126 sources = [
127 "datachannel.h",
128 "mediastream.h",
129 "mediastreamtrack.h",
130 "rtpsender.h",
131 "streamcollection.h",
132 "videotracksource.h",
133 "webrtcsdp.h",
134 ]
135}
136
Elad Alon80810732017-10-06 13:07:32 +0200137rtc_source_set("libjingle_logging_api") {
138 sources = [
139 "rtceventlogoutput.h",
140 ]
141}
142
deadbeefe814a0d2017-02-25 18:15:09 -0800143rtc_source_set("ortc_api") {
144 check_includes = false # TODO(deadbeef): Remove (bugs.webrtc.org/6828)
145 sources = [
zhihuang55adc0e2017-03-10 18:33:45 -0800146 "ortc/mediadescription.cc",
147 "ortc/mediadescription.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800148 "ortc/ortcfactoryinterface.h",
149 "ortc/ortcrtpreceiverinterface.h",
150 "ortc/ortcrtpsenderinterface.h",
151 "ortc/packettransportinterface.h",
152 "ortc/rtptransportcontrollerinterface.h",
153 "ortc/rtptransportinterface.h",
zhihuang55adc0e2017-03-10 18:33:45 -0800154 "ortc/sessiondescription.cc",
155 "ortc/sessiondescription.h",
zhihuangd3501ad2017-03-03 14:39:06 -0800156 "ortc/srtptransportinterface.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800157 "ortc/udptransportinterface.h",
158 ]
159
160 # For mediastreaminterface.h, etc.
161 # TODO(deadbeef): Create a separate target for the common things ORTC and
162 # PeerConnection code shares, so that ortc_api can depend on that instead of
163 # libjingle_peerconnection_api.
164 public_deps = [
165 ":libjingle_peerconnection_api",
166 ]
zhihuang55adc0e2017-03-10 18:33:45 -0800167 if (!build_with_chromium && is_clang) {
168 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
169 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
170 }
deadbeefe814a0d2017-02-25 18:15:09 -0800171}
172
ossu7bb87ee2017-01-23 04:56:25 -0800173# TODO(ossu): Remove once downstream projects have updated.
174rtc_source_set("libjingle_peerconnection") {
ossuda250062017-01-23 07:37:43 -0800175 public_deps = [
ossu7bb87ee2017-01-23 04:56:25 -0800176 "../pc:libjingle_peerconnection",
177 ]
kjellanderc76dc952016-06-03 03:09:32 -0700178}
kjellanderfd5b4e92016-06-13 12:08:33 -0700179
hbos74e1a4f2016-09-15 23:33:01 -0700180rtc_source_set("rtc_stats_api") {
181 cflags = []
182 sources = [
183 "stats/rtcstats.h",
184 "stats/rtcstats_objects.h",
ossu7bb87ee2017-01-23 04:56:25 -0800185 "stats/rtcstatscollectorcallback.h",
hbos74e1a4f2016-09-15 23:33:01 -0700186 "stats/rtcstatsreport.h",
187 ]
188
189 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700190 "../rtc_base:rtc_base_approved",
hbos74e1a4f2016-09-15 23:33:01 -0700191 ]
192}
193
aleloi201dfe92016-10-20 05:06:39 -0700194rtc_source_set("audio_mixer_api") {
195 sources = [
196 "audio/audio_mixer.h",
197 ]
198
199 deps = [
mbonadei1140f972017-04-26 03:38:35 -0700200 "../modules:module_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700201 "../rtc_base:rtc_base_approved",
aleloi201dfe92016-10-20 05:06:39 -0700202 ]
203}
204
aleloia8eb7562016-11-28 07:02:13 -0800205rtc_source_set("transport_api") {
206 sources = [
207 "call/transport.h",
208 ]
209}
nisseb2250e52016-12-02 04:01:14 -0800210
211rtc_source_set("video_frame_api") {
212 sources = [
nisseaf916892017-01-10 07:44:26 -0800213 "video/i420_buffer.cc",
214 "video/i420_buffer.h",
ilnik6d5b4d62017-08-30 03:32:14 -0700215 "video/video_content_type.cc",
216 "video/video_content_type.h",
nisseaf916892017-01-10 07:44:26 -0800217 "video/video_frame.cc",
218 "video/video_frame.h",
magjed712338e2017-05-11 05:11:57 -0700219 "video/video_frame_buffer.cc",
nisseaf916892017-01-10 07:44:26 -0800220 "video/video_frame_buffer.h",
nisseb2250e52016-12-02 04:01:14 -0800221 "video/video_rotation.h",
ilnik2edc6842017-07-06 03:06:50 -0700222 "video/video_timing.cc",
ilnik04f4d122017-06-19 07:18:55 -0700223 "video/video_timing.h",
nisseb2250e52016-12-02 04:01:14 -0800224 ]
225
226 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700227 "../rtc_base:rtc_base_approved",
nisseaf916892017-01-10 07:44:26 -0800228 "../system_wrappers",
nisseb2250e52016-12-02 04:01:14 -0800229 ]
230
231 # TODO(nisse): This logic is duplicated in multiple places.
232 # Define in a single place.
233 if (rtc_build_libyuv) {
234 deps += [ "$rtc_libyuv_dir" ]
235 public_deps = [
236 "$rtc_libyuv_dir",
237 ]
238 } else {
239 # Need to add a directory normally exported by libyuv.
240 include_dirs = [ "$rtc_libyuv_dir/include" ]
241 }
242}
243
kwiberg529662a2017-09-04 05:43:17 -0700244rtc_source_set("array_view") {
245 sources = [
246 "array_view.h",
247 ]
248 deps = [
249 "../rtc_base:rtc_base_approved",
250 ]
251}
252
kwiberg84f6a3f2017-09-05 08:43:13 -0700253rtc_source_set("optional") {
254 sources = [
255 "optional.cc",
256 "optional.h",
257 ]
258 deps = [
259 ":array_view",
260 "../rtc_base:rtc_base_approved",
261 ]
262}
263
kjellander1993b1d2017-03-06 00:29:21 -0800264rtc_source_set("libjingle_peerconnection_test_api") {
265 testonly = true
266 sources = [
267 "test/fakeconstraints.h",
268 ]
269
270 public_deps = [
271 ":libjingle_peerconnection_api",
272 ]
273
274 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700275 "../rtc_base:rtc_base_approved",
kjellander1993b1d2017-03-06 00:29:21 -0800276 ]
277}
278
kjellanderfd5b4e92016-06-13 12:08:33 -0700279if (rtc_include_tests) {
kjellander2f6af9c2017-03-02 22:26:23 -0800280 rtc_source_set("mock_audio_mixer") {
281 testonly = true
282 sources = [
283 "test/mock_audio_mixer.h",
284 ]
285
286 public_deps = [
287 ":audio_mixer_api",
288 ]
289
290 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700291 "../test:test_support",
kjellander2f6af9c2017-03-02 22:26:23 -0800292 "//testing/gmock",
kjellander2f6af9c2017-03-02 22:26:23 -0800293 ]
294 }
295
kjellander2f6af9c2017-03-02 22:26:23 -0800296 rtc_source_set("fakemetricsobserver") {
297 testonly = true
298 sources = [
299 "fakemetricsobserver.cc",
300 "fakemetricsobserver.h",
301 ]
302 deps = [
303 ":libjingle_peerconnection_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700304 "../rtc_base:rtc_base_approved",
kjellander2f6af9c2017-03-02 22:26:23 -0800305 ]
306 if (!build_with_chromium && is_clang) {
307 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
308 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
309 }
310 }
311
deadbeefb5388d72017-02-24 01:17:43 -0800312 rtc_source_set("rtc_api_unittests") {
deadbeef6038e972017-02-16 23:31:33 -0800313 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700314
315 # Skip restricting visibility on mobile platforms since the tests on those
316 # gets additional generated targets which would require many lines here to
317 # cover (which would be confusing to read and hard to maintain).
318 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700319 visibility = [ "..:rtc_unittests" ]
kjellandere0629c02017-04-25 04:04:50 -0700320 }
deadbeef6038e972017-02-16 23:31:33 -0800321 sources = [
kwiberg529662a2017-09-04 05:43:17 -0700322 "array_view_unittest.cc",
kwiberg84f6a3f2017-09-05 08:43:13 -0700323 "optional_unittest.cc",
zhihuang55adc0e2017-03-10 18:33:45 -0800324 "ortc/mediadescription_unittest.cc",
325 "ortc/sessiondescription_unittest.cc",
deadbeef6038e972017-02-16 23:31:33 -0800326 "rtcerror_unittest.cc",
Stefan Holmer1acbd682017-09-01 15:29:28 +0200327 "rtpparameters_unittest.cc",
deadbeef6038e972017-02-16 23:31:33 -0800328 ]
329
330 if (!build_with_chromium && is_clang) {
331 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
332 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
333 }
334
335 deps = [
kwiberg529662a2017-09-04 05:43:17 -0700336 ":array_view",
deadbeef6038e972017-02-16 23:31:33 -0800337 ":libjingle_peerconnection_api",
kwiberg84f6a3f2017-09-05 08:43:13 -0700338 ":optional",
zhihuang55adc0e2017-03-10 18:33:45 -0800339 ":ortc_api",
kwiberg529662a2017-09-04 05:43:17 -0700340 "../rtc_base:rtc_base_approved",
341 "../rtc_base:rtc_base_tests_utils",
jianjun.zhuc0247402017-07-11 06:20:45 -0700342 "../test:test_support",
deadbeef6038e972017-02-16 23:31:33 -0800343 ]
deadbeef6038e972017-02-16 23:31:33 -0800344 }
kjellanderfd5b4e92016-06-13 12:08:33 -0700345}