blob: 5f21ffe6418b6ba6006afcbd20fbdfdbc7a18f06 [file] [log] [blame]
tkchin9eeb6242016-04-27 01:54:20 -07001# Copyright 2016 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
philipel4eab9f42022-05-31 17:24:44 +02009import("//third_party/libaom/options.gni")
mbonadei9aa3f0a2017-01-24 06:58:22 -080010import("../webrtc.gni")
kthelgasonebc34e72016-09-15 04:30:18 -070011if (is_ios) {
oprypin45197522017-06-22 01:47:20 -070012 import("//build/config/ios/ios_sdk.gni")
Mirko Bonadei2ff3f492018-11-22 09:00:13 +010013 import("//build/config/ios/rules.gni")
kthelgasonebc34e72016-09-15 04:30:18 -070014}
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020015if (is_mac) {
16 import("//build/config/mac/rules.gni")
kthelgason2f088792017-05-30 01:48:47 -070017}
18
kjellander6ceab082016-10-28 05:44:03 -070019group("sdk") {
Henrik Kjellandera7d0df72017-06-27 08:56:46 +020020 public_deps = []
21 if (!build_with_chromium) {
22 if (is_android) {
23 public_deps += [ "android" ]
24 }
25 if (is_ios) {
kthelgason36d658d2017-08-24 05:43:45 -070026 public_deps += [ ":framework_objc" ]
Henrik Kjellandera7d0df72017-06-27 08:56:46 +020027 }
kjellander6ceab082016-10-28 05:44:03 -070028 }
29}
30
Mirko Bonadei86d053c2019-10-17 21:32:04 +020031rtc_library("media_constraints") {
Niels Möllerdac03d92019-02-13 08:52:27 +010032 sources = [
33 "media_constraints.cc",
34 "media_constraints.h",
35 ]
36 deps = [
37 "../api:audio_options_api",
38 "../api:libjingle_peerconnection_api",
Niels Möllerdac03d92019-02-13 08:52:27 +010039 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +020040 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
Niels Möllerdac03d92019-02-13 08:52:27 +010041}
42
Mirko Bonadei86d053c2019-10-17 21:32:04 +020043rtc_library("sdk_tests") {
Niels Möllerdac03d92019-02-13 08:52:27 +010044 testonly = true
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +010045 sources = [ "media_constraints_unittest.cc" ]
Niels Möllerdac03d92019-02-13 08:52:27 +010046 deps = [
47 ":media_constraints",
48 "../test:test_support",
49 ]
50}
51
kthelgasoncc2d1c62016-11-09 07:44:27 -080052if (is_ios || is_mac) {
kthelgason36d658d2017-08-24 05:43:45 -070053 config("common_config_objc") {
kjellander080a1e32016-05-25 11:37:11 -070054 include_dirs = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020055 "objc",
56
57 # This is needed so that framework headers can include base headers
58 # without pathname (so it works from within the framework module).
59 "objc/base",
kjellander080a1e32016-05-25 11:37:11 -070060 ]
Kári Tristan Helgason47d3a012017-10-24 15:28:51 +020061 cflags = [
Jiawei Ou4aeb35b2018-11-09 13:55:45 -080062 "-Wimplicit-retain-self",
Kári Tristan Helgason47d3a012017-10-24 15:28:51 +020063 "-Wstrict-overflow",
64 "-Wmissing-field-initializers",
65 ]
Artem Titarenko17ad64e2018-09-19 17:53:59 +020066
67 if (use_clang_coverage) {
68 configs = [ "//build/config/coverage:default_coverage" ]
69 }
kjellander080a1e32016-05-25 11:37:11 -070070 }
71
Anders Carlsson358f2e02018-06-04 10:24:37 +020072 config("used_from_extension") {
73 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
74 cflags = [ "-fapplication-extension" ]
75 }
76 }
77
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020078 # TODO(bugs.webrtc.org/9627): Remove this when unused. Targets should depend on base_objc
79 # or helpers_objc directly instead.
Mirko Bonadei86d053c2019-10-17 21:32:04 +020080 rtc_library("common_objc") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +020081 visibility = [ "*" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020082
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +010083 sources = [ "objc/helpers/noop.mm" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020084
85 public_configs = [ ":common_config_objc" ]
86
87 deps = [
88 ":base_objc",
89 ":helpers_objc",
90 ]
91 }
92
Mirko Bonadei86d053c2019-10-17 21:32:04 +020093 rtc_library("base_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020094 visibility = [ "*" ]
95 sources = [
96 "objc/base/RTCCodecSpecificInfo.h",
97 "objc/base/RTCEncodedImage.h",
98 "objc/base/RTCEncodedImage.m",
99 "objc/base/RTCI420Buffer.h",
100 "objc/base/RTCLogging.h",
101 "objc/base/RTCLogging.mm",
102 "objc/base/RTCMacros.h",
103 "objc/base/RTCMutableI420Buffer.h",
104 "objc/base/RTCMutableYUVPlanarBuffer.h",
Yury Yaroshevich19a6e942022-03-11 09:22:08 +0100105 "objc/base/RTCSSLCertificateVerifier.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200106 "objc/base/RTCVideoCapturer.h",
107 "objc/base/RTCVideoCapturer.m",
108 "objc/base/RTCVideoCodecInfo.h",
109 "objc/base/RTCVideoCodecInfo.m",
110 "objc/base/RTCVideoDecoder.h",
111 "objc/base/RTCVideoDecoderFactory.h",
112 "objc/base/RTCVideoEncoder.h",
113 "objc/base/RTCVideoEncoderFactory.h",
114 "objc/base/RTCVideoEncoderQpThresholds.h",
115 "objc/base/RTCVideoEncoderQpThresholds.m",
116 "objc/base/RTCVideoEncoderSettings.h",
117 "objc/base/RTCVideoEncoderSettings.m",
118 "objc/base/RTCVideoFrame.h",
119 "objc/base/RTCVideoFrame.mm",
120 "objc/base/RTCVideoFrameBuffer.h",
121 "objc/base/RTCVideoRenderer.h",
122 "objc/base/RTCYUVPlanarBuffer.h",
tkchin9eeb6242016-04-27 01:54:20 -0700123 ]
denicijad2088152017-04-28 02:14:54 -0700124
mbonadei1e060c62017-04-21 00:02:02 -0700125 deps = [
Artem Titov94b57c02019-03-21 13:35:10 +0100126 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100127 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +0200128 "../rtc_base:logging",
mbonadei1e060c62017-04-21 00:02:02 -0700129 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200130 configs += [
131 "..:common_objc",
132 ":used_from_extension",
133 ]
kthelgasonc0977102017-04-24 00:57:16 -0700134
kthelgason36d658d2017-08-24 05:43:45 -0700135 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200136 }
137
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200138 rtc_library("helpers_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200139 sources = [
Artem Titov63ee39d2022-05-13 14:46:42 +0000140 "objc/helpers/AVCaptureSession+DevicePosition.h",
141 "objc/helpers/AVCaptureSession+DevicePosition.mm",
142 "objc/helpers/NSString+StdString.h",
143 "objc/helpers/NSString+StdString.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200144 "objc/helpers/RTCDispatcher+Private.h",
145 "objc/helpers/RTCDispatcher.h",
146 "objc/helpers/RTCDispatcher.m",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200147 "objc/helpers/scoped_cftyperef.h",
148 ]
149
150 deps = [
151 ":base_objc",
152 "../rtc_base:checks",
153 ]
154
Ali Tofigh6364d082022-03-14 13:32:04 +0100155 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
156
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200157 frameworks = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200158 "AVFoundation.framework",
159 "CoreMedia.framework",
160 ]
161
162 configs += [
163 "..:common_objc",
164 ":used_from_extension",
165 ]
166
167 public_configs = [ ":common_config_objc" ]
denicijad2088152017-04-28 02:14:54 -0700168
kjellander3bcedd32016-06-08 01:14:15 -0700169 if (is_ios) {
170 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200171 "objc/helpers/RTCCameraPreviewView.h",
172 "objc/helpers/RTCCameraPreviewView.m",
173 "objc/helpers/UIDevice+RTCDevice.h",
174 "objc/helpers/UIDevice+RTCDevice.mm",
175 ]
176 }
177 }
178
179 if (!build_with_chromium) {
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200180 rtc_library("callback_logger_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200181 sources = [
182 "objc/api/logging/RTCCallbackLogger.h",
183 "objc/api/logging/RTCCallbackLogger.mm",
184 ]
185
186 deps = [
187 ":base_objc",
Ali Tofigh6364d082022-03-14 13:32:04 +0100188 ":helpers_objc",
Artem Titov94b57c02019-03-21 13:35:10 +0100189 "../rtc_base",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200190 "../rtc_base:checks",
191 "../rtc_base:logging",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200192 ]
193
194 configs += [
195 "..:common_objc",
196 ":used_from_extension",
kjellander3bcedd32016-06-08 01:14:15 -0700197 ]
Ali Tofigh6364d082022-03-14 13:32:04 +0100198
199 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
denicijad2088152017-04-28 02:14:54 -0700200 }
201
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200202 rtc_library("file_logger_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200203 sources = [
204 "objc/api/peerconnection/RTCFileLogger.h",
205 "objc/api/peerconnection/RTCFileLogger.mm",
206 ]
207
208 deps = [
209 ":base_objc",
Artem Titov94b57c02019-03-21 13:35:10 +0100210 "../rtc_base",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200211 "../rtc_base:checks",
212 "../rtc_base:logging",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200213 ]
214
215 configs += [
216 "..:common_objc",
217 ":used_from_extension",
kthelgason2f088792017-05-30 01:48:47 -0700218 ]
219 }
220 }
221
mbonadei2c8ac1b2017-05-31 05:14:26 -0700222 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100223 if (is_ios) {
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200224 rtc_library("native_api_audio_device_module") {
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200225 visibility = [ "*" ]
226
227 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200228 "objc/native/api/audio_device_module.h",
229 "objc/native/api/audio_device_module.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200230 ]
231
232 deps = [
233 ":audio_device",
Niels Möller105711e2022-06-14 15:48:26 +0200234 "../api:make_ref_counted",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200235 "../modules/audio_device:audio_device_api",
236 "../modules/audio_device:audio_device_generic",
237 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +0200238 "../rtc_base:logging",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200239 "../system_wrappers",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200240 ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200241 }
242
243 rtc_source_set("audio_session_observer") {
244 visibility = [ ":*" ]
245
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +0100246 sources = [ "objc/native/src/audio/audio_session_observer.h" ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200247
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100248 deps = [
249 "../rtc_base",
250 "../rtc_base:threading",
251 ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200252 }
253
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200254 rtc_library("audio_device") {
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200255 visibility = [ "*" ]
256
257 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200258 "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 10:22:36 +0200266 ]
267
268 deps = [
269 ":audio_objc",
270 ":audio_session_observer",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200271 ":base_objc",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200272 "../api:array_view",
Florent Castelli8d4e9fb2022-04-04 17:18:21 +0200273 "../api:sequence_checker",
Danil Chapovalova6cb1502019-06-27 15:16:34 +0200274 "../api/task_queue",
275 "../api/task_queue:default_task_queue_factory",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200276 "../modules/audio_device:audio_device_api",
277 "../modules/audio_device:audio_device_buffer",
278 "../modules/audio_device:audio_device_generic",
Artem Titov94b57c02019-03-21 13:35:10 +0100279 "../rtc_base",
Florent Castelli3a9e6872022-04-26 22:54:59 +0200280 "../rtc_base:buffer",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200281 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +0200282 "../rtc_base:logging",
Florent Castelli4467ad72022-04-04 15:18:46 +0200283 "../rtc_base:macromagic",
Florent Castellif86f6f92022-04-05 02:54:12 +0200284 "../rtc_base:refcount",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100285 "../rtc_base:threading",
Florent Castellidd837e22022-04-04 17:16:15 +0200286 "../rtc_base:timeutils",
Kári Tristan Helgasonf49429d2019-03-28 11:03:27 +0100287 "../system_wrappers:field_trial",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200288 "../system_wrappers:metrics",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200289 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200290 absl_deps = [ "//third_party/abseil-cpp/absl/base:core_headers" ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200291
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200292 frameworks = [ "AudioToolbox.framework" ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200293 }
294
Joe Chen0b3a6e32019-12-26 23:01:42 -0800295 # 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 08:31:06 -0800326 visibility = [ "*" ]
327
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100328 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200329 "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 10:49:22 +0100335 ]
Joe Chen0b3a6e32019-12-26 23:01:42 -0800336
Anders Carlsson358f2e02018-06-04 10:24:37 +0200337 configs += [
338 "..:common_objc",
339 ":used_from_extension",
340 ]
denicija59ee91b2017-06-05 05:48:47 -0700341
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100342 public_configs = [ ":common_config_objc" ]
Anders Carlsson8ecfd802017-09-15 14:07:30 +0200343
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200344 frameworks = [ "AVFoundation.framework" ]
Jiawei Ouc9e6b962018-10-09 12:33:06 -0700345
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100346 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200347 ":base_objc",
348 ":helpers_objc",
Artem Titov94b57c02019-03-21 13:35:10 +0100349 "../rtc_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100350 "../rtc_base:checks",
Niels Möller072c0082021-02-15 16:30:44 +0100351 "../rtc_base/synchronization:mutex",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100352 ]
Byoungchan Lee0a54e7a2021-09-06 22:32:52 +0900353
354 absl_deps = [ "//third_party/abseil-cpp/absl/base:core_headers" ]
denicija59ee91b2017-06-05 05:48:47 -0700355 }
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -0700356
357 rtc_source_set("network_monitor_observer") {
358 visibility = [ ":*" ]
359
360 sources = [ "objc/native/src/network_monitor_observer.h" ]
361
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100362 deps = [
363 "../rtc_base",
364 "../rtc_base:network_constants",
Florent Castelli57aa81b2022-04-04 17:14:02 +0200365 "../rtc_base:stringutils",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100366 "../rtc_base:threading",
367 ]
Ali Tofigh7fa90572022-03-17 15:47:49 +0100368
369 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -0700370 }
371
372 rtc_library("network_monitor_objc") {
373 visibility = [ "*" ]
374
375 sources = [
376 "objc/components/network/RTCNetworkMonitor+Private.h",
377 "objc/components/network/RTCNetworkMonitor.h",
378 "objc/components/network/RTCNetworkMonitor.mm",
379 ]
380
381 configs += [ ":used_from_extension" ]
382
383 frameworks = [ "Network.framework" ]
384
385 deps = [
386 ":base_objc",
387 ":helpers_objc",
388 ":network_monitor_observer",
Ali Tofigh7fa90572022-03-17 15:47:49 +0100389 "../rtc_base:stringutils",
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -0700390 "../rtc_base/system:gcd_helpers",
391 ]
392 }
denicija59ee91b2017-06-05 05:48:47 -0700393 }
zhihuanga4c113a2017-06-28 14:05:44 -0700394
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200395 rtc_library("videosource_objc") {
zhihuanga4c113a2017-06-28 14:05:44 -0700396 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200397 "objc/api/peerconnection/RTCVideoSource+Private.h",
398 "objc/api/peerconnection/RTCVideoSource.h",
399 "objc/api/peerconnection/RTCVideoSource.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700400 ]
401
402 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200403 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100404 ":mediasource_objc",
405 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100406 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700407 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 14:30:41 +0200408 "../api:media_stream_interface",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200409 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +0200410 "../api/video:video_rtp_headers",
zhihuanga4c113a2017-06-28 14:05:44 -0700411 "../common_video",
412 "../media:rtc_media_base",
Harald Alvestrande5a73f52022-03-28 12:06:34 +0000413 "../pc:video_track_source_proxy",
Artem Titov94b57c02019-03-21 13:35:10 +0100414 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100415 "../rtc_base:checks",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100416 "../rtc_base:threading",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100417 "//third_party/libyuv",
zhihuanga4c113a2017-06-28 14:05:44 -0700418 ]
419
Anders Carlsson358f2e02018-06-04 10:24:37 +0200420 configs += [
421 "..:common_objc",
422 ":used_from_extension",
423 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700424 }
425
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200426 rtc_library("videoframebuffer_objc") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200427 visibility = [ "*" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100428 sources = [
Anders Carlsson4e5af962018-09-03 14:44:50 +0200429 "objc/api/video_frame_buffer/RTCNativeI420Buffer+Private.h",
430 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
431 "objc/api/video_frame_buffer/RTCNativeI420Buffer.mm",
432 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
433 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200434 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
435 "objc/components/video_frame_buffer/RTCCVPixelBuffer.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100436 ]
437 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200438 ":base_objc",
Florent Castelli0af55ba2022-04-04 15:06:30 +0200439 "../rtc_base:logging",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200440 "//api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +0200441 "//api/video:video_rtp_headers",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100442 "//common_video",
443 "//rtc_base:checks",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100444 "//third_party/libyuv",
445 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200446 configs += [
447 "..:common_objc",
448 ":used_from_extension",
449 ]
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200450 frameworks = [
Kári Tristan Helgason8a1e35c2019-03-07 10:44:26 +0100451 "VideoToolbox.framework",
Oleh Prypinb3f78de2019-07-18 22:25:48 +0200452 "CoreGraphics.framework",
Kári Tristan Helgason8a1e35c2019-03-07 10:44:26 +0100453 "CoreVideo.framework",
454 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100455 }
456
Jordan Rose53d3fc92021-07-06 12:16:41 -0700457 rtc_library("opengl_objc") {
kthelgason2f088792017-05-30 01:48:47 -0700458 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200459 "objc/components/renderer/opengl/RTCDefaultShader.h",
460 "objc/components/renderer/opengl/RTCDefaultShader.mm",
461 "objc/components/renderer/opengl/RTCI420TextureCache.h",
462 "objc/components/renderer/opengl/RTCI420TextureCache.mm",
463 "objc/components/renderer/opengl/RTCOpenGLDefines.h",
464 "objc/components/renderer/opengl/RTCShader.h",
465 "objc/components/renderer/opengl/RTCShader.mm",
466 "objc/components/renderer/opengl/RTCVideoViewShading.h",
kthelgason2f088792017-05-30 01:48:47 -0700467 ]
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200468 frameworks = [ "CoreVideo.framework" ]
denicijad2088152017-04-28 02:14:54 -0700469 if (is_ios) {
denicija070d5e32017-02-26 11:44:13 -0800470 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200471 "objc/components/renderer/opengl/RTCNV12TextureCache.h",
472 "objc/components/renderer/opengl/RTCNV12TextureCache.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700473 ]
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200474 frameworks += [
mbonadei2c8ac1b2017-05-31 05:14:26 -0700475 "GLKit.framework",
476 "OpenGLES.framework",
477 "QuartzCore.framework",
478 ]
479 } else if (is_mac) {
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200480 frameworks += [
mbonadei2c8ac1b2017-05-31 05:14:26 -0700481 "CoreMedia.framework",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700482 "OpenGL.framework",
denicija070d5e32017-02-26 11:44:13 -0800483 ]
484 }
Mirko Bonadei6b09c452021-07-05 16:47:49 +0200485
486 # TODO(bugs.webrtc.org/12937): Remove OpenGL deprecation warning
487 # workaround.
Björn Terelius02768ae2021-07-02 16:19:32 +0200488 defines = [ "GLES_SILENCE_DEPRECATION" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700489
kthelgason2f088792017-05-30 01:48:47 -0700490 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200491 ":base_objc",
492 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100493 ":mediaconstraints_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100494 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100495 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100496 ":videosource_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700497 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200498 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +0200499 "../api/video:video_rtp_headers",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700500 "../common_video",
501 "../media:rtc_media_base",
Artem Titov94b57c02019-03-21 13:35:10 +0100502 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100503 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +0200504 "../rtc_base:logging",
tkchin9eeb6242016-04-27 01:54:20 -0700505 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200506 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700507
Anders Carlsson358f2e02018-06-04 10:24:37 +0200508 configs += [
509 "..:common_objc",
510 ":used_from_extension",
511 ]
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800512 }
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800513
Jordan Rose53d3fc92021-07-06 12:16:41 -0700514 rtc_library("opengl_ui_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000515 visibility = [ "*" ]
Jake Brombergfb7fd242021-06-14 13:44:25 -0700516 allow_poison = [
517 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
518 "default_task_queue",
519 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700520 if (is_ios) {
521 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200522 "objc/components/renderer/opengl/RTCDisplayLinkTimer.h",
523 "objc/components/renderer/opengl/RTCDisplayLinkTimer.m",
524 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
525 "objc/components/renderer/opengl/RTCEAGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700526 ]
Mirko Bonadei6b09c452021-07-05 16:47:49 +0200527
528 # TODO(bugs.webrtc.org/12937): Remove OpenGL deprecation warning
529 # workaround.
Björn Terelius02768ae2021-07-02 16:19:32 +0200530 defines = [ "GLES_SILENCE_DEPRECATION" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700531 }
532 if (is_mac) {
533 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200534 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
535 "objc/components/renderer/opengl/RTCNSGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700536 ]
537 }
538 configs += [ "..:common_objc" ]
539 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200540 ":base_objc",
541 ":helpers_objc",
Jake Brombergfb7fd242021-06-14 13:44:25 -0700542 ":metal_objc",
Jordan Rose53d3fc92021-07-06 12:16:41 -0700543 ":opengl_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100544 ":videocapture_objc",
545 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700546 ]
547 }
kthelgasonebc34e72016-09-15 04:30:18 -0700548
Jake Brombergfb7fd242021-06-14 13:44:25 -0700549 rtc_library("metal_objc") {
550 visibility = [ "*" ]
551 allow_poison = [
552 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
553 "default_task_queue",
554 ]
555 sources = [
556 "objc/components/renderer/metal/RTCMTLI420Renderer.h",
557 "objc/components/renderer/metal/RTCMTLI420Renderer.mm",
558 "objc/components/renderer/metal/RTCMTLNV12Renderer.h",
559 "objc/components/renderer/metal/RTCMTLNV12Renderer.mm",
560 "objc/components/renderer/metal/RTCMTLRGBRenderer.h",
561 "objc/components/renderer/metal/RTCMTLRGBRenderer.mm",
562 "objc/components/renderer/metal/RTCMTLRenderer+Private.h",
563 "objc/components/renderer/metal/RTCMTLRenderer.h",
564 "objc/components/renderer/metal/RTCMTLRenderer.mm",
565 ]
566 frameworks = [
567 "CoreVideo.framework",
568 "Metal.framework",
569 "MetalKit.framework",
570 ]
571 if (is_ios) {
572 sources += [
573 "objc/components/renderer/metal/RTCMTLVideoView.h",
574 "objc/components/renderer/metal/RTCMTLVideoView.m",
Danil Chapovalov41300af2019-07-10 12:44:43 +0200575 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700576 }
Jake Brombergfb7fd242021-06-14 13:44:25 -0700577 if (is_mac) {
578 sources += [
579 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
580 "objc/components/renderer/metal/RTCMTLNSVideoView.m",
581 ]
582 frameworks += [ "AppKit.framework" ]
583 }
584 deps = [
585 ":base_objc",
586 ":peerconnectionfactory_base_objc",
Jake Brombergfb7fd242021-06-14 13:44:25 -0700587 ":videoframebuffer_objc",
588 "../api/video:video_frame",
589 "../api/video:video_rtp_headers",
590 "../rtc_base:checks",
Jake Brombergfb7fd242021-06-14 13:44:25 -0700591 ]
592 configs += [ "..:common_objc" ]
593 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700594 }
595
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200596 # TODO(bugs.webrtc.org/9627): Remove this target.
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200597 rtc_library("videocapturebase_objc") {
Anders Carlsson73119182018-03-15 09:41:03 +0100598 visibility = [ "*" ]
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +0100599 sources = [ "objc/helpers/noop.mm" ]
Anders Carlsson73119182018-03-15 09:41:03 +0100600
601 configs += [ "..:common_objc" ]
602
603 public_configs = [ ":common_config_objc" ]
604
605 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200606 ":base_objc",
Anders Carlsson73119182018-03-15 09:41:03 +0100607 ":videoframebuffer_objc",
608 ]
609 }
610
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200611 rtc_library("videocapture_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000612 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100613 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadei2c8ac1b2017-05-31 05:14:26 -0700614 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200615 "objc/components/capturer/RTCCameraVideoCapturer.h",
616 "objc/components/capturer/RTCCameraVideoCapturer.m",
Mirko Bonadei19640aa2020-10-19 16:12:43 +0200617 "objc/components/capturer/RTCFileVideoCapturer.h",
618 "objc/components/capturer/RTCFileVideoCapturer.m",
zhihuanga4c113a2017-06-28 14:05:44 -0700619 ]
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200620 frameworks = [
Kári Tristan Helgason8a1e35c2019-03-07 10:44:26 +0100621 "AVFoundation.framework",
622 "CoreVideo.framework",
Mirko Bonadei19640aa2020-10-19 16:12:43 +0200623 "QuartzCore.framework",
Kári Tristan Helgason8a1e35c2019-03-07 10:44:26 +0100624 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700625
zhihuanga4c113a2017-06-28 14:05:44 -0700626 configs += [ "..:common_objc" ]
627
kthelgason36d658d2017-08-24 05:43:45 -0700628 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700629
zhihuanga4c113a2017-06-28 14:05:44 -0700630 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200631 ":base_objc",
632 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100633 ":videoframebuffer_objc",
Yura Yaroshevichebf739b2020-03-16 18:00:59 +0300634 "../rtc_base/system:gcd_helpers",
zhihuanga4c113a2017-06-28 14:05:44 -0700635 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700636 }
637
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200638 rtc_library("videocodec_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200639 visibility = [ "*" ]
Mirko Bonadei96ede162018-09-06 13:45:44 +0200640 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100641 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200642 "objc/components/video_codec/RTCCodecSpecificInfoH264+Private.h",
643 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
644 "objc/components/video_codec/RTCCodecSpecificInfoH264.mm",
645 "objc/components/video_codec/RTCH264ProfileLevelId.h",
646 "objc/components/video_codec/RTCH264ProfileLevelId.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700647 ]
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300648 if (is_ios) {
649 sources += [
Artem Titov63ee39d2022-05-13 14:46:42 +0000650 "objc/components/video_codec/UIDevice+H264Profile.h",
651 "objc/components/video_codec/UIDevice+H264Profile.mm",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300652 ]
653 }
Mirko Bonadeifc52b912019-03-01 10:32:56 +0100654
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100655 public_configs = [ ":common_config_objc" ]
656 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200657 ":base_objc",
658 ":helpers_objc",
kthelgasonfb143122017-07-25 07:55:58 -0700659 "../api/video_codecs:video_codecs_api",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100660 "../common_video",
zhihuanga4c113a2017-06-28 14:05:44 -0700661 "../media:rtc_media_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100662 "../modules/video_coding:video_codec_interface",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200663 "../rtc_base:checks",
zhihuanga4c113a2017-06-28 14:05:44 -0700664 ]
665 }
666
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200667 rtc_library("default_codec_factory_objc") {
Anders Carlssondd8c1652018-01-30 10:32:13 +0100668 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200669 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
670 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.m",
671 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
672 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.m",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100673 ]
674
675 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200676 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100677 ":native_video",
678 ":videocodec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200679 ":videotoolbox_objc",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +0200680 ":vp8",
681 ":vp9",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200682 ":vpx_codec_constants",
683 ]
Philip Eliasson91c05ab2022-06-22 14:24:59 +0200684
685 defines = []
686 if (enable_libaom) {
687 defines += [ "RTC_USE_LIBAOM_AV1_ENCODER" ]
688 deps += [ ":libaom_av1_encoder" ]
689 }
philipeld44badf2022-07-04 10:44:14 +0200690
691 if (rtc_include_dav1d_in_internal_decoder_factory) {
692 deps += [ ":dav1d_decoder" ]
693 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200694 }
695
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200696 rtc_library("vpx_codec_constants") {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200697 configs += [ "..:no_global_constructors" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200698 sources = [
699 "objc/api/video_codec/RTCVideoCodecConstants.h",
700 "objc/api/video_codec/RTCVideoCodecConstants.mm",
701 ]
702
703 deps = [
704 ":base_objc",
705 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100706 ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100707 }
708
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200709 rtc_library("vp8") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100710 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200711 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100712 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200713 "objc/api/video_codec/RTCVideoDecoderVP8.h",
714 "objc/api/video_codec/RTCVideoDecoderVP8.mm",
715 "objc/api/video_codec/RTCVideoEncoderVP8.h",
716 "objc/api/video_codec/RTCVideoEncoderVP8.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100717 ]
718
Anders Carlssondd8c1652018-01-30 10:32:13 +0100719 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200720 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100721 ":wrapped_native_codec_objc",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100722 "../modules/video_coding:webrtc_vp8",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100723 ]
724 }
725
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200726 rtc_library("vp9") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100727 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200728 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100729 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200730 "objc/api/video_codec/RTCVideoDecoderVP9.h",
731 "objc/api/video_codec/RTCVideoDecoderVP9.mm",
732 "objc/api/video_codec/RTCVideoEncoderVP9.h",
733 "objc/api/video_codec/RTCVideoEncoderVP9.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100734 ]
735
Anders Carlssondd8c1652018-01-30 10:32:13 +0100736 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200737 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100738 ":wrapped_native_codec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200739 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100740 "../modules/video_coding:webrtc_vp9",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100741 ]
742 }
743
philipeld44badf2022-07-04 10:44:14 +0200744 rtc_library("dav1d_decoder") {
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +0300745 visibility = [ "*" ]
746 allow_poison = [ "software_video_codecs" ]
747 sources = [
748 "objc/api/video_codec/RTCVideoDecoderAV1.h",
749 "objc/api/video_codec/RTCVideoDecoderAV1.mm",
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +0300750 ]
751
752 deps = [
753 ":base_objc",
754 ":wrapped_native_codec_objc",
755 "../media:rtc_media_base",
philipeld44badf2022-07-04 10:44:14 +0200756 "../modules/video_coding/codecs/av1:dav1d_decoder",
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +0300757 ]
Philip Eliasson91c05ab2022-06-22 14:24:59 +0200758 }
philipel4eab9f42022-05-31 17:24:44 +0200759
Philip Eliasson91c05ab2022-06-22 14:24:59 +0200760 rtc_library("libaom_av1_encoder") {
761 visibility = [ "*" ]
762 allow_poison = [ "software_video_codecs" ]
763 sources = [
764 "objc/api/video_codec/RTCVideoEncoderAV1.h",
765 "objc/api/video_codec/RTCVideoEncoderAV1.mm",
766 ]
767
768 deps = [
769 ":base_objc",
770 ":wrapped_native_codec_objc",
771 "../media:rtc_media_base",
772 "../modules/video_coding/codecs/av1:libaom_av1_encoder",
773 ]
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +0300774 }
775
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200776 rtc_library("mediaconstraints_objc") {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200777 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100778 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200779 "objc/api/peerconnection/RTCMediaConstraints+Private.h",
780 "objc/api/peerconnection/RTCMediaConstraints.h",
781 "objc/api/peerconnection/RTCMediaConstraints.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100782 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100783
784 public_configs = [ ":common_config_objc" ]
785 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200786 ":base_objc",
787 ":helpers_objc",
Niels Möllerdac03d92019-02-13 08:52:27 +0100788 ":media_constraints",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100789 ]
790 }
791
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200792 # TODO(bugs.webrtc.org/9627): Remove, targets should depend on base_objc.
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200793 rtc_library("videorenderer_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200794 visibility = [ "*" ]
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +0100795 sources = [ "objc/helpers/noop.mm" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100796
797 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100798 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200799
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +0100800 deps = [ ":base_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100801 }
802
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200803 rtc_library("videorendereradapter_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200804 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100805 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Anders Carlsson9823ee42018-03-07 10:32:03 +0100806 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200807 "objc/api/RTCVideoRendererAdapter+Private.h",
808 "objc/api/RTCVideoRendererAdapter.h",
809 "objc/api/RTCVideoRendererAdapter.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100810 ]
811
812 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100813 public_configs = [ ":common_config_objc" ]
814
815 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200816 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100817 ":native_api",
818 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100819 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 14:30:41 +0200820 "../api:media_stream_interface",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100821 ]
822 }
823
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200824 rtc_library("mediasource_objc") {
Anders Carlsson9823ee42018-03-07 10:32:03 +0100825 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200826 "objc/api/peerconnection/RTCMediaSource+Private.h",
827 "objc/api/peerconnection/RTCMediaSource.h",
828 "objc/api/peerconnection/RTCMediaSource.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100829 ]
830
Anders Carlsson358f2e02018-06-04 10:24:37 +0200831 configs += [
832 "..:common_objc",
833 ":used_from_extension",
834 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100835 public_configs = [ ":common_config_objc" ]
836
837 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200838 ":base_objc",
Niels Möllere942b142019-09-17 14:30:41 +0200839 "../api:media_stream_interface",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100840 "../rtc_base:checks",
841 ]
842 }
843
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200844 rtc_library("base_native_additions_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200845 sources = [
846 "objc/api/peerconnection/RTCEncodedImage+Private.h",
847 "objc/api/peerconnection/RTCEncodedImage+Private.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200848 "objc/api/peerconnection/RTCVideoCodecInfo+Private.h",
849 "objc/api/peerconnection/RTCVideoCodecInfo+Private.mm",
850 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.h",
851 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.mm",
852 ]
853
854 configs += [ "..:common_objc" ]
855
856 public_configs = [ ":common_config_objc" ]
857
858 deps = [
859 ":base_objc",
860 ":helpers_objc",
Niels Möller4dc66c52018-10-05 14:17:58 +0200861 "../api/video:encoded_image",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200862 "../api/video_codecs:video_codecs_api",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200863 "../modules/video_coding:video_codec_interface",
Artem Titov94b57c02019-03-21 13:35:10 +0100864 "../rtc_base",
Florent Castellif86f6f92022-04-05 02:54:12 +0200865 "../rtc_base:refcount",
Florent Castellie10a9f62022-04-04 17:04:37 +0200866 "../rtc_base:safe_conversions",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200867 ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200868 }
869
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200870 rtc_library("peerconnectionfactory_base_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200871 visibility = [ "*" ]
Danil Chapovalov41300af2019-07-10 12:44:43 +0200872 allow_poison = [
873 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
874 "default_task_queue",
875 ]
Byoungchan Lee524a4222021-11-19 19:03:49 +0900876 configs += [ "..:no_global_constructors" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700877 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200878 "objc/api/peerconnection/RTCAudioSource+Private.h",
879 "objc/api/peerconnection/RTCAudioSource.h",
880 "objc/api/peerconnection/RTCAudioSource.mm",
881 "objc/api/peerconnection/RTCAudioTrack+Private.h",
882 "objc/api/peerconnection/RTCAudioTrack.h",
883 "objc/api/peerconnection/RTCAudioTrack.mm",
884 "objc/api/peerconnection/RTCCertificate.h",
885 "objc/api/peerconnection/RTCCertificate.mm",
886 "objc/api/peerconnection/RTCConfiguration+Native.h",
887 "objc/api/peerconnection/RTCConfiguration+Private.h",
888 "objc/api/peerconnection/RTCConfiguration.h",
889 "objc/api/peerconnection/RTCConfiguration.mm",
Benjamin Wright8c27cca2018-10-25 10:16:44 -0700890 "objc/api/peerconnection/RTCCryptoOptions.h",
891 "objc/api/peerconnection/RTCCryptoOptions.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200892 "objc/api/peerconnection/RTCDataChannel+Private.h",
893 "objc/api/peerconnection/RTCDataChannel.h",
894 "objc/api/peerconnection/RTCDataChannel.mm",
895 "objc/api/peerconnection/RTCDataChannelConfiguration+Private.h",
896 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
897 "objc/api/peerconnection/RTCDataChannelConfiguration.mm",
898 "objc/api/peerconnection/RTCDtmfSender+Private.h",
899 "objc/api/peerconnection/RTCDtmfSender.h",
900 "objc/api/peerconnection/RTCDtmfSender.mm",
901 "objc/api/peerconnection/RTCFieldTrials.h",
902 "objc/api/peerconnection/RTCFieldTrials.mm",
903 "objc/api/peerconnection/RTCIceCandidate+Private.h",
904 "objc/api/peerconnection/RTCIceCandidate.h",
905 "objc/api/peerconnection/RTCIceCandidate.mm",
Jaehyun Kod2110982021-11-30 19:01:43 +0900906 "objc/api/peerconnection/RTCIceCandidateErrorEvent+Private.h",
907 "objc/api/peerconnection/RTCIceCandidateErrorEvent.h",
908 "objc/api/peerconnection/RTCIceCandidateErrorEvent.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200909 "objc/api/peerconnection/RTCIceServer+Private.h",
910 "objc/api/peerconnection/RTCIceServer.h",
911 "objc/api/peerconnection/RTCIceServer.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200912 "objc/api/peerconnection/RTCLegacyStatsReport+Private.h",
913 "objc/api/peerconnection/RTCLegacyStatsReport.h",
914 "objc/api/peerconnection/RTCLegacyStatsReport.mm",
915 "objc/api/peerconnection/RTCMediaStream+Private.h",
916 "objc/api/peerconnection/RTCMediaStream.h",
917 "objc/api/peerconnection/RTCMediaStream.mm",
918 "objc/api/peerconnection/RTCMediaStreamTrack+Private.h",
919 "objc/api/peerconnection/RTCMediaStreamTrack.h",
920 "objc/api/peerconnection/RTCMediaStreamTrack.mm",
921 "objc/api/peerconnection/RTCMetrics.h",
922 "objc/api/peerconnection/RTCMetrics.mm",
923 "objc/api/peerconnection/RTCMetricsSampleInfo+Private.h",
924 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
925 "objc/api/peerconnection/RTCMetricsSampleInfo.mm",
926 "objc/api/peerconnection/RTCPeerConnection+DataChannel.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200927 "objc/api/peerconnection/RTCPeerConnection+Private.h",
928 "objc/api/peerconnection/RTCPeerConnection+Stats.mm",
929 "objc/api/peerconnection/RTCPeerConnection.h",
930 "objc/api/peerconnection/RTCPeerConnection.mm",
931 "objc/api/peerconnection/RTCPeerConnectionFactory+Native.h",
932 "objc/api/peerconnection/RTCPeerConnectionFactory+Private.h",
933 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
934 "objc/api/peerconnection/RTCPeerConnectionFactory.mm",
935 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.h",
936 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.mm",
937 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.h",
938 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.mm",
939 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions+Private.h",
940 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
941 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.mm",
942 "objc/api/peerconnection/RTCRtcpParameters+Private.h",
943 "objc/api/peerconnection/RTCRtcpParameters.h",
944 "objc/api/peerconnection/RTCRtcpParameters.mm",
945 "objc/api/peerconnection/RTCRtpCodecParameters+Private.h",
946 "objc/api/peerconnection/RTCRtpCodecParameters.h",
947 "objc/api/peerconnection/RTCRtpCodecParameters.mm",
948 "objc/api/peerconnection/RTCRtpEncodingParameters+Private.h",
949 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
950 "objc/api/peerconnection/RTCRtpEncodingParameters.mm",
951 "objc/api/peerconnection/RTCRtpHeaderExtension+Private.h",
952 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
953 "objc/api/peerconnection/RTCRtpHeaderExtension.mm",
954 "objc/api/peerconnection/RTCRtpParameters+Private.h",
955 "objc/api/peerconnection/RTCRtpParameters.h",
956 "objc/api/peerconnection/RTCRtpParameters.mm",
Benjamin Wrightddf1a3e2018-10-02 10:20:58 -0700957 "objc/api/peerconnection/RTCRtpReceiver+Native.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200958 "objc/api/peerconnection/RTCRtpReceiver+Private.h",
959 "objc/api/peerconnection/RTCRtpReceiver.h",
960 "objc/api/peerconnection/RTCRtpReceiver.mm",
Benjamin Wrightddf1a3e2018-10-02 10:20:58 -0700961 "objc/api/peerconnection/RTCRtpSender+Native.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200962 "objc/api/peerconnection/RTCRtpSender+Private.h",
963 "objc/api/peerconnection/RTCRtpSender.h",
964 "objc/api/peerconnection/RTCRtpSender.mm",
965 "objc/api/peerconnection/RTCRtpTransceiver+Private.h",
966 "objc/api/peerconnection/RTCRtpTransceiver.h",
967 "objc/api/peerconnection/RTCRtpTransceiver.mm",
968 "objc/api/peerconnection/RTCSSLAdapter.h",
969 "objc/api/peerconnection/RTCSSLAdapter.mm",
970 "objc/api/peerconnection/RTCSessionDescription+Private.h",
971 "objc/api/peerconnection/RTCSessionDescription.h",
972 "objc/api/peerconnection/RTCSessionDescription.mm",
Peter Hanspersbed86042019-02-21 17:27:09 +0100973 "objc/api/peerconnection/RTCStatisticsReport+Private.h",
974 "objc/api/peerconnection/RTCStatisticsReport.h",
975 "objc/api/peerconnection/RTCStatisticsReport.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200976 "objc/api/peerconnection/RTCTracing.h",
977 "objc/api/peerconnection/RTCTracing.mm",
978 "objc/api/peerconnection/RTCVideoTrack+Private.h",
979 "objc/api/peerconnection/RTCVideoTrack.h",
980 "objc/api/peerconnection/RTCVideoTrack.mm",
kthelgason5fe4d492016-12-05 11:27:30 -0800981 ]
kthelgasonebc34e72016-09-15 04:30:18 -0700982
Anders Carlsson358f2e02018-06-04 10:24:37 +0200983 configs += [
984 "..:common_objc",
985 ":used_from_extension",
986 ]
kthelgason36d658d2017-08-24 05:43:45 -0700987 public_configs = [ ":common_config_objc" ]
kthelgasonc0977102017-04-24 00:57:16 -0700988
mbonadei2c8ac1b2017-05-31 05:14:26 -0700989 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200990 ":base_native_additions_objc",
991 ":base_objc",
992 ":file_logger_objc",
993 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100994 ":mediaconstraints_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100995 ":mediasource_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100996 ":native_api",
997 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100998 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100999 ":videorendereradapter_objc",
1000 ":videosource_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001001 ":videotoolbox_objc",
Mirko Bonadeie51f7852017-12-06 11:23:19 +01001002 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 14:30:41 +02001003 "../api:media_stream_interface",
Niels Möller695cf6a2019-05-13 12:27:23 +02001004 "../api:rtc_event_log_output_file",
Peter Hanspersbed86042019-02-21 17:27:09 +01001005 "../api:rtc_stats_api",
Niels Möller6dcd4dc2019-08-26 10:45:28 +02001006 "../api:rtp_parameters",
Mirko Bonadeid9708072019-01-25 20:26:48 +01001007 "../api:scoped_refptr",
Jiawei Ouae810c12018-06-20 16:18:59 -07001008 "../api/audio_codecs:audio_codecs_api",
Karl Wiberg5817d3d2018-04-06 10:06:42 +02001009 "../api/audio_codecs:builtin_audio_decoder_factory",
Jiawei Ouae810c12018-06-20 16:18:59 -07001010 "../api/audio_codecs:builtin_audio_encoder_factory",
Mirko Bonadeieaaaf412019-09-13 14:42:15 +02001011 "../api/crypto:frame_decryptor_interface",
1012 "../api/crypto:frame_encryptor_interface",
Danil Chapovalov4ba04b72019-06-26 15:49:47 +02001013 "../api/rtc_event_log:rtc_event_log_factory",
Danil Chapovalovaaa11432019-05-17 13:20:14 +02001014 "../api/task_queue:default_task_queue_factory",
Erik Språngceb44952020-09-22 11:36:35 +02001015 "../api/transport:field_trial_based_config",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001016 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +02001017 "../api/video:video_rtp_headers",
Anders Carlsson7e042812017-10-05 16:55:38 +02001018 "../api/video_codecs:video_codecs_api",
Anders Carlssone5960ce2017-06-22 15:26:30 +02001019 "../common_video",
Mirko Bonadei2fdf2222022-06-24 10:00:49 +02001020 "../media:rtc_audio_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001021 "../media:rtc_media_base",
Jiawei Ouae810c12018-06-20 16:18:59 -07001022 "../modules/audio_device:audio_device_api",
Artem Titov94b57c02019-03-21 13:35:10 +01001023 "../modules/audio_processing",
Alessio Bazzicab768e882018-11-07 14:29:54 +00001024 "../modules/audio_processing:api",
Patrik Höglund99175c62018-01-08 11:05:10 +01001025 "../modules/video_coding:video_codec_interface",
Harald Alvestrandc1e8aeb2022-03-31 19:53:50 +00001026 "../pc:peer_connection_factory",
1027 "../pc:webrtc_sdp",
Artem Titov94b57c02019-03-21 13:35:10 +01001028 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001029 "../rtc_base:checks",
Florent Castellia30aef32022-04-19 17:47:13 +02001030 "../rtc_base:event_tracer",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001031 "../rtc_base:logging",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001032 "../rtc_base:network_constants",
Florent Castellie10a9f62022-04-04 17:04:37 +02001033 "../rtc_base:safe_conversions",
Ali Tofigh969c1352022-05-13 10:26:58 +02001034 "../rtc_base:stringutils",
Byoungchan Lee2b46a582022-06-21 09:19:34 +09001035 "../rtc_base:threading",
Florent Castellidd837e22022-04-04 17:16:15 +02001036 "../rtc_base:timeutils",
Harald Alvestrandc1e8aeb2022-03-31 19:53:50 +00001037 "../stats:rtc_stats",
Mirko Bonadei17f48782018-09-28 08:51:10 +02001038 "../system_wrappers:field_trial",
1039 "../system_wrappers:metrics",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001040 ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001041
1042 if (is_ios) {
1043 deps += [ ":native_api_audio_device_module" ]
1044 }
kthelgasonebc34e72016-09-15 04:30:18 -07001045 }
Zeke Chindd0e1e02016-10-11 13:27:26 -07001046
mbonadei2c8ac1b2017-05-31 05:14:26 -07001047 if (rtc_include_tests) {
Daniela012b56b2017-11-15 13:15:24 +01001048 if (is_ios) {
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001049 rtc_library("sdk_unittests_sources") {
Danielaae012cf2017-10-12 13:46:00 +02001050 testonly = true
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001051 include_dirs = [ "objc/" ]
Daniela012b56b2017-11-15 13:15:24 +01001052
Danielaae012cf2017-10-12 13:46:00 +02001053 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001054 "objc/unittests/ObjCVideoTrackSource_xctest.mm",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001055 "objc/unittests/RTCAudioSessionTest.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001056 "objc/unittests/RTCCVPixelBuffer_xctest.mm",
1057 "objc/unittests/RTCCallbackLogger_xctest.m",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001058 "objc/unittests/RTCCameraVideoCapturerTests.mm",
1059 "objc/unittests/RTCCertificateTest.mm",
1060 "objc/unittests/RTCConfigurationTest.mm",
1061 "objc/unittests/RTCDataChannelConfigurationTest.mm",
Kári Tristan Helgasonecbdbf62020-02-20 07:34:45 -08001062 "objc/unittests/RTCEncodedImage_xctest.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001063 "objc/unittests/RTCFileVideoCapturer_xctest.mm",
1064 "objc/unittests/RTCH264ProfileLevelId_xctest.m",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001065 "objc/unittests/RTCIceCandidateTest.mm",
1066 "objc/unittests/RTCIceServerTest.mm",
Jake Brombergfb7fd242021-06-14 13:44:25 -07001067 "objc/unittests/RTCMTLVideoView_xctest.m",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001068 "objc/unittests/RTCMediaConstraintsTest.mm",
Aaron Goldenfb4e9bc2019-01-04 12:03:31 -08001069 "objc/unittests/RTCNV12TextureCache_xctest.m",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001070 "objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001071 "objc/unittests/RTCPeerConnectionFactory_xctest.m",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001072 "objc/unittests/RTCPeerConnectionTest.mm",
1073 "objc/unittests/RTCSessionDescriptionTest.mm",
1074 "objc/unittests/RTCTracingTest.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001075 "objc/unittests/frame_buffer_helpers.h",
1076 "objc/unittests/frame_buffer_helpers.mm",
Artem Titarenko42b43152018-10-29 18:18:09 +01001077 "objc/unittests/nalu_rewriter_xctest.mm",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001078 "objc/unittests/objc_video_decoder_factory_tests.mm",
1079 "objc/unittests/objc_video_encoder_factory_tests.mm",
1080 "objc/unittests/scoped_cftyperef_tests.mm",
Danielaae012cf2017-10-12 13:46:00 +02001081 ]
Daniela012b56b2017-11-15 13:15:24 +01001082
Mirko Bonadei6b09c452021-07-05 16:47:49 +02001083 # TODO(bugs.webrtc.org/12937): Remove OpenGL deprecation warning
1084 # workaround.
1085 defines = [ "GLES_SILENCE_DEPRECATION" ]
1086
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001087 # TODO(peterhanspers): Reenable these tests on simulator.
1088 # See bugs.webrtc.org/7812
Lahiru Ginnaliya Gamathige1d0e7b62020-10-20 02:43:02 -07001089 if (target_environment != "simulator") {
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001090 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001091 "objc/unittests/RTCAudioDeviceModule_xctest.mm",
1092 "objc/unittests/RTCAudioDevice_xctest.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001093 ]
1094 }
1095
Danielaae012cf2017-10-12 13:46:00 +02001096 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001097 ":audio_device",
Joe Chen0b3a6e32019-12-26 23:01:42 -08001098 ":audio_session_objc",
Kári Tristan Helgasonecbdbf62020-02-20 07:34:45 -08001099 ":base_native_additions_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001100 ":base_objc",
1101 ":callback_logger_objc",
Anders Carlssondc6b4772018-01-15 13:31:03 +01001102 ":framework_objc",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001103 ":helpers_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001104 ":mediaconstraints_objc",
Jake Brombergfb7fd242021-06-14 13:44:25 -07001105 ":metal_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001106 ":native_api",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001107 ":native_api_audio_device_module",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001108 ":native_video",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001109 ":peerconnectionfactory_base_objc",
Artem Titarenko42b43152018-10-29 18:18:09 +01001110 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001111 ":videocapture_objc",
Anders Carlsson79ce8202018-06-01 12:51:09 +02001112 ":videocodec_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001113 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001114 ":videosource_objc",
Danielaae012cf2017-10-12 13:46:00 +02001115 ":videotoolbox_objc",
Mirko Bonadeid9708072019-01-25 20:26:48 +01001116 "../api:scoped_refptr",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001117 "../api/audio_codecs:builtin_audio_decoder_factory",
1118 "../api/audio_codecs:builtin_audio_encoder_factory",
Byoungchan Lee43bd7602019-10-08 23:58:41 +09001119 "../api/task_queue:default_task_queue_factory",
Ilya Nikolaevskiy38e9b062020-10-08 14:36:33 +00001120 "../api/video:video_frame",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001121 "../api/video_codecs:video_codecs_api",
Artem Titov94b57c02019-03-21 13:35:10 +01001122 "../common_video",
Danielaae012cf2017-10-12 13:46:00 +02001123 "../media:rtc_media_base",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001124 "../media:rtc_media_tests_utils",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001125 "../modules/audio_device:audio_device_api",
1126 "../modules/audio_processing:api",
1127 "../modules/video_coding:video_codec_interface",
Artem Titov94b57c02019-03-21 13:35:10 +01001128 "../rtc_base",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001129 "../rtc_base:gunit_helpers",
Florent Castelli4467ad72022-04-04 15:18:46 +02001130 "../rtc_base:macromagic",
Florent Castellif86f6f92022-04-05 02:54:12 +02001131 "../rtc_base:refcount",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001132 "../rtc_base:rtc_event",
Byoungchan Lee83ceb902021-11-16 11:31:57 +09001133 "../rtc_base/system:unused",
Artem Titov94b57c02019-03-21 13:35:10 +01001134 "../system_wrappers",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001135 "../test:test_support", # TODO(webrtc:8382): Remove use of gtest
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001136 "//third_party/libyuv",
Danielaae012cf2017-10-12 13:46:00 +02001137 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001138
Jordan Rose53d3fc92021-07-06 12:16:41 -07001139 if (rtc_ios_macos_use_opengl_rendering) {
1140 deps += [ ":opengl_objc" ]
1141 }
1142
Danielaae012cf2017-10-12 13:46:00 +02001143 public_deps = [
1144 "//build/config/ios:xctest",
1145 "//third_party/ocmock",
1146 ]
1147 }
1148
Daniela012b56b2017-11-15 13:15:24 +01001149 bundle_data("sdk_unittests_bundle_data") {
Daniela012b56b2017-11-15 13:15:24 +01001150 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001151 "objc/unittests/audio_short16.pcm",
1152 "objc/unittests/audio_short44.pcm",
1153 "objc/unittests/audio_short48.pcm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001154
1155 # Sample video taken from https://media.xiph.org/video/derf/
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001156 "objc/unittests/foreman.mp4",
Daniela012b56b2017-11-15 13:15:24 +01001157 ]
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +01001158 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
Daniela012b56b2017-11-15 13:15:24 +01001159 }
1160
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001161 # These tests use static linking.
Mirko Bonadeiaef8a212020-09-16 15:09:53 +02001162 rtc_test("sdk_unittests") {
1163 is_xctest = true
Danielaae012cf2017-10-12 13:46:00 +02001164 info_plist = "//test/ios/Info.plist"
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +01001165 sources = [ "objc/unittests/main.mm" ]
Daniela012b56b2017-11-15 13:15:24 +01001166
Artem Titarenkoa2bc3622019-08-19 14:24:00 +02001167 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=generic-unit-test" ]
Danielaae012cf2017-10-12 13:46:00 +02001168 deps = [
Yura Yaroshevich5297bd22018-06-19 12:51:51 +03001169 ":peerconnectionfactory_base_objc",
Daniela012b56b2017-11-15 13:15:24 +01001170 ":sdk_unittests_bundle_data",
Danielaae012cf2017-10-12 13:46:00 +02001171 ":sdk_unittests_sources",
Niels Möller5a8f8602019-06-12 11:30:59 +02001172 "../rtc_base",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001173 "../rtc_base:threading",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001174 "//test:test_support",
Danielaae012cf2017-10-12 13:46:00 +02001175 ]
1176 ldflags = [ "-all_load" ]
1177 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001178
1179 # These tests link to the framework.
Mirko Bonadeiaef8a212020-09-16 15:09:53 +02001180 rtc_test("sdk_framework_unittests") {
1181 is_xctest = true
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001182 info_plist = "//test/ios/Info.plist"
1183 sources = [
1184 "objc/unittests/RTCDoNotPutCPlusPlusInFrameworkHeaders_xctest.m",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001185 "objc/unittests/main.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001186 ]
1187
Artem Titarenkoa2bc3622019-08-19 14:24:00 +02001188 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=generic-unit-test" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001189 deps = [
1190 ":framework_objc+link",
1191 ":ios_framework_bundle",
Niels Möller5a8f8602019-06-12 11:30:59 +02001192 "../rtc_base",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001193 "../rtc_base:threading",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001194 "//test:test_support",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001195 ]
1196 }
Danielaae012cf2017-10-12 13:46:00 +02001197 }
kthelgason2f088792017-05-30 01:48:47 -07001198 }
1199
mbonadei2c8ac1b2017-05-31 05:14:26 -07001200 if (is_ios) {
Byoungchan Lee26b23b82022-04-08 18:23:14 +09001201 apple_framework_bundle_with_umbrella_header("framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001202 info_plist = "objc/Info.plist"
mbonadei2c8ac1b2017-05-31 05:14:26 -07001203 output_name = "WebRTC"
Magnus Jedvertf83dc8b2017-08-29 09:49:43 +00001204
mbonadei2c8ac1b2017-05-31 05:14:26 -07001205 common_objc_headers = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001206 "objc/base/RTCCodecSpecificInfo.h",
1207 "objc/base/RTCEncodedImage.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001208 "objc/base/RTCI420Buffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001209 "objc/base/RTCLogging.h",
1210 "objc/base/RTCMacros.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001211 "objc/base/RTCMutableI420Buffer.h",
1212 "objc/base/RTCMutableYUVPlanarBuffer.h",
Yury Yaroshevich19a6e942022-03-11 09:22:08 +01001213 "objc/base/RTCSSLCertificateVerifier.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001214 "objc/base/RTCVideoCapturer.h",
1215 "objc/base/RTCVideoCodecInfo.h",
1216 "objc/base/RTCVideoDecoder.h",
1217 "objc/base/RTCVideoDecoderFactory.h",
1218 "objc/base/RTCVideoEncoder.h",
1219 "objc/base/RTCVideoEncoderFactory.h",
1220 "objc/base/RTCVideoEncoderQpThresholds.h",
1221 "objc/base/RTCVideoEncoderSettings.h",
1222 "objc/base/RTCVideoFrame.h",
1223 "objc/base/RTCVideoFrameBuffer.h",
1224 "objc/base/RTCVideoRenderer.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001225 "objc/base/RTCYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001226 "objc/components/audio/RTCAudioSession.h",
1227 "objc/components/audio/RTCAudioSessionConfiguration.h",
1228 "objc/components/capturer/RTCCameraVideoCapturer.h",
1229 "objc/components/capturer/RTCFileVideoCapturer.h",
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001230 "objc/components/network/RTCNetworkMonitor.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001231 "objc/components/renderer/metal/RTCMTLVideoView.h",
1232 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
1233 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1234 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1235 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1236 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1237 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1238 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1239 "objc/components/video_codec/RTCVideoDecoderH264.h",
1240 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1241 "objc/components/video_codec/RTCVideoEncoderH264.h",
1242 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1243 "objc/helpers/RTCCameraPreviewView.h",
1244 "objc/helpers/RTCDispatcher.h",
1245 "objc/helpers/UIDevice+RTCDevice.h",
1246 "objc/api/peerconnection/RTCAudioSource.h",
1247 "objc/api/peerconnection/RTCAudioTrack.h",
1248 "objc/api/peerconnection/RTCConfiguration.h",
1249 "objc/api/peerconnection/RTCDataChannel.h",
1250 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1251 "objc/api/peerconnection/RTCFieldTrials.h",
1252 "objc/api/peerconnection/RTCIceCandidate.h",
Jaehyun Kod2110982021-11-30 19:01:43 +09001253 "objc/api/peerconnection/RTCIceCandidateErrorEvent.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001254 "objc/api/peerconnection/RTCIceServer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001255 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1256 "objc/api/peerconnection/RTCMediaConstraints.h",
1257 "objc/api/peerconnection/RTCMediaSource.h",
1258 "objc/api/peerconnection/RTCMediaStream.h",
1259 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1260 "objc/api/peerconnection/RTCMetrics.h",
1261 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1262 "objc/api/peerconnection/RTCPeerConnection.h",
1263 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1264 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1265 "objc/api/peerconnection/RTCRtcpParameters.h",
1266 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1267 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1268 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1269 "objc/api/peerconnection/RTCRtpParameters.h",
1270 "objc/api/peerconnection/RTCRtpReceiver.h",
1271 "objc/api/peerconnection/RTCRtpSender.h",
1272 "objc/api/peerconnection/RTCRtpTransceiver.h",
1273 "objc/api/peerconnection/RTCDtmfSender.h",
1274 "objc/api/peerconnection/RTCSSLAdapter.h",
1275 "objc/api/peerconnection/RTCSessionDescription.h",
CZ Theng682dabd2019-10-21 11:25:18 +08001276 "objc/api/peerconnection/RTCStatisticsReport.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001277 "objc/api/peerconnection/RTCTracing.h",
1278 "objc/api/peerconnection/RTCCertificate.h",
Benjamin Wright8c27cca2018-10-25 10:16:44 -07001279 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001280 "objc/api/peerconnection/RTCVideoSource.h",
1281 "objc/api/peerconnection/RTCVideoTrack.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001282 "objc/api/video_codec/RTCVideoCodecConstants.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001283 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1284 "objc/api/video_codec/RTCVideoDecoderVP9.h",
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +03001285 "objc/api/video_codec/RTCVideoDecoderAV1.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001286 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1287 "objc/api/video_codec/RTCVideoEncoderVP9.h",
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +03001288 "objc/api/video_codec/RTCVideoEncoderAV1.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001289 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1290 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001291 ]
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001292
mbonadei2c8ac1b2017-05-31 05:14:26 -07001293 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001294 common_objc_headers += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001295 "objc/api/logging/RTCCallbackLogger.h",
1296 "objc/api/peerconnection/RTCFileLogger.h",
Anders Carlsson3b3364e2018-01-30 15:46:13 +01001297 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001298 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001299
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001300 sources = common_objc_headers
1301 public_headers = common_objc_headers
1302
mbonadei2c8ac1b2017-05-31 05:14:26 -07001303 ldflags = [
1304 "-all_load",
1305 "-install_name",
1306 "@rpath/$output_name.framework/$output_name",
1307 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001308
mbonadei2c8ac1b2017-05-31 05:14:26 -07001309 deps = [
kthelgason36d658d2017-08-24 05:43:45 -07001310 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001311 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001312 ":default_codec_factory_objc",
Mirko Bonadei91d39752022-01-19 08:43:17 +01001313 ":metal_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001314 ":native_api",
1315 ":native_video",
1316 ":peerconnectionfactory_base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001317 ":videocapture_objc",
1318 ":videocodec_objc",
1319 ":videotoolbox_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001320 ]
Jordan Rose53d3fc92021-07-06 12:16:41 -07001321 if (rtc_ios_macos_use_opengl_rendering) {
1322 deps += [ ":opengl_ui_objc" ]
1323 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001324 if (!build_with_chromium) {
1325 deps += [
1326 ":callback_logger_objc",
1327 ":file_logger_objc",
1328 ]
1329 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001330
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +02001331 frameworks = [
mbonadei2c8ac1b2017-05-31 05:14:26 -07001332 "AVFoundation.framework",
1333 "CoreGraphics.framework",
1334 "CoreMedia.framework",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001335 ]
1336
Byoungchan Lee26b23b82022-04-08 18:23:14 +09001337 configs = [
Anders Carlsson358f2e02018-06-04 10:24:37 +02001338 "..:common_objc",
1339 ":used_from_extension",
1340 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001341
kthelgason36d658d2017-08-24 05:43:45 -07001342 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001343 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001344
1345 bundle_data("ios_framework_bundle") {
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +01001346 deps = [ "../sdk:framework_objc" ]
1347 sources = [ "$root_build_dir/WebRTC.framework" ]
1348 outputs = [ "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001349 }
1350 }
1351
1352 if (is_mac) {
Byoungchan Lee26b23b82022-04-08 18:23:14 +09001353 apple_framework_bundle_with_umbrella_header("mac_framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001354 info_plist = "objc/Info.plist"
1355 output_name = "WebRTC"
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001356
Anders Carlsson37bbf792018-09-05 16:29:27 +02001357 sources = [
1358 "objc/api/peerconnection/RTCAudioSource.h",
1359 "objc/api/peerconnection/RTCAudioTrack.h",
1360 "objc/api/peerconnection/RTCCertificate.h",
1361 "objc/api/peerconnection/RTCConfiguration.h",
Benjamin Wright8c27cca2018-10-25 10:16:44 -07001362 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001363 "objc/api/peerconnection/RTCDataChannel.h",
1364 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1365 "objc/api/peerconnection/RTCDtmfSender.h",
1366 "objc/api/peerconnection/RTCFieldTrials.h",
1367 "objc/api/peerconnection/RTCIceCandidate.h",
Jaehyun Kod2110982021-11-30 19:01:43 +09001368 "objc/api/peerconnection/RTCIceCandidateErrorEvent.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001369 "objc/api/peerconnection/RTCIceServer.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001370 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1371 "objc/api/peerconnection/RTCMediaConstraints.h",
1372 "objc/api/peerconnection/RTCMediaSource.h",
1373 "objc/api/peerconnection/RTCMediaStream.h",
1374 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1375 "objc/api/peerconnection/RTCMetrics.h",
1376 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1377 "objc/api/peerconnection/RTCPeerConnection.h",
1378 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1379 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1380 "objc/api/peerconnection/RTCRtcpParameters.h",
1381 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1382 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1383 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1384 "objc/api/peerconnection/RTCRtpParameters.h",
1385 "objc/api/peerconnection/RTCRtpReceiver.h",
1386 "objc/api/peerconnection/RTCRtpSender.h",
1387 "objc/api/peerconnection/RTCRtpTransceiver.h",
1388 "objc/api/peerconnection/RTCSSLAdapter.h",
1389 "objc/api/peerconnection/RTCSessionDescription.h",
Saúl Ibarra Corretgéf7aa2672021-07-28 23:09:14 +02001390 "objc/api/peerconnection/RTCStatisticsReport.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001391 "objc/api/peerconnection/RTCTracing.h",
1392 "objc/api/peerconnection/RTCVideoSource.h",
1393 "objc/api/peerconnection/RTCVideoTrack.h",
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +03001394 "objc/api/video_codec/RTCVideoDecoderAV1.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001395 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1396 "objc/api/video_codec/RTCVideoDecoderVP9.h",
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +03001397 "objc/api/video_codec/RTCVideoEncoderAV1.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001398 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1399 "objc/api/video_codec/RTCVideoEncoderVP9.h",
1400 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1401 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
1402 "objc/base/RTCCodecSpecificInfo.h",
1403 "objc/base/RTCEncodedImage.h",
1404 "objc/base/RTCI420Buffer.h",
1405 "objc/base/RTCLogging.h",
1406 "objc/base/RTCMacros.h",
1407 "objc/base/RTCMutableI420Buffer.h",
1408 "objc/base/RTCMutableYUVPlanarBuffer.h",
Yury Yaroshevich19a6e942022-03-11 09:22:08 +01001409 "objc/base/RTCSSLCertificateVerifier.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001410 "objc/base/RTCVideoCapturer.h",
1411 "objc/base/RTCVideoCodecInfo.h",
1412 "objc/base/RTCVideoDecoder.h",
1413 "objc/base/RTCVideoDecoderFactory.h",
1414 "objc/base/RTCVideoEncoder.h",
1415 "objc/base/RTCVideoEncoderFactory.h",
1416 "objc/base/RTCVideoEncoderQpThresholds.h",
1417 "objc/base/RTCVideoEncoderSettings.h",
1418 "objc/base/RTCVideoFrame.h",
1419 "objc/base/RTCVideoFrameBuffer.h",
1420 "objc/base/RTCVideoRenderer.h",
1421 "objc/base/RTCYUVPlanarBuffer.h",
1422 "objc/components/capturer/RTCCameraVideoCapturer.h",
1423 "objc/components/capturer/RTCFileVideoCapturer.h",
1424 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
1425 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
1426 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1427 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1428 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1429 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1430 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1431 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1432 "objc/components/video_codec/RTCVideoDecoderH264.h",
1433 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1434 "objc/components/video_codec/RTCVideoEncoderH264.h",
1435 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1436 "objc/helpers/RTCDispatcher.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001437 ]
Anders Carlsson37bbf792018-09-05 16:29:27 +02001438 if (!build_with_chromium) {
1439 sources += [
1440 "objc/api/logging/RTCCallbackLogger.h",
1441 "objc/api/peerconnection/RTCFileLogger.h",
1442 ]
1443 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001444
1445 deps = [
1446 ":base_objc",
1447 ":default_codec_factory_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001448 ":native_api",
1449 ":native_video",
Jordan Rose53d3fc92021-07-06 12:16:41 -07001450 ":opengl_ui_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001451 ":peerconnectionfactory_base_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001452 ":videocapture_objc",
1453 ":videocodec_objc",
1454 ":videotoolbox_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001455 ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001456 if (!build_with_chromium) {
1457 deps += [
1458 ":callback_logger_objc",
1459 ":file_logger_objc",
1460 ]
1461 }
1462
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +02001463 frameworks = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001464 "AVFoundation.framework",
1465 "CoreGraphics.framework",
1466 "CoreMedia.framework",
1467 "OpenGL.framework",
1468 ]
1469
Anders Carlsson37bbf792018-09-05 16:29:27 +02001470 configs = [ "..:common_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001471
1472 public_configs = [ ":common_config_objc" ]
1473 }
1474
1475 bundle_data("mac_framework_bundle") {
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +01001476 deps = [ "../sdk:mac_framework_objc" ]
1477 sources = [ "$root_build_dir/WebRTC.framework" ]
1478 outputs = [ "{{bundle_contents_dir}}/Frameworks/{{source_file_part}}" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001479 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001480 }
1481
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001482 rtc_library("wrapped_native_codec_objc") {
Anders Carlsson9823ee42018-03-07 10:32:03 +01001483 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001484 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.h",
1485 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm",
1486 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.h",
1487 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001488 ]
1489
1490 configs += [ "..:common_objc" ]
1491 public_configs = [ ":common_config_objc" ]
1492
Anders Carlsson9823ee42018-03-07 10:32:03 +01001493 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001494 ":base_objc",
1495 ":helpers_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001496 "../api/video_codecs:video_codecs_api",
1497 "../media:rtc_media_base",
1498 ]
1499 }
1500
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001501 # The native API is currently experimental and may change without notice.
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001502 rtc_library("native_api") {
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001503 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +01001504 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001505 sources = [
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001506 "objc/native/api/network_monitor_factory.h",
1507 "objc/native/api/network_monitor_factory.mm",
Yury Yaroshevich19a6e942022-03-11 09:22:08 +01001508 "objc/native/api/ssl_certificate_verifier.h",
1509 "objc/native/api/ssl_certificate_verifier.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001510 "objc/native/api/video_capturer.h",
1511 "objc/native/api/video_capturer.mm",
1512 "objc/native/api/video_decoder_factory.h",
1513 "objc/native/api/video_decoder_factory.mm",
1514 "objc/native/api/video_encoder_factory.h",
1515 "objc/native/api/video_encoder_factory.mm",
1516 "objc/native/api/video_frame.h",
1517 "objc/native/api/video_frame.mm",
1518 "objc/native/api/video_frame_buffer.h",
1519 "objc/native/api/video_frame_buffer.mm",
1520 "objc/native/api/video_renderer.h",
1521 "objc/native/api/video_renderer.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001522 ]
1523
1524 configs += [ "..:common_objc" ]
1525
1526 public_configs = [ ":common_config_objc" ]
1527
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001528 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001529 ":base_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001530 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001531 ":videoframebuffer_objc",
Anders Carlsson73119182018-03-15 09:41:03 +01001532 "../api:libjingle_peerconnection_api",
Niels Möller105711e2022-06-14 15:48:26 +02001533 "../api:make_ref_counted",
Niels Möllere942b142019-09-17 14:30:41 +02001534 "../api:media_stream_interface",
Mirko Bonadeid9708072019-01-25 20:26:48 +01001535 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001536 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +02001537 "../api/video:video_rtp_headers",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001538 "../api/video_codecs:video_codecs_api",
1539 "../common_video",
Artem Titov94b57c02019-03-21 13:35:10 +01001540 "../rtc_base",
Florent Castelli3a9e6872022-04-26 22:54:59 +02001541 "../rtc_base:buffer",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001542 "../rtc_base:logging",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001543 "../rtc_base:threading",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001544 ]
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001545 if (is_ios) {
1546 deps += [ ":native_network_monitor" ]
1547 }
Mirko Bonadei2dcf3482020-06-05 14:30:41 +02001548 absl_deps = [ "//third_party/abseil-cpp/absl/memory" ]
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001549 }
1550
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001551 if (is_ios) {
1552 rtc_library("native_network_monitor") {
1553 visibility = [ "*" ]
1554
1555 sources = [
1556 "objc/native/src/objc_network_monitor.h",
1557 "objc/native/src/objc_network_monitor.mm",
1558 ]
1559
1560 deps = [
1561 ":network_monitor_objc",
1562 ":network_monitor_observer",
Jonas Orelande62c2f22022-03-29 11:04:48 +02001563 "../api:field_trials_view",
Artem Titovd15a5752021-02-10 14:31:24 +01001564 "../api:sequence_checker",
Artem Titovc374d112022-06-16 21:27:45 +02001565 "../api/task_queue:pending_task_safety_flag",
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001566 "../rtc_base",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001567 "../rtc_base:logging",
Florent Castelli4467ad72022-04-04 15:18:46 +02001568 "../rtc_base:macromagic",
Florent Castelli57aa81b2022-04-04 17:14:02 +02001569 "../rtc_base:stringutils",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001570 "../rtc_base:threading",
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001571 ]
Ali Tofigh7fa90572022-03-17 15:47:49 +01001572
1573 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001574 }
1575 }
1576
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001577 rtc_library("native_video") {
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001578 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001579 "objc/native/src/objc_frame_buffer.h",
1580 "objc/native/src/objc_frame_buffer.mm",
1581 "objc/native/src/objc_video_decoder_factory.h",
1582 "objc/native/src/objc_video_decoder_factory.mm",
1583 "objc/native/src/objc_video_encoder_factory.h",
1584 "objc/native/src/objc_video_encoder_factory.mm",
1585 "objc/native/src/objc_video_frame.h",
1586 "objc/native/src/objc_video_frame.mm",
1587 "objc/native/src/objc_video_renderer.h",
1588 "objc/native/src/objc_video_renderer.mm",
1589 "objc/native/src/objc_video_track_source.h",
1590 "objc/native/src/objc_video_track_source.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001591 ]
1592
1593 configs += [ "..:common_objc" ]
1594
1595 public_configs = [ ":common_config_objc" ]
1596
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001597 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001598 ":base_native_additions_objc",
1599 ":base_objc",
1600 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001601 ":videocodec_objc",
1602 ":videoframebuffer_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001603 ":vpx_codec_constants",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001604 ":wrapped_native_codec_objc",
Niels Möller105711e2022-06-14 15:48:26 +02001605 "../api:make_ref_counted",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001606 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +02001607 "../api/video:video_rtp_headers",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001608 "../api/video_codecs:video_codecs_api",
1609 "../common_video",
1610 "../media:rtc_audio_video",
1611 "../media:rtc_media_base",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001612 "../modules/video_coding:video_codec_interface",
Artem Titov94b57c02019-03-21 13:35:10 +01001613 "../rtc_base",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001614 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001615 "../rtc_base:logging",
Florent Castellib1dc4e42022-04-14 13:20:12 +02001616 "../rtc_base:timestamp_aligner",
Florent Castellidd837e22022-04-04 17:16:15 +02001617 "../rtc_base:timeutils",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001618 ]
1619 }
1620
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001621 rtc_library("video_toolbox_cc") {
Artem Titarenko42b43152018-10-29 18:18:09 +01001622 visibility = [
Mirko Bonadei08574ae2020-09-16 07:22:57 +00001623 ":sdk_unittests_sources",
Mirko Bonadeiaef8a212020-09-16 15:09:53 +02001624 ":videotoolbox_objc",
Artem Titarenko42b43152018-10-29 18:18:09 +01001625 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001626 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001627 "objc/components/video_codec/helpers.cc",
1628 "objc/components/video_codec/helpers.h",
1629 "objc/components/video_codec/nalu_rewriter.cc",
1630 "objc/components/video_codec/nalu_rewriter.h",
mbonadeic0af5ac2017-08-24 12:26:05 -07001631 ]
1632 deps = [
1633 "../common_video",
mbonadeic0af5ac2017-08-24 12:26:05 -07001634 "../modules/video_coding:webrtc_h264",
Florent Castelli3a9e6872022-04-26 22:54:59 +02001635 "../rtc_base:buffer",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001636 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001637 "../rtc_base:logging",
mbonadeic0af5ac2017-08-24 12:26:05 -07001638 ]
mbonadeic0af5ac2017-08-24 12:26:05 -07001639 }
1640
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001641 rtc_library("videotoolbox_objc") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001642 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +01001643 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadeic0af5ac2017-08-24 12:26:05 -07001644 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001645 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1646 "objc/components/video_codec/RTCVideoDecoderFactoryH264.m",
1647 "objc/components/video_codec/RTCVideoDecoderH264.h",
1648 "objc/components/video_codec/RTCVideoDecoderH264.mm",
1649 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1650 "objc/components/video_codec/RTCVideoEncoderFactoryH264.m",
1651 "objc/components/video_codec/RTCVideoEncoderH264.h",
1652 "objc/components/video_codec/RTCVideoEncoderH264.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001653 ]
1654
Anders Carlsson358f2e02018-06-04 10:24:37 +02001655 configs += [
1656 "..:common_objc",
1657 ":used_from_extension",
1658 ]
1659
1660 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
1661 defines = [ "RTC_APPRTCMOBILE_BROADCAST_EXTENSION" ]
1662 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001663
1664 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001665 ":base_native_additions_objc",
1666 ":base_objc",
1667 ":helpers_objc",
mbonadeic0af5ac2017-08-24 12:26:05 -07001668 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001669 ":videocodec_objc",
1670 ":videoframebuffer_objc",
Johannes Kronc3fcee72021-04-19 09:09:26 +02001671 "../api/video_codecs:video_codecs_api",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001672 "../common_video",
Patrik Höglund99175c62018-01-08 11:05:10 +01001673 "../modules/video_coding:video_codec_interface",
Florent Castelli3a9e6872022-04-26 22:54:59 +02001674 "../rtc_base:buffer",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001675 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001676 "../rtc_base:logging",
Florent Castellidd837e22022-04-04 17:16:15 +02001677 "../rtc_base:timeutils",
Mirko Bonadei401d0562017-12-14 11:24:00 +01001678 "//third_party/libyuv",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001679 ]
1680
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +02001681 frameworks = [
mbonadei2c8ac1b2017-05-31 05:14:26 -07001682 "CoreFoundation.framework",
1683 "CoreMedia.framework",
1684 "CoreVideo.framework",
1685 "VideoToolbox.framework",
1686 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001687 }
1688 }
tkchin9eeb6242016-04-27 01:54:20 -07001689}