blob: 95221ca256d540feecd92bdea10122984aaa69e5 [file] [log] [blame]
tkchin9eeb6242016-04-27 01:54:20 -07001# Copyright 2016 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
philipel4eab9f42022-05-31 17:24:44 +02009import("//third_party/libaom/options.gni")
mbonadei9aa3f0a2017-01-24 06:58:22 -080010import("../webrtc.gni")
kthelgasonebc34e72016-09-15 04:30:18 -070011if (is_ios) {
oprypin45197522017-06-22 01:47:20 -070012 import("//build/config/ios/ios_sdk.gni")
Mirko Bonadei2ff3f492018-11-22 09:00:13 +010013 import("//build/config/ios/rules.gni")
kthelgasonebc34e72016-09-15 04:30:18 -070014}
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020015if (is_mac) {
16 import("//build/config/mac/rules.gni")
kthelgason2f088792017-05-30 01:48:47 -070017}
18
kjellander6ceab082016-10-28 05:44:03 -070019group("sdk") {
Henrik Kjellandera7d0df72017-06-27 08:56:46 +020020 public_deps = []
21 if (!build_with_chromium) {
22 if (is_android) {
23 public_deps += [ "android" ]
24 }
25 if (is_ios) {
kthelgason36d658d2017-08-24 05:43:45 -070026 public_deps += [ ":framework_objc" ]
Henrik Kjellandera7d0df72017-06-27 08:56:46 +020027 }
kjellander6ceab082016-10-28 05:44:03 -070028 }
29}
30
Mirko Bonadei86d053c2019-10-17 21:32:04 +020031rtc_library("media_constraints") {
Niels Möllerdac03d92019-02-13 08:52:27 +010032 sources = [
33 "media_constraints.cc",
34 "media_constraints.h",
35 ]
36 deps = [
37 "../api:audio_options_api",
38 "../api:libjingle_peerconnection_api",
Niels Möllerdac03d92019-02-13 08:52:27 +010039 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +020040 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
Niels Möllerdac03d92019-02-13 08:52:27 +010041}
42
Mirko Bonadei86d053c2019-10-17 21:32:04 +020043rtc_library("sdk_tests") {
Niels Möllerdac03d92019-02-13 08:52:27 +010044 testonly = true
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +010045 sources = [ "media_constraints_unittest.cc" ]
Niels Möllerdac03d92019-02-13 08:52:27 +010046 deps = [
47 ":media_constraints",
48 "../test:test_support",
49 ]
50}
51
kthelgasoncc2d1c62016-11-09 07:44:27 -080052if (is_ios || is_mac) {
kthelgason36d658d2017-08-24 05:43:45 -070053 config("common_config_objc") {
kjellander080a1e32016-05-25 11:37:11 -070054 include_dirs = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020055 "objc",
56
57 # This is needed so that framework headers can include base headers
58 # without pathname (so it works from within the framework module).
59 "objc/base",
kjellander080a1e32016-05-25 11:37:11 -070060 ]
Kári Tristan Helgason47d3a012017-10-24 15:28:51 +020061 cflags = [
Jiawei Ou4aeb35b2018-11-09 13:55:45 -080062 "-Wimplicit-retain-self",
Kári Tristan Helgason47d3a012017-10-24 15:28:51 +020063 "-Wstrict-overflow",
64 "-Wmissing-field-initializers",
65 ]
Artem Titarenko17ad64e2018-09-19 17:53:59 +020066
67 if (use_clang_coverage) {
68 configs = [ "//build/config/coverage:default_coverage" ]
69 }
kjellander080a1e32016-05-25 11:37:11 -070070 }
71
Anders Carlsson358f2e02018-06-04 10:24:37 +020072 config("used_from_extension") {
73 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
74 cflags = [ "-fapplication-extension" ]
75 }
76 }
77
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020078 # TODO(bugs.webrtc.org/9627): Remove this when unused. Targets should depend on base_objc
79 # or helpers_objc directly instead.
Mirko Bonadei86d053c2019-10-17 21:32:04 +020080 rtc_library("common_objc") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +020081 visibility = [ "*" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020082
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +010083 sources = [ "objc/helpers/noop.mm" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020084
85 public_configs = [ ":common_config_objc" ]
86
87 deps = [
88 ":base_objc",
89 ":helpers_objc",
90 ]
91 }
92
Mirko Bonadei86d053c2019-10-17 21:32:04 +020093 rtc_library("base_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020094 visibility = [ "*" ]
95 sources = [
96 "objc/base/RTCCodecSpecificInfo.h",
97 "objc/base/RTCEncodedImage.h",
98 "objc/base/RTCEncodedImage.m",
99 "objc/base/RTCI420Buffer.h",
100 "objc/base/RTCLogging.h",
101 "objc/base/RTCLogging.mm",
102 "objc/base/RTCMacros.h",
103 "objc/base/RTCMutableI420Buffer.h",
104 "objc/base/RTCMutableYUVPlanarBuffer.h",
Yury Yaroshevich19a6e942022-03-11 09:22:08 +0100105 "objc/base/RTCSSLCertificateVerifier.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200106 "objc/base/RTCVideoCapturer.h",
107 "objc/base/RTCVideoCapturer.m",
108 "objc/base/RTCVideoCodecInfo.h",
109 "objc/base/RTCVideoCodecInfo.m",
110 "objc/base/RTCVideoDecoder.h",
111 "objc/base/RTCVideoDecoderFactory.h",
112 "objc/base/RTCVideoEncoder.h",
113 "objc/base/RTCVideoEncoderFactory.h",
114 "objc/base/RTCVideoEncoderQpThresholds.h",
115 "objc/base/RTCVideoEncoderQpThresholds.m",
116 "objc/base/RTCVideoEncoderSettings.h",
117 "objc/base/RTCVideoEncoderSettings.m",
118 "objc/base/RTCVideoFrame.h",
119 "objc/base/RTCVideoFrame.mm",
120 "objc/base/RTCVideoFrameBuffer.h",
121 "objc/base/RTCVideoRenderer.h",
122 "objc/base/RTCYUVPlanarBuffer.h",
tkchin9eeb6242016-04-27 01:54:20 -0700123 ]
denicijad2088152017-04-28 02:14:54 -0700124
mbonadei1e060c62017-04-21 00:02:02 -0700125 deps = [
Artem Titov94b57c02019-03-21 13:35:10 +0100126 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100127 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +0200128 "../rtc_base:logging",
mbonadei1e060c62017-04-21 00:02:02 -0700129 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200130 configs += [
131 "..:common_objc",
132 ":used_from_extension",
133 ]
kthelgasonc0977102017-04-24 00:57:16 -0700134
kthelgason36d658d2017-08-24 05:43:45 -0700135 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200136 }
137
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200138 rtc_library("helpers_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200139 sources = [
Artem Titov63ee39d2022-05-13 14:46:42 +0000140 "objc/helpers/AVCaptureSession+DevicePosition.h",
141 "objc/helpers/AVCaptureSession+DevicePosition.mm",
142 "objc/helpers/NSString+StdString.h",
143 "objc/helpers/NSString+StdString.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200144 "objc/helpers/RTCDispatcher+Private.h",
145 "objc/helpers/RTCDispatcher.h",
146 "objc/helpers/RTCDispatcher.m",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200147 "objc/helpers/scoped_cftyperef.h",
148 ]
149
150 deps = [
151 ":base_objc",
152 "../rtc_base:checks",
153 ]
154
Ali Tofigh6364d082022-03-14 13:32:04 +0100155 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
156
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200157 frameworks = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200158 "AVFoundation.framework",
159 "CoreMedia.framework",
160 ]
161
162 configs += [
163 "..:common_objc",
164 ":used_from_extension",
165 ]
166
167 public_configs = [ ":common_config_objc" ]
denicijad2088152017-04-28 02:14:54 -0700168
kjellander3bcedd32016-06-08 01:14:15 -0700169 if (is_ios) {
170 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200171 "objc/helpers/RTCCameraPreviewView.h",
172 "objc/helpers/RTCCameraPreviewView.m",
173 "objc/helpers/UIDevice+RTCDevice.h",
174 "objc/helpers/UIDevice+RTCDevice.mm",
175 ]
176 }
177 }
178
179 if (!build_with_chromium) {
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200180 rtc_library("callback_logger_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200181 sources = [
182 "objc/api/logging/RTCCallbackLogger.h",
183 "objc/api/logging/RTCCallbackLogger.mm",
184 ]
185
186 deps = [
187 ":base_objc",
Ali Tofigh6364d082022-03-14 13:32:04 +0100188 ":helpers_objc",
Artem Titov94b57c02019-03-21 13:35:10 +0100189 "../rtc_base",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200190 "../rtc_base:checks",
191 "../rtc_base:logging",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200192 ]
193
194 configs += [
195 "..:common_objc",
196 ":used_from_extension",
kjellander3bcedd32016-06-08 01:14:15 -0700197 ]
Ali Tofigh6364d082022-03-14 13:32:04 +0100198
199 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
denicijad2088152017-04-28 02:14:54 -0700200 }
201
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200202 rtc_library("file_logger_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200203 sources = [
204 "objc/api/peerconnection/RTCFileLogger.h",
205 "objc/api/peerconnection/RTCFileLogger.mm",
206 ]
207
208 deps = [
209 ":base_objc",
Artem Titov94b57c02019-03-21 13:35:10 +0100210 "../rtc_base",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200211 "../rtc_base:checks",
212 "../rtc_base:logging",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200213 ]
214
215 configs += [
216 "..:common_objc",
217 ":used_from_extension",
kthelgason2f088792017-05-30 01:48:47 -0700218 ]
219 }
220 }
221
mbonadei2c8ac1b2017-05-31 05:14:26 -0700222 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100223 if (is_ios) {
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200224 rtc_library("native_api_audio_device_module") {
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200225 visibility = [ "*" ]
226
227 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200228 "objc/native/api/audio_device_module.h",
229 "objc/native/api/audio_device_module.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200230 ]
231
232 deps = [
233 ":audio_device",
Niels Möller105711e2022-06-14 15:48:26 +0200234 "../api:make_ref_counted",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200235 "../modules/audio_device:audio_device_api",
236 "../modules/audio_device:audio_device_generic",
237 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +0200238 "../rtc_base:logging",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200239 "../system_wrappers",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200240 ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200241 }
242
243 rtc_source_set("audio_session_observer") {
244 visibility = [ ":*" ]
245
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +0100246 sources = [ "objc/native/src/audio/audio_session_observer.h" ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200247
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100248 deps = [
249 "../rtc_base",
250 "../rtc_base:threading",
251 ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200252 }
253
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200254 rtc_library("audio_device") {
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200255 visibility = [ "*" ]
256
257 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200258 "objc/native/src/audio/audio_device_ios.h",
259 "objc/native/src/audio/audio_device_ios.mm",
260 "objc/native/src/audio/audio_device_module_ios.h",
261 "objc/native/src/audio/audio_device_module_ios.mm",
262 "objc/native/src/audio/helpers.h",
263 "objc/native/src/audio/helpers.mm",
264 "objc/native/src/audio/voice_processing_audio_unit.h",
265 "objc/native/src/audio/voice_processing_audio_unit.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200266 ]
267
268 deps = [
269 ":audio_objc",
270 ":audio_session_observer",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200271 ":base_objc",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200272 "../api:array_view",
Florent Castelli8d4e9fb2022-04-04 17:18:21 +0200273 "../api:sequence_checker",
Danil Chapovalova6cb1502019-06-27 15:16:34 +0200274 "../api/task_queue",
275 "../api/task_queue:default_task_queue_factory",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200276 "../modules/audio_device:audio_device_api",
277 "../modules/audio_device:audio_device_buffer",
278 "../modules/audio_device:audio_device_generic",
Artem Titov94b57c02019-03-21 13:35:10 +0100279 "../rtc_base",
Florent Castellibddfe022022-04-04 15:03:10 +0200280 "../rtc_base:atomicops",
Florent Castelli3a9e6872022-04-26 22:54:59 +0200281 "../rtc_base:buffer",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200282 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +0200283 "../rtc_base:logging",
Florent Castelli4467ad72022-04-04 15:18:46 +0200284 "../rtc_base:macromagic",
Florent Castellif86f6f92022-04-05 02:54:12 +0200285 "../rtc_base:refcount",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100286 "../rtc_base:threading",
Florent Castellidd837e22022-04-04 17:16:15 +0200287 "../rtc_base:timeutils",
Kári Tristan Helgasonf49429d2019-03-28 11:03:27 +0100288 "../system_wrappers:field_trial",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200289 "../system_wrappers:metrics",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200290 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200291 absl_deps = [ "//third_party/abseil-cpp/absl/base:core_headers" ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200292
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200293 frameworks = [ "AudioToolbox.framework" ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200294 }
295
Joe Chen0b3a6e32019-12-26 23:01:42 -0800296 # This target exists to expose :audio_session_objc and
297 # :audio_session_delegate_adapter_objc for backward compatibility,
298 # and should be deprecated.
299 group("audio_objc") {
300 public_deps = [ # no-presubmit-check TODO(webrtc:11238)
301 ":audio_session_delegate_adapter_objc",
302 ":audio_session_objc",
303 ]
304 }
305
306 rtc_library("audio_session_delegate_adapter_objc") {
307 sources = [
308 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.h",
309 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.mm",
310 ]
311
312 configs += [
313 "..:common_objc",
314 ":used_from_extension",
315 ]
316
317 public_configs = [ ":common_config_objc" ]
318
319 deps = [
320 ":audio_session_objc",
321 ":audio_session_observer",
322 ":base_objc",
323 ]
324 }
325
326 rtc_library("audio_session_objc") {
Joe Chen3b19b272020-01-09 08:31:06 -0800327 visibility = [ "*" ]
328
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100329 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200330 "objc/components/audio/RTCAudioSession+Configuration.mm",
331 "objc/components/audio/RTCAudioSession+Private.h",
332 "objc/components/audio/RTCAudioSession.h",
333 "objc/components/audio/RTCAudioSession.mm",
334 "objc/components/audio/RTCAudioSessionConfiguration.h",
335 "objc/components/audio/RTCAudioSessionConfiguration.m",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100336 ]
Joe Chen0b3a6e32019-12-26 23:01:42 -0800337
Anders Carlsson358f2e02018-06-04 10:24:37 +0200338 configs += [
339 "..:common_objc",
340 ":used_from_extension",
341 ]
denicija59ee91b2017-06-05 05:48:47 -0700342
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100343 public_configs = [ ":common_config_objc" ]
Anders Carlsson8ecfd802017-09-15 14:07:30 +0200344
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200345 frameworks = [ "AVFoundation.framework" ]
Jiawei Ouc9e6b962018-10-09 12:33:06 -0700346
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100347 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200348 ":base_objc",
349 ":helpers_objc",
Artem Titov94b57c02019-03-21 13:35:10 +0100350 "../rtc_base",
Florent Castellibddfe022022-04-04 15:03:10 +0200351 "../rtc_base:atomicops",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100352 "../rtc_base:checks",
Niels Möller072c0082021-02-15 16:30:44 +0100353 "../rtc_base/synchronization:mutex",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100354 ]
Byoungchan Lee0a54e7a2021-09-06 22:32:52 +0900355
356 absl_deps = [ "//third_party/abseil-cpp/absl/base:core_headers" ]
denicija59ee91b2017-06-05 05:48:47 -0700357 }
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -0700358
359 rtc_source_set("network_monitor_observer") {
360 visibility = [ ":*" ]
361
362 sources = [ "objc/native/src/network_monitor_observer.h" ]
363
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100364 deps = [
365 "../rtc_base",
366 "../rtc_base:network_constants",
Florent Castelli57aa81b2022-04-04 17:14:02 +0200367 "../rtc_base:stringutils",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100368 "../rtc_base:threading",
369 ]
Ali Tofigh7fa90572022-03-17 15:47:49 +0100370
371 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -0700372 }
373
374 rtc_library("network_monitor_objc") {
375 visibility = [ "*" ]
376
377 sources = [
378 "objc/components/network/RTCNetworkMonitor+Private.h",
379 "objc/components/network/RTCNetworkMonitor.h",
380 "objc/components/network/RTCNetworkMonitor.mm",
381 ]
382
383 configs += [ ":used_from_extension" ]
384
385 frameworks = [ "Network.framework" ]
386
387 deps = [
388 ":base_objc",
389 ":helpers_objc",
390 ":network_monitor_observer",
Ali Tofigh7fa90572022-03-17 15:47:49 +0100391 "../rtc_base:stringutils",
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -0700392 "../rtc_base/system:gcd_helpers",
393 ]
394 }
denicija59ee91b2017-06-05 05:48:47 -0700395 }
zhihuanga4c113a2017-06-28 14:05:44 -0700396
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200397 rtc_library("videosource_objc") {
zhihuanga4c113a2017-06-28 14:05:44 -0700398 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200399 "objc/api/peerconnection/RTCVideoSource+Private.h",
400 "objc/api/peerconnection/RTCVideoSource.h",
401 "objc/api/peerconnection/RTCVideoSource.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700402 ]
403
404 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200405 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100406 ":mediasource_objc",
407 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100408 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700409 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 14:30:41 +0200410 "../api:media_stream_interface",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200411 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +0200412 "../api/video:video_rtp_headers",
zhihuanga4c113a2017-06-28 14:05:44 -0700413 "../common_video",
414 "../media:rtc_media_base",
Harald Alvestrande5a73f52022-03-28 12:06:34 +0000415 "../pc:video_track_source_proxy",
Artem Titov94b57c02019-03-21 13:35:10 +0100416 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100417 "../rtc_base:checks",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100418 "../rtc_base:threading",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100419 "//third_party/libyuv",
zhihuanga4c113a2017-06-28 14:05:44 -0700420 ]
421
Anders Carlsson358f2e02018-06-04 10:24:37 +0200422 configs += [
423 "..:common_objc",
424 ":used_from_extension",
425 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700426 }
427
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200428 rtc_library("videoframebuffer_objc") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200429 visibility = [ "*" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100430 sources = [
Anders Carlsson4e5af962018-09-03 14:44:50 +0200431 "objc/api/video_frame_buffer/RTCNativeI420Buffer+Private.h",
432 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
433 "objc/api/video_frame_buffer/RTCNativeI420Buffer.mm",
434 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
435 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200436 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
437 "objc/components/video_frame_buffer/RTCCVPixelBuffer.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100438 ]
439 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200440 ":base_objc",
Florent Castelli0af55ba2022-04-04 15:06:30 +0200441 "../rtc_base:logging",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200442 "//api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +0200443 "//api/video:video_rtp_headers",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100444 "//common_video",
445 "//rtc_base:checks",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100446 "//third_party/libyuv",
447 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200448 configs += [
449 "..:common_objc",
450 ":used_from_extension",
451 ]
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200452 frameworks = [
Kári Tristan Helgason8a1e35c2019-03-07 10:44:26 +0100453 "VideoToolbox.framework",
Oleh Prypinb3f78de2019-07-18 22:25:48 +0200454 "CoreGraphics.framework",
Kári Tristan Helgason8a1e35c2019-03-07 10:44:26 +0100455 "CoreVideo.framework",
456 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100457 }
458
Jordan Rose53d3fc92021-07-06 12:16:41 -0700459 rtc_library("opengl_objc") {
kthelgason2f088792017-05-30 01:48:47 -0700460 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200461 "objc/components/renderer/opengl/RTCDefaultShader.h",
462 "objc/components/renderer/opengl/RTCDefaultShader.mm",
463 "objc/components/renderer/opengl/RTCI420TextureCache.h",
464 "objc/components/renderer/opengl/RTCI420TextureCache.mm",
465 "objc/components/renderer/opengl/RTCOpenGLDefines.h",
466 "objc/components/renderer/opengl/RTCShader.h",
467 "objc/components/renderer/opengl/RTCShader.mm",
468 "objc/components/renderer/opengl/RTCVideoViewShading.h",
kthelgason2f088792017-05-30 01:48:47 -0700469 ]
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200470 frameworks = [ "CoreVideo.framework" ]
denicijad2088152017-04-28 02:14:54 -0700471 if (is_ios) {
denicija070d5e32017-02-26 11:44:13 -0800472 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200473 "objc/components/renderer/opengl/RTCNV12TextureCache.h",
474 "objc/components/renderer/opengl/RTCNV12TextureCache.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700475 ]
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200476 frameworks += [
mbonadei2c8ac1b2017-05-31 05:14:26 -0700477 "GLKit.framework",
478 "OpenGLES.framework",
479 "QuartzCore.framework",
480 ]
481 } else if (is_mac) {
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200482 frameworks += [
mbonadei2c8ac1b2017-05-31 05:14:26 -0700483 "CoreMedia.framework",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700484 "OpenGL.framework",
denicija070d5e32017-02-26 11:44:13 -0800485 ]
486 }
Mirko Bonadei6b09c452021-07-05 16:47:49 +0200487
488 # TODO(bugs.webrtc.org/12937): Remove OpenGL deprecation warning
489 # workaround.
Björn Terelius02768ae2021-07-02 16:19:32 +0200490 defines = [ "GLES_SILENCE_DEPRECATION" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700491
kthelgason2f088792017-05-30 01:48:47 -0700492 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200493 ":base_objc",
494 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100495 ":mediaconstraints_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100496 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100497 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100498 ":videosource_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700499 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200500 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +0200501 "../api/video:video_rtp_headers",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700502 "../common_video",
503 "../media:rtc_media_base",
Artem Titov94b57c02019-03-21 13:35:10 +0100504 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100505 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +0200506 "../rtc_base:logging",
tkchin9eeb6242016-04-27 01:54:20 -0700507 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200508 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700509
Anders Carlsson358f2e02018-06-04 10:24:37 +0200510 configs += [
511 "..:common_objc",
512 ":used_from_extension",
513 ]
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800514 }
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800515
Jordan Rose53d3fc92021-07-06 12:16:41 -0700516 rtc_library("opengl_ui_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000517 visibility = [ "*" ]
Jake Brombergfb7fd242021-06-14 13:44:25 -0700518 allow_poison = [
519 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
520 "default_task_queue",
521 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700522 if (is_ios) {
523 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200524 "objc/components/renderer/opengl/RTCDisplayLinkTimer.h",
525 "objc/components/renderer/opengl/RTCDisplayLinkTimer.m",
526 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
527 "objc/components/renderer/opengl/RTCEAGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700528 ]
Mirko Bonadei6b09c452021-07-05 16:47:49 +0200529
530 # TODO(bugs.webrtc.org/12937): Remove OpenGL deprecation warning
531 # workaround.
Björn Terelius02768ae2021-07-02 16:19:32 +0200532 defines = [ "GLES_SILENCE_DEPRECATION" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700533 }
534 if (is_mac) {
535 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200536 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
537 "objc/components/renderer/opengl/RTCNSGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700538 ]
539 }
540 configs += [ "..:common_objc" ]
541 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200542 ":base_objc",
543 ":helpers_objc",
Jake Brombergfb7fd242021-06-14 13:44:25 -0700544 ":metal_objc",
Jordan Rose53d3fc92021-07-06 12:16:41 -0700545 ":opengl_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100546 ":videocapture_objc",
547 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700548 ]
549 }
kthelgasonebc34e72016-09-15 04:30:18 -0700550
Jake Brombergfb7fd242021-06-14 13:44:25 -0700551 rtc_library("metal_objc") {
552 visibility = [ "*" ]
553 allow_poison = [
554 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
555 "default_task_queue",
556 ]
557 sources = [
558 "objc/components/renderer/metal/RTCMTLI420Renderer.h",
559 "objc/components/renderer/metal/RTCMTLI420Renderer.mm",
560 "objc/components/renderer/metal/RTCMTLNV12Renderer.h",
561 "objc/components/renderer/metal/RTCMTLNV12Renderer.mm",
562 "objc/components/renderer/metal/RTCMTLRGBRenderer.h",
563 "objc/components/renderer/metal/RTCMTLRGBRenderer.mm",
564 "objc/components/renderer/metal/RTCMTLRenderer+Private.h",
565 "objc/components/renderer/metal/RTCMTLRenderer.h",
566 "objc/components/renderer/metal/RTCMTLRenderer.mm",
567 ]
568 frameworks = [
569 "CoreVideo.framework",
570 "Metal.framework",
571 "MetalKit.framework",
572 ]
573 if (is_ios) {
574 sources += [
575 "objc/components/renderer/metal/RTCMTLVideoView.h",
576 "objc/components/renderer/metal/RTCMTLVideoView.m",
Danil Chapovalov41300af2019-07-10 12:44:43 +0200577 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700578 }
Jake Brombergfb7fd242021-06-14 13:44:25 -0700579 if (is_mac) {
580 sources += [
581 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
582 "objc/components/renderer/metal/RTCMTLNSVideoView.m",
583 ]
584 frameworks += [ "AppKit.framework" ]
585 }
586 deps = [
587 ":base_objc",
588 ":peerconnectionfactory_base_objc",
Jake Brombergfb7fd242021-06-14 13:44:25 -0700589 ":videoframebuffer_objc",
590 "../api/video:video_frame",
591 "../api/video:video_rtp_headers",
592 "../rtc_base:checks",
Jake Brombergfb7fd242021-06-14 13:44:25 -0700593 ]
594 configs += [ "..:common_objc" ]
595 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700596 }
597
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200598 # TODO(bugs.webrtc.org/9627): Remove this target.
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200599 rtc_library("videocapturebase_objc") {
Anders Carlsson73119182018-03-15 09:41:03 +0100600 visibility = [ "*" ]
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +0100601 sources = [ "objc/helpers/noop.mm" ]
Anders Carlsson73119182018-03-15 09:41:03 +0100602
603 configs += [ "..:common_objc" ]
604
605 public_configs = [ ":common_config_objc" ]
606
607 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200608 ":base_objc",
Anders Carlsson73119182018-03-15 09:41:03 +0100609 ":videoframebuffer_objc",
610 ]
611 }
612
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200613 rtc_library("videocapture_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000614 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100615 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadei2c8ac1b2017-05-31 05:14:26 -0700616 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200617 "objc/components/capturer/RTCCameraVideoCapturer.h",
618 "objc/components/capturer/RTCCameraVideoCapturer.m",
Mirko Bonadei19640aa2020-10-19 16:12:43 +0200619 "objc/components/capturer/RTCFileVideoCapturer.h",
620 "objc/components/capturer/RTCFileVideoCapturer.m",
zhihuanga4c113a2017-06-28 14:05:44 -0700621 ]
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200622 frameworks = [
Kári Tristan Helgason8a1e35c2019-03-07 10:44:26 +0100623 "AVFoundation.framework",
624 "CoreVideo.framework",
Mirko Bonadei19640aa2020-10-19 16:12:43 +0200625 "QuartzCore.framework",
Kári Tristan Helgason8a1e35c2019-03-07 10:44:26 +0100626 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700627
zhihuanga4c113a2017-06-28 14:05:44 -0700628 configs += [ "..:common_objc" ]
629
kthelgason36d658d2017-08-24 05:43:45 -0700630 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700631
zhihuanga4c113a2017-06-28 14:05:44 -0700632 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200633 ":base_objc",
634 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100635 ":videoframebuffer_objc",
Yura Yaroshevichebf739b2020-03-16 18:00:59 +0300636 "../rtc_base/system:gcd_helpers",
zhihuanga4c113a2017-06-28 14:05:44 -0700637 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700638 }
639
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200640 rtc_library("videocodec_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200641 visibility = [ "*" ]
Mirko Bonadei96ede162018-09-06 13:45:44 +0200642 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100643 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200644 "objc/components/video_codec/RTCCodecSpecificInfoH264+Private.h",
645 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
646 "objc/components/video_codec/RTCCodecSpecificInfoH264.mm",
647 "objc/components/video_codec/RTCH264ProfileLevelId.h",
648 "objc/components/video_codec/RTCH264ProfileLevelId.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700649 ]
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300650 if (is_ios) {
651 sources += [
Artem Titov63ee39d2022-05-13 14:46:42 +0000652 "objc/components/video_codec/UIDevice+H264Profile.h",
653 "objc/components/video_codec/UIDevice+H264Profile.mm",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300654 ]
655 }
Mirko Bonadeifc52b912019-03-01 10:32:56 +0100656
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100657 public_configs = [ ":common_config_objc" ]
658 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200659 ":base_objc",
660 ":helpers_objc",
kthelgasonfb143122017-07-25 07:55:58 -0700661 "../api/video_codecs:video_codecs_api",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100662 "../common_video",
zhihuanga4c113a2017-06-28 14:05:44 -0700663 "../media:rtc_media_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100664 "../modules/video_coding:video_codec_interface",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200665 "../rtc_base:checks",
zhihuanga4c113a2017-06-28 14:05:44 -0700666 ]
667 }
668
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200669 rtc_library("default_codec_factory_objc") {
Anders Carlssondd8c1652018-01-30 10:32:13 +0100670 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200671 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
672 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.m",
673 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
674 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.m",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100675 ]
676
677 deps = [
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +0300678 ":av1",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200679 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100680 ":native_video",
681 ":videocodec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200682 ":videotoolbox_objc",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +0200683 ":vp8",
684 ":vp9",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200685 ":vpx_codec_constants",
686 ]
687 }
688
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200689 rtc_library("vpx_codec_constants") {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200690 configs += [ "..:no_global_constructors" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200691 sources = [
692 "objc/api/video_codec/RTCVideoCodecConstants.h",
693 "objc/api/video_codec/RTCVideoCodecConstants.mm",
694 ]
695
696 deps = [
697 ":base_objc",
698 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100699 ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100700 }
701
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200702 rtc_library("vp8") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100703 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200704 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100705 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200706 "objc/api/video_codec/RTCVideoDecoderVP8.h",
707 "objc/api/video_codec/RTCVideoDecoderVP8.mm",
708 "objc/api/video_codec/RTCVideoEncoderVP8.h",
709 "objc/api/video_codec/RTCVideoEncoderVP8.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100710 ]
711
Anders Carlssondd8c1652018-01-30 10:32:13 +0100712 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200713 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100714 ":wrapped_native_codec_objc",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100715 "../modules/video_coding:webrtc_vp8",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100716 ]
717 }
718
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200719 rtc_library("vp9") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100720 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200721 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100722 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200723 "objc/api/video_codec/RTCVideoDecoderVP9.h",
724 "objc/api/video_codec/RTCVideoDecoderVP9.mm",
725 "objc/api/video_codec/RTCVideoEncoderVP9.h",
726 "objc/api/video_codec/RTCVideoEncoderVP9.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100727 ]
728
Anders Carlssondd8c1652018-01-30 10:32:13 +0100729 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200730 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100731 ":wrapped_native_codec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200732 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100733 "../modules/video_coding:webrtc_vp9",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100734 ]
735 }
736
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +0300737 rtc_library("av1") {
738 visibility = [ "*" ]
739 allow_poison = [ "software_video_codecs" ]
740 sources = [
741 "objc/api/video_codec/RTCVideoDecoderAV1.h",
742 "objc/api/video_codec/RTCVideoDecoderAV1.mm",
743 "objc/api/video_codec/RTCVideoEncoderAV1.h",
744 "objc/api/video_codec/RTCVideoEncoderAV1.mm",
745 ]
746
747 deps = [
748 ":base_objc",
749 ":wrapped_native_codec_objc",
750 "../media:rtc_media_base",
751 "../modules/video_coding/codecs/av1:libaom_av1_decoder",
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +0300752 ]
philipel4eab9f42022-05-31 17:24:44 +0200753
754 defines = []
755 if (enable_libaom) {
756 defines += [ "RTC_USE_LIBAOM_AV1_ENCODER" ]
757 deps += [ "../modules/video_coding/codecs/av1:libaom_av1_encoder" ]
758 }
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +0300759 }
760
zhihuanga4c113a2017-06-28 14:05:44 -0700761 # Build the PeerConnectionFactory without audio/video support.
762 # This target depends on the objc_peeerconnectionfactory_base which still
763 # includes some audio/video related objects such as RTCAudioSource because
764 # these objects are just thin wrappers of native C++ interfaces required
765 # when implementing webrtc::PeerConnectionFactoryInterface and
766 # webrtc::PeerConnectionInterface.
Kári Tristan Helgasona2d89fc2018-03-06 10:18:43 +0100767 # The applications which only use WebRTC DataChannel can depend on this.
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200768 rtc_library("peerconnectionfactory_no_media_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000769 visibility = [ "*" ]
Danil Chapovalov41300af2019-07-10 12:44:43 +0200770 allow_poison = [
771 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
772 "default_task_queue",
773 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700774 defines = [ "HAVE_NO_MEDIA" ]
775
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +0100776 sources = [ "objc/helpers/noop.mm" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700777
kthelgason36d658d2017-08-24 05:43:45 -0700778 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700779
zhihuanga4c113a2017-06-28 14:05:44 -0700780 deps = [
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100781 ":native_api",
782 ":native_video",
kthelgason36d658d2017-08-24 05:43:45 -0700783 ":peerconnectionfactory_base_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700784 "../api:libjingle_peerconnection_api",
Artem Titov94b57c02019-03-21 13:35:10 +0100785 "../rtc_base",
zhihuanga4c113a2017-06-28 14:05:44 -0700786 ]
787 }
788
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200789 rtc_library("mediaconstraints_objc") {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200790 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100791 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200792 "objc/api/peerconnection/RTCMediaConstraints+Private.h",
793 "objc/api/peerconnection/RTCMediaConstraints.h",
794 "objc/api/peerconnection/RTCMediaConstraints.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100795 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100796
797 public_configs = [ ":common_config_objc" ]
798 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200799 ":base_objc",
800 ":helpers_objc",
Niels Möllerdac03d92019-02-13 08:52:27 +0100801 ":media_constraints",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100802 ]
803 }
804
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200805 # TODO(bugs.webrtc.org/9627): Remove, targets should depend on base_objc.
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200806 rtc_library("videorenderer_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200807 visibility = [ "*" ]
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +0100808 sources = [ "objc/helpers/noop.mm" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100809
810 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100811 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200812
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +0100813 deps = [ ":base_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100814 }
815
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200816 rtc_library("videorendereradapter_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200817 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100818 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Anders Carlsson9823ee42018-03-07 10:32:03 +0100819 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200820 "objc/api/RTCVideoRendererAdapter+Private.h",
821 "objc/api/RTCVideoRendererAdapter.h",
822 "objc/api/RTCVideoRendererAdapter.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100823 ]
824
825 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100826 public_configs = [ ":common_config_objc" ]
827
828 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200829 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100830 ":native_api",
831 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100832 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 14:30:41 +0200833 "../api:media_stream_interface",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100834 ]
835 }
836
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200837 rtc_library("mediasource_objc") {
Anders Carlsson9823ee42018-03-07 10:32:03 +0100838 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200839 "objc/api/peerconnection/RTCMediaSource+Private.h",
840 "objc/api/peerconnection/RTCMediaSource.h",
841 "objc/api/peerconnection/RTCMediaSource.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100842 ]
843
Anders Carlsson358f2e02018-06-04 10:24:37 +0200844 configs += [
845 "..:common_objc",
846 ":used_from_extension",
847 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100848 public_configs = [ ":common_config_objc" ]
849
850 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200851 ":base_objc",
Niels Möllere942b142019-09-17 14:30:41 +0200852 "../api:media_stream_interface",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100853 "../rtc_base:checks",
854 ]
855 }
856
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200857 rtc_library("base_native_additions_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200858 sources = [
859 "objc/api/peerconnection/RTCEncodedImage+Private.h",
860 "objc/api/peerconnection/RTCEncodedImage+Private.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200861 "objc/api/peerconnection/RTCVideoCodecInfo+Private.h",
862 "objc/api/peerconnection/RTCVideoCodecInfo+Private.mm",
863 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.h",
864 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.mm",
865 ]
866
867 configs += [ "..:common_objc" ]
868
869 public_configs = [ ":common_config_objc" ]
870
871 deps = [
872 ":base_objc",
873 ":helpers_objc",
Niels Möller4dc66c52018-10-05 14:17:58 +0200874 "../api/video:encoded_image",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200875 "../api/video_codecs:video_codecs_api",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200876 "../modules/video_coding:video_codec_interface",
Artem Titov94b57c02019-03-21 13:35:10 +0100877 "../rtc_base",
Florent Castellif86f6f92022-04-05 02:54:12 +0200878 "../rtc_base:refcount",
Florent Castellie10a9f62022-04-04 17:04:37 +0200879 "../rtc_base:safe_conversions",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200880 ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200881 }
882
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200883 rtc_library("peerconnectionfactory_base_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200884 visibility = [ "*" ]
Danil Chapovalov41300af2019-07-10 12:44:43 +0200885 allow_poison = [
886 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
887 "default_task_queue",
888 ]
Byoungchan Lee524a4222021-11-19 19:03:49 +0900889 configs += [ "..:no_global_constructors" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700890 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200891 "objc/api/peerconnection/RTCAudioSource+Private.h",
892 "objc/api/peerconnection/RTCAudioSource.h",
893 "objc/api/peerconnection/RTCAudioSource.mm",
894 "objc/api/peerconnection/RTCAudioTrack+Private.h",
895 "objc/api/peerconnection/RTCAudioTrack.h",
896 "objc/api/peerconnection/RTCAudioTrack.mm",
897 "objc/api/peerconnection/RTCCertificate.h",
898 "objc/api/peerconnection/RTCCertificate.mm",
899 "objc/api/peerconnection/RTCConfiguration+Native.h",
900 "objc/api/peerconnection/RTCConfiguration+Private.h",
901 "objc/api/peerconnection/RTCConfiguration.h",
902 "objc/api/peerconnection/RTCConfiguration.mm",
Benjamin Wright8c27cca2018-10-25 10:16:44 -0700903 "objc/api/peerconnection/RTCCryptoOptions.h",
904 "objc/api/peerconnection/RTCCryptoOptions.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200905 "objc/api/peerconnection/RTCDataChannel+Private.h",
906 "objc/api/peerconnection/RTCDataChannel.h",
907 "objc/api/peerconnection/RTCDataChannel.mm",
908 "objc/api/peerconnection/RTCDataChannelConfiguration+Private.h",
909 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
910 "objc/api/peerconnection/RTCDataChannelConfiguration.mm",
911 "objc/api/peerconnection/RTCDtmfSender+Private.h",
912 "objc/api/peerconnection/RTCDtmfSender.h",
913 "objc/api/peerconnection/RTCDtmfSender.mm",
914 "objc/api/peerconnection/RTCFieldTrials.h",
915 "objc/api/peerconnection/RTCFieldTrials.mm",
916 "objc/api/peerconnection/RTCIceCandidate+Private.h",
917 "objc/api/peerconnection/RTCIceCandidate.h",
918 "objc/api/peerconnection/RTCIceCandidate.mm",
Jaehyun Kod2110982021-11-30 19:01:43 +0900919 "objc/api/peerconnection/RTCIceCandidateErrorEvent+Private.h",
920 "objc/api/peerconnection/RTCIceCandidateErrorEvent.h",
921 "objc/api/peerconnection/RTCIceCandidateErrorEvent.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200922 "objc/api/peerconnection/RTCIceServer+Private.h",
923 "objc/api/peerconnection/RTCIceServer.h",
924 "objc/api/peerconnection/RTCIceServer.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200925 "objc/api/peerconnection/RTCLegacyStatsReport+Private.h",
926 "objc/api/peerconnection/RTCLegacyStatsReport.h",
927 "objc/api/peerconnection/RTCLegacyStatsReport.mm",
928 "objc/api/peerconnection/RTCMediaStream+Private.h",
929 "objc/api/peerconnection/RTCMediaStream.h",
930 "objc/api/peerconnection/RTCMediaStream.mm",
931 "objc/api/peerconnection/RTCMediaStreamTrack+Private.h",
932 "objc/api/peerconnection/RTCMediaStreamTrack.h",
933 "objc/api/peerconnection/RTCMediaStreamTrack.mm",
934 "objc/api/peerconnection/RTCMetrics.h",
935 "objc/api/peerconnection/RTCMetrics.mm",
936 "objc/api/peerconnection/RTCMetricsSampleInfo+Private.h",
937 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
938 "objc/api/peerconnection/RTCMetricsSampleInfo.mm",
939 "objc/api/peerconnection/RTCPeerConnection+DataChannel.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200940 "objc/api/peerconnection/RTCPeerConnection+Private.h",
941 "objc/api/peerconnection/RTCPeerConnection+Stats.mm",
942 "objc/api/peerconnection/RTCPeerConnection.h",
943 "objc/api/peerconnection/RTCPeerConnection.mm",
944 "objc/api/peerconnection/RTCPeerConnectionFactory+Native.h",
945 "objc/api/peerconnection/RTCPeerConnectionFactory+Private.h",
946 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
947 "objc/api/peerconnection/RTCPeerConnectionFactory.mm",
948 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.h",
949 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.mm",
950 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.h",
951 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.mm",
952 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions+Private.h",
953 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
954 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.mm",
955 "objc/api/peerconnection/RTCRtcpParameters+Private.h",
956 "objc/api/peerconnection/RTCRtcpParameters.h",
957 "objc/api/peerconnection/RTCRtcpParameters.mm",
958 "objc/api/peerconnection/RTCRtpCodecParameters+Private.h",
959 "objc/api/peerconnection/RTCRtpCodecParameters.h",
960 "objc/api/peerconnection/RTCRtpCodecParameters.mm",
961 "objc/api/peerconnection/RTCRtpEncodingParameters+Private.h",
962 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
963 "objc/api/peerconnection/RTCRtpEncodingParameters.mm",
964 "objc/api/peerconnection/RTCRtpHeaderExtension+Private.h",
965 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
966 "objc/api/peerconnection/RTCRtpHeaderExtension.mm",
967 "objc/api/peerconnection/RTCRtpParameters+Private.h",
968 "objc/api/peerconnection/RTCRtpParameters.h",
969 "objc/api/peerconnection/RTCRtpParameters.mm",
Benjamin Wrightddf1a3e2018-10-02 10:20:58 -0700970 "objc/api/peerconnection/RTCRtpReceiver+Native.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200971 "objc/api/peerconnection/RTCRtpReceiver+Private.h",
972 "objc/api/peerconnection/RTCRtpReceiver.h",
973 "objc/api/peerconnection/RTCRtpReceiver.mm",
Benjamin Wrightddf1a3e2018-10-02 10:20:58 -0700974 "objc/api/peerconnection/RTCRtpSender+Native.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200975 "objc/api/peerconnection/RTCRtpSender+Private.h",
976 "objc/api/peerconnection/RTCRtpSender.h",
977 "objc/api/peerconnection/RTCRtpSender.mm",
978 "objc/api/peerconnection/RTCRtpTransceiver+Private.h",
979 "objc/api/peerconnection/RTCRtpTransceiver.h",
980 "objc/api/peerconnection/RTCRtpTransceiver.mm",
981 "objc/api/peerconnection/RTCSSLAdapter.h",
982 "objc/api/peerconnection/RTCSSLAdapter.mm",
983 "objc/api/peerconnection/RTCSessionDescription+Private.h",
984 "objc/api/peerconnection/RTCSessionDescription.h",
985 "objc/api/peerconnection/RTCSessionDescription.mm",
Peter Hanspersbed86042019-02-21 17:27:09 +0100986 "objc/api/peerconnection/RTCStatisticsReport+Private.h",
987 "objc/api/peerconnection/RTCStatisticsReport.h",
988 "objc/api/peerconnection/RTCStatisticsReport.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200989 "objc/api/peerconnection/RTCTracing.h",
990 "objc/api/peerconnection/RTCTracing.mm",
991 "objc/api/peerconnection/RTCVideoTrack+Private.h",
992 "objc/api/peerconnection/RTCVideoTrack.h",
993 "objc/api/peerconnection/RTCVideoTrack.mm",
kthelgason5fe4d492016-12-05 11:27:30 -0800994 ]
kthelgasonebc34e72016-09-15 04:30:18 -0700995
Anders Carlsson358f2e02018-06-04 10:24:37 +0200996 configs += [
997 "..:common_objc",
998 ":used_from_extension",
999 ]
kthelgason36d658d2017-08-24 05:43:45 -07001000 public_configs = [ ":common_config_objc" ]
kthelgasonc0977102017-04-24 00:57:16 -07001001
mbonadei2c8ac1b2017-05-31 05:14:26 -07001002 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001003 ":base_native_additions_objc",
1004 ":base_objc",
1005 ":file_logger_objc",
1006 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001007 ":mediaconstraints_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001008 ":mediasource_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001009 ":native_api",
1010 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001011 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001012 ":videorendereradapter_objc",
1013 ":videosource_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001014 ":videotoolbox_objc",
Mirko Bonadeie51f7852017-12-06 11:23:19 +01001015 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 14:30:41 +02001016 "../api:media_stream_interface",
Niels Möller695cf6a2019-05-13 12:27:23 +02001017 "../api:rtc_event_log_output_file",
Peter Hanspersbed86042019-02-21 17:27:09 +01001018 "../api:rtc_stats_api",
Niels Möller6dcd4dc2019-08-26 10:45:28 +02001019 "../api:rtp_parameters",
Mirko Bonadeid9708072019-01-25 20:26:48 +01001020 "../api:scoped_refptr",
Jiawei Ouae810c12018-06-20 16:18:59 -07001021 "../api/audio_codecs:audio_codecs_api",
Karl Wiberg5817d3d2018-04-06 10:06:42 +02001022 "../api/audio_codecs:builtin_audio_decoder_factory",
Jiawei Ouae810c12018-06-20 16:18:59 -07001023 "../api/audio_codecs:builtin_audio_encoder_factory",
Mirko Bonadeieaaaf412019-09-13 14:42:15 +02001024 "../api/crypto:frame_decryptor_interface",
1025 "../api/crypto:frame_encryptor_interface",
Danil Chapovalov4ba04b72019-06-26 15:49:47 +02001026 "../api/rtc_event_log:rtc_event_log_factory",
Danil Chapovalovaaa11432019-05-17 13:20:14 +02001027 "../api/task_queue:default_task_queue_factory",
Erik Språngceb44952020-09-22 11:36:35 +02001028 "../api/transport:field_trial_based_config",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001029 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +02001030 "../api/video:video_rtp_headers",
Anders Carlsson7e042812017-10-05 16:55:38 +02001031 "../api/video_codecs:video_codecs_api",
Anders Carlssone5960ce2017-06-22 15:26:30 +02001032 "../common_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001033 "../media:rtc_media_base",
Jiawei Ouae810c12018-06-20 16:18:59 -07001034 "../modules/audio_device:audio_device_api",
Artem Titov94b57c02019-03-21 13:35:10 +01001035 "../modules/audio_processing",
Alessio Bazzicab768e882018-11-07 14:29:54 +00001036 "../modules/audio_processing:api",
Patrik Höglund99175c62018-01-08 11:05:10 +01001037 "../modules/video_coding:video_codec_interface",
Harald Alvestrandc1e8aeb2022-03-31 19:53:50 +00001038 "../pc:peer_connection_factory",
1039 "../pc:webrtc_sdp",
Artem Titov94b57c02019-03-21 13:35:10 +01001040 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001041 "../rtc_base:checks",
Florent Castellia30aef32022-04-19 17:47:13 +02001042 "../rtc_base:event_tracer",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001043 "../rtc_base:logging",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001044 "../rtc_base:network_constants",
Florent Castellie10a9f62022-04-04 17:04:37 +02001045 "../rtc_base:safe_conversions",
Ali Tofigh969c1352022-05-13 10:26:58 +02001046 "../rtc_base:stringutils",
Byoungchan Lee2b46a582022-06-21 09:19:34 +09001047 "../rtc_base:threading",
Florent Castellidd837e22022-04-04 17:16:15 +02001048 "../rtc_base:timeutils",
Harald Alvestrandc1e8aeb2022-03-31 19:53:50 +00001049 "../stats:rtc_stats",
Mirko Bonadei17f48782018-09-28 08:51:10 +02001050 "../system_wrappers:field_trial",
1051 "../system_wrappers:metrics",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001052 ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001053
1054 if (is_ios) {
1055 deps += [ ":native_api_audio_device_module" ]
1056 }
kthelgasonebc34e72016-09-15 04:30:18 -07001057 }
Zeke Chindd0e1e02016-10-11 13:27:26 -07001058
mbonadei2c8ac1b2017-05-31 05:14:26 -07001059 if (rtc_include_tests) {
Daniela012b56b2017-11-15 13:15:24 +01001060 if (is_ios) {
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001061 rtc_library("sdk_unittests_sources") {
Danielaae012cf2017-10-12 13:46:00 +02001062 testonly = true
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001063 include_dirs = [ "objc/" ]
Daniela012b56b2017-11-15 13:15:24 +01001064
Danielaae012cf2017-10-12 13:46:00 +02001065 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001066 "objc/unittests/ObjCVideoTrackSource_xctest.mm",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001067 "objc/unittests/RTCAudioSessionTest.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001068 "objc/unittests/RTCCVPixelBuffer_xctest.mm",
1069 "objc/unittests/RTCCallbackLogger_xctest.m",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001070 "objc/unittests/RTCCameraVideoCapturerTests.mm",
1071 "objc/unittests/RTCCertificateTest.mm",
1072 "objc/unittests/RTCConfigurationTest.mm",
1073 "objc/unittests/RTCDataChannelConfigurationTest.mm",
Kári Tristan Helgasonecbdbf62020-02-20 07:34:45 -08001074 "objc/unittests/RTCEncodedImage_xctest.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001075 "objc/unittests/RTCFileVideoCapturer_xctest.mm",
1076 "objc/unittests/RTCH264ProfileLevelId_xctest.m",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001077 "objc/unittests/RTCIceCandidateTest.mm",
1078 "objc/unittests/RTCIceServerTest.mm",
Jake Brombergfb7fd242021-06-14 13:44:25 -07001079 "objc/unittests/RTCMTLVideoView_xctest.m",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001080 "objc/unittests/RTCMediaConstraintsTest.mm",
Aaron Goldenfb4e9bc2019-01-04 12:03:31 -08001081 "objc/unittests/RTCNV12TextureCache_xctest.m",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001082 "objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001083 "objc/unittests/RTCPeerConnectionFactory_xctest.m",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001084 "objc/unittests/RTCPeerConnectionTest.mm",
1085 "objc/unittests/RTCSessionDescriptionTest.mm",
1086 "objc/unittests/RTCTracingTest.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001087 "objc/unittests/frame_buffer_helpers.h",
1088 "objc/unittests/frame_buffer_helpers.mm",
Artem Titarenko42b43152018-10-29 18:18:09 +01001089 "objc/unittests/nalu_rewriter_xctest.mm",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001090 "objc/unittests/objc_video_decoder_factory_tests.mm",
1091 "objc/unittests/objc_video_encoder_factory_tests.mm",
1092 "objc/unittests/scoped_cftyperef_tests.mm",
Danielaae012cf2017-10-12 13:46:00 +02001093 ]
Daniela012b56b2017-11-15 13:15:24 +01001094
Mirko Bonadei6b09c452021-07-05 16:47:49 +02001095 # TODO(bugs.webrtc.org/12937): Remove OpenGL deprecation warning
1096 # workaround.
1097 defines = [ "GLES_SILENCE_DEPRECATION" ]
1098
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001099 # TODO(peterhanspers): Reenable these tests on simulator.
1100 # See bugs.webrtc.org/7812
Lahiru Ginnaliya Gamathige1d0e7b62020-10-20 02:43:02 -07001101 if (target_environment != "simulator") {
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001102 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001103 "objc/unittests/RTCAudioDeviceModule_xctest.mm",
1104 "objc/unittests/RTCAudioDevice_xctest.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001105 ]
1106 }
1107
Danielaae012cf2017-10-12 13:46:00 +02001108 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001109 ":audio_device",
Joe Chen0b3a6e32019-12-26 23:01:42 -08001110 ":audio_session_objc",
Kári Tristan Helgasonecbdbf62020-02-20 07:34:45 -08001111 ":base_native_additions_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001112 ":base_objc",
1113 ":callback_logger_objc",
Anders Carlssondc6b4772018-01-15 13:31:03 +01001114 ":framework_objc",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001115 ":helpers_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001116 ":mediaconstraints_objc",
Jake Brombergfb7fd242021-06-14 13:44:25 -07001117 ":metal_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001118 ":native_api",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001119 ":native_api_audio_device_module",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001120 ":native_video",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001121 ":peerconnectionfactory_base_objc",
Artem Titarenko42b43152018-10-29 18:18:09 +01001122 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001123 ":videocapture_objc",
Anders Carlsson79ce8202018-06-01 12:51:09 +02001124 ":videocodec_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001125 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001126 ":videosource_objc",
Danielaae012cf2017-10-12 13:46:00 +02001127 ":videotoolbox_objc",
Mirko Bonadeid9708072019-01-25 20:26:48 +01001128 "../api:scoped_refptr",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001129 "../api/audio_codecs:builtin_audio_decoder_factory",
1130 "../api/audio_codecs:builtin_audio_encoder_factory",
Byoungchan Lee43bd7602019-10-08 23:58:41 +09001131 "../api/task_queue:default_task_queue_factory",
Ilya Nikolaevskiy38e9b062020-10-08 14:36:33 +00001132 "../api/video:video_frame",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001133 "../api/video_codecs:video_codecs_api",
Artem Titov94b57c02019-03-21 13:35:10 +01001134 "../common_video",
Danielaae012cf2017-10-12 13:46:00 +02001135 "../media:rtc_media_base",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001136 "../media:rtc_media_tests_utils",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001137 "../modules/audio_device:audio_device_api",
1138 "../modules/audio_processing:api",
1139 "../modules/video_coding:video_codec_interface",
Artem Titov94b57c02019-03-21 13:35:10 +01001140 "../rtc_base",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001141 "../rtc_base:gunit_helpers",
Florent Castelli4467ad72022-04-04 15:18:46 +02001142 "../rtc_base:macromagic",
Florent Castellif86f6f92022-04-05 02:54:12 +02001143 "../rtc_base:refcount",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001144 "../rtc_base:rtc_event",
Byoungchan Lee83ceb902021-11-16 11:31:57 +09001145 "../rtc_base/system:unused",
Artem Titov94b57c02019-03-21 13:35:10 +01001146 "../system_wrappers",
Byoungchan Leec8a6fb22022-05-13 19:59:49 +09001147 "../test:test_support", # TODO(webrtc:8382): Remove use of gtest
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001148 "//third_party/libyuv",
Danielaae012cf2017-10-12 13:46:00 +02001149 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001150
Jordan Rose53d3fc92021-07-06 12:16:41 -07001151 if (rtc_ios_macos_use_opengl_rendering) {
1152 deps += [ ":opengl_objc" ]
1153 }
1154
Danielaae012cf2017-10-12 13:46:00 +02001155 public_deps = [
1156 "//build/config/ios:xctest",
1157 "//third_party/ocmock",
1158 ]
1159 }
1160
Daniela012b56b2017-11-15 13:15:24 +01001161 bundle_data("sdk_unittests_bundle_data") {
Daniela012b56b2017-11-15 13:15:24 +01001162 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001163 "objc/unittests/audio_short16.pcm",
1164 "objc/unittests/audio_short44.pcm",
1165 "objc/unittests/audio_short48.pcm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001166
1167 # Sample video taken from https://media.xiph.org/video/derf/
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001168 "objc/unittests/foreman.mp4",
Daniela012b56b2017-11-15 13:15:24 +01001169 ]
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +01001170 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
Daniela012b56b2017-11-15 13:15:24 +01001171 }
1172
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001173 # These tests use static linking.
Mirko Bonadeiaef8a212020-09-16 15:09:53 +02001174 rtc_test("sdk_unittests") {
1175 is_xctest = true
Danielaae012cf2017-10-12 13:46:00 +02001176 info_plist = "//test/ios/Info.plist"
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +01001177 sources = [ "objc/unittests/main.mm" ]
Daniela012b56b2017-11-15 13:15:24 +01001178
Artem Titarenkoa2bc3622019-08-19 14:24:00 +02001179 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=generic-unit-test" ]
Danielaae012cf2017-10-12 13:46:00 +02001180 deps = [
Yura Yaroshevich5297bd22018-06-19 12:51:51 +03001181 ":peerconnectionfactory_base_objc",
Daniela012b56b2017-11-15 13:15:24 +01001182 ":sdk_unittests_bundle_data",
Danielaae012cf2017-10-12 13:46:00 +02001183 ":sdk_unittests_sources",
Niels Möller5a8f8602019-06-12 11:30:59 +02001184 "../rtc_base",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001185 "../rtc_base:threading",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001186 "//test:test_support",
Danielaae012cf2017-10-12 13:46:00 +02001187 ]
1188 ldflags = [ "-all_load" ]
1189 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001190
1191 # These tests link to the framework.
Mirko Bonadeiaef8a212020-09-16 15:09:53 +02001192 rtc_test("sdk_framework_unittests") {
1193 is_xctest = true
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001194 info_plist = "//test/ios/Info.plist"
1195 sources = [
1196 "objc/unittests/RTCDoNotPutCPlusPlusInFrameworkHeaders_xctest.m",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001197 "objc/unittests/main.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001198 ]
1199
Artem Titarenkoa2bc3622019-08-19 14:24:00 +02001200 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=generic-unit-test" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001201 deps = [
1202 ":framework_objc+link",
1203 ":ios_framework_bundle",
Niels Möller5a8f8602019-06-12 11:30:59 +02001204 "../rtc_base",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001205 "../rtc_base:threading",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001206 "//test:test_support",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001207 ]
1208 }
Danielaae012cf2017-10-12 13:46:00 +02001209 }
kthelgason2f088792017-05-30 01:48:47 -07001210 }
1211
mbonadei2c8ac1b2017-05-31 05:14:26 -07001212 if (is_ios) {
Byoungchan Lee26b23b82022-04-08 18:23:14 +09001213 apple_framework_bundle_with_umbrella_header("framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001214 info_plist = "objc/Info.plist"
mbonadei2c8ac1b2017-05-31 05:14:26 -07001215 output_name = "WebRTC"
Magnus Jedvertf83dc8b2017-08-29 09:49:43 +00001216
mbonadei2c8ac1b2017-05-31 05:14:26 -07001217 common_objc_headers = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001218 "objc/base/RTCCodecSpecificInfo.h",
1219 "objc/base/RTCEncodedImage.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001220 "objc/base/RTCI420Buffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001221 "objc/base/RTCLogging.h",
1222 "objc/base/RTCMacros.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001223 "objc/base/RTCMutableI420Buffer.h",
1224 "objc/base/RTCMutableYUVPlanarBuffer.h",
Yury Yaroshevich19a6e942022-03-11 09:22:08 +01001225 "objc/base/RTCSSLCertificateVerifier.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001226 "objc/base/RTCVideoCapturer.h",
1227 "objc/base/RTCVideoCodecInfo.h",
1228 "objc/base/RTCVideoDecoder.h",
1229 "objc/base/RTCVideoDecoderFactory.h",
1230 "objc/base/RTCVideoEncoder.h",
1231 "objc/base/RTCVideoEncoderFactory.h",
1232 "objc/base/RTCVideoEncoderQpThresholds.h",
1233 "objc/base/RTCVideoEncoderSettings.h",
1234 "objc/base/RTCVideoFrame.h",
1235 "objc/base/RTCVideoFrameBuffer.h",
1236 "objc/base/RTCVideoRenderer.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001237 "objc/base/RTCYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001238 "objc/components/audio/RTCAudioSession.h",
1239 "objc/components/audio/RTCAudioSessionConfiguration.h",
1240 "objc/components/capturer/RTCCameraVideoCapturer.h",
1241 "objc/components/capturer/RTCFileVideoCapturer.h",
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001242 "objc/components/network/RTCNetworkMonitor.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001243 "objc/components/renderer/metal/RTCMTLVideoView.h",
1244 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
1245 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1246 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1247 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1248 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1249 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1250 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1251 "objc/components/video_codec/RTCVideoDecoderH264.h",
1252 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1253 "objc/components/video_codec/RTCVideoEncoderH264.h",
1254 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1255 "objc/helpers/RTCCameraPreviewView.h",
1256 "objc/helpers/RTCDispatcher.h",
1257 "objc/helpers/UIDevice+RTCDevice.h",
1258 "objc/api/peerconnection/RTCAudioSource.h",
1259 "objc/api/peerconnection/RTCAudioTrack.h",
1260 "objc/api/peerconnection/RTCConfiguration.h",
1261 "objc/api/peerconnection/RTCDataChannel.h",
1262 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1263 "objc/api/peerconnection/RTCFieldTrials.h",
1264 "objc/api/peerconnection/RTCIceCandidate.h",
Jaehyun Kod2110982021-11-30 19:01:43 +09001265 "objc/api/peerconnection/RTCIceCandidateErrorEvent.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001266 "objc/api/peerconnection/RTCIceServer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001267 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1268 "objc/api/peerconnection/RTCMediaConstraints.h",
1269 "objc/api/peerconnection/RTCMediaSource.h",
1270 "objc/api/peerconnection/RTCMediaStream.h",
1271 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1272 "objc/api/peerconnection/RTCMetrics.h",
1273 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1274 "objc/api/peerconnection/RTCPeerConnection.h",
1275 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1276 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1277 "objc/api/peerconnection/RTCRtcpParameters.h",
1278 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1279 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1280 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1281 "objc/api/peerconnection/RTCRtpParameters.h",
1282 "objc/api/peerconnection/RTCRtpReceiver.h",
1283 "objc/api/peerconnection/RTCRtpSender.h",
1284 "objc/api/peerconnection/RTCRtpTransceiver.h",
1285 "objc/api/peerconnection/RTCDtmfSender.h",
1286 "objc/api/peerconnection/RTCSSLAdapter.h",
1287 "objc/api/peerconnection/RTCSessionDescription.h",
CZ Theng682dabd2019-10-21 11:25:18 +08001288 "objc/api/peerconnection/RTCStatisticsReport.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001289 "objc/api/peerconnection/RTCTracing.h",
1290 "objc/api/peerconnection/RTCCertificate.h",
Benjamin Wright8c27cca2018-10-25 10:16:44 -07001291 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001292 "objc/api/peerconnection/RTCVideoSource.h",
1293 "objc/api/peerconnection/RTCVideoTrack.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001294 "objc/api/video_codec/RTCVideoCodecConstants.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001295 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1296 "objc/api/video_codec/RTCVideoDecoderVP9.h",
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +03001297 "objc/api/video_codec/RTCVideoDecoderAV1.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001298 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1299 "objc/api/video_codec/RTCVideoEncoderVP9.h",
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +03001300 "objc/api/video_codec/RTCVideoEncoderAV1.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001301 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1302 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001303 ]
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001304
mbonadei2c8ac1b2017-05-31 05:14:26 -07001305 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001306 common_objc_headers += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001307 "objc/api/logging/RTCCallbackLogger.h",
1308 "objc/api/peerconnection/RTCFileLogger.h",
Anders Carlsson3b3364e2018-01-30 15:46:13 +01001309 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001310 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001311
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001312 sources = common_objc_headers
1313 public_headers = common_objc_headers
1314
mbonadei2c8ac1b2017-05-31 05:14:26 -07001315 ldflags = [
1316 "-all_load",
1317 "-install_name",
1318 "@rpath/$output_name.framework/$output_name",
1319 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001320
mbonadei2c8ac1b2017-05-31 05:14:26 -07001321 deps = [
kthelgason36d658d2017-08-24 05:43:45 -07001322 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001323 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001324 ":default_codec_factory_objc",
Mirko Bonadei91d39752022-01-19 08:43:17 +01001325 ":metal_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001326 ":native_api",
1327 ":native_video",
1328 ":peerconnectionfactory_base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001329 ":videocapture_objc",
1330 ":videocodec_objc",
1331 ":videotoolbox_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001332 ]
Jordan Rose53d3fc92021-07-06 12:16:41 -07001333 if (rtc_ios_macos_use_opengl_rendering) {
1334 deps += [ ":opengl_ui_objc" ]
1335 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001336 if (!build_with_chromium) {
1337 deps += [
1338 ":callback_logger_objc",
1339 ":file_logger_objc",
1340 ]
1341 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001342
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +02001343 frameworks = [
mbonadei2c8ac1b2017-05-31 05:14:26 -07001344 "AVFoundation.framework",
1345 "CoreGraphics.framework",
1346 "CoreMedia.framework",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001347 ]
1348
Byoungchan Lee26b23b82022-04-08 18:23:14 +09001349 configs = [
Anders Carlsson358f2e02018-06-04 10:24:37 +02001350 "..:common_objc",
1351 ":used_from_extension",
1352 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001353
kthelgason36d658d2017-08-24 05:43:45 -07001354 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001355 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001356
1357 bundle_data("ios_framework_bundle") {
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +01001358 deps = [ "../sdk:framework_objc" ]
1359 sources = [ "$root_build_dir/WebRTC.framework" ]
1360 outputs = [ "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001361 }
1362 }
1363
1364 if (is_mac) {
Byoungchan Lee26b23b82022-04-08 18:23:14 +09001365 apple_framework_bundle_with_umbrella_header("mac_framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001366 info_plist = "objc/Info.plist"
1367 output_name = "WebRTC"
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001368
Anders Carlsson37bbf792018-09-05 16:29:27 +02001369 sources = [
1370 "objc/api/peerconnection/RTCAudioSource.h",
1371 "objc/api/peerconnection/RTCAudioTrack.h",
1372 "objc/api/peerconnection/RTCCertificate.h",
1373 "objc/api/peerconnection/RTCConfiguration.h",
Benjamin Wright8c27cca2018-10-25 10:16:44 -07001374 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001375 "objc/api/peerconnection/RTCDataChannel.h",
1376 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1377 "objc/api/peerconnection/RTCDtmfSender.h",
1378 "objc/api/peerconnection/RTCFieldTrials.h",
1379 "objc/api/peerconnection/RTCIceCandidate.h",
Jaehyun Kod2110982021-11-30 19:01:43 +09001380 "objc/api/peerconnection/RTCIceCandidateErrorEvent.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001381 "objc/api/peerconnection/RTCIceServer.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001382 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1383 "objc/api/peerconnection/RTCMediaConstraints.h",
1384 "objc/api/peerconnection/RTCMediaSource.h",
1385 "objc/api/peerconnection/RTCMediaStream.h",
1386 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1387 "objc/api/peerconnection/RTCMetrics.h",
1388 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1389 "objc/api/peerconnection/RTCPeerConnection.h",
1390 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1391 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1392 "objc/api/peerconnection/RTCRtcpParameters.h",
1393 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1394 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1395 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1396 "objc/api/peerconnection/RTCRtpParameters.h",
1397 "objc/api/peerconnection/RTCRtpReceiver.h",
1398 "objc/api/peerconnection/RTCRtpSender.h",
1399 "objc/api/peerconnection/RTCRtpTransceiver.h",
1400 "objc/api/peerconnection/RTCSSLAdapter.h",
1401 "objc/api/peerconnection/RTCSessionDescription.h",
Saúl Ibarra Corretgéf7aa2672021-07-28 23:09:14 +02001402 "objc/api/peerconnection/RTCStatisticsReport.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001403 "objc/api/peerconnection/RTCTracing.h",
1404 "objc/api/peerconnection/RTCVideoSource.h",
1405 "objc/api/peerconnection/RTCVideoTrack.h",
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +03001406 "objc/api/video_codec/RTCVideoDecoderAV1.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001407 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1408 "objc/api/video_codec/RTCVideoDecoderVP9.h",
Yura Yaroshevich8cfb2872021-03-03 12:29:42 +03001409 "objc/api/video_codec/RTCVideoEncoderAV1.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001410 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1411 "objc/api/video_codec/RTCVideoEncoderVP9.h",
1412 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1413 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
1414 "objc/base/RTCCodecSpecificInfo.h",
1415 "objc/base/RTCEncodedImage.h",
1416 "objc/base/RTCI420Buffer.h",
1417 "objc/base/RTCLogging.h",
1418 "objc/base/RTCMacros.h",
1419 "objc/base/RTCMutableI420Buffer.h",
1420 "objc/base/RTCMutableYUVPlanarBuffer.h",
Yury Yaroshevich19a6e942022-03-11 09:22:08 +01001421 "objc/base/RTCSSLCertificateVerifier.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001422 "objc/base/RTCVideoCapturer.h",
1423 "objc/base/RTCVideoCodecInfo.h",
1424 "objc/base/RTCVideoDecoder.h",
1425 "objc/base/RTCVideoDecoderFactory.h",
1426 "objc/base/RTCVideoEncoder.h",
1427 "objc/base/RTCVideoEncoderFactory.h",
1428 "objc/base/RTCVideoEncoderQpThresholds.h",
1429 "objc/base/RTCVideoEncoderSettings.h",
1430 "objc/base/RTCVideoFrame.h",
1431 "objc/base/RTCVideoFrameBuffer.h",
1432 "objc/base/RTCVideoRenderer.h",
1433 "objc/base/RTCYUVPlanarBuffer.h",
1434 "objc/components/capturer/RTCCameraVideoCapturer.h",
1435 "objc/components/capturer/RTCFileVideoCapturer.h",
1436 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
1437 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
1438 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1439 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1440 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1441 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1442 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1443 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1444 "objc/components/video_codec/RTCVideoDecoderH264.h",
1445 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1446 "objc/components/video_codec/RTCVideoEncoderH264.h",
1447 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1448 "objc/helpers/RTCDispatcher.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001449 ]
Anders Carlsson37bbf792018-09-05 16:29:27 +02001450 if (!build_with_chromium) {
1451 sources += [
1452 "objc/api/logging/RTCCallbackLogger.h",
1453 "objc/api/peerconnection/RTCFileLogger.h",
1454 ]
1455 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001456
1457 deps = [
1458 ":base_objc",
1459 ":default_codec_factory_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001460 ":native_api",
1461 ":native_video",
Jordan Rose53d3fc92021-07-06 12:16:41 -07001462 ":opengl_ui_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001463 ":peerconnectionfactory_base_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001464 ":videocapture_objc",
1465 ":videocodec_objc",
1466 ":videotoolbox_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001467 ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001468 if (!build_with_chromium) {
1469 deps += [
1470 ":callback_logger_objc",
1471 ":file_logger_objc",
1472 ]
1473 }
1474
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +02001475 frameworks = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001476 "AVFoundation.framework",
1477 "CoreGraphics.framework",
1478 "CoreMedia.framework",
1479 "OpenGL.framework",
1480 ]
1481
Anders Carlsson37bbf792018-09-05 16:29:27 +02001482 configs = [ "..:common_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001483
1484 public_configs = [ ":common_config_objc" ]
1485 }
1486
1487 bundle_data("mac_framework_bundle") {
Danil Chapovalov64f1f3f2020-01-16 14:41:10 +01001488 deps = [ "../sdk:mac_framework_objc" ]
1489 sources = [ "$root_build_dir/WebRTC.framework" ]
1490 outputs = [ "{{bundle_contents_dir}}/Frameworks/{{source_file_part}}" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001491 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001492 }
1493
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001494 rtc_library("wrapped_native_codec_objc") {
Anders Carlsson9823ee42018-03-07 10:32:03 +01001495 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001496 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.h",
1497 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm",
1498 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.h",
1499 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001500 ]
1501
1502 configs += [ "..:common_objc" ]
1503 public_configs = [ ":common_config_objc" ]
1504
Anders Carlsson9823ee42018-03-07 10:32:03 +01001505 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001506 ":base_objc",
1507 ":helpers_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001508 "../api/video_codecs:video_codecs_api",
1509 "../media:rtc_media_base",
1510 ]
1511 }
1512
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001513 # The native API is currently experimental and may change without notice.
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001514 rtc_library("native_api") {
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001515 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +01001516 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001517 sources = [
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001518 "objc/native/api/network_monitor_factory.h",
1519 "objc/native/api/network_monitor_factory.mm",
Yury Yaroshevich19a6e942022-03-11 09:22:08 +01001520 "objc/native/api/ssl_certificate_verifier.h",
1521 "objc/native/api/ssl_certificate_verifier.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001522 "objc/native/api/video_capturer.h",
1523 "objc/native/api/video_capturer.mm",
1524 "objc/native/api/video_decoder_factory.h",
1525 "objc/native/api/video_decoder_factory.mm",
1526 "objc/native/api/video_encoder_factory.h",
1527 "objc/native/api/video_encoder_factory.mm",
1528 "objc/native/api/video_frame.h",
1529 "objc/native/api/video_frame.mm",
1530 "objc/native/api/video_frame_buffer.h",
1531 "objc/native/api/video_frame_buffer.mm",
1532 "objc/native/api/video_renderer.h",
1533 "objc/native/api/video_renderer.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001534 ]
1535
1536 configs += [ "..:common_objc" ]
1537
1538 public_configs = [ ":common_config_objc" ]
1539
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001540 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001541 ":base_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001542 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001543 ":videoframebuffer_objc",
Anders Carlsson73119182018-03-15 09:41:03 +01001544 "../api:libjingle_peerconnection_api",
Niels Möller105711e2022-06-14 15:48:26 +02001545 "../api:make_ref_counted",
Niels Möllere942b142019-09-17 14:30:41 +02001546 "../api:media_stream_interface",
Mirko Bonadeid9708072019-01-25 20:26:48 +01001547 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001548 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +02001549 "../api/video:video_rtp_headers",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001550 "../api/video_codecs:video_codecs_api",
1551 "../common_video",
Artem Titov94b57c02019-03-21 13:35:10 +01001552 "../rtc_base",
Florent Castelli3a9e6872022-04-26 22:54:59 +02001553 "../rtc_base:buffer",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001554 "../rtc_base:logging",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001555 "../rtc_base:threading",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001556 ]
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001557 if (is_ios) {
1558 deps += [ ":native_network_monitor" ]
1559 }
Mirko Bonadei2dcf3482020-06-05 14:30:41 +02001560 absl_deps = [ "//third_party/abseil-cpp/absl/memory" ]
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001561 }
1562
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001563 if (is_ios) {
1564 rtc_library("native_network_monitor") {
1565 visibility = [ "*" ]
1566
1567 sources = [
1568 "objc/native/src/objc_network_monitor.h",
1569 "objc/native/src/objc_network_monitor.mm",
1570 ]
1571
1572 deps = [
1573 ":network_monitor_objc",
1574 ":network_monitor_observer",
Jonas Orelande62c2f22022-03-29 11:04:48 +02001575 "../api:field_trials_view",
Artem Titovd15a5752021-02-10 14:31:24 +01001576 "../api:sequence_checker",
Artem Titovc374d112022-06-16 21:27:45 +02001577 "../api/task_queue:pending_task_safety_flag",
1578 "../api/task_queue:to_queued_task",
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001579 "../rtc_base",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001580 "../rtc_base:logging",
Florent Castelli4467ad72022-04-04 15:18:46 +02001581 "../rtc_base:macromagic",
Florent Castelli57aa81b2022-04-04 17:14:02 +02001582 "../rtc_base:stringutils",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001583 "../rtc_base:threading",
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001584 ]
Ali Tofigh7fa90572022-03-17 15:47:49 +01001585
1586 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
Taylor Brandstetterea7fbfb2020-08-19 16:41:54 -07001587 }
1588 }
1589
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001590 rtc_library("native_video") {
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001591 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001592 "objc/native/src/objc_frame_buffer.h",
1593 "objc/native/src/objc_frame_buffer.mm",
1594 "objc/native/src/objc_video_decoder_factory.h",
1595 "objc/native/src/objc_video_decoder_factory.mm",
1596 "objc/native/src/objc_video_encoder_factory.h",
1597 "objc/native/src/objc_video_encoder_factory.mm",
1598 "objc/native/src/objc_video_frame.h",
1599 "objc/native/src/objc_video_frame.mm",
1600 "objc/native/src/objc_video_renderer.h",
1601 "objc/native/src/objc_video_renderer.mm",
1602 "objc/native/src/objc_video_track_source.h",
1603 "objc/native/src/objc_video_track_source.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001604 ]
1605
1606 configs += [ "..:common_objc" ]
1607
1608 public_configs = [ ":common_config_objc" ]
1609
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001610 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001611 ":base_native_additions_objc",
1612 ":base_objc",
1613 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001614 ":videocodec_objc",
1615 ":videoframebuffer_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001616 ":vpx_codec_constants",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001617 ":wrapped_native_codec_objc",
Niels Möller105711e2022-06-14 15:48:26 +02001618 "../api:make_ref_counted",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001619 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +02001620 "../api/video:video_rtp_headers",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001621 "../api/video_codecs:video_codecs_api",
1622 "../common_video",
1623 "../media:rtc_audio_video",
1624 "../media:rtc_media_base",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001625 "../modules/video_coding:video_codec_interface",
Artem Titov94b57c02019-03-21 13:35:10 +01001626 "../rtc_base",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001627 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001628 "../rtc_base:logging",
Florent Castellib1dc4e42022-04-14 13:20:12 +02001629 "../rtc_base:timestamp_aligner",
Florent Castellidd837e22022-04-04 17:16:15 +02001630 "../rtc_base:timeutils",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001631 ]
1632 }
1633
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001634 rtc_library("video_toolbox_cc") {
Artem Titarenko42b43152018-10-29 18:18:09 +01001635 visibility = [
Mirko Bonadei08574ae2020-09-16 07:22:57 +00001636 ":sdk_unittests_sources",
Mirko Bonadeiaef8a212020-09-16 15:09:53 +02001637 ":videotoolbox_objc",
Artem Titarenko42b43152018-10-29 18:18:09 +01001638 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001639 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001640 "objc/components/video_codec/helpers.cc",
1641 "objc/components/video_codec/helpers.h",
1642 "objc/components/video_codec/nalu_rewriter.cc",
1643 "objc/components/video_codec/nalu_rewriter.h",
mbonadeic0af5ac2017-08-24 12:26:05 -07001644 ]
1645 deps = [
1646 "../common_video",
mbonadeic0af5ac2017-08-24 12:26:05 -07001647 "../modules/video_coding:webrtc_h264",
Florent Castelli3a9e6872022-04-26 22:54:59 +02001648 "../rtc_base:buffer",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001649 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001650 "../rtc_base:logging",
mbonadeic0af5ac2017-08-24 12:26:05 -07001651 ]
mbonadeic0af5ac2017-08-24 12:26:05 -07001652 }
1653
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001654 rtc_library("videotoolbox_objc") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001655 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +01001656 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadeic0af5ac2017-08-24 12:26:05 -07001657 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001658 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1659 "objc/components/video_codec/RTCVideoDecoderFactoryH264.m",
1660 "objc/components/video_codec/RTCVideoDecoderH264.h",
1661 "objc/components/video_codec/RTCVideoDecoderH264.mm",
1662 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1663 "objc/components/video_codec/RTCVideoEncoderFactoryH264.m",
1664 "objc/components/video_codec/RTCVideoEncoderH264.h",
1665 "objc/components/video_codec/RTCVideoEncoderH264.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001666 ]
1667
Anders Carlsson358f2e02018-06-04 10:24:37 +02001668 configs += [
1669 "..:common_objc",
1670 ":used_from_extension",
1671 ]
1672
1673 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
1674 defines = [ "RTC_APPRTCMOBILE_BROADCAST_EXTENSION" ]
1675 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001676
1677 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001678 ":base_native_additions_objc",
1679 ":base_objc",
1680 ":helpers_objc",
mbonadeic0af5ac2017-08-24 12:26:05 -07001681 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001682 ":videocodec_objc",
1683 ":videoframebuffer_objc",
Johannes Kronc3fcee72021-04-19 09:09:26 +02001684 "../api/video_codecs:video_codecs_api",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001685 "../common_video",
Patrik Höglund99175c62018-01-08 11:05:10 +01001686 "../modules/video_coding:video_codec_interface",
Florent Castelli3a9e6872022-04-26 22:54:59 +02001687 "../rtc_base:buffer",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001688 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001689 "../rtc_base:logging",
Florent Castellidd837e22022-04-04 17:16:15 +02001690 "../rtc_base:timeutils",
Mirko Bonadei401d0562017-12-14 11:24:00 +01001691 "//third_party/libyuv",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001692 ]
1693
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +02001694 frameworks = [
mbonadei2c8ac1b2017-05-31 05:14:26 -07001695 "CoreFoundation.framework",
1696 "CoreMedia.framework",
1697 "CoreVideo.framework",
1698 "VideoToolbox.framework",
1699 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001700 }
1701 }
tkchin9eeb6242016-04-27 01:54:20 -07001702}