blob: aac15cbfc8373c6fbc2dfc05b7cff0ef607e4dfb [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",
Niels Möllerdac03d92019-02-13 07:52:2738 ]
Mirko Bonadei2dcf3482020-06-05 12:30:4139 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
Niels Möllerdac03d92019-02-13 07:52:2740}
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",
kjellander080a1e32016-05-25 18:37:1159 ]
Kári Tristan Helgason47d3a012017-10-24 13:28:5160 cflags = [
Jiawei Ou4aeb35b2018-11-09 21:55:4561 "-Wimplicit-retain-self",
Kári Tristan Helgason47d3a012017-10-24 13:28:5162 "-Wstrict-overflow",
63 "-Wmissing-field-initializers",
64 ]
Artem Titarenko17ad64e2018-09-19 15:53:5965
66 if (use_clang_coverage) {
67 configs = [ "//build/config/coverage:default_coverage" ]
68 }
kjellander080a1e32016-05-25 18:37:1169 }
70
Anders Carlsson358f2e02018-06-04 08:24:3771 config("used_from_extension") {
72 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
73 cflags = [ "-fapplication-extension" ]
74 }
75 }
76
Anders Carlsson7bca8ca2018-08-30 07:30:2977 # TODO(bugs.webrtc.org/9627): Remove this when unused. Targets should depend on base_objc
78 # or helpers_objc directly instead.
Mirko Bonadei86d053c2019-10-17 19:32:0479 rtc_library("common_objc") {
Mirko Bonadei2ad8c432018-08-09 08:54:4080 visibility = [ "*" ]
Anders Carlsson7bca8ca2018-08-30 07:30:2981
Danil Chapovalov64f1f3f2020-01-16 13:41:1082 sources = [ "objc/helpers/noop.mm" ]
Anders Carlsson7bca8ca2018-08-30 07:30:2983
84 public_configs = [ ":common_config_objc" ]
85
86 deps = [
87 ":base_objc",
88 ":helpers_objc",
89 ]
90 }
91
Mirko Bonadei86d053c2019-10-17 19:32:0492 rtc_library("base_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:2993 visibility = [ "*" ]
94 sources = [
95 "objc/base/RTCCodecSpecificInfo.h",
96 "objc/base/RTCEncodedImage.h",
97 "objc/base/RTCEncodedImage.m",
98 "objc/base/RTCI420Buffer.h",
99 "objc/base/RTCLogging.h",
100 "objc/base/RTCLogging.mm",
101 "objc/base/RTCMacros.h",
102 "objc/base/RTCMutableI420Buffer.h",
103 "objc/base/RTCMutableYUVPlanarBuffer.h",
Yury Yaroshevich19a6e942022-03-11 08:22:08104 "objc/base/RTCSSLCertificateVerifier.h",
Anders Carlsson7bca8ca2018-08-30 07:30:29105 "objc/base/RTCVideoCapturer.h",
106 "objc/base/RTCVideoCapturer.m",
107 "objc/base/RTCVideoCodecInfo.h",
108 "objc/base/RTCVideoCodecInfo.m",
109 "objc/base/RTCVideoDecoder.h",
110 "objc/base/RTCVideoDecoderFactory.h",
111 "objc/base/RTCVideoEncoder.h",
112 "objc/base/RTCVideoEncoderFactory.h",
113 "objc/base/RTCVideoEncoderQpThresholds.h",
114 "objc/base/RTCVideoEncoderQpThresholds.m",
115 "objc/base/RTCVideoEncoderSettings.h",
116 "objc/base/RTCVideoEncoderSettings.m",
117 "objc/base/RTCVideoFrame.h",
118 "objc/base/RTCVideoFrame.mm",
119 "objc/base/RTCVideoFrameBuffer.h",
120 "objc/base/RTCVideoRenderer.h",
121 "objc/base/RTCYUVPlanarBuffer.h",
tkchin9eeb6242016-04-27 08:54:20122 ]
denicijad2088152017-04-28 09:14:54123
mbonadei1e060c62017-04-21 07:02:02124 deps = [
Artem Titov94b57c02019-03-21 12:35:10125 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 15:05:42126 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 13:06:30127 "../rtc_base:logging",
mbonadei1e060c62017-04-21 07:02:02128 ]
Anders Carlsson358f2e02018-06-04 08:24:37129 configs += [
130 "..:common_objc",
131 ":used_from_extension",
132 ]
kthelgasonc0977102017-04-24 07:57:16133
kthelgason36d658d2017-08-24 12:43:45134 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 07:30:29135 }
136
Mirko Bonadei86d053c2019-10-17 19:32:04137 rtc_library("helpers_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:29138 sources = [
139 "objc/helpers/AVCaptureSession+DevicePosition.h",
140 "objc/helpers/AVCaptureSession+DevicePosition.mm",
141 "objc/helpers/NSString+StdString.h",
142 "objc/helpers/NSString+StdString.mm",
143 "objc/helpers/RTCDispatcher+Private.h",
144 "objc/helpers/RTCDispatcher.h",
145 "objc/helpers/RTCDispatcher.m",
Anders Carlsson7bca8ca2018-08-30 07:30:29146 "objc/helpers/scoped_cftyperef.h",
147 ]
148
149 deps = [
150 ":base_objc",
151 "../rtc_base:checks",
152 ]
153
Ali Tofigh6364d082022-03-14 12:32:04154 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
155
Sylvain Defresnec7f0dff2020-07-03 08:19:30156 frameworks = [
Anders Carlsson7bca8ca2018-08-30 07:30:29157 "AVFoundation.framework",
158 "CoreMedia.framework",
159 ]
160
161 configs += [
162 "..:common_objc",
163 ":used_from_extension",
164 ]
165
166 public_configs = [ ":common_config_objc" ]
denicijad2088152017-04-28 09:14:54167
kjellander3bcedd32016-06-08 08:14:15168 if (is_ios) {
169 sources += [
Anders Carlsson7bca8ca2018-08-30 07:30:29170 "objc/helpers/RTCCameraPreviewView.h",
171 "objc/helpers/RTCCameraPreviewView.m",
172 "objc/helpers/UIDevice+RTCDevice.h",
173 "objc/helpers/UIDevice+RTCDevice.mm",
174 ]
175 }
176 }
177
178 if (!build_with_chromium) {
Mirko Bonadei86d053c2019-10-17 19:32:04179 rtc_library("callback_logger_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:29180 sources = [
181 "objc/api/logging/RTCCallbackLogger.h",
182 "objc/api/logging/RTCCallbackLogger.mm",
183 ]
184
185 deps = [
186 ":base_objc",
Ali Tofigh6364d082022-03-14 12:32:04187 ":helpers_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 ]
Ali Tofigh6364d082022-03-14 12:32:04197
198 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
denicijad2088152017-04-28 09:14:54199 }
200
Mirko Bonadei86d053c2019-10-17 19:32:04201 rtc_library("file_logger_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:29202 sources = [
203 "objc/api/peerconnection/RTCFileLogger.h",
204 "objc/api/peerconnection/RTCFileLogger.mm",
205 ]
206
207 deps = [
208 ":base_objc",
Artem Titov94b57c02019-03-21 12:35:10209 "../rtc_base",
Anders Carlsson7bca8ca2018-08-30 07:30:29210 "../rtc_base:checks",
211 "../rtc_base:logging",
Anders Carlsson7bca8ca2018-08-30 07:30:29212 ]
213
214 configs += [
215 "..:common_objc",
216 ":used_from_extension",
kthelgason2f088792017-05-30 08:48:47217 ]
218 }
219 }
220
mbonadei2c8ac1b2017-05-31 12:14:26221 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 09:49:22222 if (is_ios) {
Mirko Bonadei86d053c2019-10-17 19:32:04223 rtc_library("native_api_audio_device_module") {
Peter Hanspers8d95e3b2018-05-15 08:22:36224 visibility = [ "*" ]
225
226 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29227 "objc/native/api/audio_device_module.h",
228 "objc/native/api/audio_device_module.mm",
Peter Hanspers8d95e3b2018-05-15 08:22:36229 ]
230
231 deps = [
232 ":audio_device",
233 "../modules/audio_device:audio_device_api",
234 "../modules/audio_device:audio_device_generic",
235 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 13:06:30236 "../rtc_base:logging",
Florent Castellif86f6f92022-04-05 00:54:12237 "../rtc_base:refcount",
Peter Hanspers8d95e3b2018-05-15 08:22:36238 "../rtc_base:rtc_base_approved",
239 "../system_wrappers",
Peter Hanspers8d95e3b2018-05-15 08:22:36240 ]
Peter Hanspers8d95e3b2018-05-15 08:22:36241 }
242
243 rtc_source_set("audio_session_observer") {
244 visibility = [ ":*" ]
245
Danil Chapovalov64f1f3f2020-01-16 13:41:10246 sources = [ "objc/native/src/audio/audio_session_observer.h" ]
Peter Hanspers8d95e3b2018-05-15 08:22:36247
Mirko Bonadeie5f4c6b2021-01-15 09:41:01248 deps = [
249 "../rtc_base",
250 "../rtc_base:threading",
251 ]
Peter Hanspers8d95e3b2018-05-15 08:22:36252 }
253
Mirko Bonadei86d053c2019-10-17 19:32:04254 rtc_library("audio_device") {
Peter Hanspers8d95e3b2018-05-15 08:22:36255 visibility = [ "*" ]
256
257 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29258 "objc/native/src/audio/audio_device_ios.h",
259 "objc/native/src/audio/audio_device_ios.mm",
260 "objc/native/src/audio/audio_device_module_ios.h",
261 "objc/native/src/audio/audio_device_module_ios.mm",
262 "objc/native/src/audio/helpers.h",
263 "objc/native/src/audio/helpers.mm",
264 "objc/native/src/audio/voice_processing_audio_unit.h",
265 "objc/native/src/audio/voice_processing_audio_unit.mm",
Peter Hanspers8d95e3b2018-05-15 08:22:36266 ]
267
268 deps = [
269 ":audio_objc",
270 ":audio_session_observer",
Anders Carlsson7bca8ca2018-08-30 07:30:29271 ":base_objc",
Peter Hanspers8d95e3b2018-05-15 08:22:36272 "../api:array_view",
Florent Castelli8d4e9fb2022-04-04 15:18:21273 "../api:sequence_checker",
Danil Chapovalova6cb1502019-06-27 13:16:34274 "../api/task_queue",
275 "../api/task_queue:default_task_queue_factory",
Peter Hanspers8d95e3b2018-05-15 08:22:36276 "../modules/audio_device:audio_device_api",
277 "../modules/audio_device:audio_device_buffer",
278 "../modules/audio_device:audio_device_generic",
Artem Titov94b57c02019-03-21 12:35:10279 "../rtc_base",
Florent Castellibddfe022022-04-04 13:03:10280 "../rtc_base:atomicops",
Peter Hanspers8d95e3b2018-05-15 08:22:36281 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 13:06:30282 "../rtc_base:logging",
Florent Castelli4467ad72022-04-04 13:18:46283 "../rtc_base:macromagic",
Florent Castellif86f6f92022-04-05 00:54:12284 "../rtc_base:refcount",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01285 "../rtc_base:threading",
Florent Castellidd837e22022-04-04 15:16:15286 "../rtc_base:timeutils",
Kári Tristan Helgasonf49429d2019-03-28 10:03:27287 "../system_wrappers:field_trial",
Mirko Bonadei17f48782018-09-28 06:51:10288 "../system_wrappers:metrics",
Peter Hanspers8d95e3b2018-05-15 08:22:36289 ]
Mirko Bonadei2dcf3482020-06-05 12:30:41290 absl_deps = [ "//third_party/abseil-cpp/absl/base:core_headers" ]
Peter Hanspers8d95e3b2018-05-15 08:22:36291
Sylvain Defresnec7f0dff2020-07-03 08:19:30292 frameworks = [ "AudioToolbox.framework" ]
Peter Hanspers8d95e3b2018-05-15 08:22:36293 }
294
Joe Chen0b3a6e32019-12-27 07:01:42295 # This target exists to expose :audio_session_objc and
296 # :audio_session_delegate_adapter_objc for backward compatibility,
297 # and should be deprecated.
298 group("audio_objc") {
299 public_deps = [ # no-presubmit-check TODO(webrtc:11238)
300 ":audio_session_delegate_adapter_objc",
301 ":audio_session_objc",
302 ]
303 }
304
305 rtc_library("audio_session_delegate_adapter_objc") {
306 sources = [
307 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.h",
308 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.mm",
309 ]
310
311 configs += [
312 "..:common_objc",
313 ":used_from_extension",
314 ]
315
316 public_configs = [ ":common_config_objc" ]
317
318 deps = [
319 ":audio_session_objc",
320 ":audio_session_observer",
321 ":base_objc",
322 ]
323 }
324
325 rtc_library("audio_session_objc") {
Joe Chen3b19b272020-01-09 16:31:06326 visibility = [ "*" ]
327
Kári Tristan Helgason99bf77c2018-02-16 09:49:22328 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29329 "objc/components/audio/RTCAudioSession+Configuration.mm",
330 "objc/components/audio/RTCAudioSession+Private.h",
331 "objc/components/audio/RTCAudioSession.h",
332 "objc/components/audio/RTCAudioSession.mm",
333 "objc/components/audio/RTCAudioSessionConfiguration.h",
334 "objc/components/audio/RTCAudioSessionConfiguration.m",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22335 ]
Joe Chen0b3a6e32019-12-27 07:01:42336
Anders Carlsson358f2e02018-06-04 08:24:37337 configs += [
338 "..:common_objc",
339 ":used_from_extension",
340 ]
denicija59ee91b2017-06-05 12:48:47341
Kári Tristan Helgason99bf77c2018-02-16 09:49:22342 public_configs = [ ":common_config_objc" ]
Anders Carlsson8ecfd802017-09-15 12:07:30343
Sylvain Defresnec7f0dff2020-07-03 08:19:30344 frameworks = [ "AVFoundation.framework" ]
Jiawei Ouc9e6b962018-10-09 19:33:06345
Kári Tristan Helgason99bf77c2018-02-16 09:49:22346 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29347 ":base_objc",
348 ":helpers_objc",
Artem Titov94b57c02019-03-21 12:35:10349 "../rtc_base",
Florent Castellibddfe022022-04-04 13:03:10350 "../rtc_base:atomicops",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22351 "../rtc_base:checks",
352 "../rtc_base:rtc_base_approved",
Niels Möller072c0082021-02-15 15:30:44353 "../rtc_base/synchronization:mutex",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22354 ]
Byoungchan Lee0a54e7a2021-09-06 13:32:52355
356 absl_deps = [ "//third_party/abseil-cpp/absl/base:core_headers" ]
denicija59ee91b2017-06-05 12:48:47357 }
Taylor Brandstetterea7fbfb2020-08-19 23:41:54358
359 rtc_source_set("network_monitor_observer") {
360 visibility = [ ":*" ]
361
362 sources = [ "objc/native/src/network_monitor_observer.h" ]
363
Mirko Bonadeie5f4c6b2021-01-15 09:41:01364 deps = [
365 "../rtc_base",
366 "../rtc_base:network_constants",
Florent Castelli57aa81b2022-04-04 15:14:02367 "../rtc_base:stringutils",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01368 "../rtc_base:threading",
369 ]
Ali Tofigh7fa90572022-03-17 14:47:49370
371 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
Taylor Brandstetterea7fbfb2020-08-19 23:41:54372 }
373
374 rtc_library("network_monitor_objc") {
375 visibility = [ "*" ]
376
377 sources = [
378 "objc/components/network/RTCNetworkMonitor+Private.h",
379 "objc/components/network/RTCNetworkMonitor.h",
380 "objc/components/network/RTCNetworkMonitor.mm",
381 ]
382
383 configs += [ ":used_from_extension" ]
384
385 frameworks = [ "Network.framework" ]
386
387 deps = [
388 ":base_objc",
389 ":helpers_objc",
390 ":network_monitor_observer",
Ali Tofigh7fa90572022-03-17 14:47:49391 "../rtc_base:stringutils",
Taylor Brandstetterea7fbfb2020-08-19 23:41:54392 "../rtc_base/system:gcd_helpers",
393 ]
394 }
denicija59ee91b2017-06-05 12:48:47395 }
zhihuanga4c113a2017-06-28 21:05:44396
Mirko Bonadei86d053c2019-10-17 19:32:04397 rtc_library("videosource_objc") {
zhihuanga4c113a2017-06-28 21:05:44398 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29399 "objc/api/peerconnection/RTCVideoSource+Private.h",
400 "objc/api/peerconnection/RTCVideoSource.h",
401 "objc/api/peerconnection/RTCVideoSource.mm",
zhihuanga4c113a2017-06-28 21:05:44402 ]
403
404 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29405 ":base_objc",
Anders Carlsson9823ee42018-03-07 09:32:03406 ":mediasource_objc",
407 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22408 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 21:05:44409 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 12:30:41410 "../api:media_stream_interface",
Niels Möllerc6ce9c52018-05-11 09:15:30411 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 10:59:38412 "../api/video:video_rtp_headers",
zhihuanga4c113a2017-06-28 21:05:44413 "../common_video",
414 "../media:rtc_media_base",
Harald Alvestrande5a73f52022-03-28 12:06:34415 "../pc:video_track_source_proxy",
Artem Titov94b57c02019-03-21 12:35:10416 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 15:05:42417 "../rtc_base:checks",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01418 "../rtc_base:threading",
Mirko Bonadei401d0562017-12-14 10:24:00419 "//third_party/libyuv",
zhihuanga4c113a2017-06-28 21:05:44420 ]
421
Anders Carlsson358f2e02018-06-04 08:24:37422 configs += [
423 "..:common_objc",
424 ":used_from_extension",
425 ]
zhihuanga4c113a2017-06-28 21:05:44426 }
427
Mirko Bonadei86d053c2019-10-17 19:32:04428 rtc_library("videoframebuffer_objc") {
Mirko Bonadei2ad8c432018-08-09 08:54:40429 visibility = [ "*" ]
Kári Tristan Helgason99bf77c2018-02-16 09:49:22430 sources = [
Anders Carlsson4e5af962018-09-03 12:44:50431 "objc/api/video_frame_buffer/RTCNativeI420Buffer+Private.h",
432 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
433 "objc/api/video_frame_buffer/RTCNativeI420Buffer.mm",
434 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
435 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:29436 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
437 "objc/components/video_frame_buffer/RTCCVPixelBuffer.mm",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22438 ]
439 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29440 ":base_objc",
Florent Castelli0af55ba2022-04-04 13:06:30441 "../rtc_base:logging",
Niels Möllerc6ce9c52018-05-11 09:15:30442 "//api/video:video_frame",
Chen Xing5d24b162019-06-10 10:59:38443 "//api/video:video_rtp_headers",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22444 "//common_video",
445 "//rtc_base:checks",
446 "//rtc_base:rtc_base_approved",
447 "//third_party/libyuv",
448 ]
Anders Carlsson358f2e02018-06-04 08:24:37449 configs += [
450 "..:common_objc",
451 ":used_from_extension",
452 ]
Sylvain Defresnec7f0dff2020-07-03 08:19:30453 frameworks = [
Kári Tristan Helgason8a1e35c2019-03-07 09:44:26454 "VideoToolbox.framework",
Oleh Prypinb3f78de2019-07-18 20:25:48455 "CoreGraphics.framework",
Kári Tristan Helgason8a1e35c2019-03-07 09:44:26456 "CoreVideo.framework",
457 ]
Kári Tristan Helgason99bf77c2018-02-16 09:49:22458 }
459
Jordan Rose53d3fc92021-07-06 19:16:41460 rtc_library("opengl_objc") {
kthelgason2f088792017-05-30 08:48:47461 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29462 "objc/components/renderer/opengl/RTCDefaultShader.h",
463 "objc/components/renderer/opengl/RTCDefaultShader.mm",
464 "objc/components/renderer/opengl/RTCI420TextureCache.h",
465 "objc/components/renderer/opengl/RTCI420TextureCache.mm",
466 "objc/components/renderer/opengl/RTCOpenGLDefines.h",
467 "objc/components/renderer/opengl/RTCShader.h",
468 "objc/components/renderer/opengl/RTCShader.mm",
469 "objc/components/renderer/opengl/RTCVideoViewShading.h",
kthelgason2f088792017-05-30 08:48:47470 ]
Sylvain Defresnec7f0dff2020-07-03 08:19:30471 frameworks = [ "CoreVideo.framework" ]
denicijad2088152017-04-28 09:14:54472 if (is_ios) {
denicija070d5e32017-02-26 19:44:13473 sources += [
Anders Carlsson7bca8ca2018-08-30 07:30:29474 "objc/components/renderer/opengl/RTCNV12TextureCache.h",
475 "objc/components/renderer/opengl/RTCNV12TextureCache.m",
mbonadei2c8ac1b2017-05-31 12:14:26476 ]
Sylvain Defresnec7f0dff2020-07-03 08:19:30477 frameworks += [
mbonadei2c8ac1b2017-05-31 12:14:26478 "GLKit.framework",
479 "OpenGLES.framework",
480 "QuartzCore.framework",
481 ]
482 } else if (is_mac) {
Sylvain Defresnec7f0dff2020-07-03 08:19:30483 frameworks += [
mbonadei2c8ac1b2017-05-31 12:14:26484 "CoreMedia.framework",
mbonadei2c8ac1b2017-05-31 12:14:26485 "OpenGL.framework",
denicija070d5e32017-02-26 19:44:13486 ]
487 }
Mirko Bonadei6b09c452021-07-05 14:47:49488
489 # TODO(bugs.webrtc.org/12937): Remove OpenGL deprecation warning
490 # workaround.
Björn Terelius02768ae2021-07-02 14:19:32491 defines = [ "GLES_SILENCE_DEPRECATION" ]
mbonadei2c8ac1b2017-05-31 12:14:26492
kthelgason2f088792017-05-30 08:48:47493 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29494 ":base_objc",
495 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22496 ":mediaconstraints_objc",
Anders Carlsson3ff50fb2018-02-01 14:47:05497 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22498 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 09:32:03499 ":videosource_objc",
mbonadei2c8ac1b2017-05-31 12:14:26500 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 09:15:30501 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 10:59:38502 "../api/video:video_rtp_headers",
mbonadei2c8ac1b2017-05-31 12:14:26503 "../common_video",
504 "../media:rtc_media_base",
Artem Titov94b57c02019-03-21 12:35:10505 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 15:05:42506 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 13:06:30507 "../rtc_base:logging",
tkchin9eeb6242016-04-27 08:54:20508 ]
Mirko Bonadei2dcf3482020-06-05 12:30:41509 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
mbonadei2c8ac1b2017-05-31 12:14:26510
Anders Carlsson358f2e02018-06-04 08:24:37511 configs += [
512 "..:common_objc",
513 ":used_from_extension",
514 ]
ehmaldonadoda8dcfb2017-01-04 15:11:23515 }
ehmaldonadoda8dcfb2017-01-04 15:11:23516
Jordan Rose53d3fc92021-07-06 19:16:41517 rtc_library("opengl_ui_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53518 visibility = [ "*" ]
Jake Brombergfb7fd242021-06-14 20:44:25519 allow_poison = [
520 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
521 "default_task_queue",
522 ]
mbonadei2c8ac1b2017-05-31 12:14:26523 if (is_ios) {
524 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29525 "objc/components/renderer/opengl/RTCDisplayLinkTimer.h",
526 "objc/components/renderer/opengl/RTCDisplayLinkTimer.m",
527 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
528 "objc/components/renderer/opengl/RTCEAGLVideoView.m",
mbonadei2c8ac1b2017-05-31 12:14:26529 ]
Mirko Bonadei6b09c452021-07-05 14:47:49530
531 # TODO(bugs.webrtc.org/12937): Remove OpenGL deprecation warning
532 # workaround.
Björn Terelius02768ae2021-07-02 14:19:32533 defines = [ "GLES_SILENCE_DEPRECATION" ]
mbonadei2c8ac1b2017-05-31 12:14:26534 }
535 if (is_mac) {
536 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29537 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
538 "objc/components/renderer/opengl/RTCNSGLVideoView.m",
mbonadei2c8ac1b2017-05-31 12:14:26539 ]
540 }
541 configs += [ "..:common_objc" ]
542 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29543 ":base_objc",
544 ":helpers_objc",
Jake Brombergfb7fd242021-06-14 20:44:25545 ":metal_objc",
Jordan Rose53d3fc92021-07-06 19:16:41546 ":opengl_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22547 ":videocapture_objc",
548 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 12:14:26549 ]
550 }
kthelgasonebc34e72016-09-15 11:30:18551
Jake Brombergfb7fd242021-06-14 20:44:25552 rtc_library("metal_objc") {
553 visibility = [ "*" ]
554 allow_poison = [
555 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
556 "default_task_queue",
557 ]
558 sources = [
559 "objc/components/renderer/metal/RTCMTLI420Renderer.h",
560 "objc/components/renderer/metal/RTCMTLI420Renderer.mm",
561 "objc/components/renderer/metal/RTCMTLNV12Renderer.h",
562 "objc/components/renderer/metal/RTCMTLNV12Renderer.mm",
563 "objc/components/renderer/metal/RTCMTLRGBRenderer.h",
564 "objc/components/renderer/metal/RTCMTLRGBRenderer.mm",
565 "objc/components/renderer/metal/RTCMTLRenderer+Private.h",
566 "objc/components/renderer/metal/RTCMTLRenderer.h",
567 "objc/components/renderer/metal/RTCMTLRenderer.mm",
568 ]
569 frameworks = [
570 "CoreVideo.framework",
571 "Metal.framework",
572 "MetalKit.framework",
573 ]
574 if (is_ios) {
575 sources += [
576 "objc/components/renderer/metal/RTCMTLVideoView.h",
577 "objc/components/renderer/metal/RTCMTLVideoView.m",
Danil Chapovalov41300af2019-07-10 10:44:43578 ]
mbonadei2c8ac1b2017-05-31 12:14:26579 }
Jake Brombergfb7fd242021-06-14 20:44:25580 if (is_mac) {
581 sources += [
582 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
583 "objc/components/renderer/metal/RTCMTLNSVideoView.m",
584 ]
585 frameworks += [ "AppKit.framework" ]
586 }
587 deps = [
588 ":base_objc",
589 ":peerconnectionfactory_base_objc",
Jake Brombergfb7fd242021-06-14 20:44:25590 ":videoframebuffer_objc",
591 "../api/video:video_frame",
592 "../api/video:video_rtp_headers",
593 "../rtc_base:checks",
594 "../rtc_base:rtc_base_approved",
595 ]
596 configs += [ "..:common_objc" ]
597 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 12:14:26598 }
599
Anders Carlsson7bca8ca2018-08-30 07:30:29600 # TODO(bugs.webrtc.org/9627): Remove this target.
Mirko Bonadei86d053c2019-10-17 19:32:04601 rtc_library("videocapturebase_objc") {
Anders Carlsson73119182018-03-15 08:41:03602 visibility = [ "*" ]
Danil Chapovalov64f1f3f2020-01-16 13:41:10603 sources = [ "objc/helpers/noop.mm" ]
Anders Carlsson73119182018-03-15 08:41:03604
605 configs += [ "..:common_objc" ]
606
607 public_configs = [ ":common_config_objc" ]
608
609 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29610 ":base_objc",
Anders Carlsson73119182018-03-15 08:41:03611 ":videoframebuffer_objc",
612 ]
613 }
614
Mirko Bonadei86d053c2019-10-17 19:32:04615 rtc_library("videocapture_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53616 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 13:23:23617 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadei2c8ac1b2017-05-31 12:14:26618 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29619 "objc/components/capturer/RTCCameraVideoCapturer.h",
620 "objc/components/capturer/RTCCameraVideoCapturer.m",
Mirko Bonadei19640aa2020-10-19 14:12:43621 "objc/components/capturer/RTCFileVideoCapturer.h",
622 "objc/components/capturer/RTCFileVideoCapturer.m",
zhihuanga4c113a2017-06-28 21:05:44623 ]
Sylvain Defresnec7f0dff2020-07-03 08:19:30624 frameworks = [
Kári Tristan Helgason8a1e35c2019-03-07 09:44:26625 "AVFoundation.framework",
626 "CoreVideo.framework",
Mirko Bonadei19640aa2020-10-19 14:12:43627 "QuartzCore.framework",
Kári Tristan Helgason8a1e35c2019-03-07 09:44:26628 ]
zhihuanga4c113a2017-06-28 21:05:44629
zhihuanga4c113a2017-06-28 21:05:44630 configs += [ "..:common_objc" ]
631
kthelgason36d658d2017-08-24 12:43:45632 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 21:05:44633
zhihuanga4c113a2017-06-28 21:05:44634 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29635 ":base_objc",
636 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22637 ":videoframebuffer_objc",
Yura Yaroshevichebf739b2020-03-16 15:00:59638 "../rtc_base/system:gcd_helpers",
zhihuanga4c113a2017-06-28 21:05:44639 ]
zhihuanga4c113a2017-06-28 21:05:44640 }
641
Mirko Bonadei86d053c2019-10-17 19:32:04642 rtc_library("videocodec_objc") {
Karl Wibergbb23c832018-04-22 17:55:00643 visibility = [ "*" ]
Mirko Bonadei96ede16a2018-09-06 11:45:44644 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 09:49:22645 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29646 "objc/components/video_codec/RTCCodecSpecificInfoH264+Private.h",
647 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
648 "objc/components/video_codec/RTCCodecSpecificInfoH264.mm",
649 "objc/components/video_codec/RTCH264ProfileLevelId.h",
650 "objc/components/video_codec/RTCH264ProfileLevelId.mm",
zhihuanga4c113a2017-06-28 21:05:44651 ]
Yura Yaroshevich0f77fea2018-04-26 12:41:01652 if (is_ios) {
653 sources += [
Anders Carlsson7bca8ca2018-08-30 07:30:29654 "objc/components/video_codec/UIDevice+H264Profile.h",
655 "objc/components/video_codec/UIDevice+H264Profile.mm",
Yura Yaroshevich0f77fea2018-04-26 12:41:01656 ]
657 }
Mirko Bonadeifc52b912019-03-01 09:32:56658
Kári Tristan Helgason99bf77c2018-02-16 09:49:22659 public_configs = [ ":common_config_objc" ]
660 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29661 ":base_objc",
662 ":helpers_objc",
kthelgasonfb143122017-07-25 14:55:58663 "../api/video_codecs:video_codecs_api",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22664 "../common_video",
zhihuanga4c113a2017-06-28 21:05:44665 "../media:rtc_media_base",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22666 "../modules/video_coding:video_codec_interface",
Anders Carlsson7bca8ca2018-08-30 07:30:29667 "../rtc_base:checks",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22668 "../rtc_base:rtc_base_approved",
zhihuanga4c113a2017-06-28 21:05:44669 ]
670 }
671
Mirko Bonadei86d053c2019-10-17 19:32:04672 rtc_library("default_codec_factory_objc") {
Anders Carlssondd8c1652018-01-30 09:32:13673 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29674 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
675 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.m",
676 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
677 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.m",
Anders Carlssondd8c1652018-01-30 09:32:13678 ]
679
680 deps = [
Yura Yaroshevich8cfb2872021-03-03 09:29:42681 ":av1",
Anders Carlsson7bca8ca2018-08-30 07:30:29682 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22683 ":native_video",
684 ":videocodec_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:29685 ":videotoolbox_objc",
Magnus Jedvert8b4e92d2018-04-13 13:36:43686 ":vp8",
687 ":vp9",
Anders Carlsson7bca8ca2018-08-30 07:30:29688 ":vpx_codec_constants",
689 ]
690 }
691
Mirko Bonadei86d053c2019-10-17 19:32:04692 rtc_library("vpx_codec_constants") {
Mirko Bonadei96ede16a2018-09-06 11:45:44693 configs += [ "..:no_global_constructors" ]
Anders Carlsson7bca8ca2018-08-30 07:30:29694 sources = [
695 "objc/api/video_codec/RTCVideoCodecConstants.h",
696 "objc/api/video_codec/RTCVideoCodecConstants.mm",
697 ]
698
699 deps = [
700 ":base_objc",
701 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 09:32:13702 ]
Anders Carlssondd8c1652018-01-30 09:32:13703 }
704
Mirko Bonadei86d053c2019-10-17 19:32:04705 rtc_library("vp8") {
Kári Tristan Helgason99bf77c2018-02-16 09:49:22706 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 02:31:53707 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 09:32:13708 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29709 "objc/api/video_codec/RTCVideoDecoderVP8.h",
710 "objc/api/video_codec/RTCVideoDecoderVP8.mm",
711 "objc/api/video_codec/RTCVideoEncoderVP8.h",
712 "objc/api/video_codec/RTCVideoEncoderVP8.mm",
Anders Carlssondd8c1652018-01-30 09:32:13713 ]
714
Anders Carlssondd8c1652018-01-30 09:32:13715 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29716 ":base_objc",
Anders Carlsson9823ee42018-03-07 09:32:03717 ":wrapped_native_codec_objc",
Anders Carlssondd8c1652018-01-30 09:32:13718 "../modules/video_coding:webrtc_vp8",
Anders Carlssondd8c1652018-01-30 09:32:13719 ]
720 }
721
Mirko Bonadei86d053c2019-10-17 19:32:04722 rtc_library("vp9") {
Kári Tristan Helgason99bf77c2018-02-16 09:49:22723 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 02:31:53724 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 09:32:13725 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29726 "objc/api/video_codec/RTCVideoDecoderVP9.h",
727 "objc/api/video_codec/RTCVideoDecoderVP9.mm",
728 "objc/api/video_codec/RTCVideoEncoderVP9.h",
729 "objc/api/video_codec/RTCVideoEncoderVP9.mm",
Anders Carlssondd8c1652018-01-30 09:32:13730 ]
731
Anders Carlssondd8c1652018-01-30 09:32:13732 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29733 ":base_objc",
Anders Carlsson9823ee42018-03-07 09:32:03734 ":wrapped_native_codec_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:29735 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 09:32:13736 "../modules/video_coding:webrtc_vp9",
Anders Carlssondd8c1652018-01-30 09:32:13737 ]
738 }
739
Yura Yaroshevich8cfb2872021-03-03 09:29:42740 rtc_library("av1") {
741 visibility = [ "*" ]
742 allow_poison = [ "software_video_codecs" ]
743 sources = [
744 "objc/api/video_codec/RTCVideoDecoderAV1.h",
745 "objc/api/video_codec/RTCVideoDecoderAV1.mm",
746 "objc/api/video_codec/RTCVideoEncoderAV1.h",
747 "objc/api/video_codec/RTCVideoEncoderAV1.mm",
748 ]
749
750 deps = [
751 ":base_objc",
752 ":wrapped_native_codec_objc",
753 "../media:rtc_media_base",
754 "../modules/video_coding/codecs/av1:libaom_av1_decoder",
philipel95701502022-01-18 17:47:52755 "../modules/video_coding/codecs/av1:libaom_av1_encoder_if_supported",
Yura Yaroshevich8cfb2872021-03-03 09:29:42756 ]
757 }
758
zhihuanga4c113a2017-06-28 21:05:44759 # Build the PeerConnectionFactory without audio/video support.
760 # This target depends on the objc_peeerconnectionfactory_base which still
761 # includes some audio/video related objects such as RTCAudioSource because
762 # these objects are just thin wrappers of native C++ interfaces required
763 # when implementing webrtc::PeerConnectionFactoryInterface and
764 # webrtc::PeerConnectionInterface.
Kári Tristan Helgasona2d89fc2018-03-06 09:18:43765 # The applications which only use WebRTC DataChannel can depend on this.
Mirko Bonadei86d053c2019-10-17 19:32:04766 rtc_library("peerconnectionfactory_no_media_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53767 visibility = [ "*" ]
Danil Chapovalov41300af2019-07-10 10:44:43768 allow_poison = [
769 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
770 "default_task_queue",
771 ]
zhihuanga4c113a2017-06-28 21:05:44772 defines = [ "HAVE_NO_MEDIA" ]
773
Danil Chapovalov64f1f3f2020-01-16 13:41:10774 sources = [ "objc/helpers/noop.mm" ]
zhihuanga4c113a2017-06-28 21:05:44775
kthelgason36d658d2017-08-24 12:43:45776 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 21:05:44777
zhihuanga4c113a2017-06-28 21:05:44778 deps = [
Anders Carlsson3ff50fb2018-02-01 14:47:05779 ":native_api",
780 ":native_video",
kthelgason36d658d2017-08-24 12:43:45781 ":peerconnectionfactory_base_objc",
zhihuanga4c113a2017-06-28 21:05:44782 "../api:libjingle_peerconnection_api",
Artem Titov94b57c02019-03-21 12:35:10783 "../rtc_base",
zhihuanga4c113a2017-06-28 21:05:44784 ]
785 }
786
Mirko Bonadei86d053c2019-10-17 19:32:04787 rtc_library("mediaconstraints_objc") {
Mirko Bonadei96ede16a2018-09-06 11:45:44788 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 09:49:22789 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29790 "objc/api/peerconnection/RTCMediaConstraints+Private.h",
791 "objc/api/peerconnection/RTCMediaConstraints.h",
792 "objc/api/peerconnection/RTCMediaConstraints.mm",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22793 ]
Kári Tristan Helgason99bf77c2018-02-16 09:49:22794
795 public_configs = [ ":common_config_objc" ]
796 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29797 ":base_objc",
798 ":helpers_objc",
Niels Möllerdac03d92019-02-13 07:52:27799 ":media_constraints",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22800 ]
801 }
802
Anders Carlsson7bca8ca2018-08-30 07:30:29803 # TODO(bugs.webrtc.org/9627): Remove, targets should depend on base_objc.
Mirko Bonadei86d053c2019-10-17 19:32:04804 rtc_library("videorenderer_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:29805 visibility = [ "*" ]
Danil Chapovalov64f1f3f2020-01-16 13:41:10806 sources = [ "objc/helpers/noop.mm" ]
Anders Carlsson9823ee42018-03-07 09:32:03807
808 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 09:32:03809 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 07:30:29810
Danil Chapovalov64f1f3f2020-01-16 13:41:10811 deps = [ ":base_objc" ]
Anders Carlsson9823ee42018-03-07 09:32:03812 }
813
Mirko Bonadei86d053c2019-10-17 19:32:04814 rtc_library("videorendereradapter_objc") {
Karl Wibergbb23c832018-04-22 17:55:00815 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 13:23:23816 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Anders Carlsson9823ee42018-03-07 09:32:03817 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29818 "objc/api/RTCVideoRendererAdapter+Private.h",
819 "objc/api/RTCVideoRendererAdapter.h",
820 "objc/api/RTCVideoRendererAdapter.mm",
Anders Carlsson9823ee42018-03-07 09:32:03821 ]
822
823 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 09:32:03824 public_configs = [ ":common_config_objc" ]
825
826 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29827 ":base_objc",
Anders Carlsson9823ee42018-03-07 09:32:03828 ":native_api",
829 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 09:32:03830 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 12:30:41831 "../api:media_stream_interface",
Anders Carlsson9823ee42018-03-07 09:32:03832 ]
833 }
834
Mirko Bonadei86d053c2019-10-17 19:32:04835 rtc_library("mediasource_objc") {
Anders Carlsson9823ee42018-03-07 09:32:03836 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29837 "objc/api/peerconnection/RTCMediaSource+Private.h",
838 "objc/api/peerconnection/RTCMediaSource.h",
839 "objc/api/peerconnection/RTCMediaSource.mm",
Anders Carlsson9823ee42018-03-07 09:32:03840 ]
841
Anders Carlsson358f2e02018-06-04 08:24:37842 configs += [
843 "..:common_objc",
844 ":used_from_extension",
845 ]
Anders Carlsson9823ee42018-03-07 09:32:03846 public_configs = [ ":common_config_objc" ]
847
848 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29849 ":base_objc",
Niels Möllere942b142019-09-17 12:30:41850 "../api:media_stream_interface",
Anders Carlsson9823ee42018-03-07 09:32:03851 "../rtc_base:checks",
852 ]
853 }
854
Mirko Bonadei86d053c2019-10-17 19:32:04855 rtc_library("base_native_additions_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:29856 sources = [
857 "objc/api/peerconnection/RTCEncodedImage+Private.h",
858 "objc/api/peerconnection/RTCEncodedImage+Private.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:29859 "objc/api/peerconnection/RTCVideoCodecInfo+Private.h",
860 "objc/api/peerconnection/RTCVideoCodecInfo+Private.mm",
861 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.h",
862 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.mm",
863 ]
864
865 configs += [ "..:common_objc" ]
866
867 public_configs = [ ":common_config_objc" ]
868
869 deps = [
870 ":base_objc",
871 ":helpers_objc",
Niels Möller4dc66c52018-10-05 12:17:58872 "../api/video:encoded_image",
Anders Carlsson7bca8ca2018-08-30 07:30:29873 "../api/video_codecs:video_codecs_api",
Anders Carlsson7bca8ca2018-08-30 07:30:29874 "../modules/video_coding:video_codec_interface",
Artem Titov94b57c02019-03-21 12:35:10875 "../rtc_base",
Florent Castellif86f6f92022-04-05 00:54:12876 "../rtc_base:refcount",
Florent Castellie10a9f62022-04-04 15:04:37877 "../rtc_base:safe_conversions",
Anders Carlsson7bca8ca2018-08-30 07:30:29878 ]
Anders Carlsson7bca8ca2018-08-30 07:30:29879 }
880
Mirko Bonadei86d053c2019-10-17 19:32:04881 rtc_library("peerconnectionfactory_base_objc") {
Karl Wibergbb23c832018-04-22 17:55:00882 visibility = [ "*" ]
Danil Chapovalov41300af2019-07-10 10:44:43883 allow_poison = [
884 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
885 "default_task_queue",
886 ]
Byoungchan Lee524a4222021-11-19 10:03:49887 configs += [ "..:no_global_constructors" ]
zhihuanga4c113a2017-06-28 21:05:44888 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29889 "objc/api/peerconnection/RTCAudioSource+Private.h",
890 "objc/api/peerconnection/RTCAudioSource.h",
891 "objc/api/peerconnection/RTCAudioSource.mm",
892 "objc/api/peerconnection/RTCAudioTrack+Private.h",
893 "objc/api/peerconnection/RTCAudioTrack.h",
894 "objc/api/peerconnection/RTCAudioTrack.mm",
895 "objc/api/peerconnection/RTCCertificate.h",
896 "objc/api/peerconnection/RTCCertificate.mm",
897 "objc/api/peerconnection/RTCConfiguration+Native.h",
898 "objc/api/peerconnection/RTCConfiguration+Private.h",
899 "objc/api/peerconnection/RTCConfiguration.h",
900 "objc/api/peerconnection/RTCConfiguration.mm",
Benjamin Wright8c27cca2018-10-25 17:16:44901 "objc/api/peerconnection/RTCCryptoOptions.h",
902 "objc/api/peerconnection/RTCCryptoOptions.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:29903 "objc/api/peerconnection/RTCDataChannel+Private.h",
904 "objc/api/peerconnection/RTCDataChannel.h",
905 "objc/api/peerconnection/RTCDataChannel.mm",
906 "objc/api/peerconnection/RTCDataChannelConfiguration+Private.h",
907 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
908 "objc/api/peerconnection/RTCDataChannelConfiguration.mm",
909 "objc/api/peerconnection/RTCDtmfSender+Private.h",
910 "objc/api/peerconnection/RTCDtmfSender.h",
911 "objc/api/peerconnection/RTCDtmfSender.mm",
912 "objc/api/peerconnection/RTCFieldTrials.h",
913 "objc/api/peerconnection/RTCFieldTrials.mm",
914 "objc/api/peerconnection/RTCIceCandidate+Private.h",
915 "objc/api/peerconnection/RTCIceCandidate.h",
916 "objc/api/peerconnection/RTCIceCandidate.mm",
Jaehyun Kod2110982021-11-30 10:01:43917 "objc/api/peerconnection/RTCIceCandidateErrorEvent+Private.h",
918 "objc/api/peerconnection/RTCIceCandidateErrorEvent.h",
919 "objc/api/peerconnection/RTCIceCandidateErrorEvent.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:29920 "objc/api/peerconnection/RTCIceServer+Private.h",
921 "objc/api/peerconnection/RTCIceServer.h",
922 "objc/api/peerconnection/RTCIceServer.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:29923 "objc/api/peerconnection/RTCLegacyStatsReport+Private.h",
924 "objc/api/peerconnection/RTCLegacyStatsReport.h",
925 "objc/api/peerconnection/RTCLegacyStatsReport.mm",
926 "objc/api/peerconnection/RTCMediaStream+Private.h",
927 "objc/api/peerconnection/RTCMediaStream.h",
928 "objc/api/peerconnection/RTCMediaStream.mm",
929 "objc/api/peerconnection/RTCMediaStreamTrack+Private.h",
930 "objc/api/peerconnection/RTCMediaStreamTrack.h",
931 "objc/api/peerconnection/RTCMediaStreamTrack.mm",
932 "objc/api/peerconnection/RTCMetrics.h",
933 "objc/api/peerconnection/RTCMetrics.mm",
934 "objc/api/peerconnection/RTCMetricsSampleInfo+Private.h",
935 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
936 "objc/api/peerconnection/RTCMetricsSampleInfo.mm",
937 "objc/api/peerconnection/RTCPeerConnection+DataChannel.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:29938 "objc/api/peerconnection/RTCPeerConnection+Private.h",
939 "objc/api/peerconnection/RTCPeerConnection+Stats.mm",
940 "objc/api/peerconnection/RTCPeerConnection.h",
941 "objc/api/peerconnection/RTCPeerConnection.mm",
942 "objc/api/peerconnection/RTCPeerConnectionFactory+Native.h",
943 "objc/api/peerconnection/RTCPeerConnectionFactory+Private.h",
944 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
945 "objc/api/peerconnection/RTCPeerConnectionFactory.mm",
946 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.h",
947 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.mm",
948 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.h",
949 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.mm",
950 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions+Private.h",
951 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
952 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.mm",
953 "objc/api/peerconnection/RTCRtcpParameters+Private.h",
954 "objc/api/peerconnection/RTCRtcpParameters.h",
955 "objc/api/peerconnection/RTCRtcpParameters.mm",
956 "objc/api/peerconnection/RTCRtpCodecParameters+Private.h",
957 "objc/api/peerconnection/RTCRtpCodecParameters.h",
958 "objc/api/peerconnection/RTCRtpCodecParameters.mm",
959 "objc/api/peerconnection/RTCRtpEncodingParameters+Private.h",
960 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
961 "objc/api/peerconnection/RTCRtpEncodingParameters.mm",
962 "objc/api/peerconnection/RTCRtpHeaderExtension+Private.h",
963 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
964 "objc/api/peerconnection/RTCRtpHeaderExtension.mm",
965 "objc/api/peerconnection/RTCRtpParameters+Private.h",
966 "objc/api/peerconnection/RTCRtpParameters.h",
967 "objc/api/peerconnection/RTCRtpParameters.mm",
Benjamin Wrightddf1a3e2018-10-02 17:20:58968 "objc/api/peerconnection/RTCRtpReceiver+Native.h",
Anders Carlsson7bca8ca2018-08-30 07:30:29969 "objc/api/peerconnection/RTCRtpReceiver+Private.h",
970 "objc/api/peerconnection/RTCRtpReceiver.h",
971 "objc/api/peerconnection/RTCRtpReceiver.mm",
Benjamin Wrightddf1a3e2018-10-02 17:20:58972 "objc/api/peerconnection/RTCRtpSender+Native.h",
Anders Carlsson7bca8ca2018-08-30 07:30:29973 "objc/api/peerconnection/RTCRtpSender+Private.h",
974 "objc/api/peerconnection/RTCRtpSender.h",
975 "objc/api/peerconnection/RTCRtpSender.mm",
976 "objc/api/peerconnection/RTCRtpTransceiver+Private.h",
977 "objc/api/peerconnection/RTCRtpTransceiver.h",
978 "objc/api/peerconnection/RTCRtpTransceiver.mm",
979 "objc/api/peerconnection/RTCSSLAdapter.h",
980 "objc/api/peerconnection/RTCSSLAdapter.mm",
981 "objc/api/peerconnection/RTCSessionDescription+Private.h",
982 "objc/api/peerconnection/RTCSessionDescription.h",
983 "objc/api/peerconnection/RTCSessionDescription.mm",
Peter Hanspersbed86042019-02-21 16:27:09984 "objc/api/peerconnection/RTCStatisticsReport+Private.h",
985 "objc/api/peerconnection/RTCStatisticsReport.h",
986 "objc/api/peerconnection/RTCStatisticsReport.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:29987 "objc/api/peerconnection/RTCTracing.h",
988 "objc/api/peerconnection/RTCTracing.mm",
989 "objc/api/peerconnection/RTCVideoTrack+Private.h",
990 "objc/api/peerconnection/RTCVideoTrack.h",
991 "objc/api/peerconnection/RTCVideoTrack.mm",
kthelgason5fe4d492016-12-05 19:27:30992 ]
kthelgasonebc34e72016-09-15 11:30:18993
Anders Carlsson358f2e02018-06-04 08:24:37994 configs += [
995 "..:common_objc",
996 ":used_from_extension",
997 ]
kthelgason36d658d2017-08-24 12:43:45998 public_configs = [ ":common_config_objc" ]
kthelgasonc0977102017-04-24 07:57:16999
mbonadei2c8ac1b2017-05-31 12:14:261000 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:291001 ":base_native_additions_objc",
1002 ":base_objc",
1003 ":file_logger_objc",
1004 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221005 ":mediaconstraints_objc",
Anders Carlsson9823ee42018-03-07 09:32:031006 ":mediasource_objc",
Anders Carlsson3ff50fb2018-02-01 14:47:051007 ":native_api",
1008 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221009 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 09:32:031010 ":videorendereradapter_objc",
1011 ":videosource_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:291012 ":videotoolbox_objc",
Mirko Bonadeie51f7852017-12-06 10:23:191013 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 12:30:411014 "../api:media_stream_interface",
Niels Möller695cf6a2019-05-13 10:27:231015 "../api:rtc_event_log_output_file",
Peter Hanspersbed86042019-02-21 16:27:091016 "../api:rtc_stats_api",
Niels Möller6dcd4dc2019-08-26 08:45:281017 "../api:rtp_parameters",
Mirko Bonadeid9708072019-01-25 19:26:481018 "../api:scoped_refptr",
Jiawei Ouae810c12018-06-20 23:18:591019 "../api/audio_codecs:audio_codecs_api",
Karl Wiberg5817d3d2018-04-06 08:06:421020 "../api/audio_codecs:builtin_audio_decoder_factory",
Jiawei Ouae810c12018-06-20 23:18:591021 "../api/audio_codecs:builtin_audio_encoder_factory",
Mirko Bonadeieaaaf412019-09-13 12:42:151022 "../api/crypto:frame_decryptor_interface",
1023 "../api/crypto:frame_encryptor_interface",
Danil Chapovalov4ba04b72019-06-26 13:49:471024 "../api/rtc_event_log:rtc_event_log_factory",
Danil Chapovalovaaa11432019-05-17 11:20:141025 "../api/task_queue:default_task_queue_factory",
Erik Språngceb44952020-09-22 09:36:351026 "../api/transport:field_trial_based_config",
Niels Möllerc6ce9c52018-05-11 09:15:301027 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 10:59:381028 "../api/video:video_rtp_headers",
Anders Carlsson7e042812017-10-05 14:55:381029 "../api/video_codecs:video_codecs_api",
Anders Carlssone5960ce2017-06-22 13:26:301030 "../common_video",
mbonadei2c8ac1b2017-05-31 12:14:261031 "../media:rtc_media_base",
Jiawei Ouae810c12018-06-20 23:18:591032 "../modules/audio_device:audio_device_api",
Artem Titov94b57c02019-03-21 12:35:101033 "../modules/audio_processing",
Alessio Bazzicab768e882018-11-07 14:29:541034 "../modules/audio_processing:api",
Patrik Höglund99175c62018-01-08 10:05:101035 "../modules/video_coding:video_codec_interface",
Harald Alvestrandc1e8aeb2022-03-31 19:53:501036 "../pc:peer_connection_factory",
1037 "../pc:webrtc_sdp",
Artem Titov94b57c02019-03-21 12:35:101038 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 15:05:421039 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 13:06:301040 "../rtc_base:logging",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011041 "../rtc_base:network_constants",
Florent Castellie10a9f62022-04-04 15:04:371042 "../rtc_base:safe_conversions",
Florent Castellidd837e22022-04-04 15:16:151043 "../rtc_base:timeutils",
Harald Alvestrandc1e8aeb2022-03-31 19:53:501044 "../stats:rtc_stats",
Mirko Bonadei17f48782018-09-28 06:51:101045 "../system_wrappers:field_trial",
1046 "../system_wrappers:metrics",
mbonadei2c8ac1b2017-05-31 12:14:261047 ]
Peter Hanspers8d95e3b2018-05-15 08:22:361048
1049 if (is_ios) {
1050 deps += [ ":native_api_audio_device_module" ]
1051 }
kthelgasonebc34e72016-09-15 11:30:181052 }
Zeke Chindd0e1e02016-10-11 20:27:261053
mbonadei2c8ac1b2017-05-31 12:14:261054 if (rtc_include_tests) {
Daniela012b56b2017-11-15 12:15:241055 if (is_ios) {
Mirko Bonadei86d053c2019-10-17 19:32:041056 rtc_library("sdk_unittests_sources") {
Danielaae012cf2017-10-12 11:46:001057 testonly = true
Anders Carlsson7bca8ca2018-08-30 07:30:291058 include_dirs = [ "objc/" ]
Daniela012b56b2017-11-15 12:15:241059
Danielaae012cf2017-10-12 11:46:001060 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:291061 "objc/unittests/ObjCVideoTrackSource_xctest.mm",
1062 "objc/unittests/RTCCVPixelBuffer_xctest.mm",
1063 "objc/unittests/RTCCallbackLogger_xctest.m",
Kári Tristan Helgasonecbdbf62020-02-20 15:34:451064 "objc/unittests/RTCEncodedImage_xctest.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:291065 "objc/unittests/RTCFileVideoCapturer_xctest.mm",
1066 "objc/unittests/RTCH264ProfileLevelId_xctest.m",
Jake Brombergfb7fd242021-06-14 20:44:251067 "objc/unittests/RTCMTLVideoView_xctest.m",
Aaron Goldenfb4e9bc2019-01-04 20:03:311068 "objc/unittests/RTCNV12TextureCache_xctest.m",
Anders Carlsson7bca8ca2018-08-30 07:30:291069 "objc/unittests/RTCPeerConnectionFactory_xctest.m",
1070 "objc/unittests/frame_buffer_helpers.h",
1071 "objc/unittests/frame_buffer_helpers.mm",
Artem Titarenko42b43152018-10-29 17:18:091072 "objc/unittests/nalu_rewriter_xctest.mm",
Danielaae012cf2017-10-12 11:46:001073 ]
Daniela012b56b2017-11-15 12:15:241074
Mirko Bonadei6b09c452021-07-05 14:47:491075 # TODO(bugs.webrtc.org/12937): Remove OpenGL deprecation warning
1076 # workaround.
1077 defines = [ "GLES_SILENCE_DEPRECATION" ]
1078
Peter Hanspers8d95e3b2018-05-15 08:22:361079 # TODO(peterhanspers): Reenable these tests on simulator.
1080 # See bugs.webrtc.org/7812
Lahiru Ginnaliya Gamathige1d0e7b62020-10-20 09:43:021081 if (target_environment != "simulator") {
Peter Hanspers8d95e3b2018-05-15 08:22:361082 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",
Kári Tristan Helgasonecbdbf62020-02-20 15:34:451091 ":base_native_additions_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:291092 ":base_objc",
1093 ":callback_logger_objc",
Anders Carlssondc6b4772018-01-15 12:31:031094 ":framework_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:291095 ":mediaconstraints_objc",
Jake Brombergfb7fd242021-06-14 20:44:251096 ":metal_objc",
Anders Carlssonfe9d8172018-04-03 09:40:391097 ":native_api",
Peter Hanspers8d95e3b2018-05-15 08:22:361098 ":native_api_audio_device_module",
Anders Carlssonfe9d8172018-04-03 09:40:391099 ":native_video",
Anders Carlsson7bca8ca2018-08-30 07:30:291100 ":peerconnectionfactory_base_objc",
Artem Titarenko42b43152018-10-29 17:18:091101 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221102 ":videocapture_objc",
Anders Carlsson79ce8202018-06-01 10:51:091103 ":videocodec_objc",
Anders Carlssonfe9d8172018-04-03 09:40:391104 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 09:32:031105 ":videosource_objc",
Danielaae012cf2017-10-12 11:46:001106 ":videotoolbox_objc",
Mirko Bonadeid9708072019-01-25 19:26:481107 "../api:scoped_refptr",
Byoungchan Lee43bd7602019-10-08 14:58:411108 "../api/task_queue:default_task_queue_factory",
Ilya Nikolaevskiy38e9b062020-10-08 14:36:331109 "../api/video:video_frame",
Artem Titov94b57c02019-03-21 12:35:101110 "../common_video",
Danielaae012cf2017-10-12 11:46:001111 "../media:rtc_media_base",
Anders Carlssonfe9d8172018-04-03 09:40:391112 "../media:rtc_media_tests_utils",
Artem Titov94b57c02019-03-21 12:35:101113 "../rtc_base",
Mirko Bonadeie3abb812018-11-23 12:15:081114 "../rtc_base:gunit_helpers",
Florent Castelli4467ad72022-04-04 13:18:461115 "../rtc_base:macromagic",
Florent Castellif86f6f92022-04-05 00:54:121116 "../rtc_base:refcount",
Byoungchan Lee83ceb902021-11-16 02:31:571117 "../rtc_base/system:unused",
Artem Titov94b57c02019-03-21 12:35:101118 "../system_wrappers",
Anders Carlssonfe9d8172018-04-03 09:40:391119 "//third_party/libyuv",
Danielaae012cf2017-10-12 11:46:001120 ]
Kári Tristan Helgason99bf77c2018-02-16 09:49:221121
Jordan Rose53d3fc92021-07-06 19:16:411122 if (rtc_ios_macos_use_opengl_rendering) {
1123 deps += [ ":opengl_objc" ]
1124 }
1125
Danielaae012cf2017-10-12 11:46:001126 public_deps = [
1127 "//build/config/ios:xctest",
1128 "//third_party/ocmock",
1129 ]
1130 }
1131
Daniela012b56b2017-11-15 12:15:241132 bundle_data("sdk_unittests_bundle_data") {
Daniela012b56b2017-11-15 12:15:241133 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:291134 "objc/unittests/audio_short16.pcm",
1135 "objc/unittests/audio_short44.pcm",
1136 "objc/unittests/audio_short48.pcm",
Peter Hanspers8d95e3b2018-05-15 08:22:361137
1138 # Sample video taken from https://media.xiph.org/video/derf/
Anders Carlsson7bca8ca2018-08-30 07:30:291139 "objc/unittests/foreman.mp4",
Daniela012b56b2017-11-15 12:15:241140 ]
Danil Chapovalov64f1f3f2020-01-16 13:41:101141 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
Daniela012b56b2017-11-15 12:15:241142 }
1143
Anders Carlsson7bca8ca2018-08-30 07:30:291144 # These tests use static linking.
Mirko Bonadeiaef8a212020-09-16 13:09:531145 rtc_test("sdk_unittests") {
1146 is_xctest = true
Danielaae012cf2017-10-12 11:46:001147 info_plist = "//test/ios/Info.plist"
Danil Chapovalov64f1f3f2020-01-16 13:41:101148 sources = [ "objc/unittests/main.mm" ]
Daniela012b56b2017-11-15 12:15:241149
Artem Titarenkoa2bc3622019-08-19 12:24:001150 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=generic-unit-test" ]
Danielaae012cf2017-10-12 11:46:001151 deps = [
Yura Yaroshevich5297bd22018-06-19 09:51:511152 ":peerconnectionfactory_base_objc",
Daniela012b56b2017-11-15 12:15:241153 ":sdk_unittests_bundle_data",
Danielaae012cf2017-10-12 11:46:001154 ":sdk_unittests_sources",
Niels Möller5a8f8602019-06-12 09:30:591155 "../rtc_base",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011156 "../rtc_base:threading",
Artem Titarenko34fc3462018-11-06 11:29:291157 "//test:test_support",
Danielaae012cf2017-10-12 11:46:001158 ]
1159 ldflags = [ "-all_load" ]
1160 }
Anders Carlsson7bca8ca2018-08-30 07:30:291161
1162 # These tests link to the framework.
Mirko Bonadeiaef8a212020-09-16 13:09:531163 rtc_test("sdk_framework_unittests") {
1164 is_xctest = true
Anders Carlsson7bca8ca2018-08-30 07:30:291165 info_plist = "//test/ios/Info.plist"
1166 sources = [
1167 "objc/unittests/RTCDoNotPutCPlusPlusInFrameworkHeaders_xctest.m",
Artem Titarenko34fc3462018-11-06 11:29:291168 "objc/unittests/main.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:291169 ]
1170
Artem Titarenkoa2bc3622019-08-19 12:24:001171 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=generic-unit-test" ]
Anders Carlsson7bca8ca2018-08-30 07:30:291172 deps = [
1173 ":framework_objc+link",
1174 ":ios_framework_bundle",
Niels Möller5a8f8602019-06-12 09:30:591175 "../rtc_base",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011176 "../rtc_base:threading",
Artem Titarenko34fc3462018-11-06 11:29:291177 "//test:test_support",
Anders Carlsson7bca8ca2018-08-30 07:30:291178 ]
1179 }
Danielaae012cf2017-10-12 11:46:001180 }
1181
1182 # TODO(denicija): once all tests are migrated to xctest remove this source set.
Mirko Bonadei86d053c2019-10-17 19:32:041183 rtc_library("rtc_unittests_objc") {
mbonadei2c8ac1b2017-05-31 12:14:261184 testonly = true
Kári Tristan Helgasoncbe74352016-11-09 09:43:261185
mbonadei2c8ac1b2017-05-31 12:14:261186 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:291187 "objc/unittests/RTCCertificateTest.mm",
1188 "objc/unittests/RTCConfigurationTest.mm",
1189 "objc/unittests/RTCDataChannelConfigurationTest.mm",
1190 "objc/unittests/RTCIceCandidateTest.mm",
1191 "objc/unittests/RTCIceServerTest.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:291192 "objc/unittests/RTCMediaConstraintsTest.mm",
1193 "objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm",
1194 "objc/unittests/RTCPeerConnectionTest.mm",
1195 "objc/unittests/RTCSessionDescriptionTest.mm",
1196 "objc/unittests/RTCTracingTest.mm",
1197 "objc/unittests/objc_video_decoder_factory_tests.mm",
1198 "objc/unittests/objc_video_encoder_factory_tests.mm",
1199 "objc/unittests/scoped_cftyperef_tests.mm",
mbonadei2c8ac1b2017-05-31 12:14:261200 ]
Anders Carlssone7dd83f2018-01-19 10:28:441201 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 07:30:291202 sources += [ "objc/unittests/RTCCameraVideoCapturerTests.mm" ]
oprypin45197522017-06-22 08:47:201203 }
mbonadeid7620582017-05-30 08:50:351204
mbonadei2c8ac1b2017-05-31 12:14:261205 # |-ObjC| flag needed to make sure category method implementations
1206 # are included:
1207 # https://developer.apple.com/library/mac/qa/qa1490/_index.html
1208 ldflags = [ "-ObjC" ]
magjed3149e092017-05-08 12:32:051209
mbonadei2c8ac1b2017-05-31 12:14:261210 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:291211 ":base_objc",
1212 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221213 ":mediaconstraints_objc",
1214 ":native_api",
Anders Carlsson3ff50fb2018-02-01 14:47:051215 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221216 ":peerconnectionfactory_base_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221217 ":videocapture_objc",
1218 ":videocodec_objc",
1219 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 09:32:031220 ":videosource_objc",
kthelgason36d658d2017-08-24 12:43:451221 ":videotoolbox_objc",
Piotr (Peter) Slatalae0c2e972018-10-08 16:43:211222 "../api:libjingle_peerconnection_api",
Jiawei Ouae810c12018-06-20 23:18:591223 "../api/audio_codecs:audio_codecs_api",
1224 "../api/audio_codecs:builtin_audio_decoder_factory",
1225 "../api/audio_codecs:builtin_audio_encoder_factory",
Magnus Jedvert8b4e92d2018-04-13 13:36:431226 "../api/video_codecs:video_codecs_api",
kthelgasonebd4f792017-09-04 11:36:211227 "../media:rtc_media_base",
Jiawei Ouae810c12018-06-20 23:18:591228 "../modules/audio_device:audio_device_api",
Artem Titov94b57c02019-03-21 12:35:101229 "../modules/audio_processing",
Alessio Bazzicab768e882018-11-07 14:29:541230 "../modules/audio_processing:api",
Patrik Höglund99175c62018-01-08 10:05:101231 "../modules/video_coding:video_codec_interface",
Mirko Bonadeie3abb812018-11-23 12:15:081232 "../rtc_base:gunit_helpers",
Byoungchan Lee0a54e7a2021-09-06 13:32:521233 "../rtc_base:rtc_event",
Niels Möllera12c42a2018-07-25 14:05:481234 "../rtc_base/system:unused",
Yves Gerey21cddff2018-10-30 20:12:421235 "../test:test_support",
mbonadei2c8ac1b2017-05-31 12:14:261236 "//third_party/ocmock",
1237 ]
magjed3149e092017-05-08 12:32:051238
denicija59ee91b2017-06-05 12:48:471239 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 07:30:291240 sources += [ "objc/unittests/RTCAudioSessionTest.mm" ]
Joe Chen0b3a6e32019-12-27 07:01:421241 deps += [ ":audio_session_objc" ]
mbonadei2c8ac1b2017-05-31 12:14:261242 }
mbonadei2c8ac1b2017-05-31 12:14:261243 }
kthelgason2f088792017-05-30 08:48:471244 }
1245
mbonadei2c8ac1b2017-05-31 12:14:261246 if (is_ios) {
Byoungchan Lee26b23b82022-04-08 09:23:141247 apple_framework_bundle_with_umbrella_header("framework_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:291248 info_plist = "objc/Info.plist"
mbonadei2c8ac1b2017-05-31 12:14:261249 output_name = "WebRTC"
Magnus Jedvertf83dc8b2017-08-29 09:49:431250
mbonadei2c8ac1b2017-05-31 12:14:261251 common_objc_headers = [
Anders Carlsson7bca8ca2018-08-30 07:30:291252 "objc/base/RTCCodecSpecificInfo.h",
1253 "objc/base/RTCEncodedImage.h",
Anders Carlsson4e5af962018-09-03 12:44:501254 "objc/base/RTCI420Buffer.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291255 "objc/base/RTCLogging.h",
1256 "objc/base/RTCMacros.h",
Anders Carlsson4e5af962018-09-03 12:44:501257 "objc/base/RTCMutableI420Buffer.h",
1258 "objc/base/RTCMutableYUVPlanarBuffer.h",
Yury Yaroshevich19a6e942022-03-11 08:22:081259 "objc/base/RTCSSLCertificateVerifier.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291260 "objc/base/RTCVideoCapturer.h",
1261 "objc/base/RTCVideoCodecInfo.h",
1262 "objc/base/RTCVideoDecoder.h",
1263 "objc/base/RTCVideoDecoderFactory.h",
1264 "objc/base/RTCVideoEncoder.h",
1265 "objc/base/RTCVideoEncoderFactory.h",
1266 "objc/base/RTCVideoEncoderQpThresholds.h",
1267 "objc/base/RTCVideoEncoderSettings.h",
1268 "objc/base/RTCVideoFrame.h",
1269 "objc/base/RTCVideoFrameBuffer.h",
1270 "objc/base/RTCVideoRenderer.h",
Anders Carlsson4e5af962018-09-03 12:44:501271 "objc/base/RTCYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291272 "objc/components/audio/RTCAudioSession.h",
1273 "objc/components/audio/RTCAudioSessionConfiguration.h",
1274 "objc/components/capturer/RTCCameraVideoCapturer.h",
1275 "objc/components/capturer/RTCFileVideoCapturer.h",
Taylor Brandstetterea7fbfb2020-08-19 23:41:541276 "objc/components/network/RTCNetworkMonitor.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291277 "objc/components/renderer/metal/RTCMTLVideoView.h",
1278 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
1279 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1280 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1281 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1282 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1283 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1284 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1285 "objc/components/video_codec/RTCVideoDecoderH264.h",
1286 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1287 "objc/components/video_codec/RTCVideoEncoderH264.h",
1288 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1289 "objc/helpers/RTCCameraPreviewView.h",
1290 "objc/helpers/RTCDispatcher.h",
1291 "objc/helpers/UIDevice+RTCDevice.h",
1292 "objc/api/peerconnection/RTCAudioSource.h",
1293 "objc/api/peerconnection/RTCAudioTrack.h",
1294 "objc/api/peerconnection/RTCConfiguration.h",
1295 "objc/api/peerconnection/RTCDataChannel.h",
1296 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1297 "objc/api/peerconnection/RTCFieldTrials.h",
1298 "objc/api/peerconnection/RTCIceCandidate.h",
Jaehyun Kod2110982021-11-30 10:01:431299 "objc/api/peerconnection/RTCIceCandidateErrorEvent.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291300 "objc/api/peerconnection/RTCIceServer.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291301 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1302 "objc/api/peerconnection/RTCMediaConstraints.h",
1303 "objc/api/peerconnection/RTCMediaSource.h",
1304 "objc/api/peerconnection/RTCMediaStream.h",
1305 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1306 "objc/api/peerconnection/RTCMetrics.h",
1307 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1308 "objc/api/peerconnection/RTCPeerConnection.h",
1309 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1310 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1311 "objc/api/peerconnection/RTCRtcpParameters.h",
1312 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1313 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1314 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1315 "objc/api/peerconnection/RTCRtpParameters.h",
1316 "objc/api/peerconnection/RTCRtpReceiver.h",
1317 "objc/api/peerconnection/RTCRtpSender.h",
1318 "objc/api/peerconnection/RTCRtpTransceiver.h",
1319 "objc/api/peerconnection/RTCDtmfSender.h",
1320 "objc/api/peerconnection/RTCSSLAdapter.h",
1321 "objc/api/peerconnection/RTCSessionDescription.h",
CZ Theng682dabd2019-10-21 03:25:181322 "objc/api/peerconnection/RTCStatisticsReport.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291323 "objc/api/peerconnection/RTCTracing.h",
1324 "objc/api/peerconnection/RTCCertificate.h",
Benjamin Wright8c27cca2018-10-25 17:16:441325 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291326 "objc/api/peerconnection/RTCVideoSource.h",
1327 "objc/api/peerconnection/RTCVideoTrack.h",
Anders Carlsson4e5af962018-09-03 12:44:501328 "objc/api/video_codec/RTCVideoCodecConstants.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291329 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1330 "objc/api/video_codec/RTCVideoDecoderVP9.h",
Yura Yaroshevich8cfb2872021-03-03 09:29:421331 "objc/api/video_codec/RTCVideoDecoderAV1.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291332 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1333 "objc/api/video_codec/RTCVideoEncoderVP9.h",
Yura Yaroshevich8cfb2872021-03-03 09:29:421334 "objc/api/video_codec/RTCVideoEncoderAV1.h",
Anders Carlsson4e5af962018-09-03 12:44:501335 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1336 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
mbonadei2c8ac1b2017-05-31 12:14:261337 ]
Magnus Jedvert8b4e92d2018-04-13 13:36:431338
mbonadei2c8ac1b2017-05-31 12:14:261339 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 09:49:221340 common_objc_headers += [
Anders Carlsson7bca8ca2018-08-30 07:30:291341 "objc/api/logging/RTCCallbackLogger.h",
1342 "objc/api/peerconnection/RTCFileLogger.h",
Anders Carlsson3b3364e2018-01-30 14:46:131343 ]
mbonadei2c8ac1b2017-05-31 12:14:261344 }
Kári Tristan Helgasoncbe74352016-11-09 09:43:261345
Kári Tristan Helgason99bf77c2018-02-16 09:49:221346 sources = common_objc_headers
1347 public_headers = common_objc_headers
1348
mbonadei2c8ac1b2017-05-31 12:14:261349 ldflags = [
1350 "-all_load",
1351 "-install_name",
1352 "@rpath/$output_name.framework/$output_name",
1353 ]
Kári Tristan Helgasoncbe74352016-11-09 09:43:261354
mbonadei2c8ac1b2017-05-31 12:14:261355 deps = [
kthelgason36d658d2017-08-24 12:43:451356 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:291357 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221358 ":default_codec_factory_objc",
Mirko Bonadei91d39752022-01-19 07:43:171359 ":metal_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221360 ":native_api",
1361 ":native_video",
1362 ":peerconnectionfactory_base_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221363 ":videocapture_objc",
1364 ":videocodec_objc",
1365 ":videotoolbox_objc",
ehmaldonadof6a861a2017-07-19 17:40:471366 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 12:14:261367 ]
Jordan Rose53d3fc92021-07-06 19:16:411368 if (rtc_ios_macos_use_opengl_rendering) {
1369 deps += [ ":opengl_ui_objc" ]
1370 }
Anders Carlsson7bca8ca2018-08-30 07:30:291371 if (!build_with_chromium) {
1372 deps += [
1373 ":callback_logger_objc",
1374 ":file_logger_objc",
1375 ]
1376 }
Kári Tristan Helgasoncbe74352016-11-09 09:43:261377
Sylvain Defresnec7f0dff2020-07-03 08:19:301378 frameworks = [
mbonadei2c8ac1b2017-05-31 12:14:261379 "AVFoundation.framework",
1380 "CoreGraphics.framework",
1381 "CoreMedia.framework",
mbonadei2c8ac1b2017-05-31 12:14:261382 ]
1383
Byoungchan Lee26b23b82022-04-08 09:23:141384 configs = [
Anders Carlsson358f2e02018-06-04 08:24:371385 "..:common_objc",
1386 ":used_from_extension",
1387 ]
mbonadei2c8ac1b2017-05-31 12:14:261388
kthelgason36d658d2017-08-24 12:43:451389 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 12:14:261390 }
Anders Carlsson7bca8ca2018-08-30 07:30:291391
1392 bundle_data("ios_framework_bundle") {
Danil Chapovalov64f1f3f2020-01-16 13:41:101393 deps = [ "../sdk:framework_objc" ]
1394 sources = [ "$root_build_dir/WebRTC.framework" ]
1395 outputs = [ "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}" ]
Anders Carlsson7bca8ca2018-08-30 07:30:291396 }
1397 }
1398
1399 if (is_mac) {
Byoungchan Lee26b23b82022-04-08 09:23:141400 apple_framework_bundle_with_umbrella_header("mac_framework_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:291401 info_plist = "objc/Info.plist"
1402 output_name = "WebRTC"
Anders Carlsson7bca8ca2018-08-30 07:30:291403
Anders Carlsson37bbf792018-09-05 14:29:271404 sources = [
1405 "objc/api/peerconnection/RTCAudioSource.h",
1406 "objc/api/peerconnection/RTCAudioTrack.h",
1407 "objc/api/peerconnection/RTCCertificate.h",
1408 "objc/api/peerconnection/RTCConfiguration.h",
Benjamin Wright8c27cca2018-10-25 17:16:441409 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson37bbf792018-09-05 14:29:271410 "objc/api/peerconnection/RTCDataChannel.h",
1411 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1412 "objc/api/peerconnection/RTCDtmfSender.h",
1413 "objc/api/peerconnection/RTCFieldTrials.h",
1414 "objc/api/peerconnection/RTCIceCandidate.h",
Jaehyun Kod2110982021-11-30 10:01:431415 "objc/api/peerconnection/RTCIceCandidateErrorEvent.h",
Anders Carlsson37bbf792018-09-05 14:29:271416 "objc/api/peerconnection/RTCIceServer.h",
Anders Carlsson37bbf792018-09-05 14:29:271417 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1418 "objc/api/peerconnection/RTCMediaConstraints.h",
1419 "objc/api/peerconnection/RTCMediaSource.h",
1420 "objc/api/peerconnection/RTCMediaStream.h",
1421 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1422 "objc/api/peerconnection/RTCMetrics.h",
1423 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1424 "objc/api/peerconnection/RTCPeerConnection.h",
1425 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1426 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1427 "objc/api/peerconnection/RTCRtcpParameters.h",
1428 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1429 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1430 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1431 "objc/api/peerconnection/RTCRtpParameters.h",
1432 "objc/api/peerconnection/RTCRtpReceiver.h",
1433 "objc/api/peerconnection/RTCRtpSender.h",
1434 "objc/api/peerconnection/RTCRtpTransceiver.h",
1435 "objc/api/peerconnection/RTCSSLAdapter.h",
1436 "objc/api/peerconnection/RTCSessionDescription.h",
Saúl Ibarra Corretgéf7aa2672021-07-28 21:09:141437 "objc/api/peerconnection/RTCStatisticsReport.h",
Anders Carlsson37bbf792018-09-05 14:29:271438 "objc/api/peerconnection/RTCTracing.h",
1439 "objc/api/peerconnection/RTCVideoSource.h",
1440 "objc/api/peerconnection/RTCVideoTrack.h",
Yura Yaroshevich8cfb2872021-03-03 09:29:421441 "objc/api/video_codec/RTCVideoDecoderAV1.h",
Anders Carlsson37bbf792018-09-05 14:29:271442 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1443 "objc/api/video_codec/RTCVideoDecoderVP9.h",
Yura Yaroshevich8cfb2872021-03-03 09:29:421444 "objc/api/video_codec/RTCVideoEncoderAV1.h",
Anders Carlsson37bbf792018-09-05 14:29:271445 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1446 "objc/api/video_codec/RTCVideoEncoderVP9.h",
1447 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1448 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
1449 "objc/base/RTCCodecSpecificInfo.h",
1450 "objc/base/RTCEncodedImage.h",
1451 "objc/base/RTCI420Buffer.h",
1452 "objc/base/RTCLogging.h",
1453 "objc/base/RTCMacros.h",
1454 "objc/base/RTCMutableI420Buffer.h",
1455 "objc/base/RTCMutableYUVPlanarBuffer.h",
Yury Yaroshevich19a6e942022-03-11 08:22:081456 "objc/base/RTCSSLCertificateVerifier.h",
Anders Carlsson37bbf792018-09-05 14:29:271457 "objc/base/RTCVideoCapturer.h",
1458 "objc/base/RTCVideoCodecInfo.h",
1459 "objc/base/RTCVideoDecoder.h",
1460 "objc/base/RTCVideoDecoderFactory.h",
1461 "objc/base/RTCVideoEncoder.h",
1462 "objc/base/RTCVideoEncoderFactory.h",
1463 "objc/base/RTCVideoEncoderQpThresholds.h",
1464 "objc/base/RTCVideoEncoderSettings.h",
1465 "objc/base/RTCVideoFrame.h",
1466 "objc/base/RTCVideoFrameBuffer.h",
1467 "objc/base/RTCVideoRenderer.h",
1468 "objc/base/RTCYUVPlanarBuffer.h",
1469 "objc/components/capturer/RTCCameraVideoCapturer.h",
1470 "objc/components/capturer/RTCFileVideoCapturer.h",
1471 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
1472 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
1473 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1474 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1475 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1476 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1477 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1478 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1479 "objc/components/video_codec/RTCVideoDecoderH264.h",
1480 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1481 "objc/components/video_codec/RTCVideoEncoderH264.h",
1482 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1483 "objc/helpers/RTCDispatcher.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291484 ]
Anders Carlsson37bbf792018-09-05 14:29:271485 if (!build_with_chromium) {
1486 sources += [
1487 "objc/api/logging/RTCCallbackLogger.h",
1488 "objc/api/peerconnection/RTCFileLogger.h",
1489 ]
1490 }
Anders Carlsson7bca8ca2018-08-30 07:30:291491
1492 deps = [
1493 ":base_objc",
1494 ":default_codec_factory_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:291495 ":native_api",
1496 ":native_video",
Jordan Rose53d3fc92021-07-06 19:16:411497 ":opengl_ui_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:291498 ":peerconnectionfactory_base_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:291499 ":videocapture_objc",
1500 ":videocodec_objc",
1501 ":videotoolbox_objc",
1502 "../rtc_base:rtc_base_approved",
Anders Carlsson7bca8ca2018-08-30 07:30:291503 ]
Anders Carlsson7bca8ca2018-08-30 07:30:291504 if (!build_with_chromium) {
1505 deps += [
1506 ":callback_logger_objc",
1507 ":file_logger_objc",
1508 ]
1509 }
1510
Sylvain Defresnec7f0dff2020-07-03 08:19:301511 frameworks = [
Anders Carlsson7bca8ca2018-08-30 07:30:291512 "AVFoundation.framework",
1513 "CoreGraphics.framework",
1514 "CoreMedia.framework",
1515 "OpenGL.framework",
1516 ]
1517
Anders Carlsson37bbf792018-09-05 14:29:271518 configs = [ "..:common_objc" ]
Anders Carlsson7bca8ca2018-08-30 07:30:291519
1520 public_configs = [ ":common_config_objc" ]
1521 }
1522
1523 bundle_data("mac_framework_bundle") {
Danil Chapovalov64f1f3f2020-01-16 13:41:101524 deps = [ "../sdk:mac_framework_objc" ]
1525 sources = [ "$root_build_dir/WebRTC.framework" ]
1526 outputs = [ "{{bundle_contents_dir}}/Frameworks/{{source_file_part}}" ]
Anders Carlsson7bca8ca2018-08-30 07:30:291527 }
Kári Tristan Helgasoncbe74352016-11-09 09:43:261528 }
1529
Mirko Bonadei86d053c2019-10-17 19:32:041530 rtc_library("wrapped_native_codec_objc") {
Anders Carlsson9823ee42018-03-07 09:32:031531 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:291532 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.h",
1533 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm",
1534 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.h",
1535 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm",
Anders Carlsson9823ee42018-03-07 09:32:031536 ]
1537
1538 configs += [ "..:common_objc" ]
1539 public_configs = [ ":common_config_objc" ]
1540
Anders Carlsson9823ee42018-03-07 09:32:031541 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:291542 ":base_objc",
1543 ":helpers_objc",
Anders Carlsson9823ee42018-03-07 09:32:031544 "../api/video_codecs:video_codecs_api",
1545 "../media:rtc_media_base",
1546 ]
1547 }
1548
Anders Carlsson3ff50fb2018-02-01 14:47:051549 # The native API is currently experimental and may change without notice.
Mirko Bonadei86d053c2019-10-17 19:32:041550 rtc_library("native_api") {
Anders Carlsson3ff50fb2018-02-01 14:47:051551 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 13:23:231552 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Anders Carlsson3ff50fb2018-02-01 14:47:051553 sources = [
Taylor Brandstetterea7fbfb2020-08-19 23:41:541554 "objc/native/api/network_monitor_factory.h",
1555 "objc/native/api/network_monitor_factory.mm",
Yury Yaroshevich19a6e942022-03-11 08:22:081556 "objc/native/api/ssl_certificate_verifier.h",
1557 "objc/native/api/ssl_certificate_verifier.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:291558 "objc/native/api/video_capturer.h",
1559 "objc/native/api/video_capturer.mm",
1560 "objc/native/api/video_decoder_factory.h",
1561 "objc/native/api/video_decoder_factory.mm",
1562 "objc/native/api/video_encoder_factory.h",
1563 "objc/native/api/video_encoder_factory.mm",
1564 "objc/native/api/video_frame.h",
1565 "objc/native/api/video_frame.mm",
1566 "objc/native/api/video_frame_buffer.h",
1567 "objc/native/api/video_frame_buffer.mm",
1568 "objc/native/api/video_renderer.h",
1569 "objc/native/api/video_renderer.mm",
Anders Carlsson3ff50fb2018-02-01 14:47:051570 ]
1571
1572 configs += [ "..:common_objc" ]
1573
1574 public_configs = [ ":common_config_objc" ]
1575
Anders Carlsson3ff50fb2018-02-01 14:47:051576 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:291577 ":base_objc",
Anders Carlsson3ff50fb2018-02-01 14:47:051578 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221579 ":videoframebuffer_objc",
Anders Carlsson73119182018-03-15 08:41:031580 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 12:30:411581 "../api:media_stream_interface",
Mirko Bonadeid9708072019-01-25 19:26:481582 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 09:15:301583 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 10:59:381584 "../api/video:video_rtp_headers",
Anders Carlsson3ff50fb2018-02-01 14:47:051585 "../api/video_codecs:video_codecs_api",
1586 "../common_video",
Artem Titov94b57c02019-03-21 12:35:101587 "../rtc_base",
Florent Castelli0af55ba2022-04-04 13:06:301588 "../rtc_base:logging",
Florent Castellif86f6f92022-04-05 00:54:121589 "../rtc_base:refcount",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011590 "../rtc_base:threading",
Anders Carlsson3ff50fb2018-02-01 14:47:051591 ]
Taylor Brandstetterea7fbfb2020-08-19 23:41:541592 if (is_ios) {
1593 deps += [ ":native_network_monitor" ]
1594 }
Mirko Bonadei2dcf3482020-06-05 12:30:411595 absl_deps = [ "//third_party/abseil-cpp/absl/memory" ]
Anders Carlsson3ff50fb2018-02-01 14:47:051596 }
1597
Taylor Brandstetterea7fbfb2020-08-19 23:41:541598 if (is_ios) {
1599 rtc_library("native_network_monitor") {
1600 visibility = [ "*" ]
1601
1602 sources = [
1603 "objc/native/src/objc_network_monitor.h",
1604 "objc/native/src/objc_network_monitor.mm",
1605 ]
1606
1607 deps = [
1608 ":network_monitor_objc",
1609 ":network_monitor_observer",
Jonas Orelande62c2f22022-03-29 09:04:481610 "../api:field_trials_view",
Artem Titovd15a5752021-02-10 13:31:241611 "../api:sequence_checker",
Taylor Brandstetterea7fbfb2020-08-19 23:41:541612 "../rtc_base",
Florent Castelli0af55ba2022-04-04 13:06:301613 "../rtc_base:logging",
Florent Castelli4467ad72022-04-04 13:18:461614 "../rtc_base:macromagic",
Florent Castelli57aa81b2022-04-04 15:14:021615 "../rtc_base:stringutils",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011616 "../rtc_base:threading",
Niels Möllerbe140b42021-03-11 09:24:061617 "../rtc_base/task_utils:pending_task_safety_flag",
1618 "../rtc_base/task_utils:to_queued_task",
Taylor Brandstetterea7fbfb2020-08-19 23:41:541619 ]
Ali Tofigh7fa90572022-03-17 14:47:491620
1621 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
Taylor Brandstetterea7fbfb2020-08-19 23:41:541622 }
1623 }
1624
Mirko Bonadei86d053c2019-10-17 19:32:041625 rtc_library("native_video") {
Anders Carlsson3ff50fb2018-02-01 14:47:051626 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:291627 "objc/native/src/objc_frame_buffer.h",
1628 "objc/native/src/objc_frame_buffer.mm",
1629 "objc/native/src/objc_video_decoder_factory.h",
1630 "objc/native/src/objc_video_decoder_factory.mm",
1631 "objc/native/src/objc_video_encoder_factory.h",
1632 "objc/native/src/objc_video_encoder_factory.mm",
1633 "objc/native/src/objc_video_frame.h",
1634 "objc/native/src/objc_video_frame.mm",
1635 "objc/native/src/objc_video_renderer.h",
1636 "objc/native/src/objc_video_renderer.mm",
1637 "objc/native/src/objc_video_track_source.h",
1638 "objc/native/src/objc_video_track_source.mm",
Anders Carlsson3ff50fb2018-02-01 14:47:051639 ]
1640
1641 configs += [ "..:common_objc" ]
1642
1643 public_configs = [ ":common_config_objc" ]
1644
Anders Carlsson3ff50fb2018-02-01 14:47:051645 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:291646 ":base_native_additions_objc",
1647 ":base_objc",
1648 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221649 ":videocodec_objc",
1650 ":videoframebuffer_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:291651 ":vpx_codec_constants",
Anders Carlsson9823ee42018-03-07 09:32:031652 ":wrapped_native_codec_objc",
Niels Möllerc6ce9c52018-05-11 09:15:301653 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 10:59:381654 "../api/video:video_rtp_headers",
Anders Carlsson3ff50fb2018-02-01 14:47:051655 "../api/video_codecs:video_codecs_api",
1656 "../common_video",
1657 "../media:rtc_audio_video",
1658 "../media:rtc_media_base",
Anders Carlsson3ff50fb2018-02-01 14:47:051659 "../modules/video_coding:video_codec_interface",
Artem Titov94b57c02019-03-21 12:35:101660 "../rtc_base",
Anders Carlsson3ff50fb2018-02-01 14:47:051661 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 13:06:301662 "../rtc_base:logging",
Florent Castellib1dc4e42022-04-14 11:20:121663 "../rtc_base:timestamp_aligner",
Florent Castellidd837e22022-04-04 15:16:151664 "../rtc_base:timeutils",
Anders Carlsson3ff50fb2018-02-01 14:47:051665 ]
1666 }
1667
Mirko Bonadei86d053c2019-10-17 19:32:041668 rtc_library("video_toolbox_cc") {
Artem Titarenko42b43152018-10-29 17:18:091669 visibility = [
Mirko Bonadei08574ae2020-09-16 07:22:571670 ":sdk_unittests_sources",
Mirko Bonadeiaef8a212020-09-16 13:09:531671 ":videotoolbox_objc",
Artem Titarenko42b43152018-10-29 17:18:091672 ]
mbonadei2c8ac1b2017-05-31 12:14:261673 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:291674 "objc/components/video_codec/helpers.cc",
1675 "objc/components/video_codec/helpers.h",
1676 "objc/components/video_codec/nalu_rewriter.cc",
1677 "objc/components/video_codec/nalu_rewriter.h",
mbonadeic0af5ac2017-08-24 19:26:051678 ]
1679 deps = [
1680 "../common_video",
mbonadeic0af5ac2017-08-24 19:26:051681 "../modules/video_coding:webrtc_h264",
Patrik Höglunda8005cf2017-12-13 15:05:421682 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 13:06:301683 "../rtc_base:logging",
mbonadeic0af5ac2017-08-24 19:26:051684 "../rtc_base:rtc_base_approved",
1685 ]
mbonadeic0af5ac2017-08-24 19:26:051686 }
1687
Mirko Bonadei86d053c2019-10-17 19:32:041688 rtc_library("videotoolbox_objc") {
Kári Tristan Helgason99bf77c2018-02-16 09:49:221689 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 13:23:231690 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadeic0af5ac2017-08-24 19:26:051691 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:291692 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1693 "objc/components/video_codec/RTCVideoDecoderFactoryH264.m",
1694 "objc/components/video_codec/RTCVideoDecoderH264.h",
1695 "objc/components/video_codec/RTCVideoDecoderH264.mm",
1696 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1697 "objc/components/video_codec/RTCVideoEncoderFactoryH264.m",
1698 "objc/components/video_codec/RTCVideoEncoderH264.h",
1699 "objc/components/video_codec/RTCVideoEncoderH264.mm",
mbonadei2c8ac1b2017-05-31 12:14:261700 ]
1701
Anders Carlsson358f2e02018-06-04 08:24:371702 configs += [
1703 "..:common_objc",
1704 ":used_from_extension",
1705 ]
1706
1707 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
1708 defines = [ "RTC_APPRTCMOBILE_BROADCAST_EXTENSION" ]
1709 }
mbonadei2c8ac1b2017-05-31 12:14:261710
1711 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:291712 ":base_native_additions_objc",
1713 ":base_objc",
1714 ":helpers_objc",
mbonadeic0af5ac2017-08-24 19:26:051715 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221716 ":videocodec_objc",
1717 ":videoframebuffer_objc",
Johannes Kronc3fcee72021-04-19 07:09:261718 "../api/video_codecs:video_codecs_api",
mbonadei2c8ac1b2017-05-31 12:14:261719 "../common_video",
Patrik Höglund99175c62018-01-08 10:05:101720 "../modules/video_coding:video_codec_interface",
Patrik Höglunda8005cf2017-12-13 15:05:421721 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 13:06:301722 "../rtc_base:logging",
ehmaldonadof6a861a2017-07-19 17:40:471723 "../rtc_base:rtc_base_approved",
Florent Castellidd837e22022-04-04 15:16:151724 "../rtc_base:timeutils",
Mirko Bonadei401d0562017-12-14 10:24:001725 "//third_party/libyuv",
mbonadei2c8ac1b2017-05-31 12:14:261726 ]
1727
Sylvain Defresnec7f0dff2020-07-03 08:19:301728 frameworks = [
mbonadei2c8ac1b2017-05-31 12:14:261729 "CoreFoundation.framework",
1730 "CoreMedia.framework",
1731 "CoreVideo.framework",
1732 "VideoToolbox.framework",
1733 ]
Kári Tristan Helgasoncbe74352016-11-09 09:43:261734 }
1735 }
tkchin9eeb6242016-04-27 08:54:201736}