blob: 5ffd96477fcb0dc7af88f6f0d60770b1771f70bb [file] [log] [blame]
tkchin9eeb6242016-04-27 01:54:20 -07001# Copyright 2016 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")
kthelgasonebc34e72016-09-15 04:30:18 -070010if (is_ios) {
oprypin45197522017-06-22 01:47:20 -070011 import("//build/config/ios/ios_sdk.gni")
Mirko Bonadei2ff3f492018-11-22 09:00:13 +010012 import("//build/config/ios/rules.gni")
kthelgasonebc34e72016-09-15 04:30:18 -070013}
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020014if (is_mac) {
15 import("//build/config/mac/rules.gni")
kthelgason2f088792017-05-30 01:48:47 -070016}
17
kjellander6ceab082016-10-28 05:44:03 -070018group("sdk") {
Henrik Kjellandera7d0df72017-06-27 08:56:46 +020019 public_deps = []
20 if (!build_with_chromium) {
21 if (is_android) {
22 public_deps += [ "android" ]
23 }
24 if (is_ios) {
kthelgason36d658d2017-08-24 05:43:45 -070025 public_deps += [ ":framework_objc" ]
Henrik Kjellandera7d0df72017-06-27 08:56:46 +020026 }
kjellander6ceab082016-10-28 05:44:03 -070027 }
28}
29
Niels Möllerdac03d92019-02-13 08:52:27 +010030rtc_source_set("media_constraints") {
31 sources = [
32 "media_constraints.cc",
33 "media_constraints.h",
34 ]
35 deps = [
36 "../api:audio_options_api",
37 "../api:libjingle_peerconnection_api",
38 "//third_party/abseil-cpp/absl/types:optional",
39 ]
40}
41
42rtc_source_set("sdk_tests") {
43 testonly = true
44 sources = [
45 "media_constraints_unittest.cc",
46 ]
47 deps = [
48 ":media_constraints",
49 "../test:test_support",
50 ]
51}
52
kthelgasoncc2d1c62016-11-09 07:44:27 -080053if (is_ios || is_mac) {
kthelgason36d658d2017-08-24 05:43:45 -070054 config("common_config_objc") {
kjellander080a1e32016-05-25 11:37:11 -070055 include_dirs = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020056 "objc",
57
58 # This is needed so that framework headers can include base headers
59 # without pathname (so it works from within the framework module).
60 "objc/base",
61
62 # This is here for backward compatiblity reasons.
63 "objc/Framework/Headers", # TODO(bugs.webrtc.org/9627): Remove this.
kjellander080a1e32016-05-25 11:37:11 -070064 ]
Kári Tristan Helgason47d3a012017-10-24 15:28:51 +020065 cflags = [
Jiawei Ou4aeb35b2018-11-09 13:55:45 -080066 "-Wimplicit-retain-self",
Kári Tristan Helgason47d3a012017-10-24 15:28:51 +020067 "-Wstrict-overflow",
68 "-Wmissing-field-initializers",
69 ]
Artem Titarenko17ad64e2018-09-19 17:53:59 +020070
71 if (use_clang_coverage) {
72 configs = [ "//build/config/coverage:default_coverage" ]
73 }
kjellander080a1e32016-05-25 11:37:11 -070074 }
75
Anders Carlsson358f2e02018-06-04 10:24:37 +020076 config("used_from_extension") {
77 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
78 cflags = [ "-fapplication-extension" ]
79 }
80 }
81
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020082 # TODO(bugs.webrtc.org/9627): Remove this when unused. Targets should depend on base_objc
83 # or helpers_objc directly instead.
kthelgason36d658d2017-08-24 05:43:45 -070084 rtc_static_library("common_objc") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +020085 visibility = [ "*" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020086
tkchin9eeb6242016-04-27 01:54:20 -070087 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020088 "objc/helpers/noop.mm",
89 ]
90
91 public_configs = [ ":common_config_objc" ]
92
93 deps = [
94 ":base_objc",
95 ":helpers_objc",
96 ]
97 }
98
99 rtc_static_library("base_objc") {
100 visibility = [ "*" ]
101 sources = [
102 "objc/base/RTCCodecSpecificInfo.h",
103 "objc/base/RTCEncodedImage.h",
104 "objc/base/RTCEncodedImage.m",
105 "objc/base/RTCI420Buffer.h",
106 "objc/base/RTCLogging.h",
107 "objc/base/RTCLogging.mm",
108 "objc/base/RTCMacros.h",
109 "objc/base/RTCMutableI420Buffer.h",
110 "objc/base/RTCMutableYUVPlanarBuffer.h",
111 "objc/base/RTCRtpFragmentationHeader.h",
112 "objc/base/RTCRtpFragmentationHeader.m",
113 "objc/base/RTCVideoCapturer.h",
114 "objc/base/RTCVideoCapturer.m",
115 "objc/base/RTCVideoCodecInfo.h",
116 "objc/base/RTCVideoCodecInfo.m",
117 "objc/base/RTCVideoDecoder.h",
118 "objc/base/RTCVideoDecoderFactory.h",
119 "objc/base/RTCVideoEncoder.h",
120 "objc/base/RTCVideoEncoderFactory.h",
121 "objc/base/RTCVideoEncoderQpThresholds.h",
122 "objc/base/RTCVideoEncoderQpThresholds.m",
123 "objc/base/RTCVideoEncoderSettings.h",
124 "objc/base/RTCVideoEncoderSettings.m",
125 "objc/base/RTCVideoFrame.h",
126 "objc/base/RTCVideoFrame.mm",
127 "objc/base/RTCVideoFrameBuffer.h",
128 "objc/base/RTCVideoRenderer.h",
129 "objc/base/RTCYUVPlanarBuffer.h",
tkchin9eeb6242016-04-27 01:54:20 -0700130 ]
denicijad2088152017-04-28 02:14:54 -0700131
mbonadei1e060c62017-04-21 00:02:02 -0700132 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100133 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700134 "../rtc_base:rtc_base",
mbonadei1e060c62017-04-21 00:02:02 -0700135 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200136 configs += [
137 "..:common_objc",
138 ":used_from_extension",
139 ]
kthelgasonc0977102017-04-24 00:57:16 -0700140
kthelgason36d658d2017-08-24 05:43:45 -0700141 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200142 }
143
144 rtc_static_library("helpers_objc") {
145 sources = [
146 "objc/helpers/AVCaptureSession+DevicePosition.h",
147 "objc/helpers/AVCaptureSession+DevicePosition.mm",
148 "objc/helpers/NSString+StdString.h",
149 "objc/helpers/NSString+StdString.mm",
150 "objc/helpers/RTCDispatcher+Private.h",
151 "objc/helpers/RTCDispatcher.h",
152 "objc/helpers/RTCDispatcher.m",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200153 "objc/helpers/scoped_cftyperef.h",
154 ]
155
156 deps = [
157 ":base_objc",
158 "../rtc_base:checks",
159 ]
160
161 libs = [
162 "AVFoundation.framework",
163 "CoreMedia.framework",
164 ]
165
166 configs += [
167 "..:common_objc",
168 ":used_from_extension",
169 ]
170
171 public_configs = [ ":common_config_objc" ]
denicijad2088152017-04-28 02:14:54 -0700172
kjellander3bcedd32016-06-08 01:14:15 -0700173 if (is_ios) {
174 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200175 "objc/helpers/RTCCameraPreviewView.h",
176 "objc/helpers/RTCCameraPreviewView.m",
177 "objc/helpers/UIDevice+RTCDevice.h",
178 "objc/helpers/UIDevice+RTCDevice.mm",
179 ]
180 }
181 }
182
183 if (!build_with_chromium) {
184 rtc_static_library("callback_logger_objc") {
185 sources = [
186 "objc/api/logging/RTCCallbackLogger.h",
187 "objc/api/logging/RTCCallbackLogger.mm",
188 ]
189
190 deps = [
191 ":base_objc",
192 "../rtc_base:checks",
193 "../rtc_base:logging",
194 "../rtc_base:rtc_base",
195 ]
196
197 configs += [
198 "..:common_objc",
199 ":used_from_extension",
kjellander3bcedd32016-06-08 01:14:15 -0700200 ]
denicijad2088152017-04-28 02:14:54 -0700201 }
202
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200203 rtc_static_library("file_logger_objc") {
204 sources = [
205 "objc/api/peerconnection/RTCFileLogger.h",
206 "objc/api/peerconnection/RTCFileLogger.mm",
207 ]
208
209 deps = [
210 ":base_objc",
211 "../rtc_base:checks",
212 "../rtc_base:logging",
213 "../rtc_base:rtc_base",
214 ]
215
216 configs += [
217 "..:common_objc",
218 ":used_from_extension",
kthelgason2f088792017-05-30 01:48:47 -0700219 ]
220 }
221 }
222
mbonadei2c8ac1b2017-05-31 05:14:26 -0700223 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100224 if (is_ios) {
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200225 rtc_static_library("native_api_audio_device_module") {
226 visibility = [ "*" ]
227
228 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200229 "objc/native/api/audio_device_module.h",
230 "objc/native/api/audio_device_module.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200231 ]
232
233 deps = [
234 ":audio_device",
235 "../modules/audio_device:audio_device_api",
236 "../modules/audio_device:audio_device_generic",
237 "../rtc_base:checks",
238 "../rtc_base:rtc_base_approved",
239 "../system_wrappers",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200240 ]
241
242 if (is_clang) {
243 # Suppress warnings from the Chromium Clang plugin
244 # (bugs.webrtc.org/163).
245 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
246 }
247 }
248
249 rtc_source_set("audio_session_observer") {
250 visibility = [ ":*" ]
251
252 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200253 "objc/native/src/audio/audio_session_observer.h",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200254 ]
255
256 deps = [
257 "../rtc_base:rtc_base",
258 ]
259 }
260
261 rtc_static_library("audio_device") {
262 visibility = [ "*" ]
263
264 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200265 "objc/native/src/audio/audio_device_ios.h",
266 "objc/native/src/audio/audio_device_ios.mm",
267 "objc/native/src/audio/audio_device_module_ios.h",
268 "objc/native/src/audio/audio_device_module_ios.mm",
269 "objc/native/src/audio/helpers.h",
270 "objc/native/src/audio/helpers.mm",
271 "objc/native/src/audio/voice_processing_audio_unit.h",
272 "objc/native/src/audio/voice_processing_audio_unit.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200273 ]
274
275 deps = [
276 ":audio_objc",
277 ":audio_session_observer",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200278 ":base_objc",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200279 "../api:array_view",
280 "../modules/audio_device:audio_device_api",
281 "../modules/audio_device:audio_device_buffer",
282 "../modules/audio_device:audio_device_generic",
283 "../rtc_base:checks",
284 "../rtc_base:rtc_base",
285 "../rtc_base/system:fallthrough",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200286 "../system_wrappers:metrics",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200287 ]
288
Jiawei Ouc9e6b962018-10-09 12:33:06 -0700289 libs = [ "AudioToolbox.framework" ]
290
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200291 if (is_clang) {
292 # Suppress warnings from the Chromium Clang plugin
293 # (bugs.webrtc.org/163).
294 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
295 }
296 }
297
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100298 rtc_static_library("audio_objc") {
299 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200300 "objc/components/audio/RTCAudioSession+Configuration.mm",
301 "objc/components/audio/RTCAudioSession+Private.h",
302 "objc/components/audio/RTCAudioSession.h",
303 "objc/components/audio/RTCAudioSession.mm",
304 "objc/components/audio/RTCAudioSessionConfiguration.h",
305 "objc/components/audio/RTCAudioSessionConfiguration.m",
306 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.h",
307 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100308 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200309 configs += [
310 "..:common_objc",
311 ":used_from_extension",
312 ]
denicija59ee91b2017-06-05 05:48:47 -0700313
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100314 public_configs = [ ":common_config_objc" ]
Anders Carlsson8ecfd802017-09-15 14:07:30 +0200315
Jiawei Ouc9e6b962018-10-09 12:33:06 -0700316 libs = [ "AVFoundation.framework" ]
317
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100318 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200319 ":audio_session_observer",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200320 ":base_objc",
321 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100322 "../rtc_base:checks",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200323 "../rtc_base:rtc_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100324 "../rtc_base:rtc_base_approved",
325 ]
denicija59ee91b2017-06-05 05:48:47 -0700326 }
327 }
zhihuanga4c113a2017-06-28 14:05:44 -0700328
Anders Carlsson9823ee42018-03-07 10:32:03 +0100329 rtc_static_library("videosource_objc") {
zhihuanga4c113a2017-06-28 14:05:44 -0700330 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200331 "objc/api/peerconnection/RTCVideoSource+Private.h",
332 "objc/api/peerconnection/RTCVideoSource.h",
333 "objc/api/peerconnection/RTCVideoSource.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700334 ]
335
336 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200337 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100338 ":mediasource_objc",
339 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100340 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700341 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200342 "../api/video:video_frame",
343 "../api/video:video_frame_i420",
zhihuanga4c113a2017-06-28 14:05:44 -0700344 "../common_video",
345 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100346 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700347 "../rtc_base:rtc_base",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100348 "//third_party/libyuv",
zhihuanga4c113a2017-06-28 14:05:44 -0700349 ]
350
Anders Carlsson358f2e02018-06-04 10:24:37 +0200351 configs += [
352 "..:common_objc",
353 ":used_from_extension",
354 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700355 }
356
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100357 rtc_static_library("videoframebuffer_objc") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200358 visibility = [ "*" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100359 sources = [
Anders Carlsson4e5af962018-09-03 14:44:50 +0200360 "objc/api/video_frame_buffer/RTCNativeI420Buffer+Private.h",
361 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
362 "objc/api/video_frame_buffer/RTCNativeI420Buffer.mm",
363 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
364 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200365 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
366 "objc/components/video_frame_buffer/RTCCVPixelBuffer.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100367 ]
368 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200369 ":base_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200370 "//api/video:video_frame",
371 "//api/video:video_frame_i420",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100372 "//common_video",
373 "//rtc_base:checks",
374 "//rtc_base:rtc_base_approved",
375 "//third_party/libyuv",
376 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200377 configs += [
378 "..:common_objc",
379 ":used_from_extension",
380 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100381 }
382
kthelgason36d658d2017-08-24 05:43:45 -0700383 rtc_static_library("video_objc") {
kthelgason2f088792017-05-30 01:48:47 -0700384 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200385 "objc/components/renderer/opengl/RTCDefaultShader.h",
386 "objc/components/renderer/opengl/RTCDefaultShader.mm",
387 "objc/components/renderer/opengl/RTCI420TextureCache.h",
388 "objc/components/renderer/opengl/RTCI420TextureCache.mm",
389 "objc/components/renderer/opengl/RTCOpenGLDefines.h",
390 "objc/components/renderer/opengl/RTCShader.h",
391 "objc/components/renderer/opengl/RTCShader.mm",
392 "objc/components/renderer/opengl/RTCVideoViewShading.h",
kthelgason2f088792017-05-30 01:48:47 -0700393 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700394 libs = []
denicijad2088152017-04-28 02:14:54 -0700395 if (is_ios) {
denicija070d5e32017-02-26 11:44:13 -0800396 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200397 "objc/components/renderer/opengl/RTCNV12TextureCache.h",
398 "objc/components/renderer/opengl/RTCNV12TextureCache.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700399 ]
400 libs += [
401 "GLKit.framework",
402 "OpenGLES.framework",
403 "QuartzCore.framework",
404 ]
405 } else if (is_mac) {
mbonadei2c8ac1b2017-05-31 05:14:26 -0700406 libs += [
407 "CoreMedia.framework",
408 "CoreVideo.framework",
409 "OpenGL.framework",
denicija070d5e32017-02-26 11:44:13 -0800410 ]
411 }
mbonadei2c8ac1b2017-05-31 05:14:26 -0700412
kthelgason2f088792017-05-30 01:48:47 -0700413 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200414 ":base_objc",
415 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100416 ":mediaconstraints_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100417 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100418 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100419 ":videosource_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700420 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200421 "../api/video:video_frame",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700422 "../common_video",
423 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100424 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700425 "../rtc_base:rtc_base",
Danil Chapovalov196100e2018-06-21 10:17:24 +0200426 "//third_party/abseil-cpp/absl/types:optional",
tkchin9eeb6242016-04-27 01:54:20 -0700427 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700428
Anders Carlsson358f2e02018-06-04 10:24:37 +0200429 configs += [
430 "..:common_objc",
431 ":used_from_extension",
432 ]
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800433 }
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800434
kthelgason36d658d2017-08-24 05:43:45 -0700435 rtc_static_library("ui_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000436 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100437 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadei2c8ac1b2017-05-31 05:14:26 -0700438 if (is_ios) {
439 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200440 "objc/components/renderer/opengl/RTCDisplayLinkTimer.h",
441 "objc/components/renderer/opengl/RTCDisplayLinkTimer.m",
442 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
443 "objc/components/renderer/opengl/RTCEAGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700444 ]
445 }
446 if (is_mac) {
447 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200448 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
449 "objc/components/renderer/opengl/RTCNSGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700450 ]
451 }
452 configs += [ "..:common_objc" ]
453 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200454 ":base_objc",
455 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100456 ":video_objc",
457 ":videocapture_objc",
458 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700459 ]
460 }
kthelgasonebc34e72016-09-15 04:30:18 -0700461
mbonadei2c8ac1b2017-05-31 05:14:26 -0700462 if (rtc_use_metal_rendering) {
kthelgason36d658d2017-08-24 05:43:45 -0700463 rtc_static_library("metal_objc") {
Mirko Bonadeid68956d2018-02-16 17:55:36 +0100464 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100465 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadei2c8ac1b2017-05-31 05:14:26 -0700466 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200467 "objc/components/renderer/metal/RTCMTLI420Renderer.h",
468 "objc/components/renderer/metal/RTCMTLI420Renderer.mm",
469 "objc/components/renderer/metal/RTCMTLRenderer+Private.h",
470 "objc/components/renderer/metal/RTCMTLRenderer.h",
471 "objc/components/renderer/metal/RTCMTLRenderer.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700472 ]
473 if (is_ios) {
474 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200475 "objc/components/renderer/metal/RTCMTLNV12Renderer.h",
476 "objc/components/renderer/metal/RTCMTLNV12Renderer.mm",
477 "objc/components/renderer/metal/RTCMTLRGBRenderer.h",
478 "objc/components/renderer/metal/RTCMTLRGBRenderer.mm",
479 "objc/components/renderer/metal/RTCMTLVideoView.h",
480 "objc/components/renderer/metal/RTCMTLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700481 ]
482 }
483 if (is_mac) {
484 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200485 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
486 "objc/components/renderer/metal/RTCMTLNSVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700487 ]
488 }
489 libs = [
490 "CoreVideo.framework",
491 "Metal.framework",
492 "MetalKit.framework",
493 ]
494 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200495 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100496 ":peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700497 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100498 ":videoframebuffer_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200499 "../api/video:video_frame",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100500 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700501 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700502 ]
503 configs += [ "..:common_objc" ]
kthelgason36d658d2017-08-24 05:43:45 -0700504 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700505 }
506 }
507
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200508 # TODO(bugs.webrtc.org/9627): Remove this target.
Anders Carlsson73119182018-03-15 09:41:03 +0100509 rtc_static_library("videocapturebase_objc") {
510 visibility = [ "*" ]
511 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200512 "objc/helpers/noop.mm",
Anders Carlsson73119182018-03-15 09:41:03 +0100513 ]
Anders Carlsson73119182018-03-15 09:41:03 +0100514
515 configs += [ "..:common_objc" ]
516
517 public_configs = [ ":common_config_objc" ]
518
519 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200520 ":base_objc",
Anders Carlsson73119182018-03-15 09:41:03 +0100521 ":videoframebuffer_objc",
522 ]
523 }
524
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100525 rtc_static_library("videocapture_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000526 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100527 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadei2c8ac1b2017-05-31 05:14:26 -0700528 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200529 "objc/components/capturer/RTCCameraVideoCapturer.h",
530 "objc/components/capturer/RTCCameraVideoCapturer.m",
zhihuanga4c113a2017-06-28 14:05:44 -0700531 ]
532 if (is_ios) {
533 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200534 "objc/components/capturer/RTCFileVideoCapturer.h",
535 "objc/components/capturer/RTCFileVideoCapturer.m",
zhihuanga4c113a2017-06-28 14:05:44 -0700536 ]
537 }
538 libs = [ "AVFoundation.framework" ]
539
zhihuanga4c113a2017-06-28 14:05:44 -0700540 configs += [ "..:common_objc" ]
541
kthelgason36d658d2017-08-24 05:43:45 -0700542 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700543
zhihuanga4c113a2017-06-28 14:05:44 -0700544 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200545 ":base_objc",
546 ":helpers_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700547 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100548 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700549 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700550 }
551
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100552 rtc_static_library("videocodec_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200553 visibility = [ "*" ]
Mirko Bonadei96ede162018-09-06 13:45:44 +0200554 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100555 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200556 "objc/components/video_codec/RTCCodecSpecificInfoH264+Private.h",
557 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
558 "objc/components/video_codec/RTCCodecSpecificInfoH264.mm",
559 "objc/components/video_codec/RTCH264ProfileLevelId.h",
560 "objc/components/video_codec/RTCH264ProfileLevelId.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700561 ]
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300562 if (is_ios) {
563 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200564 "objc/components/video_codec/UIDevice+H264Profile.h",
565 "objc/components/video_codec/UIDevice+H264Profile.mm",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300566 ]
567 }
zhihuanga4c113a2017-06-28 14:05:44 -0700568 if (!build_with_chromium && is_clang) {
569 # Suppress warnings from the Chromium Clang plugin
570 # (bugs.webrtc.org/163).
571 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
572 }
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100573 public_configs = [ ":common_config_objc" ]
574 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200575 ":base_objc",
576 ":helpers_objc",
kthelgasonfb143122017-07-25 07:55:58 -0700577 "../api/video_codecs:video_codecs_api",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100578 "../common_video",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300579 "../media:rtc_h264_profile_id",
zhihuanga4c113a2017-06-28 14:05:44 -0700580 "../media:rtc_media_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100581 "../modules:module_api",
582 "../modules/video_coding:video_codec_interface",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200583 "../rtc_base:checks",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100584 "../rtc_base:rtc_base_approved",
zhihuanga4c113a2017-06-28 14:05:44 -0700585 ]
586 }
587
Anders Carlssondd8c1652018-01-30 10:32:13 +0100588 rtc_static_library("default_codec_factory_objc") {
589 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200590 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
591 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.m",
592 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
593 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.m",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100594 ]
595
596 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200597 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100598 ":native_video",
599 ":videocodec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200600 ":videotoolbox_objc",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +0200601 ":vp8",
602 ":vp9",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200603 ":vpx_codec_constants",
604 ]
605 }
606
607 rtc_static_library("vpx_codec_constants") {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200608 configs += [ "..:no_global_constructors" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200609 sources = [
610 "objc/api/video_codec/RTCVideoCodecConstants.h",
611 "objc/api/video_codec/RTCVideoCodecConstants.mm",
612 ]
613
614 deps = [
615 ":base_objc",
616 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100617 ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100618 }
619
620 rtc_static_library("vp8") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100621 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200622 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100623 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200624 "objc/api/video_codec/RTCVideoDecoderVP8.h",
625 "objc/api/video_codec/RTCVideoDecoderVP8.mm",
626 "objc/api/video_codec/RTCVideoEncoderVP8.h",
627 "objc/api/video_codec/RTCVideoEncoderVP8.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100628 ]
629
Anders Carlssondd8c1652018-01-30 10:32:13 +0100630 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200631 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100632 ":wrapped_native_codec_objc",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100633 "../modules/video_coding:webrtc_vp8",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100634 ]
635 }
636
637 rtc_static_library("vp9") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100638 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200639 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100640 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200641 "objc/api/video_codec/RTCVideoDecoderVP9.h",
642 "objc/api/video_codec/RTCVideoDecoderVP9.mm",
643 "objc/api/video_codec/RTCVideoEncoderVP9.h",
644 "objc/api/video_codec/RTCVideoEncoderVP9.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100645 ]
646
Anders Carlssondd8c1652018-01-30 10:32:13 +0100647 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200648 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100649 ":wrapped_native_codec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200650 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100651 "../modules/video_coding:webrtc_vp9",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100652 ]
653 }
654
zhihuanga4c113a2017-06-28 14:05:44 -0700655 # Build the PeerConnectionFactory without audio/video support.
656 # This target depends on the objc_peeerconnectionfactory_base which still
657 # includes some audio/video related objects such as RTCAudioSource because
658 # these objects are just thin wrappers of native C++ interfaces required
659 # when implementing webrtc::PeerConnectionFactoryInterface and
660 # webrtc::PeerConnectionInterface.
Kári Tristan Helgasona2d89fc2018-03-06 10:18:43 +0100661 # The applications which only use WebRTC DataChannel can depend on this.
kthelgason36d658d2017-08-24 05:43:45 -0700662 rtc_static_library("peerconnectionfactory_no_media_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000663 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100664 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
zhihuanga4c113a2017-06-28 14:05:44 -0700665 defines = [ "HAVE_NO_MEDIA" ]
666
667 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200668 "objc/helpers/noop.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700669 ]
670
kthelgason36d658d2017-08-24 05:43:45 -0700671 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700672
zhihuanga4c113a2017-06-28 14:05:44 -0700673 deps = [
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100674 ":native_api",
675 ":native_video",
kthelgason36d658d2017-08-24 05:43:45 -0700676 ":peerconnectionfactory_base_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700677 "../api:libjingle_peerconnection_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700678 "../rtc_base:rtc_base",
zhihuanga4c113a2017-06-28 14:05:44 -0700679 ]
680 }
681
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100682 rtc_static_library("mediaconstraints_objc") {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200683 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100684 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200685 "objc/api/peerconnection/RTCMediaConstraints+Private.h",
686 "objc/api/peerconnection/RTCMediaConstraints.h",
687 "objc/api/peerconnection/RTCMediaConstraints.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100688 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100689
690 public_configs = [ ":common_config_objc" ]
691 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200692 ":base_objc",
693 ":helpers_objc",
Niels Möllerdac03d92019-02-13 08:52:27 +0100694 ":media_constraints",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100695 ]
696 }
697
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200698 # TODO(bugs.webrtc.org/9627): Remove, targets should depend on base_objc.
Anders Carlsson9823ee42018-03-07 10:32:03 +0100699 rtc_source_set("videorenderer_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200700 visibility = [ "*" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100701 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200702 "objc/helpers/noop.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100703 ]
704
705 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100706 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200707
708 deps = [
709 ":base_objc",
710 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100711 }
712
713 rtc_static_library("videorendereradapter_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200714 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100715 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Anders Carlsson9823ee42018-03-07 10:32:03 +0100716 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200717 "objc/api/RTCVideoRendererAdapter+Private.h",
718 "objc/api/RTCVideoRendererAdapter.h",
719 "objc/api/RTCVideoRendererAdapter.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100720 ]
721
722 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100723 public_configs = [ ":common_config_objc" ]
724
725 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200726 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100727 ":native_api",
728 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100729 "../api:libjingle_peerconnection_api",
730 ]
731 }
732
733 rtc_static_library("mediasource_objc") {
734 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200735 "objc/api/peerconnection/RTCMediaSource+Private.h",
736 "objc/api/peerconnection/RTCMediaSource.h",
737 "objc/api/peerconnection/RTCMediaSource.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100738 ]
739
Anders Carlsson358f2e02018-06-04 10:24:37 +0200740 configs += [
741 "..:common_objc",
742 ":used_from_extension",
743 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100744 public_configs = [ ":common_config_objc" ]
745
746 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200747 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100748 "../api:libjingle_peerconnection_api",
749 "../rtc_base:checks",
750 ]
751 }
752
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200753 rtc_static_library("base_native_additions_objc") {
754 sources = [
755 "objc/api/peerconnection/RTCEncodedImage+Private.h",
756 "objc/api/peerconnection/RTCEncodedImage+Private.mm",
757 "objc/api/peerconnection/RTCRtpFragmentationHeader+Private.h",
758 "objc/api/peerconnection/RTCRtpFragmentationHeader+Private.mm",
759 "objc/api/peerconnection/RTCVideoCodecInfo+Private.h",
760 "objc/api/peerconnection/RTCVideoCodecInfo+Private.mm",
761 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.h",
762 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.mm",
763 ]
764
765 configs += [ "..:common_objc" ]
766
767 public_configs = [ ":common_config_objc" ]
768
769 deps = [
770 ":base_objc",
771 ":helpers_objc",
Niels Möller4dc66c52018-10-05 14:17:58 +0200772 "../api/video:encoded_image",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200773 "../api/video_codecs:video_codecs_api",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200774 "../modules:module_api",
775 "../modules/video_coding:video_codec_interface",
776 "../rtc_base:rtc_base",
777 ]
778
779 if (!build_with_chromium && is_clang) {
780 # Suppress warnings from the Chromium Clang plugin
781 # (bugs.webrtc.org/163).
782 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
783 }
784 }
785
kthelgason36d658d2017-08-24 05:43:45 -0700786 rtc_static_library("peerconnectionfactory_base_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200787 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100788 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Mirko Bonadei96ede162018-09-06 13:45:44 +0200789 configs += [
790 "..:no_exit_time_destructors",
791 "..:no_global_constructors",
792 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700793 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200794 "objc/api/peerconnection/RTCAudioSource+Private.h",
795 "objc/api/peerconnection/RTCAudioSource.h",
796 "objc/api/peerconnection/RTCAudioSource.mm",
797 "objc/api/peerconnection/RTCAudioTrack+Private.h",
798 "objc/api/peerconnection/RTCAudioTrack.h",
799 "objc/api/peerconnection/RTCAudioTrack.mm",
800 "objc/api/peerconnection/RTCCertificate.h",
801 "objc/api/peerconnection/RTCCertificate.mm",
802 "objc/api/peerconnection/RTCConfiguration+Native.h",
803 "objc/api/peerconnection/RTCConfiguration+Private.h",
804 "objc/api/peerconnection/RTCConfiguration.h",
805 "objc/api/peerconnection/RTCConfiguration.mm",
Benjamin Wright8c27cca2018-10-25 10:16:44 -0700806 "objc/api/peerconnection/RTCCryptoOptions.h",
807 "objc/api/peerconnection/RTCCryptoOptions.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200808 "objc/api/peerconnection/RTCDataChannel+Private.h",
809 "objc/api/peerconnection/RTCDataChannel.h",
810 "objc/api/peerconnection/RTCDataChannel.mm",
811 "objc/api/peerconnection/RTCDataChannelConfiguration+Private.h",
812 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
813 "objc/api/peerconnection/RTCDataChannelConfiguration.mm",
814 "objc/api/peerconnection/RTCDtmfSender+Private.h",
815 "objc/api/peerconnection/RTCDtmfSender.h",
816 "objc/api/peerconnection/RTCDtmfSender.mm",
817 "objc/api/peerconnection/RTCFieldTrials.h",
818 "objc/api/peerconnection/RTCFieldTrials.mm",
819 "objc/api/peerconnection/RTCIceCandidate+Private.h",
820 "objc/api/peerconnection/RTCIceCandidate.h",
821 "objc/api/peerconnection/RTCIceCandidate.mm",
822 "objc/api/peerconnection/RTCIceServer+Private.h",
823 "objc/api/peerconnection/RTCIceServer.h",
824 "objc/api/peerconnection/RTCIceServer.mm",
825 "objc/api/peerconnection/RTCIntervalRange+Private.h",
826 "objc/api/peerconnection/RTCIntervalRange.h",
827 "objc/api/peerconnection/RTCIntervalRange.mm",
828 "objc/api/peerconnection/RTCLegacyStatsReport+Private.h",
829 "objc/api/peerconnection/RTCLegacyStatsReport.h",
830 "objc/api/peerconnection/RTCLegacyStatsReport.mm",
831 "objc/api/peerconnection/RTCMediaStream+Private.h",
832 "objc/api/peerconnection/RTCMediaStream.h",
833 "objc/api/peerconnection/RTCMediaStream.mm",
834 "objc/api/peerconnection/RTCMediaStreamTrack+Private.h",
835 "objc/api/peerconnection/RTCMediaStreamTrack.h",
836 "objc/api/peerconnection/RTCMediaStreamTrack.mm",
837 "objc/api/peerconnection/RTCMetrics.h",
838 "objc/api/peerconnection/RTCMetrics.mm",
839 "objc/api/peerconnection/RTCMetricsSampleInfo+Private.h",
840 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
841 "objc/api/peerconnection/RTCMetricsSampleInfo.mm",
842 "objc/api/peerconnection/RTCPeerConnection+DataChannel.mm",
843 "objc/api/peerconnection/RTCPeerConnection+Native.h",
844 "objc/api/peerconnection/RTCPeerConnection+Private.h",
845 "objc/api/peerconnection/RTCPeerConnection+Stats.mm",
846 "objc/api/peerconnection/RTCPeerConnection.h",
847 "objc/api/peerconnection/RTCPeerConnection.mm",
848 "objc/api/peerconnection/RTCPeerConnectionFactory+Native.h",
849 "objc/api/peerconnection/RTCPeerConnectionFactory+Private.h",
850 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
851 "objc/api/peerconnection/RTCPeerConnectionFactory.mm",
852 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.h",
853 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.mm",
854 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.h",
855 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.mm",
856 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions+Private.h",
857 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
858 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.mm",
859 "objc/api/peerconnection/RTCRtcpParameters+Private.h",
860 "objc/api/peerconnection/RTCRtcpParameters.h",
861 "objc/api/peerconnection/RTCRtcpParameters.mm",
862 "objc/api/peerconnection/RTCRtpCodecParameters+Private.h",
863 "objc/api/peerconnection/RTCRtpCodecParameters.h",
864 "objc/api/peerconnection/RTCRtpCodecParameters.mm",
865 "objc/api/peerconnection/RTCRtpEncodingParameters+Private.h",
866 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
867 "objc/api/peerconnection/RTCRtpEncodingParameters.mm",
868 "objc/api/peerconnection/RTCRtpHeaderExtension+Private.h",
869 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
870 "objc/api/peerconnection/RTCRtpHeaderExtension.mm",
871 "objc/api/peerconnection/RTCRtpParameters+Private.h",
872 "objc/api/peerconnection/RTCRtpParameters.h",
873 "objc/api/peerconnection/RTCRtpParameters.mm",
Benjamin Wrightddf1a3e2018-10-02 10:20:58 -0700874 "objc/api/peerconnection/RTCRtpReceiver+Native.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200875 "objc/api/peerconnection/RTCRtpReceiver+Private.h",
876 "objc/api/peerconnection/RTCRtpReceiver.h",
877 "objc/api/peerconnection/RTCRtpReceiver.mm",
Benjamin Wrightddf1a3e2018-10-02 10:20:58 -0700878 "objc/api/peerconnection/RTCRtpSender+Native.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200879 "objc/api/peerconnection/RTCRtpSender+Private.h",
880 "objc/api/peerconnection/RTCRtpSender.h",
881 "objc/api/peerconnection/RTCRtpSender.mm",
882 "objc/api/peerconnection/RTCRtpTransceiver+Private.h",
883 "objc/api/peerconnection/RTCRtpTransceiver.h",
884 "objc/api/peerconnection/RTCRtpTransceiver.mm",
885 "objc/api/peerconnection/RTCSSLAdapter.h",
886 "objc/api/peerconnection/RTCSSLAdapter.mm",
887 "objc/api/peerconnection/RTCSessionDescription+Private.h",
888 "objc/api/peerconnection/RTCSessionDescription.h",
889 "objc/api/peerconnection/RTCSessionDescription.mm",
Peter Hanspersbed86042019-02-21 17:27:09 +0100890 "objc/api/peerconnection/RTCStatisticsReport+Private.h",
891 "objc/api/peerconnection/RTCStatisticsReport.h",
892 "objc/api/peerconnection/RTCStatisticsReport.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200893 "objc/api/peerconnection/RTCTracing.h",
894 "objc/api/peerconnection/RTCTracing.mm",
895 "objc/api/peerconnection/RTCVideoTrack+Private.h",
896 "objc/api/peerconnection/RTCVideoTrack.h",
897 "objc/api/peerconnection/RTCVideoTrack.mm",
kthelgason5fe4d492016-12-05 11:27:30 -0800898 ]
kthelgasonebc34e72016-09-15 04:30:18 -0700899
Anders Carlsson358f2e02018-06-04 10:24:37 +0200900 configs += [
901 "..:common_objc",
902 ":used_from_extension",
903 ]
kthelgason36d658d2017-08-24 05:43:45 -0700904 public_configs = [ ":common_config_objc" ]
kthelgasonc0977102017-04-24 00:57:16 -0700905
mbonadei2c8ac1b2017-05-31 05:14:26 -0700906 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200907 ":base_native_additions_objc",
908 ":base_objc",
909 ":file_logger_objc",
910 ":helpers_objc",
911 ":legacy_header_paths",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100912 ":mediaconstraints_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100913 ":mediasource_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100914 ":native_api",
915 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100916 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100917 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100918 ":videorendereradapter_objc",
919 ":videosource_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200920 ":videotoolbox_objc",
Mirko Bonadei2ff3f492018-11-22 09:00:13 +0100921 "../api:create_peerconnection_factory",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100922 "../api:libjingle_peerconnection_api",
Peter Hanspersbed86042019-02-21 17:27:09 +0100923 "../api:rtc_stats_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100924 "../api:scoped_refptr",
Jiawei Ouae810c12018-06-20 16:18:59 -0700925 "../api/audio_codecs:audio_codecs_api",
Karl Wiberg5817d3d2018-04-06 10:06:42 +0200926 "../api/audio_codecs:builtin_audio_decoder_factory",
Jiawei Ouae810c12018-06-20 16:18:59 -0700927 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200928 "../api/video:video_frame",
Anders Carlsson7e042812017-10-05 16:55:38 +0200929 "../api/video_codecs:video_codecs_api",
Anders Carlssone5960ce2017-06-22 15:26:30 +0200930 "../common_video",
Bjorn Tereliusb8b3c992019-01-09 11:15:34 +0100931 "../logging:rtc_event_log_impl_base",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700932 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -0700933 "../modules:module_api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700934 "../modules/audio_device:audio_device_api",
Alessio Bazzicab768e882018-11-07 14:29:54 +0000935 "../modules/audio_processing:api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700936 "../modules/audio_processing:audio_processing",
Patrik Höglund99175c62018-01-08 11:05:10 +0100937 "../modules/video_coding:video_codec_interface",
zhihuanga4c113a2017-06-28 14:05:44 -0700938 "../pc:peerconnection",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100939 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700940 "../rtc_base:rtc_base",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200941 "../system_wrappers:field_trial",
942 "../system_wrappers:metrics",
Mirko Bonadei879f7882018-07-11 09:18:37 +0200943 "//third_party/abseil-cpp/absl/memory",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700944 ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200945
946 if (is_ios) {
947 deps += [ ":native_api_audio_device_module" ]
948 }
kthelgasonebc34e72016-09-15 04:30:18 -0700949 }
Zeke Chindd0e1e02016-10-11 13:27:26 -0700950
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200951 # TODO(bugs.webrtc.org/9627): Remove this target.
952 rtc_source_set("legacy_header_paths") {
953 sources = [
954 "objc/Framework/Classes/Common/NSString+StdString.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200955 "objc/Framework/Classes/Common/scoped_cftyperef.h",
956 "objc/Framework/Classes/PeerConnection/RTCConfiguration+Native.h",
957 "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Native.h",
958 "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Native.h",
959 "objc/Framework/Classes/PeerConnection/RTCVideoCodec+Private.h",
960 "objc/Framework/Classes/Video/RTCDefaultShader.h",
961 "objc/Framework/Classes/Video/RTCNV12TextureCache.h",
962 "objc/Framework/Classes/VideoToolbox/nalu_rewriter.h",
963 "objc/Framework/Headers/WebRTC/RTCAudioSession.h",
964 "objc/Framework/Headers/WebRTC/RTCAudioSessionConfiguration.h",
965 "objc/Framework/Headers/WebRTC/RTCAudioSource.h",
966 "objc/Framework/Headers/WebRTC/RTCAudioTrack.h",
967 "objc/Framework/Headers/WebRTC/RTCCVPixelBuffer.h",
968 "objc/Framework/Headers/WebRTC/RTCCallbackLogger.h",
969 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
970 "objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h",
971 "objc/Framework/Headers/WebRTC/RTCCertificate.h",
972 "objc/Framework/Headers/WebRTC/RTCConfiguration.h",
973 "objc/Framework/Headers/WebRTC/RTCDataChannel.h",
974 "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h",
975 "objc/Framework/Headers/WebRTC/RTCDefaultVideoDecoderFactory.h",
976 "objc/Framework/Headers/WebRTC/RTCDefaultVideoEncoderFactory.h",
977 "objc/Framework/Headers/WebRTC/RTCDispatcher.h",
978 "objc/Framework/Headers/WebRTC/RTCDtmfSender.h",
979 "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
980 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h",
981 "objc/Framework/Headers/WebRTC/RTCFileLogger.h",
982 "objc/Framework/Headers/WebRTC/RTCFileVideoCapturer.h",
983 "objc/Framework/Headers/WebRTC/RTCH264ProfileLevelId.h",
984 "objc/Framework/Headers/WebRTC/RTCIceCandidate.h",
985 "objc/Framework/Headers/WebRTC/RTCIceServer.h",
986 "objc/Framework/Headers/WebRTC/RTCIntervalRange.h",
987 "objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h",
988 "objc/Framework/Headers/WebRTC/RTCLogging.h",
989 "objc/Framework/Headers/WebRTC/RTCMTLNSVideoView.h",
990 "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h",
991 "objc/Framework/Headers/WebRTC/RTCMacros.h",
992 "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h",
993 "objc/Framework/Headers/WebRTC/RTCMediaSource.h",
994 "objc/Framework/Headers/WebRTC/RTCMediaStream.h",
995 "objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h",
996 "objc/Framework/Headers/WebRTC/RTCMetrics.h",
997 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h",
998 "objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h",
999 "objc/Framework/Headers/WebRTC/RTCPeerConnection.h",
1000 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h",
1001 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactoryOptions.h",
1002 "objc/Framework/Headers/WebRTC/RTCRtcpParameters.h",
1003 "objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h",
1004 "objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h",
1005 "objc/Framework/Headers/WebRTC/RTCRtpHeaderExtension.h",
1006 "objc/Framework/Headers/WebRTC/RTCRtpParameters.h",
1007 "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h",
1008 "objc/Framework/Headers/WebRTC/RTCRtpSender.h",
1009 "objc/Framework/Headers/WebRTC/RTCRtpTransceiver.h",
1010 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
1011 "objc/Framework/Headers/WebRTC/RTCSessionDescription.h",
1012 "objc/Framework/Headers/WebRTC/RTCTracing.h",
1013 "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h",
1014 "objc/Framework/Headers/WebRTC/RTCVideoCodec.h",
1015 "objc/Framework/Headers/WebRTC/RTCVideoCodecFactory.h",
1016 "objc/Framework/Headers/WebRTC/RTCVideoCodecH264.h",
1017 "objc/Framework/Headers/WebRTC/RTCVideoCodecInfo.h",
1018 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP8.h",
1019 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP9.h",
1020 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP8.h",
1021 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP9.h",
1022 "objc/Framework/Headers/WebRTC/RTCVideoFrame.h",
1023 "objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.h",
1024 "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h",
1025 "objc/Framework/Headers/WebRTC/RTCVideoSource.h",
1026 "objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
1027 "objc/Framework/Headers/WebRTC/RTCVideoViewShading.h",
1028 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
1029 "objc/Framework/Native/api/audio_device_module.h",
1030 "objc/Framework/Native/api/video_decoder_factory.h",
1031 "objc/Framework/Native/api/video_encoder_factory.h",
1032 "objc/Framework/Native/api/video_frame_buffer.h",
1033 "objc/Framework/Native/src/objc_video_decoder_factory.h",
1034 "objc/Framework/Native/src/objc_video_encoder_factory.h",
1035 ]
1036 }
1037
mbonadei2c8ac1b2017-05-31 05:14:26 -07001038 if (rtc_include_tests) {
Daniela012b56b2017-11-15 13:15:24 +01001039 if (is_ios) {
Danielaae012cf2017-10-12 13:46:00 +02001040 rtc_source_set("sdk_unittests_sources") {
1041 testonly = true
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001042 include_dirs = [ "objc/" ]
Daniela012b56b2017-11-15 13:15:24 +01001043
Danielaae012cf2017-10-12 13:46:00 +02001044 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001045 "objc/unittests/ObjCVideoTrackSource_xctest.mm",
1046 "objc/unittests/RTCCVPixelBuffer_xctest.mm",
1047 "objc/unittests/RTCCallbackLogger_xctest.m",
1048 "objc/unittests/RTCFileVideoCapturer_xctest.mm",
1049 "objc/unittests/RTCH264ProfileLevelId_xctest.m",
Aaron Goldenfb4e9bc2019-01-04 12:03:31 -08001050 "objc/unittests/RTCNV12TextureCache_xctest.m",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001051 "objc/unittests/RTCPeerConnectionFactory_xctest.m",
1052 "objc/unittests/frame_buffer_helpers.h",
1053 "objc/unittests/frame_buffer_helpers.mm",
Artem Titarenko42b43152018-10-29 18:18:09 +01001054 "objc/unittests/nalu_rewriter_xctest.mm",
Danielaae012cf2017-10-12 13:46:00 +02001055 ]
Daniela012b56b2017-11-15 13:15:24 +01001056
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001057 # TODO(peterhanspers): Reenable these tests on simulator.
1058 # See bugs.webrtc.org/7812
1059 if (!use_ios_simulator) {
1060 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001061 "objc/unittests/RTCAudioDeviceModule_xctest.mm",
1062 "objc/unittests/RTCAudioDevice_xctest.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001063 ]
1064 }
1065
Danielaae012cf2017-10-12 13:46:00 +02001066 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001067 ":audio_device",
1068 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001069 ":base_objc",
1070 ":callback_logger_objc",
Anders Carlssondc6b4772018-01-15 13:31:03 +01001071 ":framework_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001072 ":mediaconstraints_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001073 ":native_api",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001074 ":native_api_audio_device_module",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001075 ":native_video",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001076 ":peerconnectionfactory_base_objc",
Aaron Goldenfb4e9bc2019-01-04 12:03:31 -08001077 ":video_objc",
Artem Titarenko42b43152018-10-29 18:18:09 +01001078 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001079 ":videocapture_objc",
Anders Carlsson79ce8202018-06-01 12:51:09 +02001080 ":videocodec_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001081 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001082 ":videosource_objc",
Danielaae012cf2017-10-12 13:46:00 +02001083 ":videotoolbox_objc",
Mirko Bonadeid9708072019-01-25 20:26:48 +01001084 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001085 "../api/video:video_frame_i420",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001086 "../common_video:common_video",
Danielaae012cf2017-10-12 13:46:00 +02001087 "../media:rtc_media_base",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001088 "../media:rtc_media_tests_utils",
Danielaae012cf2017-10-12 13:46:00 +02001089 "../modules:module_api",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001090 "../rtc_base:gunit_helpers",
Danielaae012cf2017-10-12 13:46:00 +02001091 "../rtc_base:rtc_base",
Oleh Prypinda04e062018-07-23 10:04:12 +02001092 "../system_wrappers:system_wrappers",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001093 "//third_party/libyuv",
Danielaae012cf2017-10-12 13:46:00 +02001094 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001095
1096 if (rtc_use_metal_rendering) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001097 sources += [ "objc/unittests/RTCMTLVideoView_xctest.m" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001098 deps += [ ":metal_objc" ]
1099 }
1100
Danielaae012cf2017-10-12 13:46:00 +02001101 public_deps = [
1102 "//build/config/ios:xctest",
1103 "//third_party/ocmock",
1104 ]
1105 }
1106
Daniela012b56b2017-11-15 13:15:24 +01001107 bundle_data("sdk_unittests_bundle_data") {
Daniela012b56b2017-11-15 13:15:24 +01001108 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001109 "objc/unittests/audio_short16.pcm",
1110 "objc/unittests/audio_short44.pcm",
1111 "objc/unittests/audio_short48.pcm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001112
1113 # Sample video taken from https://media.xiph.org/video/derf/
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001114 "objc/unittests/foreman.mp4",
Daniela012b56b2017-11-15 13:15:24 +01001115 ]
1116 outputs = [
1117 "{{bundle_resources_dir}}/{{source_file_part}}",
1118 ]
1119 }
1120
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001121 # These tests use static linking.
Danielaae012cf2017-10-12 13:46:00 +02001122 rtc_ios_xctest_test("sdk_unittests") {
1123 info_plist = "//test/ios/Info.plist"
1124 sources = [
Artem Titarenko34fc3462018-11-06 12:29:29 +01001125 "objc/unittests/main.mm",
Danielaae012cf2017-10-12 13:46:00 +02001126 ]
Daniela012b56b2017-11-15 13:15:24 +01001127
Danielaae012cf2017-10-12 13:46:00 +02001128 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
1129 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
1130 deps = [
Yura Yaroshevich5297bd22018-06-19 12:51:51 +03001131 ":peerconnectionfactory_base_objc",
Daniela012b56b2017-11-15 13:15:24 +01001132 ":sdk_unittests_bundle_data",
Danielaae012cf2017-10-12 13:46:00 +02001133 ":sdk_unittests_sources",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001134 "//test:test_support",
Danielaae012cf2017-10-12 13:46:00 +02001135 ]
1136 ldflags = [ "-all_load" ]
1137 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001138
1139 # These tests link to the framework.
1140 rtc_ios_xctest_test("sdk_framework_unittests") {
1141 info_plist = "//test/ios/Info.plist"
1142 sources = [
1143 "objc/unittests/RTCDoNotPutCPlusPlusInFrameworkHeaders_xctest.m",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001144 "objc/unittests/main.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001145 ]
1146
1147 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
1148 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
1149 deps = [
1150 ":framework_objc+link",
1151 ":ios_framework_bundle",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001152 "//test:test_support",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001153 ]
1154 }
Danielaae012cf2017-10-12 13:46:00 +02001155 }
1156
1157 # TODO(denicija): once all tests are migrated to xctest remove this source set.
Kári Tristan Helgason90143242018-07-27 12:34:54 +02001158 rtc_source_set("rtc_unittests_objc") {
mbonadei2c8ac1b2017-05-31 05:14:26 -07001159 testonly = true
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001160
mbonadei2c8ac1b2017-05-31 05:14:26 -07001161 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001162 "objc/unittests/RTCCertificateTest.mm",
1163 "objc/unittests/RTCConfigurationTest.mm",
1164 "objc/unittests/RTCDataChannelConfigurationTest.mm",
1165 "objc/unittests/RTCIceCandidateTest.mm",
1166 "objc/unittests/RTCIceServerTest.mm",
1167 "objc/unittests/RTCIntervalRangeTests.mm",
1168 "objc/unittests/RTCMediaConstraintsTest.mm",
1169 "objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm",
1170 "objc/unittests/RTCPeerConnectionTest.mm",
1171 "objc/unittests/RTCSessionDescriptionTest.mm",
1172 "objc/unittests/RTCTracingTest.mm",
1173 "objc/unittests/objc_video_decoder_factory_tests.mm",
1174 "objc/unittests/objc_video_encoder_factory_tests.mm",
1175 "objc/unittests/scoped_cftyperef_tests.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001176 ]
Anders Carlssone7dd83f2018-01-19 11:28:44 +01001177 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001178 sources += [ "objc/unittests/RTCCameraVideoCapturerTests.mm" ]
oprypin45197522017-06-22 01:47:20 -07001179 }
mbonadeid7620582017-05-30 01:50:35 -07001180
mbonadei2c8ac1b2017-05-31 05:14:26 -07001181 # |-ObjC| flag needed to make sure category method implementations
1182 # are included:
1183 # https://developer.apple.com/library/mac/qa/qa1490/_index.html
1184 ldflags = [ "-ObjC" ]
magjed3149e092017-05-08 05:32:05 -07001185
mbonadei2c8ac1b2017-05-31 05:14:26 -07001186 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001187 ":base_objc",
1188 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001189 ":mediaconstraints_objc",
1190 ":native_api",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001191 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001192 ":peerconnectionfactory_base_objc",
1193 ":video_objc",
1194 ":videocapture_objc",
1195 ":videocodec_objc",
1196 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001197 ":videosource_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001198 ":videotoolbox_objc",
Piotr (Peter) Slatalae0c2e972018-10-08 09:43:21 -07001199 "../api:libjingle_peerconnection_api",
Jiawei Ouae810c12018-06-20 16:18:59 -07001200 "../api/audio_codecs:audio_codecs_api",
1201 "../api/audio_codecs:builtin_audio_decoder_factory",
1202 "../api/audio_codecs:builtin_audio_encoder_factory",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001203 "../api/video_codecs:video_codecs_api",
kthelgasonebd4f792017-09-04 04:36:21 -07001204 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -07001205 "../modules:module_api",
Jiawei Ouae810c12018-06-20 16:18:59 -07001206 "../modules/audio_device:audio_device_api",
Alessio Bazzicab768e882018-11-07 14:29:54 +00001207 "../modules/audio_processing:api",
Jiawei Ouae810c12018-06-20 16:18:59 -07001208 "../modules/audio_processing:audio_processing",
Patrik Höglund99175c62018-01-08 11:05:10 +01001209 "../modules/video_coding:video_codec_interface",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001210 "../rtc_base:gunit_helpers",
Niels Möllera12c42a2018-07-25 16:05:48 +02001211 "../rtc_base/system:unused",
Yves Gerey21cddff2018-10-30 21:12:42 +01001212 "../test:test_support",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001213 "//third_party/ocmock",
1214 ]
magjed3149e092017-05-08 05:32:05 -07001215
denicija59ee91b2017-06-05 05:48:47 -07001216 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001217 sources += [ "objc/unittests/RTCAudioSessionTest.mm" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001218 deps += [ ":audio_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001219 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001220 }
kthelgason2f088792017-05-30 01:48:47 -07001221 }
1222
mbonadei2c8ac1b2017-05-31 05:14:26 -07001223 if (is_ios) {
Anders Carlssondc6b4772018-01-15 13:31:03 +01001224 ios_framework_bundle_with_umbrella_header("framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001225 info_plist = "objc/Info.plist"
mbonadei2c8ac1b2017-05-31 05:14:26 -07001226 output_name = "WebRTC"
Magnus Jedvertf83dc8b2017-08-29 09:49:43 +00001227
mbonadei2c8ac1b2017-05-31 05:14:26 -07001228 common_objc_headers = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001229 "objc/base/RTCCodecSpecificInfo.h",
1230 "objc/base/RTCEncodedImage.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001231 "objc/base/RTCI420Buffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001232 "objc/base/RTCLogging.h",
1233 "objc/base/RTCMacros.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001234 "objc/base/RTCMutableI420Buffer.h",
1235 "objc/base/RTCMutableYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001236 "objc/base/RTCRtpFragmentationHeader.h",
1237 "objc/base/RTCVideoCapturer.h",
1238 "objc/base/RTCVideoCodecInfo.h",
1239 "objc/base/RTCVideoDecoder.h",
1240 "objc/base/RTCVideoDecoderFactory.h",
1241 "objc/base/RTCVideoEncoder.h",
1242 "objc/base/RTCVideoEncoderFactory.h",
1243 "objc/base/RTCVideoEncoderQpThresholds.h",
1244 "objc/base/RTCVideoEncoderSettings.h",
1245 "objc/base/RTCVideoFrame.h",
1246 "objc/base/RTCVideoFrameBuffer.h",
1247 "objc/base/RTCVideoRenderer.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001248 "objc/base/RTCYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001249 "objc/components/audio/RTCAudioSession.h",
1250 "objc/components/audio/RTCAudioSessionConfiguration.h",
1251 "objc/components/capturer/RTCCameraVideoCapturer.h",
1252 "objc/components/capturer/RTCFileVideoCapturer.h",
1253 "objc/components/renderer/metal/RTCMTLVideoView.h",
1254 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
1255 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1256 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1257 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1258 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1259 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1260 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1261 "objc/components/video_codec/RTCVideoDecoderH264.h",
1262 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1263 "objc/components/video_codec/RTCVideoEncoderH264.h",
1264 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1265 "objc/helpers/RTCCameraPreviewView.h",
1266 "objc/helpers/RTCDispatcher.h",
1267 "objc/helpers/UIDevice+RTCDevice.h",
1268 "objc/api/peerconnection/RTCAudioSource.h",
1269 "objc/api/peerconnection/RTCAudioTrack.h",
1270 "objc/api/peerconnection/RTCConfiguration.h",
1271 "objc/api/peerconnection/RTCDataChannel.h",
1272 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1273 "objc/api/peerconnection/RTCFieldTrials.h",
1274 "objc/api/peerconnection/RTCIceCandidate.h",
1275 "objc/api/peerconnection/RTCIceServer.h",
1276 "objc/api/peerconnection/RTCIntervalRange.h",
1277 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1278 "objc/api/peerconnection/RTCMediaConstraints.h",
1279 "objc/api/peerconnection/RTCMediaSource.h",
1280 "objc/api/peerconnection/RTCMediaStream.h",
1281 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1282 "objc/api/peerconnection/RTCMetrics.h",
1283 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1284 "objc/api/peerconnection/RTCPeerConnection.h",
1285 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1286 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1287 "objc/api/peerconnection/RTCRtcpParameters.h",
1288 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1289 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1290 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1291 "objc/api/peerconnection/RTCRtpParameters.h",
1292 "objc/api/peerconnection/RTCRtpReceiver.h",
1293 "objc/api/peerconnection/RTCRtpSender.h",
1294 "objc/api/peerconnection/RTCRtpTransceiver.h",
1295 "objc/api/peerconnection/RTCDtmfSender.h",
1296 "objc/api/peerconnection/RTCSSLAdapter.h",
1297 "objc/api/peerconnection/RTCSessionDescription.h",
1298 "objc/api/peerconnection/RTCTracing.h",
1299 "objc/api/peerconnection/RTCCertificate.h",
Benjamin Wright8c27cca2018-10-25 10:16:44 -07001300 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001301 "objc/api/peerconnection/RTCVideoSource.h",
1302 "objc/api/peerconnection/RTCVideoTrack.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001303 "objc/api/video_codec/RTCVideoCodecConstants.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001304 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1305 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1306 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1307 "objc/api/video_codec/RTCVideoEncoderVP9.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001308 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1309 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001310 ]
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001311
mbonadei2c8ac1b2017-05-31 05:14:26 -07001312 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001313 common_objc_headers += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001314 "objc/api/logging/RTCCallbackLogger.h",
1315 "objc/api/peerconnection/RTCFileLogger.h",
Anders Carlsson3b3364e2018-01-30 15:46:13 +01001316 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001317 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001318
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001319 sources = common_objc_headers
1320 public_headers = common_objc_headers
1321
mbonadei2c8ac1b2017-05-31 05:14:26 -07001322 ldflags = [
1323 "-all_load",
1324 "-install_name",
1325 "@rpath/$output_name.framework/$output_name",
1326 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001327
mbonadei2c8ac1b2017-05-31 05:14:26 -07001328 deps = [
kthelgason36d658d2017-08-24 05:43:45 -07001329 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001330 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001331 ":default_codec_factory_objc",
1332 ":native_api",
1333 ":native_video",
1334 ":peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001335 ":ui_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001336 ":videocapture_objc",
1337 ":videocodec_objc",
1338 ":videotoolbox_objc",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001339 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001340 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001341 if (rtc_use_metal_rendering) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001342 deps += [ ":metal_objc" ]
1343 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001344 if (!build_with_chromium) {
1345 deps += [
1346 ":callback_logger_objc",
1347 ":file_logger_objc",
1348 ]
1349 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001350
mbonadei2c8ac1b2017-05-31 05:14:26 -07001351 libs = [
1352 "AVFoundation.framework",
1353 "CoreGraphics.framework",
1354 "CoreMedia.framework",
1355 "GLKit.framework",
1356 ]
1357
Anders Carlsson358f2e02018-06-04 10:24:37 +02001358 configs += [
1359 "..:common_objc",
1360 ":used_from_extension",
1361 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001362
kthelgason36d658d2017-08-24 05:43:45 -07001363 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001364 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001365
1366 bundle_data("ios_framework_bundle") {
1367 deps = [
1368 "../sdk:framework_objc",
1369 ]
1370 sources = [
1371 "$root_build_dir/WebRTC.framework",
1372 ]
1373 outputs = [
1374 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
1375 ]
1376 }
1377 }
1378
1379 if (is_mac) {
Anders Carlsson37bbf792018-09-05 16:29:27 +02001380 mac_framework_bundle_with_umbrella_header("mac_framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001381 info_plist = "objc/Info.plist"
1382 output_name = "WebRTC"
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001383
Anders Carlsson37bbf792018-09-05 16:29:27 +02001384 sources = [
1385 "objc/api/peerconnection/RTCAudioSource.h",
1386 "objc/api/peerconnection/RTCAudioTrack.h",
1387 "objc/api/peerconnection/RTCCertificate.h",
1388 "objc/api/peerconnection/RTCConfiguration.h",
Benjamin Wright8c27cca2018-10-25 10:16:44 -07001389 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001390 "objc/api/peerconnection/RTCDataChannel.h",
1391 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1392 "objc/api/peerconnection/RTCDtmfSender.h",
1393 "objc/api/peerconnection/RTCFieldTrials.h",
1394 "objc/api/peerconnection/RTCIceCandidate.h",
1395 "objc/api/peerconnection/RTCIceServer.h",
1396 "objc/api/peerconnection/RTCIntervalRange.h",
1397 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1398 "objc/api/peerconnection/RTCMediaConstraints.h",
1399 "objc/api/peerconnection/RTCMediaSource.h",
1400 "objc/api/peerconnection/RTCMediaStream.h",
1401 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1402 "objc/api/peerconnection/RTCMetrics.h",
1403 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1404 "objc/api/peerconnection/RTCPeerConnection.h",
1405 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1406 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1407 "objc/api/peerconnection/RTCRtcpParameters.h",
1408 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1409 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1410 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1411 "objc/api/peerconnection/RTCRtpParameters.h",
1412 "objc/api/peerconnection/RTCRtpReceiver.h",
1413 "objc/api/peerconnection/RTCRtpSender.h",
1414 "objc/api/peerconnection/RTCRtpTransceiver.h",
1415 "objc/api/peerconnection/RTCSSLAdapter.h",
1416 "objc/api/peerconnection/RTCSessionDescription.h",
1417 "objc/api/peerconnection/RTCTracing.h",
1418 "objc/api/peerconnection/RTCVideoSource.h",
1419 "objc/api/peerconnection/RTCVideoTrack.h",
1420 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1421 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1422 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1423 "objc/api/video_codec/RTCVideoEncoderVP9.h",
1424 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1425 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
1426 "objc/base/RTCCodecSpecificInfo.h",
1427 "objc/base/RTCEncodedImage.h",
1428 "objc/base/RTCI420Buffer.h",
1429 "objc/base/RTCLogging.h",
1430 "objc/base/RTCMacros.h",
1431 "objc/base/RTCMutableI420Buffer.h",
1432 "objc/base/RTCMutableYUVPlanarBuffer.h",
1433 "objc/base/RTCRtpFragmentationHeader.h",
1434 "objc/base/RTCVideoCapturer.h",
1435 "objc/base/RTCVideoCodecInfo.h",
1436 "objc/base/RTCVideoDecoder.h",
1437 "objc/base/RTCVideoDecoderFactory.h",
1438 "objc/base/RTCVideoEncoder.h",
1439 "objc/base/RTCVideoEncoderFactory.h",
1440 "objc/base/RTCVideoEncoderQpThresholds.h",
1441 "objc/base/RTCVideoEncoderSettings.h",
1442 "objc/base/RTCVideoFrame.h",
1443 "objc/base/RTCVideoFrameBuffer.h",
1444 "objc/base/RTCVideoRenderer.h",
1445 "objc/base/RTCYUVPlanarBuffer.h",
1446 "objc/components/capturer/RTCCameraVideoCapturer.h",
1447 "objc/components/capturer/RTCFileVideoCapturer.h",
1448 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
1449 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
1450 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1451 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1452 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1453 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1454 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1455 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1456 "objc/components/video_codec/RTCVideoDecoderH264.h",
1457 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1458 "objc/components/video_codec/RTCVideoEncoderH264.h",
1459 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1460 "objc/helpers/RTCDispatcher.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001461 ]
Anders Carlsson37bbf792018-09-05 16:29:27 +02001462 if (!build_with_chromium) {
1463 sources += [
1464 "objc/api/logging/RTCCallbackLogger.h",
1465 "objc/api/peerconnection/RTCFileLogger.h",
1466 ]
1467 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001468
1469 deps = [
1470 ":base_objc",
1471 ":default_codec_factory_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001472 ":native_api",
1473 ":native_video",
1474 ":peerconnectionfactory_base_objc",
1475 ":ui_objc",
1476 ":videocapture_objc",
1477 ":videocodec_objc",
1478 ":videotoolbox_objc",
1479 "../rtc_base:rtc_base_approved",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001480 ]
1481 if (rtc_use_metal_rendering) {
1482 deps += [ ":metal_objc" ]
1483 }
1484 if (!build_with_chromium) {
1485 deps += [
1486 ":callback_logger_objc",
1487 ":file_logger_objc",
1488 ]
1489 }
1490
1491 libs = [
1492 "AVFoundation.framework",
1493 "CoreGraphics.framework",
1494 "CoreMedia.framework",
1495 "OpenGL.framework",
1496 ]
1497
Anders Carlsson37bbf792018-09-05 16:29:27 +02001498 configs = [ "..:common_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001499
1500 public_configs = [ ":common_config_objc" ]
1501 }
1502
1503 bundle_data("mac_framework_bundle") {
1504 deps = [
1505 "../sdk:mac_framework_objc",
1506 ]
1507 sources = [
1508 "$root_build_dir/WebRTC.framework",
1509 ]
1510 outputs = [
Anders Carlsson24d8ec32018-12-10 14:04:12 +01001511 "{{bundle_contents_dir}}/Frameworks/{{source_file_part}}",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001512 ]
1513 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001514 }
1515
Anders Carlsson9823ee42018-03-07 10:32:03 +01001516 rtc_static_library("wrapped_native_codec_objc") {
1517 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001518 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.h",
1519 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm",
1520 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.h",
1521 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001522 ]
1523
1524 configs += [ "..:common_objc" ]
1525 public_configs = [ ":common_config_objc" ]
1526
Anders Carlsson9823ee42018-03-07 10:32:03 +01001527 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001528 ":base_objc",
1529 ":helpers_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001530 "../api/video_codecs:video_codecs_api",
1531 "../media:rtc_media_base",
1532 ]
1533 }
1534
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001535 # The native API is currently experimental and may change without notice.
1536 rtc_static_library("native_api") {
1537 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +01001538 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001539 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001540 "objc/native/api/video_capturer.h",
1541 "objc/native/api/video_capturer.mm",
1542 "objc/native/api/video_decoder_factory.h",
1543 "objc/native/api/video_decoder_factory.mm",
1544 "objc/native/api/video_encoder_factory.h",
1545 "objc/native/api/video_encoder_factory.mm",
1546 "objc/native/api/video_frame.h",
1547 "objc/native/api/video_frame.mm",
1548 "objc/native/api/video_frame_buffer.h",
1549 "objc/native/api/video_frame_buffer.mm",
1550 "objc/native/api/video_renderer.h",
1551 "objc/native/api/video_renderer.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001552 ]
1553
1554 configs += [ "..:common_objc" ]
1555
1556 public_configs = [ ":common_config_objc" ]
1557
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001558 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001559 ":base_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001560 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001561 ":videoframebuffer_objc",
Anders Carlsson73119182018-03-15 09:41:03 +01001562 "../api:libjingle_peerconnection_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +01001563 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001564 "../api/video:video_frame",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001565 "../api/video_codecs:video_codecs_api",
1566 "../common_video",
1567 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +02001568 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001569 ]
1570 }
1571
1572 rtc_static_library("native_video") {
1573 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001574 "objc/native/src/objc_frame_buffer.h",
1575 "objc/native/src/objc_frame_buffer.mm",
1576 "objc/native/src/objc_video_decoder_factory.h",
1577 "objc/native/src/objc_video_decoder_factory.mm",
1578 "objc/native/src/objc_video_encoder_factory.h",
1579 "objc/native/src/objc_video_encoder_factory.mm",
1580 "objc/native/src/objc_video_frame.h",
1581 "objc/native/src/objc_video_frame.mm",
1582 "objc/native/src/objc_video_renderer.h",
1583 "objc/native/src/objc_video_renderer.mm",
1584 "objc/native/src/objc_video_track_source.h",
1585 "objc/native/src/objc_video_track_source.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001586 ]
1587
1588 configs += [ "..:common_objc" ]
1589
1590 public_configs = [ ":common_config_objc" ]
1591
1592 if (!build_with_chromium && is_clang) {
1593 # Suppress warnings from the Chromium Clang plugin
1594 # (bugs.webrtc.org/163).
1595 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1596 }
1597
1598 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001599 ":base_native_additions_objc",
1600 ":base_objc",
1601 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001602 ":videocodec_objc",
1603 ":videoframebuffer_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001604 ":vpx_codec_constants",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001605 ":wrapped_native_codec_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001606 "../api/video:video_frame",
1607 "../api/video:video_frame_i420",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001608 "../api/video_codecs:video_codecs_api",
1609 "../common_video",
1610 "../media:rtc_audio_video",
1611 "../media:rtc_media_base",
1612 "../modules:module_api",
1613 "../modules/video_coding:video_codec_interface",
1614 "../rtc_base:checks",
1615 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +02001616 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001617 ]
1618 }
1619
mbonadeic0af5ac2017-08-24 12:26:05 -07001620 rtc_static_library("video_toolbox_cc") {
Artem Titarenko42b43152018-10-29 18:18:09 +01001621 visibility = [
1622 ":videotoolbox_objc",
1623 ":sdk_unittests_sources",
1624 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001625 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001626 "objc/components/video_codec/helpers.cc",
1627 "objc/components/video_codec/helpers.h",
1628 "objc/components/video_codec/nalu_rewriter.cc",
1629 "objc/components/video_codec/nalu_rewriter.h",
mbonadeic0af5ac2017-08-24 12:26:05 -07001630 ]
1631 deps = [
1632 "../common_video",
1633 "../modules:module_api",
1634 "../modules/video_coding:webrtc_h264",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001635 "../rtc_base:checks",
mbonadeic0af5ac2017-08-24 12:26:05 -07001636 "../rtc_base:rtc_base_approved",
1637 ]
mbonadeic0af5ac2017-08-24 12:26:05 -07001638 }
1639
1640 rtc_static_library("videotoolbox_objc") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001641 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +01001642 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadeic0af5ac2017-08-24 12:26:05 -07001643 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001644 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1645 "objc/components/video_codec/RTCVideoDecoderFactoryH264.m",
1646 "objc/components/video_codec/RTCVideoDecoderH264.h",
1647 "objc/components/video_codec/RTCVideoDecoderH264.mm",
1648 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1649 "objc/components/video_codec/RTCVideoEncoderFactoryH264.m",
1650 "objc/components/video_codec/RTCVideoEncoderH264.h",
1651 "objc/components/video_codec/RTCVideoEncoderH264.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001652 ]
1653
Anders Carlsson358f2e02018-06-04 10:24:37 +02001654 configs += [
1655 "..:common_objc",
1656 ":used_from_extension",
1657 ]
1658
1659 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
1660 defines = [ "RTC_APPRTCMOBILE_BROADCAST_EXTENSION" ]
1661 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001662
1663 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001664 ":base_native_additions_objc",
1665 ":base_objc",
1666 ":helpers_objc",
mbonadeic0af5ac2017-08-24 12:26:05 -07001667 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001668 ":videocodec_objc",
1669 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001670 "../common_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001671 "../modules:module_api",
Patrik Höglund99175c62018-01-08 11:05:10 +01001672 "../modules/video_coding:video_codec_interface",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001673 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001674 "../rtc_base:rtc_base_approved",
Mirko Bonadei401d0562017-12-14 11:24:00 +01001675 "//third_party/libyuv",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001676 ]
1677
1678 libs = [
1679 "CoreFoundation.framework",
1680 "CoreMedia.framework",
1681 "CoreVideo.framework",
1682 "VideoToolbox.framework",
1683 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001684 }
1685 }
tkchin9eeb6242016-04-27 01:54:20 -07001686}