blob: a50b93ded0e07f83995966a05645ae5e0d9fd498 [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",
216 "../system_wrappers:metrics_api",
217 ]
218
219 if (is_clang) {
220 # Suppress warnings from the Chromium Clang plugin
221 # (bugs.webrtc.org/163).
222 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
223 }
224 }
225
226 rtc_source_set("audio_session_observer") {
227 visibility = [ ":*" ]
228
229 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200230 "objc/native/src/audio/audio_session_observer.h",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200231 ]
232
233 deps = [
234 "../rtc_base:rtc_base",
235 ]
236 }
237
238 rtc_static_library("audio_device") {
239 visibility = [ "*" ]
240
241 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200242 "objc/native/src/audio/audio_device_ios.h",
243 "objc/native/src/audio/audio_device_ios.mm",
244 "objc/native/src/audio/audio_device_module_ios.h",
245 "objc/native/src/audio/audio_device_module_ios.mm",
246 "objc/native/src/audio/helpers.h",
247 "objc/native/src/audio/helpers.mm",
248 "objc/native/src/audio/voice_processing_audio_unit.h",
249 "objc/native/src/audio/voice_processing_audio_unit.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200250 ]
251
252 deps = [
253 ":audio_objc",
254 ":audio_session_observer",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200255 ":base_objc",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200256 "../api:array_view",
257 "../modules/audio_device:audio_device_api",
258 "../modules/audio_device:audio_device_buffer",
259 "../modules/audio_device:audio_device_generic",
260 "../rtc_base:checks",
261 "../rtc_base:rtc_base",
262 "../rtc_base/system:fallthrough",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200263 "../system_wrappers:metrics_api",
264 ]
265
266 if (is_clang) {
267 # Suppress warnings from the Chromium Clang plugin
268 # (bugs.webrtc.org/163).
269 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
270 }
271 }
272
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100273 rtc_static_library("audio_objc") {
274 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200275 "objc/components/audio/RTCAudioSession+Configuration.mm",
276 "objc/components/audio/RTCAudioSession+Private.h",
277 "objc/components/audio/RTCAudioSession.h",
278 "objc/components/audio/RTCAudioSession.mm",
279 "objc/components/audio/RTCAudioSessionConfiguration.h",
280 "objc/components/audio/RTCAudioSessionConfiguration.m",
281 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.h",
282 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100283 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200284 configs += [
285 "..:common_objc",
286 ":used_from_extension",
287 ]
denicija59ee91b2017-06-05 05:48:47 -0700288
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100289 public_configs = [ ":common_config_objc" ]
Anders Carlsson8ecfd802017-09-15 14:07:30 +0200290
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100291 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200292 ":audio_session_observer",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200293 ":base_objc",
294 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100295 "../rtc_base:checks",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200296 "../rtc_base:rtc_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100297 "../rtc_base:rtc_base_approved",
298 ]
denicija59ee91b2017-06-05 05:48:47 -0700299 }
300 }
zhihuanga4c113a2017-06-28 14:05:44 -0700301
Anders Carlsson9823ee42018-03-07 10:32:03 +0100302 rtc_static_library("videosource_objc") {
zhihuanga4c113a2017-06-28 14:05:44 -0700303 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200304 "objc/api/peerconnection/RTCVideoSource+Private.h",
305 "objc/api/peerconnection/RTCVideoSource.h",
306 "objc/api/peerconnection/RTCVideoSource.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700307 ]
308
309 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200310 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100311 ":mediasource_objc",
312 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100313 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700314 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200315 "../api/video:video_frame",
316 "../api/video:video_frame_i420",
zhihuanga4c113a2017-06-28 14:05:44 -0700317 "../common_video",
318 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100319 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700320 "../rtc_base:rtc_base",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100321 "//third_party/libyuv",
zhihuanga4c113a2017-06-28 14:05:44 -0700322 ]
323
Anders Carlsson358f2e02018-06-04 10:24:37 +0200324 configs += [
325 "..:common_objc",
326 ":used_from_extension",
327 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700328 }
329
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100330 rtc_static_library("videoframebuffer_objc") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200331 visibility = [ "*" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100332 sources = [
Anders Carlsson4e5af962018-09-03 14:44:50 +0200333 "objc/api/video_frame_buffer/RTCNativeI420Buffer+Private.h",
334 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
335 "objc/api/video_frame_buffer/RTCNativeI420Buffer.mm",
336 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
337 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200338 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
339 "objc/components/video_frame_buffer/RTCCVPixelBuffer.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100340 ]
341 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200342 ":base_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200343 "//api/video:video_frame",
344 "//api/video:video_frame_i420",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100345 "//common_video",
346 "//rtc_base:checks",
347 "//rtc_base:rtc_base_approved",
348 "//third_party/libyuv",
349 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200350 configs += [
351 "..:common_objc",
352 ":used_from_extension",
353 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100354 }
355
kthelgason36d658d2017-08-24 05:43:45 -0700356 rtc_static_library("video_objc") {
kthelgason2f088792017-05-30 01:48:47 -0700357 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200358 "objc/components/renderer/opengl/RTCDefaultShader.h",
359 "objc/components/renderer/opengl/RTCDefaultShader.mm",
360 "objc/components/renderer/opengl/RTCI420TextureCache.h",
361 "objc/components/renderer/opengl/RTCI420TextureCache.mm",
362 "objc/components/renderer/opengl/RTCOpenGLDefines.h",
363 "objc/components/renderer/opengl/RTCShader.h",
364 "objc/components/renderer/opengl/RTCShader.mm",
365 "objc/components/renderer/opengl/RTCVideoViewShading.h",
kthelgason2f088792017-05-30 01:48:47 -0700366 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700367 libs = []
denicijad2088152017-04-28 02:14:54 -0700368 if (is_ios) {
denicija070d5e32017-02-26 11:44:13 -0800369 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200370 "objc/components/renderer/opengl/RTCNV12TextureCache.h",
371 "objc/components/renderer/opengl/RTCNV12TextureCache.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700372 ]
373 libs += [
374 "GLKit.framework",
375 "OpenGLES.framework",
376 "QuartzCore.framework",
377 ]
378 } else if (is_mac) {
mbonadei2c8ac1b2017-05-31 05:14:26 -0700379 libs += [
380 "CoreMedia.framework",
381 "CoreVideo.framework",
382 "OpenGL.framework",
denicija070d5e32017-02-26 11:44:13 -0800383 ]
384 }
mbonadei2c8ac1b2017-05-31 05:14:26 -0700385
kthelgason2f088792017-05-30 01:48:47 -0700386 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200387 ":base_objc",
388 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100389 ":mediaconstraints_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100390 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100391 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100392 ":videosource_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700393 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200394 "../api/video:video_frame",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700395 "../common_video",
396 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100397 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700398 "../rtc_base:rtc_base",
Danil Chapovalov196100e2018-06-21 10:17:24 +0200399 "//third_party/abseil-cpp/absl/types:optional",
tkchin9eeb6242016-04-27 01:54:20 -0700400 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700401
Anders Carlsson358f2e02018-06-04 10:24:37 +0200402 configs += [
403 "..:common_objc",
404 ":used_from_extension",
405 ]
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800406 }
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800407
kthelgason36d658d2017-08-24 05:43:45 -0700408 rtc_static_library("ui_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000409 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200410 allow_poison = [
411 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
412 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
413 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700414 if (is_ios) {
415 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200416 "objc/components/renderer/opengl/RTCDisplayLinkTimer.h",
417 "objc/components/renderer/opengl/RTCDisplayLinkTimer.m",
418 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
419 "objc/components/renderer/opengl/RTCEAGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700420 ]
421 }
422 if (is_mac) {
423 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200424 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
425 "objc/components/renderer/opengl/RTCNSGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700426 ]
427 }
428 configs += [ "..:common_objc" ]
429 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200430 ":base_objc",
431 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100432 ":video_objc",
433 ":videocapture_objc",
434 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700435 ]
436 }
kthelgasonebc34e72016-09-15 04:30:18 -0700437
mbonadei2c8ac1b2017-05-31 05:14:26 -0700438 if (rtc_use_metal_rendering) {
kthelgason36d658d2017-08-24 05:43:45 -0700439 rtc_static_library("metal_objc") {
Mirko Bonadeid68956d2018-02-16 17:55:36 +0100440 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200441 allow_poison = [
442 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
443 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
444 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700445 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200446 "objc/components/renderer/metal/RTCMTLI420Renderer.h",
447 "objc/components/renderer/metal/RTCMTLI420Renderer.mm",
448 "objc/components/renderer/metal/RTCMTLRenderer+Private.h",
449 "objc/components/renderer/metal/RTCMTLRenderer.h",
450 "objc/components/renderer/metal/RTCMTLRenderer.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700451 ]
452 if (is_ios) {
453 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200454 "objc/components/renderer/metal/RTCMTLNV12Renderer.h",
455 "objc/components/renderer/metal/RTCMTLNV12Renderer.mm",
456 "objc/components/renderer/metal/RTCMTLRGBRenderer.h",
457 "objc/components/renderer/metal/RTCMTLRGBRenderer.mm",
458 "objc/components/renderer/metal/RTCMTLVideoView.h",
459 "objc/components/renderer/metal/RTCMTLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700460 ]
461 }
462 if (is_mac) {
463 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200464 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
465 "objc/components/renderer/metal/RTCMTLNSVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700466 ]
467 }
468 libs = [
469 "CoreVideo.framework",
470 "Metal.framework",
471 "MetalKit.framework",
472 ]
473 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200474 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100475 ":peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700476 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100477 ":videoframebuffer_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200478 "../api/video:video_frame",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100479 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700480 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700481 ]
482 configs += [ "..:common_objc" ]
kthelgason36d658d2017-08-24 05:43:45 -0700483 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700484 }
485 }
486
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200487 # TODO(bugs.webrtc.org/9627): Remove this target.
Anders Carlsson73119182018-03-15 09:41:03 +0100488 rtc_static_library("videocapturebase_objc") {
489 visibility = [ "*" ]
490 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200491 "objc/helpers/noop.mm",
Anders Carlsson73119182018-03-15 09:41:03 +0100492 ]
Anders Carlsson73119182018-03-15 09:41:03 +0100493
494 configs += [ "..:common_objc" ]
495
496 public_configs = [ ":common_config_objc" ]
497
498 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200499 ":base_objc",
Anders Carlsson73119182018-03-15 09:41:03 +0100500 ":videoframebuffer_objc",
501 ]
502 }
503
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100504 rtc_static_library("videocapture_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000505 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200506 allow_poison = [
507 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
508 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
509 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700510 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200511 "objc/components/capturer/RTCCameraVideoCapturer.h",
512 "objc/components/capturer/RTCCameraVideoCapturer.m",
zhihuanga4c113a2017-06-28 14:05:44 -0700513 ]
514 if (is_ios) {
515 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200516 "objc/components/capturer/RTCFileVideoCapturer.h",
517 "objc/components/capturer/RTCFileVideoCapturer.m",
zhihuanga4c113a2017-06-28 14:05:44 -0700518 ]
519 }
520 libs = [ "AVFoundation.framework" ]
521
zhihuanga4c113a2017-06-28 14:05:44 -0700522 configs += [ "..:common_objc" ]
523
kthelgason36d658d2017-08-24 05:43:45 -0700524 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700525
zhihuanga4c113a2017-06-28 14:05:44 -0700526 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200527 ":base_objc",
528 ":helpers_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700529 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100530 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700531 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700532 }
533
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100534 rtc_static_library("videocodec_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200535 visibility = [ "*" ]
Mirko Bonadei96ede162018-09-06 13:45:44 +0200536 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100537 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200538 "objc/components/video_codec/RTCCodecSpecificInfoH264+Private.h",
539 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
540 "objc/components/video_codec/RTCCodecSpecificInfoH264.mm",
541 "objc/components/video_codec/RTCH264ProfileLevelId.h",
542 "objc/components/video_codec/RTCH264ProfileLevelId.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700543 ]
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300544 if (is_ios) {
545 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200546 "objc/components/video_codec/UIDevice+H264Profile.h",
547 "objc/components/video_codec/UIDevice+H264Profile.mm",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300548 ]
549 }
zhihuanga4c113a2017-06-28 14:05:44 -0700550 if (!build_with_chromium && is_clang) {
551 # Suppress warnings from the Chromium Clang plugin
552 # (bugs.webrtc.org/163).
553 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
554 }
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100555 public_configs = [ ":common_config_objc" ]
556 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200557 ":base_objc",
558 ":helpers_objc",
kthelgasonfb143122017-07-25 07:55:58 -0700559 "../api/video_codecs:video_codecs_api",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100560 "../common_video",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300561 "../media:rtc_h264_profile_id",
zhihuanga4c113a2017-06-28 14:05:44 -0700562 "../media:rtc_media_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100563 "../modules:module_api",
564 "../modules/video_coding:video_codec_interface",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200565 "../rtc_base:checks",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100566 "../rtc_base:rtc_base_approved",
kthelgasonfb143122017-07-25 07:55:58 -0700567 "../system_wrappers:field_trial_api",
zhihuanga4c113a2017-06-28 14:05:44 -0700568 ]
569 }
570
Anders Carlssondd8c1652018-01-30 10:32:13 +0100571 rtc_static_library("default_codec_factory_objc") {
572 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200573 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
574 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.m",
575 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
576 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.m",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100577 ]
578
579 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200580 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100581 ":native_video",
582 ":videocodec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200583 ":videotoolbox_objc",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +0200584 ":vp8",
585 ":vp9",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200586 ":vpx_codec_constants",
587 ]
588 }
589
590 rtc_static_library("vpx_codec_constants") {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200591 configs += [ "..:no_global_constructors" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200592 sources = [
593 "objc/api/video_codec/RTCVideoCodecConstants.h",
594 "objc/api/video_codec/RTCVideoCodecConstants.mm",
595 ]
596
597 deps = [
598 ":base_objc",
599 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100600 ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100601 }
602
603 rtc_static_library("vp8") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100604 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200605 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100606 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200607 "objc/api/video_codec/RTCVideoDecoderVP8.h",
608 "objc/api/video_codec/RTCVideoDecoderVP8.mm",
609 "objc/api/video_codec/RTCVideoEncoderVP8.h",
610 "objc/api/video_codec/RTCVideoEncoderVP8.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100611 ]
612
Anders Carlssondd8c1652018-01-30 10:32:13 +0100613 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200614 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100615 ":wrapped_native_codec_objc",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100616 "../modules/video_coding:webrtc_vp8",
617 "../system_wrappers:metrics_default",
618 ]
619 }
620
621 rtc_static_library("vp9") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100622 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200623 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100624 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200625 "objc/api/video_codec/RTCVideoDecoderVP9.h",
626 "objc/api/video_codec/RTCVideoDecoderVP9.mm",
627 "objc/api/video_codec/RTCVideoEncoderVP9.h",
628 "objc/api/video_codec/RTCVideoEncoderVP9.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100629 ]
630
Anders Carlssondd8c1652018-01-30 10:32:13 +0100631 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200632 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100633 ":wrapped_native_codec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200634 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100635 "../modules/video_coding:webrtc_vp9",
636 "../system_wrappers:metrics_default",
637 ]
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",
763 "../api/video_codecs:video_codecs_api",
764 "../common_video",
765 "../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",
866 "objc/api/peerconnection/RTCRtpReceiver+Private.h",
867 "objc/api/peerconnection/RTCRtpReceiver.h",
868 "objc/api/peerconnection/RTCRtpReceiver.mm",
869 "objc/api/peerconnection/RTCRtpSender+Private.h",
870 "objc/api/peerconnection/RTCRtpSender.h",
871 "objc/api/peerconnection/RTCRtpSender.mm",
872 "objc/api/peerconnection/RTCRtpTransceiver+Private.h",
873 "objc/api/peerconnection/RTCRtpTransceiver.h",
874 "objc/api/peerconnection/RTCRtpTransceiver.mm",
875 "objc/api/peerconnection/RTCSSLAdapter.h",
876 "objc/api/peerconnection/RTCSSLAdapter.mm",
877 "objc/api/peerconnection/RTCSessionDescription+Private.h",
878 "objc/api/peerconnection/RTCSessionDescription.h",
879 "objc/api/peerconnection/RTCSessionDescription.mm",
880 "objc/api/peerconnection/RTCTracing.h",
881 "objc/api/peerconnection/RTCTracing.mm",
882 "objc/api/peerconnection/RTCVideoTrack+Private.h",
883 "objc/api/peerconnection/RTCVideoTrack.h",
884 "objc/api/peerconnection/RTCVideoTrack.mm",
kthelgason5fe4d492016-12-05 11:27:30 -0800885 ]
kthelgasonebc34e72016-09-15 04:30:18 -0700886
Anders Carlsson358f2e02018-06-04 10:24:37 +0200887 configs += [
888 "..:common_objc",
889 ":used_from_extension",
890 ]
kthelgason36d658d2017-08-24 05:43:45 -0700891 public_configs = [ ":common_config_objc" ]
kthelgasonc0977102017-04-24 00:57:16 -0700892
mbonadei2c8ac1b2017-05-31 05:14:26 -0700893 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200894 ":base_native_additions_objc",
895 ":base_objc",
896 ":file_logger_objc",
897 ":helpers_objc",
898 ":legacy_header_paths",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100899 ":mediaconstraints_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100900 ":mediasource_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100901 ":native_api",
902 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100903 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100904 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100905 ":videorendereradapter_objc",
906 ":videosource_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200907 ":videotoolbox_objc",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100908 "../api:libjingle_peerconnection_api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700909 "../api/audio_codecs:audio_codecs_api",
Karl Wiberg5817d3d2018-04-06 10:06:42 +0200910 "../api/audio_codecs:builtin_audio_decoder_factory",
Jiawei Ouae810c12018-06-20 16:18:59 -0700911 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200912 "../api/video:video_frame",
Anders Carlsson7e042812017-10-05 16:55:38 +0200913 "../api/video_codecs:video_codecs_api",
Anders Carlssone5960ce2017-06-22 15:26:30 +0200914 "../common_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700915 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -0700916 "../modules:module_api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700917 "../modules/audio_device:audio_device_api",
918 "../modules/audio_processing:audio_processing",
Patrik Höglund99175c62018-01-08 11:05:10 +0100919 "../modules/video_coding:video_codec_interface",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100920 "../pc:create_pc_factory",
zhihuanga4c113a2017-06-28 14:05:44 -0700921 "../pc:peerconnection",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100922 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700923 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +0200924 "//third_party/abseil-cpp/absl/memory",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700925 ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200926
927 if (is_ios) {
928 deps += [ ":native_api_audio_device_module" ]
929 }
kthelgasonebc34e72016-09-15 04:30:18 -0700930 }
Zeke Chindd0e1e02016-10-11 13:27:26 -0700931
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200932 # TODO(bugs.webrtc.org/9627): Remove this target.
933 rtc_source_set("legacy_header_paths") {
934 sources = [
935 "objc/Framework/Classes/Common/NSString+StdString.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200936 "objc/Framework/Classes/Common/scoped_cftyperef.h",
937 "objc/Framework/Classes/PeerConnection/RTCConfiguration+Native.h",
938 "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Native.h",
939 "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Native.h",
940 "objc/Framework/Classes/PeerConnection/RTCVideoCodec+Private.h",
941 "objc/Framework/Classes/Video/RTCDefaultShader.h",
942 "objc/Framework/Classes/Video/RTCNV12TextureCache.h",
943 "objc/Framework/Classes/VideoToolbox/nalu_rewriter.h",
944 "objc/Framework/Headers/WebRTC/RTCAudioSession.h",
945 "objc/Framework/Headers/WebRTC/RTCAudioSessionConfiguration.h",
946 "objc/Framework/Headers/WebRTC/RTCAudioSource.h",
947 "objc/Framework/Headers/WebRTC/RTCAudioTrack.h",
948 "objc/Framework/Headers/WebRTC/RTCCVPixelBuffer.h",
949 "objc/Framework/Headers/WebRTC/RTCCallbackLogger.h",
950 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
951 "objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h",
952 "objc/Framework/Headers/WebRTC/RTCCertificate.h",
953 "objc/Framework/Headers/WebRTC/RTCConfiguration.h",
954 "objc/Framework/Headers/WebRTC/RTCDataChannel.h",
955 "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h",
956 "objc/Framework/Headers/WebRTC/RTCDefaultVideoDecoderFactory.h",
957 "objc/Framework/Headers/WebRTC/RTCDefaultVideoEncoderFactory.h",
958 "objc/Framework/Headers/WebRTC/RTCDispatcher.h",
959 "objc/Framework/Headers/WebRTC/RTCDtmfSender.h",
960 "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
961 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h",
962 "objc/Framework/Headers/WebRTC/RTCFileLogger.h",
963 "objc/Framework/Headers/WebRTC/RTCFileVideoCapturer.h",
964 "objc/Framework/Headers/WebRTC/RTCH264ProfileLevelId.h",
965 "objc/Framework/Headers/WebRTC/RTCIceCandidate.h",
966 "objc/Framework/Headers/WebRTC/RTCIceServer.h",
967 "objc/Framework/Headers/WebRTC/RTCIntervalRange.h",
968 "objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h",
969 "objc/Framework/Headers/WebRTC/RTCLogging.h",
970 "objc/Framework/Headers/WebRTC/RTCMTLNSVideoView.h",
971 "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h",
972 "objc/Framework/Headers/WebRTC/RTCMacros.h",
973 "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h",
974 "objc/Framework/Headers/WebRTC/RTCMediaSource.h",
975 "objc/Framework/Headers/WebRTC/RTCMediaStream.h",
976 "objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h",
977 "objc/Framework/Headers/WebRTC/RTCMetrics.h",
978 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h",
979 "objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h",
980 "objc/Framework/Headers/WebRTC/RTCPeerConnection.h",
981 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h",
982 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactoryOptions.h",
983 "objc/Framework/Headers/WebRTC/RTCRtcpParameters.h",
984 "objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h",
985 "objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h",
986 "objc/Framework/Headers/WebRTC/RTCRtpHeaderExtension.h",
987 "objc/Framework/Headers/WebRTC/RTCRtpParameters.h",
988 "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h",
989 "objc/Framework/Headers/WebRTC/RTCRtpSender.h",
990 "objc/Framework/Headers/WebRTC/RTCRtpTransceiver.h",
991 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
992 "objc/Framework/Headers/WebRTC/RTCSessionDescription.h",
993 "objc/Framework/Headers/WebRTC/RTCTracing.h",
994 "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h",
995 "objc/Framework/Headers/WebRTC/RTCVideoCodec.h",
996 "objc/Framework/Headers/WebRTC/RTCVideoCodecFactory.h",
997 "objc/Framework/Headers/WebRTC/RTCVideoCodecH264.h",
998 "objc/Framework/Headers/WebRTC/RTCVideoCodecInfo.h",
999 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP8.h",
1000 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP9.h",
1001 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP8.h",
1002 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP9.h",
1003 "objc/Framework/Headers/WebRTC/RTCVideoFrame.h",
1004 "objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.h",
1005 "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h",
1006 "objc/Framework/Headers/WebRTC/RTCVideoSource.h",
1007 "objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
1008 "objc/Framework/Headers/WebRTC/RTCVideoViewShading.h",
1009 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
1010 "objc/Framework/Native/api/audio_device_module.h",
1011 "objc/Framework/Native/api/video_decoder_factory.h",
1012 "objc/Framework/Native/api/video_encoder_factory.h",
1013 "objc/Framework/Native/api/video_frame_buffer.h",
1014 "objc/Framework/Native/src/objc_video_decoder_factory.h",
1015 "objc/Framework/Native/src/objc_video_encoder_factory.h",
1016 ]
1017 }
1018
mbonadei2c8ac1b2017-05-31 05:14:26 -07001019 if (rtc_include_tests) {
Daniela012b56b2017-11-15 13:15:24 +01001020 if (is_ios) {
Danielaae012cf2017-10-12 13:46:00 +02001021 rtc_source_set("sdk_unittests_sources") {
1022 testonly = true
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001023 include_dirs = [ "objc/" ]
Daniela012b56b2017-11-15 13:15:24 +01001024
Danielaae012cf2017-10-12 13:46:00 +02001025 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001026 "objc/unittests/ObjCVideoTrackSource_xctest.mm",
1027 "objc/unittests/RTCCVPixelBuffer_xctest.mm",
1028 "objc/unittests/RTCCallbackLogger_xctest.m",
1029 "objc/unittests/RTCFileVideoCapturer_xctest.mm",
1030 "objc/unittests/RTCH264ProfileLevelId_xctest.m",
1031 "objc/unittests/RTCPeerConnectionFactory_xctest.m",
1032 "objc/unittests/frame_buffer_helpers.h",
1033 "objc/unittests/frame_buffer_helpers.mm",
Danielaae012cf2017-10-12 13:46:00 +02001034 ]
Daniela012b56b2017-11-15 13:15:24 +01001035
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001036 # TODO(peterhanspers): Reenable these tests on simulator.
1037 # See bugs.webrtc.org/7812
1038 if (!use_ios_simulator) {
1039 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001040 "objc/unittests/RTCAudioDeviceModule_xctest.mm",
1041 "objc/unittests/RTCAudioDevice_xctest.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001042 ]
1043 }
1044
Danielaae012cf2017-10-12 13:46:00 +02001045 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001046 ":audio_device",
1047 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001048 ":base_objc",
1049 ":callback_logger_objc",
Anders Carlssondc6b4772018-01-15 13:31:03 +01001050 ":framework_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001051 ":mediaconstraints_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001052 ":native_api",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001053 ":native_api_audio_device_module",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001054 ":native_video",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001055 ":peerconnectionfactory_base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001056 ":videocapture_objc",
Anders Carlsson79ce8202018-06-01 12:51:09 +02001057 ":videocodec_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001058 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001059 ":videosource_objc",
Danielaae012cf2017-10-12 13:46:00 +02001060 ":videotoolbox_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001061 "../api/video:video_frame_i420",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001062 "../common_video:common_video",
Danielaae012cf2017-10-12 13:46:00 +02001063 "../media:rtc_media_base",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001064 "../media:rtc_media_tests_utils",
Danielaae012cf2017-10-12 13:46:00 +02001065 "../modules:module_api",
1066 "../rtc_base:rtc_base",
1067 "../rtc_base:rtc_base_tests_utils",
Oleh Prypinda04e062018-07-23 10:04:12 +02001068 "../system_wrappers:system_wrappers",
1069 "../system_wrappers:system_wrappers_default",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001070 "//third_party/libyuv",
Danielaae012cf2017-10-12 13:46:00 +02001071 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001072
1073 if (rtc_use_metal_rendering) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001074 sources += [ "objc/unittests/RTCMTLVideoView_xctest.m" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001075 deps += [ ":metal_objc" ]
1076 }
1077
Danielaae012cf2017-10-12 13:46:00 +02001078 public_deps = [
1079 "//build/config/ios:xctest",
1080 "//third_party/ocmock",
1081 ]
1082 }
1083
Daniela012b56b2017-11-15 13:15:24 +01001084 bundle_data("sdk_unittests_bundle_data") {
Daniela012b56b2017-11-15 13:15:24 +01001085 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001086 "objc/unittests/audio_short16.pcm",
1087 "objc/unittests/audio_short44.pcm",
1088 "objc/unittests/audio_short48.pcm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001089
1090 # Sample video taken from https://media.xiph.org/video/derf/
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001091 "objc/unittests/foreman.mp4",
Daniela012b56b2017-11-15 13:15:24 +01001092 ]
1093 outputs = [
1094 "{{bundle_resources_dir}}/{{source_file_part}}",
1095 ]
1096 }
1097
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001098 # These tests use static linking.
Danielaae012cf2017-10-12 13:46:00 +02001099 rtc_ios_xctest_test("sdk_unittests") {
1100 info_plist = "//test/ios/Info.plist"
1101 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001102 "objc/unittests/main.m",
Danielaae012cf2017-10-12 13:46:00 +02001103 ]
Daniela012b56b2017-11-15 13:15:24 +01001104
Danielaae012cf2017-10-12 13:46:00 +02001105 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
1106 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
1107 deps = [
Yura Yaroshevich5297bd22018-06-19 12:51:51 +03001108 ":peerconnectionfactory_base_objc",
Daniela012b56b2017-11-15 13:15:24 +01001109 ":sdk_unittests_bundle_data",
Danielaae012cf2017-10-12 13:46:00 +02001110 ":sdk_unittests_sources",
1111 ]
1112 ldflags = [ "-all_load" ]
1113 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001114
1115 # These tests link to the framework.
1116 rtc_ios_xctest_test("sdk_framework_unittests") {
1117 info_plist = "//test/ios/Info.plist"
1118 sources = [
1119 "objc/unittests/RTCDoNotPutCPlusPlusInFrameworkHeaders_xctest.m",
1120 "objc/unittests/main.m",
1121 ]
1122
1123 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
1124 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
1125 deps = [
1126 ":framework_objc+link",
1127 ":ios_framework_bundle",
1128 ]
1129 }
Danielaae012cf2017-10-12 13:46:00 +02001130 }
1131
1132 # TODO(denicija): once all tests are migrated to xctest remove this source set.
Kári Tristan Helgason90143242018-07-27 12:34:54 +02001133 rtc_source_set("rtc_unittests_objc") {
mbonadei2c8ac1b2017-05-31 05:14:26 -07001134 testonly = true
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001135
mbonadei2c8ac1b2017-05-31 05:14:26 -07001136 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001137 "objc/unittests/RTCCertificateTest.mm",
1138 "objc/unittests/RTCConfigurationTest.mm",
1139 "objc/unittests/RTCDataChannelConfigurationTest.mm",
1140 "objc/unittests/RTCIceCandidateTest.mm",
1141 "objc/unittests/RTCIceServerTest.mm",
1142 "objc/unittests/RTCIntervalRangeTests.mm",
1143 "objc/unittests/RTCMediaConstraintsTest.mm",
1144 "objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm",
1145 "objc/unittests/RTCPeerConnectionTest.mm",
1146 "objc/unittests/RTCSessionDescriptionTest.mm",
1147 "objc/unittests/RTCTracingTest.mm",
1148 "objc/unittests/objc_video_decoder_factory_tests.mm",
1149 "objc/unittests/objc_video_encoder_factory_tests.mm",
1150 "objc/unittests/scoped_cftyperef_tests.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001151 ]
Anders Carlssone7dd83f2018-01-19 11:28:44 +01001152 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001153 sources += [ "objc/unittests/RTCCameraVideoCapturerTests.mm" ]
oprypin45197522017-06-22 01:47:20 -07001154 }
mbonadeid7620582017-05-30 01:50:35 -07001155
mbonadei2c8ac1b2017-05-31 05:14:26 -07001156 # |-ObjC| flag needed to make sure category method implementations
1157 # are included:
1158 # https://developer.apple.com/library/mac/qa/qa1490/_index.html
1159 ldflags = [ "-ObjC" ]
magjed3149e092017-05-08 05:32:05 -07001160
mbonadei2c8ac1b2017-05-31 05:14:26 -07001161 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001162 ":base_objc",
1163 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001164 ":mediaconstraints_objc",
1165 ":native_api",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001166 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001167 ":peerconnectionfactory_base_objc",
1168 ":video_objc",
1169 ":videocapture_objc",
1170 ":videocodec_objc",
1171 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001172 ":videosource_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001173 ":videotoolbox_objc",
Jiawei Ouae810c12018-06-20 16:18:59 -07001174 "../api/audio_codecs:audio_codecs_api",
1175 "../api/audio_codecs:builtin_audio_decoder_factory",
1176 "../api/audio_codecs:builtin_audio_encoder_factory",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001177 "../api/video_codecs:video_codecs_api",
kthelgasonebd4f792017-09-04 04:36:21 -07001178 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -07001179 "../modules:module_api",
Jiawei Ouae810c12018-06-20 16:18:59 -07001180 "../modules/audio_device:audio_device_api",
1181 "../modules/audio_processing:audio_processing",
Patrik Höglund99175c62018-01-08 11:05:10 +01001182 "../modules/video_coding:video_codec_interface",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001183 "../rtc_base:rtc_base_tests_utils",
Niels Möllera12c42a2018-07-25 16:05:48 +02001184 "../rtc_base/system:unused",
Oleh Prypinda04e062018-07-23 10:04:12 +02001185 "../system_wrappers:system_wrappers_default",
Kári Tristan Helgasonca957482017-10-05 14:06:52 +02001186 "//test:test_support",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001187 "//third_party/ocmock",
1188 ]
magjed3149e092017-05-08 05:32:05 -07001189
denicija59ee91b2017-06-05 05:48:47 -07001190 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001191 sources += [ "objc/unittests/RTCAudioSessionTest.mm" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001192 deps += [ ":audio_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001193 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001194 }
kthelgason2f088792017-05-30 01:48:47 -07001195 }
1196
mbonadei2c8ac1b2017-05-31 05:14:26 -07001197 if (is_ios) {
Anders Carlssondc6b4772018-01-15 13:31:03 +01001198 ios_framework_bundle_with_umbrella_header("framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001199 info_plist = "objc/Info.plist"
mbonadei2c8ac1b2017-05-31 05:14:26 -07001200 output_name = "WebRTC"
Magnus Jedvertf83dc8b2017-08-29 09:49:43 +00001201
mbonadei2c8ac1b2017-05-31 05:14:26 -07001202 common_objc_headers = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001203 "objc/base/RTCCodecSpecificInfo.h",
1204 "objc/base/RTCEncodedImage.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001205 "objc/base/RTCI420Buffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001206 "objc/base/RTCLogging.h",
1207 "objc/base/RTCMacros.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001208 "objc/base/RTCMutableI420Buffer.h",
1209 "objc/base/RTCMutableYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001210 "objc/base/RTCRtpFragmentationHeader.h",
1211 "objc/base/RTCVideoCapturer.h",
1212 "objc/base/RTCVideoCodecInfo.h",
1213 "objc/base/RTCVideoDecoder.h",
1214 "objc/base/RTCVideoDecoderFactory.h",
1215 "objc/base/RTCVideoEncoder.h",
1216 "objc/base/RTCVideoEncoderFactory.h",
1217 "objc/base/RTCVideoEncoderQpThresholds.h",
1218 "objc/base/RTCVideoEncoderSettings.h",
1219 "objc/base/RTCVideoFrame.h",
1220 "objc/base/RTCVideoFrameBuffer.h",
1221 "objc/base/RTCVideoRenderer.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001222 "objc/base/RTCYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001223 "objc/components/audio/RTCAudioSession.h",
1224 "objc/components/audio/RTCAudioSessionConfiguration.h",
1225 "objc/components/capturer/RTCCameraVideoCapturer.h",
1226 "objc/components/capturer/RTCFileVideoCapturer.h",
1227 "objc/components/renderer/metal/RTCMTLVideoView.h",
1228 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
1229 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1230 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1231 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1232 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1233 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1234 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1235 "objc/components/video_codec/RTCVideoDecoderH264.h",
1236 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1237 "objc/components/video_codec/RTCVideoEncoderH264.h",
1238 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1239 "objc/helpers/RTCCameraPreviewView.h",
1240 "objc/helpers/RTCDispatcher.h",
1241 "objc/helpers/UIDevice+RTCDevice.h",
1242 "objc/api/peerconnection/RTCAudioSource.h",
1243 "objc/api/peerconnection/RTCAudioTrack.h",
1244 "objc/api/peerconnection/RTCConfiguration.h",
1245 "objc/api/peerconnection/RTCDataChannel.h",
1246 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1247 "objc/api/peerconnection/RTCFieldTrials.h",
1248 "objc/api/peerconnection/RTCIceCandidate.h",
1249 "objc/api/peerconnection/RTCIceServer.h",
1250 "objc/api/peerconnection/RTCIntervalRange.h",
1251 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1252 "objc/api/peerconnection/RTCMediaConstraints.h",
1253 "objc/api/peerconnection/RTCMediaSource.h",
1254 "objc/api/peerconnection/RTCMediaStream.h",
1255 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1256 "objc/api/peerconnection/RTCMetrics.h",
1257 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1258 "objc/api/peerconnection/RTCPeerConnection.h",
1259 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1260 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1261 "objc/api/peerconnection/RTCRtcpParameters.h",
1262 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1263 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1264 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1265 "objc/api/peerconnection/RTCRtpParameters.h",
1266 "objc/api/peerconnection/RTCRtpReceiver.h",
1267 "objc/api/peerconnection/RTCRtpSender.h",
1268 "objc/api/peerconnection/RTCRtpTransceiver.h",
1269 "objc/api/peerconnection/RTCDtmfSender.h",
1270 "objc/api/peerconnection/RTCSSLAdapter.h",
1271 "objc/api/peerconnection/RTCSessionDescription.h",
1272 "objc/api/peerconnection/RTCTracing.h",
1273 "objc/api/peerconnection/RTCCertificate.h",
1274 "objc/api/peerconnection/RTCVideoSource.h",
1275 "objc/api/peerconnection/RTCVideoTrack.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001276 "objc/api/video_codec/RTCVideoCodecConstants.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001277 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1278 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1279 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1280 "objc/api/video_codec/RTCVideoEncoderVP9.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001281 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1282 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001283 ]
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001284
mbonadei2c8ac1b2017-05-31 05:14:26 -07001285 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001286 common_objc_headers += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001287 "objc/api/logging/RTCCallbackLogger.h",
1288 "objc/api/peerconnection/RTCFileLogger.h",
Anders Carlsson3b3364e2018-01-30 15:46:13 +01001289 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001290 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001291
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001292 sources = common_objc_headers
1293 public_headers = common_objc_headers
1294
mbonadei2c8ac1b2017-05-31 05:14:26 -07001295 ldflags = [
1296 "-all_load",
1297 "-install_name",
1298 "@rpath/$output_name.framework/$output_name",
1299 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001300
mbonadei2c8ac1b2017-05-31 05:14:26 -07001301 deps = [
kthelgason36d658d2017-08-24 05:43:45 -07001302 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001303 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001304 ":default_codec_factory_objc",
1305 ":native_api",
1306 ":native_video",
1307 ":peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001308 ":ui_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001309 ":videocapture_objc",
1310 ":videocodec_objc",
1311 ":videotoolbox_objc",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001312 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001313 "../system_wrappers:field_trial_default",
1314 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +00001315 "../system_wrappers:runtime_enabled_features_default",
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",
1455 "../system_wrappers:field_trial_default",
1456 "../system_wrappers:metrics_default",
1457 "../system_wrappers:runtime_enabled_features_default",
1458 ]
1459 if (rtc_use_metal_rendering) {
1460 deps += [ ":metal_objc" ]
1461 }
1462 if (!build_with_chromium) {
1463 deps += [
1464 ":callback_logger_objc",
1465 ":file_logger_objc",
1466 ]
1467 }
1468
1469 libs = [
1470 "AVFoundation.framework",
1471 "CoreGraphics.framework",
1472 "CoreMedia.framework",
1473 "OpenGL.framework",
1474 ]
1475
Anders Carlsson37bbf792018-09-05 16:29:27 +02001476 configs = [ "..:common_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001477
1478 public_configs = [ ":common_config_objc" ]
1479 }
1480
1481 bundle_data("mac_framework_bundle") {
1482 deps = [
1483 "../sdk:mac_framework_objc",
1484 ]
1485 sources = [
1486 "$root_build_dir/WebRTC.framework",
1487 ]
1488 outputs = [
1489 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
1490 ]
1491 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001492 }
1493
Anders Carlsson9823ee42018-03-07 10:32:03 +01001494 rtc_static_library("wrapped_native_codec_objc") {
1495 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001496 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.h",
1497 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm",
1498 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.h",
1499 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001500 ]
1501
1502 configs += [ "..:common_objc" ]
1503 public_configs = [ ":common_config_objc" ]
1504
Anders Carlsson9823ee42018-03-07 10:32:03 +01001505 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001506 ":base_objc",
1507 ":helpers_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001508 "../api/video_codecs:video_codecs_api",
1509 "../media:rtc_media_base",
1510 ]
1511 }
1512
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001513 # The native API is currently experimental and may change without notice.
1514 rtc_static_library("native_api") {
1515 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +02001516 allow_poison = [
1517 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
1518 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
1519 ]
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001520 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001521 "objc/native/api/video_capturer.h",
1522 "objc/native/api/video_capturer.mm",
1523 "objc/native/api/video_decoder_factory.h",
1524 "objc/native/api/video_decoder_factory.mm",
1525 "objc/native/api/video_encoder_factory.h",
1526 "objc/native/api/video_encoder_factory.mm",
1527 "objc/native/api/video_frame.h",
1528 "objc/native/api/video_frame.mm",
1529 "objc/native/api/video_frame_buffer.h",
1530 "objc/native/api/video_frame_buffer.mm",
1531 "objc/native/api/video_renderer.h",
1532 "objc/native/api/video_renderer.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001533 ]
1534
1535 configs += [ "..:common_objc" ]
1536
1537 public_configs = [ ":common_config_objc" ]
1538
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001539 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001540 ":base_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001541 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001542 ":videoframebuffer_objc",
Anders Carlsson73119182018-03-15 09:41:03 +01001543 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001544 "../api/video:video_frame",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001545 "../api/video_codecs:video_codecs_api",
1546 "../common_video",
1547 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +02001548 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001549 ]
1550 }
1551
1552 rtc_static_library("native_video") {
1553 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001554 "objc/native/src/objc_frame_buffer.h",
1555 "objc/native/src/objc_frame_buffer.mm",
1556 "objc/native/src/objc_video_decoder_factory.h",
1557 "objc/native/src/objc_video_decoder_factory.mm",
1558 "objc/native/src/objc_video_encoder_factory.h",
1559 "objc/native/src/objc_video_encoder_factory.mm",
1560 "objc/native/src/objc_video_frame.h",
1561 "objc/native/src/objc_video_frame.mm",
1562 "objc/native/src/objc_video_renderer.h",
1563 "objc/native/src/objc_video_renderer.mm",
1564 "objc/native/src/objc_video_track_source.h",
1565 "objc/native/src/objc_video_track_source.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001566 ]
1567
1568 configs += [ "..:common_objc" ]
1569
1570 public_configs = [ ":common_config_objc" ]
1571
1572 if (!build_with_chromium && is_clang) {
1573 # Suppress warnings from the Chromium Clang plugin
1574 # (bugs.webrtc.org/163).
1575 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1576 }
1577
1578 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001579 ":base_native_additions_objc",
1580 ":base_objc",
1581 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001582 ":videocodec_objc",
1583 ":videoframebuffer_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001584 ":vpx_codec_constants",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001585 ":wrapped_native_codec_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001586 "../api/video:video_frame",
1587 "../api/video:video_frame_i420",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001588 "../api/video_codecs:video_codecs_api",
1589 "../common_video",
1590 "../media:rtc_audio_video",
1591 "../media:rtc_media_base",
1592 "../modules:module_api",
1593 "../modules/video_coding:video_codec_interface",
1594 "../rtc_base:checks",
1595 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +02001596 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001597 ]
1598 }
1599
mbonadeic0af5ac2017-08-24 12:26:05 -07001600 rtc_static_library("video_toolbox_cc") {
mbonadei6ff8f962017-09-04 05:51:34 -07001601 visibility = [ ":videotoolbox_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001602 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001603 "objc/components/video_codec/helpers.cc",
1604 "objc/components/video_codec/helpers.h",
1605 "objc/components/video_codec/nalu_rewriter.cc",
1606 "objc/components/video_codec/nalu_rewriter.h",
mbonadeic0af5ac2017-08-24 12:26:05 -07001607 ]
1608 deps = [
1609 "../common_video",
1610 "../modules:module_api",
1611 "../modules/video_coding:webrtc_h264",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001612 "../rtc_base:checks",
mbonadeic0af5ac2017-08-24 12:26:05 -07001613 "../rtc_base:rtc_base_approved",
1614 ]
mbonadeic0af5ac2017-08-24 12:26:05 -07001615 }
1616
1617 rtc_static_library("videotoolbox_objc") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001618 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +02001619 allow_poison = [
1620 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
1621 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
1622 ]
mbonadeic0af5ac2017-08-24 12:26:05 -07001623 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001624 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1625 "objc/components/video_codec/RTCVideoDecoderFactoryH264.m",
1626 "objc/components/video_codec/RTCVideoDecoderH264.h",
1627 "objc/components/video_codec/RTCVideoDecoderH264.mm",
1628 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1629 "objc/components/video_codec/RTCVideoEncoderFactoryH264.m",
1630 "objc/components/video_codec/RTCVideoEncoderH264.h",
1631 "objc/components/video_codec/RTCVideoEncoderH264.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001632 ]
1633
Anders Carlsson358f2e02018-06-04 10:24:37 +02001634 configs += [
1635 "..:common_objc",
1636 ":used_from_extension",
1637 ]
1638
1639 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
1640 defines = [ "RTC_APPRTCMOBILE_BROADCAST_EXTENSION" ]
1641 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001642
1643 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001644 ":base_native_additions_objc",
1645 ":base_objc",
1646 ":helpers_objc",
mbonadeic0af5ac2017-08-24 12:26:05 -07001647 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001648 ":videocodec_objc",
1649 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001650 "../common_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001651 "../modules:module_api",
Patrik Höglund99175c62018-01-08 11:05:10 +01001652 "../modules/video_coding:video_codec_interface",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001653 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001654 "../rtc_base:rtc_base_approved",
Mirko Bonadei401d0562017-12-14 11:24:00 +01001655 "//third_party/libyuv",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001656 ]
1657
1658 libs = [
1659 "CoreFoundation.framework",
1660 "CoreMedia.framework",
1661 "CoreVideo.framework",
1662 "VideoToolbox.framework",
1663 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001664 }
1665 }
tkchin9eeb6242016-04-27 01:54:20 -07001666}