blob: 3fa61a51b16e0936c254f96c8ef5a4590a93f956 [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",
31 "../base:rtc_base_approved",
32 "../modules/audio_coding:audio_encoder_interface",
kwiberg087bd342017-02-10 08:15:44 -080033 "audio_codecs:audio_codecs_api",
kjellandera69d9732016-08-31 07:33:05 -070034 ]
35}
36
ossu7bb87ee2017-01-23 04:56:25 -080037rtc_static_library("libjingle_peerconnection_api") {
kjellander8a116632017-04-21 05:17:08 -070038 # Cannot have GN check enabled since that would introduce dependency cycles
39 # TODO(kjellander): Remove (bugs.webrtc.org/7504)
40 check_includes = false
kjellanderc76dc952016-06-03 03:09:32 -070041 cflags = []
42 sources = [
kjellanderc76dc952016-06-03 03:09:32 -070043 "datachannel.h",
44 "datachannelinterface.h",
kjellanderc76dc952016-06-03 03:09:32 -070045 "dtmfsenderinterface.h",
46 "jsep.h",
kjellanderc76dc952016-06-03 03:09:32 -070047 "jsepicecandidate.h",
kjellanderc76dc952016-06-03 03:09:32 -070048 "jsepsessiondescription.h",
kjellanderc76dc952016-06-03 03:09:32 -070049 "mediaconstraintsinterface.cc",
50 "mediaconstraintsinterface.h",
kjellanderc76dc952016-06-03 03:09:32 -070051 "mediacontroller.h",
kjellanderc76dc952016-06-03 03:09:32 -070052 "mediastream.h",
ossu7bb87ee2017-01-23 04:56:25 -080053 "mediastreaminterface.cc",
kjellanderc76dc952016-06-03 03:09:32 -070054 "mediastreaminterface.h",
kjellanderc76dc952016-06-03 03:09:32 -070055 "mediastreamproxy.h",
56 "mediastreamtrack.h",
57 "mediastreamtrackproxy.h",
ossu7bb87ee2017-01-23 04:56:25 -080058 "mediatypes.cc",
59 "mediatypes.h",
kjellanderc76dc952016-06-03 03:09:32 -070060 "notifier.h",
kjellanderc76dc952016-06-03 03:09:32 -070061 "peerconnectionfactoryproxy.h",
62 "peerconnectioninterface.h",
63 "peerconnectionproxy.h",
64 "proxy.h",
deadbeef6038e972017-02-16 23:31:33 -080065 "rtcerror.cc",
66 "rtcerror.h",
kjellanderc76dc952016-06-03 03:09:32 -070067 "rtpparameters.h",
kjellanderc76dc952016-06-03 03:09:32 -070068 "rtpreceiverinterface.h",
kjellanderc76dc952016-06-03 03:09:32 -070069 "rtpsender.h",
70 "rtpsenderinterface.h",
kjellanderc76dc952016-06-03 03:09:32 -070071 "statstypes.cc",
72 "statstypes.h",
73 "streamcollection.h",
ossu7bb87ee2017-01-23 04:56:25 -080074 "umametrics.h",
kjellanderc76dc952016-06-03 03:09:32 -070075 "videosourceproxy.h",
kjellanderc76dc952016-06-03 03:09:32 -070076 "videotracksource.h",
ossua3883102017-01-24 07:13:59 -080077 "webrtcsdp.h",
kjellanderc76dc952016-06-03 03:09:32 -070078 ]
79
kjellandere40a7ee2016-10-16 23:56:12 -070080 if (!build_with_chromium && is_clang) {
kjellanderfd5b4e92016-06-13 12:08:33 -070081 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070082 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -070083 }
84
kjellanderc76dc952016-06-03 03:09:32 -070085 deps = [
hbos74e1a4f2016-09-15 23:33:01 -070086 ":rtc_stats_api",
kjellander8a116632017-04-21 05:17:08 -070087 "..:webrtc_common",
88 "../base:rtc_base",
89 "../base:rtc_base_approved",
90 "audio_codecs:audio_codecs_api",
kjellanderc76dc952016-06-03 03:09:32 -070091 ]
kjellander8a116632017-04-21 05:17:08 -070092
93 # This is needed until bugs.webrtc.org/7504 is removed so this target can
94 # properly depend on ../media:rtc_media_base
95 # TODO(kjellander): Remove this dependency.
96 if (is_nacl) {
97 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
98 }
ossu7bb87ee2017-01-23 04:56:25 -080099}
kjellanderc76dc952016-06-03 03:09:32 -0700100
deadbeefe814a0d2017-02-25 18:15:09 -0800101rtc_source_set("ortc_api") {
102 check_includes = false # TODO(deadbeef): Remove (bugs.webrtc.org/6828)
103 sources = [
zhihuang55adc0e2017-03-10 18:33:45 -0800104 "ortc/mediadescription.cc",
105 "ortc/mediadescription.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800106 "ortc/ortcfactoryinterface.h",
107 "ortc/ortcrtpreceiverinterface.h",
108 "ortc/ortcrtpsenderinterface.h",
109 "ortc/packettransportinterface.h",
110 "ortc/rtptransportcontrollerinterface.h",
111 "ortc/rtptransportinterface.h",
zhihuang55adc0e2017-03-10 18:33:45 -0800112 "ortc/sessiondescription.cc",
113 "ortc/sessiondescription.h",
zhihuangd3501ad2017-03-03 14:39:06 -0800114 "ortc/srtptransportinterface.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800115 "ortc/udptransportinterface.h",
116 ]
117
118 # For mediastreaminterface.h, etc.
119 # TODO(deadbeef): Create a separate target for the common things ORTC and
120 # PeerConnection code shares, so that ortc_api can depend on that instead of
121 # libjingle_peerconnection_api.
122 public_deps = [
123 ":libjingle_peerconnection_api",
124 ]
zhihuang55adc0e2017-03-10 18:33:45 -0800125 if (!build_with_chromium && is_clang) {
126 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
127 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
128 }
deadbeefe814a0d2017-02-25 18:15:09 -0800129}
130
ossu7bb87ee2017-01-23 04:56:25 -0800131# TODO(ossu): Remove once downstream projects have updated.
132rtc_source_set("libjingle_peerconnection") {
ossuda250062017-01-23 07:37:43 -0800133 public_deps = [
ossu7bb87ee2017-01-23 04:56:25 -0800134 "../pc:libjingle_peerconnection",
135 ]
kjellanderc76dc952016-06-03 03:09:32 -0700136}
kjellanderfd5b4e92016-06-13 12:08:33 -0700137
hbos74e1a4f2016-09-15 23:33:01 -0700138rtc_source_set("rtc_stats_api") {
139 cflags = []
140 sources = [
141 "stats/rtcstats.h",
142 "stats/rtcstats_objects.h",
ossu7bb87ee2017-01-23 04:56:25 -0800143 "stats/rtcstatscollectorcallback.h",
hbos74e1a4f2016-09-15 23:33:01 -0700144 "stats/rtcstatsreport.h",
145 ]
146
147 deps = [
148 "../base:rtc_base_approved",
149 ]
150}
151
aleloi201dfe92016-10-20 05:06:39 -0700152rtc_source_set("audio_mixer_api") {
153 sources = [
154 "audio/audio_mixer.h",
155 ]
156
157 deps = [
158 "../base:rtc_base_approved",
mbonadei1140f972017-04-26 03:38:35 -0700159 "../modules:module_api",
aleloi201dfe92016-10-20 05:06:39 -0700160 ]
161}
162
aleloia8eb7562016-11-28 07:02:13 -0800163rtc_source_set("transport_api") {
164 sources = [
165 "call/transport.h",
166 ]
167}
nisseb2250e52016-12-02 04:01:14 -0800168
169rtc_source_set("video_frame_api") {
170 sources = [
nisseaf916892017-01-10 07:44:26 -0800171 "video/i420_buffer.cc",
172 "video/i420_buffer.h",
173 "video/video_frame.cc",
174 "video/video_frame.h",
175 "video/video_frame_buffer.h",
nisseb2250e52016-12-02 04:01:14 -0800176 "video/video_rotation.h",
177 ]
178
179 deps = [
180 "../base:rtc_base_approved",
nisseaf916892017-01-10 07:44:26 -0800181 "../system_wrappers",
nisseb2250e52016-12-02 04:01:14 -0800182 ]
183
184 # TODO(nisse): This logic is duplicated in multiple places.
185 # Define in a single place.
186 if (rtc_build_libyuv) {
187 deps += [ "$rtc_libyuv_dir" ]
188 public_deps = [
189 "$rtc_libyuv_dir",
190 ]
191 } else {
192 # Need to add a directory normally exported by libyuv.
193 include_dirs = [ "$rtc_libyuv_dir/include" ]
194 }
195}
196
kjellander1993b1d2017-03-06 00:29:21 -0800197rtc_source_set("libjingle_peerconnection_test_api") {
198 testonly = true
199 sources = [
200 "test/fakeconstraints.h",
201 ]
202
203 public_deps = [
204 ":libjingle_peerconnection_api",
205 ]
206
207 deps = [
208 "../base:rtc_base_approved",
209 ]
210}
211
kjellanderfd5b4e92016-06-13 12:08:33 -0700212if (rtc_include_tests) {
kjellander2f6af9c2017-03-02 22:26:23 -0800213 rtc_source_set("mock_audio_mixer") {
214 testonly = true
215 sources = [
216 "test/mock_audio_mixer.h",
217 ]
218
219 public_deps = [
220 ":audio_mixer_api",
221 ]
222
223 deps = [
224 "//testing/gmock",
225 "//webrtc/test:test_support",
226 ]
227 }
228
kjellander2f6af9c2017-03-02 22:26:23 -0800229 rtc_source_set("fakemetricsobserver") {
230 testonly = true
231 sources = [
232 "fakemetricsobserver.cc",
233 "fakemetricsobserver.h",
234 ]
235 deps = [
236 ":libjingle_peerconnection_api",
237 "../base:rtc_base_approved",
238 ]
239 if (!build_with_chromium && is_clang) {
240 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
241 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
242 }
243 }
244
deadbeefb5388d72017-02-24 01:17:43 -0800245 rtc_source_set("rtc_api_unittests") {
deadbeef6038e972017-02-16 23:31:33 -0800246 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700247
248 # Skip restricting visibility on mobile platforms since the tests on those
249 # gets additional generated targets which would require many lines here to
250 # cover (which would be confusing to read and hard to maintain).
251 if (!is_android && !is_ios) {
252 visibility = [ "//webrtc:rtc_unittests" ]
253 }
deadbeef6038e972017-02-16 23:31:33 -0800254 sources = [
zhihuang55adc0e2017-03-10 18:33:45 -0800255 "ortc/mediadescription_unittest.cc",
256 "ortc/sessiondescription_unittest.cc",
deadbeef6038e972017-02-16 23:31:33 -0800257 "rtcerror_unittest.cc",
258 ]
259
260 if (!build_with_chromium && is_clang) {
261 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
262 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
263 }
264
265 deps = [
266 ":libjingle_peerconnection_api",
zhihuang55adc0e2017-03-10 18:33:45 -0800267 ":ortc_api",
deadbeefb5388d72017-02-24 01:17:43 -0800268 "//webrtc/test:test_support",
deadbeef6038e972017-02-16 23:31:33 -0800269 ]
deadbeef6038e972017-02-16 23:31:33 -0800270 }
kjellanderfd5b4e92016-06-13 12:08:33 -0700271}