blob: 371bfdedbdc13e6fdfaf55b15603eb51d395de89 [file] [log] [blame]
tkchin9eeb6242016-04-27 01:54:20 -07001# Copyright 2016 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
mbonadei9aa3f0a2017-01-24 06:58:22 -08009import("../webrtc.gni")
kthelgasonebc34e72016-09-15 04:30:18 -070010if (is_ios) {
oprypin45197522017-06-22 01:47:20 -070011 import("//build/config/ios/ios_sdk.gni")
Mirko Bonadei2ff3f492018-11-22 09:00:13 +010012 import("//build/config/ios/rules.gni")
kthelgasonebc34e72016-09-15 04:30:18 -070013}
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020014if (is_mac) {
15 import("//build/config/mac/rules.gni")
kthelgason2f088792017-05-30 01:48:47 -070016}
17
kjellander6ceab082016-10-28 05:44:03 -070018group("sdk") {
Henrik Kjellandera7d0df72017-06-27 08:56:46 +020019 public_deps = []
20 if (!build_with_chromium) {
21 if (is_android) {
22 public_deps += [ "android" ]
23 }
24 if (is_ios) {
kthelgason36d658d2017-08-24 05:43:45 -070025 public_deps += [ ":framework_objc" ]
Henrik Kjellandera7d0df72017-06-27 08:56:46 +020026 }
kjellander6ceab082016-10-28 05:44:03 -070027 }
28}
29
Mirko Bonadei86d053c2019-10-17 21:32:04 +020030rtc_library("media_constraints") {
Niels Möllerdac03d92019-02-13 08:52:27 +010031 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 08:52:27 +010038 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +020039 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
Niels Möllerdac03d92019-02-13 08:52:27 +010040}
41
Mirko Bonadei86d053c2019-10-17 21:32:04 +020042rtc_library("sdk_tests") {
Niels Möllerdac03d92019-02-13 08:52:27 +010043 testonly = true
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +010044 sources = [ "media_constraints_unittest.cc" ]
Niels Möllerdac03d92019-02-13 08:52:27 +010045 deps = [
46 ":media_constraints",
47 "../test:test_support",
48 ]
49}
50
kthelgasoncc2d1c62016-11-09 07:44:27 -080051if (is_ios || is_mac) {
kthelgason36d658d2017-08-24 05:43:45 -070052 config("common_config_objc") {
kjellander080a1e32016-05-25 11:37:11 -070053 include_dirs = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020054 "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 11:37:11 -070059 ]
Kári Tristan Helgason47d3a012017-10-24 15:28:51 +020060 cflags = [
Jiawei Ou4aeb35b2018-11-09 13:55:45 -080061 "-Wimplicit-retain-self",
Kári Tristan Helgason47d3a012017-10-24 15:28:51 +020062 "-Wstrict-overflow",
63 "-Wmissing-field-initializers",
64 ]
Artem Titarenko17ad64e2018-09-19 17:53:59 +020065
66 if (use_clang_coverage) {
67 configs = [ "//build/config/coverage:default_coverage" ]
68 }
kjellander080a1e32016-05-25 11:37:11 -070069 }
70
Anders Carlsson358f2e02018-06-04 10:24:37 +020071 config("used_from_extension") {
72 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
73 cflags = [ "-fapplication-extension" ]
74 }
75 }
76
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020077 # 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 21:32:04 +020079 rtc_library("common_objc") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +020080 visibility = [ "*" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020081
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +010082 sources = [ "objc/helpers/noop.mm" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020083
84 public_configs = [ ":common_config_objc" ]
85
86 deps = [
87 ":base_objc",
88 ":helpers_objc",
89 ]
90 }
91
Mirko Bonadei86d053c2019-10-17 21:32:04 +020092 rtc_library("base_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020093 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 09:22:08 +0100104 "objc/base/RTCSSLCertificateVerifier.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200105 "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 01:54:20 -0700122 ]
denicijad2088152017-04-28 02:14:54 -0700123
mbonadei1e060c62017-04-21 00:02:02 -0700124 deps = [
Artem Titov94b57c02019-03-21 13:35:10 +0100125 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100126 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +0200127 "../rtc_base:logging",
mbonadei1e060c62017-04-21 00:02:02 -0700128 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200129 configs += [
130 "..:common_objc",
131 ":used_from_extension",
132 ]
kthelgasonc0977102017-04-24 00:57:16 -0700133
kthelgason36d658d2017-08-24 05:43:45 -0700134 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200135 }
136
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200137 rtc_library("helpers_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200138 sources = [
139 "objc/helpers/AVCaptureSession+DevicePosition.h",
140 "objc/helpers/AVCaptureSession+DevicePosition.mm",
141 "objc/helpers/NSString+StdString.h",
142 "objc/helpers/NSString+StdString.mm",
143 "objc/helpers/RTCDispatcher+Private.h",
144 "objc/helpers/RTCDispatcher.h",
145 "objc/helpers/RTCDispatcher.m",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200146 "objc/helpers/scoped_cftyperef.h",
147 ]
148
149 deps = [
150 ":base_objc",
151 "../rtc_base:checks",
152 ]
153
Ali Tofigh6364d082022-03-14 13:32:04 +0100154 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
155
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200156 frameworks = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200157 "AVFoundation.framework",
158 "CoreMedia.framework",
159 ]
160
161 configs += [
162 "..:common_objc",
163 ":used_from_extension",
164 ]
165
166 public_configs = [ ":common_config_objc" ]
denicijad2088152017-04-28 02:14:54 -0700167
kjellander3bcedd32016-06-08 01:14:15 -0700168 if (is_ios) {
169 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200170 "objc/helpers/RTCCameraPreviewView.h",
171 "objc/helpers/RTCCameraPreviewView.m",
172 "objc/helpers/UIDevice+RTCDevice.h",
173 "objc/helpers/UIDevice+RTCDevice.mm",
174 ]
175 }
176 }
177
178 if (!build_with_chromium) {
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200179 rtc_library("callback_logger_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200180 sources = [
181 "objc/api/logging/RTCCallbackLogger.h",
182 "objc/api/logging/RTCCallbackLogger.mm",
183 ]
184
185 deps = [
186 ":base_objc",
Ali Tofigh6364d082022-03-14 13:32:04 +0100187 ":helpers_objc",
Artem Titov94b57c02019-03-21 13:35:10 +0100188 "../rtc_base",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200189 "../rtc_base:checks",
190 "../rtc_base:logging",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200191 ]
192
193 configs += [
194 "..:common_objc",
195 ":used_from_extension",
kjellander3bcedd32016-06-08 01:14:15 -0700196 ]
Ali Tofigh6364d082022-03-14 13:32:04 +0100197
198 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
denicijad2088152017-04-28 02:14:54 -0700199 }
200
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200201 rtc_library("file_logger_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200202 sources = [
203 "objc/api/peerconnection/RTCFileLogger.h",
204 "objc/api/peerconnection/RTCFileLogger.mm",
205 ]
206
207 deps = [
208 ":base_objc",
Artem Titov94b57c02019-03-21 13:35:10 +0100209 "../rtc_base",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200210 "../rtc_base:checks",
211 "../rtc_base:logging",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200212 ]
213
214 configs += [
215 "..:common_objc",
216 ":used_from_extension",
kthelgason2f088792017-05-30 01:48:47 -0700217 ]
218 }
219 }
220
mbonadei2c8ac1b2017-05-31 05:14:26 -0700221 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100222 if (is_ios) {
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200223 rtc_library("native_api_audio_device_module") {
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200224 visibility = [ "*" ]
225
226 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200227 "objc/native/api/audio_device_module.h",
228 "objc/native/api/audio_device_module.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200229 ]
230
231 deps = [
232 ":audio_device",
233 "../modules/audio_device:audio_device_api",
234 "../modules/audio_device:audio_device_generic",
235 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +0200236 "../rtc_base:logging",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200237 "../rtc_base:rtc_base_approved",
238 "../system_wrappers",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200239 ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200240 }
241
242 rtc_source_set("audio_session_observer") {
243 visibility = [ ":*" ]
244
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +0100245 sources = [ "objc/native/src/audio/audio_session_observer.h" ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200246
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100247 deps = [
248 "../rtc_base",
249 "../rtc_base:threading",
250 ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200251 }
252
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200253 rtc_library("audio_device") {
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200254 visibility = [ "*" ]
255
256 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200257 "objc/native/src/audio/audio_device_ios.h",
258 "objc/native/src/audio/audio_device_ios.mm",
259 "objc/native/src/audio/audio_device_module_ios.h",
260 "objc/native/src/audio/audio_device_module_ios.mm",
261 "objc/native/src/audio/helpers.h",
262 "objc/native/src/audio/helpers.mm",
263 "objc/native/src/audio/voice_processing_audio_unit.h",
264 "objc/native/src/audio/voice_processing_audio_unit.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200265 ]
266
267 deps = [
268 ":audio_objc",
269 ":audio_session_observer",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200270 ":base_objc",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200271 "../api:array_view",
Danil Chapovalova6cb1502019-06-27 15:16:34 +0200272 "../api/task_queue",
273 "../api/task_queue:default_task_queue_factory",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200274 "../modules/audio_device:audio_device_api",
275 "../modules/audio_device:audio_device_buffer",
276 "../modules/audio_device:audio_device_generic",
Artem Titov94b57c02019-03-21 13:35:10 +0100277 "../rtc_base",
Florent Castellibddfe022022-04-04 15:03:10 +0200278 "../rtc_base:atomicops",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200279 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +0200280 "../rtc_base:logging",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100281 "../rtc_base:threading",
Kári Tristan Helgasonf49429d2019-03-28 11:03:27 +0100282 "../system_wrappers:field_trial",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200283 "../system_wrappers:metrics",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200284 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200285 absl_deps = [ "//third_party/abseil-cpp/absl/base:core_headers" ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200286
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200287 frameworks = [ "AudioToolbox.framework" ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200288 }
289
Joe Chen0b3a6e32019-12-26 23:01:42 -0800290 # This target exists to expose :audio_session_objc and
291 # :audio_session_delegate_adapter_objc for backward compatibility,
292 # and should be deprecated.
293 group("audio_objc") {
294 public_deps = [ # no-presubmit-check TODO(webrtc:11238)
295 ":audio_session_delegate_adapter_objc",
296 ":audio_session_objc",
297 ]
298 }
299
300 rtc_library("audio_session_delegate_adapter_objc") {
301 sources = [
302 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.h",
303 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.mm",
304 ]
305
306 configs += [
307 "..:common_objc",
308 ":used_from_extension",
309 ]
310
311 public_configs = [ ":common_config_objc" ]
312
313 deps = [
314 ":audio_session_objc",
315 ":audio_session_observer",
316 ":base_objc",
317 ]
318 }
319
320 rtc_library("audio_session_objc") {
Joe Chen3b19b272020-01-09 08:31:06 -0800321 visibility = [ "*" ]
322
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100323 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200324 "objc/components/audio/RTCAudioSession+Configuration.mm",
325 "objc/components/audio/RTCAudioSession+Private.h",
326 "objc/components/audio/RTCAudioSession.h",
327 "objc/components/audio/RTCAudioSession.mm",
328 "objc/components/audio/RTCAudioSessionConfiguration.h",
329 "objc/components/audio/RTCAudioSessionConfiguration.m",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100330 ]
Joe Chen0b3a6e32019-12-26 23:01:42 -0800331
Anders Carlsson358f2e02018-06-04 10:24:37 +0200332 configs += [
333 "..:common_objc",
334 ":used_from_extension",
335 ]
denicija59ee91b2017-06-05 05:48:47 -0700336
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100337 public_configs = [ ":common_config_objc" ]
Anders Carlsson8ecfd802017-09-15 14:07:30 +0200338
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200339 frameworks = [ "AVFoundation.framework" ]
Jiawei Ouc9e6b962018-10-09 12:33:06 -0700340
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100341 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200342 ":base_objc",
343 ":helpers_objc",
Artem Titov94b57c02019-03-21 13:35:10 +0100344 "../rtc_base",
Florent Castellibddfe022022-04-04 15:03:10 +0200345 "../rtc_base:atomicops",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100346 "../rtc_base:checks",
347 "../rtc_base:rtc_base_approved",
Niels Möller072c0082021-02-15 16:30:44 +0100348 "../rtc_base/synchronization:mutex",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100349 ]
Byoungchan Lee0a54e7a2021-09-06 22:32:52 +0900350
351 absl_deps = [ "//third_party/abseil-cpp/absl/base:core_headers" ]
denicija59ee91b2017-06-05 05:48:47 -0700352 }
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -0700353
354 rtc_source_set("network_monitor_observer") {
355 visibility = [ ":*" ]
356
357 sources = [ "objc/native/src/network_monitor_observer.h" ]
358
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100359 deps = [
360 "../rtc_base",
361 "../rtc_base:network_constants",
362 "../rtc_base:threading",
363 ]
Ali Tofigh7fa90572022-03-17 15:47:49 +0100364
365 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -0700366 }
367
368 rtc_library("network_monitor_objc") {
369 visibility = [ "*" ]
370
371 sources = [
372 "objc/components/network/RTCNetworkMonitor+Private.h",
373 "objc/components/network/RTCNetworkMonitor.h",
374 "objc/components/network/RTCNetworkMonitor.mm",
375 ]
376
377 configs += [ ":used_from_extension" ]
378
379 frameworks = [ "Network.framework" ]
380
381 deps = [
382 ":base_objc",
383 ":helpers_objc",
384 ":network_monitor_observer",
Ali Tofigh7fa90572022-03-17 15:47:49 +0100385 "../rtc_base:stringutils",
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -0700386 "../rtc_base/system:gcd_helpers",
387 ]
388 }
denicija59ee91b2017-06-05 05:48:47 -0700389 }
zhihuanga4c113a2017-06-28 14:05:44 -0700390
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200391 rtc_library("videosource_objc") {
zhihuanga4c113a2017-06-28 14:05:44 -0700392 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200393 "objc/api/peerconnection/RTCVideoSource+Private.h",
394 "objc/api/peerconnection/RTCVideoSource.h",
395 "objc/api/peerconnection/RTCVideoSource.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700396 ]
397
398 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200399 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100400 ":mediasource_objc",
401 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100402 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700403 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 14:30:41 +0200404 "../api:media_stream_interface",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200405 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +0200406 "../api/video:video_rtp_headers",
zhihuanga4c113a2017-06-28 14:05:44 -0700407 "../common_video",
408 "../media:rtc_media_base",
Harald Alvestrande5a73f52022-03-28 12:06:34 +0000409 "../pc:video_track_source_proxy",
Artem Titov94b57c02019-03-21 13:35:10 +0100410 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100411 "../rtc_base:checks",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100412 "../rtc_base:threading",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100413 "//third_party/libyuv",
zhihuanga4c113a2017-06-28 14:05:44 -0700414 ]
415
Anders Carlsson358f2e02018-06-04 10:24:37 +0200416 configs += [
417 "..:common_objc",
418 ":used_from_extension",
419 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700420 }
421
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200422 rtc_library("videoframebuffer_objc") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200423 visibility = [ "*" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100424 sources = [
Anders Carlsson4e5af962018-09-03 14:44:50 +0200425 "objc/api/video_frame_buffer/RTCNativeI420Buffer+Private.h",
426 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
427 "objc/api/video_frame_buffer/RTCNativeI420Buffer.mm",
428 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
429 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200430 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
431 "objc/components/video_frame_buffer/RTCCVPixelBuffer.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100432 ]
433 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200434 ":base_objc",
Florent Castelli0af55ba2022-04-04 15:06:30 +0200435 "../rtc_base:logging",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200436 "//api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +0200437 "//api/video:video_rtp_headers",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100438 "//common_video",
439 "//rtc_base:checks",
440 "//rtc_base:rtc_base_approved",
441 "//third_party/libyuv",
442 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200443 configs += [
444 "..:common_objc",
445 ":used_from_extension",
446 ]
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200447 frameworks = [
Kári Tristan Helgason8a1e35c2019-03-07 10:44:26 +0100448 "VideoToolbox.framework",
Oleh Prypinb3f78de2019-07-18 22:25:48 +0200449 "CoreGraphics.framework",
Kári Tristan Helgason8a1e35c2019-03-07 10:44:26 +0100450 "CoreVideo.framework",
451 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100452 }
453
Jordan Rose53d3fc92021-07-06 12:16:41 -0700454 rtc_library("opengl_objc") {
kthelgason2f088792017-05-30 01:48:47 -0700455 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200456 "objc/components/renderer/opengl/RTCDefaultShader.h",
457 "objc/components/renderer/opengl/RTCDefaultShader.mm",
458 "objc/components/renderer/opengl/RTCI420TextureCache.h",
459 "objc/components/renderer/opengl/RTCI420TextureCache.mm",
460 "objc/components/renderer/opengl/RTCOpenGLDefines.h",
461 "objc/components/renderer/opengl/RTCShader.h",
462 "objc/components/renderer/opengl/RTCShader.mm",
463 "objc/components/renderer/opengl/RTCVideoViewShading.h",
kthelgason2f088792017-05-30 01:48:47 -0700464 ]
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200465 frameworks = [ "CoreVideo.framework" ]
denicijad2088152017-04-28 02:14:54 -0700466 if (is_ios) {
denicija070d5e32017-02-26 11:44:13 -0800467 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200468 "objc/components/renderer/opengl/RTCNV12TextureCache.h",
469 "objc/components/renderer/opengl/RTCNV12TextureCache.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700470 ]
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200471 frameworks += [
mbonadei2c8ac1b2017-05-31 05:14:26 -0700472 "GLKit.framework",
473 "OpenGLES.framework",
474 "QuartzCore.framework",
475 ]
476 } else if (is_mac) {
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200477 frameworks += [
mbonadei2c8ac1b2017-05-31 05:14:26 -0700478 "CoreMedia.framework",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700479 "OpenGL.framework",
denicija070d5e32017-02-26 11:44:13 -0800480 ]
481 }
Mirko Bonadei6b09c452021-07-05 16:47:49 +0200482
483 # TODO(bugs.webrtc.org/12937): Remove OpenGL deprecation warning
484 # workaround.
Björn Terelius02768ae2021-07-02 16:19:32 +0200485 defines = [ "GLES_SILENCE_DEPRECATION" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700486
kthelgason2f088792017-05-30 01:48:47 -0700487 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200488 ":base_objc",
489 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100490 ":mediaconstraints_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100491 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100492 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100493 ":videosource_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700494 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200495 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +0200496 "../api/video:video_rtp_headers",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700497 "../common_video",
498 "../media:rtc_media_base",
Artem Titov94b57c02019-03-21 13:35:10 +0100499 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100500 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +0200501 "../rtc_base:logging",
tkchin9eeb6242016-04-27 01:54:20 -0700502 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200503 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700504
Anders Carlsson358f2e02018-06-04 10:24:37 +0200505 configs += [
506 "..:common_objc",
507 ":used_from_extension",
508 ]
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800509 }
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800510
Jordan Rose53d3fc92021-07-06 12:16:41 -0700511 rtc_library("opengl_ui_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000512 visibility = [ "*" ]
Jake Brombergfb7fd242021-06-14 13:44:25 -0700513 allow_poison = [
514 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
515 "default_task_queue",
516 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700517 if (is_ios) {
518 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200519 "objc/components/renderer/opengl/RTCDisplayLinkTimer.h",
520 "objc/components/renderer/opengl/RTCDisplayLinkTimer.m",
521 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
522 "objc/components/renderer/opengl/RTCEAGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700523 ]
Mirko Bonadei6b09c452021-07-05 16:47:49 +0200524
525 # TODO(bugs.webrtc.org/12937): Remove OpenGL deprecation warning
526 # workaround.
Björn Terelius02768ae2021-07-02 16:19:32 +0200527 defines = [ "GLES_SILENCE_DEPRECATION" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700528 }
529 if (is_mac) {
530 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200531 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
532 "objc/components/renderer/opengl/RTCNSGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700533 ]
534 }
535 configs += [ "..:common_objc" ]
536 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200537 ":base_objc",
538 ":helpers_objc",
Jake Brombergfb7fd242021-06-14 13:44:25 -0700539 ":metal_objc",
Jordan Rose53d3fc92021-07-06 12:16:41 -0700540 ":opengl_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100541 ":videocapture_objc",
542 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700543 ]
544 }
kthelgasonebc34e72016-09-15 04:30:18 -0700545
Jake Brombergfb7fd242021-06-14 13:44:25 -0700546 rtc_library("metal_objc") {
547 visibility = [ "*" ]
548 allow_poison = [
549 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
550 "default_task_queue",
551 ]
552 sources = [
553 "objc/components/renderer/metal/RTCMTLI420Renderer.h",
554 "objc/components/renderer/metal/RTCMTLI420Renderer.mm",
555 "objc/components/renderer/metal/RTCMTLNV12Renderer.h",
556 "objc/components/renderer/metal/RTCMTLNV12Renderer.mm",
557 "objc/components/renderer/metal/RTCMTLRGBRenderer.h",
558 "objc/components/renderer/metal/RTCMTLRGBRenderer.mm",
559 "objc/components/renderer/metal/RTCMTLRenderer+Private.h",
560 "objc/components/renderer/metal/RTCMTLRenderer.h",
561 "objc/components/renderer/metal/RTCMTLRenderer.mm",
562 ]
563 frameworks = [
564 "CoreVideo.framework",
565 "Metal.framework",
566 "MetalKit.framework",
567 ]
568 if (is_ios) {
569 sources += [
570 "objc/components/renderer/metal/RTCMTLVideoView.h",
571 "objc/components/renderer/metal/RTCMTLVideoView.m",
Danil Chapovalov41300af2019-07-10 12:44:43 +0200572 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700573 }
Jake Brombergfb7fd242021-06-14 13:44:25 -0700574 if (is_mac) {
575 sources += [
576 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
577 "objc/components/renderer/metal/RTCMTLNSVideoView.m",
578 ]
579 frameworks += [ "AppKit.framework" ]
580 }
581 deps = [
582 ":base_objc",
583 ":peerconnectionfactory_base_objc",
Jake Brombergfb7fd242021-06-14 13:44:25 -0700584 ":videoframebuffer_objc",
585 "../api/video:video_frame",
586 "../api/video:video_rtp_headers",
587 "../rtc_base:checks",
588 "../rtc_base:rtc_base_approved",
589 ]
590 configs += [ "..:common_objc" ]
591 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700592 }
593
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200594 # TODO(bugs.webrtc.org/9627): Remove this target.
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200595 rtc_library("videocapturebase_objc") {
Anders Carlsson73119182018-03-15 09:41:03 +0100596 visibility = [ "*" ]
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +0100597 sources = [ "objc/helpers/noop.mm" ]
Anders Carlsson73119182018-03-15 09:41:03 +0100598
599 configs += [ "..:common_objc" ]
600
601 public_configs = [ ":common_config_objc" ]
602
603 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200604 ":base_objc",
Anders Carlsson73119182018-03-15 09:41:03 +0100605 ":videoframebuffer_objc",
606 ]
607 }
608
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200609 rtc_library("videocapture_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000610 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100611 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadei2c8ac1b2017-05-31 05:14:26 -0700612 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200613 "objc/components/capturer/RTCCameraVideoCapturer.h",
614 "objc/components/capturer/RTCCameraVideoCapturer.m",
Mirko Bonadei19640aa2020-10-19 16:12:43 +0200615 "objc/components/capturer/RTCFileVideoCapturer.h",
616 "objc/components/capturer/RTCFileVideoCapturer.m",
zhihuanga4c113a2017-06-28 14:05:44 -0700617 ]
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200618 frameworks = [
Kári Tristan Helgason8a1e35c2019-03-07 10:44:26 +0100619 "AVFoundation.framework",
620 "CoreVideo.framework",
Mirko Bonadei19640aa2020-10-19 16:12:43 +0200621 "QuartzCore.framework",
Kári Tristan Helgason8a1e35c2019-03-07 10:44:26 +0100622 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700623
zhihuanga4c113a2017-06-28 14:05:44 -0700624 configs += [ "..:common_objc" ]
625
kthelgason36d658d2017-08-24 05:43:45 -0700626 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700627
zhihuanga4c113a2017-06-28 14:05:44 -0700628 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200629 ":base_objc",
630 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100631 ":videoframebuffer_objc",
Yura Yaroshevichebf739b2020-03-16 18:00:59 +0300632 "../rtc_base/system:gcd_helpers",
zhihuanga4c113a2017-06-28 14:05:44 -0700633 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700634 }
635
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200636 rtc_library("videocodec_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200637 visibility = [ "*" ]
Mirko Bonadei96ede162018-09-06 13:45:44 +0200638 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100639 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200640 "objc/components/video_codec/RTCCodecSpecificInfoH264+Private.h",
641 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
642 "objc/components/video_codec/RTCCodecSpecificInfoH264.mm",
643 "objc/components/video_codec/RTCH264ProfileLevelId.h",
644 "objc/components/video_codec/RTCH264ProfileLevelId.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700645 ]
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300646 if (is_ios) {
647 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200648 "objc/components/video_codec/UIDevice+H264Profile.h",
649 "objc/components/video_codec/UIDevice+H264Profile.mm",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300650 ]
651 }
Mirko Bonadeifc52b912019-03-01 10:32:56 +0100652
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100653 public_configs = [ ":common_config_objc" ]
654 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200655 ":base_objc",
656 ":helpers_objc",
kthelgasonfb143122017-07-25 07:55:58 -0700657 "../api/video_codecs:video_codecs_api",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100658 "../common_video",
zhihuanga4c113a2017-06-28 14:05:44 -0700659 "../media:rtc_media_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100660 "../modules/video_coding:video_codec_interface",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200661 "../rtc_base:checks",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100662 "../rtc_base:rtc_base_approved",
zhihuanga4c113a2017-06-28 14:05:44 -0700663 ]
664 }
665
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200666 rtc_library("default_codec_factory_objc") {
Anders Carlssondd8c1652018-01-30 10:32:13 +0100667 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200668 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
669 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.m",
670 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
671 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.m",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100672 ]
673
674 deps = [
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +0300675 ":av1",
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 ]
684 }
685
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200686 rtc_library("vpx_codec_constants") {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200687 configs += [ "..:no_global_constructors" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200688 sources = [
689 "objc/api/video_codec/RTCVideoCodecConstants.h",
690 "objc/api/video_codec/RTCVideoCodecConstants.mm",
691 ]
692
693 deps = [
694 ":base_objc",
695 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100696 ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100697 }
698
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200699 rtc_library("vp8") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100700 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200701 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100702 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200703 "objc/api/video_codec/RTCVideoDecoderVP8.h",
704 "objc/api/video_codec/RTCVideoDecoderVP8.mm",
705 "objc/api/video_codec/RTCVideoEncoderVP8.h",
706 "objc/api/video_codec/RTCVideoEncoderVP8.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100707 ]
708
Anders Carlssondd8c1652018-01-30 10:32:13 +0100709 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200710 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100711 ":wrapped_native_codec_objc",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100712 "../modules/video_coding:webrtc_vp8",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100713 ]
714 }
715
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200716 rtc_library("vp9") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100717 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200718 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100719 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200720 "objc/api/video_codec/RTCVideoDecoderVP9.h",
721 "objc/api/video_codec/RTCVideoDecoderVP9.mm",
722 "objc/api/video_codec/RTCVideoEncoderVP9.h",
723 "objc/api/video_codec/RTCVideoEncoderVP9.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100724 ]
725
Anders Carlssondd8c1652018-01-30 10:32:13 +0100726 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200727 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100728 ":wrapped_native_codec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200729 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100730 "../modules/video_coding:webrtc_vp9",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100731 ]
732 }
733
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +0300734 rtc_library("av1") {
735 visibility = [ "*" ]
736 allow_poison = [ "software_video_codecs" ]
737 sources = [
738 "objc/api/video_codec/RTCVideoDecoderAV1.h",
739 "objc/api/video_codec/RTCVideoDecoderAV1.mm",
740 "objc/api/video_codec/RTCVideoEncoderAV1.h",
741 "objc/api/video_codec/RTCVideoEncoderAV1.mm",
742 ]
743
744 deps = [
745 ":base_objc",
746 ":wrapped_native_codec_objc",
747 "../media:rtc_media_base",
748 "../modules/video_coding/codecs/av1:libaom_av1_decoder",
philipel95701502022-01-18 18:47:52 +0100749 "../modules/video_coding/codecs/av1:libaom_av1_encoder_if_supported",
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +0300750 ]
751 }
752
zhihuanga4c113a2017-06-28 14:05:44 -0700753 # Build the PeerConnectionFactory without audio/video support.
754 # This target depends on the objc_peeerconnectionfactory_base which still
755 # includes some audio/video related objects such as RTCAudioSource because
756 # these objects are just thin wrappers of native C++ interfaces required
757 # when implementing webrtc::PeerConnectionFactoryInterface and
758 # webrtc::PeerConnectionInterface.
Kári Tristan Helgasona2d89fc2018-03-06 10:18:43 +0100759 # The applications which only use WebRTC DataChannel can depend on this.
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200760 rtc_library("peerconnectionfactory_no_media_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000761 visibility = [ "*" ]
Danil Chapovalov41300af2019-07-10 12:44:43 +0200762 allow_poison = [
763 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
764 "default_task_queue",
765 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700766 defines = [ "HAVE_NO_MEDIA" ]
767
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +0100768 sources = [ "objc/helpers/noop.mm" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700769
kthelgason36d658d2017-08-24 05:43:45 -0700770 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700771
zhihuanga4c113a2017-06-28 14:05:44 -0700772 deps = [
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100773 ":native_api",
774 ":native_video",
kthelgason36d658d2017-08-24 05:43:45 -0700775 ":peerconnectionfactory_base_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700776 "../api:libjingle_peerconnection_api",
Artem Titov94b57c02019-03-21 13:35:10 +0100777 "../rtc_base",
zhihuanga4c113a2017-06-28 14:05:44 -0700778 ]
779 }
780
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200781 rtc_library("mediaconstraints_objc") {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200782 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100783 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200784 "objc/api/peerconnection/RTCMediaConstraints+Private.h",
785 "objc/api/peerconnection/RTCMediaConstraints.h",
786 "objc/api/peerconnection/RTCMediaConstraints.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100787 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100788
789 public_configs = [ ":common_config_objc" ]
790 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200791 ":base_objc",
792 ":helpers_objc",
Niels Möllerdac03d92019-02-13 08:52:27 +0100793 ":media_constraints",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100794 ]
795 }
796
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200797 # TODO(bugs.webrtc.org/9627): Remove, targets should depend on base_objc.
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200798 rtc_library("videorenderer_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200799 visibility = [ "*" ]
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +0100800 sources = [ "objc/helpers/noop.mm" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100801
802 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100803 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200804
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +0100805 deps = [ ":base_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100806 }
807
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200808 rtc_library("videorendereradapter_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200809 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100810 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Anders Carlsson9823ee42018-03-07 10:32:03 +0100811 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200812 "objc/api/RTCVideoRendererAdapter+Private.h",
813 "objc/api/RTCVideoRendererAdapter.h",
814 "objc/api/RTCVideoRendererAdapter.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100815 ]
816
817 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100818 public_configs = [ ":common_config_objc" ]
819
820 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200821 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100822 ":native_api",
823 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100824 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 14:30:41 +0200825 "../api:media_stream_interface",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100826 ]
827 }
828
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200829 rtc_library("mediasource_objc") {
Anders Carlsson9823ee42018-03-07 10:32:03 +0100830 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200831 "objc/api/peerconnection/RTCMediaSource+Private.h",
832 "objc/api/peerconnection/RTCMediaSource.h",
833 "objc/api/peerconnection/RTCMediaSource.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100834 ]
835
Anders Carlsson358f2e02018-06-04 10:24:37 +0200836 configs += [
837 "..:common_objc",
838 ":used_from_extension",
839 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100840 public_configs = [ ":common_config_objc" ]
841
842 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200843 ":base_objc",
Niels Möllere942b142019-09-17 14:30:41 +0200844 "../api:media_stream_interface",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100845 "../rtc_base:checks",
846 ]
847 }
848
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200849 rtc_library("base_native_additions_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200850 sources = [
851 "objc/api/peerconnection/RTCEncodedImage+Private.h",
852 "objc/api/peerconnection/RTCEncodedImage+Private.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200853 "objc/api/peerconnection/RTCVideoCodecInfo+Private.h",
854 "objc/api/peerconnection/RTCVideoCodecInfo+Private.mm",
855 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.h",
856 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.mm",
857 ]
858
859 configs += [ "..:common_objc" ]
860
861 public_configs = [ ":common_config_objc" ]
862
863 deps = [
864 ":base_objc",
865 ":helpers_objc",
Niels Möller4dc66c52018-10-05 14:17:58 +0200866 "../api/video:encoded_image",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200867 "../api/video_codecs:video_codecs_api",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200868 "../modules/video_coding:video_codec_interface",
Artem Titov94b57c02019-03-21 13:35:10 +0100869 "../rtc_base",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200870 ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200871 }
872
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200873 rtc_library("peerconnectionfactory_base_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200874 visibility = [ "*" ]
Danil Chapovalov41300af2019-07-10 12:44:43 +0200875 allow_poison = [
876 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
877 "default_task_queue",
878 ]
Byoungchan Lee524a4222021-11-19 19:03:49 +0900879 configs += [ "..:no_global_constructors" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700880 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200881 "objc/api/peerconnection/RTCAudioSource+Private.h",
882 "objc/api/peerconnection/RTCAudioSource.h",
883 "objc/api/peerconnection/RTCAudioSource.mm",
884 "objc/api/peerconnection/RTCAudioTrack+Private.h",
885 "objc/api/peerconnection/RTCAudioTrack.h",
886 "objc/api/peerconnection/RTCAudioTrack.mm",
887 "objc/api/peerconnection/RTCCertificate.h",
888 "objc/api/peerconnection/RTCCertificate.mm",
889 "objc/api/peerconnection/RTCConfiguration+Native.h",
890 "objc/api/peerconnection/RTCConfiguration+Private.h",
891 "objc/api/peerconnection/RTCConfiguration.h",
892 "objc/api/peerconnection/RTCConfiguration.mm",
Benjamin Wright8c27cca2018-10-25 10:16:44 -0700893 "objc/api/peerconnection/RTCCryptoOptions.h",
894 "objc/api/peerconnection/RTCCryptoOptions.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200895 "objc/api/peerconnection/RTCDataChannel+Private.h",
896 "objc/api/peerconnection/RTCDataChannel.h",
897 "objc/api/peerconnection/RTCDataChannel.mm",
898 "objc/api/peerconnection/RTCDataChannelConfiguration+Private.h",
899 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
900 "objc/api/peerconnection/RTCDataChannelConfiguration.mm",
901 "objc/api/peerconnection/RTCDtmfSender+Private.h",
902 "objc/api/peerconnection/RTCDtmfSender.h",
903 "objc/api/peerconnection/RTCDtmfSender.mm",
904 "objc/api/peerconnection/RTCFieldTrials.h",
905 "objc/api/peerconnection/RTCFieldTrials.mm",
906 "objc/api/peerconnection/RTCIceCandidate+Private.h",
907 "objc/api/peerconnection/RTCIceCandidate.h",
908 "objc/api/peerconnection/RTCIceCandidate.mm",
Jaehyun Kod2110982021-11-30 19:01:43 +0900909 "objc/api/peerconnection/RTCIceCandidateErrorEvent+Private.h",
910 "objc/api/peerconnection/RTCIceCandidateErrorEvent.h",
911 "objc/api/peerconnection/RTCIceCandidateErrorEvent.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200912 "objc/api/peerconnection/RTCIceServer+Private.h",
913 "objc/api/peerconnection/RTCIceServer.h",
914 "objc/api/peerconnection/RTCIceServer.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200915 "objc/api/peerconnection/RTCLegacyStatsReport+Private.h",
916 "objc/api/peerconnection/RTCLegacyStatsReport.h",
917 "objc/api/peerconnection/RTCLegacyStatsReport.mm",
918 "objc/api/peerconnection/RTCMediaStream+Private.h",
919 "objc/api/peerconnection/RTCMediaStream.h",
920 "objc/api/peerconnection/RTCMediaStream.mm",
921 "objc/api/peerconnection/RTCMediaStreamTrack+Private.h",
922 "objc/api/peerconnection/RTCMediaStreamTrack.h",
923 "objc/api/peerconnection/RTCMediaStreamTrack.mm",
924 "objc/api/peerconnection/RTCMetrics.h",
925 "objc/api/peerconnection/RTCMetrics.mm",
926 "objc/api/peerconnection/RTCMetricsSampleInfo+Private.h",
927 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
928 "objc/api/peerconnection/RTCMetricsSampleInfo.mm",
929 "objc/api/peerconnection/RTCPeerConnection+DataChannel.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200930 "objc/api/peerconnection/RTCPeerConnection+Private.h",
931 "objc/api/peerconnection/RTCPeerConnection+Stats.mm",
932 "objc/api/peerconnection/RTCPeerConnection.h",
933 "objc/api/peerconnection/RTCPeerConnection.mm",
934 "objc/api/peerconnection/RTCPeerConnectionFactory+Native.h",
935 "objc/api/peerconnection/RTCPeerConnectionFactory+Private.h",
936 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
937 "objc/api/peerconnection/RTCPeerConnectionFactory.mm",
938 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.h",
939 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.mm",
940 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.h",
941 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.mm",
942 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions+Private.h",
943 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
944 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.mm",
945 "objc/api/peerconnection/RTCRtcpParameters+Private.h",
946 "objc/api/peerconnection/RTCRtcpParameters.h",
947 "objc/api/peerconnection/RTCRtcpParameters.mm",
948 "objc/api/peerconnection/RTCRtpCodecParameters+Private.h",
949 "objc/api/peerconnection/RTCRtpCodecParameters.h",
950 "objc/api/peerconnection/RTCRtpCodecParameters.mm",
951 "objc/api/peerconnection/RTCRtpEncodingParameters+Private.h",
952 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
953 "objc/api/peerconnection/RTCRtpEncodingParameters.mm",
954 "objc/api/peerconnection/RTCRtpHeaderExtension+Private.h",
955 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
956 "objc/api/peerconnection/RTCRtpHeaderExtension.mm",
957 "objc/api/peerconnection/RTCRtpParameters+Private.h",
958 "objc/api/peerconnection/RTCRtpParameters.h",
959 "objc/api/peerconnection/RTCRtpParameters.mm",
Benjamin Wrightddf1a3e2018-10-02 10:20:58 -0700960 "objc/api/peerconnection/RTCRtpReceiver+Native.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200961 "objc/api/peerconnection/RTCRtpReceiver+Private.h",
962 "objc/api/peerconnection/RTCRtpReceiver.h",
963 "objc/api/peerconnection/RTCRtpReceiver.mm",
Benjamin Wrightddf1a3e2018-10-02 10:20:58 -0700964 "objc/api/peerconnection/RTCRtpSender+Native.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200965 "objc/api/peerconnection/RTCRtpSender+Private.h",
966 "objc/api/peerconnection/RTCRtpSender.h",
967 "objc/api/peerconnection/RTCRtpSender.mm",
968 "objc/api/peerconnection/RTCRtpTransceiver+Private.h",
969 "objc/api/peerconnection/RTCRtpTransceiver.h",
970 "objc/api/peerconnection/RTCRtpTransceiver.mm",
971 "objc/api/peerconnection/RTCSSLAdapter.h",
972 "objc/api/peerconnection/RTCSSLAdapter.mm",
973 "objc/api/peerconnection/RTCSessionDescription+Private.h",
974 "objc/api/peerconnection/RTCSessionDescription.h",
975 "objc/api/peerconnection/RTCSessionDescription.mm",
Peter Hanspersbed86042019-02-21 17:27:09 +0100976 "objc/api/peerconnection/RTCStatisticsReport+Private.h",
977 "objc/api/peerconnection/RTCStatisticsReport.h",
978 "objc/api/peerconnection/RTCStatisticsReport.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200979 "objc/api/peerconnection/RTCTracing.h",
980 "objc/api/peerconnection/RTCTracing.mm",
981 "objc/api/peerconnection/RTCVideoTrack+Private.h",
982 "objc/api/peerconnection/RTCVideoTrack.h",
983 "objc/api/peerconnection/RTCVideoTrack.mm",
kthelgason5fe4d492016-12-05 11:27:30 -0800984 ]
kthelgasonebc34e72016-09-15 04:30:18 -0700985
Anders Carlsson358f2e02018-06-04 10:24:37 +0200986 configs += [
987 "..:common_objc",
988 ":used_from_extension",
989 ]
kthelgason36d658d2017-08-24 05:43:45 -0700990 public_configs = [ ":common_config_objc" ]
kthelgasonc0977102017-04-24 00:57:16 -0700991
mbonadei2c8ac1b2017-05-31 05:14:26 -0700992 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200993 ":base_native_additions_objc",
994 ":base_objc",
995 ":file_logger_objc",
996 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100997 ":mediaconstraints_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100998 ":mediasource_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100999 ":native_api",
1000 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001001 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001002 ":videorendereradapter_objc",
1003 ":videosource_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001004 ":videotoolbox_objc",
Mirko Bonadeie51f7852017-12-06 11:23:19 +01001005 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 14:30:41 +02001006 "../api:media_stream_interface",
Niels Möller695cf6a2019-05-13 12:27:23 +02001007 "../api:rtc_event_log_output_file",
Peter Hanspersbed86042019-02-21 17:27:09 +01001008 "../api:rtc_stats_api",
Niels Möller6dcd4dc2019-08-26 10:45:28 +02001009 "../api:rtp_parameters",
Mirko Bonadeid9708072019-01-25 20:26:48 +01001010 "../api:scoped_refptr",
Jiawei Ouae810c12018-06-20 16:18:59 -07001011 "../api/audio_codecs:audio_codecs_api",
Karl Wiberg5817d3d2018-04-06 10:06:42 +02001012 "../api/audio_codecs:builtin_audio_decoder_factory",
Jiawei Ouae810c12018-06-20 16:18:59 -07001013 "../api/audio_codecs:builtin_audio_encoder_factory",
Mirko Bonadeieaaaf412019-09-13 14:42:15 +02001014 "../api/crypto:frame_decryptor_interface",
1015 "../api/crypto:frame_encryptor_interface",
Danil Chapovalov4ba04b72019-06-26 15:49:47 +02001016 "../api/rtc_event_log:rtc_event_log_factory",
Danil Chapovalovaaa11432019-05-17 13:20:14 +02001017 "../api/task_queue:default_task_queue_factory",
Erik Språngceb44952020-09-22 11:36:35 +02001018 "../api/transport:field_trial_based_config",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001019 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +02001020 "../api/video:video_rtp_headers",
Anders Carlsson7e042812017-10-05 16:55:38 +02001021 "../api/video_codecs:video_codecs_api",
Anders Carlssone5960ce2017-06-22 15:26:30 +02001022 "../common_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001023 "../media:rtc_media_base",
Jiawei Ouae810c12018-06-20 16:18:59 -07001024 "../modules/audio_device:audio_device_api",
Artem Titov94b57c02019-03-21 13:35:10 +01001025 "../modules/audio_processing",
Alessio Bazzicab768e882018-11-07 14:29:54 +00001026 "../modules/audio_processing:api",
Patrik Höglund99175c62018-01-08 11:05:10 +01001027 "../modules/video_coding:video_codec_interface",
zhihuanga4c113a2017-06-28 14:05:44 -07001028 "../pc:peerconnection",
Artem Titov94b57c02019-03-21 13:35:10 +01001029 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001030 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001031 "../rtc_base:logging",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001032 "../rtc_base:network_constants",
Mirko Bonadei17f48782018-09-28 08:51:10 +02001033 "../system_wrappers:field_trial",
1034 "../system_wrappers:metrics",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001035 ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001036
1037 if (is_ios) {
1038 deps += [ ":native_api_audio_device_module" ]
1039 }
kthelgasonebc34e72016-09-15 04:30:18 -07001040 }
Zeke Chindd0e1e02016-10-11 13:27:26 -07001041
mbonadei2c8ac1b2017-05-31 05:14:26 -07001042 if (rtc_include_tests) {
Daniela012b56b2017-11-15 13:15:24 +01001043 if (is_ios) {
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001044 rtc_library("sdk_unittests_sources") {
Danielaae012cf2017-10-12 13:46:00 +02001045 testonly = true
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001046 include_dirs = [ "objc/" ]
Daniela012b56b2017-11-15 13:15:24 +01001047
Danielaae012cf2017-10-12 13:46:00 +02001048 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001049 "objc/unittests/ObjCVideoTrackSource_xctest.mm",
1050 "objc/unittests/RTCCVPixelBuffer_xctest.mm",
1051 "objc/unittests/RTCCallbackLogger_xctest.m",
Kári Tristan Helgasonecbdbf62020-02-20 07:34:45 -08001052 "objc/unittests/RTCEncodedImage_xctest.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001053 "objc/unittests/RTCFileVideoCapturer_xctest.mm",
1054 "objc/unittests/RTCH264ProfileLevelId_xctest.m",
Jake Brombergfb7fd242021-06-14 13:44:25 -07001055 "objc/unittests/RTCMTLVideoView_xctest.m",
Aaron Goldenfb4e9bc2019-01-04 12:03:31 -08001056 "objc/unittests/RTCNV12TextureCache_xctest.m",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001057 "objc/unittests/RTCPeerConnectionFactory_xctest.m",
1058 "objc/unittests/frame_buffer_helpers.h",
1059 "objc/unittests/frame_buffer_helpers.mm",
Artem Titarenko42b43152018-10-29 18:18:09 +01001060 "objc/unittests/nalu_rewriter_xctest.mm",
Danielaae012cf2017-10-12 13:46:00 +02001061 ]
Daniela012b56b2017-11-15 13:15:24 +01001062
Mirko Bonadei6b09c452021-07-05 16:47:49 +02001063 # TODO(bugs.webrtc.org/12937): Remove OpenGL deprecation warning
1064 # workaround.
1065 defines = [ "GLES_SILENCE_DEPRECATION" ]
1066
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001067 # TODO(peterhanspers): Reenable these tests on simulator.
1068 # See bugs.webrtc.org/7812
Lahiru Ginnaliya Gamathige1d0e7b62020-10-20 02:43:02 -07001069 if (target_environment != "simulator") {
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001070 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001071 "objc/unittests/RTCAudioDeviceModule_xctest.mm",
1072 "objc/unittests/RTCAudioDevice_xctest.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001073 ]
1074 }
1075
Danielaae012cf2017-10-12 13:46:00 +02001076 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001077 ":audio_device",
Joe Chen0b3a6e32019-12-26 23:01:42 -08001078 ":audio_session_objc",
Kári Tristan Helgasonecbdbf62020-02-20 07:34:45 -08001079 ":base_native_additions_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001080 ":base_objc",
1081 ":callback_logger_objc",
Anders Carlssondc6b4772018-01-15 13:31:03 +01001082 ":framework_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001083 ":mediaconstraints_objc",
Jake Brombergfb7fd242021-06-14 13:44:25 -07001084 ":metal_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001085 ":native_api",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001086 ":native_api_audio_device_module",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001087 ":native_video",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001088 ":peerconnectionfactory_base_objc",
Artem Titarenko42b43152018-10-29 18:18:09 +01001089 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001090 ":videocapture_objc",
Anders Carlsson79ce8202018-06-01 12:51:09 +02001091 ":videocodec_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001092 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001093 ":videosource_objc",
Danielaae012cf2017-10-12 13:46:00 +02001094 ":videotoolbox_objc",
Mirko Bonadeid9708072019-01-25 20:26:48 +01001095 "../api:scoped_refptr",
Byoungchan Lee43bd7602019-10-08 23:58:41 +09001096 "../api/task_queue:default_task_queue_factory",
Ilya Nikolaevskiy38e9b062020-10-08 14:36:33 +00001097 "../api/video:video_frame",
Artem Titov94b57c02019-03-21 13:35:10 +01001098 "../common_video",
Danielaae012cf2017-10-12 13:46:00 +02001099 "../media:rtc_media_base",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001100 "../media:rtc_media_tests_utils",
Artem Titov94b57c02019-03-21 13:35:10 +01001101 "../rtc_base",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001102 "../rtc_base:gunit_helpers",
Byoungchan Lee83ceb902021-11-16 11:31:57 +09001103 "../rtc_base/system:unused",
Artem Titov94b57c02019-03-21 13:35:10 +01001104 "../system_wrappers",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001105 "//third_party/libyuv",
Danielaae012cf2017-10-12 13:46:00 +02001106 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001107
Jordan Rose53d3fc92021-07-06 12:16:41 -07001108 if (rtc_ios_macos_use_opengl_rendering) {
1109 deps += [ ":opengl_objc" ]
1110 }
1111
Danielaae012cf2017-10-12 13:46:00 +02001112 public_deps = [
1113 "//build/config/ios:xctest",
1114 "//third_party/ocmock",
1115 ]
1116 }
1117
Daniela012b56b2017-11-15 13:15:24 +01001118 bundle_data("sdk_unittests_bundle_data") {
Daniela012b56b2017-11-15 13:15:24 +01001119 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001120 "objc/unittests/audio_short16.pcm",
1121 "objc/unittests/audio_short44.pcm",
1122 "objc/unittests/audio_short48.pcm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001123
1124 # Sample video taken from https://media.xiph.org/video/derf/
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001125 "objc/unittests/foreman.mp4",
Daniela012b56b2017-11-15 13:15:24 +01001126 ]
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +01001127 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
Daniela012b56b2017-11-15 13:15:24 +01001128 }
1129
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001130 # These tests use static linking.
Mirko Bonadeiaef8a212020-09-16 15:09:53 +02001131 rtc_test("sdk_unittests") {
1132 is_xctest = true
Danielaae012cf2017-10-12 13:46:00 +02001133 info_plist = "//test/ios/Info.plist"
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +01001134 sources = [ "objc/unittests/main.mm" ]
Daniela012b56b2017-11-15 13:15:24 +01001135
Artem Titarenkoa2bc3622019-08-19 14:24:00 +02001136 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=generic-unit-test" ]
Danielaae012cf2017-10-12 13:46:00 +02001137 deps = [
Yura Yaroshevich5297bd22018-06-19 12:51:51 +03001138 ":peerconnectionfactory_base_objc",
Daniela012b56b2017-11-15 13:15:24 +01001139 ":sdk_unittests_bundle_data",
Danielaae012cf2017-10-12 13:46:00 +02001140 ":sdk_unittests_sources",
Niels Möller5a8f8602019-06-12 11:30:59 +02001141 "../rtc_base",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001142 "../rtc_base:threading",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001143 "//test:test_support",
Danielaae012cf2017-10-12 13:46:00 +02001144 ]
1145 ldflags = [ "-all_load" ]
1146 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001147
1148 # These tests link to the framework.
Mirko Bonadeiaef8a212020-09-16 15:09:53 +02001149 rtc_test("sdk_framework_unittests") {
1150 is_xctest = true
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001151 info_plist = "//test/ios/Info.plist"
1152 sources = [
1153 "objc/unittests/RTCDoNotPutCPlusPlusInFrameworkHeaders_xctest.m",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001154 "objc/unittests/main.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001155 ]
1156
Artem Titarenkoa2bc3622019-08-19 14:24:00 +02001157 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=generic-unit-test" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001158 deps = [
1159 ":framework_objc+link",
1160 ":ios_framework_bundle",
Niels Möller5a8f8602019-06-12 11:30:59 +02001161 "../rtc_base",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001162 "../rtc_base:threading",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001163 "//test:test_support",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001164 ]
1165 }
Danielaae012cf2017-10-12 13:46:00 +02001166 }
1167
1168 # TODO(denicija): once all tests are migrated to xctest remove this source set.
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001169 rtc_library("rtc_unittests_objc") {
mbonadei2c8ac1b2017-05-31 05:14:26 -07001170 testonly = true
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001171
mbonadei2c8ac1b2017-05-31 05:14:26 -07001172 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001173 "objc/unittests/RTCCertificateTest.mm",
1174 "objc/unittests/RTCConfigurationTest.mm",
1175 "objc/unittests/RTCDataChannelConfigurationTest.mm",
1176 "objc/unittests/RTCIceCandidateTest.mm",
1177 "objc/unittests/RTCIceServerTest.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001178 "objc/unittests/RTCMediaConstraintsTest.mm",
1179 "objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm",
1180 "objc/unittests/RTCPeerConnectionTest.mm",
1181 "objc/unittests/RTCSessionDescriptionTest.mm",
1182 "objc/unittests/RTCTracingTest.mm",
1183 "objc/unittests/objc_video_decoder_factory_tests.mm",
1184 "objc/unittests/objc_video_encoder_factory_tests.mm",
1185 "objc/unittests/scoped_cftyperef_tests.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001186 ]
Anders Carlssone7dd83f2018-01-19 11:28:44 +01001187 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001188 sources += [ "objc/unittests/RTCCameraVideoCapturerTests.mm" ]
oprypin45197522017-06-22 01:47:20 -07001189 }
mbonadeid7620582017-05-30 01:50:35 -07001190
mbonadei2c8ac1b2017-05-31 05:14:26 -07001191 # |-ObjC| flag needed to make sure category method implementations
1192 # are included:
1193 # https://developer.apple.com/library/mac/qa/qa1490/_index.html
1194 ldflags = [ "-ObjC" ]
magjed3149e092017-05-08 05:32:05 -07001195
mbonadei2c8ac1b2017-05-31 05:14:26 -07001196 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001197 ":base_objc",
1198 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001199 ":mediaconstraints_objc",
1200 ":native_api",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001201 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001202 ":peerconnectionfactory_base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001203 ":videocapture_objc",
1204 ":videocodec_objc",
1205 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001206 ":videosource_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001207 ":videotoolbox_objc",
Piotr (Peter) Slatalae0c2e972018-10-08 09:43:21 -07001208 "../api:libjingle_peerconnection_api",
Jiawei Ouae810c12018-06-20 16:18:59 -07001209 "../api/audio_codecs:audio_codecs_api",
1210 "../api/audio_codecs:builtin_audio_decoder_factory",
1211 "../api/audio_codecs:builtin_audio_encoder_factory",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001212 "../api/video_codecs:video_codecs_api",
kthelgasonebd4f792017-09-04 04:36:21 -07001213 "../media:rtc_media_base",
Jiawei Ouae810c12018-06-20 16:18:59 -07001214 "../modules/audio_device:audio_device_api",
Artem Titov94b57c02019-03-21 13:35:10 +01001215 "../modules/audio_processing",
Alessio Bazzicab768e882018-11-07 14:29:54 +00001216 "../modules/audio_processing:api",
Patrik Höglund99175c62018-01-08 11:05:10 +01001217 "../modules/video_coding:video_codec_interface",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001218 "../rtc_base:gunit_helpers",
Byoungchan Lee0a54e7a2021-09-06 22:32:52 +09001219 "../rtc_base:rtc_event",
Niels Möllera12c42a2018-07-25 16:05:48 +02001220 "../rtc_base/system:unused",
Yves Gerey21cddff2018-10-30 21:12:42 +01001221 "../test:test_support",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001222 "//third_party/ocmock",
1223 ]
magjed3149e092017-05-08 05:32:05 -07001224
denicija59ee91b2017-06-05 05:48:47 -07001225 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001226 sources += [ "objc/unittests/RTCAudioSessionTest.mm" ]
Joe Chen0b3a6e32019-12-26 23:01:42 -08001227 deps += [ ":audio_session_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001228 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001229 }
kthelgason2f088792017-05-30 01:48:47 -07001230 }
1231
mbonadei2c8ac1b2017-05-31 05:14:26 -07001232 if (is_ios) {
Anders Carlssondc6b4772018-01-15 13:31:03 +01001233 ios_framework_bundle_with_umbrella_header("framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001234 info_plist = "objc/Info.plist"
mbonadei2c8ac1b2017-05-31 05:14:26 -07001235 output_name = "WebRTC"
Magnus Jedvertf83dc8b2017-08-29 09:49:43 +00001236
mbonadei2c8ac1b2017-05-31 05:14:26 -07001237 common_objc_headers = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001238 "objc/base/RTCCodecSpecificInfo.h",
1239 "objc/base/RTCEncodedImage.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001240 "objc/base/RTCI420Buffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001241 "objc/base/RTCLogging.h",
1242 "objc/base/RTCMacros.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001243 "objc/base/RTCMutableI420Buffer.h",
1244 "objc/base/RTCMutableYUVPlanarBuffer.h",
Yury Yaroshevich19a6e942022-03-11 09:22:08 +01001245 "objc/base/RTCSSLCertificateVerifier.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001246 "objc/base/RTCVideoCapturer.h",
1247 "objc/base/RTCVideoCodecInfo.h",
1248 "objc/base/RTCVideoDecoder.h",
1249 "objc/base/RTCVideoDecoderFactory.h",
1250 "objc/base/RTCVideoEncoder.h",
1251 "objc/base/RTCVideoEncoderFactory.h",
1252 "objc/base/RTCVideoEncoderQpThresholds.h",
1253 "objc/base/RTCVideoEncoderSettings.h",
1254 "objc/base/RTCVideoFrame.h",
1255 "objc/base/RTCVideoFrameBuffer.h",
1256 "objc/base/RTCVideoRenderer.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001257 "objc/base/RTCYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001258 "objc/components/audio/RTCAudioSession.h",
1259 "objc/components/audio/RTCAudioSessionConfiguration.h",
1260 "objc/components/capturer/RTCCameraVideoCapturer.h",
1261 "objc/components/capturer/RTCFileVideoCapturer.h",
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001262 "objc/components/network/RTCNetworkMonitor.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001263 "objc/components/renderer/metal/RTCMTLVideoView.h",
1264 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
1265 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1266 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1267 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1268 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1269 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1270 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1271 "objc/components/video_codec/RTCVideoDecoderH264.h",
1272 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1273 "objc/components/video_codec/RTCVideoEncoderH264.h",
1274 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1275 "objc/helpers/RTCCameraPreviewView.h",
1276 "objc/helpers/RTCDispatcher.h",
1277 "objc/helpers/UIDevice+RTCDevice.h",
1278 "objc/api/peerconnection/RTCAudioSource.h",
1279 "objc/api/peerconnection/RTCAudioTrack.h",
1280 "objc/api/peerconnection/RTCConfiguration.h",
1281 "objc/api/peerconnection/RTCDataChannel.h",
1282 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1283 "objc/api/peerconnection/RTCFieldTrials.h",
1284 "objc/api/peerconnection/RTCIceCandidate.h",
Jaehyun Kod2110982021-11-30 19:01:43 +09001285 "objc/api/peerconnection/RTCIceCandidateErrorEvent.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001286 "objc/api/peerconnection/RTCIceServer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001287 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1288 "objc/api/peerconnection/RTCMediaConstraints.h",
1289 "objc/api/peerconnection/RTCMediaSource.h",
1290 "objc/api/peerconnection/RTCMediaStream.h",
1291 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1292 "objc/api/peerconnection/RTCMetrics.h",
1293 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1294 "objc/api/peerconnection/RTCPeerConnection.h",
1295 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1296 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1297 "objc/api/peerconnection/RTCRtcpParameters.h",
1298 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1299 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1300 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1301 "objc/api/peerconnection/RTCRtpParameters.h",
1302 "objc/api/peerconnection/RTCRtpReceiver.h",
1303 "objc/api/peerconnection/RTCRtpSender.h",
1304 "objc/api/peerconnection/RTCRtpTransceiver.h",
1305 "objc/api/peerconnection/RTCDtmfSender.h",
1306 "objc/api/peerconnection/RTCSSLAdapter.h",
1307 "objc/api/peerconnection/RTCSessionDescription.h",
CZ Theng682dabd2019-10-21 11:25:18 +08001308 "objc/api/peerconnection/RTCStatisticsReport.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001309 "objc/api/peerconnection/RTCTracing.h",
1310 "objc/api/peerconnection/RTCCertificate.h",
Benjamin Wright8c27cca2018-10-25 10:16:44 -07001311 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001312 "objc/api/peerconnection/RTCVideoSource.h",
1313 "objc/api/peerconnection/RTCVideoTrack.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001314 "objc/api/video_codec/RTCVideoCodecConstants.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001315 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1316 "objc/api/video_codec/RTCVideoDecoderVP9.h",
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +03001317 "objc/api/video_codec/RTCVideoDecoderAV1.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001318 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1319 "objc/api/video_codec/RTCVideoEncoderVP9.h",
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +03001320 "objc/api/video_codec/RTCVideoEncoderAV1.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001321 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1322 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001323 ]
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001324
mbonadei2c8ac1b2017-05-31 05:14:26 -07001325 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001326 common_objc_headers += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001327 "objc/api/logging/RTCCallbackLogger.h",
1328 "objc/api/peerconnection/RTCFileLogger.h",
Anders Carlsson3b3364e2018-01-30 15:46:13 +01001329 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001330 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001331
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001332 sources = common_objc_headers
1333 public_headers = common_objc_headers
1334
mbonadei2c8ac1b2017-05-31 05:14:26 -07001335 ldflags = [
1336 "-all_load",
1337 "-install_name",
1338 "@rpath/$output_name.framework/$output_name",
1339 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001340
mbonadei2c8ac1b2017-05-31 05:14:26 -07001341 deps = [
kthelgason36d658d2017-08-24 05:43:45 -07001342 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001343 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001344 ":default_codec_factory_objc",
Mirko Bonadei91d39752022-01-19 08:43:17 +01001345 ":metal_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001346 ":native_api",
1347 ":native_video",
1348 ":peerconnectionfactory_base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001349 ":videocapture_objc",
1350 ":videocodec_objc",
1351 ":videotoolbox_objc",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001352 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001353 ]
Jordan Rose53d3fc92021-07-06 12:16:41 -07001354 if (rtc_ios_macos_use_opengl_rendering) {
1355 deps += [ ":opengl_ui_objc" ]
1356 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001357 if (!build_with_chromium) {
1358 deps += [
1359 ":callback_logger_objc",
1360 ":file_logger_objc",
1361 ]
1362 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001363
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +02001364 frameworks = [
mbonadei2c8ac1b2017-05-31 05:14:26 -07001365 "AVFoundation.framework",
1366 "CoreGraphics.framework",
1367 "CoreMedia.framework",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001368 ]
1369
Anders Carlsson358f2e02018-06-04 10:24:37 +02001370 configs += [
1371 "..:common_objc",
1372 ":used_from_extension",
1373 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001374
kthelgason36d658d2017-08-24 05:43:45 -07001375 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001376 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001377
1378 bundle_data("ios_framework_bundle") {
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +01001379 deps = [ "../sdk:framework_objc" ]
1380 sources = [ "$root_build_dir/WebRTC.framework" ]
1381 outputs = [ "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001382 }
1383 }
1384
1385 if (is_mac) {
Anders Carlsson37bbf792018-09-05 16:29:27 +02001386 mac_framework_bundle_with_umbrella_header("mac_framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001387 info_plist = "objc/Info.plist"
1388 output_name = "WebRTC"
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001389
Anders Carlsson37bbf792018-09-05 16:29:27 +02001390 sources = [
1391 "objc/api/peerconnection/RTCAudioSource.h",
1392 "objc/api/peerconnection/RTCAudioTrack.h",
1393 "objc/api/peerconnection/RTCCertificate.h",
1394 "objc/api/peerconnection/RTCConfiguration.h",
Benjamin Wright8c27cca2018-10-25 10:16:44 -07001395 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001396 "objc/api/peerconnection/RTCDataChannel.h",
1397 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1398 "objc/api/peerconnection/RTCDtmfSender.h",
1399 "objc/api/peerconnection/RTCFieldTrials.h",
1400 "objc/api/peerconnection/RTCIceCandidate.h",
Jaehyun Kod2110982021-11-30 19:01:43 +09001401 "objc/api/peerconnection/RTCIceCandidateErrorEvent.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001402 "objc/api/peerconnection/RTCIceServer.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001403 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1404 "objc/api/peerconnection/RTCMediaConstraints.h",
1405 "objc/api/peerconnection/RTCMediaSource.h",
1406 "objc/api/peerconnection/RTCMediaStream.h",
1407 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1408 "objc/api/peerconnection/RTCMetrics.h",
1409 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1410 "objc/api/peerconnection/RTCPeerConnection.h",
1411 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1412 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1413 "objc/api/peerconnection/RTCRtcpParameters.h",
1414 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1415 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1416 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1417 "objc/api/peerconnection/RTCRtpParameters.h",
1418 "objc/api/peerconnection/RTCRtpReceiver.h",
1419 "objc/api/peerconnection/RTCRtpSender.h",
1420 "objc/api/peerconnection/RTCRtpTransceiver.h",
1421 "objc/api/peerconnection/RTCSSLAdapter.h",
1422 "objc/api/peerconnection/RTCSessionDescription.h",
Saúl Ibarra Corretgéf7aa2672021-07-28 23:09:14 +02001423 "objc/api/peerconnection/RTCStatisticsReport.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001424 "objc/api/peerconnection/RTCTracing.h",
1425 "objc/api/peerconnection/RTCVideoSource.h",
1426 "objc/api/peerconnection/RTCVideoTrack.h",
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +03001427 "objc/api/video_codec/RTCVideoDecoderAV1.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001428 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1429 "objc/api/video_codec/RTCVideoDecoderVP9.h",
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +03001430 "objc/api/video_codec/RTCVideoEncoderAV1.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001431 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1432 "objc/api/video_codec/RTCVideoEncoderVP9.h",
1433 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1434 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
1435 "objc/base/RTCCodecSpecificInfo.h",
1436 "objc/base/RTCEncodedImage.h",
1437 "objc/base/RTCI420Buffer.h",
1438 "objc/base/RTCLogging.h",
1439 "objc/base/RTCMacros.h",
1440 "objc/base/RTCMutableI420Buffer.h",
1441 "objc/base/RTCMutableYUVPlanarBuffer.h",
Yury Yaroshevich19a6e942022-03-11 09:22:08 +01001442 "objc/base/RTCSSLCertificateVerifier.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001443 "objc/base/RTCVideoCapturer.h",
1444 "objc/base/RTCVideoCodecInfo.h",
1445 "objc/base/RTCVideoDecoder.h",
1446 "objc/base/RTCVideoDecoderFactory.h",
1447 "objc/base/RTCVideoEncoder.h",
1448 "objc/base/RTCVideoEncoderFactory.h",
1449 "objc/base/RTCVideoEncoderQpThresholds.h",
1450 "objc/base/RTCVideoEncoderSettings.h",
1451 "objc/base/RTCVideoFrame.h",
1452 "objc/base/RTCVideoFrameBuffer.h",
1453 "objc/base/RTCVideoRenderer.h",
1454 "objc/base/RTCYUVPlanarBuffer.h",
1455 "objc/components/capturer/RTCCameraVideoCapturer.h",
1456 "objc/components/capturer/RTCFileVideoCapturer.h",
1457 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
1458 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
1459 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1460 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1461 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1462 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1463 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1464 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1465 "objc/components/video_codec/RTCVideoDecoderH264.h",
1466 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1467 "objc/components/video_codec/RTCVideoEncoderH264.h",
1468 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1469 "objc/helpers/RTCDispatcher.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001470 ]
Anders Carlsson37bbf792018-09-05 16:29:27 +02001471 if (!build_with_chromium) {
1472 sources += [
1473 "objc/api/logging/RTCCallbackLogger.h",
1474 "objc/api/peerconnection/RTCFileLogger.h",
1475 ]
1476 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001477
1478 deps = [
1479 ":base_objc",
1480 ":default_codec_factory_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001481 ":native_api",
1482 ":native_video",
Jordan Rose53d3fc92021-07-06 12:16:41 -07001483 ":opengl_ui_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001484 ":peerconnectionfactory_base_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001485 ":videocapture_objc",
1486 ":videocodec_objc",
1487 ":videotoolbox_objc",
1488 "../rtc_base:rtc_base_approved",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001489 ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001490 if (!build_with_chromium) {
1491 deps += [
1492 ":callback_logger_objc",
1493 ":file_logger_objc",
1494 ]
1495 }
1496
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +02001497 frameworks = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001498 "AVFoundation.framework",
1499 "CoreGraphics.framework",
1500 "CoreMedia.framework",
1501 "OpenGL.framework",
1502 ]
1503
Anders Carlsson37bbf792018-09-05 16:29:27 +02001504 configs = [ "..:common_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001505
1506 public_configs = [ ":common_config_objc" ]
1507 }
1508
1509 bundle_data("mac_framework_bundle") {
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +01001510 deps = [ "../sdk:mac_framework_objc" ]
1511 sources = [ "$root_build_dir/WebRTC.framework" ]
1512 outputs = [ "{{bundle_contents_dir}}/Frameworks/{{source_file_part}}" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001513 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001514 }
1515
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001516 rtc_library("wrapped_native_codec_objc") {
Anders Carlsson9823ee42018-03-07 10:32:03 +01001517 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001518 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.h",
1519 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm",
1520 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.h",
1521 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001522 ]
1523
1524 configs += [ "..:common_objc" ]
1525 public_configs = [ ":common_config_objc" ]
1526
Anders Carlsson9823ee42018-03-07 10:32:03 +01001527 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001528 ":base_objc",
1529 ":helpers_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001530 "../api/video_codecs:video_codecs_api",
1531 "../media:rtc_media_base",
1532 ]
1533 }
1534
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001535 # The native API is currently experimental and may change without notice.
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001536 rtc_library("native_api") {
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001537 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +01001538 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001539 sources = [
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001540 "objc/native/api/network_monitor_factory.h",
1541 "objc/native/api/network_monitor_factory.mm",
Yury Yaroshevich19a6e942022-03-11 09:22:08 +01001542 "objc/native/api/ssl_certificate_verifier.h",
1543 "objc/native/api/ssl_certificate_verifier.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001544 "objc/native/api/video_capturer.h",
1545 "objc/native/api/video_capturer.mm",
1546 "objc/native/api/video_decoder_factory.h",
1547 "objc/native/api/video_decoder_factory.mm",
1548 "objc/native/api/video_encoder_factory.h",
1549 "objc/native/api/video_encoder_factory.mm",
1550 "objc/native/api/video_frame.h",
1551 "objc/native/api/video_frame.mm",
1552 "objc/native/api/video_frame_buffer.h",
1553 "objc/native/api/video_frame_buffer.mm",
1554 "objc/native/api/video_renderer.h",
1555 "objc/native/api/video_renderer.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001556 ]
1557
1558 configs += [ "..:common_objc" ]
1559
1560 public_configs = [ ":common_config_objc" ]
1561
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001562 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001563 ":base_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001564 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001565 ":videoframebuffer_objc",
Anders Carlsson73119182018-03-15 09:41:03 +01001566 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 14:30:41 +02001567 "../api:media_stream_interface",
Mirko Bonadeid9708072019-01-25 20:26:48 +01001568 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001569 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +02001570 "../api/video:video_rtp_headers",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001571 "../api/video_codecs:video_codecs_api",
1572 "../common_video",
Artem Titov94b57c02019-03-21 13:35:10 +01001573 "../rtc_base",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001574 "../rtc_base:logging",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001575 "../rtc_base:threading",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001576 ]
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001577 if (is_ios) {
1578 deps += [ ":native_network_monitor" ]
1579 }
Mirko Bonadei2dcf3482020-06-05 14:30:41 +02001580 absl_deps = [ "//third_party/abseil-cpp/absl/memory" ]
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001581 }
1582
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001583 if (is_ios) {
1584 rtc_library("native_network_monitor") {
1585 visibility = [ "*" ]
1586
1587 sources = [
1588 "objc/native/src/objc_network_monitor.h",
1589 "objc/native/src/objc_network_monitor.mm",
1590 ]
1591
1592 deps = [
1593 ":network_monitor_objc",
1594 ":network_monitor_observer",
Jonas Orelande62c2f22022-03-29 11:04:48 +02001595 "../api:field_trials_view",
Artem Titovd15a5752021-02-10 14:31:24 +01001596 "../api:sequence_checker",
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001597 "../rtc_base",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001598 "../rtc_base:logging",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001599 "../rtc_base:threading",
Niels Möllerbe140b42021-03-11 10:24:06 +01001600 "../rtc_base/task_utils:pending_task_safety_flag",
1601 "../rtc_base/task_utils:to_queued_task",
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001602 ]
Ali Tofigh7fa90572022-03-17 15:47:49 +01001603
1604 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001605 }
1606 }
1607
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001608 rtc_library("native_video") {
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001609 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001610 "objc/native/src/objc_frame_buffer.h",
1611 "objc/native/src/objc_frame_buffer.mm",
1612 "objc/native/src/objc_video_decoder_factory.h",
1613 "objc/native/src/objc_video_decoder_factory.mm",
1614 "objc/native/src/objc_video_encoder_factory.h",
1615 "objc/native/src/objc_video_encoder_factory.mm",
1616 "objc/native/src/objc_video_frame.h",
1617 "objc/native/src/objc_video_frame.mm",
1618 "objc/native/src/objc_video_renderer.h",
1619 "objc/native/src/objc_video_renderer.mm",
1620 "objc/native/src/objc_video_track_source.h",
1621 "objc/native/src/objc_video_track_source.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001622 ]
1623
1624 configs += [ "..:common_objc" ]
1625
1626 public_configs = [ ":common_config_objc" ]
1627
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001628 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001629 ":base_native_additions_objc",
1630 ":base_objc",
1631 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001632 ":videocodec_objc",
1633 ":videoframebuffer_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001634 ":vpx_codec_constants",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001635 ":wrapped_native_codec_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001636 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +02001637 "../api/video:video_rtp_headers",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001638 "../api/video_codecs:video_codecs_api",
1639 "../common_video",
1640 "../media:rtc_audio_video",
1641 "../media:rtc_media_base",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001642 "../modules/video_coding:video_codec_interface",
Artem Titov94b57c02019-03-21 13:35:10 +01001643 "../rtc_base",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001644 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001645 "../rtc_base:logging",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001646 ]
1647 }
1648
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001649 rtc_library("video_toolbox_cc") {
Artem Titarenko42b43152018-10-29 18:18:09 +01001650 visibility = [
Mirko Bonadei08574ae2020-09-16 07:22:57 +00001651 ":sdk_unittests_sources",
Mirko Bonadeiaef8a212020-09-16 15:09:53 +02001652 ":videotoolbox_objc",
Artem Titarenko42b43152018-10-29 18:18:09 +01001653 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001654 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001655 "objc/components/video_codec/helpers.cc",
1656 "objc/components/video_codec/helpers.h",
1657 "objc/components/video_codec/nalu_rewriter.cc",
1658 "objc/components/video_codec/nalu_rewriter.h",
mbonadeic0af5ac2017-08-24 12:26:05 -07001659 ]
1660 deps = [
1661 "../common_video",
mbonadeic0af5ac2017-08-24 12:26:05 -07001662 "../modules/video_coding:webrtc_h264",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001663 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001664 "../rtc_base:logging",
mbonadeic0af5ac2017-08-24 12:26:05 -07001665 "../rtc_base:rtc_base_approved",
1666 ]
mbonadeic0af5ac2017-08-24 12:26:05 -07001667 }
1668
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001669 rtc_library("videotoolbox_objc") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001670 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +01001671 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadeic0af5ac2017-08-24 12:26:05 -07001672 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001673 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1674 "objc/components/video_codec/RTCVideoDecoderFactoryH264.m",
1675 "objc/components/video_codec/RTCVideoDecoderH264.h",
1676 "objc/components/video_codec/RTCVideoDecoderH264.mm",
1677 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1678 "objc/components/video_codec/RTCVideoEncoderFactoryH264.m",
1679 "objc/components/video_codec/RTCVideoEncoderH264.h",
1680 "objc/components/video_codec/RTCVideoEncoderH264.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001681 ]
1682
Anders Carlsson358f2e02018-06-04 10:24:37 +02001683 configs += [
1684 "..:common_objc",
1685 ":used_from_extension",
1686 ]
1687
1688 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
1689 defines = [ "RTC_APPRTCMOBILE_BROADCAST_EXTENSION" ]
1690 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001691
1692 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001693 ":base_native_additions_objc",
1694 ":base_objc",
1695 ":helpers_objc",
mbonadeic0af5ac2017-08-24 12:26:05 -07001696 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001697 ":videocodec_objc",
1698 ":videoframebuffer_objc",
Johannes Kronc3fcee72021-04-19 09:09:26 +02001699 "../api/video_codecs:video_codecs_api",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001700 "../common_video",
Patrik Höglund99175c62018-01-08 11:05:10 +01001701 "../modules/video_coding:video_codec_interface",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001702 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001703 "../rtc_base:logging",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001704 "../rtc_base:rtc_base_approved",
Mirko Bonadei401d0562017-12-14 11:24:00 +01001705 "//third_party/libyuv",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001706 ]
1707
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +02001708 frameworks = [
mbonadei2c8ac1b2017-05-31 05:14:26 -07001709 "CoreFoundation.framework",
1710 "CoreMedia.framework",
1711 "CoreVideo.framework",
1712 "VideoToolbox.framework",
1713 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001714 }
1715 }
tkchin9eeb6242016-04-27 01:54:20 -07001716}