blob: b00499324d27a7d3d54c7784a9398f5ecd4e2caf [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 = [
Artem Titov63ee39d2022-05-13 14:46:42 +0000139 "objc/helpers/AVCaptureSession+DevicePosition.h",
140 "objc/helpers/AVCaptureSession+DevicePosition.mm",
141 "objc/helpers/NSString+StdString.h",
142 "objc/helpers/NSString+StdString.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200143 "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",
Florent Castellif86f6f92022-04-05 02:54:12 +0200237 "../rtc_base:refcount",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200238 "../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",
Florent Castelli8d4e9fb2022-04-04 17:18:21 +0200272 "../api:sequence_checker",
Danil Chapovalova6cb1502019-06-27 15:16:34 +0200273 "../api/task_queue",
274 "../api/task_queue:default_task_queue_factory",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200275 "../modules/audio_device:audio_device_api",
276 "../modules/audio_device:audio_device_buffer",
277 "../modules/audio_device:audio_device_generic",
Artem Titov94b57c02019-03-21 13:35:10 +0100278 "../rtc_base",
Florent Castellibddfe022022-04-04 15:03:10 +0200279 "../rtc_base:atomicops",
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",
Florent Castellibddfe022022-04-04 15:03:10 +0200350 "../rtc_base:atomicops",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100351 "../rtc_base:checks",
Niels Möller072c0082021-02-15 16:30:44 +0100352 "../rtc_base/synchronization:mutex",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100353 ]
Byoungchan Lee0a54e7a2021-09-06 22:32:52 +0900354
355 absl_deps = [ "//third_party/abseil-cpp/absl/base:core_headers" ]
denicija59ee91b2017-06-05 05:48:47 -0700356 }
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -0700357
358 rtc_source_set("network_monitor_observer") {
359 visibility = [ ":*" ]
360
361 sources = [ "objc/native/src/network_monitor_observer.h" ]
362
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100363 deps = [
364 "../rtc_base",
365 "../rtc_base:network_constants",
Florent Castelli57aa81b2022-04-04 17:14:02 +0200366 "../rtc_base:stringutils",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100367 "../rtc_base:threading",
368 ]
Ali Tofigh7fa90572022-03-17 15:47:49 +0100369
370 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -0700371 }
372
373 rtc_library("network_monitor_objc") {
374 visibility = [ "*" ]
375
376 sources = [
377 "objc/components/network/RTCNetworkMonitor+Private.h",
378 "objc/components/network/RTCNetworkMonitor.h",
379 "objc/components/network/RTCNetworkMonitor.mm",
380 ]
381
382 configs += [ ":used_from_extension" ]
383
384 frameworks = [ "Network.framework" ]
385
386 deps = [
387 ":base_objc",
388 ":helpers_objc",
389 ":network_monitor_observer",
Ali Tofigh7fa90572022-03-17 15:47:49 +0100390 "../rtc_base:stringutils",
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -0700391 "../rtc_base/system:gcd_helpers",
392 ]
393 }
denicija59ee91b2017-06-05 05:48:47 -0700394 }
zhihuanga4c113a2017-06-28 14:05:44 -0700395
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200396 rtc_library("videosource_objc") {
zhihuanga4c113a2017-06-28 14:05:44 -0700397 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200398 "objc/api/peerconnection/RTCVideoSource+Private.h",
399 "objc/api/peerconnection/RTCVideoSource.h",
400 "objc/api/peerconnection/RTCVideoSource.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700401 ]
402
403 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200404 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100405 ":mediasource_objc",
406 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100407 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700408 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 14:30:41 +0200409 "../api:media_stream_interface",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200410 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +0200411 "../api/video:video_rtp_headers",
zhihuanga4c113a2017-06-28 14:05:44 -0700412 "../common_video",
413 "../media:rtc_media_base",
Harald Alvestrande5a73f52022-03-28 12:06:34 +0000414 "../pc:video_track_source_proxy",
Artem Titov94b57c02019-03-21 13:35:10 +0100415 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100416 "../rtc_base:checks",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100417 "../rtc_base:threading",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100418 "//third_party/libyuv",
zhihuanga4c113a2017-06-28 14:05:44 -0700419 ]
420
Anders Carlsson358f2e02018-06-04 10:24:37 +0200421 configs += [
422 "..:common_objc",
423 ":used_from_extension",
424 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700425 }
426
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200427 rtc_library("videoframebuffer_objc") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200428 visibility = [ "*" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100429 sources = [
Anders Carlsson4e5af962018-09-03 14:44:50 +0200430 "objc/api/video_frame_buffer/RTCNativeI420Buffer+Private.h",
431 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
432 "objc/api/video_frame_buffer/RTCNativeI420Buffer.mm",
433 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
434 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200435 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
436 "objc/components/video_frame_buffer/RTCCVPixelBuffer.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100437 ]
438 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200439 ":base_objc",
Florent Castelli0af55ba2022-04-04 15:06:30 +0200440 "../rtc_base:logging",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200441 "//api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +0200442 "//api/video:video_rtp_headers",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100443 "//common_video",
444 "//rtc_base:checks",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100445 "//third_party/libyuv",
446 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200447 configs += [
448 "..:common_objc",
449 ":used_from_extension",
450 ]
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200451 frameworks = [
Kári Tristan Helgason8a1e35c2019-03-07 10:44:26 +0100452 "VideoToolbox.framework",
Oleh Prypinb3f78de2019-07-18 22:25:48 +0200453 "CoreGraphics.framework",
Kári Tristan Helgason8a1e35c2019-03-07 10:44:26 +0100454 "CoreVideo.framework",
455 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100456 }
457
Jordan Rose53d3fc92021-07-06 12:16:41 -0700458 rtc_library("opengl_objc") {
kthelgason2f088792017-05-30 01:48:47 -0700459 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200460 "objc/components/renderer/opengl/RTCDefaultShader.h",
461 "objc/components/renderer/opengl/RTCDefaultShader.mm",
462 "objc/components/renderer/opengl/RTCI420TextureCache.h",
463 "objc/components/renderer/opengl/RTCI420TextureCache.mm",
464 "objc/components/renderer/opengl/RTCOpenGLDefines.h",
465 "objc/components/renderer/opengl/RTCShader.h",
466 "objc/components/renderer/opengl/RTCShader.mm",
467 "objc/components/renderer/opengl/RTCVideoViewShading.h",
kthelgason2f088792017-05-30 01:48:47 -0700468 ]
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200469 frameworks = [ "CoreVideo.framework" ]
denicijad2088152017-04-28 02:14:54 -0700470 if (is_ios) {
denicija070d5e32017-02-26 11:44:13 -0800471 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200472 "objc/components/renderer/opengl/RTCNV12TextureCache.h",
473 "objc/components/renderer/opengl/RTCNV12TextureCache.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700474 ]
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200475 frameworks += [
mbonadei2c8ac1b2017-05-31 05:14:26 -0700476 "GLKit.framework",
477 "OpenGLES.framework",
478 "QuartzCore.framework",
479 ]
480 } else if (is_mac) {
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200481 frameworks += [
mbonadei2c8ac1b2017-05-31 05:14:26 -0700482 "CoreMedia.framework",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700483 "OpenGL.framework",
denicija070d5e32017-02-26 11:44:13 -0800484 ]
485 }
Mirko Bonadei6b09c452021-07-05 16:47:49 +0200486
487 # TODO(bugs.webrtc.org/12937): Remove OpenGL deprecation warning
488 # workaround.
Björn Terelius02768ae2021-07-02 16:19:32 +0200489 defines = [ "GLES_SILENCE_DEPRECATION" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700490
kthelgason2f088792017-05-30 01:48:47 -0700491 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200492 ":base_objc",
493 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100494 ":mediaconstraints_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100495 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100496 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100497 ":videosource_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700498 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200499 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +0200500 "../api/video:video_rtp_headers",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700501 "../common_video",
502 "../media:rtc_media_base",
Artem Titov94b57c02019-03-21 13:35:10 +0100503 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100504 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +0200505 "../rtc_base:logging",
tkchin9eeb6242016-04-27 01:54:20 -0700506 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200507 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700508
Anders Carlsson358f2e02018-06-04 10:24:37 +0200509 configs += [
510 "..:common_objc",
511 ":used_from_extension",
512 ]
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800513 }
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800514
Jordan Rose53d3fc92021-07-06 12:16:41 -0700515 rtc_library("opengl_ui_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000516 visibility = [ "*" ]
Jake Brombergfb7fd242021-06-14 13:44:25 -0700517 allow_poison = [
518 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
519 "default_task_queue",
520 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700521 if (is_ios) {
522 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200523 "objc/components/renderer/opengl/RTCDisplayLinkTimer.h",
524 "objc/components/renderer/opengl/RTCDisplayLinkTimer.m",
525 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
526 "objc/components/renderer/opengl/RTCEAGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700527 ]
Mirko Bonadei6b09c452021-07-05 16:47:49 +0200528
529 # TODO(bugs.webrtc.org/12937): Remove OpenGL deprecation warning
530 # workaround.
Björn Terelius02768ae2021-07-02 16:19:32 +0200531 defines = [ "GLES_SILENCE_DEPRECATION" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700532 }
533 if (is_mac) {
534 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200535 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
536 "objc/components/renderer/opengl/RTCNSGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700537 ]
538 }
539 configs += [ "..:common_objc" ]
540 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200541 ":base_objc",
542 ":helpers_objc",
Jake Brombergfb7fd242021-06-14 13:44:25 -0700543 ":metal_objc",
Jordan Rose53d3fc92021-07-06 12:16:41 -0700544 ":opengl_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100545 ":videocapture_objc",
546 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700547 ]
548 }
kthelgasonebc34e72016-09-15 04:30:18 -0700549
Jake Brombergfb7fd242021-06-14 13:44:25 -0700550 rtc_library("metal_objc") {
551 visibility = [ "*" ]
552 allow_poison = [
553 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
554 "default_task_queue",
555 ]
556 sources = [
557 "objc/components/renderer/metal/RTCMTLI420Renderer.h",
558 "objc/components/renderer/metal/RTCMTLI420Renderer.mm",
559 "objc/components/renderer/metal/RTCMTLNV12Renderer.h",
560 "objc/components/renderer/metal/RTCMTLNV12Renderer.mm",
561 "objc/components/renderer/metal/RTCMTLRGBRenderer.h",
562 "objc/components/renderer/metal/RTCMTLRGBRenderer.mm",
563 "objc/components/renderer/metal/RTCMTLRenderer+Private.h",
564 "objc/components/renderer/metal/RTCMTLRenderer.h",
565 "objc/components/renderer/metal/RTCMTLRenderer.mm",
566 ]
567 frameworks = [
568 "CoreVideo.framework",
569 "Metal.framework",
570 "MetalKit.framework",
571 ]
572 if (is_ios) {
573 sources += [
574 "objc/components/renderer/metal/RTCMTLVideoView.h",
575 "objc/components/renderer/metal/RTCMTLVideoView.m",
Danil Chapovalov41300af2019-07-10 12:44:43 +0200576 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700577 }
Jake Brombergfb7fd242021-06-14 13:44:25 -0700578 if (is_mac) {
579 sources += [
580 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
581 "objc/components/renderer/metal/RTCMTLNSVideoView.m",
582 ]
583 frameworks += [ "AppKit.framework" ]
584 }
585 deps = [
586 ":base_objc",
587 ":peerconnectionfactory_base_objc",
Jake Brombergfb7fd242021-06-14 13:44:25 -0700588 ":videoframebuffer_objc",
589 "../api/video:video_frame",
590 "../api/video:video_rtp_headers",
591 "../rtc_base:checks",
Jake Brombergfb7fd242021-06-14 13:44:25 -0700592 ]
593 configs += [ "..:common_objc" ]
594 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700595 }
596
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200597 # TODO(bugs.webrtc.org/9627): Remove this target.
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200598 rtc_library("videocapturebase_objc") {
Anders Carlsson73119182018-03-15 09:41:03 +0100599 visibility = [ "*" ]
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +0100600 sources = [ "objc/helpers/noop.mm" ]
Anders Carlsson73119182018-03-15 09:41:03 +0100601
602 configs += [ "..:common_objc" ]
603
604 public_configs = [ ":common_config_objc" ]
605
606 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200607 ":base_objc",
Anders Carlsson73119182018-03-15 09:41:03 +0100608 ":videoframebuffer_objc",
609 ]
610 }
611
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200612 rtc_library("videocapture_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000613 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100614 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadei2c8ac1b2017-05-31 05:14:26 -0700615 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200616 "objc/components/capturer/RTCCameraVideoCapturer.h",
617 "objc/components/capturer/RTCCameraVideoCapturer.m",
Mirko Bonadei19640aa2020-10-19 16:12:43 +0200618 "objc/components/capturer/RTCFileVideoCapturer.h",
619 "objc/components/capturer/RTCFileVideoCapturer.m",
zhihuanga4c113a2017-06-28 14:05:44 -0700620 ]
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200621 frameworks = [
Kári Tristan Helgason8a1e35c2019-03-07 10:44:26 +0100622 "AVFoundation.framework",
623 "CoreVideo.framework",
Mirko Bonadei19640aa2020-10-19 16:12:43 +0200624 "QuartzCore.framework",
Kári Tristan Helgason8a1e35c2019-03-07 10:44:26 +0100625 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700626
zhihuanga4c113a2017-06-28 14:05:44 -0700627 configs += [ "..:common_objc" ]
628
kthelgason36d658d2017-08-24 05:43:45 -0700629 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700630
zhihuanga4c113a2017-06-28 14:05:44 -0700631 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200632 ":base_objc",
633 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100634 ":videoframebuffer_objc",
Yura Yaroshevichebf739b2020-03-16 18:00:59 +0300635 "../rtc_base/system:gcd_helpers",
zhihuanga4c113a2017-06-28 14:05:44 -0700636 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700637 }
638
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200639 rtc_library("videocodec_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200640 visibility = [ "*" ]
Mirko Bonadei96ede162018-09-06 13:45:44 +0200641 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100642 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200643 "objc/components/video_codec/RTCCodecSpecificInfoH264+Private.h",
644 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
645 "objc/components/video_codec/RTCCodecSpecificInfoH264.mm",
646 "objc/components/video_codec/RTCH264ProfileLevelId.h",
647 "objc/components/video_codec/RTCH264ProfileLevelId.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700648 ]
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300649 if (is_ios) {
650 sources += [
Artem Titov63ee39d2022-05-13 14:46:42 +0000651 "objc/components/video_codec/UIDevice+H264Profile.h",
652 "objc/components/video_codec/UIDevice+H264Profile.mm",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300653 ]
654 }
Mirko Bonadeifc52b912019-03-01 10:32:56 +0100655
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100656 public_configs = [ ":common_config_objc" ]
657 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200658 ":base_objc",
659 ":helpers_objc",
kthelgasonfb143122017-07-25 07:55:58 -0700660 "../api/video_codecs:video_codecs_api",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100661 "../common_video",
zhihuanga4c113a2017-06-28 14:05:44 -0700662 "../media:rtc_media_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100663 "../modules/video_coding:video_codec_interface",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200664 "../rtc_base:checks",
zhihuanga4c113a2017-06-28 14:05:44 -0700665 ]
666 }
667
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200668 rtc_library("default_codec_factory_objc") {
Anders Carlssondd8c1652018-01-30 10:32:13 +0100669 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200670 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
671 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.m",
672 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
673 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.m",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100674 ]
675
676 deps = [
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +0300677 ":av1",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200678 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100679 ":native_video",
680 ":videocodec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200681 ":videotoolbox_objc",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +0200682 ":vp8",
683 ":vp9",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200684 ":vpx_codec_constants",
685 ]
686 }
687
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200688 rtc_library("vpx_codec_constants") {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200689 configs += [ "..:no_global_constructors" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200690 sources = [
691 "objc/api/video_codec/RTCVideoCodecConstants.h",
692 "objc/api/video_codec/RTCVideoCodecConstants.mm",
693 ]
694
695 deps = [
696 ":base_objc",
697 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100698 ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100699 }
700
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200701 rtc_library("vp8") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100702 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200703 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100704 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200705 "objc/api/video_codec/RTCVideoDecoderVP8.h",
706 "objc/api/video_codec/RTCVideoDecoderVP8.mm",
707 "objc/api/video_codec/RTCVideoEncoderVP8.h",
708 "objc/api/video_codec/RTCVideoEncoderVP8.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100709 ]
710
Anders Carlssondd8c1652018-01-30 10:32:13 +0100711 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200712 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100713 ":wrapped_native_codec_objc",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100714 "../modules/video_coding:webrtc_vp8",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100715 ]
716 }
717
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200718 rtc_library("vp9") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100719 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200720 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100721 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200722 "objc/api/video_codec/RTCVideoDecoderVP9.h",
723 "objc/api/video_codec/RTCVideoDecoderVP9.mm",
724 "objc/api/video_codec/RTCVideoEncoderVP9.h",
725 "objc/api/video_codec/RTCVideoEncoderVP9.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100726 ]
727
Anders Carlssondd8c1652018-01-30 10:32:13 +0100728 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200729 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100730 ":wrapped_native_codec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200731 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100732 "../modules/video_coding:webrtc_vp9",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100733 ]
734 }
735
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +0300736 rtc_library("av1") {
737 visibility = [ "*" ]
738 allow_poison = [ "software_video_codecs" ]
739 sources = [
740 "objc/api/video_codec/RTCVideoDecoderAV1.h",
741 "objc/api/video_codec/RTCVideoDecoderAV1.mm",
742 "objc/api/video_codec/RTCVideoEncoderAV1.h",
743 "objc/api/video_codec/RTCVideoEncoderAV1.mm",
744 ]
745
746 deps = [
747 ":base_objc",
748 ":wrapped_native_codec_objc",
749 "../media:rtc_media_base",
750 "../modules/video_coding/codecs/av1:libaom_av1_decoder",
philipel95701502022-01-18 18:47:52 +0100751 "../modules/video_coding/codecs/av1:libaom_av1_encoder_if_supported",
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +0300752 ]
753 }
754
zhihuanga4c113a2017-06-28 14:05:44 -0700755 # Build the PeerConnectionFactory without audio/video support.
756 # This target depends on the objc_peeerconnectionfactory_base which still
757 # includes some audio/video related objects such as RTCAudioSource because
758 # these objects are just thin wrappers of native C++ interfaces required
759 # when implementing webrtc::PeerConnectionFactoryInterface and
760 # webrtc::PeerConnectionInterface.
Kári Tristan Helgasona2d89fc2018-03-06 10:18:43 +0100761 # The applications which only use WebRTC DataChannel can depend on this.
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200762 rtc_library("peerconnectionfactory_no_media_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000763 visibility = [ "*" ]
Danil Chapovalov41300af2019-07-10 12:44:43 +0200764 allow_poison = [
765 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
766 "default_task_queue",
767 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700768 defines = [ "HAVE_NO_MEDIA" ]
769
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +0100770 sources = [ "objc/helpers/noop.mm" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700771
kthelgason36d658d2017-08-24 05:43:45 -0700772 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700773
zhihuanga4c113a2017-06-28 14:05:44 -0700774 deps = [
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100775 ":native_api",
776 ":native_video",
kthelgason36d658d2017-08-24 05:43:45 -0700777 ":peerconnectionfactory_base_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700778 "../api:libjingle_peerconnection_api",
Artem Titov94b57c02019-03-21 13:35:10 +0100779 "../rtc_base",
zhihuanga4c113a2017-06-28 14:05:44 -0700780 ]
781 }
782
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200783 rtc_library("mediaconstraints_objc") {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200784 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100785 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200786 "objc/api/peerconnection/RTCMediaConstraints+Private.h",
787 "objc/api/peerconnection/RTCMediaConstraints.h",
788 "objc/api/peerconnection/RTCMediaConstraints.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100789 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100790
791 public_configs = [ ":common_config_objc" ]
792 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200793 ":base_objc",
794 ":helpers_objc",
Niels Möllerdac03d92019-02-13 08:52:27 +0100795 ":media_constraints",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100796 ]
797 }
798
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200799 # TODO(bugs.webrtc.org/9627): Remove, targets should depend on base_objc.
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200800 rtc_library("videorenderer_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200801 visibility = [ "*" ]
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +0100802 sources = [ "objc/helpers/noop.mm" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100803
804 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100805 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200806
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +0100807 deps = [ ":base_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100808 }
809
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200810 rtc_library("videorendereradapter_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200811 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100812 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Anders Carlsson9823ee42018-03-07 10:32:03 +0100813 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200814 "objc/api/RTCVideoRendererAdapter+Private.h",
815 "objc/api/RTCVideoRendererAdapter.h",
816 "objc/api/RTCVideoRendererAdapter.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100817 ]
818
819 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100820 public_configs = [ ":common_config_objc" ]
821
822 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200823 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100824 ":native_api",
825 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100826 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 14:30:41 +0200827 "../api:media_stream_interface",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100828 ]
829 }
830
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200831 rtc_library("mediasource_objc") {
Anders Carlsson9823ee42018-03-07 10:32:03 +0100832 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200833 "objc/api/peerconnection/RTCMediaSource+Private.h",
834 "objc/api/peerconnection/RTCMediaSource.h",
835 "objc/api/peerconnection/RTCMediaSource.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100836 ]
837
Anders Carlsson358f2e02018-06-04 10:24:37 +0200838 configs += [
839 "..:common_objc",
840 ":used_from_extension",
841 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100842 public_configs = [ ":common_config_objc" ]
843
844 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200845 ":base_objc",
Niels Möllere942b142019-09-17 14:30:41 +0200846 "../api:media_stream_interface",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100847 "../rtc_base:checks",
848 ]
849 }
850
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200851 rtc_library("base_native_additions_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200852 sources = [
853 "objc/api/peerconnection/RTCEncodedImage+Private.h",
854 "objc/api/peerconnection/RTCEncodedImage+Private.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200855 "objc/api/peerconnection/RTCVideoCodecInfo+Private.h",
856 "objc/api/peerconnection/RTCVideoCodecInfo+Private.mm",
857 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.h",
858 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.mm",
859 ]
860
861 configs += [ "..:common_objc" ]
862
863 public_configs = [ ":common_config_objc" ]
864
865 deps = [
866 ":base_objc",
867 ":helpers_objc",
Niels Möller4dc66c52018-10-05 14:17:58 +0200868 "../api/video:encoded_image",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200869 "../api/video_codecs:video_codecs_api",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200870 "../modules/video_coding:video_codec_interface",
Artem Titov94b57c02019-03-21 13:35:10 +0100871 "../rtc_base",
Florent Castellif86f6f92022-04-05 02:54:12 +0200872 "../rtc_base:refcount",
Florent Castellie10a9f62022-04-04 17:04:37 +0200873 "../rtc_base:safe_conversions",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200874 ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200875 }
876
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200877 rtc_library("peerconnectionfactory_base_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200878 visibility = [ "*" ]
Danil Chapovalov41300af2019-07-10 12:44:43 +0200879 allow_poison = [
880 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
881 "default_task_queue",
882 ]
Byoungchan Lee524a4222021-11-19 19:03:49 +0900883 configs += [ "..:no_global_constructors" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700884 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200885 "objc/api/peerconnection/RTCAudioSource+Private.h",
886 "objc/api/peerconnection/RTCAudioSource.h",
887 "objc/api/peerconnection/RTCAudioSource.mm",
888 "objc/api/peerconnection/RTCAudioTrack+Private.h",
889 "objc/api/peerconnection/RTCAudioTrack.h",
890 "objc/api/peerconnection/RTCAudioTrack.mm",
891 "objc/api/peerconnection/RTCCertificate.h",
892 "objc/api/peerconnection/RTCCertificate.mm",
893 "objc/api/peerconnection/RTCConfiguration+Native.h",
894 "objc/api/peerconnection/RTCConfiguration+Private.h",
895 "objc/api/peerconnection/RTCConfiguration.h",
896 "objc/api/peerconnection/RTCConfiguration.mm",
Benjamin Wright8c27cca2018-10-25 10:16:44 -0700897 "objc/api/peerconnection/RTCCryptoOptions.h",
898 "objc/api/peerconnection/RTCCryptoOptions.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200899 "objc/api/peerconnection/RTCDataChannel+Private.h",
900 "objc/api/peerconnection/RTCDataChannel.h",
901 "objc/api/peerconnection/RTCDataChannel.mm",
902 "objc/api/peerconnection/RTCDataChannelConfiguration+Private.h",
903 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
904 "objc/api/peerconnection/RTCDataChannelConfiguration.mm",
905 "objc/api/peerconnection/RTCDtmfSender+Private.h",
906 "objc/api/peerconnection/RTCDtmfSender.h",
907 "objc/api/peerconnection/RTCDtmfSender.mm",
908 "objc/api/peerconnection/RTCFieldTrials.h",
909 "objc/api/peerconnection/RTCFieldTrials.mm",
910 "objc/api/peerconnection/RTCIceCandidate+Private.h",
911 "objc/api/peerconnection/RTCIceCandidate.h",
912 "objc/api/peerconnection/RTCIceCandidate.mm",
Jaehyun Kod2110982021-11-30 19:01:43 +0900913 "objc/api/peerconnection/RTCIceCandidateErrorEvent+Private.h",
914 "objc/api/peerconnection/RTCIceCandidateErrorEvent.h",
915 "objc/api/peerconnection/RTCIceCandidateErrorEvent.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200916 "objc/api/peerconnection/RTCIceServer+Private.h",
917 "objc/api/peerconnection/RTCIceServer.h",
918 "objc/api/peerconnection/RTCIceServer.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200919 "objc/api/peerconnection/RTCLegacyStatsReport+Private.h",
920 "objc/api/peerconnection/RTCLegacyStatsReport.h",
921 "objc/api/peerconnection/RTCLegacyStatsReport.mm",
922 "objc/api/peerconnection/RTCMediaStream+Private.h",
923 "objc/api/peerconnection/RTCMediaStream.h",
924 "objc/api/peerconnection/RTCMediaStream.mm",
925 "objc/api/peerconnection/RTCMediaStreamTrack+Private.h",
926 "objc/api/peerconnection/RTCMediaStreamTrack.h",
927 "objc/api/peerconnection/RTCMediaStreamTrack.mm",
928 "objc/api/peerconnection/RTCMetrics.h",
929 "objc/api/peerconnection/RTCMetrics.mm",
930 "objc/api/peerconnection/RTCMetricsSampleInfo+Private.h",
931 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
932 "objc/api/peerconnection/RTCMetricsSampleInfo.mm",
933 "objc/api/peerconnection/RTCPeerConnection+DataChannel.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200934 "objc/api/peerconnection/RTCPeerConnection+Private.h",
935 "objc/api/peerconnection/RTCPeerConnection+Stats.mm",
936 "objc/api/peerconnection/RTCPeerConnection.h",
937 "objc/api/peerconnection/RTCPeerConnection.mm",
938 "objc/api/peerconnection/RTCPeerConnectionFactory+Native.h",
939 "objc/api/peerconnection/RTCPeerConnectionFactory+Private.h",
940 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
941 "objc/api/peerconnection/RTCPeerConnectionFactory.mm",
942 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.h",
943 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.mm",
944 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.h",
945 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.mm",
946 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions+Private.h",
947 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
948 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.mm",
949 "objc/api/peerconnection/RTCRtcpParameters+Private.h",
950 "objc/api/peerconnection/RTCRtcpParameters.h",
951 "objc/api/peerconnection/RTCRtcpParameters.mm",
952 "objc/api/peerconnection/RTCRtpCodecParameters+Private.h",
953 "objc/api/peerconnection/RTCRtpCodecParameters.h",
954 "objc/api/peerconnection/RTCRtpCodecParameters.mm",
955 "objc/api/peerconnection/RTCRtpEncodingParameters+Private.h",
956 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
957 "objc/api/peerconnection/RTCRtpEncodingParameters.mm",
958 "objc/api/peerconnection/RTCRtpHeaderExtension+Private.h",
959 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
960 "objc/api/peerconnection/RTCRtpHeaderExtension.mm",
961 "objc/api/peerconnection/RTCRtpParameters+Private.h",
962 "objc/api/peerconnection/RTCRtpParameters.h",
963 "objc/api/peerconnection/RTCRtpParameters.mm",
Benjamin Wrightddf1a3e2018-10-02 10:20:58 -0700964 "objc/api/peerconnection/RTCRtpReceiver+Native.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200965 "objc/api/peerconnection/RTCRtpReceiver+Private.h",
966 "objc/api/peerconnection/RTCRtpReceiver.h",
967 "objc/api/peerconnection/RTCRtpReceiver.mm",
Benjamin Wrightddf1a3e2018-10-02 10:20:58 -0700968 "objc/api/peerconnection/RTCRtpSender+Native.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200969 "objc/api/peerconnection/RTCRtpSender+Private.h",
970 "objc/api/peerconnection/RTCRtpSender.h",
971 "objc/api/peerconnection/RTCRtpSender.mm",
972 "objc/api/peerconnection/RTCRtpTransceiver+Private.h",
973 "objc/api/peerconnection/RTCRtpTransceiver.h",
974 "objc/api/peerconnection/RTCRtpTransceiver.mm",
975 "objc/api/peerconnection/RTCSSLAdapter.h",
976 "objc/api/peerconnection/RTCSSLAdapter.mm",
977 "objc/api/peerconnection/RTCSessionDescription+Private.h",
978 "objc/api/peerconnection/RTCSessionDescription.h",
979 "objc/api/peerconnection/RTCSessionDescription.mm",
Peter Hanspersbed86042019-02-21 17:27:09 +0100980 "objc/api/peerconnection/RTCStatisticsReport+Private.h",
981 "objc/api/peerconnection/RTCStatisticsReport.h",
982 "objc/api/peerconnection/RTCStatisticsReport.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200983 "objc/api/peerconnection/RTCTracing.h",
984 "objc/api/peerconnection/RTCTracing.mm",
985 "objc/api/peerconnection/RTCVideoTrack+Private.h",
986 "objc/api/peerconnection/RTCVideoTrack.h",
987 "objc/api/peerconnection/RTCVideoTrack.mm",
kthelgason5fe4d492016-12-05 11:27:30 -0800988 ]
kthelgasonebc34e72016-09-15 04:30:18 -0700989
Anders Carlsson358f2e02018-06-04 10:24:37 +0200990 configs += [
991 "..:common_objc",
992 ":used_from_extension",
993 ]
kthelgason36d658d2017-08-24 05:43:45 -0700994 public_configs = [ ":common_config_objc" ]
kthelgasonc0977102017-04-24 00:57:16 -0700995
mbonadei2c8ac1b2017-05-31 05:14:26 -0700996 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200997 ":base_native_additions_objc",
998 ":base_objc",
999 ":file_logger_objc",
1000 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001001 ":mediaconstraints_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001002 ":mediasource_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001003 ":native_api",
1004 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001005 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001006 ":videorendereradapter_objc",
1007 ":videosource_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001008 ":videotoolbox_objc",
Mirko Bonadeie51f7852017-12-06 11:23:19 +01001009 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 14:30:41 +02001010 "../api:media_stream_interface",
Niels Möller695cf6a2019-05-13 12:27:23 +02001011 "../api:rtc_event_log_output_file",
Peter Hanspersbed86042019-02-21 17:27:09 +01001012 "../api:rtc_stats_api",
Niels Möller6dcd4dc2019-08-26 10:45:28 +02001013 "../api:rtp_parameters",
Mirko Bonadeid9708072019-01-25 20:26:48 +01001014 "../api:scoped_refptr",
Jiawei Ouae810c12018-06-20 16:18:59 -07001015 "../api/audio_codecs:audio_codecs_api",
Karl Wiberg5817d3d2018-04-06 10:06:42 +02001016 "../api/audio_codecs:builtin_audio_decoder_factory",
Jiawei Ouae810c12018-06-20 16:18:59 -07001017 "../api/audio_codecs:builtin_audio_encoder_factory",
Mirko Bonadeieaaaf412019-09-13 14:42:15 +02001018 "../api/crypto:frame_decryptor_interface",
1019 "../api/crypto:frame_encryptor_interface",
Danil Chapovalov4ba04b72019-06-26 15:49:47 +02001020 "../api/rtc_event_log:rtc_event_log_factory",
Danil Chapovalovaaa11432019-05-17 13:20:14 +02001021 "../api/task_queue:default_task_queue_factory",
Erik Språngceb44952020-09-22 11:36:35 +02001022 "../api/transport:field_trial_based_config",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001023 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +02001024 "../api/video:video_rtp_headers",
Anders Carlsson7e042812017-10-05 16:55:38 +02001025 "../api/video_codecs:video_codecs_api",
Anders Carlssone5960ce2017-06-22 15:26:30 +02001026 "../common_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001027 "../media:rtc_media_base",
Jiawei Ouae810c12018-06-20 16:18:59 -07001028 "../modules/audio_device:audio_device_api",
Artem Titov94b57c02019-03-21 13:35:10 +01001029 "../modules/audio_processing",
Alessio Bazzicab768e882018-11-07 14:29:54 +00001030 "../modules/audio_processing:api",
Patrik Höglund99175c62018-01-08 11:05:10 +01001031 "../modules/video_coding:video_codec_interface",
Harald Alvestrandc1e8aeb2022-03-31 19:53:50 +00001032 "../pc:peer_connection_factory",
1033 "../pc:webrtc_sdp",
Artem Titov94b57c02019-03-21 13:35:10 +01001034 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001035 "../rtc_base:checks",
Florent Castellia30aef32022-04-19 17:47:13 +02001036 "../rtc_base:event_tracer",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001037 "../rtc_base:logging",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001038 "../rtc_base:network_constants",
Florent Castellie10a9f62022-04-04 17:04:37 +02001039 "../rtc_base:safe_conversions",
Florent Castellidd837e22022-04-04 17:16:15 +02001040 "../rtc_base:timeutils",
Harald Alvestrandc1e8aeb2022-03-31 19:53:50 +00001041 "../stats:rtc_stats",
Mirko Bonadei17f48782018-09-28 08:51:10 +02001042 "../system_wrappers:field_trial",
1043 "../system_wrappers:metrics",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001044 ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001045
1046 if (is_ios) {
1047 deps += [ ":native_api_audio_device_module" ]
1048 }
kthelgasonebc34e72016-09-15 04:30:18 -07001049 }
Zeke Chindd0e1e02016-10-11 13:27:26 -07001050
mbonadei2c8ac1b2017-05-31 05:14:26 -07001051 if (rtc_include_tests) {
Daniela012b56b2017-11-15 13:15:24 +01001052 if (is_ios) {
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001053 rtc_library("sdk_unittests_sources") {
Danielaae012cf2017-10-12 13:46:00 +02001054 testonly = true
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001055 include_dirs = [ "objc/" ]
Daniela012b56b2017-11-15 13:15:24 +01001056
Danielaae012cf2017-10-12 13:46:00 +02001057 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001058 "objc/unittests/ObjCVideoTrackSource_xctest.mm",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001059 "objc/unittests/RTCAudioSessionTest.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001060 "objc/unittests/RTCCVPixelBuffer_xctest.mm",
1061 "objc/unittests/RTCCallbackLogger_xctest.m",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001062 "objc/unittests/RTCCameraVideoCapturerTests.mm",
1063 "objc/unittests/RTCCertificateTest.mm",
1064 "objc/unittests/RTCConfigurationTest.mm",
1065 "objc/unittests/RTCDataChannelConfigurationTest.mm",
Kári Tristan Helgasonecbdbf62020-02-20 07:34:45 -08001066 "objc/unittests/RTCEncodedImage_xctest.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001067 "objc/unittests/RTCFileVideoCapturer_xctest.mm",
1068 "objc/unittests/RTCH264ProfileLevelId_xctest.m",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001069 "objc/unittests/RTCIceCandidateTest.mm",
1070 "objc/unittests/RTCIceServerTest.mm",
Jake Brombergfb7fd242021-06-14 13:44:25 -07001071 "objc/unittests/RTCMTLVideoView_xctest.m",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001072 "objc/unittests/RTCMediaConstraintsTest.mm",
Aaron Goldenfb4e9bc2019-01-04 12:03:31 -08001073 "objc/unittests/RTCNV12TextureCache_xctest.m",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001074 "objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001075 "objc/unittests/RTCPeerConnectionFactory_xctest.m",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001076 "objc/unittests/RTCPeerConnectionTest.mm",
1077 "objc/unittests/RTCSessionDescriptionTest.mm",
1078 "objc/unittests/RTCTracingTest.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001079 "objc/unittests/frame_buffer_helpers.h",
1080 "objc/unittests/frame_buffer_helpers.mm",
Artem Titarenko42b43152018-10-29 18:18:09 +01001081 "objc/unittests/nalu_rewriter_xctest.mm",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001082 "objc/unittests/objc_video_decoder_factory_tests.mm",
1083 "objc/unittests/objc_video_encoder_factory_tests.mm",
1084 "objc/unittests/scoped_cftyperef_tests.mm",
Danielaae012cf2017-10-12 13:46:00 +02001085 ]
Daniela012b56b2017-11-15 13:15:24 +01001086
Mirko Bonadei6b09c452021-07-05 16:47:49 +02001087 # TODO(bugs.webrtc.org/12937): Remove OpenGL deprecation warning
1088 # workaround.
1089 defines = [ "GLES_SILENCE_DEPRECATION" ]
1090
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001091 # TODO(peterhanspers): Reenable these tests on simulator.
1092 # See bugs.webrtc.org/7812
Lahiru Ginnaliya Gamathige1d0e7b62020-10-20 02:43:02 -07001093 if (target_environment != "simulator") {
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001094 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001095 "objc/unittests/RTCAudioDeviceModule_xctest.mm",
1096 "objc/unittests/RTCAudioDevice_xctest.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001097 ]
1098 }
1099
Danielaae012cf2017-10-12 13:46:00 +02001100 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001101 ":audio_device",
Joe Chen0b3a6e32019-12-26 23:01:42 -08001102 ":audio_session_objc",
Kári Tristan Helgasonecbdbf62020-02-20 07:34:45 -08001103 ":base_native_additions_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001104 ":base_objc",
1105 ":callback_logger_objc",
Anders Carlssondc6b4772018-01-15 13:31:03 +01001106 ":framework_objc",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001107 ":helpers_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001108 ":mediaconstraints_objc",
Jake Brombergfb7fd242021-06-14 13:44:25 -07001109 ":metal_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001110 ":native_api",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001111 ":native_api_audio_device_module",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001112 ":native_video",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001113 ":peerconnectionfactory_base_objc",
Artem Titarenko42b43152018-10-29 18:18:09 +01001114 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001115 ":videocapture_objc",
Anders Carlsson79ce8202018-06-01 12:51:09 +02001116 ":videocodec_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001117 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001118 ":videosource_objc",
Danielaae012cf2017-10-12 13:46:00 +02001119 ":videotoolbox_objc",
Mirko Bonadeid9708072019-01-25 20:26:48 +01001120 "../api:scoped_refptr",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001121 "../api/audio_codecs:builtin_audio_decoder_factory",
1122 "../api/audio_codecs:builtin_audio_encoder_factory",
Byoungchan Lee43bd7602019-10-08 23:58:41 +09001123 "../api/task_queue:default_task_queue_factory",
Ilya Nikolaevskiy38e9b062020-10-08 14:36:33 +00001124 "../api/video:video_frame",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001125 "../api/video_codecs:video_codecs_api",
Artem Titov94b57c02019-03-21 13:35:10 +01001126 "../common_video",
Danielaae012cf2017-10-12 13:46:00 +02001127 "../media:rtc_media_base",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001128 "../media:rtc_media_tests_utils",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001129 "../modules/audio_device:audio_device_api",
1130 "../modules/audio_processing:api",
1131 "../modules/video_coding:video_codec_interface",
Artem Titov94b57c02019-03-21 13:35:10 +01001132 "../rtc_base",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001133 "../rtc_base:gunit_helpers",
Florent Castelli4467ad72022-04-04 15:18:46 +02001134 "../rtc_base:macromagic",
Florent Castellif86f6f92022-04-05 02:54:12 +02001135 "../rtc_base:refcount",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001136 "../rtc_base:rtc_event",
Byoungchan Lee83ceb902021-11-16 11:31:57 +09001137 "../rtc_base/system:unused",
Artem Titov94b57c02019-03-21 13:35:10 +01001138 "../system_wrappers",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001139 "../test:test_support", # TODO(webrtc:8382): Remove use of gtest
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001140 "//third_party/libyuv",
Danielaae012cf2017-10-12 13:46:00 +02001141 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001142
Jordan Rose53d3fc92021-07-06 12:16:41 -07001143 if (rtc_ios_macos_use_opengl_rendering) {
1144 deps += [ ":opengl_objc" ]
1145 }
1146
Danielaae012cf2017-10-12 13:46:00 +02001147 public_deps = [
1148 "//build/config/ios:xctest",
1149 "//third_party/ocmock",
1150 ]
1151 }
1152
Daniela012b56b2017-11-15 13:15:24 +01001153 bundle_data("sdk_unittests_bundle_data") {
Daniela012b56b2017-11-15 13:15:24 +01001154 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001155 "objc/unittests/audio_short16.pcm",
1156 "objc/unittests/audio_short44.pcm",
1157 "objc/unittests/audio_short48.pcm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001158
1159 # Sample video taken from https://media.xiph.org/video/derf/
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001160 "objc/unittests/foreman.mp4",
Daniela012b56b2017-11-15 13:15:24 +01001161 ]
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +01001162 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
Daniela012b56b2017-11-15 13:15:24 +01001163 }
1164
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001165 # These tests use static linking.
Mirko Bonadeiaef8a212020-09-16 15:09:53 +02001166 rtc_test("sdk_unittests") {
1167 is_xctest = true
Danielaae012cf2017-10-12 13:46:00 +02001168 info_plist = "//test/ios/Info.plist"
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +01001169 sources = [ "objc/unittests/main.mm" ]
Daniela012b56b2017-11-15 13:15:24 +01001170
Artem Titarenkoa2bc3622019-08-19 14:24:00 +02001171 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=generic-unit-test" ]
Danielaae012cf2017-10-12 13:46:00 +02001172 deps = [
Yura Yaroshevich5297bd22018-06-19 12:51:51 +03001173 ":peerconnectionfactory_base_objc",
Daniela012b56b2017-11-15 13:15:24 +01001174 ":sdk_unittests_bundle_data",
Danielaae012cf2017-10-12 13:46:00 +02001175 ":sdk_unittests_sources",
Niels Möller5a8f8602019-06-12 11:30:59 +02001176 "../rtc_base",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001177 "../rtc_base:threading",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001178 "//test:test_support",
Danielaae012cf2017-10-12 13:46:00 +02001179 ]
1180 ldflags = [ "-all_load" ]
1181 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001182
1183 # These tests link to the framework.
Mirko Bonadeiaef8a212020-09-16 15:09:53 +02001184 rtc_test("sdk_framework_unittests") {
1185 is_xctest = true
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001186 info_plist = "//test/ios/Info.plist"
1187 sources = [
1188 "objc/unittests/RTCDoNotPutCPlusPlusInFrameworkHeaders_xctest.m",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001189 "objc/unittests/main.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001190 ]
1191
Artem Titarenkoa2bc3622019-08-19 14:24:00 +02001192 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=generic-unit-test" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001193 deps = [
1194 ":framework_objc+link",
1195 ":ios_framework_bundle",
Niels Möller5a8f8602019-06-12 11:30:59 +02001196 "../rtc_base",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001197 "../rtc_base:threading",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001198 "//test:test_support",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001199 ]
1200 }
Danielaae012cf2017-10-12 13:46:00 +02001201 }
kthelgason2f088792017-05-30 01:48:47 -07001202 }
1203
mbonadei2c8ac1b2017-05-31 05:14:26 -07001204 if (is_ios) {
Byoungchan Lee26b23b82022-04-08 18:23:14 +09001205 apple_framework_bundle_with_umbrella_header("framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001206 info_plist = "objc/Info.plist"
mbonadei2c8ac1b2017-05-31 05:14:26 -07001207 output_name = "WebRTC"
Magnus Jedvertf83dc8b2017-08-29 09:49:43 +00001208
mbonadei2c8ac1b2017-05-31 05:14:26 -07001209 common_objc_headers = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001210 "objc/base/RTCCodecSpecificInfo.h",
1211 "objc/base/RTCEncodedImage.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001212 "objc/base/RTCI420Buffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001213 "objc/base/RTCLogging.h",
1214 "objc/base/RTCMacros.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001215 "objc/base/RTCMutableI420Buffer.h",
1216 "objc/base/RTCMutableYUVPlanarBuffer.h",
Yury Yaroshevich19a6e942022-03-11 09:22:08 +01001217 "objc/base/RTCSSLCertificateVerifier.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001218 "objc/base/RTCVideoCapturer.h",
1219 "objc/base/RTCVideoCodecInfo.h",
1220 "objc/base/RTCVideoDecoder.h",
1221 "objc/base/RTCVideoDecoderFactory.h",
1222 "objc/base/RTCVideoEncoder.h",
1223 "objc/base/RTCVideoEncoderFactory.h",
1224 "objc/base/RTCVideoEncoderQpThresholds.h",
1225 "objc/base/RTCVideoEncoderSettings.h",
1226 "objc/base/RTCVideoFrame.h",
1227 "objc/base/RTCVideoFrameBuffer.h",
1228 "objc/base/RTCVideoRenderer.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001229 "objc/base/RTCYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001230 "objc/components/audio/RTCAudioSession.h",
1231 "objc/components/audio/RTCAudioSessionConfiguration.h",
1232 "objc/components/capturer/RTCCameraVideoCapturer.h",
1233 "objc/components/capturer/RTCFileVideoCapturer.h",
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001234 "objc/components/network/RTCNetworkMonitor.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001235 "objc/components/renderer/metal/RTCMTLVideoView.h",
1236 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
1237 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1238 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1239 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1240 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1241 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1242 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1243 "objc/components/video_codec/RTCVideoDecoderH264.h",
1244 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1245 "objc/components/video_codec/RTCVideoEncoderH264.h",
1246 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1247 "objc/helpers/RTCCameraPreviewView.h",
1248 "objc/helpers/RTCDispatcher.h",
1249 "objc/helpers/UIDevice+RTCDevice.h",
1250 "objc/api/peerconnection/RTCAudioSource.h",
1251 "objc/api/peerconnection/RTCAudioTrack.h",
1252 "objc/api/peerconnection/RTCConfiguration.h",
1253 "objc/api/peerconnection/RTCDataChannel.h",
1254 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1255 "objc/api/peerconnection/RTCFieldTrials.h",
1256 "objc/api/peerconnection/RTCIceCandidate.h",
Jaehyun Kod2110982021-11-30 19:01:43 +09001257 "objc/api/peerconnection/RTCIceCandidateErrorEvent.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001258 "objc/api/peerconnection/RTCIceServer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001259 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1260 "objc/api/peerconnection/RTCMediaConstraints.h",
1261 "objc/api/peerconnection/RTCMediaSource.h",
1262 "objc/api/peerconnection/RTCMediaStream.h",
1263 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1264 "objc/api/peerconnection/RTCMetrics.h",
1265 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1266 "objc/api/peerconnection/RTCPeerConnection.h",
1267 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1268 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1269 "objc/api/peerconnection/RTCRtcpParameters.h",
1270 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1271 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1272 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1273 "objc/api/peerconnection/RTCRtpParameters.h",
1274 "objc/api/peerconnection/RTCRtpReceiver.h",
1275 "objc/api/peerconnection/RTCRtpSender.h",
1276 "objc/api/peerconnection/RTCRtpTransceiver.h",
1277 "objc/api/peerconnection/RTCDtmfSender.h",
1278 "objc/api/peerconnection/RTCSSLAdapter.h",
1279 "objc/api/peerconnection/RTCSessionDescription.h",
CZ Theng682dabd2019-10-21 11:25:18 +08001280 "objc/api/peerconnection/RTCStatisticsReport.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001281 "objc/api/peerconnection/RTCTracing.h",
1282 "objc/api/peerconnection/RTCCertificate.h",
Benjamin Wright8c27cca2018-10-25 10:16:44 -07001283 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001284 "objc/api/peerconnection/RTCVideoSource.h",
1285 "objc/api/peerconnection/RTCVideoTrack.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001286 "objc/api/video_codec/RTCVideoCodecConstants.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001287 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1288 "objc/api/video_codec/RTCVideoDecoderVP9.h",
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +03001289 "objc/api/video_codec/RTCVideoDecoderAV1.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001290 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1291 "objc/api/video_codec/RTCVideoEncoderVP9.h",
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +03001292 "objc/api/video_codec/RTCVideoEncoderAV1.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001293 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1294 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001295 ]
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001296
mbonadei2c8ac1b2017-05-31 05:14:26 -07001297 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001298 common_objc_headers += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001299 "objc/api/logging/RTCCallbackLogger.h",
1300 "objc/api/peerconnection/RTCFileLogger.h",
Anders Carlsson3b3364e2018-01-30 15:46:13 +01001301 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001302 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001303
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001304 sources = common_objc_headers
1305 public_headers = common_objc_headers
1306
mbonadei2c8ac1b2017-05-31 05:14:26 -07001307 ldflags = [
1308 "-all_load",
1309 "-install_name",
1310 "@rpath/$output_name.framework/$output_name",
1311 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001312
mbonadei2c8ac1b2017-05-31 05:14:26 -07001313 deps = [
kthelgason36d658d2017-08-24 05:43:45 -07001314 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001315 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001316 ":default_codec_factory_objc",
Mirko Bonadei91d39752022-01-19 08:43:17 +01001317 ":metal_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001318 ":native_api",
1319 ":native_video",
1320 ":peerconnectionfactory_base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001321 ":videocapture_objc",
1322 ":videocodec_objc",
1323 ":videotoolbox_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001324 ]
Jordan Rose53d3fc92021-07-06 12:16:41 -07001325 if (rtc_ios_macos_use_opengl_rendering) {
1326 deps += [ ":opengl_ui_objc" ]
1327 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001328 if (!build_with_chromium) {
1329 deps += [
1330 ":callback_logger_objc",
1331 ":file_logger_objc",
1332 ]
1333 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001334
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +02001335 frameworks = [
mbonadei2c8ac1b2017-05-31 05:14:26 -07001336 "AVFoundation.framework",
1337 "CoreGraphics.framework",
1338 "CoreMedia.framework",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001339 ]
1340
Byoungchan Lee26b23b82022-04-08 18:23:14 +09001341 configs = [
Anders Carlsson358f2e02018-06-04 10:24:37 +02001342 "..:common_objc",
1343 ":used_from_extension",
1344 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001345
kthelgason36d658d2017-08-24 05:43:45 -07001346 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001347 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001348
1349 bundle_data("ios_framework_bundle") {
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +01001350 deps = [ "../sdk:framework_objc" ]
1351 sources = [ "$root_build_dir/WebRTC.framework" ]
1352 outputs = [ "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001353 }
1354 }
1355
1356 if (is_mac) {
Byoungchan Lee26b23b82022-04-08 18:23:14 +09001357 apple_framework_bundle_with_umbrella_header("mac_framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001358 info_plist = "objc/Info.plist"
1359 output_name = "WebRTC"
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001360
Anders Carlsson37bbf792018-09-05 16:29:27 +02001361 sources = [
1362 "objc/api/peerconnection/RTCAudioSource.h",
1363 "objc/api/peerconnection/RTCAudioTrack.h",
1364 "objc/api/peerconnection/RTCCertificate.h",
1365 "objc/api/peerconnection/RTCConfiguration.h",
Benjamin Wright8c27cca2018-10-25 10:16:44 -07001366 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001367 "objc/api/peerconnection/RTCDataChannel.h",
1368 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1369 "objc/api/peerconnection/RTCDtmfSender.h",
1370 "objc/api/peerconnection/RTCFieldTrials.h",
1371 "objc/api/peerconnection/RTCIceCandidate.h",
Jaehyun Kod2110982021-11-30 19:01:43 +09001372 "objc/api/peerconnection/RTCIceCandidateErrorEvent.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001373 "objc/api/peerconnection/RTCIceServer.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001374 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1375 "objc/api/peerconnection/RTCMediaConstraints.h",
1376 "objc/api/peerconnection/RTCMediaSource.h",
1377 "objc/api/peerconnection/RTCMediaStream.h",
1378 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1379 "objc/api/peerconnection/RTCMetrics.h",
1380 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1381 "objc/api/peerconnection/RTCPeerConnection.h",
1382 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1383 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1384 "objc/api/peerconnection/RTCRtcpParameters.h",
1385 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1386 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1387 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1388 "objc/api/peerconnection/RTCRtpParameters.h",
1389 "objc/api/peerconnection/RTCRtpReceiver.h",
1390 "objc/api/peerconnection/RTCRtpSender.h",
1391 "objc/api/peerconnection/RTCRtpTransceiver.h",
1392 "objc/api/peerconnection/RTCSSLAdapter.h",
1393 "objc/api/peerconnection/RTCSessionDescription.h",
Saúl Ibarra Corretgéf7aa2672021-07-28 23:09:14 +02001394 "objc/api/peerconnection/RTCStatisticsReport.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001395 "objc/api/peerconnection/RTCTracing.h",
1396 "objc/api/peerconnection/RTCVideoSource.h",
1397 "objc/api/peerconnection/RTCVideoTrack.h",
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +03001398 "objc/api/video_codec/RTCVideoDecoderAV1.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001399 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1400 "objc/api/video_codec/RTCVideoDecoderVP9.h",
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +03001401 "objc/api/video_codec/RTCVideoEncoderAV1.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001402 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1403 "objc/api/video_codec/RTCVideoEncoderVP9.h",
1404 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1405 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
1406 "objc/base/RTCCodecSpecificInfo.h",
1407 "objc/base/RTCEncodedImage.h",
1408 "objc/base/RTCI420Buffer.h",
1409 "objc/base/RTCLogging.h",
1410 "objc/base/RTCMacros.h",
1411 "objc/base/RTCMutableI420Buffer.h",
1412 "objc/base/RTCMutableYUVPlanarBuffer.h",
Yury Yaroshevich19a6e942022-03-11 09:22:08 +01001413 "objc/base/RTCSSLCertificateVerifier.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001414 "objc/base/RTCVideoCapturer.h",
1415 "objc/base/RTCVideoCodecInfo.h",
1416 "objc/base/RTCVideoDecoder.h",
1417 "objc/base/RTCVideoDecoderFactory.h",
1418 "objc/base/RTCVideoEncoder.h",
1419 "objc/base/RTCVideoEncoderFactory.h",
1420 "objc/base/RTCVideoEncoderQpThresholds.h",
1421 "objc/base/RTCVideoEncoderSettings.h",
1422 "objc/base/RTCVideoFrame.h",
1423 "objc/base/RTCVideoFrameBuffer.h",
1424 "objc/base/RTCVideoRenderer.h",
1425 "objc/base/RTCYUVPlanarBuffer.h",
1426 "objc/components/capturer/RTCCameraVideoCapturer.h",
1427 "objc/components/capturer/RTCFileVideoCapturer.h",
1428 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
1429 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
1430 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1431 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1432 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1433 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1434 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1435 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1436 "objc/components/video_codec/RTCVideoDecoderH264.h",
1437 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1438 "objc/components/video_codec/RTCVideoEncoderH264.h",
1439 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1440 "objc/helpers/RTCDispatcher.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001441 ]
Anders Carlsson37bbf792018-09-05 16:29:27 +02001442 if (!build_with_chromium) {
1443 sources += [
1444 "objc/api/logging/RTCCallbackLogger.h",
1445 "objc/api/peerconnection/RTCFileLogger.h",
1446 ]
1447 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001448
1449 deps = [
1450 ":base_objc",
1451 ":default_codec_factory_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001452 ":native_api",
1453 ":native_video",
Jordan Rose53d3fc92021-07-06 12:16:41 -07001454 ":opengl_ui_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001455 ":peerconnectionfactory_base_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001456 ":videocapture_objc",
1457 ":videocodec_objc",
1458 ":videotoolbox_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001459 ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001460 if (!build_with_chromium) {
1461 deps += [
1462 ":callback_logger_objc",
1463 ":file_logger_objc",
1464 ]
1465 }
1466
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +02001467 frameworks = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001468 "AVFoundation.framework",
1469 "CoreGraphics.framework",
1470 "CoreMedia.framework",
1471 "OpenGL.framework",
1472 ]
1473
Anders Carlsson37bbf792018-09-05 16:29:27 +02001474 configs = [ "..:common_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001475
1476 public_configs = [ ":common_config_objc" ]
1477 }
1478
1479 bundle_data("mac_framework_bundle") {
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +01001480 deps = [ "../sdk:mac_framework_objc" ]
1481 sources = [ "$root_build_dir/WebRTC.framework" ]
1482 outputs = [ "{{bundle_contents_dir}}/Frameworks/{{source_file_part}}" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001483 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001484 }
1485
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001486 rtc_library("wrapped_native_codec_objc") {
Anders Carlsson9823ee42018-03-07 10:32:03 +01001487 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001488 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.h",
1489 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm",
1490 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.h",
1491 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001492 ]
1493
1494 configs += [ "..:common_objc" ]
1495 public_configs = [ ":common_config_objc" ]
1496
Anders Carlsson9823ee42018-03-07 10:32:03 +01001497 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001498 ":base_objc",
1499 ":helpers_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001500 "../api/video_codecs:video_codecs_api",
1501 "../media:rtc_media_base",
1502 ]
1503 }
1504
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001505 # The native API is currently experimental and may change without notice.
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001506 rtc_library("native_api") {
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001507 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +01001508 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001509 sources = [
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001510 "objc/native/api/network_monitor_factory.h",
1511 "objc/native/api/network_monitor_factory.mm",
Yury Yaroshevich19a6e942022-03-11 09:22:08 +01001512 "objc/native/api/ssl_certificate_verifier.h",
1513 "objc/native/api/ssl_certificate_verifier.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001514 "objc/native/api/video_capturer.h",
1515 "objc/native/api/video_capturer.mm",
1516 "objc/native/api/video_decoder_factory.h",
1517 "objc/native/api/video_decoder_factory.mm",
1518 "objc/native/api/video_encoder_factory.h",
1519 "objc/native/api/video_encoder_factory.mm",
1520 "objc/native/api/video_frame.h",
1521 "objc/native/api/video_frame.mm",
1522 "objc/native/api/video_frame_buffer.h",
1523 "objc/native/api/video_frame_buffer.mm",
1524 "objc/native/api/video_renderer.h",
1525 "objc/native/api/video_renderer.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001526 ]
1527
1528 configs += [ "..:common_objc" ]
1529
1530 public_configs = [ ":common_config_objc" ]
1531
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001532 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001533 ":base_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001534 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001535 ":videoframebuffer_objc",
Anders Carlsson73119182018-03-15 09:41:03 +01001536 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 14:30:41 +02001537 "../api:media_stream_interface",
Mirko Bonadeid9708072019-01-25 20:26:48 +01001538 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001539 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +02001540 "../api/video:video_rtp_headers",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001541 "../api/video_codecs:video_codecs_api",
1542 "../common_video",
Artem Titov94b57c02019-03-21 13:35:10 +01001543 "../rtc_base",
Florent Castelli3a9e6872022-04-26 22:54:59 +02001544 "../rtc_base:buffer",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001545 "../rtc_base:logging",
Florent Castellif86f6f92022-04-05 02:54:12 +02001546 "../rtc_base:refcount",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001547 "../rtc_base:threading",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001548 ]
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001549 if (is_ios) {
1550 deps += [ ":native_network_monitor" ]
1551 }
Mirko Bonadei2dcf3482020-06-05 14:30:41 +02001552 absl_deps = [ "//third_party/abseil-cpp/absl/memory" ]
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001553 }
1554
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001555 if (is_ios) {
1556 rtc_library("native_network_monitor") {
1557 visibility = [ "*" ]
1558
1559 sources = [
1560 "objc/native/src/objc_network_monitor.h",
1561 "objc/native/src/objc_network_monitor.mm",
1562 ]
1563
1564 deps = [
1565 ":network_monitor_objc",
1566 ":network_monitor_observer",
Jonas Orelande62c2f22022-03-29 11:04:48 +02001567 "../api:field_trials_view",
Artem Titovd15a5752021-02-10 14:31:24 +01001568 "../api:sequence_checker",
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001569 "../rtc_base",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001570 "../rtc_base:logging",
Florent Castelli4467ad72022-04-04 15:18:46 +02001571 "../rtc_base:macromagic",
Florent Castelli57aa81b2022-04-04 17:14:02 +02001572 "../rtc_base:stringutils",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001573 "../rtc_base:threading",
Niels Möllerbe140b42021-03-11 10:24:06 +01001574 "../rtc_base/task_utils:pending_task_safety_flag",
1575 "../rtc_base/task_utils:to_queued_task",
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001576 ]
Ali Tofigh7fa90572022-03-17 15:47:49 +01001577
1578 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001579 }
1580 }
1581
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001582 rtc_library("native_video") {
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001583 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001584 "objc/native/src/objc_frame_buffer.h",
1585 "objc/native/src/objc_frame_buffer.mm",
1586 "objc/native/src/objc_video_decoder_factory.h",
1587 "objc/native/src/objc_video_decoder_factory.mm",
1588 "objc/native/src/objc_video_encoder_factory.h",
1589 "objc/native/src/objc_video_encoder_factory.mm",
1590 "objc/native/src/objc_video_frame.h",
1591 "objc/native/src/objc_video_frame.mm",
1592 "objc/native/src/objc_video_renderer.h",
1593 "objc/native/src/objc_video_renderer.mm",
1594 "objc/native/src/objc_video_track_source.h",
1595 "objc/native/src/objc_video_track_source.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001596 ]
1597
1598 configs += [ "..:common_objc" ]
1599
1600 public_configs = [ ":common_config_objc" ]
1601
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001602 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001603 ":base_native_additions_objc",
1604 ":base_objc",
1605 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001606 ":videocodec_objc",
1607 ":videoframebuffer_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001608 ":vpx_codec_constants",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001609 ":wrapped_native_codec_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001610 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +02001611 "../api/video:video_rtp_headers",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001612 "../api/video_codecs:video_codecs_api",
1613 "../common_video",
1614 "../media:rtc_audio_video",
1615 "../media:rtc_media_base",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001616 "../modules/video_coding:video_codec_interface",
Artem Titov94b57c02019-03-21 13:35:10 +01001617 "../rtc_base",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001618 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001619 "../rtc_base:logging",
Florent Castellib1dc4e42022-04-14 13:20:12 +02001620 "../rtc_base:timestamp_aligner",
Florent Castellidd837e22022-04-04 17:16:15 +02001621 "../rtc_base:timeutils",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001622 ]
1623 }
1624
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001625 rtc_library("video_toolbox_cc") {
Artem Titarenko42b43152018-10-29 18:18:09 +01001626 visibility = [
Mirko Bonadei08574ae2020-09-16 07:22:57 +00001627 ":sdk_unittests_sources",
Mirko Bonadeiaef8a212020-09-16 15:09:53 +02001628 ":videotoolbox_objc",
Artem Titarenko42b43152018-10-29 18:18:09 +01001629 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001630 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001631 "objc/components/video_codec/helpers.cc",
1632 "objc/components/video_codec/helpers.h",
1633 "objc/components/video_codec/nalu_rewriter.cc",
1634 "objc/components/video_codec/nalu_rewriter.h",
mbonadeic0af5ac2017-08-24 12:26:05 -07001635 ]
1636 deps = [
1637 "../common_video",
mbonadeic0af5ac2017-08-24 12:26:05 -07001638 "../modules/video_coding:webrtc_h264",
Florent Castelli3a9e6872022-04-26 22:54:59 +02001639 "../rtc_base:buffer",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001640 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001641 "../rtc_base:logging",
mbonadeic0af5ac2017-08-24 12:26:05 -07001642 ]
mbonadeic0af5ac2017-08-24 12:26:05 -07001643 }
1644
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001645 rtc_library("videotoolbox_objc") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001646 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +01001647 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadeic0af5ac2017-08-24 12:26:05 -07001648 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001649 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1650 "objc/components/video_codec/RTCVideoDecoderFactoryH264.m",
1651 "objc/components/video_codec/RTCVideoDecoderH264.h",
1652 "objc/components/video_codec/RTCVideoDecoderH264.mm",
1653 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1654 "objc/components/video_codec/RTCVideoEncoderFactoryH264.m",
1655 "objc/components/video_codec/RTCVideoEncoderH264.h",
1656 "objc/components/video_codec/RTCVideoEncoderH264.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001657 ]
1658
Anders Carlsson358f2e02018-06-04 10:24:37 +02001659 configs += [
1660 "..:common_objc",
1661 ":used_from_extension",
1662 ]
1663
1664 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
1665 defines = [ "RTC_APPRTCMOBILE_BROADCAST_EXTENSION" ]
1666 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001667
1668 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001669 ":base_native_additions_objc",
1670 ":base_objc",
1671 ":helpers_objc",
mbonadeic0af5ac2017-08-24 12:26:05 -07001672 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001673 ":videocodec_objc",
1674 ":videoframebuffer_objc",
Johannes Kronc3fcee72021-04-19 09:09:26 +02001675 "../api/video_codecs:video_codecs_api",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001676 "../common_video",
Patrik Höglund99175c62018-01-08 11:05:10 +01001677 "../modules/video_coding:video_codec_interface",
Florent Castelli3a9e6872022-04-26 22:54:59 +02001678 "../rtc_base:buffer",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001679 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001680 "../rtc_base:logging",
Florent Castellidd837e22022-04-04 17:16:15 +02001681 "../rtc_base:timeutils",
Mirko Bonadei401d0562017-12-14 11:24:00 +01001682 "//third_party/libyuv",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001683 ]
1684
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +02001685 frameworks = [
mbonadei2c8ac1b2017-05-31 05:14:26 -07001686 "CoreFoundation.framework",
1687 "CoreMedia.framework",
1688 "CoreVideo.framework",
1689 "VideoToolbox.framework",
1690 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001691 }
1692 }
tkchin9eeb6242016-04-27 01:54:20 -07001693}