blob: 98de1a3006145b39a40e5d4da5c7093f0a848c2c [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) {
11 import("//build/config/ios/rules.gni")
oprypin45197522017-06-22 01:47:20 -070012 import("//build/config/ios/ios_sdk.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
kthelgasoncc2d1c62016-11-09 07:44:27 -080030if (is_ios || is_mac) {
kthelgason36d658d2017-08-24 05:43:45 -070031 config("common_config_objc") {
kjellander080a1e32016-05-25 11:37:11 -070032 include_dirs = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020033 "objc",
34
35 # This is needed so that framework headers can include base headers
36 # without pathname (so it works from within the framework module).
37 "objc/base",
38
39 # This is here for backward compatiblity reasons.
40 "objc/Framework/Headers", # TODO(bugs.webrtc.org/9627): Remove this.
kjellander080a1e32016-05-25 11:37:11 -070041 ]
Kári Tristan Helgason47d3a012017-10-24 15:28:51 +020042 cflags = [
43 "-Wstrict-overflow",
44 "-Wmissing-field-initializers",
45 ]
Artem Titarenko17ad64e2018-09-19 17:53:59 +020046
47 if (use_clang_coverage) {
48 configs = [ "//build/config/coverage:default_coverage" ]
49 }
kjellander080a1e32016-05-25 11:37:11 -070050 }
51
Anders Carlsson358f2e02018-06-04 10:24:37 +020052 config("used_from_extension") {
53 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
54 cflags = [ "-fapplication-extension" ]
55 }
56 }
57
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020058 # TODO(bugs.webrtc.org/9627): Remove this when unused. Targets should depend on base_objc
59 # or helpers_objc directly instead.
kthelgason36d658d2017-08-24 05:43:45 -070060 rtc_static_library("common_objc") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +020061 visibility = [ "*" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020062
tkchin9eeb6242016-04-27 01:54:20 -070063 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020064 "objc/helpers/noop.mm",
65 ]
66
67 public_configs = [ ":common_config_objc" ]
68
69 deps = [
70 ":base_objc",
71 ":helpers_objc",
72 ]
73 }
74
75 rtc_static_library("base_objc") {
76 visibility = [ "*" ]
77 sources = [
78 "objc/base/RTCCodecSpecificInfo.h",
79 "objc/base/RTCEncodedImage.h",
80 "objc/base/RTCEncodedImage.m",
81 "objc/base/RTCI420Buffer.h",
82 "objc/base/RTCLogging.h",
83 "objc/base/RTCLogging.mm",
84 "objc/base/RTCMacros.h",
85 "objc/base/RTCMutableI420Buffer.h",
86 "objc/base/RTCMutableYUVPlanarBuffer.h",
87 "objc/base/RTCRtpFragmentationHeader.h",
88 "objc/base/RTCRtpFragmentationHeader.m",
89 "objc/base/RTCVideoCapturer.h",
90 "objc/base/RTCVideoCapturer.m",
91 "objc/base/RTCVideoCodecInfo.h",
92 "objc/base/RTCVideoCodecInfo.m",
93 "objc/base/RTCVideoDecoder.h",
94 "objc/base/RTCVideoDecoderFactory.h",
95 "objc/base/RTCVideoEncoder.h",
96 "objc/base/RTCVideoEncoderFactory.h",
97 "objc/base/RTCVideoEncoderQpThresholds.h",
98 "objc/base/RTCVideoEncoderQpThresholds.m",
99 "objc/base/RTCVideoEncoderSettings.h",
100 "objc/base/RTCVideoEncoderSettings.m",
101 "objc/base/RTCVideoFrame.h",
102 "objc/base/RTCVideoFrame.mm",
103 "objc/base/RTCVideoFrameBuffer.h",
104 "objc/base/RTCVideoRenderer.h",
105 "objc/base/RTCYUVPlanarBuffer.h",
tkchin9eeb6242016-04-27 01:54:20 -0700106 ]
denicijad2088152017-04-28 02:14:54 -0700107
mbonadei1e060c62017-04-21 00:02:02 -0700108 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100109 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700110 "../rtc_base:rtc_base",
mbonadei1e060c62017-04-21 00:02:02 -0700111 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200112 configs += [
113 "..:common_objc",
114 ":used_from_extension",
115 ]
kthelgasonc0977102017-04-24 00:57:16 -0700116
kthelgason36d658d2017-08-24 05:43:45 -0700117 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200118 }
119
120 rtc_static_library("helpers_objc") {
121 sources = [
122 "objc/helpers/AVCaptureSession+DevicePosition.h",
123 "objc/helpers/AVCaptureSession+DevicePosition.mm",
124 "objc/helpers/NSString+StdString.h",
125 "objc/helpers/NSString+StdString.mm",
126 "objc/helpers/RTCDispatcher+Private.h",
127 "objc/helpers/RTCDispatcher.h",
128 "objc/helpers/RTCDispatcher.m",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200129 "objc/helpers/scoped_cftyperef.h",
130 ]
131
132 deps = [
133 ":base_objc",
134 "../rtc_base:checks",
135 ]
136
137 libs = [
138 "AVFoundation.framework",
139 "CoreMedia.framework",
140 ]
141
142 configs += [
143 "..:common_objc",
144 ":used_from_extension",
145 ]
146
147 public_configs = [ ":common_config_objc" ]
denicijad2088152017-04-28 02:14:54 -0700148
kjellander3bcedd32016-06-08 01:14:15 -0700149 if (is_ios) {
150 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200151 "objc/helpers/RTCCameraPreviewView.h",
152 "objc/helpers/RTCCameraPreviewView.m",
153 "objc/helpers/UIDevice+RTCDevice.h",
154 "objc/helpers/UIDevice+RTCDevice.mm",
155 ]
156 }
157 }
158
159 if (!build_with_chromium) {
160 rtc_static_library("callback_logger_objc") {
161 sources = [
162 "objc/api/logging/RTCCallbackLogger.h",
163 "objc/api/logging/RTCCallbackLogger.mm",
164 ]
165
166 deps = [
167 ":base_objc",
168 "../rtc_base:checks",
169 "../rtc_base:logging",
170 "../rtc_base:rtc_base",
171 ]
172
173 configs += [
174 "..:common_objc",
175 ":used_from_extension",
kjellander3bcedd32016-06-08 01:14:15 -0700176 ]
denicijad2088152017-04-28 02:14:54 -0700177 }
178
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200179 rtc_static_library("file_logger_objc") {
180 sources = [
181 "objc/api/peerconnection/RTCFileLogger.h",
182 "objc/api/peerconnection/RTCFileLogger.mm",
183 ]
184
185 deps = [
186 ":base_objc",
187 "../rtc_base:checks",
188 "../rtc_base:logging",
189 "../rtc_base:rtc_base",
190 ]
191
192 configs += [
193 "..:common_objc",
194 ":used_from_extension",
kthelgason2f088792017-05-30 01:48:47 -0700195 ]
196 }
197 }
198
mbonadei2c8ac1b2017-05-31 05:14:26 -0700199 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100200 if (is_ios) {
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200201 rtc_static_library("native_api_audio_device_module") {
202 visibility = [ "*" ]
203
204 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200205 "objc/native/api/audio_device_module.h",
206 "objc/native/api/audio_device_module.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200207 ]
208
209 deps = [
210 ":audio_device",
211 "../modules/audio_device:audio_device_api",
212 "../modules/audio_device:audio_device_generic",
213 "../rtc_base:checks",
214 "../rtc_base:rtc_base_approved",
215 "../system_wrappers",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200216 ]
217
218 if (is_clang) {
219 # Suppress warnings from the Chromium Clang plugin
220 # (bugs.webrtc.org/163).
221 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
222 }
223 }
224
225 rtc_source_set("audio_session_observer") {
226 visibility = [ ":*" ]
227
228 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200229 "objc/native/src/audio/audio_session_observer.h",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200230 ]
231
232 deps = [
233 "../rtc_base:rtc_base",
234 ]
235 }
236
237 rtc_static_library("audio_device") {
238 visibility = [ "*" ]
239
240 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200241 "objc/native/src/audio/audio_device_ios.h",
242 "objc/native/src/audio/audio_device_ios.mm",
243 "objc/native/src/audio/audio_device_module_ios.h",
244 "objc/native/src/audio/audio_device_module_ios.mm",
245 "objc/native/src/audio/helpers.h",
246 "objc/native/src/audio/helpers.mm",
247 "objc/native/src/audio/voice_processing_audio_unit.h",
248 "objc/native/src/audio/voice_processing_audio_unit.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200249 ]
250
251 deps = [
252 ":audio_objc",
253 ":audio_session_observer",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200254 ":base_objc",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200255 "../api:array_view",
256 "../modules/audio_device:audio_device_api",
257 "../modules/audio_device:audio_device_buffer",
258 "../modules/audio_device:audio_device_generic",
259 "../rtc_base:checks",
260 "../rtc_base:rtc_base",
261 "../rtc_base/system:fallthrough",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200262 "../system_wrappers:metrics",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200263 ]
264
Jiawei Ouc9e6b962018-10-09 12:33:06 -0700265 libs = [ "AudioToolbox.framework" ]
266
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200267 if (is_clang) {
268 # Suppress warnings from the Chromium Clang plugin
269 # (bugs.webrtc.org/163).
270 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
271 }
272 }
273
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100274 rtc_static_library("audio_objc") {
275 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200276 "objc/components/audio/RTCAudioSession+Configuration.mm",
277 "objc/components/audio/RTCAudioSession+Private.h",
278 "objc/components/audio/RTCAudioSession.h",
279 "objc/components/audio/RTCAudioSession.mm",
280 "objc/components/audio/RTCAudioSessionConfiguration.h",
281 "objc/components/audio/RTCAudioSessionConfiguration.m",
282 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.h",
283 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100284 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200285 configs += [
286 "..:common_objc",
287 ":used_from_extension",
288 ]
denicija59ee91b2017-06-05 05:48:47 -0700289
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100290 public_configs = [ ":common_config_objc" ]
Anders Carlsson8ecfd802017-09-15 14:07:30 +0200291
Jiawei Ouc9e6b962018-10-09 12:33:06 -0700292 libs = [ "AVFoundation.framework" ]
293
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100294 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200295 ":audio_session_observer",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200296 ":base_objc",
297 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100298 "../rtc_base:checks",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200299 "../rtc_base:rtc_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100300 "../rtc_base:rtc_base_approved",
301 ]
denicija59ee91b2017-06-05 05:48:47 -0700302 }
303 }
zhihuanga4c113a2017-06-28 14:05:44 -0700304
Anders Carlsson9823ee42018-03-07 10:32:03 +0100305 rtc_static_library("videosource_objc") {
zhihuanga4c113a2017-06-28 14:05:44 -0700306 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200307 "objc/api/peerconnection/RTCVideoSource+Private.h",
308 "objc/api/peerconnection/RTCVideoSource.h",
309 "objc/api/peerconnection/RTCVideoSource.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700310 ]
311
312 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200313 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100314 ":mediasource_objc",
315 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100316 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700317 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200318 "../api/video:video_frame",
319 "../api/video:video_frame_i420",
zhihuanga4c113a2017-06-28 14:05:44 -0700320 "../common_video",
321 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100322 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700323 "../rtc_base:rtc_base",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100324 "//third_party/libyuv",
zhihuanga4c113a2017-06-28 14:05:44 -0700325 ]
326
Anders Carlsson358f2e02018-06-04 10:24:37 +0200327 configs += [
328 "..:common_objc",
329 ":used_from_extension",
330 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700331 }
332
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100333 rtc_static_library("videoframebuffer_objc") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200334 visibility = [ "*" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100335 sources = [
Anders Carlsson4e5af962018-09-03 14:44:50 +0200336 "objc/api/video_frame_buffer/RTCNativeI420Buffer+Private.h",
337 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
338 "objc/api/video_frame_buffer/RTCNativeI420Buffer.mm",
339 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
340 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200341 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
342 "objc/components/video_frame_buffer/RTCCVPixelBuffer.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100343 ]
344 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200345 ":base_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200346 "//api/video:video_frame",
347 "//api/video:video_frame_i420",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100348 "//common_video",
349 "//rtc_base:checks",
350 "//rtc_base:rtc_base_approved",
351 "//third_party/libyuv",
352 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200353 configs += [
354 "..:common_objc",
355 ":used_from_extension",
356 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100357 }
358
kthelgason36d658d2017-08-24 05:43:45 -0700359 rtc_static_library("video_objc") {
kthelgason2f088792017-05-30 01:48:47 -0700360 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200361 "objc/components/renderer/opengl/RTCDefaultShader.h",
362 "objc/components/renderer/opengl/RTCDefaultShader.mm",
363 "objc/components/renderer/opengl/RTCI420TextureCache.h",
364 "objc/components/renderer/opengl/RTCI420TextureCache.mm",
365 "objc/components/renderer/opengl/RTCOpenGLDefines.h",
366 "objc/components/renderer/opengl/RTCShader.h",
367 "objc/components/renderer/opengl/RTCShader.mm",
368 "objc/components/renderer/opengl/RTCVideoViewShading.h",
kthelgason2f088792017-05-30 01:48:47 -0700369 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700370 libs = []
denicijad2088152017-04-28 02:14:54 -0700371 if (is_ios) {
denicija070d5e32017-02-26 11:44:13 -0800372 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200373 "objc/components/renderer/opengl/RTCNV12TextureCache.h",
374 "objc/components/renderer/opengl/RTCNV12TextureCache.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700375 ]
376 libs += [
377 "GLKit.framework",
378 "OpenGLES.framework",
379 "QuartzCore.framework",
380 ]
381 } else if (is_mac) {
mbonadei2c8ac1b2017-05-31 05:14:26 -0700382 libs += [
383 "CoreMedia.framework",
384 "CoreVideo.framework",
385 "OpenGL.framework",
denicija070d5e32017-02-26 11:44:13 -0800386 ]
387 }
mbonadei2c8ac1b2017-05-31 05:14:26 -0700388
kthelgason2f088792017-05-30 01:48:47 -0700389 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200390 ":base_objc",
391 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100392 ":mediaconstraints_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100393 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100394 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100395 ":videosource_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700396 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200397 "../api/video:video_frame",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700398 "../common_video",
399 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100400 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700401 "../rtc_base:rtc_base",
Danil Chapovalov196100e2018-06-21 10:17:24 +0200402 "//third_party/abseil-cpp/absl/types:optional",
tkchin9eeb6242016-04-27 01:54:20 -0700403 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700404
Anders Carlsson358f2e02018-06-04 10:24:37 +0200405 configs += [
406 "..:common_objc",
407 ":used_from_extension",
408 ]
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800409 }
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800410
kthelgason36d658d2017-08-24 05:43:45 -0700411 rtc_static_library("ui_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000412 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200413 allow_poison = [
414 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
415 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
416 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700417 if (is_ios) {
418 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200419 "objc/components/renderer/opengl/RTCDisplayLinkTimer.h",
420 "objc/components/renderer/opengl/RTCDisplayLinkTimer.m",
421 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
422 "objc/components/renderer/opengl/RTCEAGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700423 ]
424 }
425 if (is_mac) {
426 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200427 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
428 "objc/components/renderer/opengl/RTCNSGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700429 ]
430 }
431 configs += [ "..:common_objc" ]
432 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200433 ":base_objc",
434 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100435 ":video_objc",
436 ":videocapture_objc",
437 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700438 ]
439 }
kthelgasonebc34e72016-09-15 04:30:18 -0700440
mbonadei2c8ac1b2017-05-31 05:14:26 -0700441 if (rtc_use_metal_rendering) {
kthelgason36d658d2017-08-24 05:43:45 -0700442 rtc_static_library("metal_objc") {
Mirko Bonadeid68956d2018-02-16 17:55:36 +0100443 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200444 allow_poison = [
445 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
446 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
447 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700448 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200449 "objc/components/renderer/metal/RTCMTLI420Renderer.h",
450 "objc/components/renderer/metal/RTCMTLI420Renderer.mm",
451 "objc/components/renderer/metal/RTCMTLRenderer+Private.h",
452 "objc/components/renderer/metal/RTCMTLRenderer.h",
453 "objc/components/renderer/metal/RTCMTLRenderer.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700454 ]
455 if (is_ios) {
456 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200457 "objc/components/renderer/metal/RTCMTLNV12Renderer.h",
458 "objc/components/renderer/metal/RTCMTLNV12Renderer.mm",
459 "objc/components/renderer/metal/RTCMTLRGBRenderer.h",
460 "objc/components/renderer/metal/RTCMTLRGBRenderer.mm",
461 "objc/components/renderer/metal/RTCMTLVideoView.h",
462 "objc/components/renderer/metal/RTCMTLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700463 ]
464 }
465 if (is_mac) {
466 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200467 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
468 "objc/components/renderer/metal/RTCMTLNSVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700469 ]
470 }
471 libs = [
472 "CoreVideo.framework",
473 "Metal.framework",
474 "MetalKit.framework",
475 ]
476 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200477 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100478 ":peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700479 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100480 ":videoframebuffer_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200481 "../api/video:video_frame",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100482 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700483 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700484 ]
485 configs += [ "..:common_objc" ]
kthelgason36d658d2017-08-24 05:43:45 -0700486 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700487 }
488 }
489
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200490 # TODO(bugs.webrtc.org/9627): Remove this target.
Anders Carlsson73119182018-03-15 09:41:03 +0100491 rtc_static_library("videocapturebase_objc") {
492 visibility = [ "*" ]
493 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200494 "objc/helpers/noop.mm",
Anders Carlsson73119182018-03-15 09:41:03 +0100495 ]
Anders Carlsson73119182018-03-15 09:41:03 +0100496
497 configs += [ "..:common_objc" ]
498
499 public_configs = [ ":common_config_objc" ]
500
501 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200502 ":base_objc",
Anders Carlsson73119182018-03-15 09:41:03 +0100503 ":videoframebuffer_objc",
504 ]
505 }
506
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100507 rtc_static_library("videocapture_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000508 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200509 allow_poison = [
510 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
511 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
512 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700513 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200514 "objc/components/capturer/RTCCameraVideoCapturer.h",
515 "objc/components/capturer/RTCCameraVideoCapturer.m",
zhihuanga4c113a2017-06-28 14:05:44 -0700516 ]
517 if (is_ios) {
518 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200519 "objc/components/capturer/RTCFileVideoCapturer.h",
520 "objc/components/capturer/RTCFileVideoCapturer.m",
zhihuanga4c113a2017-06-28 14:05:44 -0700521 ]
522 }
523 libs = [ "AVFoundation.framework" ]
524
zhihuanga4c113a2017-06-28 14:05:44 -0700525 configs += [ "..:common_objc" ]
526
kthelgason36d658d2017-08-24 05:43:45 -0700527 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700528
zhihuanga4c113a2017-06-28 14:05:44 -0700529 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200530 ":base_objc",
531 ":helpers_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700532 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100533 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700534 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700535 }
536
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100537 rtc_static_library("videocodec_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200538 visibility = [ "*" ]
Mirko Bonadei96ede162018-09-06 13:45:44 +0200539 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100540 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200541 "objc/components/video_codec/RTCCodecSpecificInfoH264+Private.h",
542 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
543 "objc/components/video_codec/RTCCodecSpecificInfoH264.mm",
544 "objc/components/video_codec/RTCH264ProfileLevelId.h",
545 "objc/components/video_codec/RTCH264ProfileLevelId.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700546 ]
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300547 if (is_ios) {
548 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200549 "objc/components/video_codec/UIDevice+H264Profile.h",
550 "objc/components/video_codec/UIDevice+H264Profile.mm",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300551 ]
552 }
zhihuanga4c113a2017-06-28 14:05:44 -0700553 if (!build_with_chromium && is_clang) {
554 # Suppress warnings from the Chromium Clang plugin
555 # (bugs.webrtc.org/163).
556 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
557 }
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100558 public_configs = [ ":common_config_objc" ]
559 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200560 ":base_objc",
561 ":helpers_objc",
kthelgasonfb143122017-07-25 07:55:58 -0700562 "../api/video_codecs:video_codecs_api",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100563 "../common_video",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300564 "../media:rtc_h264_profile_id",
zhihuanga4c113a2017-06-28 14:05:44 -0700565 "../media:rtc_media_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100566 "../modules:module_api",
567 "../modules/video_coding:video_codec_interface",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200568 "../rtc_base:checks",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100569 "../rtc_base:rtc_base_approved",
zhihuanga4c113a2017-06-28 14:05:44 -0700570 ]
571 }
572
Anders Carlssondd8c1652018-01-30 10:32:13 +0100573 rtc_static_library("default_codec_factory_objc") {
574 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200575 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
576 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.m",
577 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
578 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.m",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100579 ]
580
581 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200582 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100583 ":native_video",
584 ":videocodec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200585 ":videotoolbox_objc",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +0200586 ":vp8",
587 ":vp9",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200588 ":vpx_codec_constants",
589 ]
590 }
591
592 rtc_static_library("vpx_codec_constants") {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200593 configs += [ "..:no_global_constructors" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200594 sources = [
595 "objc/api/video_codec/RTCVideoCodecConstants.h",
596 "objc/api/video_codec/RTCVideoCodecConstants.mm",
597 ]
598
599 deps = [
600 ":base_objc",
601 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100602 ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100603 }
604
605 rtc_static_library("vp8") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100606 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200607 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100608 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200609 "objc/api/video_codec/RTCVideoDecoderVP8.h",
610 "objc/api/video_codec/RTCVideoDecoderVP8.mm",
611 "objc/api/video_codec/RTCVideoEncoderVP8.h",
612 "objc/api/video_codec/RTCVideoEncoderVP8.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100613 ]
614
Anders Carlssondd8c1652018-01-30 10:32:13 +0100615 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200616 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100617 ":wrapped_native_codec_objc",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100618 "../modules/video_coding:webrtc_vp8",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100619 ]
620 }
621
622 rtc_static_library("vp9") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100623 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200624 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100625 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200626 "objc/api/video_codec/RTCVideoDecoderVP9.h",
627 "objc/api/video_codec/RTCVideoDecoderVP9.mm",
628 "objc/api/video_codec/RTCVideoEncoderVP9.h",
629 "objc/api/video_codec/RTCVideoEncoderVP9.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100630 ]
631
Anders Carlssondd8c1652018-01-30 10:32:13 +0100632 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200633 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100634 ":wrapped_native_codec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200635 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100636 "../modules/video_coding:webrtc_vp9",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100637 ]
638 }
639
zhihuanga4c113a2017-06-28 14:05:44 -0700640 # Build the PeerConnectionFactory without audio/video support.
641 # This target depends on the objc_peeerconnectionfactory_base which still
642 # includes some audio/video related objects such as RTCAudioSource because
643 # these objects are just thin wrappers of native C++ interfaces required
644 # when implementing webrtc::PeerConnectionFactoryInterface and
645 # webrtc::PeerConnectionInterface.
Kári Tristan Helgasona2d89fc2018-03-06 10:18:43 +0100646 # The applications which only use WebRTC DataChannel can depend on this.
kthelgason36d658d2017-08-24 05:43:45 -0700647 rtc_static_library("peerconnectionfactory_no_media_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000648 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200649 allow_poison = [
650 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
651 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
652 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700653 defines = [ "HAVE_NO_MEDIA" ]
654
655 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200656 "objc/helpers/noop.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700657 ]
658
kthelgason36d658d2017-08-24 05:43:45 -0700659 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700660
zhihuanga4c113a2017-06-28 14:05:44 -0700661 deps = [
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100662 ":native_api",
663 ":native_video",
kthelgason36d658d2017-08-24 05:43:45 -0700664 ":peerconnectionfactory_base_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700665 "../api:libjingle_peerconnection_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700666 "../rtc_base:rtc_base",
zhihuanga4c113a2017-06-28 14:05:44 -0700667 ]
668 }
669
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100670 rtc_static_library("mediaconstraints_objc") {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200671 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100672 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200673 "objc/api/peerconnection/RTCMediaConstraints+Private.h",
674 "objc/api/peerconnection/RTCMediaConstraints.h",
675 "objc/api/peerconnection/RTCMediaConstraints.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100676 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100677
678 public_configs = [ ":common_config_objc" ]
679 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200680 ":base_objc",
681 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100682 "../api:libjingle_peerconnection_api",
683 ]
684 }
685
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200686 # TODO(bugs.webrtc.org/9627): Remove, targets should depend on base_objc.
Anders Carlsson9823ee42018-03-07 10:32:03 +0100687 rtc_source_set("videorenderer_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200688 visibility = [ "*" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100689 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200690 "objc/helpers/noop.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100691 ]
692
693 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100694 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200695
696 deps = [
697 ":base_objc",
698 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100699 }
700
701 rtc_static_library("videorendereradapter_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200702 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200703 allow_poison = [
704 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
705 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
706 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100707 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200708 "objc/api/RTCVideoRendererAdapter+Private.h",
709 "objc/api/RTCVideoRendererAdapter.h",
710 "objc/api/RTCVideoRendererAdapter.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100711 ]
712
713 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100714 public_configs = [ ":common_config_objc" ]
715
716 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200717 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100718 ":native_api",
719 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100720 "../api:libjingle_peerconnection_api",
721 ]
722 }
723
724 rtc_static_library("mediasource_objc") {
725 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200726 "objc/api/peerconnection/RTCMediaSource+Private.h",
727 "objc/api/peerconnection/RTCMediaSource.h",
728 "objc/api/peerconnection/RTCMediaSource.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100729 ]
730
Anders Carlsson358f2e02018-06-04 10:24:37 +0200731 configs += [
732 "..:common_objc",
733 ":used_from_extension",
734 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100735 public_configs = [ ":common_config_objc" ]
736
737 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200738 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100739 "../api:libjingle_peerconnection_api",
740 "../rtc_base:checks",
741 ]
742 }
743
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200744 rtc_static_library("base_native_additions_objc") {
745 sources = [
746 "objc/api/peerconnection/RTCEncodedImage+Private.h",
747 "objc/api/peerconnection/RTCEncodedImage+Private.mm",
748 "objc/api/peerconnection/RTCRtpFragmentationHeader+Private.h",
749 "objc/api/peerconnection/RTCRtpFragmentationHeader+Private.mm",
750 "objc/api/peerconnection/RTCVideoCodecInfo+Private.h",
751 "objc/api/peerconnection/RTCVideoCodecInfo+Private.mm",
752 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.h",
753 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.mm",
754 ]
755
756 configs += [ "..:common_objc" ]
757
758 public_configs = [ ":common_config_objc" ]
759
760 deps = [
761 ":base_objc",
762 ":helpers_objc",
Niels Möller4dc66c52018-10-05 14:17:58 +0200763 "../api/video:encoded_image",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200764 "../api/video_codecs:video_codecs_api",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200765 "../modules:module_api",
766 "../modules/video_coding:video_codec_interface",
767 "../rtc_base:rtc_base",
768 ]
769
770 if (!build_with_chromium && is_clang) {
771 # Suppress warnings from the Chromium Clang plugin
772 # (bugs.webrtc.org/163).
773 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
774 }
775 }
776
kthelgason36d658d2017-08-24 05:43:45 -0700777 rtc_static_library("peerconnectionfactory_base_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200778 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200779 allow_poison = [
780 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
781 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
782 ]
Mirko Bonadei96ede162018-09-06 13:45:44 +0200783 configs += [
784 "..:no_exit_time_destructors",
785 "..:no_global_constructors",
786 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700787 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200788 "objc/api/peerconnection/RTCAudioSource+Private.h",
789 "objc/api/peerconnection/RTCAudioSource.h",
790 "objc/api/peerconnection/RTCAudioSource.mm",
791 "objc/api/peerconnection/RTCAudioTrack+Private.h",
792 "objc/api/peerconnection/RTCAudioTrack.h",
793 "objc/api/peerconnection/RTCAudioTrack.mm",
794 "objc/api/peerconnection/RTCCertificate.h",
795 "objc/api/peerconnection/RTCCertificate.mm",
796 "objc/api/peerconnection/RTCConfiguration+Native.h",
797 "objc/api/peerconnection/RTCConfiguration+Private.h",
798 "objc/api/peerconnection/RTCConfiguration.h",
799 "objc/api/peerconnection/RTCConfiguration.mm",
Benjamin Wright8c27cca2018-10-25 10:16:44 -0700800 "objc/api/peerconnection/RTCCryptoOptions.h",
801 "objc/api/peerconnection/RTCCryptoOptions.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200802 "objc/api/peerconnection/RTCDataChannel+Private.h",
803 "objc/api/peerconnection/RTCDataChannel.h",
804 "objc/api/peerconnection/RTCDataChannel.mm",
805 "objc/api/peerconnection/RTCDataChannelConfiguration+Private.h",
806 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
807 "objc/api/peerconnection/RTCDataChannelConfiguration.mm",
808 "objc/api/peerconnection/RTCDtmfSender+Private.h",
809 "objc/api/peerconnection/RTCDtmfSender.h",
810 "objc/api/peerconnection/RTCDtmfSender.mm",
811 "objc/api/peerconnection/RTCFieldTrials.h",
812 "objc/api/peerconnection/RTCFieldTrials.mm",
813 "objc/api/peerconnection/RTCIceCandidate+Private.h",
814 "objc/api/peerconnection/RTCIceCandidate.h",
815 "objc/api/peerconnection/RTCIceCandidate.mm",
816 "objc/api/peerconnection/RTCIceServer+Private.h",
817 "objc/api/peerconnection/RTCIceServer.h",
818 "objc/api/peerconnection/RTCIceServer.mm",
819 "objc/api/peerconnection/RTCIntervalRange+Private.h",
820 "objc/api/peerconnection/RTCIntervalRange.h",
821 "objc/api/peerconnection/RTCIntervalRange.mm",
822 "objc/api/peerconnection/RTCLegacyStatsReport+Private.h",
823 "objc/api/peerconnection/RTCLegacyStatsReport.h",
824 "objc/api/peerconnection/RTCLegacyStatsReport.mm",
825 "objc/api/peerconnection/RTCMediaStream+Private.h",
826 "objc/api/peerconnection/RTCMediaStream.h",
827 "objc/api/peerconnection/RTCMediaStream.mm",
828 "objc/api/peerconnection/RTCMediaStreamTrack+Private.h",
829 "objc/api/peerconnection/RTCMediaStreamTrack.h",
830 "objc/api/peerconnection/RTCMediaStreamTrack.mm",
831 "objc/api/peerconnection/RTCMetrics.h",
832 "objc/api/peerconnection/RTCMetrics.mm",
833 "objc/api/peerconnection/RTCMetricsSampleInfo+Private.h",
834 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
835 "objc/api/peerconnection/RTCMetricsSampleInfo.mm",
836 "objc/api/peerconnection/RTCPeerConnection+DataChannel.mm",
837 "objc/api/peerconnection/RTCPeerConnection+Native.h",
838 "objc/api/peerconnection/RTCPeerConnection+Private.h",
839 "objc/api/peerconnection/RTCPeerConnection+Stats.mm",
840 "objc/api/peerconnection/RTCPeerConnection.h",
841 "objc/api/peerconnection/RTCPeerConnection.mm",
842 "objc/api/peerconnection/RTCPeerConnectionFactory+Native.h",
843 "objc/api/peerconnection/RTCPeerConnectionFactory+Private.h",
844 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
845 "objc/api/peerconnection/RTCPeerConnectionFactory.mm",
846 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.h",
847 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.mm",
848 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.h",
849 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.mm",
850 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions+Private.h",
851 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
852 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.mm",
853 "objc/api/peerconnection/RTCRtcpParameters+Private.h",
854 "objc/api/peerconnection/RTCRtcpParameters.h",
855 "objc/api/peerconnection/RTCRtcpParameters.mm",
856 "objc/api/peerconnection/RTCRtpCodecParameters+Private.h",
857 "objc/api/peerconnection/RTCRtpCodecParameters.h",
858 "objc/api/peerconnection/RTCRtpCodecParameters.mm",
859 "objc/api/peerconnection/RTCRtpEncodingParameters+Private.h",
860 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
861 "objc/api/peerconnection/RTCRtpEncodingParameters.mm",
862 "objc/api/peerconnection/RTCRtpHeaderExtension+Private.h",
863 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
864 "objc/api/peerconnection/RTCRtpHeaderExtension.mm",
865 "objc/api/peerconnection/RTCRtpParameters+Private.h",
866 "objc/api/peerconnection/RTCRtpParameters.h",
867 "objc/api/peerconnection/RTCRtpParameters.mm",
Benjamin Wrightddf1a3e2018-10-02 10:20:58 -0700868 "objc/api/peerconnection/RTCRtpReceiver+Native.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200869 "objc/api/peerconnection/RTCRtpReceiver+Private.h",
870 "objc/api/peerconnection/RTCRtpReceiver.h",
871 "objc/api/peerconnection/RTCRtpReceiver.mm",
Benjamin Wrightddf1a3e2018-10-02 10:20:58 -0700872 "objc/api/peerconnection/RTCRtpSender+Native.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200873 "objc/api/peerconnection/RTCRtpSender+Private.h",
874 "objc/api/peerconnection/RTCRtpSender.h",
875 "objc/api/peerconnection/RTCRtpSender.mm",
876 "objc/api/peerconnection/RTCRtpTransceiver+Private.h",
877 "objc/api/peerconnection/RTCRtpTransceiver.h",
878 "objc/api/peerconnection/RTCRtpTransceiver.mm",
879 "objc/api/peerconnection/RTCSSLAdapter.h",
880 "objc/api/peerconnection/RTCSSLAdapter.mm",
881 "objc/api/peerconnection/RTCSessionDescription+Private.h",
882 "objc/api/peerconnection/RTCSessionDescription.h",
883 "objc/api/peerconnection/RTCSessionDescription.mm",
884 "objc/api/peerconnection/RTCTracing.h",
885 "objc/api/peerconnection/RTCTracing.mm",
886 "objc/api/peerconnection/RTCVideoTrack+Private.h",
887 "objc/api/peerconnection/RTCVideoTrack.h",
888 "objc/api/peerconnection/RTCVideoTrack.mm",
kthelgason5fe4d492016-12-05 11:27:30 -0800889 ]
kthelgasonebc34e72016-09-15 04:30:18 -0700890
Anders Carlsson358f2e02018-06-04 10:24:37 +0200891 configs += [
892 "..:common_objc",
893 ":used_from_extension",
894 ]
kthelgason36d658d2017-08-24 05:43:45 -0700895 public_configs = [ ":common_config_objc" ]
kthelgasonc0977102017-04-24 00:57:16 -0700896
mbonadei2c8ac1b2017-05-31 05:14:26 -0700897 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200898 ":base_native_additions_objc",
899 ":base_objc",
900 ":file_logger_objc",
901 ":helpers_objc",
902 ":legacy_header_paths",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100903 ":mediaconstraints_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100904 ":mediasource_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100905 ":native_api",
906 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100907 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100908 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100909 ":videorendereradapter_objc",
910 ":videosource_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200911 ":videotoolbox_objc",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100912 "../api:libjingle_peerconnection_api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700913 "../api/audio_codecs:audio_codecs_api",
Karl Wiberg5817d3d2018-04-06 10:06:42 +0200914 "../api/audio_codecs:builtin_audio_decoder_factory",
Jiawei Ouae810c12018-06-20 16:18:59 -0700915 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200916 "../api/video:video_frame",
Anders Carlsson7e042812017-10-05 16:55:38 +0200917 "../api/video_codecs:video_codecs_api",
Anders Carlssone5960ce2017-06-22 15:26:30 +0200918 "../common_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700919 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -0700920 "../modules:module_api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700921 "../modules/audio_device:audio_device_api",
922 "../modules/audio_processing:audio_processing",
Patrik Höglund99175c62018-01-08 11:05:10 +0100923 "../modules/video_coding:video_codec_interface",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100924 "../pc:create_pc_factory",
zhihuanga4c113a2017-06-28 14:05:44 -0700925 "../pc:peerconnection",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100926 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700927 "../rtc_base:rtc_base",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200928 "../system_wrappers:field_trial",
929 "../system_wrappers:metrics",
Mirko Bonadei879f7882018-07-11 09:18:37 +0200930 "//third_party/abseil-cpp/absl/memory",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700931 ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200932
933 if (is_ios) {
934 deps += [ ":native_api_audio_device_module" ]
935 }
kthelgasonebc34e72016-09-15 04:30:18 -0700936 }
Zeke Chindd0e1e02016-10-11 13:27:26 -0700937
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200938 # TODO(bugs.webrtc.org/9627): Remove this target.
939 rtc_source_set("legacy_header_paths") {
940 sources = [
941 "objc/Framework/Classes/Common/NSString+StdString.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200942 "objc/Framework/Classes/Common/scoped_cftyperef.h",
943 "objc/Framework/Classes/PeerConnection/RTCConfiguration+Native.h",
944 "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Native.h",
945 "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Native.h",
946 "objc/Framework/Classes/PeerConnection/RTCVideoCodec+Private.h",
947 "objc/Framework/Classes/Video/RTCDefaultShader.h",
948 "objc/Framework/Classes/Video/RTCNV12TextureCache.h",
949 "objc/Framework/Classes/VideoToolbox/nalu_rewriter.h",
950 "objc/Framework/Headers/WebRTC/RTCAudioSession.h",
951 "objc/Framework/Headers/WebRTC/RTCAudioSessionConfiguration.h",
952 "objc/Framework/Headers/WebRTC/RTCAudioSource.h",
953 "objc/Framework/Headers/WebRTC/RTCAudioTrack.h",
954 "objc/Framework/Headers/WebRTC/RTCCVPixelBuffer.h",
955 "objc/Framework/Headers/WebRTC/RTCCallbackLogger.h",
956 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
957 "objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h",
958 "objc/Framework/Headers/WebRTC/RTCCertificate.h",
959 "objc/Framework/Headers/WebRTC/RTCConfiguration.h",
960 "objc/Framework/Headers/WebRTC/RTCDataChannel.h",
961 "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h",
962 "objc/Framework/Headers/WebRTC/RTCDefaultVideoDecoderFactory.h",
963 "objc/Framework/Headers/WebRTC/RTCDefaultVideoEncoderFactory.h",
964 "objc/Framework/Headers/WebRTC/RTCDispatcher.h",
965 "objc/Framework/Headers/WebRTC/RTCDtmfSender.h",
966 "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
967 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h",
968 "objc/Framework/Headers/WebRTC/RTCFileLogger.h",
969 "objc/Framework/Headers/WebRTC/RTCFileVideoCapturer.h",
970 "objc/Framework/Headers/WebRTC/RTCH264ProfileLevelId.h",
971 "objc/Framework/Headers/WebRTC/RTCIceCandidate.h",
972 "objc/Framework/Headers/WebRTC/RTCIceServer.h",
973 "objc/Framework/Headers/WebRTC/RTCIntervalRange.h",
974 "objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h",
975 "objc/Framework/Headers/WebRTC/RTCLogging.h",
976 "objc/Framework/Headers/WebRTC/RTCMTLNSVideoView.h",
977 "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h",
978 "objc/Framework/Headers/WebRTC/RTCMacros.h",
979 "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h",
980 "objc/Framework/Headers/WebRTC/RTCMediaSource.h",
981 "objc/Framework/Headers/WebRTC/RTCMediaStream.h",
982 "objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h",
983 "objc/Framework/Headers/WebRTC/RTCMetrics.h",
984 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h",
985 "objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h",
986 "objc/Framework/Headers/WebRTC/RTCPeerConnection.h",
987 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h",
988 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactoryOptions.h",
989 "objc/Framework/Headers/WebRTC/RTCRtcpParameters.h",
990 "objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h",
991 "objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h",
992 "objc/Framework/Headers/WebRTC/RTCRtpHeaderExtension.h",
993 "objc/Framework/Headers/WebRTC/RTCRtpParameters.h",
994 "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h",
995 "objc/Framework/Headers/WebRTC/RTCRtpSender.h",
996 "objc/Framework/Headers/WebRTC/RTCRtpTransceiver.h",
997 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
998 "objc/Framework/Headers/WebRTC/RTCSessionDescription.h",
999 "objc/Framework/Headers/WebRTC/RTCTracing.h",
1000 "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h",
1001 "objc/Framework/Headers/WebRTC/RTCVideoCodec.h",
1002 "objc/Framework/Headers/WebRTC/RTCVideoCodecFactory.h",
1003 "objc/Framework/Headers/WebRTC/RTCVideoCodecH264.h",
1004 "objc/Framework/Headers/WebRTC/RTCVideoCodecInfo.h",
1005 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP8.h",
1006 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP9.h",
1007 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP8.h",
1008 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP9.h",
1009 "objc/Framework/Headers/WebRTC/RTCVideoFrame.h",
1010 "objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.h",
1011 "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h",
1012 "objc/Framework/Headers/WebRTC/RTCVideoSource.h",
1013 "objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
1014 "objc/Framework/Headers/WebRTC/RTCVideoViewShading.h",
1015 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
1016 "objc/Framework/Native/api/audio_device_module.h",
1017 "objc/Framework/Native/api/video_decoder_factory.h",
1018 "objc/Framework/Native/api/video_encoder_factory.h",
1019 "objc/Framework/Native/api/video_frame_buffer.h",
1020 "objc/Framework/Native/src/objc_video_decoder_factory.h",
1021 "objc/Framework/Native/src/objc_video_encoder_factory.h",
1022 ]
1023 }
1024
mbonadei2c8ac1b2017-05-31 05:14:26 -07001025 if (rtc_include_tests) {
Daniela012b56b2017-11-15 13:15:24 +01001026 if (is_ios) {
Danielaae012cf2017-10-12 13:46:00 +02001027 rtc_source_set("sdk_unittests_sources") {
1028 testonly = true
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001029 include_dirs = [ "objc/" ]
Daniela012b56b2017-11-15 13:15:24 +01001030
Danielaae012cf2017-10-12 13:46:00 +02001031 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001032 "objc/unittests/ObjCVideoTrackSource_xctest.mm",
1033 "objc/unittests/RTCCVPixelBuffer_xctest.mm",
1034 "objc/unittests/RTCCallbackLogger_xctest.m",
1035 "objc/unittests/RTCFileVideoCapturer_xctest.mm",
1036 "objc/unittests/RTCH264ProfileLevelId_xctest.m",
1037 "objc/unittests/RTCPeerConnectionFactory_xctest.m",
1038 "objc/unittests/frame_buffer_helpers.h",
1039 "objc/unittests/frame_buffer_helpers.mm",
Artem Titarenko42b43152018-10-29 18:18:09 +01001040 "objc/unittests/nalu_rewriter_xctest.mm",
Danielaae012cf2017-10-12 13:46:00 +02001041 ]
Daniela012b56b2017-11-15 13:15:24 +01001042
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001043 # TODO(peterhanspers): Reenable these tests on simulator.
1044 # See bugs.webrtc.org/7812
1045 if (!use_ios_simulator) {
1046 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001047 "objc/unittests/RTCAudioDeviceModule_xctest.mm",
1048 "objc/unittests/RTCAudioDevice_xctest.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001049 ]
1050 }
1051
Danielaae012cf2017-10-12 13:46:00 +02001052 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001053 ":audio_device",
1054 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001055 ":base_objc",
1056 ":callback_logger_objc",
Anders Carlssondc6b4772018-01-15 13:31:03 +01001057 ":framework_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001058 ":mediaconstraints_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001059 ":native_api",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001060 ":native_api_audio_device_module",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001061 ":native_video",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001062 ":peerconnectionfactory_base_objc",
Artem Titarenko42b43152018-10-29 18:18:09 +01001063 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001064 ":videocapture_objc",
Anders Carlsson79ce8202018-06-01 12:51:09 +02001065 ":videocodec_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001066 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001067 ":videosource_objc",
Danielaae012cf2017-10-12 13:46:00 +02001068 ":videotoolbox_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001069 "../api/video:video_frame_i420",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001070 "../common_video:common_video",
Danielaae012cf2017-10-12 13:46:00 +02001071 "../media:rtc_media_base",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001072 "../media:rtc_media_tests_utils",
Danielaae012cf2017-10-12 13:46:00 +02001073 "../modules:module_api",
1074 "../rtc_base:rtc_base",
1075 "../rtc_base:rtc_base_tests_utils",
Oleh Prypinda04e062018-07-23 10:04:12 +02001076 "../system_wrappers:system_wrappers",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001077 "//third_party/libyuv",
Danielaae012cf2017-10-12 13:46:00 +02001078 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001079
1080 if (rtc_use_metal_rendering) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001081 sources += [ "objc/unittests/RTCMTLVideoView_xctest.m" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001082 deps += [ ":metal_objc" ]
1083 }
1084
Danielaae012cf2017-10-12 13:46:00 +02001085 public_deps = [
1086 "//build/config/ios:xctest",
1087 "//third_party/ocmock",
1088 ]
1089 }
1090
Daniela012b56b2017-11-15 13:15:24 +01001091 bundle_data("sdk_unittests_bundle_data") {
Daniela012b56b2017-11-15 13:15:24 +01001092 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001093 "objc/unittests/audio_short16.pcm",
1094 "objc/unittests/audio_short44.pcm",
1095 "objc/unittests/audio_short48.pcm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001096
1097 # Sample video taken from https://media.xiph.org/video/derf/
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001098 "objc/unittests/foreman.mp4",
Daniela012b56b2017-11-15 13:15:24 +01001099 ]
1100 outputs = [
1101 "{{bundle_resources_dir}}/{{source_file_part}}",
1102 ]
1103 }
1104
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001105 # These tests use static linking.
Danielaae012cf2017-10-12 13:46:00 +02001106 rtc_ios_xctest_test("sdk_unittests") {
1107 info_plist = "//test/ios/Info.plist"
1108 sources = [
Artem Titarenko34fc3462018-11-06 12:29:29 +01001109 "objc/unittests/main.mm",
Danielaae012cf2017-10-12 13:46:00 +02001110 ]
Daniela012b56b2017-11-15 13:15:24 +01001111
Danielaae012cf2017-10-12 13:46:00 +02001112 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
1113 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
1114 deps = [
Yura Yaroshevich5297bd22018-06-19 12:51:51 +03001115 ":peerconnectionfactory_base_objc",
Daniela012b56b2017-11-15 13:15:24 +01001116 ":sdk_unittests_bundle_data",
Danielaae012cf2017-10-12 13:46:00 +02001117 ":sdk_unittests_sources",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001118 "//test:test_support",
Danielaae012cf2017-10-12 13:46:00 +02001119 ]
1120 ldflags = [ "-all_load" ]
1121 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001122
1123 # These tests link to the framework.
1124 rtc_ios_xctest_test("sdk_framework_unittests") {
1125 info_plist = "//test/ios/Info.plist"
1126 sources = [
1127 "objc/unittests/RTCDoNotPutCPlusPlusInFrameworkHeaders_xctest.m",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001128 "objc/unittests/main.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001129 ]
1130
1131 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
1132 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
1133 deps = [
1134 ":framework_objc+link",
1135 ":ios_framework_bundle",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001136 "//test:test_support",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001137 ]
1138 }
Danielaae012cf2017-10-12 13:46:00 +02001139 }
1140
1141 # TODO(denicija): once all tests are migrated to xctest remove this source set.
Kári Tristan Helgason90143242018-07-27 12:34:54 +02001142 rtc_source_set("rtc_unittests_objc") {
mbonadei2c8ac1b2017-05-31 05:14:26 -07001143 testonly = true
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001144
mbonadei2c8ac1b2017-05-31 05:14:26 -07001145 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001146 "objc/unittests/RTCCertificateTest.mm",
1147 "objc/unittests/RTCConfigurationTest.mm",
1148 "objc/unittests/RTCDataChannelConfigurationTest.mm",
1149 "objc/unittests/RTCIceCandidateTest.mm",
1150 "objc/unittests/RTCIceServerTest.mm",
1151 "objc/unittests/RTCIntervalRangeTests.mm",
1152 "objc/unittests/RTCMediaConstraintsTest.mm",
1153 "objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm",
1154 "objc/unittests/RTCPeerConnectionTest.mm",
1155 "objc/unittests/RTCSessionDescriptionTest.mm",
1156 "objc/unittests/RTCTracingTest.mm",
1157 "objc/unittests/objc_video_decoder_factory_tests.mm",
1158 "objc/unittests/objc_video_encoder_factory_tests.mm",
1159 "objc/unittests/scoped_cftyperef_tests.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001160 ]
Anders Carlssone7dd83f2018-01-19 11:28:44 +01001161 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001162 sources += [ "objc/unittests/RTCCameraVideoCapturerTests.mm" ]
oprypin45197522017-06-22 01:47:20 -07001163 }
mbonadeid7620582017-05-30 01:50:35 -07001164
mbonadei2c8ac1b2017-05-31 05:14:26 -07001165 # |-ObjC| flag needed to make sure category method implementations
1166 # are included:
1167 # https://developer.apple.com/library/mac/qa/qa1490/_index.html
1168 ldflags = [ "-ObjC" ]
magjed3149e092017-05-08 05:32:05 -07001169
mbonadei2c8ac1b2017-05-31 05:14:26 -07001170 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001171 ":base_objc",
1172 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001173 ":mediaconstraints_objc",
1174 ":native_api",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001175 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001176 ":peerconnectionfactory_base_objc",
1177 ":video_objc",
1178 ":videocapture_objc",
1179 ":videocodec_objc",
1180 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001181 ":videosource_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001182 ":videotoolbox_objc",
Piotr (Peter) Slatalae0c2e972018-10-08 09:43:21 -07001183 "../api:libjingle_peerconnection_api",
Jiawei Ouae810c12018-06-20 16:18:59 -07001184 "../api/audio_codecs:audio_codecs_api",
1185 "../api/audio_codecs:builtin_audio_decoder_factory",
1186 "../api/audio_codecs:builtin_audio_encoder_factory",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001187 "../api/video_codecs:video_codecs_api",
kthelgasonebd4f792017-09-04 04:36:21 -07001188 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -07001189 "../modules:module_api",
Jiawei Ouae810c12018-06-20 16:18:59 -07001190 "../modules/audio_device:audio_device_api",
1191 "../modules/audio_processing:audio_processing",
Patrik Höglund99175c62018-01-08 11:05:10 +01001192 "../modules/video_coding:video_codec_interface",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001193 "../rtc_base:rtc_base_tests_utils",
Niels Möllera12c42a2018-07-25 16:05:48 +02001194 "../rtc_base/system:unused",
Yves Gerey21cddff2018-10-30 21:12:42 +01001195 "../test:test_support",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001196 "//third_party/ocmock",
1197 ]
magjed3149e092017-05-08 05:32:05 -07001198
denicija59ee91b2017-06-05 05:48:47 -07001199 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001200 sources += [ "objc/unittests/RTCAudioSessionTest.mm" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001201 deps += [ ":audio_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001202 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001203 }
kthelgason2f088792017-05-30 01:48:47 -07001204 }
1205
mbonadei2c8ac1b2017-05-31 05:14:26 -07001206 if (is_ios) {
Anders Carlssondc6b4772018-01-15 13:31:03 +01001207 ios_framework_bundle_with_umbrella_header("framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001208 info_plist = "objc/Info.plist"
mbonadei2c8ac1b2017-05-31 05:14:26 -07001209 output_name = "WebRTC"
Magnus Jedvertf83dc8b2017-08-29 09:49:43 +00001210
mbonadei2c8ac1b2017-05-31 05:14:26 -07001211 common_objc_headers = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001212 "objc/base/RTCCodecSpecificInfo.h",
1213 "objc/base/RTCEncodedImage.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001214 "objc/base/RTCI420Buffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001215 "objc/base/RTCLogging.h",
1216 "objc/base/RTCMacros.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001217 "objc/base/RTCMutableI420Buffer.h",
1218 "objc/base/RTCMutableYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001219 "objc/base/RTCRtpFragmentationHeader.h",
1220 "objc/base/RTCVideoCapturer.h",
1221 "objc/base/RTCVideoCodecInfo.h",
1222 "objc/base/RTCVideoDecoder.h",
1223 "objc/base/RTCVideoDecoderFactory.h",
1224 "objc/base/RTCVideoEncoder.h",
1225 "objc/base/RTCVideoEncoderFactory.h",
1226 "objc/base/RTCVideoEncoderQpThresholds.h",
1227 "objc/base/RTCVideoEncoderSettings.h",
1228 "objc/base/RTCVideoFrame.h",
1229 "objc/base/RTCVideoFrameBuffer.h",
1230 "objc/base/RTCVideoRenderer.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001231 "objc/base/RTCYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001232 "objc/components/audio/RTCAudioSession.h",
1233 "objc/components/audio/RTCAudioSessionConfiguration.h",
1234 "objc/components/capturer/RTCCameraVideoCapturer.h",
1235 "objc/components/capturer/RTCFileVideoCapturer.h",
1236 "objc/components/renderer/metal/RTCMTLVideoView.h",
1237 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
1238 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1239 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1240 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1241 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1242 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1243 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1244 "objc/components/video_codec/RTCVideoDecoderH264.h",
1245 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1246 "objc/components/video_codec/RTCVideoEncoderH264.h",
1247 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1248 "objc/helpers/RTCCameraPreviewView.h",
1249 "objc/helpers/RTCDispatcher.h",
1250 "objc/helpers/UIDevice+RTCDevice.h",
1251 "objc/api/peerconnection/RTCAudioSource.h",
1252 "objc/api/peerconnection/RTCAudioTrack.h",
1253 "objc/api/peerconnection/RTCConfiguration.h",
1254 "objc/api/peerconnection/RTCDataChannel.h",
1255 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1256 "objc/api/peerconnection/RTCFieldTrials.h",
1257 "objc/api/peerconnection/RTCIceCandidate.h",
1258 "objc/api/peerconnection/RTCIceServer.h",
1259 "objc/api/peerconnection/RTCIntervalRange.h",
1260 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1261 "objc/api/peerconnection/RTCMediaConstraints.h",
1262 "objc/api/peerconnection/RTCMediaSource.h",
1263 "objc/api/peerconnection/RTCMediaStream.h",
1264 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1265 "objc/api/peerconnection/RTCMetrics.h",
1266 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1267 "objc/api/peerconnection/RTCPeerConnection.h",
1268 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1269 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1270 "objc/api/peerconnection/RTCRtcpParameters.h",
1271 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1272 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1273 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1274 "objc/api/peerconnection/RTCRtpParameters.h",
1275 "objc/api/peerconnection/RTCRtpReceiver.h",
1276 "objc/api/peerconnection/RTCRtpSender.h",
1277 "objc/api/peerconnection/RTCRtpTransceiver.h",
1278 "objc/api/peerconnection/RTCDtmfSender.h",
1279 "objc/api/peerconnection/RTCSSLAdapter.h",
1280 "objc/api/peerconnection/RTCSessionDescription.h",
1281 "objc/api/peerconnection/RTCTracing.h",
1282 "objc/api/peerconnection/RTCCertificate.h",
Benjamin Wright8c27cca2018-10-25 10:16:44 -07001283 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001284 "objc/api/peerconnection/RTCVideoSource.h",
1285 "objc/api/peerconnection/RTCVideoTrack.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001286 "objc/api/video_codec/RTCVideoCodecConstants.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001287 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1288 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1289 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1290 "objc/api/video_codec/RTCVideoEncoderVP9.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001291 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1292 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001293 ]
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001294
mbonadei2c8ac1b2017-05-31 05:14:26 -07001295 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001296 common_objc_headers += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001297 "objc/api/logging/RTCCallbackLogger.h",
1298 "objc/api/peerconnection/RTCFileLogger.h",
Anders Carlsson3b3364e2018-01-30 15:46:13 +01001299 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001300 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001301
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001302 sources = common_objc_headers
1303 public_headers = common_objc_headers
1304
mbonadei2c8ac1b2017-05-31 05:14:26 -07001305 ldflags = [
1306 "-all_load",
1307 "-install_name",
1308 "@rpath/$output_name.framework/$output_name",
1309 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001310
mbonadei2c8ac1b2017-05-31 05:14:26 -07001311 deps = [
kthelgason36d658d2017-08-24 05:43:45 -07001312 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001313 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001314 ":default_codec_factory_objc",
1315 ":native_api",
1316 ":native_video",
1317 ":peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001318 ":ui_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001319 ":videocapture_objc",
1320 ":videocodec_objc",
1321 ":videotoolbox_objc",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001322 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001323 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001324 if (rtc_use_metal_rendering) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001325 deps += [ ":metal_objc" ]
1326 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001327 if (!build_with_chromium) {
1328 deps += [
1329 ":callback_logger_objc",
1330 ":file_logger_objc",
1331 ]
1332 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001333
mbonadei2c8ac1b2017-05-31 05:14:26 -07001334 libs = [
1335 "AVFoundation.framework",
1336 "CoreGraphics.framework",
1337 "CoreMedia.framework",
1338 "GLKit.framework",
1339 ]
1340
Anders Carlsson358f2e02018-06-04 10:24:37 +02001341 configs += [
1342 "..:common_objc",
1343 ":used_from_extension",
1344 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001345
kthelgason36d658d2017-08-24 05:43:45 -07001346 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001347 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001348
1349 bundle_data("ios_framework_bundle") {
1350 deps = [
1351 "../sdk:framework_objc",
1352 ]
1353 sources = [
1354 "$root_build_dir/WebRTC.framework",
1355 ]
1356 outputs = [
1357 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
1358 ]
1359 }
1360 }
1361
1362 if (is_mac) {
Anders Carlsson37bbf792018-09-05 16:29:27 +02001363 mac_framework_bundle_with_umbrella_header("mac_framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001364 info_plist = "objc/Info.plist"
1365 output_name = "WebRTC"
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001366
Anders Carlsson37bbf792018-09-05 16:29:27 +02001367 sources = [
1368 "objc/api/peerconnection/RTCAudioSource.h",
1369 "objc/api/peerconnection/RTCAudioTrack.h",
1370 "objc/api/peerconnection/RTCCertificate.h",
1371 "objc/api/peerconnection/RTCConfiguration.h",
Benjamin Wright8c27cca2018-10-25 10:16:44 -07001372 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001373 "objc/api/peerconnection/RTCDataChannel.h",
1374 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1375 "objc/api/peerconnection/RTCDtmfSender.h",
1376 "objc/api/peerconnection/RTCFieldTrials.h",
1377 "objc/api/peerconnection/RTCIceCandidate.h",
1378 "objc/api/peerconnection/RTCIceServer.h",
1379 "objc/api/peerconnection/RTCIntervalRange.h",
1380 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1381 "objc/api/peerconnection/RTCMediaConstraints.h",
1382 "objc/api/peerconnection/RTCMediaSource.h",
1383 "objc/api/peerconnection/RTCMediaStream.h",
1384 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1385 "objc/api/peerconnection/RTCMetrics.h",
1386 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1387 "objc/api/peerconnection/RTCPeerConnection.h",
1388 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1389 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1390 "objc/api/peerconnection/RTCRtcpParameters.h",
1391 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1392 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1393 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1394 "objc/api/peerconnection/RTCRtpParameters.h",
1395 "objc/api/peerconnection/RTCRtpReceiver.h",
1396 "objc/api/peerconnection/RTCRtpSender.h",
1397 "objc/api/peerconnection/RTCRtpTransceiver.h",
1398 "objc/api/peerconnection/RTCSSLAdapter.h",
1399 "objc/api/peerconnection/RTCSessionDescription.h",
1400 "objc/api/peerconnection/RTCTracing.h",
1401 "objc/api/peerconnection/RTCVideoSource.h",
1402 "objc/api/peerconnection/RTCVideoTrack.h",
1403 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1404 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1405 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1406 "objc/api/video_codec/RTCVideoEncoderVP9.h",
1407 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1408 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
1409 "objc/base/RTCCodecSpecificInfo.h",
1410 "objc/base/RTCEncodedImage.h",
1411 "objc/base/RTCI420Buffer.h",
1412 "objc/base/RTCLogging.h",
1413 "objc/base/RTCMacros.h",
1414 "objc/base/RTCMutableI420Buffer.h",
1415 "objc/base/RTCMutableYUVPlanarBuffer.h",
1416 "objc/base/RTCRtpFragmentationHeader.h",
1417 "objc/base/RTCVideoCapturer.h",
1418 "objc/base/RTCVideoCodecInfo.h",
1419 "objc/base/RTCVideoDecoder.h",
1420 "objc/base/RTCVideoDecoderFactory.h",
1421 "objc/base/RTCVideoEncoder.h",
1422 "objc/base/RTCVideoEncoderFactory.h",
1423 "objc/base/RTCVideoEncoderQpThresholds.h",
1424 "objc/base/RTCVideoEncoderSettings.h",
1425 "objc/base/RTCVideoFrame.h",
1426 "objc/base/RTCVideoFrameBuffer.h",
1427 "objc/base/RTCVideoRenderer.h",
1428 "objc/base/RTCYUVPlanarBuffer.h",
1429 "objc/components/capturer/RTCCameraVideoCapturer.h",
1430 "objc/components/capturer/RTCFileVideoCapturer.h",
1431 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
1432 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
1433 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1434 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1435 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1436 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1437 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1438 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1439 "objc/components/video_codec/RTCVideoDecoderH264.h",
1440 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1441 "objc/components/video_codec/RTCVideoEncoderH264.h",
1442 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1443 "objc/helpers/RTCDispatcher.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001444 ]
Anders Carlsson37bbf792018-09-05 16:29:27 +02001445 if (!build_with_chromium) {
1446 sources += [
1447 "objc/api/logging/RTCCallbackLogger.h",
1448 "objc/api/peerconnection/RTCFileLogger.h",
1449 ]
1450 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001451
1452 deps = [
1453 ":base_objc",
1454 ":default_codec_factory_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001455 ":native_api",
1456 ":native_video",
1457 ":peerconnectionfactory_base_objc",
1458 ":ui_objc",
1459 ":videocapture_objc",
1460 ":videocodec_objc",
1461 ":videotoolbox_objc",
1462 "../rtc_base:rtc_base_approved",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001463 ]
1464 if (rtc_use_metal_rendering) {
1465 deps += [ ":metal_objc" ]
1466 }
1467 if (!build_with_chromium) {
1468 deps += [
1469 ":callback_logger_objc",
1470 ":file_logger_objc",
1471 ]
1472 }
1473
1474 libs = [
1475 "AVFoundation.framework",
1476 "CoreGraphics.framework",
1477 "CoreMedia.framework",
1478 "OpenGL.framework",
1479 ]
1480
Anders Carlsson37bbf792018-09-05 16:29:27 +02001481 configs = [ "..:common_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001482
1483 public_configs = [ ":common_config_objc" ]
1484 }
1485
1486 bundle_data("mac_framework_bundle") {
1487 deps = [
1488 "../sdk:mac_framework_objc",
1489 ]
1490 sources = [
1491 "$root_build_dir/WebRTC.framework",
1492 ]
1493 outputs = [
1494 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
1495 ]
1496 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001497 }
1498
Anders Carlsson9823ee42018-03-07 10:32:03 +01001499 rtc_static_library("wrapped_native_codec_objc") {
1500 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001501 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.h",
1502 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm",
1503 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.h",
1504 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001505 ]
1506
1507 configs += [ "..:common_objc" ]
1508 public_configs = [ ":common_config_objc" ]
1509
Anders Carlsson9823ee42018-03-07 10:32:03 +01001510 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001511 ":base_objc",
1512 ":helpers_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001513 "../api/video_codecs:video_codecs_api",
1514 "../media:rtc_media_base",
1515 ]
1516 }
1517
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001518 # The native API is currently experimental and may change without notice.
1519 rtc_static_library("native_api") {
1520 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +02001521 allow_poison = [
1522 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
1523 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
1524 ]
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001525 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001526 "objc/native/api/video_capturer.h",
1527 "objc/native/api/video_capturer.mm",
1528 "objc/native/api/video_decoder_factory.h",
1529 "objc/native/api/video_decoder_factory.mm",
1530 "objc/native/api/video_encoder_factory.h",
1531 "objc/native/api/video_encoder_factory.mm",
1532 "objc/native/api/video_frame.h",
1533 "objc/native/api/video_frame.mm",
1534 "objc/native/api/video_frame_buffer.h",
1535 "objc/native/api/video_frame_buffer.mm",
1536 "objc/native/api/video_renderer.h",
1537 "objc/native/api/video_renderer.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001538 ]
1539
1540 configs += [ "..:common_objc" ]
1541
1542 public_configs = [ ":common_config_objc" ]
1543
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001544 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001545 ":base_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001546 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001547 ":videoframebuffer_objc",
Anders Carlsson73119182018-03-15 09:41:03 +01001548 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001549 "../api/video:video_frame",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001550 "../api/video_codecs:video_codecs_api",
1551 "../common_video",
1552 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +02001553 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001554 ]
1555 }
1556
1557 rtc_static_library("native_video") {
1558 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001559 "objc/native/src/objc_frame_buffer.h",
1560 "objc/native/src/objc_frame_buffer.mm",
1561 "objc/native/src/objc_video_decoder_factory.h",
1562 "objc/native/src/objc_video_decoder_factory.mm",
1563 "objc/native/src/objc_video_encoder_factory.h",
1564 "objc/native/src/objc_video_encoder_factory.mm",
1565 "objc/native/src/objc_video_frame.h",
1566 "objc/native/src/objc_video_frame.mm",
1567 "objc/native/src/objc_video_renderer.h",
1568 "objc/native/src/objc_video_renderer.mm",
1569 "objc/native/src/objc_video_track_source.h",
1570 "objc/native/src/objc_video_track_source.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001571 ]
1572
1573 configs += [ "..:common_objc" ]
1574
1575 public_configs = [ ":common_config_objc" ]
1576
1577 if (!build_with_chromium && is_clang) {
1578 # Suppress warnings from the Chromium Clang plugin
1579 # (bugs.webrtc.org/163).
1580 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1581 }
1582
1583 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001584 ":base_native_additions_objc",
1585 ":base_objc",
1586 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001587 ":videocodec_objc",
1588 ":videoframebuffer_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001589 ":vpx_codec_constants",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001590 ":wrapped_native_codec_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001591 "../api/video:video_frame",
1592 "../api/video:video_frame_i420",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001593 "../api/video_codecs:video_codecs_api",
1594 "../common_video",
1595 "../media:rtc_audio_video",
1596 "../media:rtc_media_base",
1597 "../modules:module_api",
1598 "../modules/video_coding:video_codec_interface",
1599 "../rtc_base:checks",
1600 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +02001601 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001602 ]
1603 }
1604
mbonadeic0af5ac2017-08-24 12:26:05 -07001605 rtc_static_library("video_toolbox_cc") {
Artem Titarenko42b43152018-10-29 18:18:09 +01001606 visibility = [
1607 ":videotoolbox_objc",
1608 ":sdk_unittests_sources",
1609 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001610 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001611 "objc/components/video_codec/helpers.cc",
1612 "objc/components/video_codec/helpers.h",
1613 "objc/components/video_codec/nalu_rewriter.cc",
1614 "objc/components/video_codec/nalu_rewriter.h",
mbonadeic0af5ac2017-08-24 12:26:05 -07001615 ]
1616 deps = [
1617 "../common_video",
1618 "../modules:module_api",
1619 "../modules/video_coding:webrtc_h264",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001620 "../rtc_base:checks",
mbonadeic0af5ac2017-08-24 12:26:05 -07001621 "../rtc_base:rtc_base_approved",
1622 ]
mbonadeic0af5ac2017-08-24 12:26:05 -07001623 }
1624
1625 rtc_static_library("videotoolbox_objc") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001626 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +02001627 allow_poison = [
1628 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
1629 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
1630 ]
mbonadeic0af5ac2017-08-24 12:26:05 -07001631 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001632 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1633 "objc/components/video_codec/RTCVideoDecoderFactoryH264.m",
1634 "objc/components/video_codec/RTCVideoDecoderH264.h",
1635 "objc/components/video_codec/RTCVideoDecoderH264.mm",
1636 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1637 "objc/components/video_codec/RTCVideoEncoderFactoryH264.m",
1638 "objc/components/video_codec/RTCVideoEncoderH264.h",
1639 "objc/components/video_codec/RTCVideoEncoderH264.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001640 ]
1641
Anders Carlsson358f2e02018-06-04 10:24:37 +02001642 configs += [
1643 "..:common_objc",
1644 ":used_from_extension",
1645 ]
1646
1647 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
1648 defines = [ "RTC_APPRTCMOBILE_BROADCAST_EXTENSION" ]
1649 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001650
1651 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001652 ":base_native_additions_objc",
1653 ":base_objc",
1654 ":helpers_objc",
mbonadeic0af5ac2017-08-24 12:26:05 -07001655 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001656 ":videocodec_objc",
1657 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001658 "../common_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001659 "../modules:module_api",
Patrik Höglund99175c62018-01-08 11:05:10 +01001660 "../modules/video_coding:video_codec_interface",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001661 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001662 "../rtc_base:rtc_base_approved",
Mirko Bonadei401d0562017-12-14 11:24:00 +01001663 "//third_party/libyuv",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001664 ]
1665
1666 libs = [
1667 "CoreFoundation.framework",
1668 "CoreMedia.framework",
1669 "CoreVideo.framework",
1670 "VideoToolbox.framework",
1671 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001672 }
1673 }
tkchin9eeb6242016-04-27 01:54:20 -07001674}