blob: 24d6527835ddd6668a51179dc83a972571d8d10f [file] [log] [blame]
tkchin9eeb6242016-04-27 08:54:201# 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 14:58:229import("../webrtc.gni")
kthelgasonebc34e72016-09-15 11:30:1810if (is_ios) {
oprypin45197522017-06-22 08:47:2011 import("//build/config/ios/ios_sdk.gni")
Mirko Bonadei2ff3f492018-11-22 08:00:1312 import("//build/config/ios/rules.gni")
kthelgasonebc34e72016-09-15 11:30:1813}
Anders Carlsson7bca8ca2018-08-30 07:30:2914if (is_mac) {
15 import("//build/config/mac/rules.gni")
kthelgason2f088792017-05-30 08:48:4716}
17
kjellander6ceab082016-10-28 12:44:0318group("sdk") {
Henrik Kjellandera7d0df72017-06-27 06:56:4619 public_deps = []
20 if (!build_with_chromium) {
21 if (is_android) {
22 public_deps += [ "android" ]
23 }
24 if (is_ios) {
kthelgason36d658d2017-08-24 12:43:4525 public_deps += [ ":framework_objc" ]
Henrik Kjellandera7d0df72017-06-27 06:56:4626 }
kjellander6ceab082016-10-28 12:44:0327 }
28}
29
Mirko Bonadei86d053c2019-10-17 19:32:0430rtc_library("media_constraints") {
Niels Möllerdac03d92019-02-13 07:52:2731 sources = [
32 "media_constraints.cc",
33 "media_constraints.h",
34 ]
35 deps = [
36 "../api:audio_options_api",
37 "../api:libjingle_peerconnection_api",
38 "//third_party/abseil-cpp/absl/types:optional",
39 ]
40}
41
Mirko Bonadei86d053c2019-10-17 19:32:0442rtc_library("sdk_tests") {
Niels Möllerdac03d92019-02-13 07:52:2743 testonly = true
Danil Chapovalov64f1f3f2020-01-16 13:41:1044 sources = [ "media_constraints_unittest.cc" ]
Niels Möllerdac03d92019-02-13 07:52:2745 deps = [
46 ":media_constraints",
47 "../test:test_support",
48 ]
49}
50
kthelgasoncc2d1c62016-11-09 15:44:2751if (is_ios || is_mac) {
kthelgason36d658d2017-08-24 12:43:4552 config("common_config_objc") {
kjellander080a1e32016-05-25 18:37:1153 include_dirs = [
Anders Carlsson7bca8ca2018-08-30 07:30:2954 "objc",
55
56 # This is needed so that framework headers can include base headers
57 # without pathname (so it works from within the framework module).
58 "objc/base",
59
60 # This is here for backward compatiblity reasons.
61 "objc/Framework/Headers", # TODO(bugs.webrtc.org/9627): Remove this.
kjellander080a1e32016-05-25 18:37:1162 ]
Kári Tristan Helgason47d3a012017-10-24 13:28:5163 cflags = [
Jiawei Ou4aeb35b2018-11-09 21:55:4564 "-Wimplicit-retain-self",
Kári Tristan Helgason47d3a012017-10-24 13:28:5165 "-Wstrict-overflow",
66 "-Wmissing-field-initializers",
67 ]
Artem Titarenko17ad64e2018-09-19 15:53:5968
69 if (use_clang_coverage) {
70 configs = [ "//build/config/coverage:default_coverage" ]
71 }
kjellander080a1e32016-05-25 18:37:1172 }
73
Anders Carlsson358f2e02018-06-04 08:24:3774 config("used_from_extension") {
75 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
76 cflags = [ "-fapplication-extension" ]
77 }
78 }
79
Anders Carlsson7bca8ca2018-08-30 07:30:2980 # TODO(bugs.webrtc.org/9627): Remove this when unused. Targets should depend on base_objc
81 # or helpers_objc directly instead.
Mirko Bonadei86d053c2019-10-17 19:32:0482 rtc_library("common_objc") {
Mirko Bonadei2ad8c432018-08-09 08:54:4083 visibility = [ "*" ]
Anders Carlsson7bca8ca2018-08-30 07:30:2984
Danil Chapovalov64f1f3f2020-01-16 13:41:1085 sources = [ "objc/helpers/noop.mm" ]
Anders Carlsson7bca8ca2018-08-30 07:30:2986
87 public_configs = [ ":common_config_objc" ]
88
89 deps = [
90 ":base_objc",
91 ":helpers_objc",
92 ]
93 }
94
Mirko Bonadei86d053c2019-10-17 19:32:0495 rtc_library("base_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:2996 visibility = [ "*" ]
97 sources = [
98 "objc/base/RTCCodecSpecificInfo.h",
99 "objc/base/RTCEncodedImage.h",
100 "objc/base/RTCEncodedImage.m",
101 "objc/base/RTCI420Buffer.h",
102 "objc/base/RTCLogging.h",
103 "objc/base/RTCLogging.mm",
104 "objc/base/RTCMacros.h",
105 "objc/base/RTCMutableI420Buffer.h",
106 "objc/base/RTCMutableYUVPlanarBuffer.h",
107 "objc/base/RTCRtpFragmentationHeader.h",
108 "objc/base/RTCRtpFragmentationHeader.m",
109 "objc/base/RTCVideoCapturer.h",
110 "objc/base/RTCVideoCapturer.m",
111 "objc/base/RTCVideoCodecInfo.h",
112 "objc/base/RTCVideoCodecInfo.m",
113 "objc/base/RTCVideoDecoder.h",
114 "objc/base/RTCVideoDecoderFactory.h",
115 "objc/base/RTCVideoEncoder.h",
116 "objc/base/RTCVideoEncoderFactory.h",
117 "objc/base/RTCVideoEncoderQpThresholds.h",
118 "objc/base/RTCVideoEncoderQpThresholds.m",
119 "objc/base/RTCVideoEncoderSettings.h",
120 "objc/base/RTCVideoEncoderSettings.m",
121 "objc/base/RTCVideoFrame.h",
122 "objc/base/RTCVideoFrame.mm",
123 "objc/base/RTCVideoFrameBuffer.h",
124 "objc/base/RTCVideoRenderer.h",
125 "objc/base/RTCYUVPlanarBuffer.h",
tkchin9eeb6242016-04-27 08:54:20126 ]
denicijad2088152017-04-28 09:14:54127
mbonadei1e060c62017-04-21 07:02:02128 deps = [
Artem Titov94b57c02019-03-21 12:35:10129 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 15:05:42130 "../rtc_base:checks",
mbonadei1e060c62017-04-21 07:02:02131 ]
Anders Carlsson358f2e02018-06-04 08:24:37132 configs += [
133 "..:common_objc",
134 ":used_from_extension",
135 ]
kthelgasonc0977102017-04-24 07:57:16136
kthelgason36d658d2017-08-24 12:43:45137 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 07:30:29138 }
139
Mirko Bonadei86d053c2019-10-17 19:32:04140 rtc_library("helpers_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:29141 sources = [
142 "objc/helpers/AVCaptureSession+DevicePosition.h",
143 "objc/helpers/AVCaptureSession+DevicePosition.mm",
144 "objc/helpers/NSString+StdString.h",
145 "objc/helpers/NSString+StdString.mm",
146 "objc/helpers/RTCDispatcher+Private.h",
147 "objc/helpers/RTCDispatcher.h",
148 "objc/helpers/RTCDispatcher.m",
Anders Carlsson7bca8ca2018-08-30 07:30:29149 "objc/helpers/scoped_cftyperef.h",
150 ]
151
152 deps = [
153 ":base_objc",
154 "../rtc_base:checks",
155 ]
156
157 libs = [
158 "AVFoundation.framework",
159 "CoreMedia.framework",
160 ]
161
162 configs += [
163 "..:common_objc",
164 ":used_from_extension",
165 ]
166
167 public_configs = [ ":common_config_objc" ]
denicijad2088152017-04-28 09:14:54168
kjellander3bcedd32016-06-08 08:14:15169 if (is_ios) {
170 sources += [
Anders Carlsson7bca8ca2018-08-30 07:30:29171 "objc/helpers/RTCCameraPreviewView.h",
172 "objc/helpers/RTCCameraPreviewView.m",
173 "objc/helpers/UIDevice+RTCDevice.h",
174 "objc/helpers/UIDevice+RTCDevice.mm",
175 ]
176 }
177 }
178
179 if (!build_with_chromium) {
Mirko Bonadei86d053c2019-10-17 19:32:04180 rtc_library("callback_logger_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:29181 sources = [
182 "objc/api/logging/RTCCallbackLogger.h",
183 "objc/api/logging/RTCCallbackLogger.mm",
184 ]
185
186 deps = [
187 ":base_objc",
Artem Titov94b57c02019-03-21 12:35:10188 "../rtc_base",
Anders Carlsson7bca8ca2018-08-30 07:30:29189 "../rtc_base:checks",
190 "../rtc_base:logging",
Anders Carlsson7bca8ca2018-08-30 07:30:29191 ]
192
193 configs += [
194 "..:common_objc",
195 ":used_from_extension",
kjellander3bcedd32016-06-08 08:14:15196 ]
denicijad2088152017-04-28 09:14:54197 }
198
Mirko Bonadei86d053c2019-10-17 19:32:04199 rtc_library("file_logger_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:29200 sources = [
201 "objc/api/peerconnection/RTCFileLogger.h",
202 "objc/api/peerconnection/RTCFileLogger.mm",
203 ]
204
205 deps = [
206 ":base_objc",
Artem Titov94b57c02019-03-21 12:35:10207 "../rtc_base",
Anders Carlsson7bca8ca2018-08-30 07:30:29208 "../rtc_base:checks",
209 "../rtc_base:logging",
Anders Carlsson7bca8ca2018-08-30 07:30:29210 ]
211
212 configs += [
213 "..:common_objc",
214 ":used_from_extension",
kthelgason2f088792017-05-30 08:48:47215 ]
216 }
217 }
218
mbonadei2c8ac1b2017-05-31 12:14:26219 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 09:49:22220 if (is_ios) {
Mirko Bonadei86d053c2019-10-17 19:32:04221 rtc_library("native_api_audio_device_module") {
Peter Hanspers8d95e3b2018-05-15 08:22:36222 visibility = [ "*" ]
223
224 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29225 "objc/native/api/audio_device_module.h",
226 "objc/native/api/audio_device_module.mm",
Peter Hanspers8d95e3b2018-05-15 08:22:36227 ]
228
229 deps = [
230 ":audio_device",
231 "../modules/audio_device:audio_device_api",
232 "../modules/audio_device:audio_device_generic",
233 "../rtc_base:checks",
234 "../rtc_base:rtc_base_approved",
235 "../system_wrappers",
Peter Hanspers8d95e3b2018-05-15 08:22:36236 ]
Peter Hanspers8d95e3b2018-05-15 08:22:36237 }
238
239 rtc_source_set("audio_session_observer") {
240 visibility = [ ":*" ]
241
Danil Chapovalov64f1f3f2020-01-16 13:41:10242 sources = [ "objc/native/src/audio/audio_session_observer.h" ]
Peter Hanspers8d95e3b2018-05-15 08:22:36243
Danil Chapovalov64f1f3f2020-01-16 13:41:10244 deps = [ "../rtc_base" ]
Peter Hanspers8d95e3b2018-05-15 08:22:36245 }
246
Mirko Bonadei86d053c2019-10-17 19:32:04247 rtc_library("audio_device") {
Peter Hanspers8d95e3b2018-05-15 08:22:36248 visibility = [ "*" ]
249
250 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29251 "objc/native/src/audio/audio_device_ios.h",
252 "objc/native/src/audio/audio_device_ios.mm",
253 "objc/native/src/audio/audio_device_module_ios.h",
254 "objc/native/src/audio/audio_device_module_ios.mm",
255 "objc/native/src/audio/helpers.h",
256 "objc/native/src/audio/helpers.mm",
257 "objc/native/src/audio/voice_processing_audio_unit.h",
258 "objc/native/src/audio/voice_processing_audio_unit.mm",
Peter Hanspers8d95e3b2018-05-15 08:22:36259 ]
260
261 deps = [
262 ":audio_objc",
263 ":audio_session_observer",
Anders Carlsson7bca8ca2018-08-30 07:30:29264 ":base_objc",
Peter Hanspers8d95e3b2018-05-15 08:22:36265 "../api:array_view",
Danil Chapovalova6cb1502019-06-27 13:16:34266 "../api/task_queue",
267 "../api/task_queue:default_task_queue_factory",
Peter Hanspers8d95e3b2018-05-15 08:22:36268 "../modules/audio_device:audio_device_api",
269 "../modules/audio_device:audio_device_buffer",
270 "../modules/audio_device:audio_device_generic",
Artem Titov94b57c02019-03-21 12:35:10271 "../rtc_base",
Peter Hanspers8d95e3b2018-05-15 08:22:36272 "../rtc_base:checks",
Kári Tristan Helgasonf49429d2019-03-28 10:03:27273 "../system_wrappers:field_trial",
Mirko Bonadei17f48782018-09-28 06:51:10274 "../system_wrappers:metrics",
Danil Chapovalov64f1f3f2020-01-16 13:41:10275 "//third_party/abseil-cpp/absl/base:core_headers",
Peter Hanspers8d95e3b2018-05-15 08:22:36276 ]
277
Jiawei Ouc9e6b962018-10-09 19:33:06278 libs = [ "AudioToolbox.framework" ]
Peter Hanspers8d95e3b2018-05-15 08:22:36279 }
280
Joe Chen0b3a6e32019-12-27 07:01:42281 # This target exists to expose :audio_session_objc and
282 # :audio_session_delegate_adapter_objc for backward compatibility,
283 # and should be deprecated.
284 group("audio_objc") {
285 public_deps = [ # no-presubmit-check TODO(webrtc:11238)
286 ":audio_session_delegate_adapter_objc",
287 ":audio_session_objc",
288 ]
289 }
290
291 rtc_library("audio_session_delegate_adapter_objc") {
292 sources = [
293 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.h",
294 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.mm",
295 ]
296
297 configs += [
298 "..:common_objc",
299 ":used_from_extension",
300 ]
301
302 public_configs = [ ":common_config_objc" ]
303
304 deps = [
305 ":audio_session_objc",
306 ":audio_session_observer",
307 ":base_objc",
308 ]
309 }
310
311 rtc_library("audio_session_objc") {
Joe Chen3b19b272020-01-09 16:31:06312 visibility = [ "*" ]
313
Kári Tristan Helgason99bf77c2018-02-16 09:49:22314 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29315 "objc/components/audio/RTCAudioSession+Configuration.mm",
316 "objc/components/audio/RTCAudioSession+Private.h",
317 "objc/components/audio/RTCAudioSession.h",
318 "objc/components/audio/RTCAudioSession.mm",
319 "objc/components/audio/RTCAudioSessionConfiguration.h",
320 "objc/components/audio/RTCAudioSessionConfiguration.m",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22321 ]
Joe Chen0b3a6e32019-12-27 07:01:42322
Anders Carlsson358f2e02018-06-04 08:24:37323 configs += [
324 "..:common_objc",
325 ":used_from_extension",
326 ]
denicija59ee91b2017-06-05 12:48:47327
Kári Tristan Helgason99bf77c2018-02-16 09:49:22328 public_configs = [ ":common_config_objc" ]
Anders Carlsson8ecfd802017-09-15 12:07:30329
Jiawei Ouc9e6b962018-10-09 19:33:06330 libs = [ "AVFoundation.framework" ]
331
Kári Tristan Helgason99bf77c2018-02-16 09:49:22332 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29333 ":base_objc",
334 ":helpers_objc",
Artem Titov94b57c02019-03-21 12:35:10335 "../rtc_base",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22336 "../rtc_base:checks",
337 "../rtc_base:rtc_base_approved",
338 ]
denicija59ee91b2017-06-05 12:48:47339 }
340 }
zhihuanga4c113a2017-06-28 21:05:44341
Mirko Bonadei86d053c2019-10-17 19:32:04342 rtc_library("videosource_objc") {
zhihuanga4c113a2017-06-28 21:05:44343 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29344 "objc/api/peerconnection/RTCVideoSource+Private.h",
345 "objc/api/peerconnection/RTCVideoSource.h",
346 "objc/api/peerconnection/RTCVideoSource.mm",
zhihuanga4c113a2017-06-28 21:05:44347 ]
348
349 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29350 ":base_objc",
Anders Carlsson9823ee42018-03-07 09:32:03351 ":mediasource_objc",
352 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22353 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 21:05:44354 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 12:30:41355 "../api:media_stream_interface",
Niels Möllerc6ce9c52018-05-11 09:15:30356 "../api/video:video_frame",
357 "../api/video:video_frame_i420",
Chen Xing5d24b162019-06-10 10:59:38358 "../api/video:video_rtp_headers",
zhihuanga4c113a2017-06-28 21:05:44359 "../common_video",
360 "../media:rtc_media_base",
Artem Titov94b57c02019-03-21 12:35:10361 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 15:05:42362 "../rtc_base:checks",
Mirko Bonadei401d0562017-12-14 10:24:00363 "//third_party/libyuv",
zhihuanga4c113a2017-06-28 21:05:44364 ]
365
Anders Carlsson358f2e02018-06-04 08:24:37366 configs += [
367 "..:common_objc",
368 ":used_from_extension",
369 ]
zhihuanga4c113a2017-06-28 21:05:44370 }
371
Mirko Bonadei86d053c2019-10-17 19:32:04372 rtc_library("videoframebuffer_objc") {
Mirko Bonadei2ad8c432018-08-09 08:54:40373 visibility = [ "*" ]
Kári Tristan Helgason99bf77c2018-02-16 09:49:22374 sources = [
Anders Carlsson4e5af962018-09-03 12:44:50375 "objc/api/video_frame_buffer/RTCNativeI420Buffer+Private.h",
376 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
377 "objc/api/video_frame_buffer/RTCNativeI420Buffer.mm",
378 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
379 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:29380 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
381 "objc/components/video_frame_buffer/RTCCVPixelBuffer.mm",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22382 ]
383 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29384 ":base_objc",
Niels Möllerc6ce9c52018-05-11 09:15:30385 "//api/video:video_frame",
386 "//api/video:video_frame_i420",
Chen Xing5d24b162019-06-10 10:59:38387 "//api/video:video_rtp_headers",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22388 "//common_video",
389 "//rtc_base:checks",
390 "//rtc_base:rtc_base_approved",
391 "//third_party/libyuv",
392 ]
Anders Carlsson358f2e02018-06-04 08:24:37393 configs += [
394 "..:common_objc",
395 ":used_from_extension",
396 ]
Kári Tristan Helgason8a1e35c2019-03-07 09:44:26397 libs = [
398 "VideoToolbox.framework",
Oleh Prypinb3f78de2019-07-18 20:25:48399 "CoreGraphics.framework",
Kári Tristan Helgason8a1e35c2019-03-07 09:44:26400 "CoreVideo.framework",
401 ]
Kári Tristan Helgason99bf77c2018-02-16 09:49:22402 }
403
Mirko Bonadei86d053c2019-10-17 19:32:04404 rtc_library("video_objc") {
kthelgason2f088792017-05-30 08:48:47405 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29406 "objc/components/renderer/opengl/RTCDefaultShader.h",
407 "objc/components/renderer/opengl/RTCDefaultShader.mm",
408 "objc/components/renderer/opengl/RTCI420TextureCache.h",
409 "objc/components/renderer/opengl/RTCI420TextureCache.mm",
410 "objc/components/renderer/opengl/RTCOpenGLDefines.h",
411 "objc/components/renderer/opengl/RTCShader.h",
412 "objc/components/renderer/opengl/RTCShader.mm",
413 "objc/components/renderer/opengl/RTCVideoViewShading.h",
kthelgason2f088792017-05-30 08:48:47414 ]
Kári Tristan Helgason8a1e35c2019-03-07 09:44:26415 libs = [ "CoreVideo.framework" ]
denicijad2088152017-04-28 09:14:54416 if (is_ios) {
denicija070d5e32017-02-26 19:44:13417 sources += [
Anders Carlsson7bca8ca2018-08-30 07:30:29418 "objc/components/renderer/opengl/RTCNV12TextureCache.h",
419 "objc/components/renderer/opengl/RTCNV12TextureCache.m",
mbonadei2c8ac1b2017-05-31 12:14:26420 ]
421 libs += [
422 "GLKit.framework",
423 "OpenGLES.framework",
424 "QuartzCore.framework",
425 ]
426 } else if (is_mac) {
mbonadei2c8ac1b2017-05-31 12:14:26427 libs += [
428 "CoreMedia.framework",
mbonadei2c8ac1b2017-05-31 12:14:26429 "OpenGL.framework",
denicija070d5e32017-02-26 19:44:13430 ]
431 }
mbonadei2c8ac1b2017-05-31 12:14:26432
kthelgason2f088792017-05-30 08:48:47433 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29434 ":base_objc",
435 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22436 ":mediaconstraints_objc",
Anders Carlsson3ff50fb2018-02-01 14:47:05437 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22438 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 09:32:03439 ":videosource_objc",
mbonadei2c8ac1b2017-05-31 12:14:26440 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 09:15:30441 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 10:59:38442 "../api/video:video_rtp_headers",
mbonadei2c8ac1b2017-05-31 12:14:26443 "../common_video",
444 "../media:rtc_media_base",
Artem Titov94b57c02019-03-21 12:35:10445 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 15:05:42446 "../rtc_base:checks",
Danil Chapovalov196100e2018-06-21 08:17:24447 "//third_party/abseil-cpp/absl/types:optional",
tkchin9eeb6242016-04-27 08:54:20448 ]
mbonadei2c8ac1b2017-05-31 12:14:26449
Anders Carlsson358f2e02018-06-04 08:24:37450 configs += [
451 "..:common_objc",
452 ":used_from_extension",
453 ]
ehmaldonadoda8dcfb2017-01-04 15:11:23454 }
ehmaldonadoda8dcfb2017-01-04 15:11:23455
Mirko Bonadei86d053c2019-10-17 19:32:04456 rtc_library("ui_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53457 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 13:23:23458 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadei2c8ac1b2017-05-31 12:14:26459 if (is_ios) {
460 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29461 "objc/components/renderer/opengl/RTCDisplayLinkTimer.h",
462 "objc/components/renderer/opengl/RTCDisplayLinkTimer.m",
463 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
464 "objc/components/renderer/opengl/RTCEAGLVideoView.m",
mbonadei2c8ac1b2017-05-31 12:14:26465 ]
466 }
467 if (is_mac) {
468 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29469 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
470 "objc/components/renderer/opengl/RTCNSGLVideoView.m",
mbonadei2c8ac1b2017-05-31 12:14:26471 ]
472 }
473 configs += [ "..:common_objc" ]
474 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29475 ":base_objc",
476 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22477 ":video_objc",
478 ":videocapture_objc",
479 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 12:14:26480 ]
481 }
kthelgasonebc34e72016-09-15 11:30:18482
mbonadei2c8ac1b2017-05-31 12:14:26483 if (rtc_use_metal_rendering) {
Mirko Bonadei86d053c2019-10-17 19:32:04484 rtc_library("metal_objc") {
Mirko Bonadeid68956d2018-02-16 16:55:36485 visibility = [ "*" ]
Danil Chapovalov41300af2019-07-10 10:44:43486 allow_poison = [
487 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
488 "default_task_queue",
489 ]
mbonadei2c8ac1b2017-05-31 12:14:26490 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29491 "objc/components/renderer/metal/RTCMTLI420Renderer.h",
492 "objc/components/renderer/metal/RTCMTLI420Renderer.mm",
493 "objc/components/renderer/metal/RTCMTLRenderer+Private.h",
494 "objc/components/renderer/metal/RTCMTLRenderer.h",
495 "objc/components/renderer/metal/RTCMTLRenderer.mm",
mbonadei2c8ac1b2017-05-31 12:14:26496 ]
497 if (is_ios) {
498 sources += [
Anders Carlsson7bca8ca2018-08-30 07:30:29499 "objc/components/renderer/metal/RTCMTLNV12Renderer.h",
500 "objc/components/renderer/metal/RTCMTLNV12Renderer.mm",
501 "objc/components/renderer/metal/RTCMTLRGBRenderer.h",
502 "objc/components/renderer/metal/RTCMTLRGBRenderer.mm",
503 "objc/components/renderer/metal/RTCMTLVideoView.h",
504 "objc/components/renderer/metal/RTCMTLVideoView.m",
mbonadei2c8ac1b2017-05-31 12:14:26505 ]
506 }
mbonadei2c8ac1b2017-05-31 12:14:26507 libs = [
508 "CoreVideo.framework",
509 "Metal.framework",
510 "MetalKit.framework",
511 ]
Niels Möllere4b4de62019-08-09 07:44:19512 if (is_mac) {
513 sources += [
514 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
515 "objc/components/renderer/metal/RTCMTLNSVideoView.m",
516 ]
517 libs += [ "AppKit.framework" ]
518 }
mbonadei2c8ac1b2017-05-31 12:14:26519 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29520 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22521 ":peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 12:43:45522 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22523 ":videoframebuffer_objc",
Niels Möllerc6ce9c52018-05-11 09:15:30524 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 10:59:38525 "../api/video:video_rtp_headers",
Patrik Höglunda8005cf2017-12-13 15:05:42526 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 17:40:47527 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 12:14:26528 ]
529 configs += [ "..:common_objc" ]
kthelgason36d658d2017-08-24 12:43:45530 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 12:14:26531 }
532 }
533
Anders Carlsson7bca8ca2018-08-30 07:30:29534 # TODO(bugs.webrtc.org/9627): Remove this target.
Mirko Bonadei86d053c2019-10-17 19:32:04535 rtc_library("videocapturebase_objc") {
Anders Carlsson73119182018-03-15 08:41:03536 visibility = [ "*" ]
Danil Chapovalov64f1f3f2020-01-16 13:41:10537 sources = [ "objc/helpers/noop.mm" ]
Anders Carlsson73119182018-03-15 08:41:03538
539 configs += [ "..:common_objc" ]
540
541 public_configs = [ ":common_config_objc" ]
542
543 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29544 ":base_objc",
Anders Carlsson73119182018-03-15 08:41:03545 ":videoframebuffer_objc",
546 ]
547 }
548
Mirko Bonadei86d053c2019-10-17 19:32:04549 rtc_library("videocapture_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53550 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 13:23:23551 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadei2c8ac1b2017-05-31 12:14:26552 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29553 "objc/components/capturer/RTCCameraVideoCapturer.h",
554 "objc/components/capturer/RTCCameraVideoCapturer.m",
zhihuanga4c113a2017-06-28 21:05:44555 ]
556 if (is_ios) {
557 sources += [
Anders Carlsson7bca8ca2018-08-30 07:30:29558 "objc/components/capturer/RTCFileVideoCapturer.h",
559 "objc/components/capturer/RTCFileVideoCapturer.m",
zhihuanga4c113a2017-06-28 21:05:44560 ]
561 }
Kári Tristan Helgason8a1e35c2019-03-07 09:44:26562 libs = [
563 "AVFoundation.framework",
564 "CoreVideo.framework",
565 ]
zhihuanga4c113a2017-06-28 21:05:44566
zhihuanga4c113a2017-06-28 21:05:44567 configs += [ "..:common_objc" ]
568
kthelgason36d658d2017-08-24 12:43:45569 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 21:05:44570
zhihuanga4c113a2017-06-28 21:05:44571 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29572 ":base_objc",
573 ":helpers_objc",
kthelgason36d658d2017-08-24 12:43:45574 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22575 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 21:05:44576 ]
zhihuanga4c113a2017-06-28 21:05:44577 }
578
Mirko Bonadei86d053c2019-10-17 19:32:04579 rtc_library("videocodec_objc") {
Karl Wibergbb23c832018-04-22 17:55:00580 visibility = [ "*" ]
Mirko Bonadei96ede16a2018-09-06 11:45:44581 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 09:49:22582 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29583 "objc/components/video_codec/RTCCodecSpecificInfoH264+Private.h",
584 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
585 "objc/components/video_codec/RTCCodecSpecificInfoH264.mm",
586 "objc/components/video_codec/RTCH264ProfileLevelId.h",
587 "objc/components/video_codec/RTCH264ProfileLevelId.mm",
zhihuanga4c113a2017-06-28 21:05:44588 ]
Yura Yaroshevich0f77fea2018-04-26 12:41:01589 if (is_ios) {
590 sources += [
Anders Carlsson7bca8ca2018-08-30 07:30:29591 "objc/components/video_codec/UIDevice+H264Profile.h",
592 "objc/components/video_codec/UIDevice+H264Profile.mm",
Yura Yaroshevich0f77fea2018-04-26 12:41:01593 ]
594 }
Mirko Bonadeifc52b912019-03-01 09:32:56595
Kári Tristan Helgason99bf77c2018-02-16 09:49:22596 public_configs = [ ":common_config_objc" ]
597 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29598 ":base_objc",
599 ":helpers_objc",
kthelgasonfb143122017-07-25 14:55:58600 "../api/video_codecs:video_codecs_api",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22601 "../common_video",
Yura Yaroshevich0f77fea2018-04-26 12:41:01602 "../media:rtc_h264_profile_id",
zhihuanga4c113a2017-06-28 21:05:44603 "../media:rtc_media_base",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22604 "../modules:module_api",
605 "../modules/video_coding:video_codec_interface",
Anders Carlsson7bca8ca2018-08-30 07:30:29606 "../rtc_base:checks",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22607 "../rtc_base:rtc_base_approved",
zhihuanga4c113a2017-06-28 21:05:44608 ]
609 }
610
Mirko Bonadei86d053c2019-10-17 19:32:04611 rtc_library("default_codec_factory_objc") {
Anders Carlssondd8c1652018-01-30 09:32:13612 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29613 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
614 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.m",
615 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
616 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.m",
Anders Carlssondd8c1652018-01-30 09:32:13617 ]
618
619 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29620 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22621 ":native_video",
622 ":videocodec_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:29623 ":videotoolbox_objc",
Magnus Jedvert8b4e92d2018-04-13 13:36:43624 ":vp8",
625 ":vp9",
Anders Carlsson7bca8ca2018-08-30 07:30:29626 ":vpx_codec_constants",
627 ]
628 }
629
Mirko Bonadei86d053c2019-10-17 19:32:04630 rtc_library("vpx_codec_constants") {
Mirko Bonadei96ede16a2018-09-06 11:45:44631 configs += [ "..:no_global_constructors" ]
Anders Carlsson7bca8ca2018-08-30 07:30:29632 sources = [
633 "objc/api/video_codec/RTCVideoCodecConstants.h",
634 "objc/api/video_codec/RTCVideoCodecConstants.mm",
635 ]
636
637 deps = [
638 ":base_objc",
639 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 09:32:13640 ]
Anders Carlssondd8c1652018-01-30 09:32:13641 }
642
Mirko Bonadei86d053c2019-10-17 19:32:04643 rtc_library("vp8") {
Kári Tristan Helgason99bf77c2018-02-16 09:49:22644 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 02:31:53645 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 09:32:13646 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29647 "objc/api/video_codec/RTCVideoDecoderVP8.h",
648 "objc/api/video_codec/RTCVideoDecoderVP8.mm",
649 "objc/api/video_codec/RTCVideoEncoderVP8.h",
650 "objc/api/video_codec/RTCVideoEncoderVP8.mm",
Anders Carlssondd8c1652018-01-30 09:32:13651 ]
652
Anders Carlssondd8c1652018-01-30 09:32:13653 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29654 ":base_objc",
Anders Carlsson9823ee42018-03-07 09:32:03655 ":wrapped_native_codec_objc",
Anders Carlssondd8c1652018-01-30 09:32:13656 "../modules/video_coding:webrtc_vp8",
Anders Carlssondd8c1652018-01-30 09:32:13657 ]
658 }
659
Mirko Bonadei86d053c2019-10-17 19:32:04660 rtc_library("vp9") {
Kári Tristan Helgason99bf77c2018-02-16 09:49:22661 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 02:31:53662 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 09:32:13663 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29664 "objc/api/video_codec/RTCVideoDecoderVP9.h",
665 "objc/api/video_codec/RTCVideoDecoderVP9.mm",
666 "objc/api/video_codec/RTCVideoEncoderVP9.h",
667 "objc/api/video_codec/RTCVideoEncoderVP9.mm",
Anders Carlssondd8c1652018-01-30 09:32:13668 ]
669
Anders Carlssondd8c1652018-01-30 09:32:13670 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29671 ":base_objc",
Anders Carlsson9823ee42018-03-07 09:32:03672 ":wrapped_native_codec_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:29673 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 09:32:13674 "../modules/video_coding:webrtc_vp9",
Anders Carlssondd8c1652018-01-30 09:32:13675 ]
676 }
677
zhihuanga4c113a2017-06-28 21:05:44678 # Build the PeerConnectionFactory without audio/video support.
679 # This target depends on the objc_peeerconnectionfactory_base which still
680 # includes some audio/video related objects such as RTCAudioSource because
681 # these objects are just thin wrappers of native C++ interfaces required
682 # when implementing webrtc::PeerConnectionFactoryInterface and
683 # webrtc::PeerConnectionInterface.
Kári Tristan Helgasona2d89fc2018-03-06 09:18:43684 # The applications which only use WebRTC DataChannel can depend on this.
Mirko Bonadei86d053c2019-10-17 19:32:04685 rtc_library("peerconnectionfactory_no_media_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53686 visibility = [ "*" ]
Danil Chapovalov41300af2019-07-10 10:44:43687 allow_poison = [
688 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
689 "default_task_queue",
690 ]
zhihuanga4c113a2017-06-28 21:05:44691 defines = [ "HAVE_NO_MEDIA" ]
692
Danil Chapovalov64f1f3f2020-01-16 13:41:10693 sources = [ "objc/helpers/noop.mm" ]
zhihuanga4c113a2017-06-28 21:05:44694
kthelgason36d658d2017-08-24 12:43:45695 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 21:05:44696
zhihuanga4c113a2017-06-28 21:05:44697 deps = [
Anders Carlsson3ff50fb2018-02-01 14:47:05698 ":native_api",
699 ":native_video",
kthelgason36d658d2017-08-24 12:43:45700 ":peerconnectionfactory_base_objc",
zhihuanga4c113a2017-06-28 21:05:44701 "../api:libjingle_peerconnection_api",
Artem Titov94b57c02019-03-21 12:35:10702 "../rtc_base",
zhihuanga4c113a2017-06-28 21:05:44703 ]
704 }
705
Mirko Bonadei86d053c2019-10-17 19:32:04706 rtc_library("mediaconstraints_objc") {
Mirko Bonadei96ede16a2018-09-06 11:45:44707 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 09:49:22708 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29709 "objc/api/peerconnection/RTCMediaConstraints+Private.h",
710 "objc/api/peerconnection/RTCMediaConstraints.h",
711 "objc/api/peerconnection/RTCMediaConstraints.mm",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22712 ]
Kári Tristan Helgason99bf77c2018-02-16 09:49:22713
714 public_configs = [ ":common_config_objc" ]
715 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29716 ":base_objc",
717 ":helpers_objc",
Niels Möllerdac03d92019-02-13 07:52:27718 ":media_constraints",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22719 ]
720 }
721
Anders Carlsson7bca8ca2018-08-30 07:30:29722 # TODO(bugs.webrtc.org/9627): Remove, targets should depend on base_objc.
Mirko Bonadei86d053c2019-10-17 19:32:04723 rtc_library("videorenderer_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:29724 visibility = [ "*" ]
Danil Chapovalov64f1f3f2020-01-16 13:41:10725 sources = [ "objc/helpers/noop.mm" ]
Anders Carlsson9823ee42018-03-07 09:32:03726
727 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 09:32:03728 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 07:30:29729
Danil Chapovalov64f1f3f2020-01-16 13:41:10730 deps = [ ":base_objc" ]
Anders Carlsson9823ee42018-03-07 09:32:03731 }
732
Mirko Bonadei86d053c2019-10-17 19:32:04733 rtc_library("videorendereradapter_objc") {
Karl Wibergbb23c832018-04-22 17:55:00734 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 13:23:23735 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Anders Carlsson9823ee42018-03-07 09:32:03736 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29737 "objc/api/RTCVideoRendererAdapter+Private.h",
738 "objc/api/RTCVideoRendererAdapter.h",
739 "objc/api/RTCVideoRendererAdapter.mm",
Anders Carlsson9823ee42018-03-07 09:32:03740 ]
741
742 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 09:32:03743 public_configs = [ ":common_config_objc" ]
744
745 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29746 ":base_objc",
Anders Carlsson9823ee42018-03-07 09:32:03747 ":native_api",
748 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 09:32:03749 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 12:30:41750 "../api:media_stream_interface",
Anders Carlsson9823ee42018-03-07 09:32:03751 ]
752 }
753
Mirko Bonadei86d053c2019-10-17 19:32:04754 rtc_library("mediasource_objc") {
Anders Carlsson9823ee42018-03-07 09:32:03755 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29756 "objc/api/peerconnection/RTCMediaSource+Private.h",
757 "objc/api/peerconnection/RTCMediaSource.h",
758 "objc/api/peerconnection/RTCMediaSource.mm",
Anders Carlsson9823ee42018-03-07 09:32:03759 ]
760
Anders Carlsson358f2e02018-06-04 08:24:37761 configs += [
762 "..:common_objc",
763 ":used_from_extension",
764 ]
Anders Carlsson9823ee42018-03-07 09:32:03765 public_configs = [ ":common_config_objc" ]
766
767 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29768 ":base_objc",
Niels Möllere942b142019-09-17 12:30:41769 "../api:media_stream_interface",
Anders Carlsson9823ee42018-03-07 09:32:03770 "../rtc_base:checks",
771 ]
772 }
773
Mirko Bonadei86d053c2019-10-17 19:32:04774 rtc_library("base_native_additions_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:29775 sources = [
776 "objc/api/peerconnection/RTCEncodedImage+Private.h",
777 "objc/api/peerconnection/RTCEncodedImage+Private.mm",
778 "objc/api/peerconnection/RTCRtpFragmentationHeader+Private.h",
779 "objc/api/peerconnection/RTCRtpFragmentationHeader+Private.mm",
780 "objc/api/peerconnection/RTCVideoCodecInfo+Private.h",
781 "objc/api/peerconnection/RTCVideoCodecInfo+Private.mm",
782 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.h",
783 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.mm",
784 ]
785
786 configs += [ "..:common_objc" ]
787
788 public_configs = [ ":common_config_objc" ]
789
790 deps = [
791 ":base_objc",
792 ":helpers_objc",
Niels Möller4dc66c52018-10-05 12:17:58793 "../api/video:encoded_image",
Anders Carlsson7bca8ca2018-08-30 07:30:29794 "../api/video_codecs:video_codecs_api",
Anders Carlsson7bca8ca2018-08-30 07:30:29795 "../modules:module_api",
796 "../modules/video_coding:video_codec_interface",
Artem Titov94b57c02019-03-21 12:35:10797 "../rtc_base",
Anders Carlsson7bca8ca2018-08-30 07:30:29798 ]
Anders Carlsson7bca8ca2018-08-30 07:30:29799 }
800
Mirko Bonadei86d053c2019-10-17 19:32:04801 rtc_library("peerconnectionfactory_base_objc") {
Karl Wibergbb23c832018-04-22 17:55:00802 visibility = [ "*" ]
Danil Chapovalov41300af2019-07-10 10:44:43803 allow_poison = [
804 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
805 "default_task_queue",
806 ]
Mirko Bonadei96ede16a2018-09-06 11:45:44807 configs += [
808 "..:no_exit_time_destructors",
809 "..:no_global_constructors",
810 ]
zhihuanga4c113a2017-06-28 21:05:44811 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29812 "objc/api/peerconnection/RTCAudioSource+Private.h",
813 "objc/api/peerconnection/RTCAudioSource.h",
814 "objc/api/peerconnection/RTCAudioSource.mm",
815 "objc/api/peerconnection/RTCAudioTrack+Private.h",
816 "objc/api/peerconnection/RTCAudioTrack.h",
817 "objc/api/peerconnection/RTCAudioTrack.mm",
818 "objc/api/peerconnection/RTCCertificate.h",
819 "objc/api/peerconnection/RTCCertificate.mm",
820 "objc/api/peerconnection/RTCConfiguration+Native.h",
821 "objc/api/peerconnection/RTCConfiguration+Private.h",
822 "objc/api/peerconnection/RTCConfiguration.h",
823 "objc/api/peerconnection/RTCConfiguration.mm",
Benjamin Wright8c27cca2018-10-25 17:16:44824 "objc/api/peerconnection/RTCCryptoOptions.h",
825 "objc/api/peerconnection/RTCCryptoOptions.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:29826 "objc/api/peerconnection/RTCDataChannel+Private.h",
827 "objc/api/peerconnection/RTCDataChannel.h",
828 "objc/api/peerconnection/RTCDataChannel.mm",
829 "objc/api/peerconnection/RTCDataChannelConfiguration+Private.h",
830 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
831 "objc/api/peerconnection/RTCDataChannelConfiguration.mm",
832 "objc/api/peerconnection/RTCDtmfSender+Private.h",
833 "objc/api/peerconnection/RTCDtmfSender.h",
834 "objc/api/peerconnection/RTCDtmfSender.mm",
835 "objc/api/peerconnection/RTCFieldTrials.h",
836 "objc/api/peerconnection/RTCFieldTrials.mm",
837 "objc/api/peerconnection/RTCIceCandidate+Private.h",
838 "objc/api/peerconnection/RTCIceCandidate.h",
839 "objc/api/peerconnection/RTCIceCandidate.mm",
840 "objc/api/peerconnection/RTCIceServer+Private.h",
841 "objc/api/peerconnection/RTCIceServer.h",
842 "objc/api/peerconnection/RTCIceServer.mm",
843 "objc/api/peerconnection/RTCIntervalRange+Private.h",
844 "objc/api/peerconnection/RTCIntervalRange.h",
845 "objc/api/peerconnection/RTCIntervalRange.mm",
846 "objc/api/peerconnection/RTCLegacyStatsReport+Private.h",
847 "objc/api/peerconnection/RTCLegacyStatsReport.h",
848 "objc/api/peerconnection/RTCLegacyStatsReport.mm",
849 "objc/api/peerconnection/RTCMediaStream+Private.h",
850 "objc/api/peerconnection/RTCMediaStream.h",
851 "objc/api/peerconnection/RTCMediaStream.mm",
852 "objc/api/peerconnection/RTCMediaStreamTrack+Private.h",
853 "objc/api/peerconnection/RTCMediaStreamTrack.h",
854 "objc/api/peerconnection/RTCMediaStreamTrack.mm",
855 "objc/api/peerconnection/RTCMetrics.h",
856 "objc/api/peerconnection/RTCMetrics.mm",
857 "objc/api/peerconnection/RTCMetricsSampleInfo+Private.h",
858 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
859 "objc/api/peerconnection/RTCMetricsSampleInfo.mm",
860 "objc/api/peerconnection/RTCPeerConnection+DataChannel.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:29861 "objc/api/peerconnection/RTCPeerConnection+Private.h",
862 "objc/api/peerconnection/RTCPeerConnection+Stats.mm",
863 "objc/api/peerconnection/RTCPeerConnection.h",
864 "objc/api/peerconnection/RTCPeerConnection.mm",
865 "objc/api/peerconnection/RTCPeerConnectionFactory+Native.h",
866 "objc/api/peerconnection/RTCPeerConnectionFactory+Private.h",
867 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
868 "objc/api/peerconnection/RTCPeerConnectionFactory.mm",
869 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.h",
870 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.mm",
871 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.h",
872 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.mm",
873 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions+Private.h",
874 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
875 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.mm",
876 "objc/api/peerconnection/RTCRtcpParameters+Private.h",
877 "objc/api/peerconnection/RTCRtcpParameters.h",
878 "objc/api/peerconnection/RTCRtcpParameters.mm",
879 "objc/api/peerconnection/RTCRtpCodecParameters+Private.h",
880 "objc/api/peerconnection/RTCRtpCodecParameters.h",
881 "objc/api/peerconnection/RTCRtpCodecParameters.mm",
882 "objc/api/peerconnection/RTCRtpEncodingParameters+Private.h",
883 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
884 "objc/api/peerconnection/RTCRtpEncodingParameters.mm",
885 "objc/api/peerconnection/RTCRtpHeaderExtension+Private.h",
886 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
887 "objc/api/peerconnection/RTCRtpHeaderExtension.mm",
888 "objc/api/peerconnection/RTCRtpParameters+Private.h",
889 "objc/api/peerconnection/RTCRtpParameters.h",
890 "objc/api/peerconnection/RTCRtpParameters.mm",
Benjamin Wrightddf1a3e2018-10-02 17:20:58891 "objc/api/peerconnection/RTCRtpReceiver+Native.h",
Anders Carlsson7bca8ca2018-08-30 07:30:29892 "objc/api/peerconnection/RTCRtpReceiver+Private.h",
893 "objc/api/peerconnection/RTCRtpReceiver.h",
894 "objc/api/peerconnection/RTCRtpReceiver.mm",
Benjamin Wrightddf1a3e2018-10-02 17:20:58895 "objc/api/peerconnection/RTCRtpSender+Native.h",
Anders Carlsson7bca8ca2018-08-30 07:30:29896 "objc/api/peerconnection/RTCRtpSender+Private.h",
897 "objc/api/peerconnection/RTCRtpSender.h",
898 "objc/api/peerconnection/RTCRtpSender.mm",
899 "objc/api/peerconnection/RTCRtpTransceiver+Private.h",
900 "objc/api/peerconnection/RTCRtpTransceiver.h",
901 "objc/api/peerconnection/RTCRtpTransceiver.mm",
902 "objc/api/peerconnection/RTCSSLAdapter.h",
903 "objc/api/peerconnection/RTCSSLAdapter.mm",
904 "objc/api/peerconnection/RTCSessionDescription+Private.h",
905 "objc/api/peerconnection/RTCSessionDescription.h",
906 "objc/api/peerconnection/RTCSessionDescription.mm",
Peter Hanspersbed86042019-02-21 16:27:09907 "objc/api/peerconnection/RTCStatisticsReport+Private.h",
908 "objc/api/peerconnection/RTCStatisticsReport.h",
909 "objc/api/peerconnection/RTCStatisticsReport.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:29910 "objc/api/peerconnection/RTCTracing.h",
911 "objc/api/peerconnection/RTCTracing.mm",
912 "objc/api/peerconnection/RTCVideoTrack+Private.h",
913 "objc/api/peerconnection/RTCVideoTrack.h",
914 "objc/api/peerconnection/RTCVideoTrack.mm",
kthelgason5fe4d492016-12-05 19:27:30915 ]
kthelgasonebc34e72016-09-15 11:30:18916
Anders Carlsson358f2e02018-06-04 08:24:37917 configs += [
918 "..:common_objc",
919 ":used_from_extension",
920 ]
kthelgason36d658d2017-08-24 12:43:45921 public_configs = [ ":common_config_objc" ]
kthelgasonc0977102017-04-24 07:57:16922
mbonadei2c8ac1b2017-05-31 12:14:26923 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29924 ":base_native_additions_objc",
925 ":base_objc",
926 ":file_logger_objc",
927 ":helpers_objc",
928 ":legacy_header_paths",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22929 ":mediaconstraints_objc",
Anders Carlsson9823ee42018-03-07 09:32:03930 ":mediasource_objc",
Anders Carlsson3ff50fb2018-02-01 14:47:05931 ":native_api",
932 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22933 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22934 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 09:32:03935 ":videorendereradapter_objc",
936 ":videosource_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:29937 ":videotoolbox_objc",
Mirko Bonadeie51f7852017-12-06 10:23:19938 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 12:30:41939 "../api:media_stream_interface",
Niels Möller695cf6a2019-05-13 10:27:23940 "../api:rtc_event_log_output_file",
Peter Hanspersbed86042019-02-21 16:27:09941 "../api:rtc_stats_api",
Niels Möller6dcd4dc2019-08-26 08:45:28942 "../api:rtp_parameters",
Mirko Bonadeid9708072019-01-25 19:26:48943 "../api:scoped_refptr",
Jiawei Ouae810c12018-06-20 23:18:59944 "../api/audio_codecs:audio_codecs_api",
Karl Wiberg5817d3d2018-04-06 08:06:42945 "../api/audio_codecs:builtin_audio_decoder_factory",
Jiawei Ouae810c12018-06-20 23:18:59946 "../api/audio_codecs:builtin_audio_encoder_factory",
Mirko Bonadeieaaaf412019-09-13 12:42:15947 "../api/crypto:frame_decryptor_interface",
948 "../api/crypto:frame_encryptor_interface",
Danil Chapovalov4ba04b72019-06-26 13:49:47949 "../api/rtc_event_log:rtc_event_log_factory",
Danil Chapovalovaaa11432019-05-17 11:20:14950 "../api/task_queue:default_task_queue_factory",
Niels Möller65f17ca2019-09-12 11:59:36951 "../api/transport/media:media_transport_interface",
Niels Möllerc6ce9c52018-05-11 09:15:30952 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 10:59:38953 "../api/video:video_rtp_headers",
Anders Carlsson7e042812017-10-05 14:55:38954 "../api/video_codecs:video_codecs_api",
Anders Carlssone5960ce2017-06-22 13:26:30955 "../common_video",
mbonadei2c8ac1b2017-05-31 12:14:26956 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 14:55:58957 "../modules:module_api",
Jiawei Ouae810c12018-06-20 23:18:59958 "../modules/audio_device:audio_device_api",
Artem Titov94b57c02019-03-21 12:35:10959 "../modules/audio_processing",
Alessio Bazzicab768e882018-11-07 14:29:54960 "../modules/audio_processing:api",
Patrik Höglund99175c62018-01-08 10:05:10961 "../modules/video_coding:video_codec_interface",
zhihuanga4c113a2017-06-28 21:05:44962 "../pc:peerconnection",
Artem Titov94b57c02019-03-21 12:35:10963 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 15:05:42964 "../rtc_base:checks",
Mirko Bonadei17f48782018-09-28 06:51:10965 "../system_wrappers:field_trial",
966 "../system_wrappers:metrics",
mbonadei2c8ac1b2017-05-31 12:14:26967 ]
Peter Hanspers8d95e3b2018-05-15 08:22:36968
969 if (is_ios) {
970 deps += [ ":native_api_audio_device_module" ]
971 }
kthelgasonebc34e72016-09-15 11:30:18972 }
Zeke Chindd0e1e02016-10-11 20:27:26973
Anders Carlsson7bca8ca2018-08-30 07:30:29974 # TODO(bugs.webrtc.org/9627): Remove this target.
975 rtc_source_set("legacy_header_paths") {
976 sources = [
977 "objc/Framework/Classes/Common/NSString+StdString.h",
Anders Carlsson7bca8ca2018-08-30 07:30:29978 "objc/Framework/Classes/Common/scoped_cftyperef.h",
979 "objc/Framework/Classes/PeerConnection/RTCConfiguration+Native.h",
Anders Carlsson7bca8ca2018-08-30 07:30:29980 "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Native.h",
981 "objc/Framework/Classes/PeerConnection/RTCVideoCodec+Private.h",
982 "objc/Framework/Classes/Video/RTCDefaultShader.h",
983 "objc/Framework/Classes/Video/RTCNV12TextureCache.h",
984 "objc/Framework/Classes/VideoToolbox/nalu_rewriter.h",
985 "objc/Framework/Headers/WebRTC/RTCAudioSession.h",
986 "objc/Framework/Headers/WebRTC/RTCAudioSessionConfiguration.h",
987 "objc/Framework/Headers/WebRTC/RTCAudioSource.h",
988 "objc/Framework/Headers/WebRTC/RTCAudioTrack.h",
989 "objc/Framework/Headers/WebRTC/RTCCVPixelBuffer.h",
990 "objc/Framework/Headers/WebRTC/RTCCallbackLogger.h",
991 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
992 "objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h",
993 "objc/Framework/Headers/WebRTC/RTCCertificate.h",
994 "objc/Framework/Headers/WebRTC/RTCConfiguration.h",
995 "objc/Framework/Headers/WebRTC/RTCDataChannel.h",
996 "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h",
997 "objc/Framework/Headers/WebRTC/RTCDefaultVideoDecoderFactory.h",
998 "objc/Framework/Headers/WebRTC/RTCDefaultVideoEncoderFactory.h",
999 "objc/Framework/Headers/WebRTC/RTCDispatcher.h",
1000 "objc/Framework/Headers/WebRTC/RTCDtmfSender.h",
1001 "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
1002 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h",
1003 "objc/Framework/Headers/WebRTC/RTCFileLogger.h",
1004 "objc/Framework/Headers/WebRTC/RTCFileVideoCapturer.h",
1005 "objc/Framework/Headers/WebRTC/RTCH264ProfileLevelId.h",
1006 "objc/Framework/Headers/WebRTC/RTCIceCandidate.h",
1007 "objc/Framework/Headers/WebRTC/RTCIceServer.h",
1008 "objc/Framework/Headers/WebRTC/RTCIntervalRange.h",
1009 "objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h",
1010 "objc/Framework/Headers/WebRTC/RTCLogging.h",
1011 "objc/Framework/Headers/WebRTC/RTCMTLNSVideoView.h",
1012 "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h",
1013 "objc/Framework/Headers/WebRTC/RTCMacros.h",
1014 "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h",
1015 "objc/Framework/Headers/WebRTC/RTCMediaSource.h",
1016 "objc/Framework/Headers/WebRTC/RTCMediaStream.h",
1017 "objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h",
1018 "objc/Framework/Headers/WebRTC/RTCMetrics.h",
1019 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h",
1020 "objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h",
1021 "objc/Framework/Headers/WebRTC/RTCPeerConnection.h",
1022 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h",
1023 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactoryOptions.h",
1024 "objc/Framework/Headers/WebRTC/RTCRtcpParameters.h",
1025 "objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h",
1026 "objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h",
1027 "objc/Framework/Headers/WebRTC/RTCRtpHeaderExtension.h",
1028 "objc/Framework/Headers/WebRTC/RTCRtpParameters.h",
1029 "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h",
1030 "objc/Framework/Headers/WebRTC/RTCRtpSender.h",
1031 "objc/Framework/Headers/WebRTC/RTCRtpTransceiver.h",
1032 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
1033 "objc/Framework/Headers/WebRTC/RTCSessionDescription.h",
1034 "objc/Framework/Headers/WebRTC/RTCTracing.h",
1035 "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h",
1036 "objc/Framework/Headers/WebRTC/RTCVideoCodec.h",
1037 "objc/Framework/Headers/WebRTC/RTCVideoCodecFactory.h",
1038 "objc/Framework/Headers/WebRTC/RTCVideoCodecH264.h",
1039 "objc/Framework/Headers/WebRTC/RTCVideoCodecInfo.h",
1040 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP8.h",
1041 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP9.h",
1042 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP8.h",
1043 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP9.h",
1044 "objc/Framework/Headers/WebRTC/RTCVideoFrame.h",
1045 "objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.h",
1046 "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h",
1047 "objc/Framework/Headers/WebRTC/RTCVideoSource.h",
1048 "objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
1049 "objc/Framework/Headers/WebRTC/RTCVideoViewShading.h",
1050 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
1051 "objc/Framework/Native/api/audio_device_module.h",
1052 "objc/Framework/Native/api/video_decoder_factory.h",
1053 "objc/Framework/Native/api/video_encoder_factory.h",
1054 "objc/Framework/Native/api/video_frame_buffer.h",
1055 "objc/Framework/Native/src/objc_video_decoder_factory.h",
1056 "objc/Framework/Native/src/objc_video_encoder_factory.h",
1057 ]
1058 }
1059
mbonadei2c8ac1b2017-05-31 12:14:261060 if (rtc_include_tests) {
Daniela012b56b2017-11-15 12:15:241061 if (is_ios) {
Mirko Bonadei86d053c2019-10-17 19:32:041062 rtc_library("sdk_unittests_sources") {
Danielaae012cf2017-10-12 11:46:001063 testonly = true
Anders Carlsson7bca8ca2018-08-30 07:30:291064 include_dirs = [ "objc/" ]
Daniela012b56b2017-11-15 12:15:241065
Danielaae012cf2017-10-12 11:46:001066 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:291067 "objc/unittests/ObjCVideoTrackSource_xctest.mm",
1068 "objc/unittests/RTCCVPixelBuffer_xctest.mm",
1069 "objc/unittests/RTCCallbackLogger_xctest.m",
1070 "objc/unittests/RTCFileVideoCapturer_xctest.mm",
1071 "objc/unittests/RTCH264ProfileLevelId_xctest.m",
Aaron Goldenfb4e9bc2019-01-04 20:03:311072 "objc/unittests/RTCNV12TextureCache_xctest.m",
Anders Carlsson7bca8ca2018-08-30 07:30:291073 "objc/unittests/RTCPeerConnectionFactory_xctest.m",
1074 "objc/unittests/frame_buffer_helpers.h",
1075 "objc/unittests/frame_buffer_helpers.mm",
Artem Titarenko42b43152018-10-29 17:18:091076 "objc/unittests/nalu_rewriter_xctest.mm",
Danielaae012cf2017-10-12 11:46:001077 ]
Daniela012b56b2017-11-15 12:15:241078
Peter Hanspers8d95e3b2018-05-15 08:22:361079 # TODO(peterhanspers): Reenable these tests on simulator.
1080 # See bugs.webrtc.org/7812
1081 if (!use_ios_simulator) {
1082 sources += [
Anders Carlsson7bca8ca2018-08-30 07:30:291083 "objc/unittests/RTCAudioDeviceModule_xctest.mm",
1084 "objc/unittests/RTCAudioDevice_xctest.mm",
Peter Hanspers8d95e3b2018-05-15 08:22:361085 ]
1086 }
1087
Danielaae012cf2017-10-12 11:46:001088 deps = [
Peter Hanspers8d95e3b2018-05-15 08:22:361089 ":audio_device",
Joe Chen0b3a6e32019-12-27 07:01:421090 ":audio_session_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:291091 ":base_objc",
1092 ":callback_logger_objc",
Anders Carlssondc6b4772018-01-15 12:31:031093 ":framework_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:291094 ":mediaconstraints_objc",
Anders Carlssonfe9d8172018-04-03 09:40:391095 ":native_api",
Peter Hanspers8d95e3b2018-05-15 08:22:361096 ":native_api_audio_device_module",
Anders Carlssonfe9d8172018-04-03 09:40:391097 ":native_video",
Anders Carlsson7bca8ca2018-08-30 07:30:291098 ":peerconnectionfactory_base_objc",
Aaron Goldenfb4e9bc2019-01-04 20:03:311099 ":video_objc",
Artem Titarenko42b43152018-10-29 17:18:091100 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221101 ":videocapture_objc",
Anders Carlsson79ce8202018-06-01 10:51:091102 ":videocodec_objc",
Anders Carlssonfe9d8172018-04-03 09:40:391103 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 09:32:031104 ":videosource_objc",
Danielaae012cf2017-10-12 11:46:001105 ":videotoolbox_objc",
Mirko Bonadeid9708072019-01-25 19:26:481106 "../api:scoped_refptr",
Byoungchan Lee43bd7602019-10-08 14:58:411107 "../api/task_queue:default_task_queue_factory",
Niels Möllerc6ce9c52018-05-11 09:15:301108 "../api/video:video_frame_i420",
Artem Titov94b57c02019-03-21 12:35:101109 "../common_video",
Danielaae012cf2017-10-12 11:46:001110 "../media:rtc_media_base",
Anders Carlssonfe9d8172018-04-03 09:40:391111 "../media:rtc_media_tests_utils",
Danielaae012cf2017-10-12 11:46:001112 "../modules:module_api",
Artem Titov94b57c02019-03-21 12:35:101113 "../rtc_base",
Mirko Bonadeie3abb812018-11-23 12:15:081114 "../rtc_base:gunit_helpers",
Artem Titov94b57c02019-03-21 12:35:101115 "../system_wrappers",
Anders Carlssonfe9d8172018-04-03 09:40:391116 "//third_party/libyuv",
Danielaae012cf2017-10-12 11:46:001117 ]
Kári Tristan Helgason99bf77c2018-02-16 09:49:221118
1119 if (rtc_use_metal_rendering) {
Anders Carlsson7bca8ca2018-08-30 07:30:291120 sources += [ "objc/unittests/RTCMTLVideoView_xctest.m" ]
Kári Tristan Helgason99bf77c2018-02-16 09:49:221121 deps += [ ":metal_objc" ]
1122 }
1123
Danielaae012cf2017-10-12 11:46:001124 public_deps = [
1125 "//build/config/ios:xctest",
1126 "//third_party/ocmock",
1127 ]
1128 }
1129
Daniela012b56b2017-11-15 12:15:241130 bundle_data("sdk_unittests_bundle_data") {
Daniela012b56b2017-11-15 12:15:241131 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:291132 "objc/unittests/audio_short16.pcm",
1133 "objc/unittests/audio_short44.pcm",
1134 "objc/unittests/audio_short48.pcm",
Peter Hanspers8d95e3b2018-05-15 08:22:361135
1136 # Sample video taken from https://media.xiph.org/video/derf/
Anders Carlsson7bca8ca2018-08-30 07:30:291137 "objc/unittests/foreman.mp4",
Daniela012b56b2017-11-15 12:15:241138 ]
Danil Chapovalov64f1f3f2020-01-16 13:41:101139 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
Daniela012b56b2017-11-15 12:15:241140 }
1141
Anders Carlsson7bca8ca2018-08-30 07:30:291142 # These tests use static linking.
Danielaae012cf2017-10-12 11:46:001143 rtc_ios_xctest_test("sdk_unittests") {
1144 info_plist = "//test/ios/Info.plist"
Danil Chapovalov64f1f3f2020-01-16 13:41:101145 sources = [ "objc/unittests/main.mm" ]
Daniela012b56b2017-11-15 12:15:241146
Artem Titarenkoa2bc3622019-08-19 12:24:001147 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=generic-unit-test" ]
Danielaae012cf2017-10-12 11:46:001148 deps = [
Yura Yaroshevich5297bd22018-06-19 09:51:511149 ":peerconnectionfactory_base_objc",
Daniela012b56b2017-11-15 12:15:241150 ":sdk_unittests_bundle_data",
Danielaae012cf2017-10-12 11:46:001151 ":sdk_unittests_sources",
Niels Möller5a8f8602019-06-12 09:30:591152 "../rtc_base",
Artem Titarenko34fc3462018-11-06 11:29:291153 "//test:test_support",
Danielaae012cf2017-10-12 11:46:001154 ]
1155 ldflags = [ "-all_load" ]
1156 }
Anders Carlsson7bca8ca2018-08-30 07:30:291157
1158 # These tests link to the framework.
1159 rtc_ios_xctest_test("sdk_framework_unittests") {
1160 info_plist = "//test/ios/Info.plist"
1161 sources = [
1162 "objc/unittests/RTCDoNotPutCPlusPlusInFrameworkHeaders_xctest.m",
Artem Titarenko34fc3462018-11-06 11:29:291163 "objc/unittests/main.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:291164 ]
1165
Artem Titarenkoa2bc3622019-08-19 12:24:001166 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=generic-unit-test" ]
Anders Carlsson7bca8ca2018-08-30 07:30:291167 deps = [
1168 ":framework_objc+link",
1169 ":ios_framework_bundle",
Niels Möller5a8f8602019-06-12 09:30:591170 "../rtc_base",
Artem Titarenko34fc3462018-11-06 11:29:291171 "//test:test_support",
Anders Carlsson7bca8ca2018-08-30 07:30:291172 ]
1173 }
Danielaae012cf2017-10-12 11:46:001174 }
1175
1176 # TODO(denicija): once all tests are migrated to xctest remove this source set.
Mirko Bonadei86d053c2019-10-17 19:32:041177 rtc_library("rtc_unittests_objc") {
mbonadei2c8ac1b2017-05-31 12:14:261178 testonly = true
Kári Tristan Helgasoncbe74352016-11-09 09:43:261179
mbonadei2c8ac1b2017-05-31 12:14:261180 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:291181 "objc/unittests/RTCCertificateTest.mm",
1182 "objc/unittests/RTCConfigurationTest.mm",
1183 "objc/unittests/RTCDataChannelConfigurationTest.mm",
1184 "objc/unittests/RTCIceCandidateTest.mm",
1185 "objc/unittests/RTCIceServerTest.mm",
1186 "objc/unittests/RTCIntervalRangeTests.mm",
1187 "objc/unittests/RTCMediaConstraintsTest.mm",
1188 "objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm",
1189 "objc/unittests/RTCPeerConnectionTest.mm",
1190 "objc/unittests/RTCSessionDescriptionTest.mm",
1191 "objc/unittests/RTCTracingTest.mm",
1192 "objc/unittests/objc_video_decoder_factory_tests.mm",
1193 "objc/unittests/objc_video_encoder_factory_tests.mm",
1194 "objc/unittests/scoped_cftyperef_tests.mm",
mbonadei2c8ac1b2017-05-31 12:14:261195 ]
Anders Carlssone7dd83f2018-01-19 10:28:441196 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 07:30:291197 sources += [ "objc/unittests/RTCCameraVideoCapturerTests.mm" ]
oprypin45197522017-06-22 08:47:201198 }
mbonadeid7620582017-05-30 08:50:351199
mbonadei2c8ac1b2017-05-31 12:14:261200 # |-ObjC| flag needed to make sure category method implementations
1201 # are included:
1202 # https://developer.apple.com/library/mac/qa/qa1490/_index.html
1203 ldflags = [ "-ObjC" ]
magjed3149e092017-05-08 12:32:051204
mbonadei2c8ac1b2017-05-31 12:14:261205 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:291206 ":base_objc",
1207 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221208 ":mediaconstraints_objc",
1209 ":native_api",
Anders Carlsson3ff50fb2018-02-01 14:47:051210 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221211 ":peerconnectionfactory_base_objc",
1212 ":video_objc",
1213 ":videocapture_objc",
1214 ":videocodec_objc",
1215 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 09:32:031216 ":videosource_objc",
kthelgason36d658d2017-08-24 12:43:451217 ":videotoolbox_objc",
Piotr (Peter) Slatalae0c2e972018-10-08 16:43:211218 "../api:libjingle_peerconnection_api",
Jiawei Ouae810c12018-06-20 23:18:591219 "../api/audio_codecs:audio_codecs_api",
1220 "../api/audio_codecs:builtin_audio_decoder_factory",
1221 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möller65f17ca2019-09-12 11:59:361222 "../api/transport/media:media_transport_interface",
Magnus Jedvert8b4e92d2018-04-13 13:36:431223 "../api/video_codecs:video_codecs_api",
kthelgasonebd4f792017-09-04 11:36:211224 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 14:55:581225 "../modules:module_api",
Jiawei Ouae810c12018-06-20 23:18:591226 "../modules/audio_device:audio_device_api",
Artem Titov94b57c02019-03-21 12:35:101227 "../modules/audio_processing",
Alessio Bazzicab768e882018-11-07 14:29:541228 "../modules/audio_processing:api",
Patrik Höglund99175c62018-01-08 10:05:101229 "../modules/video_coding:video_codec_interface",
Mirko Bonadeie3abb812018-11-23 12:15:081230 "../rtc_base:gunit_helpers",
Niels Möllera12c42a2018-07-25 14:05:481231 "../rtc_base/system:unused",
Yves Gerey21cddff2018-10-30 20:12:421232 "../test:test_support",
mbonadei2c8ac1b2017-05-31 12:14:261233 "//third_party/ocmock",
1234 ]
magjed3149e092017-05-08 12:32:051235
denicija59ee91b2017-06-05 12:48:471236 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 07:30:291237 sources += [ "objc/unittests/RTCAudioSessionTest.mm" ]
Joe Chen0b3a6e32019-12-27 07:01:421238 deps += [ ":audio_session_objc" ]
mbonadei2c8ac1b2017-05-31 12:14:261239 }
mbonadei2c8ac1b2017-05-31 12:14:261240 }
kthelgason2f088792017-05-30 08:48:471241 }
1242
mbonadei2c8ac1b2017-05-31 12:14:261243 if (is_ios) {
Anders Carlssondc6b4772018-01-15 12:31:031244 ios_framework_bundle_with_umbrella_header("framework_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:291245 info_plist = "objc/Info.plist"
mbonadei2c8ac1b2017-05-31 12:14:261246 output_name = "WebRTC"
Magnus Jedvertf83dc8b2017-08-29 09:49:431247
mbonadei2c8ac1b2017-05-31 12:14:261248 common_objc_headers = [
Anders Carlsson7bca8ca2018-08-30 07:30:291249 "objc/base/RTCCodecSpecificInfo.h",
1250 "objc/base/RTCEncodedImage.h",
Anders Carlsson4e5af962018-09-03 12:44:501251 "objc/base/RTCI420Buffer.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291252 "objc/base/RTCLogging.h",
1253 "objc/base/RTCMacros.h",
Anders Carlsson4e5af962018-09-03 12:44:501254 "objc/base/RTCMutableI420Buffer.h",
1255 "objc/base/RTCMutableYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291256 "objc/base/RTCRtpFragmentationHeader.h",
1257 "objc/base/RTCVideoCapturer.h",
1258 "objc/base/RTCVideoCodecInfo.h",
1259 "objc/base/RTCVideoDecoder.h",
1260 "objc/base/RTCVideoDecoderFactory.h",
1261 "objc/base/RTCVideoEncoder.h",
1262 "objc/base/RTCVideoEncoderFactory.h",
1263 "objc/base/RTCVideoEncoderQpThresholds.h",
1264 "objc/base/RTCVideoEncoderSettings.h",
1265 "objc/base/RTCVideoFrame.h",
1266 "objc/base/RTCVideoFrameBuffer.h",
1267 "objc/base/RTCVideoRenderer.h",
Anders Carlsson4e5af962018-09-03 12:44:501268 "objc/base/RTCYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291269 "objc/components/audio/RTCAudioSession.h",
1270 "objc/components/audio/RTCAudioSessionConfiguration.h",
1271 "objc/components/capturer/RTCCameraVideoCapturer.h",
1272 "objc/components/capturer/RTCFileVideoCapturer.h",
1273 "objc/components/renderer/metal/RTCMTLVideoView.h",
1274 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
1275 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1276 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1277 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1278 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1279 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1280 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1281 "objc/components/video_codec/RTCVideoDecoderH264.h",
1282 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1283 "objc/components/video_codec/RTCVideoEncoderH264.h",
1284 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1285 "objc/helpers/RTCCameraPreviewView.h",
1286 "objc/helpers/RTCDispatcher.h",
1287 "objc/helpers/UIDevice+RTCDevice.h",
1288 "objc/api/peerconnection/RTCAudioSource.h",
1289 "objc/api/peerconnection/RTCAudioTrack.h",
1290 "objc/api/peerconnection/RTCConfiguration.h",
1291 "objc/api/peerconnection/RTCDataChannel.h",
1292 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1293 "objc/api/peerconnection/RTCFieldTrials.h",
1294 "objc/api/peerconnection/RTCIceCandidate.h",
1295 "objc/api/peerconnection/RTCIceServer.h",
1296 "objc/api/peerconnection/RTCIntervalRange.h",
1297 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1298 "objc/api/peerconnection/RTCMediaConstraints.h",
1299 "objc/api/peerconnection/RTCMediaSource.h",
1300 "objc/api/peerconnection/RTCMediaStream.h",
1301 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1302 "objc/api/peerconnection/RTCMetrics.h",
1303 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1304 "objc/api/peerconnection/RTCPeerConnection.h",
1305 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1306 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1307 "objc/api/peerconnection/RTCRtcpParameters.h",
1308 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1309 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1310 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1311 "objc/api/peerconnection/RTCRtpParameters.h",
1312 "objc/api/peerconnection/RTCRtpReceiver.h",
1313 "objc/api/peerconnection/RTCRtpSender.h",
1314 "objc/api/peerconnection/RTCRtpTransceiver.h",
1315 "objc/api/peerconnection/RTCDtmfSender.h",
1316 "objc/api/peerconnection/RTCSSLAdapter.h",
1317 "objc/api/peerconnection/RTCSessionDescription.h",
CZ Theng682dabd2019-10-21 03:25:181318 "objc/api/peerconnection/RTCStatisticsReport.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291319 "objc/api/peerconnection/RTCTracing.h",
1320 "objc/api/peerconnection/RTCCertificate.h",
Benjamin Wright8c27cca2018-10-25 17:16:441321 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291322 "objc/api/peerconnection/RTCVideoSource.h",
1323 "objc/api/peerconnection/RTCVideoTrack.h",
Anders Carlsson4e5af962018-09-03 12:44:501324 "objc/api/video_codec/RTCVideoCodecConstants.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291325 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1326 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1327 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1328 "objc/api/video_codec/RTCVideoEncoderVP9.h",
Anders Carlsson4e5af962018-09-03 12:44:501329 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1330 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
mbonadei2c8ac1b2017-05-31 12:14:261331 ]
Magnus Jedvert8b4e92d2018-04-13 13:36:431332
mbonadei2c8ac1b2017-05-31 12:14:261333 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 09:49:221334 common_objc_headers += [
Anders Carlsson7bca8ca2018-08-30 07:30:291335 "objc/api/logging/RTCCallbackLogger.h",
1336 "objc/api/peerconnection/RTCFileLogger.h",
Anders Carlsson3b3364e2018-01-30 14:46:131337 ]
mbonadei2c8ac1b2017-05-31 12:14:261338 }
Kári Tristan Helgasoncbe74352016-11-09 09:43:261339
Kári Tristan Helgason99bf77c2018-02-16 09:49:221340 sources = common_objc_headers
1341 public_headers = common_objc_headers
1342
mbonadei2c8ac1b2017-05-31 12:14:261343 ldflags = [
1344 "-all_load",
1345 "-install_name",
1346 "@rpath/$output_name.framework/$output_name",
1347 ]
Kári Tristan Helgasoncbe74352016-11-09 09:43:261348
mbonadei2c8ac1b2017-05-31 12:14:261349 deps = [
kthelgason36d658d2017-08-24 12:43:451350 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:291351 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221352 ":default_codec_factory_objc",
1353 ":native_api",
1354 ":native_video",
1355 ":peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 12:43:451356 ":ui_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221357 ":videocapture_objc",
1358 ":videocodec_objc",
1359 ":videotoolbox_objc",
ehmaldonadof6a861a2017-07-19 17:40:471360 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 12:14:261361 ]
Kári Tristan Helgason99bf77c2018-02-16 09:49:221362 if (rtc_use_metal_rendering) {
Kári Tristan Helgason99bf77c2018-02-16 09:49:221363 deps += [ ":metal_objc" ]
1364 }
Anders Carlsson7bca8ca2018-08-30 07:30:291365 if (!build_with_chromium) {
1366 deps += [
1367 ":callback_logger_objc",
1368 ":file_logger_objc",
1369 ]
1370 }
Kári Tristan Helgasoncbe74352016-11-09 09:43:261371
mbonadei2c8ac1b2017-05-31 12:14:261372 libs = [
1373 "AVFoundation.framework",
1374 "CoreGraphics.framework",
1375 "CoreMedia.framework",
1376 "GLKit.framework",
1377 ]
1378
Anders Carlsson358f2e02018-06-04 08:24:371379 configs += [
1380 "..:common_objc",
1381 ":used_from_extension",
1382 ]
mbonadei2c8ac1b2017-05-31 12:14:261383
kthelgason36d658d2017-08-24 12:43:451384 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 12:14:261385 }
Anders Carlsson7bca8ca2018-08-30 07:30:291386
1387 bundle_data("ios_framework_bundle") {
Danil Chapovalov64f1f3f2020-01-16 13:41:101388 deps = [ "../sdk:framework_objc" ]
1389 sources = [ "$root_build_dir/WebRTC.framework" ]
1390 outputs = [ "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}" ]
Anders Carlsson7bca8ca2018-08-30 07:30:291391 }
1392 }
1393
1394 if (is_mac) {
Anders Carlsson37bbf792018-09-05 14:29:271395 mac_framework_bundle_with_umbrella_header("mac_framework_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:291396 info_plist = "objc/Info.plist"
1397 output_name = "WebRTC"
Anders Carlsson7bca8ca2018-08-30 07:30:291398
Anders Carlsson37bbf792018-09-05 14:29:271399 sources = [
1400 "objc/api/peerconnection/RTCAudioSource.h",
1401 "objc/api/peerconnection/RTCAudioTrack.h",
1402 "objc/api/peerconnection/RTCCertificate.h",
1403 "objc/api/peerconnection/RTCConfiguration.h",
Benjamin Wright8c27cca2018-10-25 17:16:441404 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson37bbf792018-09-05 14:29:271405 "objc/api/peerconnection/RTCDataChannel.h",
1406 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1407 "objc/api/peerconnection/RTCDtmfSender.h",
1408 "objc/api/peerconnection/RTCFieldTrials.h",
1409 "objc/api/peerconnection/RTCIceCandidate.h",
1410 "objc/api/peerconnection/RTCIceServer.h",
1411 "objc/api/peerconnection/RTCIntervalRange.h",
1412 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1413 "objc/api/peerconnection/RTCMediaConstraints.h",
1414 "objc/api/peerconnection/RTCMediaSource.h",
1415 "objc/api/peerconnection/RTCMediaStream.h",
1416 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1417 "objc/api/peerconnection/RTCMetrics.h",
1418 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1419 "objc/api/peerconnection/RTCPeerConnection.h",
1420 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1421 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1422 "objc/api/peerconnection/RTCRtcpParameters.h",
1423 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1424 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1425 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1426 "objc/api/peerconnection/RTCRtpParameters.h",
1427 "objc/api/peerconnection/RTCRtpReceiver.h",
1428 "objc/api/peerconnection/RTCRtpSender.h",
1429 "objc/api/peerconnection/RTCRtpTransceiver.h",
1430 "objc/api/peerconnection/RTCSSLAdapter.h",
1431 "objc/api/peerconnection/RTCSessionDescription.h",
1432 "objc/api/peerconnection/RTCTracing.h",
1433 "objc/api/peerconnection/RTCVideoSource.h",
1434 "objc/api/peerconnection/RTCVideoTrack.h",
1435 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1436 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1437 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1438 "objc/api/video_codec/RTCVideoEncoderVP9.h",
1439 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1440 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
1441 "objc/base/RTCCodecSpecificInfo.h",
1442 "objc/base/RTCEncodedImage.h",
1443 "objc/base/RTCI420Buffer.h",
1444 "objc/base/RTCLogging.h",
1445 "objc/base/RTCMacros.h",
1446 "objc/base/RTCMutableI420Buffer.h",
1447 "objc/base/RTCMutableYUVPlanarBuffer.h",
1448 "objc/base/RTCRtpFragmentationHeader.h",
1449 "objc/base/RTCVideoCapturer.h",
1450 "objc/base/RTCVideoCodecInfo.h",
1451 "objc/base/RTCVideoDecoder.h",
1452 "objc/base/RTCVideoDecoderFactory.h",
1453 "objc/base/RTCVideoEncoder.h",
1454 "objc/base/RTCVideoEncoderFactory.h",
1455 "objc/base/RTCVideoEncoderQpThresholds.h",
1456 "objc/base/RTCVideoEncoderSettings.h",
1457 "objc/base/RTCVideoFrame.h",
1458 "objc/base/RTCVideoFrameBuffer.h",
1459 "objc/base/RTCVideoRenderer.h",
1460 "objc/base/RTCYUVPlanarBuffer.h",
1461 "objc/components/capturer/RTCCameraVideoCapturer.h",
1462 "objc/components/capturer/RTCFileVideoCapturer.h",
1463 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
1464 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
1465 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1466 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1467 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1468 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1469 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1470 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1471 "objc/components/video_codec/RTCVideoDecoderH264.h",
1472 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1473 "objc/components/video_codec/RTCVideoEncoderH264.h",
1474 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1475 "objc/helpers/RTCDispatcher.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291476 ]
Anders Carlsson37bbf792018-09-05 14:29:271477 if (!build_with_chromium) {
1478 sources += [
1479 "objc/api/logging/RTCCallbackLogger.h",
1480 "objc/api/peerconnection/RTCFileLogger.h",
1481 ]
1482 }
Anders Carlsson7bca8ca2018-08-30 07:30:291483
1484 deps = [
1485 ":base_objc",
1486 ":default_codec_factory_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:291487 ":native_api",
1488 ":native_video",
1489 ":peerconnectionfactory_base_objc",
1490 ":ui_objc",
1491 ":videocapture_objc",
1492 ":videocodec_objc",
1493 ":videotoolbox_objc",
1494 "../rtc_base:rtc_base_approved",
Anders Carlsson7bca8ca2018-08-30 07:30:291495 ]
1496 if (rtc_use_metal_rendering) {
1497 deps += [ ":metal_objc" ]
1498 }
1499 if (!build_with_chromium) {
1500 deps += [
1501 ":callback_logger_objc",
1502 ":file_logger_objc",
1503 ]
1504 }
1505
1506 libs = [
1507 "AVFoundation.framework",
1508 "CoreGraphics.framework",
1509 "CoreMedia.framework",
1510 "OpenGL.framework",
1511 ]
1512
Anders Carlsson37bbf792018-09-05 14:29:271513 configs = [ "..:common_objc" ]
Anders Carlsson7bca8ca2018-08-30 07:30:291514
1515 public_configs = [ ":common_config_objc" ]
1516 }
1517
1518 bundle_data("mac_framework_bundle") {
Danil Chapovalov64f1f3f2020-01-16 13:41:101519 deps = [ "../sdk:mac_framework_objc" ]
1520 sources = [ "$root_build_dir/WebRTC.framework" ]
1521 outputs = [ "{{bundle_contents_dir}}/Frameworks/{{source_file_part}}" ]
Anders Carlsson7bca8ca2018-08-30 07:30:291522 }
Kári Tristan Helgasoncbe74352016-11-09 09:43:261523 }
1524
Mirko Bonadei86d053c2019-10-17 19:32:041525 rtc_library("wrapped_native_codec_objc") {
Anders Carlsson9823ee42018-03-07 09:32:031526 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:291527 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.h",
1528 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm",
1529 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.h",
1530 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm",
Anders Carlsson9823ee42018-03-07 09:32:031531 ]
1532
1533 configs += [ "..:common_objc" ]
1534 public_configs = [ ":common_config_objc" ]
1535
Anders Carlsson9823ee42018-03-07 09:32:031536 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:291537 ":base_objc",
1538 ":helpers_objc",
Anders Carlsson9823ee42018-03-07 09:32:031539 "../api/video_codecs:video_codecs_api",
1540 "../media:rtc_media_base",
1541 ]
1542 }
1543
Anders Carlsson3ff50fb2018-02-01 14:47:051544 # The native API is currently experimental and may change without notice.
Mirko Bonadei86d053c2019-10-17 19:32:041545 rtc_library("native_api") {
Anders Carlsson3ff50fb2018-02-01 14:47:051546 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 13:23:231547 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Anders Carlsson3ff50fb2018-02-01 14:47:051548 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:291549 "objc/native/api/video_capturer.h",
1550 "objc/native/api/video_capturer.mm",
1551 "objc/native/api/video_decoder_factory.h",
1552 "objc/native/api/video_decoder_factory.mm",
1553 "objc/native/api/video_encoder_factory.h",
1554 "objc/native/api/video_encoder_factory.mm",
1555 "objc/native/api/video_frame.h",
1556 "objc/native/api/video_frame.mm",
1557 "objc/native/api/video_frame_buffer.h",
1558 "objc/native/api/video_frame_buffer.mm",
1559 "objc/native/api/video_renderer.h",
1560 "objc/native/api/video_renderer.mm",
Anders Carlsson3ff50fb2018-02-01 14:47:051561 ]
1562
1563 configs += [ "..:common_objc" ]
1564
1565 public_configs = [ ":common_config_objc" ]
1566
Anders Carlsson3ff50fb2018-02-01 14:47:051567 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:291568 ":base_objc",
Anders Carlsson3ff50fb2018-02-01 14:47:051569 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221570 ":videoframebuffer_objc",
Anders Carlsson73119182018-03-15 08:41:031571 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 12:30:411572 "../api:media_stream_interface",
Mirko Bonadeid9708072019-01-25 19:26:481573 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 09:15:301574 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 10:59:381575 "../api/video:video_rtp_headers",
Anders Carlsson3ff50fb2018-02-01 14:47:051576 "../api/video_codecs:video_codecs_api",
1577 "../common_video",
Artem Titov94b57c02019-03-21 12:35:101578 "../rtc_base",
Mirko Bonadei879f7882018-07-11 07:18:371579 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 14:47:051580 ]
1581 }
1582
Mirko Bonadei86d053c2019-10-17 19:32:041583 rtc_library("native_video") {
Anders Carlsson3ff50fb2018-02-01 14:47:051584 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:291585 "objc/native/src/objc_frame_buffer.h",
1586 "objc/native/src/objc_frame_buffer.mm",
1587 "objc/native/src/objc_video_decoder_factory.h",
1588 "objc/native/src/objc_video_decoder_factory.mm",
1589 "objc/native/src/objc_video_encoder_factory.h",
1590 "objc/native/src/objc_video_encoder_factory.mm",
1591 "objc/native/src/objc_video_frame.h",
1592 "objc/native/src/objc_video_frame.mm",
1593 "objc/native/src/objc_video_renderer.h",
1594 "objc/native/src/objc_video_renderer.mm",
1595 "objc/native/src/objc_video_track_source.h",
1596 "objc/native/src/objc_video_track_source.mm",
Anders Carlsson3ff50fb2018-02-01 14:47:051597 ]
1598
1599 configs += [ "..:common_objc" ]
1600
1601 public_configs = [ ":common_config_objc" ]
1602
Anders Carlsson3ff50fb2018-02-01 14:47:051603 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:291604 ":base_native_additions_objc",
1605 ":base_objc",
1606 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221607 ":videocodec_objc",
1608 ":videoframebuffer_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:291609 ":vpx_codec_constants",
Anders Carlsson9823ee42018-03-07 09:32:031610 ":wrapped_native_codec_objc",
Niels Möllerc6ce9c52018-05-11 09:15:301611 "../api/video:video_frame",
1612 "../api/video:video_frame_i420",
Chen Xing5d24b162019-06-10 10:59:381613 "../api/video:video_rtp_headers",
Anders Carlsson3ff50fb2018-02-01 14:47:051614 "../api/video_codecs:video_codecs_api",
1615 "../common_video",
1616 "../media:rtc_audio_video",
1617 "../media:rtc_media_base",
1618 "../modules:module_api",
1619 "../modules/video_coding:video_codec_interface",
Artem Titov94b57c02019-03-21 12:35:101620 "../rtc_base",
Anders Carlsson3ff50fb2018-02-01 14:47:051621 "../rtc_base:checks",
Anders Carlsson3ff50fb2018-02-01 14:47:051622 ]
1623 }
1624
Mirko Bonadei86d053c2019-10-17 19:32:041625 rtc_library("video_toolbox_cc") {
Artem Titarenko42b43152018-10-29 17:18:091626 visibility = [
1627 ":videotoolbox_objc",
1628 ":sdk_unittests_sources",
1629 ]
mbonadei2c8ac1b2017-05-31 12:14:261630 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:291631 "objc/components/video_codec/helpers.cc",
1632 "objc/components/video_codec/helpers.h",
1633 "objc/components/video_codec/nalu_rewriter.cc",
1634 "objc/components/video_codec/nalu_rewriter.h",
mbonadeic0af5ac2017-08-24 19:26:051635 ]
1636 deps = [
1637 "../common_video",
1638 "../modules:module_api",
1639 "../modules/video_coding:webrtc_h264",
Patrik Höglunda8005cf2017-12-13 15:05:421640 "../rtc_base:checks",
mbonadeic0af5ac2017-08-24 19:26:051641 "../rtc_base:rtc_base_approved",
1642 ]
mbonadeic0af5ac2017-08-24 19:26:051643 }
1644
Mirko Bonadei86d053c2019-10-17 19:32:041645 rtc_library("videotoolbox_objc") {
Kári Tristan Helgason99bf77c2018-02-16 09:49:221646 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 13:23:231647 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadeic0af5ac2017-08-24 19:26:051648 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:291649 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1650 "objc/components/video_codec/RTCVideoDecoderFactoryH264.m",
1651 "objc/components/video_codec/RTCVideoDecoderH264.h",
1652 "objc/components/video_codec/RTCVideoDecoderH264.mm",
1653 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1654 "objc/components/video_codec/RTCVideoEncoderFactoryH264.m",
1655 "objc/components/video_codec/RTCVideoEncoderH264.h",
1656 "objc/components/video_codec/RTCVideoEncoderH264.mm",
mbonadei2c8ac1b2017-05-31 12:14:261657 ]
1658
Anders Carlsson358f2e02018-06-04 08:24:371659 configs += [
1660 "..:common_objc",
1661 ":used_from_extension",
1662 ]
1663
1664 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
1665 defines = [ "RTC_APPRTCMOBILE_BROADCAST_EXTENSION" ]
1666 }
mbonadei2c8ac1b2017-05-31 12:14:261667
1668 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:291669 ":base_native_additions_objc",
1670 ":base_objc",
1671 ":helpers_objc",
mbonadeic0af5ac2017-08-24 19:26:051672 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221673 ":videocodec_objc",
1674 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 12:14:261675 "../common_video",
mbonadei2c8ac1b2017-05-31 12:14:261676 "../modules:module_api",
Patrik Höglund99175c62018-01-08 10:05:101677 "../modules/video_coding:video_codec_interface",
Patrik Höglunda8005cf2017-12-13 15:05:421678 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 17:40:471679 "../rtc_base:rtc_base_approved",
Mirko Bonadei401d0562017-12-14 10:24:001680 "//third_party/libyuv",
mbonadei2c8ac1b2017-05-31 12:14:261681 ]
1682
1683 libs = [
1684 "CoreFoundation.framework",
1685 "CoreMedia.framework",
1686 "CoreVideo.framework",
1687 "VideoToolbox.framework",
1688 ]
Kári Tristan Helgasoncbe74352016-11-09 09:43:261689 }
1690 }
tkchin9eeb6242016-04-27 08:54:201691}