blob: 03bdf3bd2a86aed2e58a60c36e15eccad148f64e [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",
800 "objc/api/peerconnection/RTCDataChannel+Private.h",
801 "objc/api/peerconnection/RTCDataChannel.h",
802 "objc/api/peerconnection/RTCDataChannel.mm",
803 "objc/api/peerconnection/RTCDataChannelConfiguration+Private.h",
804 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
805 "objc/api/peerconnection/RTCDataChannelConfiguration.mm",
806 "objc/api/peerconnection/RTCDtmfSender+Private.h",
807 "objc/api/peerconnection/RTCDtmfSender.h",
808 "objc/api/peerconnection/RTCDtmfSender.mm",
809 "objc/api/peerconnection/RTCFieldTrials.h",
810 "objc/api/peerconnection/RTCFieldTrials.mm",
811 "objc/api/peerconnection/RTCIceCandidate+Private.h",
812 "objc/api/peerconnection/RTCIceCandidate.h",
813 "objc/api/peerconnection/RTCIceCandidate.mm",
814 "objc/api/peerconnection/RTCIceServer+Private.h",
815 "objc/api/peerconnection/RTCIceServer.h",
816 "objc/api/peerconnection/RTCIceServer.mm",
817 "objc/api/peerconnection/RTCIntervalRange+Private.h",
818 "objc/api/peerconnection/RTCIntervalRange.h",
819 "objc/api/peerconnection/RTCIntervalRange.mm",
820 "objc/api/peerconnection/RTCLegacyStatsReport+Private.h",
821 "objc/api/peerconnection/RTCLegacyStatsReport.h",
822 "objc/api/peerconnection/RTCLegacyStatsReport.mm",
823 "objc/api/peerconnection/RTCMediaStream+Private.h",
824 "objc/api/peerconnection/RTCMediaStream.h",
825 "objc/api/peerconnection/RTCMediaStream.mm",
826 "objc/api/peerconnection/RTCMediaStreamTrack+Private.h",
827 "objc/api/peerconnection/RTCMediaStreamTrack.h",
828 "objc/api/peerconnection/RTCMediaStreamTrack.mm",
829 "objc/api/peerconnection/RTCMetrics.h",
830 "objc/api/peerconnection/RTCMetrics.mm",
831 "objc/api/peerconnection/RTCMetricsSampleInfo+Private.h",
832 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
833 "objc/api/peerconnection/RTCMetricsSampleInfo.mm",
834 "objc/api/peerconnection/RTCPeerConnection+DataChannel.mm",
835 "objc/api/peerconnection/RTCPeerConnection+Native.h",
836 "objc/api/peerconnection/RTCPeerConnection+Private.h",
837 "objc/api/peerconnection/RTCPeerConnection+Stats.mm",
838 "objc/api/peerconnection/RTCPeerConnection.h",
839 "objc/api/peerconnection/RTCPeerConnection.mm",
840 "objc/api/peerconnection/RTCPeerConnectionFactory+Native.h",
841 "objc/api/peerconnection/RTCPeerConnectionFactory+Private.h",
842 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
843 "objc/api/peerconnection/RTCPeerConnectionFactory.mm",
844 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.h",
845 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.mm",
846 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.h",
847 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.mm",
848 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions+Private.h",
849 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
850 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.mm",
851 "objc/api/peerconnection/RTCRtcpParameters+Private.h",
852 "objc/api/peerconnection/RTCRtcpParameters.h",
853 "objc/api/peerconnection/RTCRtcpParameters.mm",
854 "objc/api/peerconnection/RTCRtpCodecParameters+Private.h",
855 "objc/api/peerconnection/RTCRtpCodecParameters.h",
856 "objc/api/peerconnection/RTCRtpCodecParameters.mm",
857 "objc/api/peerconnection/RTCRtpEncodingParameters+Private.h",
858 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
859 "objc/api/peerconnection/RTCRtpEncodingParameters.mm",
860 "objc/api/peerconnection/RTCRtpHeaderExtension+Private.h",
861 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
862 "objc/api/peerconnection/RTCRtpHeaderExtension.mm",
863 "objc/api/peerconnection/RTCRtpParameters+Private.h",
864 "objc/api/peerconnection/RTCRtpParameters.h",
865 "objc/api/peerconnection/RTCRtpParameters.mm",
Benjamin Wrightddf1a3e2018-10-02 10:20:58 -0700866 "objc/api/peerconnection/RTCRtpReceiver+Native.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200867 "objc/api/peerconnection/RTCRtpReceiver+Private.h",
868 "objc/api/peerconnection/RTCRtpReceiver.h",
869 "objc/api/peerconnection/RTCRtpReceiver.mm",
Benjamin Wrightddf1a3e2018-10-02 10:20:58 -0700870 "objc/api/peerconnection/RTCRtpSender+Native.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200871 "objc/api/peerconnection/RTCRtpSender+Private.h",
872 "objc/api/peerconnection/RTCRtpSender.h",
873 "objc/api/peerconnection/RTCRtpSender.mm",
874 "objc/api/peerconnection/RTCRtpTransceiver+Private.h",
875 "objc/api/peerconnection/RTCRtpTransceiver.h",
876 "objc/api/peerconnection/RTCRtpTransceiver.mm",
877 "objc/api/peerconnection/RTCSSLAdapter.h",
878 "objc/api/peerconnection/RTCSSLAdapter.mm",
879 "objc/api/peerconnection/RTCSessionDescription+Private.h",
880 "objc/api/peerconnection/RTCSessionDescription.h",
881 "objc/api/peerconnection/RTCSessionDescription.mm",
882 "objc/api/peerconnection/RTCTracing.h",
883 "objc/api/peerconnection/RTCTracing.mm",
884 "objc/api/peerconnection/RTCVideoTrack+Private.h",
885 "objc/api/peerconnection/RTCVideoTrack.h",
886 "objc/api/peerconnection/RTCVideoTrack.mm",
kthelgason5fe4d492016-12-05 11:27:30 -0800887 ]
kthelgasonebc34e72016-09-15 04:30:18 -0700888
Anders Carlsson358f2e02018-06-04 10:24:37 +0200889 configs += [
890 "..:common_objc",
891 ":used_from_extension",
892 ]
kthelgason36d658d2017-08-24 05:43:45 -0700893 public_configs = [ ":common_config_objc" ]
kthelgasonc0977102017-04-24 00:57:16 -0700894
mbonadei2c8ac1b2017-05-31 05:14:26 -0700895 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200896 ":base_native_additions_objc",
897 ":base_objc",
898 ":file_logger_objc",
899 ":helpers_objc",
900 ":legacy_header_paths",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100901 ":mediaconstraints_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100902 ":mediasource_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100903 ":native_api",
904 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100905 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100906 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100907 ":videorendereradapter_objc",
908 ":videosource_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200909 ":videotoolbox_objc",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100910 "../api:libjingle_peerconnection_api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700911 "../api/audio_codecs:audio_codecs_api",
Karl Wiberg5817d3d2018-04-06 10:06:42 +0200912 "../api/audio_codecs:builtin_audio_decoder_factory",
Jiawei Ouae810c12018-06-20 16:18:59 -0700913 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200914 "../api/video:video_frame",
Anders Carlsson7e042812017-10-05 16:55:38 +0200915 "../api/video_codecs:video_codecs_api",
Anders Carlssone5960ce2017-06-22 15:26:30 +0200916 "../common_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700917 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -0700918 "../modules:module_api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700919 "../modules/audio_device:audio_device_api",
920 "../modules/audio_processing:audio_processing",
Patrik Höglund99175c62018-01-08 11:05:10 +0100921 "../modules/video_coding:video_codec_interface",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100922 "../pc:create_pc_factory",
zhihuanga4c113a2017-06-28 14:05:44 -0700923 "../pc:peerconnection",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100924 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700925 "../rtc_base:rtc_base",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200926 "../system_wrappers:field_trial",
927 "../system_wrappers:metrics",
Mirko Bonadei879f7882018-07-11 09:18:37 +0200928 "//third_party/abseil-cpp/absl/memory",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700929 ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200930
931 if (is_ios) {
932 deps += [ ":native_api_audio_device_module" ]
933 }
kthelgasonebc34e72016-09-15 04:30:18 -0700934 }
Zeke Chindd0e1e02016-10-11 13:27:26 -0700935
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200936 # TODO(bugs.webrtc.org/9627): Remove this target.
937 rtc_source_set("legacy_header_paths") {
938 sources = [
939 "objc/Framework/Classes/Common/NSString+StdString.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200940 "objc/Framework/Classes/Common/scoped_cftyperef.h",
941 "objc/Framework/Classes/PeerConnection/RTCConfiguration+Native.h",
942 "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Native.h",
943 "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Native.h",
944 "objc/Framework/Classes/PeerConnection/RTCVideoCodec+Private.h",
945 "objc/Framework/Classes/Video/RTCDefaultShader.h",
946 "objc/Framework/Classes/Video/RTCNV12TextureCache.h",
947 "objc/Framework/Classes/VideoToolbox/nalu_rewriter.h",
948 "objc/Framework/Headers/WebRTC/RTCAudioSession.h",
949 "objc/Framework/Headers/WebRTC/RTCAudioSessionConfiguration.h",
950 "objc/Framework/Headers/WebRTC/RTCAudioSource.h",
951 "objc/Framework/Headers/WebRTC/RTCAudioTrack.h",
952 "objc/Framework/Headers/WebRTC/RTCCVPixelBuffer.h",
953 "objc/Framework/Headers/WebRTC/RTCCallbackLogger.h",
954 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
955 "objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h",
956 "objc/Framework/Headers/WebRTC/RTCCertificate.h",
957 "objc/Framework/Headers/WebRTC/RTCConfiguration.h",
958 "objc/Framework/Headers/WebRTC/RTCDataChannel.h",
959 "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h",
960 "objc/Framework/Headers/WebRTC/RTCDefaultVideoDecoderFactory.h",
961 "objc/Framework/Headers/WebRTC/RTCDefaultVideoEncoderFactory.h",
962 "objc/Framework/Headers/WebRTC/RTCDispatcher.h",
963 "objc/Framework/Headers/WebRTC/RTCDtmfSender.h",
964 "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
965 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h",
966 "objc/Framework/Headers/WebRTC/RTCFileLogger.h",
967 "objc/Framework/Headers/WebRTC/RTCFileVideoCapturer.h",
968 "objc/Framework/Headers/WebRTC/RTCH264ProfileLevelId.h",
969 "objc/Framework/Headers/WebRTC/RTCIceCandidate.h",
970 "objc/Framework/Headers/WebRTC/RTCIceServer.h",
971 "objc/Framework/Headers/WebRTC/RTCIntervalRange.h",
972 "objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h",
973 "objc/Framework/Headers/WebRTC/RTCLogging.h",
974 "objc/Framework/Headers/WebRTC/RTCMTLNSVideoView.h",
975 "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h",
976 "objc/Framework/Headers/WebRTC/RTCMacros.h",
977 "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h",
978 "objc/Framework/Headers/WebRTC/RTCMediaSource.h",
979 "objc/Framework/Headers/WebRTC/RTCMediaStream.h",
980 "objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h",
981 "objc/Framework/Headers/WebRTC/RTCMetrics.h",
982 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h",
983 "objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h",
984 "objc/Framework/Headers/WebRTC/RTCPeerConnection.h",
985 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h",
986 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactoryOptions.h",
987 "objc/Framework/Headers/WebRTC/RTCRtcpParameters.h",
988 "objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h",
989 "objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h",
990 "objc/Framework/Headers/WebRTC/RTCRtpHeaderExtension.h",
991 "objc/Framework/Headers/WebRTC/RTCRtpParameters.h",
992 "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h",
993 "objc/Framework/Headers/WebRTC/RTCRtpSender.h",
994 "objc/Framework/Headers/WebRTC/RTCRtpTransceiver.h",
995 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
996 "objc/Framework/Headers/WebRTC/RTCSessionDescription.h",
997 "objc/Framework/Headers/WebRTC/RTCTracing.h",
998 "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h",
999 "objc/Framework/Headers/WebRTC/RTCVideoCodec.h",
1000 "objc/Framework/Headers/WebRTC/RTCVideoCodecFactory.h",
1001 "objc/Framework/Headers/WebRTC/RTCVideoCodecH264.h",
1002 "objc/Framework/Headers/WebRTC/RTCVideoCodecInfo.h",
1003 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP8.h",
1004 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP9.h",
1005 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP8.h",
1006 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP9.h",
1007 "objc/Framework/Headers/WebRTC/RTCVideoFrame.h",
1008 "objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.h",
1009 "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h",
1010 "objc/Framework/Headers/WebRTC/RTCVideoSource.h",
1011 "objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
1012 "objc/Framework/Headers/WebRTC/RTCVideoViewShading.h",
1013 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
1014 "objc/Framework/Native/api/audio_device_module.h",
1015 "objc/Framework/Native/api/video_decoder_factory.h",
1016 "objc/Framework/Native/api/video_encoder_factory.h",
1017 "objc/Framework/Native/api/video_frame_buffer.h",
1018 "objc/Framework/Native/src/objc_video_decoder_factory.h",
1019 "objc/Framework/Native/src/objc_video_encoder_factory.h",
1020 ]
1021 }
1022
mbonadei2c8ac1b2017-05-31 05:14:26 -07001023 if (rtc_include_tests) {
Daniela012b56b2017-11-15 13:15:24 +01001024 if (is_ios) {
Danielaae012cf2017-10-12 13:46:00 +02001025 rtc_source_set("sdk_unittests_sources") {
1026 testonly = true
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001027 include_dirs = [ "objc/" ]
Daniela012b56b2017-11-15 13:15:24 +01001028
Danielaae012cf2017-10-12 13:46:00 +02001029 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001030 "objc/unittests/ObjCVideoTrackSource_xctest.mm",
1031 "objc/unittests/RTCCVPixelBuffer_xctest.mm",
1032 "objc/unittests/RTCCallbackLogger_xctest.m",
1033 "objc/unittests/RTCFileVideoCapturer_xctest.mm",
1034 "objc/unittests/RTCH264ProfileLevelId_xctest.m",
1035 "objc/unittests/RTCPeerConnectionFactory_xctest.m",
1036 "objc/unittests/frame_buffer_helpers.h",
1037 "objc/unittests/frame_buffer_helpers.mm",
Danielaae012cf2017-10-12 13:46:00 +02001038 ]
Daniela012b56b2017-11-15 13:15:24 +01001039
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001040 # TODO(peterhanspers): Reenable these tests on simulator.
1041 # See bugs.webrtc.org/7812
1042 if (!use_ios_simulator) {
1043 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001044 "objc/unittests/RTCAudioDeviceModule_xctest.mm",
1045 "objc/unittests/RTCAudioDevice_xctest.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001046 ]
1047 }
1048
Danielaae012cf2017-10-12 13:46:00 +02001049 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001050 ":audio_device",
1051 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001052 ":base_objc",
1053 ":callback_logger_objc",
Anders Carlssondc6b4772018-01-15 13:31:03 +01001054 ":framework_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001055 ":mediaconstraints_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001056 ":native_api",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001057 ":native_api_audio_device_module",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001058 ":native_video",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001059 ":peerconnectionfactory_base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001060 ":videocapture_objc",
Anders Carlsson79ce8202018-06-01 12:51:09 +02001061 ":videocodec_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001062 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001063 ":videosource_objc",
Danielaae012cf2017-10-12 13:46:00 +02001064 ":videotoolbox_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001065 "../api/video:video_frame_i420",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001066 "../common_video:common_video",
Danielaae012cf2017-10-12 13:46:00 +02001067 "../media:rtc_media_base",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001068 "../media:rtc_media_tests_utils",
Danielaae012cf2017-10-12 13:46:00 +02001069 "../modules:module_api",
1070 "../rtc_base:rtc_base",
1071 "../rtc_base:rtc_base_tests_utils",
Oleh Prypinda04e062018-07-23 10:04:12 +02001072 "../system_wrappers:system_wrappers",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001073 "//third_party/libyuv",
Danielaae012cf2017-10-12 13:46:00 +02001074 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001075
1076 if (rtc_use_metal_rendering) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001077 sources += [ "objc/unittests/RTCMTLVideoView_xctest.m" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001078 deps += [ ":metal_objc" ]
1079 }
1080
Danielaae012cf2017-10-12 13:46:00 +02001081 public_deps = [
1082 "//build/config/ios:xctest",
1083 "//third_party/ocmock",
1084 ]
1085 }
1086
Daniela012b56b2017-11-15 13:15:24 +01001087 bundle_data("sdk_unittests_bundle_data") {
Daniela012b56b2017-11-15 13:15:24 +01001088 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001089 "objc/unittests/audio_short16.pcm",
1090 "objc/unittests/audio_short44.pcm",
1091 "objc/unittests/audio_short48.pcm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001092
1093 # Sample video taken from https://media.xiph.org/video/derf/
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001094 "objc/unittests/foreman.mp4",
Daniela012b56b2017-11-15 13:15:24 +01001095 ]
1096 outputs = [
1097 "{{bundle_resources_dir}}/{{source_file_part}}",
1098 ]
1099 }
1100
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001101 # These tests use static linking.
Danielaae012cf2017-10-12 13:46:00 +02001102 rtc_ios_xctest_test("sdk_unittests") {
1103 info_plist = "//test/ios/Info.plist"
1104 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001105 "objc/unittests/main.m",
Danielaae012cf2017-10-12 13:46:00 +02001106 ]
Daniela012b56b2017-11-15 13:15:24 +01001107
Danielaae012cf2017-10-12 13:46:00 +02001108 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
1109 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
1110 deps = [
Yura Yaroshevich5297bd22018-06-19 12:51:51 +03001111 ":peerconnectionfactory_base_objc",
Daniela012b56b2017-11-15 13:15:24 +01001112 ":sdk_unittests_bundle_data",
Danielaae012cf2017-10-12 13:46:00 +02001113 ":sdk_unittests_sources",
1114 ]
1115 ldflags = [ "-all_load" ]
1116 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001117
1118 # These tests link to the framework.
1119 rtc_ios_xctest_test("sdk_framework_unittests") {
1120 info_plist = "//test/ios/Info.plist"
1121 sources = [
1122 "objc/unittests/RTCDoNotPutCPlusPlusInFrameworkHeaders_xctest.m",
1123 "objc/unittests/main.m",
1124 ]
1125
1126 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
1127 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
1128 deps = [
1129 ":framework_objc+link",
1130 ":ios_framework_bundle",
1131 ]
1132 }
Danielaae012cf2017-10-12 13:46:00 +02001133 }
1134
1135 # TODO(denicija): once all tests are migrated to xctest remove this source set.
Kári Tristan Helgason90143242018-07-27 12:34:54 +02001136 rtc_source_set("rtc_unittests_objc") {
mbonadei2c8ac1b2017-05-31 05:14:26 -07001137 testonly = true
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001138
mbonadei2c8ac1b2017-05-31 05:14:26 -07001139 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001140 "objc/unittests/RTCCertificateTest.mm",
1141 "objc/unittests/RTCConfigurationTest.mm",
1142 "objc/unittests/RTCDataChannelConfigurationTest.mm",
1143 "objc/unittests/RTCIceCandidateTest.mm",
1144 "objc/unittests/RTCIceServerTest.mm",
1145 "objc/unittests/RTCIntervalRangeTests.mm",
1146 "objc/unittests/RTCMediaConstraintsTest.mm",
1147 "objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm",
1148 "objc/unittests/RTCPeerConnectionTest.mm",
1149 "objc/unittests/RTCSessionDescriptionTest.mm",
1150 "objc/unittests/RTCTracingTest.mm",
1151 "objc/unittests/objc_video_decoder_factory_tests.mm",
1152 "objc/unittests/objc_video_encoder_factory_tests.mm",
1153 "objc/unittests/scoped_cftyperef_tests.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001154 ]
Anders Carlssone7dd83f2018-01-19 11:28:44 +01001155 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001156 sources += [ "objc/unittests/RTCCameraVideoCapturerTests.mm" ]
oprypin45197522017-06-22 01:47:20 -07001157 }
mbonadeid7620582017-05-30 01:50:35 -07001158
mbonadei2c8ac1b2017-05-31 05:14:26 -07001159 # |-ObjC| flag needed to make sure category method implementations
1160 # are included:
1161 # https://developer.apple.com/library/mac/qa/qa1490/_index.html
1162 ldflags = [ "-ObjC" ]
magjed3149e092017-05-08 05:32:05 -07001163
mbonadei2c8ac1b2017-05-31 05:14:26 -07001164 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001165 ":base_objc",
1166 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001167 ":mediaconstraints_objc",
1168 ":native_api",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001169 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001170 ":peerconnectionfactory_base_objc",
1171 ":video_objc",
1172 ":videocapture_objc",
1173 ":videocodec_objc",
1174 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001175 ":videosource_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001176 ":videotoolbox_objc",
Piotr (Peter) Slatalae0c2e972018-10-08 09:43:21 -07001177 "../api:libjingle_peerconnection_api",
Jiawei Ouae810c12018-06-20 16:18:59 -07001178 "../api/audio_codecs:audio_codecs_api",
1179 "../api/audio_codecs:builtin_audio_decoder_factory",
1180 "../api/audio_codecs:builtin_audio_encoder_factory",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001181 "../api/video_codecs:video_codecs_api",
kthelgasonebd4f792017-09-04 04:36:21 -07001182 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -07001183 "../modules:module_api",
Jiawei Ouae810c12018-06-20 16:18:59 -07001184 "../modules/audio_device:audio_device_api",
1185 "../modules/audio_processing:audio_processing",
Patrik Höglund99175c62018-01-08 11:05:10 +01001186 "../modules/video_coding:video_codec_interface",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001187 "../rtc_base:rtc_base_tests_utils",
Niels Möllera12c42a2018-07-25 16:05:48 +02001188 "../rtc_base/system:unused",
Kári Tristan Helgasonca957482017-10-05 14:06:52 +02001189 "//test:test_support",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001190 "//third_party/ocmock",
1191 ]
magjed3149e092017-05-08 05:32:05 -07001192
denicija59ee91b2017-06-05 05:48:47 -07001193 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001194 sources += [ "objc/unittests/RTCAudioSessionTest.mm" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001195 deps += [ ":audio_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001196 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001197 }
kthelgason2f088792017-05-30 01:48:47 -07001198 }
1199
mbonadei2c8ac1b2017-05-31 05:14:26 -07001200 if (is_ios) {
Anders Carlssondc6b4772018-01-15 13:31:03 +01001201 ios_framework_bundle_with_umbrella_header("framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001202 info_plist = "objc/Info.plist"
mbonadei2c8ac1b2017-05-31 05:14:26 -07001203 output_name = "WebRTC"
Magnus Jedvertf83dc8b2017-08-29 09:49:43 +00001204
mbonadei2c8ac1b2017-05-31 05:14:26 -07001205 common_objc_headers = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001206 "objc/base/RTCCodecSpecificInfo.h",
1207 "objc/base/RTCEncodedImage.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001208 "objc/base/RTCI420Buffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001209 "objc/base/RTCLogging.h",
1210 "objc/base/RTCMacros.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001211 "objc/base/RTCMutableI420Buffer.h",
1212 "objc/base/RTCMutableYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001213 "objc/base/RTCRtpFragmentationHeader.h",
1214 "objc/base/RTCVideoCapturer.h",
1215 "objc/base/RTCVideoCodecInfo.h",
1216 "objc/base/RTCVideoDecoder.h",
1217 "objc/base/RTCVideoDecoderFactory.h",
1218 "objc/base/RTCVideoEncoder.h",
1219 "objc/base/RTCVideoEncoderFactory.h",
1220 "objc/base/RTCVideoEncoderQpThresholds.h",
1221 "objc/base/RTCVideoEncoderSettings.h",
1222 "objc/base/RTCVideoFrame.h",
1223 "objc/base/RTCVideoFrameBuffer.h",
1224 "objc/base/RTCVideoRenderer.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001225 "objc/base/RTCYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001226 "objc/components/audio/RTCAudioSession.h",
1227 "objc/components/audio/RTCAudioSessionConfiguration.h",
1228 "objc/components/capturer/RTCCameraVideoCapturer.h",
1229 "objc/components/capturer/RTCFileVideoCapturer.h",
1230 "objc/components/renderer/metal/RTCMTLVideoView.h",
1231 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
1232 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1233 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1234 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1235 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1236 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1237 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1238 "objc/components/video_codec/RTCVideoDecoderH264.h",
1239 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1240 "objc/components/video_codec/RTCVideoEncoderH264.h",
1241 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1242 "objc/helpers/RTCCameraPreviewView.h",
1243 "objc/helpers/RTCDispatcher.h",
1244 "objc/helpers/UIDevice+RTCDevice.h",
1245 "objc/api/peerconnection/RTCAudioSource.h",
1246 "objc/api/peerconnection/RTCAudioTrack.h",
1247 "objc/api/peerconnection/RTCConfiguration.h",
1248 "objc/api/peerconnection/RTCDataChannel.h",
1249 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1250 "objc/api/peerconnection/RTCFieldTrials.h",
1251 "objc/api/peerconnection/RTCIceCandidate.h",
1252 "objc/api/peerconnection/RTCIceServer.h",
1253 "objc/api/peerconnection/RTCIntervalRange.h",
1254 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1255 "objc/api/peerconnection/RTCMediaConstraints.h",
1256 "objc/api/peerconnection/RTCMediaSource.h",
1257 "objc/api/peerconnection/RTCMediaStream.h",
1258 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1259 "objc/api/peerconnection/RTCMetrics.h",
1260 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1261 "objc/api/peerconnection/RTCPeerConnection.h",
1262 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1263 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1264 "objc/api/peerconnection/RTCRtcpParameters.h",
1265 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1266 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1267 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1268 "objc/api/peerconnection/RTCRtpParameters.h",
1269 "objc/api/peerconnection/RTCRtpReceiver.h",
1270 "objc/api/peerconnection/RTCRtpSender.h",
1271 "objc/api/peerconnection/RTCRtpTransceiver.h",
1272 "objc/api/peerconnection/RTCDtmfSender.h",
1273 "objc/api/peerconnection/RTCSSLAdapter.h",
1274 "objc/api/peerconnection/RTCSessionDescription.h",
1275 "objc/api/peerconnection/RTCTracing.h",
1276 "objc/api/peerconnection/RTCCertificate.h",
1277 "objc/api/peerconnection/RTCVideoSource.h",
1278 "objc/api/peerconnection/RTCVideoTrack.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001279 "objc/api/video_codec/RTCVideoCodecConstants.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001280 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1281 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1282 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1283 "objc/api/video_codec/RTCVideoEncoderVP9.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001284 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1285 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001286 ]
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001287
mbonadei2c8ac1b2017-05-31 05:14:26 -07001288 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001289 common_objc_headers += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001290 "objc/api/logging/RTCCallbackLogger.h",
1291 "objc/api/peerconnection/RTCFileLogger.h",
Anders Carlsson3b3364e2018-01-30 15:46:13 +01001292 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001293 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001294
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001295 sources = common_objc_headers
1296 public_headers = common_objc_headers
1297
mbonadei2c8ac1b2017-05-31 05:14:26 -07001298 ldflags = [
1299 "-all_load",
1300 "-install_name",
1301 "@rpath/$output_name.framework/$output_name",
1302 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001303
mbonadei2c8ac1b2017-05-31 05:14:26 -07001304 deps = [
kthelgason36d658d2017-08-24 05:43:45 -07001305 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001306 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001307 ":default_codec_factory_objc",
1308 ":native_api",
1309 ":native_video",
1310 ":peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001311 ":ui_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001312 ":videocapture_objc",
1313 ":videocodec_objc",
1314 ":videotoolbox_objc",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001315 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001316 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001317 if (rtc_use_metal_rendering) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001318 deps += [ ":metal_objc" ]
1319 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001320 if (!build_with_chromium) {
1321 deps += [
1322 ":callback_logger_objc",
1323 ":file_logger_objc",
1324 ]
1325 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001326
mbonadei2c8ac1b2017-05-31 05:14:26 -07001327 libs = [
1328 "AVFoundation.framework",
1329 "CoreGraphics.framework",
1330 "CoreMedia.framework",
1331 "GLKit.framework",
1332 ]
1333
Anders Carlsson358f2e02018-06-04 10:24:37 +02001334 configs += [
1335 "..:common_objc",
1336 ":used_from_extension",
1337 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001338
kthelgason36d658d2017-08-24 05:43:45 -07001339 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001340 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001341
1342 bundle_data("ios_framework_bundle") {
1343 deps = [
1344 "../sdk:framework_objc",
1345 ]
1346 sources = [
1347 "$root_build_dir/WebRTC.framework",
1348 ]
1349 outputs = [
1350 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
1351 ]
1352 }
1353 }
1354
1355 if (is_mac) {
Anders Carlsson37bbf792018-09-05 16:29:27 +02001356 mac_framework_bundle_with_umbrella_header("mac_framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001357 info_plist = "objc/Info.plist"
1358 output_name = "WebRTC"
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001359
Anders Carlsson37bbf792018-09-05 16:29:27 +02001360 sources = [
1361 "objc/api/peerconnection/RTCAudioSource.h",
1362 "objc/api/peerconnection/RTCAudioTrack.h",
1363 "objc/api/peerconnection/RTCCertificate.h",
1364 "objc/api/peerconnection/RTCConfiguration.h",
1365 "objc/api/peerconnection/RTCDataChannel.h",
1366 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1367 "objc/api/peerconnection/RTCDtmfSender.h",
1368 "objc/api/peerconnection/RTCFieldTrials.h",
1369 "objc/api/peerconnection/RTCIceCandidate.h",
1370 "objc/api/peerconnection/RTCIceServer.h",
1371 "objc/api/peerconnection/RTCIntervalRange.h",
1372 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1373 "objc/api/peerconnection/RTCMediaConstraints.h",
1374 "objc/api/peerconnection/RTCMediaSource.h",
1375 "objc/api/peerconnection/RTCMediaStream.h",
1376 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1377 "objc/api/peerconnection/RTCMetrics.h",
1378 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1379 "objc/api/peerconnection/RTCPeerConnection.h",
1380 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1381 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1382 "objc/api/peerconnection/RTCRtcpParameters.h",
1383 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1384 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1385 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1386 "objc/api/peerconnection/RTCRtpParameters.h",
1387 "objc/api/peerconnection/RTCRtpReceiver.h",
1388 "objc/api/peerconnection/RTCRtpSender.h",
1389 "objc/api/peerconnection/RTCRtpTransceiver.h",
1390 "objc/api/peerconnection/RTCSSLAdapter.h",
1391 "objc/api/peerconnection/RTCSessionDescription.h",
1392 "objc/api/peerconnection/RTCTracing.h",
1393 "objc/api/peerconnection/RTCVideoSource.h",
1394 "objc/api/peerconnection/RTCVideoTrack.h",
1395 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1396 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1397 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1398 "objc/api/video_codec/RTCVideoEncoderVP9.h",
1399 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1400 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
1401 "objc/base/RTCCodecSpecificInfo.h",
1402 "objc/base/RTCEncodedImage.h",
1403 "objc/base/RTCI420Buffer.h",
1404 "objc/base/RTCLogging.h",
1405 "objc/base/RTCMacros.h",
1406 "objc/base/RTCMutableI420Buffer.h",
1407 "objc/base/RTCMutableYUVPlanarBuffer.h",
1408 "objc/base/RTCRtpFragmentationHeader.h",
1409 "objc/base/RTCVideoCapturer.h",
1410 "objc/base/RTCVideoCodecInfo.h",
1411 "objc/base/RTCVideoDecoder.h",
1412 "objc/base/RTCVideoDecoderFactory.h",
1413 "objc/base/RTCVideoEncoder.h",
1414 "objc/base/RTCVideoEncoderFactory.h",
1415 "objc/base/RTCVideoEncoderQpThresholds.h",
1416 "objc/base/RTCVideoEncoderSettings.h",
1417 "objc/base/RTCVideoFrame.h",
1418 "objc/base/RTCVideoFrameBuffer.h",
1419 "objc/base/RTCVideoRenderer.h",
1420 "objc/base/RTCYUVPlanarBuffer.h",
1421 "objc/components/capturer/RTCCameraVideoCapturer.h",
1422 "objc/components/capturer/RTCFileVideoCapturer.h",
1423 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
1424 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
1425 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1426 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1427 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1428 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1429 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1430 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1431 "objc/components/video_codec/RTCVideoDecoderH264.h",
1432 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1433 "objc/components/video_codec/RTCVideoEncoderH264.h",
1434 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1435 "objc/helpers/RTCDispatcher.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001436 ]
Anders Carlsson37bbf792018-09-05 16:29:27 +02001437 if (!build_with_chromium) {
1438 sources += [
1439 "objc/api/logging/RTCCallbackLogger.h",
1440 "objc/api/peerconnection/RTCFileLogger.h",
1441 ]
1442 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001443
1444 deps = [
1445 ":base_objc",
1446 ":default_codec_factory_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001447 ":native_api",
1448 ":native_video",
1449 ":peerconnectionfactory_base_objc",
1450 ":ui_objc",
1451 ":videocapture_objc",
1452 ":videocodec_objc",
1453 ":videotoolbox_objc",
1454 "../rtc_base:rtc_base_approved",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001455 ]
1456 if (rtc_use_metal_rendering) {
1457 deps += [ ":metal_objc" ]
1458 }
1459 if (!build_with_chromium) {
1460 deps += [
1461 ":callback_logger_objc",
1462 ":file_logger_objc",
1463 ]
1464 }
1465
1466 libs = [
1467 "AVFoundation.framework",
1468 "CoreGraphics.framework",
1469 "CoreMedia.framework",
1470 "OpenGL.framework",
1471 ]
1472
Anders Carlsson37bbf792018-09-05 16:29:27 +02001473 configs = [ "..:common_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001474
1475 public_configs = [ ":common_config_objc" ]
1476 }
1477
1478 bundle_data("mac_framework_bundle") {
1479 deps = [
1480 "../sdk:mac_framework_objc",
1481 ]
1482 sources = [
1483 "$root_build_dir/WebRTC.framework",
1484 ]
1485 outputs = [
1486 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
1487 ]
1488 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001489 }
1490
Anders Carlsson9823ee42018-03-07 10:32:03 +01001491 rtc_static_library("wrapped_native_codec_objc") {
1492 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001493 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.h",
1494 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm",
1495 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.h",
1496 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001497 ]
1498
1499 configs += [ "..:common_objc" ]
1500 public_configs = [ ":common_config_objc" ]
1501
Anders Carlsson9823ee42018-03-07 10:32:03 +01001502 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001503 ":base_objc",
1504 ":helpers_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001505 "../api/video_codecs:video_codecs_api",
1506 "../media:rtc_media_base",
1507 ]
1508 }
1509
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001510 # The native API is currently experimental and may change without notice.
1511 rtc_static_library("native_api") {
1512 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +02001513 allow_poison = [
1514 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
1515 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
1516 ]
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001517 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001518 "objc/native/api/video_capturer.h",
1519 "objc/native/api/video_capturer.mm",
1520 "objc/native/api/video_decoder_factory.h",
1521 "objc/native/api/video_decoder_factory.mm",
1522 "objc/native/api/video_encoder_factory.h",
1523 "objc/native/api/video_encoder_factory.mm",
1524 "objc/native/api/video_frame.h",
1525 "objc/native/api/video_frame.mm",
1526 "objc/native/api/video_frame_buffer.h",
1527 "objc/native/api/video_frame_buffer.mm",
1528 "objc/native/api/video_renderer.h",
1529 "objc/native/api/video_renderer.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001530 ]
1531
1532 configs += [ "..:common_objc" ]
1533
1534 public_configs = [ ":common_config_objc" ]
1535
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001536 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001537 ":base_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001538 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001539 ":videoframebuffer_objc",
Anders Carlsson73119182018-03-15 09:41:03 +01001540 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001541 "../api/video:video_frame",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001542 "../api/video_codecs:video_codecs_api",
1543 "../common_video",
1544 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +02001545 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001546 ]
1547 }
1548
1549 rtc_static_library("native_video") {
1550 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001551 "objc/native/src/objc_frame_buffer.h",
1552 "objc/native/src/objc_frame_buffer.mm",
1553 "objc/native/src/objc_video_decoder_factory.h",
1554 "objc/native/src/objc_video_decoder_factory.mm",
1555 "objc/native/src/objc_video_encoder_factory.h",
1556 "objc/native/src/objc_video_encoder_factory.mm",
1557 "objc/native/src/objc_video_frame.h",
1558 "objc/native/src/objc_video_frame.mm",
1559 "objc/native/src/objc_video_renderer.h",
1560 "objc/native/src/objc_video_renderer.mm",
1561 "objc/native/src/objc_video_track_source.h",
1562 "objc/native/src/objc_video_track_source.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001563 ]
1564
1565 configs += [ "..:common_objc" ]
1566
1567 public_configs = [ ":common_config_objc" ]
1568
1569 if (!build_with_chromium && is_clang) {
1570 # Suppress warnings from the Chromium Clang plugin
1571 # (bugs.webrtc.org/163).
1572 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1573 }
1574
1575 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001576 ":base_native_additions_objc",
1577 ":base_objc",
1578 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001579 ":videocodec_objc",
1580 ":videoframebuffer_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001581 ":vpx_codec_constants",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001582 ":wrapped_native_codec_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001583 "../api/video:video_frame",
1584 "../api/video:video_frame_i420",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001585 "../api/video_codecs:video_codecs_api",
1586 "../common_video",
1587 "../media:rtc_audio_video",
1588 "../media:rtc_media_base",
1589 "../modules:module_api",
1590 "../modules/video_coding:video_codec_interface",
1591 "../rtc_base:checks",
1592 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +02001593 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001594 ]
1595 }
1596
mbonadeic0af5ac2017-08-24 12:26:05 -07001597 rtc_static_library("video_toolbox_cc") {
mbonadei6ff8f962017-09-04 05:51:34 -07001598 visibility = [ ":videotoolbox_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001599 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001600 "objc/components/video_codec/helpers.cc",
1601 "objc/components/video_codec/helpers.h",
1602 "objc/components/video_codec/nalu_rewriter.cc",
1603 "objc/components/video_codec/nalu_rewriter.h",
mbonadeic0af5ac2017-08-24 12:26:05 -07001604 ]
1605 deps = [
1606 "../common_video",
1607 "../modules:module_api",
1608 "../modules/video_coding:webrtc_h264",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001609 "../rtc_base:checks",
mbonadeic0af5ac2017-08-24 12:26:05 -07001610 "../rtc_base:rtc_base_approved",
1611 ]
mbonadeic0af5ac2017-08-24 12:26:05 -07001612 }
1613
1614 rtc_static_library("videotoolbox_objc") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001615 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +02001616 allow_poison = [
1617 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
1618 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
1619 ]
mbonadeic0af5ac2017-08-24 12:26:05 -07001620 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001621 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1622 "objc/components/video_codec/RTCVideoDecoderFactoryH264.m",
1623 "objc/components/video_codec/RTCVideoDecoderH264.h",
1624 "objc/components/video_codec/RTCVideoDecoderH264.mm",
1625 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1626 "objc/components/video_codec/RTCVideoEncoderFactoryH264.m",
1627 "objc/components/video_codec/RTCVideoEncoderH264.h",
1628 "objc/components/video_codec/RTCVideoEncoderH264.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001629 ]
1630
Anders Carlsson358f2e02018-06-04 10:24:37 +02001631 configs += [
1632 "..:common_objc",
1633 ":used_from_extension",
1634 ]
1635
1636 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
1637 defines = [ "RTC_APPRTCMOBILE_BROADCAST_EXTENSION" ]
1638 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001639
1640 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001641 ":base_native_additions_objc",
1642 ":base_objc",
1643 ":helpers_objc",
mbonadeic0af5ac2017-08-24 12:26:05 -07001644 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001645 ":videocodec_objc",
1646 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001647 "../common_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001648 "../modules:module_api",
Patrik Höglund99175c62018-01-08 11:05:10 +01001649 "../modules/video_coding:video_codec_interface",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001650 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001651 "../rtc_base:rtc_base_approved",
Mirko Bonadei401d0562017-12-14 11:24:00 +01001652 "//third_party/libyuv",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001653 ]
1654
1655 libs = [
1656 "CoreFoundation.framework",
1657 "CoreMedia.framework",
1658 "CoreVideo.framework",
1659 "VideoToolbox.framework",
1660 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001661 }
1662 }
tkchin9eeb6242016-04-27 01:54:20 -07001663}