blob: c95b128c053f8cef68ddf4702e2c629cd15ac9e7 [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",
mbonadei1e060c62017-04-21 07:02:02127 ]
Anders Carlsson358f2e02018-06-04 08:24:37128 configs += [
129 "..:common_objc",
130 ":used_from_extension",
131 ]
kthelgasonc0977102017-04-24 07:57:16132
kthelgason36d658d2017-08-24 12:43:45133 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 07:30:29134 }
135
Mirko Bonadei86d053c2019-10-17 19:32:04136 rtc_library("helpers_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:29137 sources = [
138 "objc/helpers/AVCaptureSession+DevicePosition.h",
139 "objc/helpers/AVCaptureSession+DevicePosition.mm",
140 "objc/helpers/NSString+StdString.h",
141 "objc/helpers/NSString+StdString.mm",
142 "objc/helpers/RTCDispatcher+Private.h",
143 "objc/helpers/RTCDispatcher.h",
144 "objc/helpers/RTCDispatcher.m",
Anders Carlsson7bca8ca2018-08-30 07:30:29145 "objc/helpers/scoped_cftyperef.h",
146 ]
147
148 deps = [
149 ":base_objc",
150 "../rtc_base:checks",
151 ]
152
Ali Tofigh6364d082022-03-14 12:32:04153 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
154
Sylvain Defresnec7f0dff2020-07-03 08:19:30155 frameworks = [
Anders Carlsson7bca8ca2018-08-30 07:30:29156 "AVFoundation.framework",
157 "CoreMedia.framework",
158 ]
159
160 configs += [
161 "..:common_objc",
162 ":used_from_extension",
163 ]
164
165 public_configs = [ ":common_config_objc" ]
denicijad2088152017-04-28 09:14:54166
kjellander3bcedd32016-06-08 08:14:15167 if (is_ios) {
168 sources += [
Anders Carlsson7bca8ca2018-08-30 07:30:29169 "objc/helpers/RTCCameraPreviewView.h",
170 "objc/helpers/RTCCameraPreviewView.m",
171 "objc/helpers/UIDevice+RTCDevice.h",
172 "objc/helpers/UIDevice+RTCDevice.mm",
173 ]
174 }
175 }
176
177 if (!build_with_chromium) {
Mirko Bonadei86d053c2019-10-17 19:32:04178 rtc_library("callback_logger_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:29179 sources = [
180 "objc/api/logging/RTCCallbackLogger.h",
181 "objc/api/logging/RTCCallbackLogger.mm",
182 ]
183
184 deps = [
185 ":base_objc",
Ali Tofigh6364d082022-03-14 12:32:04186 ":helpers_objc",
Artem Titov94b57c02019-03-21 12:35:10187 "../rtc_base",
Anders Carlsson7bca8ca2018-08-30 07:30:29188 "../rtc_base:checks",
189 "../rtc_base:logging",
Anders Carlsson7bca8ca2018-08-30 07:30:29190 ]
191
192 configs += [
193 "..:common_objc",
194 ":used_from_extension",
kjellander3bcedd32016-06-08 08:14:15195 ]
Ali Tofigh6364d082022-03-14 12:32:04196
197 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
denicijad2088152017-04-28 09:14:54198 }
199
Mirko Bonadei86d053c2019-10-17 19:32:04200 rtc_library("file_logger_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:29201 sources = [
202 "objc/api/peerconnection/RTCFileLogger.h",
203 "objc/api/peerconnection/RTCFileLogger.mm",
204 ]
205
206 deps = [
207 ":base_objc",
Artem Titov94b57c02019-03-21 12:35:10208 "../rtc_base",
Anders Carlsson7bca8ca2018-08-30 07:30:29209 "../rtc_base:checks",
210 "../rtc_base:logging",
Anders Carlsson7bca8ca2018-08-30 07:30:29211 ]
212
213 configs += [
214 "..:common_objc",
215 ":used_from_extension",
kthelgason2f088792017-05-30 08:48:47216 ]
217 }
218 }
219
mbonadei2c8ac1b2017-05-31 12:14:26220 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 09:49:22221 if (is_ios) {
Mirko Bonadei86d053c2019-10-17 19:32:04222 rtc_library("native_api_audio_device_module") {
Peter Hanspers8d95e3b2018-05-15 08:22:36223 visibility = [ "*" ]
224
225 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29226 "objc/native/api/audio_device_module.h",
227 "objc/native/api/audio_device_module.mm",
Peter Hanspers8d95e3b2018-05-15 08:22:36228 ]
229
230 deps = [
231 ":audio_device",
232 "../modules/audio_device:audio_device_api",
233 "../modules/audio_device:audio_device_generic",
234 "../rtc_base:checks",
235 "../rtc_base:rtc_base_approved",
236 "../system_wrappers",
Peter Hanspers8d95e3b2018-05-15 08:22:36237 ]
Peter Hanspers8d95e3b2018-05-15 08:22:36238 }
239
240 rtc_source_set("audio_session_observer") {
241 visibility = [ ":*" ]
242
Danil Chapovalov64f1f3f2020-01-16 13:41:10243 sources = [ "objc/native/src/audio/audio_session_observer.h" ]
Peter Hanspers8d95e3b2018-05-15 08:22:36244
Mirko Bonadeie5f4c6b2021-01-15 09:41:01245 deps = [
246 "../rtc_base",
247 "../rtc_base:threading",
248 ]
Peter Hanspers8d95e3b2018-05-15 08:22:36249 }
250
Mirko Bonadei86d053c2019-10-17 19:32:04251 rtc_library("audio_device") {
Peter Hanspers8d95e3b2018-05-15 08:22:36252 visibility = [ "*" ]
253
254 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29255 "objc/native/src/audio/audio_device_ios.h",
256 "objc/native/src/audio/audio_device_ios.mm",
257 "objc/native/src/audio/audio_device_module_ios.h",
258 "objc/native/src/audio/audio_device_module_ios.mm",
259 "objc/native/src/audio/helpers.h",
260 "objc/native/src/audio/helpers.mm",
261 "objc/native/src/audio/voice_processing_audio_unit.h",
262 "objc/native/src/audio/voice_processing_audio_unit.mm",
Peter Hanspers8d95e3b2018-05-15 08:22:36263 ]
264
265 deps = [
266 ":audio_objc",
267 ":audio_session_observer",
Anders Carlsson7bca8ca2018-08-30 07:30:29268 ":base_objc",
Peter Hanspers8d95e3b2018-05-15 08:22:36269 "../api:array_view",
Danil Chapovalova6cb1502019-06-27 13:16:34270 "../api/task_queue",
271 "../api/task_queue:default_task_queue_factory",
Peter Hanspers8d95e3b2018-05-15 08:22:36272 "../modules/audio_device:audio_device_api",
273 "../modules/audio_device:audio_device_buffer",
274 "../modules/audio_device:audio_device_generic",
Artem Titov94b57c02019-03-21 12:35:10275 "../rtc_base",
Peter Hanspers8d95e3b2018-05-15 08:22:36276 "../rtc_base:checks",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01277 "../rtc_base:threading",
Kári Tristan Helgasonf49429d2019-03-28 10:03:27278 "../system_wrappers:field_trial",
Mirko Bonadei17f48782018-09-28 06:51:10279 "../system_wrappers:metrics",
Peter Hanspers8d95e3b2018-05-15 08:22:36280 ]
Mirko Bonadei2dcf3482020-06-05 12:30:41281 absl_deps = [ "//third_party/abseil-cpp/absl/base:core_headers" ]
Peter Hanspers8d95e3b2018-05-15 08:22:36282
Sylvain Defresnec7f0dff2020-07-03 08:19:30283 frameworks = [ "AudioToolbox.framework" ]
Peter Hanspers8d95e3b2018-05-15 08:22:36284 }
285
Joe Chen0b3a6e32019-12-27 07:01:42286 # This target exists to expose :audio_session_objc and
287 # :audio_session_delegate_adapter_objc for backward compatibility,
288 # and should be deprecated.
289 group("audio_objc") {
290 public_deps = [ # no-presubmit-check TODO(webrtc:11238)
291 ":audio_session_delegate_adapter_objc",
292 ":audio_session_objc",
293 ]
294 }
295
296 rtc_library("audio_session_delegate_adapter_objc") {
297 sources = [
298 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.h",
299 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.mm",
300 ]
301
302 configs += [
303 "..:common_objc",
304 ":used_from_extension",
305 ]
306
307 public_configs = [ ":common_config_objc" ]
308
309 deps = [
310 ":audio_session_objc",
311 ":audio_session_observer",
312 ":base_objc",
313 ]
314 }
315
316 rtc_library("audio_session_objc") {
Joe Chen3b19b272020-01-09 16:31:06317 visibility = [ "*" ]
318
Kári Tristan Helgason99bf77c2018-02-16 09:49:22319 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29320 "objc/components/audio/RTCAudioSession+Configuration.mm",
321 "objc/components/audio/RTCAudioSession+Private.h",
322 "objc/components/audio/RTCAudioSession.h",
323 "objc/components/audio/RTCAudioSession.mm",
324 "objc/components/audio/RTCAudioSessionConfiguration.h",
325 "objc/components/audio/RTCAudioSessionConfiguration.m",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22326 ]
Joe Chen0b3a6e32019-12-27 07:01:42327
Anders Carlsson358f2e02018-06-04 08:24:37328 configs += [
329 "..:common_objc",
330 ":used_from_extension",
331 ]
denicija59ee91b2017-06-05 12:48:47332
Kári Tristan Helgason99bf77c2018-02-16 09:49:22333 public_configs = [ ":common_config_objc" ]
Anders Carlsson8ecfd802017-09-15 12:07:30334
Sylvain Defresnec7f0dff2020-07-03 08:19:30335 frameworks = [ "AVFoundation.framework" ]
Jiawei Ouc9e6b962018-10-09 19:33:06336
Kári Tristan Helgason99bf77c2018-02-16 09:49:22337 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29338 ":base_objc",
339 ":helpers_objc",
Artem Titov94b57c02019-03-21 12:35:10340 "../rtc_base",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22341 "../rtc_base:checks",
342 "../rtc_base:rtc_base_approved",
Niels Möller072c0082021-02-15 15:30:44343 "../rtc_base/synchronization:mutex",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22344 ]
Byoungchan Lee0a54e7a2021-09-06 13:32:52345
346 absl_deps = [ "//third_party/abseil-cpp/absl/base:core_headers" ]
denicija59ee91b2017-06-05 12:48:47347 }
Taylor Brandstetterea7fbfb2020-08-19 23:41:54348
349 rtc_source_set("network_monitor_observer") {
350 visibility = [ ":*" ]
351
352 sources = [ "objc/native/src/network_monitor_observer.h" ]
353
Mirko Bonadeie5f4c6b2021-01-15 09:41:01354 deps = [
355 "../rtc_base",
356 "../rtc_base:network_constants",
357 "../rtc_base:threading",
358 ]
Ali Tofigh7fa90572022-03-17 14:47:49359
360 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
Taylor Brandstetterea7fbfb2020-08-19 23:41:54361 }
362
363 rtc_library("network_monitor_objc") {
364 visibility = [ "*" ]
365
366 sources = [
367 "objc/components/network/RTCNetworkMonitor+Private.h",
368 "objc/components/network/RTCNetworkMonitor.h",
369 "objc/components/network/RTCNetworkMonitor.mm",
370 ]
371
372 configs += [ ":used_from_extension" ]
373
374 frameworks = [ "Network.framework" ]
375
376 deps = [
377 ":base_objc",
378 ":helpers_objc",
379 ":network_monitor_observer",
Ali Tofigh7fa90572022-03-17 14:47:49380 "../rtc_base:stringutils",
Taylor Brandstetterea7fbfb2020-08-19 23:41:54381 "../rtc_base/system:gcd_helpers",
382 ]
383 }
denicija59ee91b2017-06-05 12:48:47384 }
zhihuanga4c113a2017-06-28 21:05:44385
Mirko Bonadei86d053c2019-10-17 19:32:04386 rtc_library("videosource_objc") {
zhihuanga4c113a2017-06-28 21:05:44387 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29388 "objc/api/peerconnection/RTCVideoSource+Private.h",
389 "objc/api/peerconnection/RTCVideoSource.h",
390 "objc/api/peerconnection/RTCVideoSource.mm",
zhihuanga4c113a2017-06-28 21:05:44391 ]
392
393 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29394 ":base_objc",
Anders Carlsson9823ee42018-03-07 09:32:03395 ":mediasource_objc",
396 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22397 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 21:05:44398 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 12:30:41399 "../api:media_stream_interface",
Niels Möllerc6ce9c52018-05-11 09:15:30400 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 10:59:38401 "../api/video:video_rtp_headers",
zhihuanga4c113a2017-06-28 21:05:44402 "../common_video",
403 "../media:rtc_media_base",
Markus Handella1b82012021-05-26 16:56:30404 "../pc:rtc_pc_base",
Harald Alvestrande5a73f52022-03-28 12:06:34405 "../pc:video_track_source_proxy",
Artem Titov94b57c02019-03-21 12:35:10406 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 15:05:42407 "../rtc_base:checks",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01408 "../rtc_base:threading",
Mirko Bonadei401d0562017-12-14 10:24:00409 "//third_party/libyuv",
zhihuanga4c113a2017-06-28 21:05:44410 ]
411
Anders Carlsson358f2e02018-06-04 08:24:37412 configs += [
413 "..:common_objc",
414 ":used_from_extension",
415 ]
zhihuanga4c113a2017-06-28 21:05:44416 }
417
Mirko Bonadei86d053c2019-10-17 19:32:04418 rtc_library("videoframebuffer_objc") {
Mirko Bonadei2ad8c432018-08-09 08:54:40419 visibility = [ "*" ]
Kári Tristan Helgason99bf77c2018-02-16 09:49:22420 sources = [
Anders Carlsson4e5af962018-09-03 12:44:50421 "objc/api/video_frame_buffer/RTCNativeI420Buffer+Private.h",
422 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
423 "objc/api/video_frame_buffer/RTCNativeI420Buffer.mm",
424 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
425 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:29426 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
427 "objc/components/video_frame_buffer/RTCCVPixelBuffer.mm",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22428 ]
429 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29430 ":base_objc",
Niels Möllerc6ce9c52018-05-11 09:15:30431 "//api/video:video_frame",
Chen Xing5d24b162019-06-10 10:59:38432 "//api/video:video_rtp_headers",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22433 "//common_video",
434 "//rtc_base:checks",
435 "//rtc_base:rtc_base_approved",
436 "//third_party/libyuv",
437 ]
Anders Carlsson358f2e02018-06-04 08:24:37438 configs += [
439 "..:common_objc",
440 ":used_from_extension",
441 ]
Sylvain Defresnec7f0dff2020-07-03 08:19:30442 frameworks = [
Kári Tristan Helgason8a1e35c2019-03-07 09:44:26443 "VideoToolbox.framework",
Oleh Prypinb3f78de2019-07-18 20:25:48444 "CoreGraphics.framework",
Kári Tristan Helgason8a1e35c2019-03-07 09:44:26445 "CoreVideo.framework",
446 ]
Kári Tristan Helgason99bf77c2018-02-16 09:49:22447 }
448
Jordan Rose53d3fc92021-07-06 19:16:41449 rtc_library("opengl_objc") {
kthelgason2f088792017-05-30 08:48:47450 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29451 "objc/components/renderer/opengl/RTCDefaultShader.h",
452 "objc/components/renderer/opengl/RTCDefaultShader.mm",
453 "objc/components/renderer/opengl/RTCI420TextureCache.h",
454 "objc/components/renderer/opengl/RTCI420TextureCache.mm",
455 "objc/components/renderer/opengl/RTCOpenGLDefines.h",
456 "objc/components/renderer/opengl/RTCShader.h",
457 "objc/components/renderer/opengl/RTCShader.mm",
458 "objc/components/renderer/opengl/RTCVideoViewShading.h",
kthelgason2f088792017-05-30 08:48:47459 ]
Sylvain Defresnec7f0dff2020-07-03 08:19:30460 frameworks = [ "CoreVideo.framework" ]
denicijad2088152017-04-28 09:14:54461 if (is_ios) {
denicija070d5e32017-02-26 19:44:13462 sources += [
Anders Carlsson7bca8ca2018-08-30 07:30:29463 "objc/components/renderer/opengl/RTCNV12TextureCache.h",
464 "objc/components/renderer/opengl/RTCNV12TextureCache.m",
mbonadei2c8ac1b2017-05-31 12:14:26465 ]
Sylvain Defresnec7f0dff2020-07-03 08:19:30466 frameworks += [
mbonadei2c8ac1b2017-05-31 12:14:26467 "GLKit.framework",
468 "OpenGLES.framework",
469 "QuartzCore.framework",
470 ]
471 } else if (is_mac) {
Sylvain Defresnec7f0dff2020-07-03 08:19:30472 frameworks += [
mbonadei2c8ac1b2017-05-31 12:14:26473 "CoreMedia.framework",
mbonadei2c8ac1b2017-05-31 12:14:26474 "OpenGL.framework",
denicija070d5e32017-02-26 19:44:13475 ]
476 }
Mirko Bonadei6b09c452021-07-05 14:47:49477
478 # TODO(bugs.webrtc.org/12937): Remove OpenGL deprecation warning
479 # workaround.
Björn Terelius02768ae2021-07-02 14:19:32480 defines = [ "GLES_SILENCE_DEPRECATION" ]
mbonadei2c8ac1b2017-05-31 12:14:26481
kthelgason2f088792017-05-30 08:48:47482 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29483 ":base_objc",
484 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22485 ":mediaconstraints_objc",
Anders Carlsson3ff50fb2018-02-01 14:47:05486 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22487 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 09:32:03488 ":videosource_objc",
mbonadei2c8ac1b2017-05-31 12:14:26489 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 09:15:30490 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 10:59:38491 "../api/video:video_rtp_headers",
mbonadei2c8ac1b2017-05-31 12:14:26492 "../common_video",
493 "../media:rtc_media_base",
Artem Titov94b57c02019-03-21 12:35:10494 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 15:05:42495 "../rtc_base:checks",
tkchin9eeb6242016-04-27 08:54:20496 ]
Mirko Bonadei2dcf3482020-06-05 12:30:41497 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
mbonadei2c8ac1b2017-05-31 12:14:26498
Anders Carlsson358f2e02018-06-04 08:24:37499 configs += [
500 "..:common_objc",
501 ":used_from_extension",
502 ]
ehmaldonadoda8dcfb2017-01-04 15:11:23503 }
ehmaldonadoda8dcfb2017-01-04 15:11:23504
Jordan Rose53d3fc92021-07-06 19:16:41505 rtc_library("opengl_ui_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53506 visibility = [ "*" ]
Jake Brombergfb7fd242021-06-14 20:44:25507 allow_poison = [
508 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
509 "default_task_queue",
510 ]
mbonadei2c8ac1b2017-05-31 12:14:26511 if (is_ios) {
512 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29513 "objc/components/renderer/opengl/RTCDisplayLinkTimer.h",
514 "objc/components/renderer/opengl/RTCDisplayLinkTimer.m",
515 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
516 "objc/components/renderer/opengl/RTCEAGLVideoView.m",
mbonadei2c8ac1b2017-05-31 12:14:26517 ]
Mirko Bonadei6b09c452021-07-05 14:47:49518
519 # TODO(bugs.webrtc.org/12937): Remove OpenGL deprecation warning
520 # workaround.
Björn Terelius02768ae2021-07-02 14:19:32521 defines = [ "GLES_SILENCE_DEPRECATION" ]
mbonadei2c8ac1b2017-05-31 12:14:26522 }
523 if (is_mac) {
524 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29525 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
526 "objc/components/renderer/opengl/RTCNSGLVideoView.m",
mbonadei2c8ac1b2017-05-31 12:14:26527 ]
528 }
529 configs += [ "..:common_objc" ]
530 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29531 ":base_objc",
532 ":helpers_objc",
Jake Brombergfb7fd242021-06-14 20:44:25533 ":metal_objc",
Jordan Rose53d3fc92021-07-06 19:16:41534 ":opengl_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22535 ":videocapture_objc",
536 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 12:14:26537 ]
538 }
kthelgasonebc34e72016-09-15 11:30:18539
Jake Brombergfb7fd242021-06-14 20:44:25540 rtc_library("metal_objc") {
541 visibility = [ "*" ]
542 allow_poison = [
543 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
544 "default_task_queue",
545 ]
546 sources = [
547 "objc/components/renderer/metal/RTCMTLI420Renderer.h",
548 "objc/components/renderer/metal/RTCMTLI420Renderer.mm",
549 "objc/components/renderer/metal/RTCMTLNV12Renderer.h",
550 "objc/components/renderer/metal/RTCMTLNV12Renderer.mm",
551 "objc/components/renderer/metal/RTCMTLRGBRenderer.h",
552 "objc/components/renderer/metal/RTCMTLRGBRenderer.mm",
553 "objc/components/renderer/metal/RTCMTLRenderer+Private.h",
554 "objc/components/renderer/metal/RTCMTLRenderer.h",
555 "objc/components/renderer/metal/RTCMTLRenderer.mm",
556 ]
557 frameworks = [
558 "CoreVideo.framework",
559 "Metal.framework",
560 "MetalKit.framework",
561 ]
562 if (is_ios) {
563 sources += [
564 "objc/components/renderer/metal/RTCMTLVideoView.h",
565 "objc/components/renderer/metal/RTCMTLVideoView.m",
Danil Chapovalov41300af2019-07-10 10:44:43566 ]
mbonadei2c8ac1b2017-05-31 12:14:26567 }
Jake Brombergfb7fd242021-06-14 20:44:25568 if (is_mac) {
569 sources += [
570 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
571 "objc/components/renderer/metal/RTCMTLNSVideoView.m",
572 ]
573 frameworks += [ "AppKit.framework" ]
574 }
575 deps = [
576 ":base_objc",
577 ":peerconnectionfactory_base_objc",
Jake Brombergfb7fd242021-06-14 20:44:25578 ":videoframebuffer_objc",
579 "../api/video:video_frame",
580 "../api/video:video_rtp_headers",
581 "../rtc_base:checks",
582 "../rtc_base:rtc_base_approved",
583 ]
584 configs += [ "..:common_objc" ]
585 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 12:14:26586 }
587
Anders Carlsson7bca8ca2018-08-30 07:30:29588 # TODO(bugs.webrtc.org/9627): Remove this target.
Mirko Bonadei86d053c2019-10-17 19:32:04589 rtc_library("videocapturebase_objc") {
Anders Carlsson73119182018-03-15 08:41:03590 visibility = [ "*" ]
Danil Chapovalov64f1f3f2020-01-16 13:41:10591 sources = [ "objc/helpers/noop.mm" ]
Anders Carlsson73119182018-03-15 08:41:03592
593 configs += [ "..:common_objc" ]
594
595 public_configs = [ ":common_config_objc" ]
596
597 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29598 ":base_objc",
Anders Carlsson73119182018-03-15 08:41:03599 ":videoframebuffer_objc",
600 ]
601 }
602
Mirko Bonadei86d053c2019-10-17 19:32:04603 rtc_library("videocapture_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53604 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 13:23:23605 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadei2c8ac1b2017-05-31 12:14:26606 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29607 "objc/components/capturer/RTCCameraVideoCapturer.h",
608 "objc/components/capturer/RTCCameraVideoCapturer.m",
Mirko Bonadei19640aa2020-10-19 14:12:43609 "objc/components/capturer/RTCFileVideoCapturer.h",
610 "objc/components/capturer/RTCFileVideoCapturer.m",
zhihuanga4c113a2017-06-28 21:05:44611 ]
Sylvain Defresnec7f0dff2020-07-03 08:19:30612 frameworks = [
Kári Tristan Helgason8a1e35c2019-03-07 09:44:26613 "AVFoundation.framework",
614 "CoreVideo.framework",
Mirko Bonadei19640aa2020-10-19 14:12:43615 "QuartzCore.framework",
Kári Tristan Helgason8a1e35c2019-03-07 09:44:26616 ]
zhihuanga4c113a2017-06-28 21:05:44617
zhihuanga4c113a2017-06-28 21:05:44618 configs += [ "..:common_objc" ]
619
kthelgason36d658d2017-08-24 12:43:45620 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 21:05:44621
zhihuanga4c113a2017-06-28 21:05:44622 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29623 ":base_objc",
624 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22625 ":videoframebuffer_objc",
Yura Yaroshevichebf739b2020-03-16 15:00:59626 "../rtc_base/system:gcd_helpers",
zhihuanga4c113a2017-06-28 21:05:44627 ]
zhihuanga4c113a2017-06-28 21:05:44628 }
629
Mirko Bonadei86d053c2019-10-17 19:32:04630 rtc_library("videocodec_objc") {
Karl Wibergbb23c832018-04-22 17:55:00631 visibility = [ "*" ]
Mirko Bonadei96ede16a2018-09-06 11:45:44632 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 09:49:22633 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29634 "objc/components/video_codec/RTCCodecSpecificInfoH264+Private.h",
635 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
636 "objc/components/video_codec/RTCCodecSpecificInfoH264.mm",
637 "objc/components/video_codec/RTCH264ProfileLevelId.h",
638 "objc/components/video_codec/RTCH264ProfileLevelId.mm",
zhihuanga4c113a2017-06-28 21:05:44639 ]
Yura Yaroshevich0f77fea2018-04-26 12:41:01640 if (is_ios) {
641 sources += [
Anders Carlsson7bca8ca2018-08-30 07:30:29642 "objc/components/video_codec/UIDevice+H264Profile.h",
643 "objc/components/video_codec/UIDevice+H264Profile.mm",
Yura Yaroshevich0f77fea2018-04-26 12:41:01644 ]
645 }
Mirko Bonadeifc52b912019-03-01 09:32:56646
Kári Tristan Helgason99bf77c2018-02-16 09:49:22647 public_configs = [ ":common_config_objc" ]
648 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29649 ":base_objc",
650 ":helpers_objc",
kthelgasonfb143122017-07-25 14:55:58651 "../api/video_codecs:video_codecs_api",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22652 "../common_video",
zhihuanga4c113a2017-06-28 21:05:44653 "../media:rtc_media_base",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22654 "../modules/video_coding:video_codec_interface",
Anders Carlsson7bca8ca2018-08-30 07:30:29655 "../rtc_base:checks",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22656 "../rtc_base:rtc_base_approved",
zhihuanga4c113a2017-06-28 21:05:44657 ]
658 }
659
Mirko Bonadei86d053c2019-10-17 19:32:04660 rtc_library("default_codec_factory_objc") {
Anders Carlssondd8c1652018-01-30 09:32:13661 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29662 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
663 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.m",
664 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
665 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.m",
Anders Carlssondd8c1652018-01-30 09:32:13666 ]
667
668 deps = [
Yura Yaroshevich8cfb2872021-03-03 09:29:42669 ":av1",
Anders Carlsson7bca8ca2018-08-30 07:30:29670 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22671 ":native_video",
672 ":videocodec_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:29673 ":videotoolbox_objc",
Magnus Jedvert8b4e92d2018-04-13 13:36:43674 ":vp8",
675 ":vp9",
Anders Carlsson7bca8ca2018-08-30 07:30:29676 ":vpx_codec_constants",
677 ]
678 }
679
Mirko Bonadei86d053c2019-10-17 19:32:04680 rtc_library("vpx_codec_constants") {
Mirko Bonadei96ede16a2018-09-06 11:45:44681 configs += [ "..:no_global_constructors" ]
Anders Carlsson7bca8ca2018-08-30 07:30:29682 sources = [
683 "objc/api/video_codec/RTCVideoCodecConstants.h",
684 "objc/api/video_codec/RTCVideoCodecConstants.mm",
685 ]
686
687 deps = [
688 ":base_objc",
689 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 09:32:13690 ]
Anders Carlssondd8c1652018-01-30 09:32:13691 }
692
Mirko Bonadei86d053c2019-10-17 19:32:04693 rtc_library("vp8") {
Kári Tristan Helgason99bf77c2018-02-16 09:49:22694 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 02:31:53695 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 09:32:13696 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29697 "objc/api/video_codec/RTCVideoDecoderVP8.h",
698 "objc/api/video_codec/RTCVideoDecoderVP8.mm",
699 "objc/api/video_codec/RTCVideoEncoderVP8.h",
700 "objc/api/video_codec/RTCVideoEncoderVP8.mm",
Anders Carlssondd8c1652018-01-30 09:32:13701 ]
702
Anders Carlssondd8c1652018-01-30 09:32:13703 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29704 ":base_objc",
Anders Carlsson9823ee42018-03-07 09:32:03705 ":wrapped_native_codec_objc",
Anders Carlssondd8c1652018-01-30 09:32:13706 "../modules/video_coding:webrtc_vp8",
Anders Carlssondd8c1652018-01-30 09:32:13707 ]
708 }
709
Mirko Bonadei86d053c2019-10-17 19:32:04710 rtc_library("vp9") {
Kári Tristan Helgason99bf77c2018-02-16 09:49:22711 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 02:31:53712 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 09:32:13713 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29714 "objc/api/video_codec/RTCVideoDecoderVP9.h",
715 "objc/api/video_codec/RTCVideoDecoderVP9.mm",
716 "objc/api/video_codec/RTCVideoEncoderVP9.h",
717 "objc/api/video_codec/RTCVideoEncoderVP9.mm",
Anders Carlssondd8c1652018-01-30 09:32:13718 ]
719
Anders Carlssondd8c1652018-01-30 09:32:13720 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29721 ":base_objc",
Anders Carlsson9823ee42018-03-07 09:32:03722 ":wrapped_native_codec_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:29723 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 09:32:13724 "../modules/video_coding:webrtc_vp9",
Anders Carlssondd8c1652018-01-30 09:32:13725 ]
726 }
727
Yura Yaroshevich8cfb2872021-03-03 09:29:42728 rtc_library("av1") {
729 visibility = [ "*" ]
730 allow_poison = [ "software_video_codecs" ]
731 sources = [
732 "objc/api/video_codec/RTCVideoDecoderAV1.h",
733 "objc/api/video_codec/RTCVideoDecoderAV1.mm",
734 "objc/api/video_codec/RTCVideoEncoderAV1.h",
735 "objc/api/video_codec/RTCVideoEncoderAV1.mm",
736 ]
737
738 deps = [
739 ":base_objc",
740 ":wrapped_native_codec_objc",
741 "../media:rtc_media_base",
742 "../modules/video_coding/codecs/av1:libaom_av1_decoder",
philipel95701502022-01-18 17:47:52743 "../modules/video_coding/codecs/av1:libaom_av1_encoder_if_supported",
Yura Yaroshevich8cfb2872021-03-03 09:29:42744 ]
745 }
746
zhihuanga4c113a2017-06-28 21:05:44747 # Build the PeerConnectionFactory without audio/video support.
748 # This target depends on the objc_peeerconnectionfactory_base which still
749 # includes some audio/video related objects such as RTCAudioSource because
750 # these objects are just thin wrappers of native C++ interfaces required
751 # when implementing webrtc::PeerConnectionFactoryInterface and
752 # webrtc::PeerConnectionInterface.
Kári Tristan Helgasona2d89fc2018-03-06 09:18:43753 # The applications which only use WebRTC DataChannel can depend on this.
Mirko Bonadei86d053c2019-10-17 19:32:04754 rtc_library("peerconnectionfactory_no_media_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53755 visibility = [ "*" ]
Danil Chapovalov41300af2019-07-10 10:44:43756 allow_poison = [
757 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
758 "default_task_queue",
759 ]
zhihuanga4c113a2017-06-28 21:05:44760 defines = [ "HAVE_NO_MEDIA" ]
761
Danil Chapovalov64f1f3f2020-01-16 13:41:10762 sources = [ "objc/helpers/noop.mm" ]
zhihuanga4c113a2017-06-28 21:05:44763
kthelgason36d658d2017-08-24 12:43:45764 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 21:05:44765
zhihuanga4c113a2017-06-28 21:05:44766 deps = [
Anders Carlsson3ff50fb2018-02-01 14:47:05767 ":native_api",
768 ":native_video",
kthelgason36d658d2017-08-24 12:43:45769 ":peerconnectionfactory_base_objc",
zhihuanga4c113a2017-06-28 21:05:44770 "../api:libjingle_peerconnection_api",
Artem Titov94b57c02019-03-21 12:35:10771 "../rtc_base",
zhihuanga4c113a2017-06-28 21:05:44772 ]
773 }
774
Mirko Bonadei86d053c2019-10-17 19:32:04775 rtc_library("mediaconstraints_objc") {
Mirko Bonadei96ede16a2018-09-06 11:45:44776 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 09:49:22777 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29778 "objc/api/peerconnection/RTCMediaConstraints+Private.h",
779 "objc/api/peerconnection/RTCMediaConstraints.h",
780 "objc/api/peerconnection/RTCMediaConstraints.mm",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22781 ]
Kári Tristan Helgason99bf77c2018-02-16 09:49:22782
783 public_configs = [ ":common_config_objc" ]
784 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29785 ":base_objc",
786 ":helpers_objc",
Niels Möllerdac03d92019-02-13 07:52:27787 ":media_constraints",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22788 ]
789 }
790
Anders Carlsson7bca8ca2018-08-30 07:30:29791 # TODO(bugs.webrtc.org/9627): Remove, targets should depend on base_objc.
Mirko Bonadei86d053c2019-10-17 19:32:04792 rtc_library("videorenderer_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:29793 visibility = [ "*" ]
Danil Chapovalov64f1f3f2020-01-16 13:41:10794 sources = [ "objc/helpers/noop.mm" ]
Anders Carlsson9823ee42018-03-07 09:32:03795
796 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 09:32:03797 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 07:30:29798
Danil Chapovalov64f1f3f2020-01-16 13:41:10799 deps = [ ":base_objc" ]
Anders Carlsson9823ee42018-03-07 09:32:03800 }
801
Mirko Bonadei86d053c2019-10-17 19:32:04802 rtc_library("videorendereradapter_objc") {
Karl Wibergbb23c832018-04-22 17:55:00803 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 13:23:23804 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Anders Carlsson9823ee42018-03-07 09:32:03805 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29806 "objc/api/RTCVideoRendererAdapter+Private.h",
807 "objc/api/RTCVideoRendererAdapter.h",
808 "objc/api/RTCVideoRendererAdapter.mm",
Anders Carlsson9823ee42018-03-07 09:32:03809 ]
810
811 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 09:32:03812 public_configs = [ ":common_config_objc" ]
813
814 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29815 ":base_objc",
Anders Carlsson9823ee42018-03-07 09:32:03816 ":native_api",
817 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 09:32:03818 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 12:30:41819 "../api:media_stream_interface",
Anders Carlsson9823ee42018-03-07 09:32:03820 ]
821 }
822
Mirko Bonadei86d053c2019-10-17 19:32:04823 rtc_library("mediasource_objc") {
Anders Carlsson9823ee42018-03-07 09:32:03824 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29825 "objc/api/peerconnection/RTCMediaSource+Private.h",
826 "objc/api/peerconnection/RTCMediaSource.h",
827 "objc/api/peerconnection/RTCMediaSource.mm",
Anders Carlsson9823ee42018-03-07 09:32:03828 ]
829
Anders Carlsson358f2e02018-06-04 08:24:37830 configs += [
831 "..:common_objc",
832 ":used_from_extension",
833 ]
Anders Carlsson9823ee42018-03-07 09:32:03834 public_configs = [ ":common_config_objc" ]
835
836 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29837 ":base_objc",
Niels Möllere942b142019-09-17 12:30:41838 "../api:media_stream_interface",
Anders Carlsson9823ee42018-03-07 09:32:03839 "../rtc_base:checks",
840 ]
841 }
842
Mirko Bonadei86d053c2019-10-17 19:32:04843 rtc_library("base_native_additions_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:29844 sources = [
845 "objc/api/peerconnection/RTCEncodedImage+Private.h",
846 "objc/api/peerconnection/RTCEncodedImage+Private.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:29847 "objc/api/peerconnection/RTCVideoCodecInfo+Private.h",
848 "objc/api/peerconnection/RTCVideoCodecInfo+Private.mm",
849 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.h",
850 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.mm",
851 ]
852
853 configs += [ "..:common_objc" ]
854
855 public_configs = [ ":common_config_objc" ]
856
857 deps = [
858 ":base_objc",
859 ":helpers_objc",
Niels Möller4dc66c52018-10-05 12:17:58860 "../api/video:encoded_image",
Anders Carlsson7bca8ca2018-08-30 07:30:29861 "../api/video_codecs:video_codecs_api",
Anders Carlsson7bca8ca2018-08-30 07:30:29862 "../modules/video_coding:video_codec_interface",
Artem Titov94b57c02019-03-21 12:35:10863 "../rtc_base",
Anders Carlsson7bca8ca2018-08-30 07:30:29864 ]
Anders Carlsson7bca8ca2018-08-30 07:30:29865 }
866
Mirko Bonadei86d053c2019-10-17 19:32:04867 rtc_library("peerconnectionfactory_base_objc") {
Karl Wibergbb23c832018-04-22 17:55:00868 visibility = [ "*" ]
Danil Chapovalov41300af2019-07-10 10:44:43869 allow_poison = [
870 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
871 "default_task_queue",
872 ]
Byoungchan Lee524a4222021-11-19 10:03:49873 configs += [ "..:no_global_constructors" ]
zhihuanga4c113a2017-06-28 21:05:44874 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:29875 "objc/api/peerconnection/RTCAudioSource+Private.h",
876 "objc/api/peerconnection/RTCAudioSource.h",
877 "objc/api/peerconnection/RTCAudioSource.mm",
878 "objc/api/peerconnection/RTCAudioTrack+Private.h",
879 "objc/api/peerconnection/RTCAudioTrack.h",
880 "objc/api/peerconnection/RTCAudioTrack.mm",
881 "objc/api/peerconnection/RTCCertificate.h",
882 "objc/api/peerconnection/RTCCertificate.mm",
883 "objc/api/peerconnection/RTCConfiguration+Native.h",
884 "objc/api/peerconnection/RTCConfiguration+Private.h",
885 "objc/api/peerconnection/RTCConfiguration.h",
886 "objc/api/peerconnection/RTCConfiguration.mm",
Benjamin Wright8c27cca2018-10-25 17:16:44887 "objc/api/peerconnection/RTCCryptoOptions.h",
888 "objc/api/peerconnection/RTCCryptoOptions.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:29889 "objc/api/peerconnection/RTCDataChannel+Private.h",
890 "objc/api/peerconnection/RTCDataChannel.h",
891 "objc/api/peerconnection/RTCDataChannel.mm",
892 "objc/api/peerconnection/RTCDataChannelConfiguration+Private.h",
893 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
894 "objc/api/peerconnection/RTCDataChannelConfiguration.mm",
895 "objc/api/peerconnection/RTCDtmfSender+Private.h",
896 "objc/api/peerconnection/RTCDtmfSender.h",
897 "objc/api/peerconnection/RTCDtmfSender.mm",
898 "objc/api/peerconnection/RTCFieldTrials.h",
899 "objc/api/peerconnection/RTCFieldTrials.mm",
900 "objc/api/peerconnection/RTCIceCandidate+Private.h",
901 "objc/api/peerconnection/RTCIceCandidate.h",
902 "objc/api/peerconnection/RTCIceCandidate.mm",
Jaehyun Kod2110982021-11-30 10:01:43903 "objc/api/peerconnection/RTCIceCandidateErrorEvent+Private.h",
904 "objc/api/peerconnection/RTCIceCandidateErrorEvent.h",
905 "objc/api/peerconnection/RTCIceCandidateErrorEvent.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:29906 "objc/api/peerconnection/RTCIceServer+Private.h",
907 "objc/api/peerconnection/RTCIceServer.h",
908 "objc/api/peerconnection/RTCIceServer.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:29909 "objc/api/peerconnection/RTCLegacyStatsReport+Private.h",
910 "objc/api/peerconnection/RTCLegacyStatsReport.h",
911 "objc/api/peerconnection/RTCLegacyStatsReport.mm",
912 "objc/api/peerconnection/RTCMediaStream+Private.h",
913 "objc/api/peerconnection/RTCMediaStream.h",
914 "objc/api/peerconnection/RTCMediaStream.mm",
915 "objc/api/peerconnection/RTCMediaStreamTrack+Private.h",
916 "objc/api/peerconnection/RTCMediaStreamTrack.h",
917 "objc/api/peerconnection/RTCMediaStreamTrack.mm",
918 "objc/api/peerconnection/RTCMetrics.h",
919 "objc/api/peerconnection/RTCMetrics.mm",
920 "objc/api/peerconnection/RTCMetricsSampleInfo+Private.h",
921 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
922 "objc/api/peerconnection/RTCMetricsSampleInfo.mm",
923 "objc/api/peerconnection/RTCPeerConnection+DataChannel.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:29924 "objc/api/peerconnection/RTCPeerConnection+Private.h",
925 "objc/api/peerconnection/RTCPeerConnection+Stats.mm",
926 "objc/api/peerconnection/RTCPeerConnection.h",
927 "objc/api/peerconnection/RTCPeerConnection.mm",
928 "objc/api/peerconnection/RTCPeerConnectionFactory+Native.h",
929 "objc/api/peerconnection/RTCPeerConnectionFactory+Private.h",
930 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
931 "objc/api/peerconnection/RTCPeerConnectionFactory.mm",
932 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.h",
933 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.mm",
934 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.h",
935 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.mm",
936 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions+Private.h",
937 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
938 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.mm",
939 "objc/api/peerconnection/RTCRtcpParameters+Private.h",
940 "objc/api/peerconnection/RTCRtcpParameters.h",
941 "objc/api/peerconnection/RTCRtcpParameters.mm",
942 "objc/api/peerconnection/RTCRtpCodecParameters+Private.h",
943 "objc/api/peerconnection/RTCRtpCodecParameters.h",
944 "objc/api/peerconnection/RTCRtpCodecParameters.mm",
945 "objc/api/peerconnection/RTCRtpEncodingParameters+Private.h",
946 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
947 "objc/api/peerconnection/RTCRtpEncodingParameters.mm",
948 "objc/api/peerconnection/RTCRtpHeaderExtension+Private.h",
949 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
950 "objc/api/peerconnection/RTCRtpHeaderExtension.mm",
951 "objc/api/peerconnection/RTCRtpParameters+Private.h",
952 "objc/api/peerconnection/RTCRtpParameters.h",
953 "objc/api/peerconnection/RTCRtpParameters.mm",
Benjamin Wrightddf1a3e2018-10-02 17:20:58954 "objc/api/peerconnection/RTCRtpReceiver+Native.h",
Anders Carlsson7bca8ca2018-08-30 07:30:29955 "objc/api/peerconnection/RTCRtpReceiver+Private.h",
956 "objc/api/peerconnection/RTCRtpReceiver.h",
957 "objc/api/peerconnection/RTCRtpReceiver.mm",
Benjamin Wrightddf1a3e2018-10-02 17:20:58958 "objc/api/peerconnection/RTCRtpSender+Native.h",
Anders Carlsson7bca8ca2018-08-30 07:30:29959 "objc/api/peerconnection/RTCRtpSender+Private.h",
960 "objc/api/peerconnection/RTCRtpSender.h",
961 "objc/api/peerconnection/RTCRtpSender.mm",
962 "objc/api/peerconnection/RTCRtpTransceiver+Private.h",
963 "objc/api/peerconnection/RTCRtpTransceiver.h",
964 "objc/api/peerconnection/RTCRtpTransceiver.mm",
965 "objc/api/peerconnection/RTCSSLAdapter.h",
966 "objc/api/peerconnection/RTCSSLAdapter.mm",
967 "objc/api/peerconnection/RTCSessionDescription+Private.h",
968 "objc/api/peerconnection/RTCSessionDescription.h",
969 "objc/api/peerconnection/RTCSessionDescription.mm",
Peter Hanspersbed86042019-02-21 16:27:09970 "objc/api/peerconnection/RTCStatisticsReport+Private.h",
971 "objc/api/peerconnection/RTCStatisticsReport.h",
972 "objc/api/peerconnection/RTCStatisticsReport.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:29973 "objc/api/peerconnection/RTCTracing.h",
974 "objc/api/peerconnection/RTCTracing.mm",
975 "objc/api/peerconnection/RTCVideoTrack+Private.h",
976 "objc/api/peerconnection/RTCVideoTrack.h",
977 "objc/api/peerconnection/RTCVideoTrack.mm",
kthelgason5fe4d492016-12-05 19:27:30978 ]
kthelgasonebc34e72016-09-15 11:30:18979
Anders Carlsson358f2e02018-06-04 08:24:37980 configs += [
981 "..:common_objc",
982 ":used_from_extension",
983 ]
kthelgason36d658d2017-08-24 12:43:45984 public_configs = [ ":common_config_objc" ]
kthelgasonc0977102017-04-24 07:57:16985
mbonadei2c8ac1b2017-05-31 12:14:26986 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:29987 ":base_native_additions_objc",
988 ":base_objc",
989 ":file_logger_objc",
990 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22991 ":mediaconstraints_objc",
Anders Carlsson9823ee42018-03-07 09:32:03992 ":mediasource_objc",
Anders Carlsson3ff50fb2018-02-01 14:47:05993 ":native_api",
994 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 09:49:22995 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 09:32:03996 ":videorendereradapter_objc",
997 ":videosource_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:29998 ":videotoolbox_objc",
Mirko Bonadeie51f7852017-12-06 10:23:19999 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 12:30:411000 "../api:media_stream_interface",
Niels Möller695cf6a2019-05-13 10:27:231001 "../api:rtc_event_log_output_file",
Peter Hanspersbed86042019-02-21 16:27:091002 "../api:rtc_stats_api",
Niels Möller6dcd4dc2019-08-26 08:45:281003 "../api:rtp_parameters",
Mirko Bonadeid9708072019-01-25 19:26:481004 "../api:scoped_refptr",
Jiawei Ouae810c12018-06-20 23:18:591005 "../api/audio_codecs:audio_codecs_api",
Karl Wiberg5817d3d2018-04-06 08:06:421006 "../api/audio_codecs:builtin_audio_decoder_factory",
Jiawei Ouae810c12018-06-20 23:18:591007 "../api/audio_codecs:builtin_audio_encoder_factory",
Mirko Bonadeieaaaf412019-09-13 12:42:151008 "../api/crypto:frame_decryptor_interface",
1009 "../api/crypto:frame_encryptor_interface",
Danil Chapovalov4ba04b72019-06-26 13:49:471010 "../api/rtc_event_log:rtc_event_log_factory",
Danil Chapovalovaaa11432019-05-17 11:20:141011 "../api/task_queue:default_task_queue_factory",
Erik Språngceb44952020-09-22 09:36:351012 "../api/transport:field_trial_based_config",
Niels Möllerc6ce9c52018-05-11 09:15:301013 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 10:59:381014 "../api/video:video_rtp_headers",
Anders Carlsson7e042812017-10-05 14:55:381015 "../api/video_codecs:video_codecs_api",
Anders Carlssone5960ce2017-06-22 13:26:301016 "../common_video",
mbonadei2c8ac1b2017-05-31 12:14:261017 "../media:rtc_media_base",
Jiawei Ouae810c12018-06-20 23:18:591018 "../modules/audio_device:audio_device_api",
Artem Titov94b57c02019-03-21 12:35:101019 "../modules/audio_processing",
Alessio Bazzicab768e882018-11-07 14:29:541020 "../modules/audio_processing:api",
Patrik Höglund99175c62018-01-08 10:05:101021 "../modules/video_coding:video_codec_interface",
zhihuanga4c113a2017-06-28 21:05:441022 "../pc:peerconnection",
Artem Titov94b57c02019-03-21 12:35:101023 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 15:05:421024 "../rtc_base:checks",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011025 "../rtc_base:network_constants",
Mirko Bonadei17f48782018-09-28 06:51:101026 "../system_wrappers:field_trial",
1027 "../system_wrappers:metrics",
mbonadei2c8ac1b2017-05-31 12:14:261028 ]
Peter Hanspers8d95e3b2018-05-15 08:22:361029
1030 if (is_ios) {
1031 deps += [ ":native_api_audio_device_module" ]
1032 }
kthelgasonebc34e72016-09-15 11:30:181033 }
Zeke Chindd0e1e02016-10-11 20:27:261034
mbonadei2c8ac1b2017-05-31 12:14:261035 if (rtc_include_tests) {
Daniela012b56b2017-11-15 12:15:241036 if (is_ios) {
Mirko Bonadei86d053c2019-10-17 19:32:041037 rtc_library("sdk_unittests_sources") {
Danielaae012cf2017-10-12 11:46:001038 testonly = true
Anders Carlsson7bca8ca2018-08-30 07:30:291039 include_dirs = [ "objc/" ]
Daniela012b56b2017-11-15 12:15:241040
Danielaae012cf2017-10-12 11:46:001041 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:291042 "objc/unittests/ObjCVideoTrackSource_xctest.mm",
1043 "objc/unittests/RTCCVPixelBuffer_xctest.mm",
1044 "objc/unittests/RTCCallbackLogger_xctest.m",
Kári Tristan Helgasonecbdbf62020-02-20 15:34:451045 "objc/unittests/RTCEncodedImage_xctest.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:291046 "objc/unittests/RTCFileVideoCapturer_xctest.mm",
1047 "objc/unittests/RTCH264ProfileLevelId_xctest.m",
Jake Brombergfb7fd242021-06-14 20:44:251048 "objc/unittests/RTCMTLVideoView_xctest.m",
Aaron Goldenfb4e9bc2019-01-04 20:03:311049 "objc/unittests/RTCNV12TextureCache_xctest.m",
Anders Carlsson7bca8ca2018-08-30 07:30:291050 "objc/unittests/RTCPeerConnectionFactory_xctest.m",
1051 "objc/unittests/frame_buffer_helpers.h",
1052 "objc/unittests/frame_buffer_helpers.mm",
Artem Titarenko42b43152018-10-29 17:18:091053 "objc/unittests/nalu_rewriter_xctest.mm",
Danielaae012cf2017-10-12 11:46:001054 ]
Daniela012b56b2017-11-15 12:15:241055
Mirko Bonadei6b09c452021-07-05 14:47:491056 # TODO(bugs.webrtc.org/12937): Remove OpenGL deprecation warning
1057 # workaround.
1058 defines = [ "GLES_SILENCE_DEPRECATION" ]
1059
Peter Hanspers8d95e3b2018-05-15 08:22:361060 # TODO(peterhanspers): Reenable these tests on simulator.
1061 # See bugs.webrtc.org/7812
Lahiru Ginnaliya Gamathige1d0e7b62020-10-20 09:43:021062 if (target_environment != "simulator") {
Peter Hanspers8d95e3b2018-05-15 08:22:361063 sources += [
Anders Carlsson7bca8ca2018-08-30 07:30:291064 "objc/unittests/RTCAudioDeviceModule_xctest.mm",
1065 "objc/unittests/RTCAudioDevice_xctest.mm",
Peter Hanspers8d95e3b2018-05-15 08:22:361066 ]
1067 }
1068
Danielaae012cf2017-10-12 11:46:001069 deps = [
Peter Hanspers8d95e3b2018-05-15 08:22:361070 ":audio_device",
Joe Chen0b3a6e32019-12-27 07:01:421071 ":audio_session_objc",
Kári Tristan Helgasonecbdbf62020-02-20 15:34:451072 ":base_native_additions_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:291073 ":base_objc",
1074 ":callback_logger_objc",
Anders Carlssondc6b4772018-01-15 12:31:031075 ":framework_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:291076 ":mediaconstraints_objc",
Jake Brombergfb7fd242021-06-14 20:44:251077 ":metal_objc",
Anders Carlssonfe9d8172018-04-03 09:40:391078 ":native_api",
Peter Hanspers8d95e3b2018-05-15 08:22:361079 ":native_api_audio_device_module",
Anders Carlssonfe9d8172018-04-03 09:40:391080 ":native_video",
Anders Carlsson7bca8ca2018-08-30 07:30:291081 ":peerconnectionfactory_base_objc",
Artem Titarenko42b43152018-10-29 17:18:091082 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221083 ":videocapture_objc",
Anders Carlsson79ce8202018-06-01 10:51:091084 ":videocodec_objc",
Anders Carlssonfe9d8172018-04-03 09:40:391085 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 09:32:031086 ":videosource_objc",
Danielaae012cf2017-10-12 11:46:001087 ":videotoolbox_objc",
Mirko Bonadeid9708072019-01-25 19:26:481088 "../api:scoped_refptr",
Byoungchan Lee43bd7602019-10-08 14:58:411089 "../api/task_queue:default_task_queue_factory",
Ilya Nikolaevskiy38e9b062020-10-08 14:36:331090 "../api/video:video_frame",
Artem Titov94b57c02019-03-21 12:35:101091 "../common_video",
Danielaae012cf2017-10-12 11:46:001092 "../media:rtc_media_base",
Anders Carlssonfe9d8172018-04-03 09:40:391093 "../media:rtc_media_tests_utils",
Artem Titov94b57c02019-03-21 12:35:101094 "../rtc_base",
Mirko Bonadeie3abb812018-11-23 12:15:081095 "../rtc_base:gunit_helpers",
Byoungchan Lee83ceb902021-11-16 02:31:571096 "../rtc_base/system:unused",
Artem Titov94b57c02019-03-21 12:35:101097 "../system_wrappers",
Anders Carlssonfe9d8172018-04-03 09:40:391098 "//third_party/libyuv",
Danielaae012cf2017-10-12 11:46:001099 ]
Kári Tristan Helgason99bf77c2018-02-16 09:49:221100
Jordan Rose53d3fc92021-07-06 19:16:411101 if (rtc_ios_macos_use_opengl_rendering) {
1102 deps += [ ":opengl_objc" ]
1103 }
1104
Danielaae012cf2017-10-12 11:46:001105 public_deps = [
1106 "//build/config/ios:xctest",
1107 "//third_party/ocmock",
1108 ]
1109 }
1110
Daniela012b56b2017-11-15 12:15:241111 bundle_data("sdk_unittests_bundle_data") {
Daniela012b56b2017-11-15 12:15:241112 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:291113 "objc/unittests/audio_short16.pcm",
1114 "objc/unittests/audio_short44.pcm",
1115 "objc/unittests/audio_short48.pcm",
Peter Hanspers8d95e3b2018-05-15 08:22:361116
1117 # Sample video taken from https://media.xiph.org/video/derf/
Anders Carlsson7bca8ca2018-08-30 07:30:291118 "objc/unittests/foreman.mp4",
Daniela012b56b2017-11-15 12:15:241119 ]
Danil Chapovalov64f1f3f2020-01-16 13:41:101120 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
Daniela012b56b2017-11-15 12:15:241121 }
1122
Anders Carlsson7bca8ca2018-08-30 07:30:291123 # These tests use static linking.
Mirko Bonadeiaef8a212020-09-16 13:09:531124 rtc_test("sdk_unittests") {
1125 is_xctest = true
Danielaae012cf2017-10-12 11:46:001126 info_plist = "//test/ios/Info.plist"
Danil Chapovalov64f1f3f2020-01-16 13:41:101127 sources = [ "objc/unittests/main.mm" ]
Daniela012b56b2017-11-15 12:15:241128
Artem Titarenkoa2bc3622019-08-19 12:24:001129 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=generic-unit-test" ]
Danielaae012cf2017-10-12 11:46:001130 deps = [
Yura Yaroshevich5297bd22018-06-19 09:51:511131 ":peerconnectionfactory_base_objc",
Daniela012b56b2017-11-15 12:15:241132 ":sdk_unittests_bundle_data",
Danielaae012cf2017-10-12 11:46:001133 ":sdk_unittests_sources",
Niels Möller5a8f8602019-06-12 09:30:591134 "../rtc_base",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011135 "../rtc_base:threading",
Artem Titarenko34fc3462018-11-06 11:29:291136 "//test:test_support",
Danielaae012cf2017-10-12 11:46:001137 ]
1138 ldflags = [ "-all_load" ]
1139 }
Anders Carlsson7bca8ca2018-08-30 07:30:291140
1141 # These tests link to the framework.
Mirko Bonadeiaef8a212020-09-16 13:09:531142 rtc_test("sdk_framework_unittests") {
1143 is_xctest = true
Anders Carlsson7bca8ca2018-08-30 07:30:291144 info_plist = "//test/ios/Info.plist"
1145 sources = [
1146 "objc/unittests/RTCDoNotPutCPlusPlusInFrameworkHeaders_xctest.m",
Artem Titarenko34fc3462018-11-06 11:29:291147 "objc/unittests/main.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:291148 ]
1149
Artem Titarenkoa2bc3622019-08-19 12:24:001150 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=generic-unit-test" ]
Anders Carlsson7bca8ca2018-08-30 07:30:291151 deps = [
1152 ":framework_objc+link",
1153 ":ios_framework_bundle",
Niels Möller5a8f8602019-06-12 09:30:591154 "../rtc_base",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011155 "../rtc_base:threading",
Artem Titarenko34fc3462018-11-06 11:29:291156 "//test:test_support",
Anders Carlsson7bca8ca2018-08-30 07:30:291157 ]
1158 }
Danielaae012cf2017-10-12 11:46:001159 }
1160
1161 # TODO(denicija): once all tests are migrated to xctest remove this source set.
Mirko Bonadei86d053c2019-10-17 19:32:041162 rtc_library("rtc_unittests_objc") {
mbonadei2c8ac1b2017-05-31 12:14:261163 testonly = true
Kári Tristan Helgasoncbe74352016-11-09 09:43:261164
mbonadei2c8ac1b2017-05-31 12:14:261165 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:291166 "objc/unittests/RTCCertificateTest.mm",
1167 "objc/unittests/RTCConfigurationTest.mm",
1168 "objc/unittests/RTCDataChannelConfigurationTest.mm",
1169 "objc/unittests/RTCIceCandidateTest.mm",
1170 "objc/unittests/RTCIceServerTest.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:291171 "objc/unittests/RTCMediaConstraintsTest.mm",
1172 "objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm",
1173 "objc/unittests/RTCPeerConnectionTest.mm",
1174 "objc/unittests/RTCSessionDescriptionTest.mm",
1175 "objc/unittests/RTCTracingTest.mm",
1176 "objc/unittests/objc_video_decoder_factory_tests.mm",
1177 "objc/unittests/objc_video_encoder_factory_tests.mm",
1178 "objc/unittests/scoped_cftyperef_tests.mm",
mbonadei2c8ac1b2017-05-31 12:14:261179 ]
Anders Carlssone7dd83f2018-01-19 10:28:441180 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 07:30:291181 sources += [ "objc/unittests/RTCCameraVideoCapturerTests.mm" ]
oprypin45197522017-06-22 08:47:201182 }
mbonadeid7620582017-05-30 08:50:351183
mbonadei2c8ac1b2017-05-31 12:14:261184 # |-ObjC| flag needed to make sure category method implementations
1185 # are included:
1186 # https://developer.apple.com/library/mac/qa/qa1490/_index.html
1187 ldflags = [ "-ObjC" ]
magjed3149e092017-05-08 12:32:051188
mbonadei2c8ac1b2017-05-31 12:14:261189 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:291190 ":base_objc",
1191 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221192 ":mediaconstraints_objc",
1193 ":native_api",
Anders Carlsson3ff50fb2018-02-01 14:47:051194 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221195 ":peerconnectionfactory_base_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221196 ":videocapture_objc",
1197 ":videocodec_objc",
1198 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 09:32:031199 ":videosource_objc",
kthelgason36d658d2017-08-24 12:43:451200 ":videotoolbox_objc",
Piotr (Peter) Slatalae0c2e972018-10-08 16:43:211201 "../api:libjingle_peerconnection_api",
Jiawei Ouae810c12018-06-20 23:18:591202 "../api/audio_codecs:audio_codecs_api",
1203 "../api/audio_codecs:builtin_audio_decoder_factory",
1204 "../api/audio_codecs:builtin_audio_encoder_factory",
Magnus Jedvert8b4e92d2018-04-13 13:36:431205 "../api/video_codecs:video_codecs_api",
kthelgasonebd4f792017-09-04 11:36:211206 "../media:rtc_media_base",
Jiawei Ouae810c12018-06-20 23:18:591207 "../modules/audio_device:audio_device_api",
Artem Titov94b57c02019-03-21 12:35:101208 "../modules/audio_processing",
Alessio Bazzicab768e882018-11-07 14:29:541209 "../modules/audio_processing:api",
Patrik Höglund99175c62018-01-08 10:05:101210 "../modules/video_coding:video_codec_interface",
Mirko Bonadeie3abb812018-11-23 12:15:081211 "../rtc_base:gunit_helpers",
Byoungchan Lee0a54e7a2021-09-06 13:32:521212 "../rtc_base:rtc_event",
Niels Möllera12c42a2018-07-25 14:05:481213 "../rtc_base/system:unused",
Yves Gerey21cddff2018-10-30 20:12:421214 "../test:test_support",
mbonadei2c8ac1b2017-05-31 12:14:261215 "//third_party/ocmock",
1216 ]
magjed3149e092017-05-08 12:32:051217
denicija59ee91b2017-06-05 12:48:471218 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 07:30:291219 sources += [ "objc/unittests/RTCAudioSessionTest.mm" ]
Joe Chen0b3a6e32019-12-27 07:01:421220 deps += [ ":audio_session_objc" ]
mbonadei2c8ac1b2017-05-31 12:14:261221 }
mbonadei2c8ac1b2017-05-31 12:14:261222 }
kthelgason2f088792017-05-30 08:48:471223 }
1224
mbonadei2c8ac1b2017-05-31 12:14:261225 if (is_ios) {
Anders Carlssondc6b4772018-01-15 12:31:031226 ios_framework_bundle_with_umbrella_header("framework_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:291227 info_plist = "objc/Info.plist"
mbonadei2c8ac1b2017-05-31 12:14:261228 output_name = "WebRTC"
Magnus Jedvertf83dc8b2017-08-29 09:49:431229
mbonadei2c8ac1b2017-05-31 12:14:261230 common_objc_headers = [
Anders Carlsson7bca8ca2018-08-30 07:30:291231 "objc/base/RTCCodecSpecificInfo.h",
1232 "objc/base/RTCEncodedImage.h",
Anders Carlsson4e5af962018-09-03 12:44:501233 "objc/base/RTCI420Buffer.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291234 "objc/base/RTCLogging.h",
1235 "objc/base/RTCMacros.h",
Anders Carlsson4e5af962018-09-03 12:44:501236 "objc/base/RTCMutableI420Buffer.h",
1237 "objc/base/RTCMutableYUVPlanarBuffer.h",
Yury Yaroshevich19a6e942022-03-11 08:22:081238 "objc/base/RTCSSLCertificateVerifier.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291239 "objc/base/RTCVideoCapturer.h",
1240 "objc/base/RTCVideoCodecInfo.h",
1241 "objc/base/RTCVideoDecoder.h",
1242 "objc/base/RTCVideoDecoderFactory.h",
1243 "objc/base/RTCVideoEncoder.h",
1244 "objc/base/RTCVideoEncoderFactory.h",
1245 "objc/base/RTCVideoEncoderQpThresholds.h",
1246 "objc/base/RTCVideoEncoderSettings.h",
1247 "objc/base/RTCVideoFrame.h",
1248 "objc/base/RTCVideoFrameBuffer.h",
1249 "objc/base/RTCVideoRenderer.h",
Anders Carlsson4e5af962018-09-03 12:44:501250 "objc/base/RTCYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291251 "objc/components/audio/RTCAudioSession.h",
1252 "objc/components/audio/RTCAudioSessionConfiguration.h",
1253 "objc/components/capturer/RTCCameraVideoCapturer.h",
1254 "objc/components/capturer/RTCFileVideoCapturer.h",
Taylor Brandstetterea7fbfb2020-08-19 23:41:541255 "objc/components/network/RTCNetworkMonitor.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291256 "objc/components/renderer/metal/RTCMTLVideoView.h",
1257 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
1258 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1259 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1260 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1261 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1262 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1263 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1264 "objc/components/video_codec/RTCVideoDecoderH264.h",
1265 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1266 "objc/components/video_codec/RTCVideoEncoderH264.h",
1267 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1268 "objc/helpers/RTCCameraPreviewView.h",
1269 "objc/helpers/RTCDispatcher.h",
1270 "objc/helpers/UIDevice+RTCDevice.h",
1271 "objc/api/peerconnection/RTCAudioSource.h",
1272 "objc/api/peerconnection/RTCAudioTrack.h",
1273 "objc/api/peerconnection/RTCConfiguration.h",
1274 "objc/api/peerconnection/RTCDataChannel.h",
1275 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1276 "objc/api/peerconnection/RTCFieldTrials.h",
1277 "objc/api/peerconnection/RTCIceCandidate.h",
Jaehyun Kod2110982021-11-30 10:01:431278 "objc/api/peerconnection/RTCIceCandidateErrorEvent.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291279 "objc/api/peerconnection/RTCIceServer.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291280 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1281 "objc/api/peerconnection/RTCMediaConstraints.h",
1282 "objc/api/peerconnection/RTCMediaSource.h",
1283 "objc/api/peerconnection/RTCMediaStream.h",
1284 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1285 "objc/api/peerconnection/RTCMetrics.h",
1286 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1287 "objc/api/peerconnection/RTCPeerConnection.h",
1288 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1289 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1290 "objc/api/peerconnection/RTCRtcpParameters.h",
1291 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1292 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1293 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1294 "objc/api/peerconnection/RTCRtpParameters.h",
1295 "objc/api/peerconnection/RTCRtpReceiver.h",
1296 "objc/api/peerconnection/RTCRtpSender.h",
1297 "objc/api/peerconnection/RTCRtpTransceiver.h",
1298 "objc/api/peerconnection/RTCDtmfSender.h",
1299 "objc/api/peerconnection/RTCSSLAdapter.h",
1300 "objc/api/peerconnection/RTCSessionDescription.h",
CZ Theng682dabd2019-10-21 03:25:181301 "objc/api/peerconnection/RTCStatisticsReport.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291302 "objc/api/peerconnection/RTCTracing.h",
1303 "objc/api/peerconnection/RTCCertificate.h",
Benjamin Wright8c27cca2018-10-25 17:16:441304 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291305 "objc/api/peerconnection/RTCVideoSource.h",
1306 "objc/api/peerconnection/RTCVideoTrack.h",
Anders Carlsson4e5af962018-09-03 12:44:501307 "objc/api/video_codec/RTCVideoCodecConstants.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291308 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1309 "objc/api/video_codec/RTCVideoDecoderVP9.h",
Yura Yaroshevich8cfb2872021-03-03 09:29:421310 "objc/api/video_codec/RTCVideoDecoderAV1.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291311 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1312 "objc/api/video_codec/RTCVideoEncoderVP9.h",
Yura Yaroshevich8cfb2872021-03-03 09:29:421313 "objc/api/video_codec/RTCVideoEncoderAV1.h",
Anders Carlsson4e5af962018-09-03 12:44:501314 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1315 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
mbonadei2c8ac1b2017-05-31 12:14:261316 ]
Magnus Jedvert8b4e92d2018-04-13 13:36:431317
mbonadei2c8ac1b2017-05-31 12:14:261318 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 09:49:221319 common_objc_headers += [
Anders Carlsson7bca8ca2018-08-30 07:30:291320 "objc/api/logging/RTCCallbackLogger.h",
1321 "objc/api/peerconnection/RTCFileLogger.h",
Anders Carlsson3b3364e2018-01-30 14:46:131322 ]
mbonadei2c8ac1b2017-05-31 12:14:261323 }
Kári Tristan Helgasoncbe74352016-11-09 09:43:261324
Kári Tristan Helgason99bf77c2018-02-16 09:49:221325 sources = common_objc_headers
1326 public_headers = common_objc_headers
1327
mbonadei2c8ac1b2017-05-31 12:14:261328 ldflags = [
1329 "-all_load",
1330 "-install_name",
1331 "@rpath/$output_name.framework/$output_name",
1332 ]
Kári Tristan Helgasoncbe74352016-11-09 09:43:261333
mbonadei2c8ac1b2017-05-31 12:14:261334 deps = [
kthelgason36d658d2017-08-24 12:43:451335 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:291336 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221337 ":default_codec_factory_objc",
Mirko Bonadei91d39752022-01-19 07:43:171338 ":metal_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221339 ":native_api",
1340 ":native_video",
1341 ":peerconnectionfactory_base_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221342 ":videocapture_objc",
1343 ":videocodec_objc",
1344 ":videotoolbox_objc",
ehmaldonadof6a861a2017-07-19 17:40:471345 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 12:14:261346 ]
Jordan Rose53d3fc92021-07-06 19:16:411347 if (rtc_ios_macos_use_opengl_rendering) {
1348 deps += [ ":opengl_ui_objc" ]
1349 }
Anders Carlsson7bca8ca2018-08-30 07:30:291350 if (!build_with_chromium) {
1351 deps += [
1352 ":callback_logger_objc",
1353 ":file_logger_objc",
1354 ]
1355 }
Kári Tristan Helgasoncbe74352016-11-09 09:43:261356
Sylvain Defresnec7f0dff2020-07-03 08:19:301357 frameworks = [
mbonadei2c8ac1b2017-05-31 12:14:261358 "AVFoundation.framework",
1359 "CoreGraphics.framework",
1360 "CoreMedia.framework",
mbonadei2c8ac1b2017-05-31 12:14:261361 ]
1362
Anders Carlsson358f2e02018-06-04 08:24:371363 configs += [
1364 "..:common_objc",
1365 ":used_from_extension",
1366 ]
mbonadei2c8ac1b2017-05-31 12:14:261367
kthelgason36d658d2017-08-24 12:43:451368 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 12:14:261369 }
Anders Carlsson7bca8ca2018-08-30 07:30:291370
1371 bundle_data("ios_framework_bundle") {
Danil Chapovalov64f1f3f2020-01-16 13:41:101372 deps = [ "../sdk:framework_objc" ]
1373 sources = [ "$root_build_dir/WebRTC.framework" ]
1374 outputs = [ "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}" ]
Anders Carlsson7bca8ca2018-08-30 07:30:291375 }
1376 }
1377
1378 if (is_mac) {
Anders Carlsson37bbf792018-09-05 14:29:271379 mac_framework_bundle_with_umbrella_header("mac_framework_objc") {
Anders Carlsson7bca8ca2018-08-30 07:30:291380 info_plist = "objc/Info.plist"
1381 output_name = "WebRTC"
Anders Carlsson7bca8ca2018-08-30 07:30:291382
Anders Carlsson37bbf792018-09-05 14:29:271383 sources = [
1384 "objc/api/peerconnection/RTCAudioSource.h",
1385 "objc/api/peerconnection/RTCAudioTrack.h",
1386 "objc/api/peerconnection/RTCCertificate.h",
1387 "objc/api/peerconnection/RTCConfiguration.h",
Benjamin Wright8c27cca2018-10-25 17:16:441388 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson37bbf792018-09-05 14:29:271389 "objc/api/peerconnection/RTCDataChannel.h",
1390 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1391 "objc/api/peerconnection/RTCDtmfSender.h",
1392 "objc/api/peerconnection/RTCFieldTrials.h",
1393 "objc/api/peerconnection/RTCIceCandidate.h",
Jaehyun Kod2110982021-11-30 10:01:431394 "objc/api/peerconnection/RTCIceCandidateErrorEvent.h",
Anders Carlsson37bbf792018-09-05 14:29:271395 "objc/api/peerconnection/RTCIceServer.h",
Anders Carlsson37bbf792018-09-05 14:29:271396 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1397 "objc/api/peerconnection/RTCMediaConstraints.h",
1398 "objc/api/peerconnection/RTCMediaSource.h",
1399 "objc/api/peerconnection/RTCMediaStream.h",
1400 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1401 "objc/api/peerconnection/RTCMetrics.h",
1402 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1403 "objc/api/peerconnection/RTCPeerConnection.h",
1404 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1405 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1406 "objc/api/peerconnection/RTCRtcpParameters.h",
1407 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1408 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1409 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1410 "objc/api/peerconnection/RTCRtpParameters.h",
1411 "objc/api/peerconnection/RTCRtpReceiver.h",
1412 "objc/api/peerconnection/RTCRtpSender.h",
1413 "objc/api/peerconnection/RTCRtpTransceiver.h",
1414 "objc/api/peerconnection/RTCSSLAdapter.h",
1415 "objc/api/peerconnection/RTCSessionDescription.h",
Saúl Ibarra Corretgéf7aa2672021-07-28 21:09:141416 "objc/api/peerconnection/RTCStatisticsReport.h",
Anders Carlsson37bbf792018-09-05 14:29:271417 "objc/api/peerconnection/RTCTracing.h",
1418 "objc/api/peerconnection/RTCVideoSource.h",
1419 "objc/api/peerconnection/RTCVideoTrack.h",
Yura Yaroshevich8cfb2872021-03-03 09:29:421420 "objc/api/video_codec/RTCVideoDecoderAV1.h",
Anders Carlsson37bbf792018-09-05 14:29:271421 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1422 "objc/api/video_codec/RTCVideoDecoderVP9.h",
Yura Yaroshevich8cfb2872021-03-03 09:29:421423 "objc/api/video_codec/RTCVideoEncoderAV1.h",
Anders Carlsson37bbf792018-09-05 14:29:271424 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1425 "objc/api/video_codec/RTCVideoEncoderVP9.h",
1426 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1427 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
1428 "objc/base/RTCCodecSpecificInfo.h",
1429 "objc/base/RTCEncodedImage.h",
1430 "objc/base/RTCI420Buffer.h",
1431 "objc/base/RTCLogging.h",
1432 "objc/base/RTCMacros.h",
1433 "objc/base/RTCMutableI420Buffer.h",
1434 "objc/base/RTCMutableYUVPlanarBuffer.h",
Yury Yaroshevich19a6e942022-03-11 08:22:081435 "objc/base/RTCSSLCertificateVerifier.h",
Anders Carlsson37bbf792018-09-05 14:29:271436 "objc/base/RTCVideoCapturer.h",
1437 "objc/base/RTCVideoCodecInfo.h",
1438 "objc/base/RTCVideoDecoder.h",
1439 "objc/base/RTCVideoDecoderFactory.h",
1440 "objc/base/RTCVideoEncoder.h",
1441 "objc/base/RTCVideoEncoderFactory.h",
1442 "objc/base/RTCVideoEncoderQpThresholds.h",
1443 "objc/base/RTCVideoEncoderSettings.h",
1444 "objc/base/RTCVideoFrame.h",
1445 "objc/base/RTCVideoFrameBuffer.h",
1446 "objc/base/RTCVideoRenderer.h",
1447 "objc/base/RTCYUVPlanarBuffer.h",
1448 "objc/components/capturer/RTCCameraVideoCapturer.h",
1449 "objc/components/capturer/RTCFileVideoCapturer.h",
1450 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
1451 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
1452 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1453 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1454 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1455 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1456 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1457 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1458 "objc/components/video_codec/RTCVideoDecoderH264.h",
1459 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1460 "objc/components/video_codec/RTCVideoEncoderH264.h",
1461 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1462 "objc/helpers/RTCDispatcher.h",
Anders Carlsson7bca8ca2018-08-30 07:30:291463 ]
Anders Carlsson37bbf792018-09-05 14:29:271464 if (!build_with_chromium) {
1465 sources += [
1466 "objc/api/logging/RTCCallbackLogger.h",
1467 "objc/api/peerconnection/RTCFileLogger.h",
1468 ]
1469 }
Anders Carlsson7bca8ca2018-08-30 07:30:291470
1471 deps = [
1472 ":base_objc",
1473 ":default_codec_factory_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:291474 ":native_api",
1475 ":native_video",
Jordan Rose53d3fc92021-07-06 19:16:411476 ":opengl_ui_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:291477 ":peerconnectionfactory_base_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:291478 ":videocapture_objc",
1479 ":videocodec_objc",
1480 ":videotoolbox_objc",
1481 "../rtc_base:rtc_base_approved",
Anders Carlsson7bca8ca2018-08-30 07:30:291482 ]
Anders Carlsson7bca8ca2018-08-30 07:30:291483 if (!build_with_chromium) {
1484 deps += [
1485 ":callback_logger_objc",
1486 ":file_logger_objc",
1487 ]
1488 }
1489
Sylvain Defresnec7f0dff2020-07-03 08:19:301490 frameworks = [
Anders Carlsson7bca8ca2018-08-30 07:30:291491 "AVFoundation.framework",
1492 "CoreGraphics.framework",
1493 "CoreMedia.framework",
1494 "OpenGL.framework",
1495 ]
1496
Anders Carlsson37bbf792018-09-05 14:29:271497 configs = [ "..:common_objc" ]
Anders Carlsson7bca8ca2018-08-30 07:30:291498
1499 public_configs = [ ":common_config_objc" ]
1500 }
1501
1502 bundle_data("mac_framework_bundle") {
Danil Chapovalov64f1f3f2020-01-16 13:41:101503 deps = [ "../sdk:mac_framework_objc" ]
1504 sources = [ "$root_build_dir/WebRTC.framework" ]
1505 outputs = [ "{{bundle_contents_dir}}/Frameworks/{{source_file_part}}" ]
Anders Carlsson7bca8ca2018-08-30 07:30:291506 }
Kári Tristan Helgasoncbe74352016-11-09 09:43:261507 }
1508
Mirko Bonadei86d053c2019-10-17 19:32:041509 rtc_library("wrapped_native_codec_objc") {
Anders Carlsson9823ee42018-03-07 09:32:031510 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:291511 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.h",
1512 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm",
1513 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.h",
1514 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm",
Anders Carlsson9823ee42018-03-07 09:32:031515 ]
1516
1517 configs += [ "..:common_objc" ]
1518 public_configs = [ ":common_config_objc" ]
1519
Anders Carlsson9823ee42018-03-07 09:32:031520 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:291521 ":base_objc",
1522 ":helpers_objc",
Anders Carlsson9823ee42018-03-07 09:32:031523 "../api/video_codecs:video_codecs_api",
1524 "../media:rtc_media_base",
1525 ]
1526 }
1527
Anders Carlsson3ff50fb2018-02-01 14:47:051528 # The native API is currently experimental and may change without notice.
Mirko Bonadei86d053c2019-10-17 19:32:041529 rtc_library("native_api") {
Anders Carlsson3ff50fb2018-02-01 14:47:051530 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 13:23:231531 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Anders Carlsson3ff50fb2018-02-01 14:47:051532 sources = [
Taylor Brandstetterea7fbfb2020-08-19 23:41:541533 "objc/native/api/network_monitor_factory.h",
1534 "objc/native/api/network_monitor_factory.mm",
Yury Yaroshevich19a6e942022-03-11 08:22:081535 "objc/native/api/ssl_certificate_verifier.h",
1536 "objc/native/api/ssl_certificate_verifier.mm",
Anders Carlsson7bca8ca2018-08-30 07:30:291537 "objc/native/api/video_capturer.h",
1538 "objc/native/api/video_capturer.mm",
1539 "objc/native/api/video_decoder_factory.h",
1540 "objc/native/api/video_decoder_factory.mm",
1541 "objc/native/api/video_encoder_factory.h",
1542 "objc/native/api/video_encoder_factory.mm",
1543 "objc/native/api/video_frame.h",
1544 "objc/native/api/video_frame.mm",
1545 "objc/native/api/video_frame_buffer.h",
1546 "objc/native/api/video_frame_buffer.mm",
1547 "objc/native/api/video_renderer.h",
1548 "objc/native/api/video_renderer.mm",
Anders Carlsson3ff50fb2018-02-01 14:47:051549 ]
1550
1551 configs += [ "..:common_objc" ]
1552
1553 public_configs = [ ":common_config_objc" ]
1554
Anders Carlsson3ff50fb2018-02-01 14:47:051555 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:291556 ":base_objc",
Anders Carlsson3ff50fb2018-02-01 14:47:051557 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221558 ":videoframebuffer_objc",
Anders Carlsson73119182018-03-15 08:41:031559 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 12:30:411560 "../api:media_stream_interface",
Mirko Bonadeid9708072019-01-25 19:26:481561 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 09:15:301562 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 10:59:381563 "../api/video:video_rtp_headers",
Anders Carlsson3ff50fb2018-02-01 14:47:051564 "../api/video_codecs:video_codecs_api",
1565 "../common_video",
Artem Titov94b57c02019-03-21 12:35:101566 "../rtc_base",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011567 "../rtc_base:threading",
Anders Carlsson3ff50fb2018-02-01 14:47:051568 ]
Taylor Brandstetterea7fbfb2020-08-19 23:41:541569 if (is_ios) {
1570 deps += [ ":native_network_monitor" ]
1571 }
Mirko Bonadei2dcf3482020-06-05 12:30:411572 absl_deps = [ "//third_party/abseil-cpp/absl/memory" ]
Anders Carlsson3ff50fb2018-02-01 14:47:051573 }
1574
Taylor Brandstetterea7fbfb2020-08-19 23:41:541575 if (is_ios) {
1576 rtc_library("native_network_monitor") {
1577 visibility = [ "*" ]
1578
1579 sources = [
1580 "objc/native/src/objc_network_monitor.h",
1581 "objc/native/src/objc_network_monitor.mm",
1582 ]
1583
1584 deps = [
1585 ":network_monitor_objc",
1586 ":network_monitor_observer",
Artem Titovd15a5752021-02-10 13:31:241587 "../api:sequence_checker",
Taylor Brandstetterea7fbfb2020-08-19 23:41:541588 "../rtc_base",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011589 "../rtc_base:threading",
Niels Möllerbe140b42021-03-11 09:24:061590 "../rtc_base/task_utils:pending_task_safety_flag",
1591 "../rtc_base/task_utils:to_queued_task",
Taylor Brandstetterea7fbfb2020-08-19 23:41:541592 ]
Ali Tofigh7fa90572022-03-17 14:47:491593
1594 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
Taylor Brandstetterea7fbfb2020-08-19 23:41:541595 }
1596 }
1597
Mirko Bonadei86d053c2019-10-17 19:32:041598 rtc_library("native_video") {
Anders Carlsson3ff50fb2018-02-01 14:47:051599 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:291600 "objc/native/src/objc_frame_buffer.h",
1601 "objc/native/src/objc_frame_buffer.mm",
1602 "objc/native/src/objc_video_decoder_factory.h",
1603 "objc/native/src/objc_video_decoder_factory.mm",
1604 "objc/native/src/objc_video_encoder_factory.h",
1605 "objc/native/src/objc_video_encoder_factory.mm",
1606 "objc/native/src/objc_video_frame.h",
1607 "objc/native/src/objc_video_frame.mm",
1608 "objc/native/src/objc_video_renderer.h",
1609 "objc/native/src/objc_video_renderer.mm",
1610 "objc/native/src/objc_video_track_source.h",
1611 "objc/native/src/objc_video_track_source.mm",
Anders Carlsson3ff50fb2018-02-01 14:47:051612 ]
1613
1614 configs += [ "..:common_objc" ]
1615
1616 public_configs = [ ":common_config_objc" ]
1617
Anders Carlsson3ff50fb2018-02-01 14:47:051618 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:291619 ":base_native_additions_objc",
1620 ":base_objc",
1621 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221622 ":videocodec_objc",
1623 ":videoframebuffer_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:291624 ":vpx_codec_constants",
Anders Carlsson9823ee42018-03-07 09:32:031625 ":wrapped_native_codec_objc",
Niels Möllerc6ce9c52018-05-11 09:15:301626 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 10:59:381627 "../api/video:video_rtp_headers",
Anders Carlsson3ff50fb2018-02-01 14:47:051628 "../api/video_codecs:video_codecs_api",
1629 "../common_video",
1630 "../media:rtc_audio_video",
1631 "../media:rtc_media_base",
Anders Carlsson3ff50fb2018-02-01 14:47:051632 "../modules/video_coding:video_codec_interface",
Artem Titov94b57c02019-03-21 12:35:101633 "../rtc_base",
Anders Carlsson3ff50fb2018-02-01 14:47:051634 "../rtc_base:checks",
Anders Carlsson3ff50fb2018-02-01 14:47:051635 ]
1636 }
1637
Mirko Bonadei86d053c2019-10-17 19:32:041638 rtc_library("video_toolbox_cc") {
Artem Titarenko42b43152018-10-29 17:18:091639 visibility = [
Mirko Bonadei08574ae2020-09-16 07:22:571640 ":sdk_unittests_sources",
Mirko Bonadeiaef8a212020-09-16 13:09:531641 ":videotoolbox_objc",
Artem Titarenko42b43152018-10-29 17:18:091642 ]
mbonadei2c8ac1b2017-05-31 12:14:261643 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:291644 "objc/components/video_codec/helpers.cc",
1645 "objc/components/video_codec/helpers.h",
1646 "objc/components/video_codec/nalu_rewriter.cc",
1647 "objc/components/video_codec/nalu_rewriter.h",
mbonadeic0af5ac2017-08-24 19:26:051648 ]
1649 deps = [
1650 "../common_video",
mbonadeic0af5ac2017-08-24 19:26:051651 "../modules/video_coding:webrtc_h264",
Patrik Höglunda8005cf2017-12-13 15:05:421652 "../rtc_base:checks",
mbonadeic0af5ac2017-08-24 19:26:051653 "../rtc_base:rtc_base_approved",
1654 ]
mbonadeic0af5ac2017-08-24 19:26:051655 }
1656
Mirko Bonadei86d053c2019-10-17 19:32:041657 rtc_library("videotoolbox_objc") {
Kári Tristan Helgason99bf77c2018-02-16 09:49:221658 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 13:23:231659 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadeic0af5ac2017-08-24 19:26:051660 sources = [
Anders Carlsson7bca8ca2018-08-30 07:30:291661 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1662 "objc/components/video_codec/RTCVideoDecoderFactoryH264.m",
1663 "objc/components/video_codec/RTCVideoDecoderH264.h",
1664 "objc/components/video_codec/RTCVideoDecoderH264.mm",
1665 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1666 "objc/components/video_codec/RTCVideoEncoderFactoryH264.m",
1667 "objc/components/video_codec/RTCVideoEncoderH264.h",
1668 "objc/components/video_codec/RTCVideoEncoderH264.mm",
mbonadei2c8ac1b2017-05-31 12:14:261669 ]
1670
Anders Carlsson358f2e02018-06-04 08:24:371671 configs += [
1672 "..:common_objc",
1673 ":used_from_extension",
1674 ]
1675
1676 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
1677 defines = [ "RTC_APPRTCMOBILE_BROADCAST_EXTENSION" ]
1678 }
mbonadei2c8ac1b2017-05-31 12:14:261679
1680 deps = [
Anders Carlsson7bca8ca2018-08-30 07:30:291681 ":base_native_additions_objc",
1682 ":base_objc",
1683 ":helpers_objc",
mbonadeic0af5ac2017-08-24 19:26:051684 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 09:49:221685 ":videocodec_objc",
1686 ":videoframebuffer_objc",
Johannes Kronc3fcee72021-04-19 07:09:261687 "../api/video_codecs:video_codecs_api",
mbonadei2c8ac1b2017-05-31 12:14:261688 "../common_video",
Patrik Höglund99175c62018-01-08 10:05:101689 "../modules/video_coding:video_codec_interface",
Patrik Höglunda8005cf2017-12-13 15:05:421690 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 17:40:471691 "../rtc_base:rtc_base_approved",
Mirko Bonadei401d0562017-12-14 10:24:001692 "//third_party/libyuv",
mbonadei2c8ac1b2017-05-31 12:14:261693 ]
1694
Sylvain Defresnec7f0dff2020-07-03 08:19:301695 frameworks = [
mbonadei2c8ac1b2017-05-31 12:14:261696 "CoreFoundation.framework",
1697 "CoreMedia.framework",
1698 "CoreVideo.framework",
1699 "VideoToolbox.framework",
1700 ]
Kári Tristan Helgasoncbe74352016-11-09 09:43:261701 }
1702 }
tkchin9eeb6242016-04-27 08:54:201703}