blob: 255dc432041c67e884f057637b8df7e52f034186 [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
Niels Möllerdac03d92019-02-13 08:52:27 +010030rtc_source_set("media_constraints") {
31 sources = [
32 "media_constraints.cc",
33 "media_constraints.h",
34 ]
35 deps = [
36 "../api:audio_options_api",
37 "../api:libjingle_peerconnection_api",
38 "//third_party/abseil-cpp/absl/types:optional",
39 ]
40}
41
42rtc_source_set("sdk_tests") {
43 testonly = true
44 sources = [
45 "media_constraints_unittest.cc",
46 ]
47 deps = [
48 ":media_constraints",
49 "../test:test_support",
50 ]
51}
52
kthelgasoncc2d1c62016-11-09 07:44:27 -080053if (is_ios || is_mac) {
kthelgason36d658d2017-08-24 05:43:45 -070054 config("common_config_objc") {
kjellander080a1e32016-05-25 11:37:11 -070055 include_dirs = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020056 "objc",
57
58 # This is needed so that framework headers can include base headers
59 # without pathname (so it works from within the framework module).
60 "objc/base",
61
62 # This is here for backward compatiblity reasons.
63 "objc/Framework/Headers", # TODO(bugs.webrtc.org/9627): Remove this.
kjellander080a1e32016-05-25 11:37:11 -070064 ]
Kári Tristan Helgason47d3a012017-10-24 15:28:51 +020065 cflags = [
Jiawei Ou4aeb35b2018-11-09 13:55:45 -080066 "-Wimplicit-retain-self",
Kári Tristan Helgason47d3a012017-10-24 15:28:51 +020067 "-Wstrict-overflow",
68 "-Wmissing-field-initializers",
69 ]
Artem Titarenko17ad64e2018-09-19 17:53:59 +020070
71 if (use_clang_coverage) {
72 configs = [ "//build/config/coverage:default_coverage" ]
73 }
kjellander080a1e32016-05-25 11:37:11 -070074 }
75
Anders Carlsson358f2e02018-06-04 10:24:37 +020076 config("used_from_extension") {
77 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
78 cflags = [ "-fapplication-extension" ]
79 }
80 }
81
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020082 # TODO(bugs.webrtc.org/9627): Remove this when unused. Targets should depend on base_objc
83 # or helpers_objc directly instead.
kthelgason36d658d2017-08-24 05:43:45 -070084 rtc_static_library("common_objc") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +020085 visibility = [ "*" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020086
tkchin9eeb6242016-04-27 01:54:20 -070087 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020088 "objc/helpers/noop.mm",
89 ]
90
91 public_configs = [ ":common_config_objc" ]
92
93 deps = [
94 ":base_objc",
95 ":helpers_objc",
96 ]
97 }
98
99 rtc_static_library("base_objc") {
100 visibility = [ "*" ]
101 sources = [
102 "objc/base/RTCCodecSpecificInfo.h",
103 "objc/base/RTCEncodedImage.h",
104 "objc/base/RTCEncodedImage.m",
105 "objc/base/RTCI420Buffer.h",
106 "objc/base/RTCLogging.h",
107 "objc/base/RTCLogging.mm",
108 "objc/base/RTCMacros.h",
109 "objc/base/RTCMutableI420Buffer.h",
110 "objc/base/RTCMutableYUVPlanarBuffer.h",
111 "objc/base/RTCRtpFragmentationHeader.h",
112 "objc/base/RTCRtpFragmentationHeader.m",
113 "objc/base/RTCVideoCapturer.h",
114 "objc/base/RTCVideoCapturer.m",
115 "objc/base/RTCVideoCodecInfo.h",
116 "objc/base/RTCVideoCodecInfo.m",
117 "objc/base/RTCVideoDecoder.h",
118 "objc/base/RTCVideoDecoderFactory.h",
119 "objc/base/RTCVideoEncoder.h",
120 "objc/base/RTCVideoEncoderFactory.h",
121 "objc/base/RTCVideoEncoderQpThresholds.h",
122 "objc/base/RTCVideoEncoderQpThresholds.m",
123 "objc/base/RTCVideoEncoderSettings.h",
124 "objc/base/RTCVideoEncoderSettings.m",
125 "objc/base/RTCVideoFrame.h",
126 "objc/base/RTCVideoFrame.mm",
127 "objc/base/RTCVideoFrameBuffer.h",
128 "objc/base/RTCVideoRenderer.h",
129 "objc/base/RTCYUVPlanarBuffer.h",
tkchin9eeb6242016-04-27 01:54:20 -0700130 ]
denicijad2088152017-04-28 02:14:54 -0700131
mbonadei1e060c62017-04-21 00:02:02 -0700132 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100133 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700134 "../rtc_base:rtc_base",
mbonadei1e060c62017-04-21 00:02:02 -0700135 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200136 configs += [
137 "..:common_objc",
138 ":used_from_extension",
139 ]
kthelgasonc0977102017-04-24 00:57:16 -0700140
kthelgason36d658d2017-08-24 05:43:45 -0700141 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200142 }
143
144 rtc_static_library("helpers_objc") {
145 sources = [
146 "objc/helpers/AVCaptureSession+DevicePosition.h",
147 "objc/helpers/AVCaptureSession+DevicePosition.mm",
148 "objc/helpers/NSString+StdString.h",
149 "objc/helpers/NSString+StdString.mm",
150 "objc/helpers/RTCDispatcher+Private.h",
151 "objc/helpers/RTCDispatcher.h",
152 "objc/helpers/RTCDispatcher.m",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200153 "objc/helpers/scoped_cftyperef.h",
154 ]
155
156 deps = [
157 ":base_objc",
158 "../rtc_base:checks",
159 ]
160
161 libs = [
162 "AVFoundation.framework",
163 "CoreMedia.framework",
164 ]
165
166 configs += [
167 "..:common_objc",
168 ":used_from_extension",
169 ]
170
171 public_configs = [ ":common_config_objc" ]
denicijad2088152017-04-28 02:14:54 -0700172
kjellander3bcedd32016-06-08 01:14:15 -0700173 if (is_ios) {
174 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200175 "objc/helpers/RTCCameraPreviewView.h",
176 "objc/helpers/RTCCameraPreviewView.m",
177 "objc/helpers/UIDevice+RTCDevice.h",
178 "objc/helpers/UIDevice+RTCDevice.mm",
179 ]
180 }
181 }
182
183 if (!build_with_chromium) {
184 rtc_static_library("callback_logger_objc") {
185 sources = [
186 "objc/api/logging/RTCCallbackLogger.h",
187 "objc/api/logging/RTCCallbackLogger.mm",
188 ]
189
190 deps = [
191 ":base_objc",
192 "../rtc_base:checks",
193 "../rtc_base:logging",
194 "../rtc_base:rtc_base",
195 ]
196
197 configs += [
198 "..:common_objc",
199 ":used_from_extension",
kjellander3bcedd32016-06-08 01:14:15 -0700200 ]
denicijad2088152017-04-28 02:14:54 -0700201 }
202
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200203 rtc_static_library("file_logger_objc") {
204 sources = [
205 "objc/api/peerconnection/RTCFileLogger.h",
206 "objc/api/peerconnection/RTCFileLogger.mm",
207 ]
208
209 deps = [
210 ":base_objc",
211 "../rtc_base:checks",
212 "../rtc_base:logging",
213 "../rtc_base:rtc_base",
214 ]
215
216 configs += [
217 "..:common_objc",
218 ":used_from_extension",
kthelgason2f088792017-05-30 01:48:47 -0700219 ]
220 }
221 }
222
mbonadei2c8ac1b2017-05-31 05:14:26 -0700223 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100224 if (is_ios) {
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200225 rtc_static_library("native_api_audio_device_module") {
226 visibility = [ "*" ]
227
228 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200229 "objc/native/api/audio_device_module.h",
230 "objc/native/api/audio_device_module.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200231 ]
232
233 deps = [
234 ":audio_device",
235 "../modules/audio_device:audio_device_api",
236 "../modules/audio_device:audio_device_generic",
237 "../rtc_base:checks",
238 "../rtc_base:rtc_base_approved",
239 "../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
246 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200247 "objc/native/src/audio/audio_session_observer.h",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200248 ]
249
250 deps = [
251 "../rtc_base:rtc_base",
252 ]
253 }
254
255 rtc_static_library("audio_device") {
256 visibility = [ "*" ]
257
258 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200259 "objc/native/src/audio/audio_device_ios.h",
260 "objc/native/src/audio/audio_device_ios.mm",
261 "objc/native/src/audio/audio_device_module_ios.h",
262 "objc/native/src/audio/audio_device_module_ios.mm",
263 "objc/native/src/audio/helpers.h",
264 "objc/native/src/audio/helpers.mm",
265 "objc/native/src/audio/voice_processing_audio_unit.h",
266 "objc/native/src/audio/voice_processing_audio_unit.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200267 ]
268
269 deps = [
270 ":audio_objc",
271 ":audio_session_observer",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200272 ":base_objc",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200273 "../api:array_view",
274 "../modules/audio_device:audio_device_api",
275 "../modules/audio_device:audio_device_buffer",
276 "../modules/audio_device:audio_device_generic",
277 "../rtc_base:checks",
278 "../rtc_base:rtc_base",
279 "../rtc_base/system:fallthrough",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200280 "../system_wrappers:metrics",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200281 ]
282
Jiawei Ouc9e6b962018-10-09 12:33:06 -0700283 libs = [ "AudioToolbox.framework" ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200284 }
285
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100286 rtc_static_library("audio_objc") {
287 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200288 "objc/components/audio/RTCAudioSession+Configuration.mm",
289 "objc/components/audio/RTCAudioSession+Private.h",
290 "objc/components/audio/RTCAudioSession.h",
291 "objc/components/audio/RTCAudioSession.mm",
292 "objc/components/audio/RTCAudioSessionConfiguration.h",
293 "objc/components/audio/RTCAudioSessionConfiguration.m",
294 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.h",
295 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100296 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200297 configs += [
298 "..:common_objc",
299 ":used_from_extension",
300 ]
denicija59ee91b2017-06-05 05:48:47 -0700301
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100302 public_configs = [ ":common_config_objc" ]
Anders Carlsson8ecfd802017-09-15 14:07:30 +0200303
Jiawei Ouc9e6b962018-10-09 12:33:06 -0700304 libs = [ "AVFoundation.framework" ]
305
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100306 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200307 ":audio_session_observer",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200308 ":base_objc",
309 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100310 "../rtc_base:checks",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200311 "../rtc_base:rtc_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100312 "../rtc_base:rtc_base_approved",
313 ]
denicija59ee91b2017-06-05 05:48:47 -0700314 }
315 }
zhihuanga4c113a2017-06-28 14:05:44 -0700316
Anders Carlsson9823ee42018-03-07 10:32:03 +0100317 rtc_static_library("videosource_objc") {
zhihuanga4c113a2017-06-28 14:05:44 -0700318 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200319 "objc/api/peerconnection/RTCVideoSource+Private.h",
320 "objc/api/peerconnection/RTCVideoSource.h",
321 "objc/api/peerconnection/RTCVideoSource.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700322 ]
323
324 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200325 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100326 ":mediasource_objc",
327 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100328 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700329 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200330 "../api/video:video_frame",
331 "../api/video:video_frame_i420",
zhihuanga4c113a2017-06-28 14:05:44 -0700332 "../common_video",
333 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100334 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700335 "../rtc_base:rtc_base",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100336 "//third_party/libyuv",
zhihuanga4c113a2017-06-28 14:05:44 -0700337 ]
338
Anders Carlsson358f2e02018-06-04 10:24:37 +0200339 configs += [
340 "..:common_objc",
341 ":used_from_extension",
342 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700343 }
344
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100345 rtc_static_library("videoframebuffer_objc") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200346 visibility = [ "*" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100347 sources = [
Anders Carlsson4e5af962018-09-03 14:44:50 +0200348 "objc/api/video_frame_buffer/RTCNativeI420Buffer+Private.h",
349 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
350 "objc/api/video_frame_buffer/RTCNativeI420Buffer.mm",
351 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
352 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200353 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
354 "objc/components/video_frame_buffer/RTCCVPixelBuffer.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100355 ]
356 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200357 ":base_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200358 "//api/video:video_frame",
359 "//api/video:video_frame_i420",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100360 "//common_video",
361 "//rtc_base:checks",
362 "//rtc_base:rtc_base_approved",
363 "//third_party/libyuv",
364 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200365 configs += [
366 "..:common_objc",
367 ":used_from_extension",
368 ]
Kári Tristan Helgason8a1e35c2019-03-07 10:44:26 +0100369 libs = [
370 "VideoToolbox.framework",
371 "CoreVideo.framework",
372 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100373 }
374
kthelgason36d658d2017-08-24 05:43:45 -0700375 rtc_static_library("video_objc") {
kthelgason2f088792017-05-30 01:48:47 -0700376 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200377 "objc/components/renderer/opengl/RTCDefaultShader.h",
378 "objc/components/renderer/opengl/RTCDefaultShader.mm",
379 "objc/components/renderer/opengl/RTCI420TextureCache.h",
380 "objc/components/renderer/opengl/RTCI420TextureCache.mm",
381 "objc/components/renderer/opengl/RTCOpenGLDefines.h",
382 "objc/components/renderer/opengl/RTCShader.h",
383 "objc/components/renderer/opengl/RTCShader.mm",
384 "objc/components/renderer/opengl/RTCVideoViewShading.h",
kthelgason2f088792017-05-30 01:48:47 -0700385 ]
Kári Tristan Helgason8a1e35c2019-03-07 10:44:26 +0100386 libs = [ "CoreVideo.framework" ]
denicijad2088152017-04-28 02:14:54 -0700387 if (is_ios) {
denicija070d5e32017-02-26 11:44:13 -0800388 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200389 "objc/components/renderer/opengl/RTCNV12TextureCache.h",
390 "objc/components/renderer/opengl/RTCNV12TextureCache.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700391 ]
392 libs += [
393 "GLKit.framework",
394 "OpenGLES.framework",
395 "QuartzCore.framework",
396 ]
397 } else if (is_mac) {
mbonadei2c8ac1b2017-05-31 05:14:26 -0700398 libs += [
399 "CoreMedia.framework",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700400 "OpenGL.framework",
denicija070d5e32017-02-26 11:44:13 -0800401 ]
402 }
mbonadei2c8ac1b2017-05-31 05:14:26 -0700403
kthelgason2f088792017-05-30 01:48:47 -0700404 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200405 ":base_objc",
406 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100407 ":mediaconstraints_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100408 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100409 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100410 ":videosource_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700411 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200412 "../api/video:video_frame",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700413 "../common_video",
414 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100415 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700416 "../rtc_base:rtc_base",
Danil Chapovalov196100e2018-06-21 10:17:24 +0200417 "//third_party/abseil-cpp/absl/types:optional",
tkchin9eeb6242016-04-27 01:54:20 -0700418 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700419
Anders Carlsson358f2e02018-06-04 10:24:37 +0200420 configs += [
421 "..:common_objc",
422 ":used_from_extension",
423 ]
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800424 }
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800425
kthelgason36d658d2017-08-24 05:43:45 -0700426 rtc_static_library("ui_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000427 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100428 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadei2c8ac1b2017-05-31 05:14:26 -0700429 if (is_ios) {
430 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200431 "objc/components/renderer/opengl/RTCDisplayLinkTimer.h",
432 "objc/components/renderer/opengl/RTCDisplayLinkTimer.m",
433 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
434 "objc/components/renderer/opengl/RTCEAGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700435 ]
436 }
437 if (is_mac) {
438 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200439 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
440 "objc/components/renderer/opengl/RTCNSGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700441 ]
442 }
443 configs += [ "..:common_objc" ]
444 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200445 ":base_objc",
446 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100447 ":video_objc",
448 ":videocapture_objc",
449 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700450 ]
451 }
kthelgasonebc34e72016-09-15 04:30:18 -0700452
mbonadei2c8ac1b2017-05-31 05:14:26 -0700453 if (rtc_use_metal_rendering) {
kthelgason36d658d2017-08-24 05:43:45 -0700454 rtc_static_library("metal_objc") {
Mirko Bonadeid68956d2018-02-16 17:55:36 +0100455 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100456 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadei2c8ac1b2017-05-31 05:14:26 -0700457 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200458 "objc/components/renderer/metal/RTCMTLI420Renderer.h",
459 "objc/components/renderer/metal/RTCMTLI420Renderer.mm",
460 "objc/components/renderer/metal/RTCMTLRenderer+Private.h",
461 "objc/components/renderer/metal/RTCMTLRenderer.h",
462 "objc/components/renderer/metal/RTCMTLRenderer.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700463 ]
464 if (is_ios) {
465 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200466 "objc/components/renderer/metal/RTCMTLNV12Renderer.h",
467 "objc/components/renderer/metal/RTCMTLNV12Renderer.mm",
468 "objc/components/renderer/metal/RTCMTLRGBRenderer.h",
469 "objc/components/renderer/metal/RTCMTLRGBRenderer.mm",
470 "objc/components/renderer/metal/RTCMTLVideoView.h",
471 "objc/components/renderer/metal/RTCMTLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700472 ]
473 }
474 if (is_mac) {
475 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200476 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
477 "objc/components/renderer/metal/RTCMTLNSVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700478 ]
479 }
480 libs = [
481 "CoreVideo.framework",
482 "Metal.framework",
483 "MetalKit.framework",
484 ]
485 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200486 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100487 ":peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700488 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100489 ":videoframebuffer_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200490 "../api/video:video_frame",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100491 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700492 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700493 ]
494 configs += [ "..:common_objc" ]
kthelgason36d658d2017-08-24 05:43:45 -0700495 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700496 }
497 }
498
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200499 # TODO(bugs.webrtc.org/9627): Remove this target.
Anders Carlsson73119182018-03-15 09:41:03 +0100500 rtc_static_library("videocapturebase_objc") {
501 visibility = [ "*" ]
502 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200503 "objc/helpers/noop.mm",
Anders Carlsson73119182018-03-15 09:41:03 +0100504 ]
Anders Carlsson73119182018-03-15 09:41:03 +0100505
506 configs += [ "..:common_objc" ]
507
508 public_configs = [ ":common_config_objc" ]
509
510 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200511 ":base_objc",
Anders Carlsson73119182018-03-15 09:41:03 +0100512 ":videoframebuffer_objc",
513 ]
514 }
515
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100516 rtc_static_library("videocapture_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000517 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100518 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadei2c8ac1b2017-05-31 05:14:26 -0700519 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200520 "objc/components/capturer/RTCCameraVideoCapturer.h",
521 "objc/components/capturer/RTCCameraVideoCapturer.m",
zhihuanga4c113a2017-06-28 14:05:44 -0700522 ]
523 if (is_ios) {
524 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200525 "objc/components/capturer/RTCFileVideoCapturer.h",
526 "objc/components/capturer/RTCFileVideoCapturer.m",
zhihuanga4c113a2017-06-28 14:05:44 -0700527 ]
528 }
Kári Tristan Helgason8a1e35c2019-03-07 10:44:26 +0100529 libs = [
530 "AVFoundation.framework",
531 "CoreVideo.framework",
532 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700533
zhihuanga4c113a2017-06-28 14:05:44 -0700534 configs += [ "..:common_objc" ]
535
kthelgason36d658d2017-08-24 05:43:45 -0700536 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700537
zhihuanga4c113a2017-06-28 14:05:44 -0700538 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200539 ":base_objc",
540 ":helpers_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700541 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100542 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700543 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700544 }
545
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100546 rtc_static_library("videocodec_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200547 visibility = [ "*" ]
Mirko Bonadei96ede162018-09-06 13:45:44 +0200548 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100549 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200550 "objc/components/video_codec/RTCCodecSpecificInfoH264+Private.h",
551 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
552 "objc/components/video_codec/RTCCodecSpecificInfoH264.mm",
553 "objc/components/video_codec/RTCH264ProfileLevelId.h",
554 "objc/components/video_codec/RTCH264ProfileLevelId.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700555 ]
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300556 if (is_ios) {
557 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200558 "objc/components/video_codec/UIDevice+H264Profile.h",
559 "objc/components/video_codec/UIDevice+H264Profile.mm",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300560 ]
561 }
Mirko Bonadeifc52b912019-03-01 10:32:56 +0100562
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100563 public_configs = [ ":common_config_objc" ]
564 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200565 ":base_objc",
566 ":helpers_objc",
kthelgasonfb143122017-07-25 07:55:58 -0700567 "../api/video_codecs:video_codecs_api",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100568 "../common_video",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300569 "../media:rtc_h264_profile_id",
zhihuanga4c113a2017-06-28 14:05:44 -0700570 "../media:rtc_media_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100571 "../modules:module_api",
572 "../modules/video_coding:video_codec_interface",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200573 "../rtc_base:checks",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100574 "../rtc_base:rtc_base_approved",
zhihuanga4c113a2017-06-28 14:05:44 -0700575 ]
576 }
577
Anders Carlssondd8c1652018-01-30 10:32:13 +0100578 rtc_static_library("default_codec_factory_objc") {
579 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200580 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
581 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.m",
582 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
583 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.m",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100584 ]
585
586 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200587 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100588 ":native_video",
589 ":videocodec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200590 ":videotoolbox_objc",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +0200591 ":vp8",
592 ":vp9",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200593 ":vpx_codec_constants",
594 ]
595 }
596
597 rtc_static_library("vpx_codec_constants") {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200598 configs += [ "..:no_global_constructors" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200599 sources = [
600 "objc/api/video_codec/RTCVideoCodecConstants.h",
601 "objc/api/video_codec/RTCVideoCodecConstants.mm",
602 ]
603
604 deps = [
605 ":base_objc",
606 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100607 ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100608 }
609
610 rtc_static_library("vp8") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100611 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200612 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100613 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200614 "objc/api/video_codec/RTCVideoDecoderVP8.h",
615 "objc/api/video_codec/RTCVideoDecoderVP8.mm",
616 "objc/api/video_codec/RTCVideoEncoderVP8.h",
617 "objc/api/video_codec/RTCVideoEncoderVP8.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100618 ]
619
Anders Carlssondd8c1652018-01-30 10:32:13 +0100620 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200621 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100622 ":wrapped_native_codec_objc",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100623 "../modules/video_coding:webrtc_vp8",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100624 ]
625 }
626
627 rtc_static_library("vp9") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100628 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200629 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100630 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200631 "objc/api/video_codec/RTCVideoDecoderVP9.h",
632 "objc/api/video_codec/RTCVideoDecoderVP9.mm",
633 "objc/api/video_codec/RTCVideoEncoderVP9.h",
634 "objc/api/video_codec/RTCVideoEncoderVP9.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100635 ]
636
Anders Carlssondd8c1652018-01-30 10:32:13 +0100637 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200638 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100639 ":wrapped_native_codec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200640 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100641 "../modules/video_coding:webrtc_vp9",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100642 ]
643 }
644
zhihuanga4c113a2017-06-28 14:05:44 -0700645 # Build the PeerConnectionFactory without audio/video support.
646 # This target depends on the objc_peeerconnectionfactory_base which still
647 # includes some audio/video related objects such as RTCAudioSource because
648 # these objects are just thin wrappers of native C++ interfaces required
649 # when implementing webrtc::PeerConnectionFactoryInterface and
650 # webrtc::PeerConnectionInterface.
Kári Tristan Helgasona2d89fc2018-03-06 10:18:43 +0100651 # The applications which only use WebRTC DataChannel can depend on this.
kthelgason36d658d2017-08-24 05:43:45 -0700652 rtc_static_library("peerconnectionfactory_no_media_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000653 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100654 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
zhihuanga4c113a2017-06-28 14:05:44 -0700655 defines = [ "HAVE_NO_MEDIA" ]
656
657 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200658 "objc/helpers/noop.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700659 ]
660
kthelgason36d658d2017-08-24 05:43:45 -0700661 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700662
zhihuanga4c113a2017-06-28 14:05:44 -0700663 deps = [
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100664 ":native_api",
665 ":native_video",
kthelgason36d658d2017-08-24 05:43:45 -0700666 ":peerconnectionfactory_base_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700667 "../api:libjingle_peerconnection_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700668 "../rtc_base:rtc_base",
zhihuanga4c113a2017-06-28 14:05:44 -0700669 ]
670 }
671
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100672 rtc_static_library("mediaconstraints_objc") {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200673 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100674 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200675 "objc/api/peerconnection/RTCMediaConstraints+Private.h",
676 "objc/api/peerconnection/RTCMediaConstraints.h",
677 "objc/api/peerconnection/RTCMediaConstraints.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100678 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100679
680 public_configs = [ ":common_config_objc" ]
681 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200682 ":base_objc",
683 ":helpers_objc",
Niels Möllerdac03d92019-02-13 08:52:27 +0100684 ":media_constraints",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100685 ]
686 }
687
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200688 # TODO(bugs.webrtc.org/9627): Remove, targets should depend on base_objc.
Anders Carlsson9823ee42018-03-07 10:32:03 +0100689 rtc_source_set("videorenderer_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200690 visibility = [ "*" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100691 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200692 "objc/helpers/noop.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100693 ]
694
695 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100696 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200697
698 deps = [
699 ":base_objc",
700 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100701 }
702
703 rtc_static_library("videorendereradapter_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200704 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100705 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Anders Carlsson9823ee42018-03-07 10:32:03 +0100706 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200707 "objc/api/RTCVideoRendererAdapter+Private.h",
708 "objc/api/RTCVideoRendererAdapter.h",
709 "objc/api/RTCVideoRendererAdapter.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100710 ]
711
712 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100713 public_configs = [ ":common_config_objc" ]
714
715 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200716 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100717 ":native_api",
718 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100719 "../api:libjingle_peerconnection_api",
720 ]
721 }
722
723 rtc_static_library("mediasource_objc") {
724 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200725 "objc/api/peerconnection/RTCMediaSource+Private.h",
726 "objc/api/peerconnection/RTCMediaSource.h",
727 "objc/api/peerconnection/RTCMediaSource.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100728 ]
729
Anders Carlsson358f2e02018-06-04 10:24:37 +0200730 configs += [
731 "..:common_objc",
732 ":used_from_extension",
733 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100734 public_configs = [ ":common_config_objc" ]
735
736 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200737 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100738 "../api:libjingle_peerconnection_api",
739 "../rtc_base:checks",
740 ]
741 }
742
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200743 rtc_static_library("base_native_additions_objc") {
744 sources = [
745 "objc/api/peerconnection/RTCEncodedImage+Private.h",
746 "objc/api/peerconnection/RTCEncodedImage+Private.mm",
747 "objc/api/peerconnection/RTCRtpFragmentationHeader+Private.h",
748 "objc/api/peerconnection/RTCRtpFragmentationHeader+Private.mm",
749 "objc/api/peerconnection/RTCVideoCodecInfo+Private.h",
750 "objc/api/peerconnection/RTCVideoCodecInfo+Private.mm",
751 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.h",
752 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.mm",
753 ]
754
755 configs += [ "..:common_objc" ]
756
757 public_configs = [ ":common_config_objc" ]
758
759 deps = [
760 ":base_objc",
761 ":helpers_objc",
Niels Möller4dc66c52018-10-05 14:17:58 +0200762 "../api/video:encoded_image",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200763 "../api/video_codecs:video_codecs_api",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200764 "../modules:module_api",
765 "../modules/video_coding:video_codec_interface",
766 "../rtc_base:rtc_base",
767 ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200768 }
769
kthelgason36d658d2017-08-24 05:43:45 -0700770 rtc_static_library("peerconnectionfactory_base_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200771 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100772 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Mirko Bonadei96ede162018-09-06 13:45:44 +0200773 configs += [
774 "..:no_exit_time_destructors",
775 "..:no_global_constructors",
776 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700777 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200778 "objc/api/peerconnection/RTCAudioSource+Private.h",
779 "objc/api/peerconnection/RTCAudioSource.h",
780 "objc/api/peerconnection/RTCAudioSource.mm",
781 "objc/api/peerconnection/RTCAudioTrack+Private.h",
782 "objc/api/peerconnection/RTCAudioTrack.h",
783 "objc/api/peerconnection/RTCAudioTrack.mm",
784 "objc/api/peerconnection/RTCCertificate.h",
785 "objc/api/peerconnection/RTCCertificate.mm",
786 "objc/api/peerconnection/RTCConfiguration+Native.h",
787 "objc/api/peerconnection/RTCConfiguration+Private.h",
788 "objc/api/peerconnection/RTCConfiguration.h",
789 "objc/api/peerconnection/RTCConfiguration.mm",
Benjamin Wright8c27cca2018-10-25 10:16:44 -0700790 "objc/api/peerconnection/RTCCryptoOptions.h",
791 "objc/api/peerconnection/RTCCryptoOptions.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200792 "objc/api/peerconnection/RTCDataChannel+Private.h",
793 "objc/api/peerconnection/RTCDataChannel.h",
794 "objc/api/peerconnection/RTCDataChannel.mm",
795 "objc/api/peerconnection/RTCDataChannelConfiguration+Private.h",
796 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
797 "objc/api/peerconnection/RTCDataChannelConfiguration.mm",
798 "objc/api/peerconnection/RTCDtmfSender+Private.h",
799 "objc/api/peerconnection/RTCDtmfSender.h",
800 "objc/api/peerconnection/RTCDtmfSender.mm",
801 "objc/api/peerconnection/RTCFieldTrials.h",
802 "objc/api/peerconnection/RTCFieldTrials.mm",
803 "objc/api/peerconnection/RTCIceCandidate+Private.h",
804 "objc/api/peerconnection/RTCIceCandidate.h",
805 "objc/api/peerconnection/RTCIceCandidate.mm",
806 "objc/api/peerconnection/RTCIceServer+Private.h",
807 "objc/api/peerconnection/RTCIceServer.h",
808 "objc/api/peerconnection/RTCIceServer.mm",
809 "objc/api/peerconnection/RTCIntervalRange+Private.h",
810 "objc/api/peerconnection/RTCIntervalRange.h",
811 "objc/api/peerconnection/RTCIntervalRange.mm",
812 "objc/api/peerconnection/RTCLegacyStatsReport+Private.h",
813 "objc/api/peerconnection/RTCLegacyStatsReport.h",
814 "objc/api/peerconnection/RTCLegacyStatsReport.mm",
815 "objc/api/peerconnection/RTCMediaStream+Private.h",
816 "objc/api/peerconnection/RTCMediaStream.h",
817 "objc/api/peerconnection/RTCMediaStream.mm",
818 "objc/api/peerconnection/RTCMediaStreamTrack+Private.h",
819 "objc/api/peerconnection/RTCMediaStreamTrack.h",
820 "objc/api/peerconnection/RTCMediaStreamTrack.mm",
821 "objc/api/peerconnection/RTCMetrics.h",
822 "objc/api/peerconnection/RTCMetrics.mm",
823 "objc/api/peerconnection/RTCMetricsSampleInfo+Private.h",
824 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
825 "objc/api/peerconnection/RTCMetricsSampleInfo.mm",
826 "objc/api/peerconnection/RTCPeerConnection+DataChannel.mm",
827 "objc/api/peerconnection/RTCPeerConnection+Native.h",
828 "objc/api/peerconnection/RTCPeerConnection+Private.h",
829 "objc/api/peerconnection/RTCPeerConnection+Stats.mm",
830 "objc/api/peerconnection/RTCPeerConnection.h",
831 "objc/api/peerconnection/RTCPeerConnection.mm",
832 "objc/api/peerconnection/RTCPeerConnectionFactory+Native.h",
833 "objc/api/peerconnection/RTCPeerConnectionFactory+Private.h",
834 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
835 "objc/api/peerconnection/RTCPeerConnectionFactory.mm",
836 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.h",
837 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.mm",
838 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.h",
839 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.mm",
840 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions+Private.h",
841 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
842 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.mm",
843 "objc/api/peerconnection/RTCRtcpParameters+Private.h",
844 "objc/api/peerconnection/RTCRtcpParameters.h",
845 "objc/api/peerconnection/RTCRtcpParameters.mm",
846 "objc/api/peerconnection/RTCRtpCodecParameters+Private.h",
847 "objc/api/peerconnection/RTCRtpCodecParameters.h",
848 "objc/api/peerconnection/RTCRtpCodecParameters.mm",
849 "objc/api/peerconnection/RTCRtpEncodingParameters+Private.h",
850 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
851 "objc/api/peerconnection/RTCRtpEncodingParameters.mm",
852 "objc/api/peerconnection/RTCRtpHeaderExtension+Private.h",
853 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
854 "objc/api/peerconnection/RTCRtpHeaderExtension.mm",
855 "objc/api/peerconnection/RTCRtpParameters+Private.h",
856 "objc/api/peerconnection/RTCRtpParameters.h",
857 "objc/api/peerconnection/RTCRtpParameters.mm",
Benjamin Wrightddf1a3e2018-10-02 10:20:58 -0700858 "objc/api/peerconnection/RTCRtpReceiver+Native.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200859 "objc/api/peerconnection/RTCRtpReceiver+Private.h",
860 "objc/api/peerconnection/RTCRtpReceiver.h",
861 "objc/api/peerconnection/RTCRtpReceiver.mm",
Benjamin Wrightddf1a3e2018-10-02 10:20:58 -0700862 "objc/api/peerconnection/RTCRtpSender+Native.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200863 "objc/api/peerconnection/RTCRtpSender+Private.h",
864 "objc/api/peerconnection/RTCRtpSender.h",
865 "objc/api/peerconnection/RTCRtpSender.mm",
866 "objc/api/peerconnection/RTCRtpTransceiver+Private.h",
867 "objc/api/peerconnection/RTCRtpTransceiver.h",
868 "objc/api/peerconnection/RTCRtpTransceiver.mm",
869 "objc/api/peerconnection/RTCSSLAdapter.h",
870 "objc/api/peerconnection/RTCSSLAdapter.mm",
871 "objc/api/peerconnection/RTCSessionDescription+Private.h",
872 "objc/api/peerconnection/RTCSessionDescription.h",
873 "objc/api/peerconnection/RTCSessionDescription.mm",
Peter Hanspersbed86042019-02-21 17:27:09 +0100874 "objc/api/peerconnection/RTCStatisticsReport+Private.h",
875 "objc/api/peerconnection/RTCStatisticsReport.h",
876 "objc/api/peerconnection/RTCStatisticsReport.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200877 "objc/api/peerconnection/RTCTracing.h",
878 "objc/api/peerconnection/RTCTracing.mm",
879 "objc/api/peerconnection/RTCVideoTrack+Private.h",
880 "objc/api/peerconnection/RTCVideoTrack.h",
881 "objc/api/peerconnection/RTCVideoTrack.mm",
kthelgason5fe4d492016-12-05 11:27:30 -0800882 ]
kthelgasonebc34e72016-09-15 04:30:18 -0700883
Anders Carlsson358f2e02018-06-04 10:24:37 +0200884 configs += [
885 "..:common_objc",
886 ":used_from_extension",
887 ]
kthelgason36d658d2017-08-24 05:43:45 -0700888 public_configs = [ ":common_config_objc" ]
kthelgasonc0977102017-04-24 00:57:16 -0700889
mbonadei2c8ac1b2017-05-31 05:14:26 -0700890 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200891 ":base_native_additions_objc",
892 ":base_objc",
893 ":file_logger_objc",
894 ":helpers_objc",
895 ":legacy_header_paths",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100896 ":mediaconstraints_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100897 ":mediasource_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100898 ":native_api",
899 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100900 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100901 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100902 ":videorendereradapter_objc",
903 ":videosource_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200904 ":videotoolbox_objc",
Mirko Bonadei2ff3f492018-11-22 09:00:13 +0100905 "../api:create_peerconnection_factory",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100906 "../api:libjingle_peerconnection_api",
Peter Hanspersbed86042019-02-21 17:27:09 +0100907 "../api:rtc_stats_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100908 "../api:scoped_refptr",
Jiawei Ouae810c12018-06-20 16:18:59 -0700909 "../api/audio_codecs:audio_codecs_api",
Karl Wiberg5817d3d2018-04-06 10:06:42 +0200910 "../api/audio_codecs:builtin_audio_decoder_factory",
Jiawei Ouae810c12018-06-20 16:18:59 -0700911 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200912 "../api/video:video_frame",
Anders Carlsson7e042812017-10-05 16:55:38 +0200913 "../api/video_codecs:video_codecs_api",
Anders Carlssone5960ce2017-06-22 15:26:30 +0200914 "../common_video",
Bjorn Tereliusb8b3c992019-01-09 11:15:34 +0100915 "../logging:rtc_event_log_impl_base",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700916 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -0700917 "../modules:module_api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700918 "../modules/audio_device:audio_device_api",
Alessio Bazzicab768e882018-11-07 14:29:54 +0000919 "../modules/audio_processing:api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700920 "../modules/audio_processing:audio_processing",
Patrik Höglund99175c62018-01-08 11:05:10 +0100921 "../modules/video_coding:video_codec_interface",
zhihuanga4c113a2017-06-28 14:05:44 -0700922 "../pc:peerconnection",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100923 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700924 "../rtc_base:rtc_base",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200925 "../system_wrappers:field_trial",
926 "../system_wrappers:metrics",
Mirko Bonadei879f7882018-07-11 09:18:37 +0200927 "//third_party/abseil-cpp/absl/memory",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700928 ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200929
930 if (is_ios) {
931 deps += [ ":native_api_audio_device_module" ]
932 }
kthelgasonebc34e72016-09-15 04:30:18 -0700933 }
Zeke Chindd0e1e02016-10-11 13:27:26 -0700934
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200935 # TODO(bugs.webrtc.org/9627): Remove this target.
936 rtc_source_set("legacy_header_paths") {
937 sources = [
938 "objc/Framework/Classes/Common/NSString+StdString.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200939 "objc/Framework/Classes/Common/scoped_cftyperef.h",
940 "objc/Framework/Classes/PeerConnection/RTCConfiguration+Native.h",
941 "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Native.h",
942 "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Native.h",
943 "objc/Framework/Classes/PeerConnection/RTCVideoCodec+Private.h",
944 "objc/Framework/Classes/Video/RTCDefaultShader.h",
945 "objc/Framework/Classes/Video/RTCNV12TextureCache.h",
946 "objc/Framework/Classes/VideoToolbox/nalu_rewriter.h",
947 "objc/Framework/Headers/WebRTC/RTCAudioSession.h",
948 "objc/Framework/Headers/WebRTC/RTCAudioSessionConfiguration.h",
949 "objc/Framework/Headers/WebRTC/RTCAudioSource.h",
950 "objc/Framework/Headers/WebRTC/RTCAudioTrack.h",
951 "objc/Framework/Headers/WebRTC/RTCCVPixelBuffer.h",
952 "objc/Framework/Headers/WebRTC/RTCCallbackLogger.h",
953 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
954 "objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h",
955 "objc/Framework/Headers/WebRTC/RTCCertificate.h",
956 "objc/Framework/Headers/WebRTC/RTCConfiguration.h",
957 "objc/Framework/Headers/WebRTC/RTCDataChannel.h",
958 "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h",
959 "objc/Framework/Headers/WebRTC/RTCDefaultVideoDecoderFactory.h",
960 "objc/Framework/Headers/WebRTC/RTCDefaultVideoEncoderFactory.h",
961 "objc/Framework/Headers/WebRTC/RTCDispatcher.h",
962 "objc/Framework/Headers/WebRTC/RTCDtmfSender.h",
963 "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
964 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h",
965 "objc/Framework/Headers/WebRTC/RTCFileLogger.h",
966 "objc/Framework/Headers/WebRTC/RTCFileVideoCapturer.h",
967 "objc/Framework/Headers/WebRTC/RTCH264ProfileLevelId.h",
968 "objc/Framework/Headers/WebRTC/RTCIceCandidate.h",
969 "objc/Framework/Headers/WebRTC/RTCIceServer.h",
970 "objc/Framework/Headers/WebRTC/RTCIntervalRange.h",
971 "objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h",
972 "objc/Framework/Headers/WebRTC/RTCLogging.h",
973 "objc/Framework/Headers/WebRTC/RTCMTLNSVideoView.h",
974 "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h",
975 "objc/Framework/Headers/WebRTC/RTCMacros.h",
976 "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h",
977 "objc/Framework/Headers/WebRTC/RTCMediaSource.h",
978 "objc/Framework/Headers/WebRTC/RTCMediaStream.h",
979 "objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h",
980 "objc/Framework/Headers/WebRTC/RTCMetrics.h",
981 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h",
982 "objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h",
983 "objc/Framework/Headers/WebRTC/RTCPeerConnection.h",
984 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h",
985 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactoryOptions.h",
986 "objc/Framework/Headers/WebRTC/RTCRtcpParameters.h",
987 "objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h",
988 "objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h",
989 "objc/Framework/Headers/WebRTC/RTCRtpHeaderExtension.h",
990 "objc/Framework/Headers/WebRTC/RTCRtpParameters.h",
991 "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h",
992 "objc/Framework/Headers/WebRTC/RTCRtpSender.h",
993 "objc/Framework/Headers/WebRTC/RTCRtpTransceiver.h",
994 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
995 "objc/Framework/Headers/WebRTC/RTCSessionDescription.h",
996 "objc/Framework/Headers/WebRTC/RTCTracing.h",
997 "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h",
998 "objc/Framework/Headers/WebRTC/RTCVideoCodec.h",
999 "objc/Framework/Headers/WebRTC/RTCVideoCodecFactory.h",
1000 "objc/Framework/Headers/WebRTC/RTCVideoCodecH264.h",
1001 "objc/Framework/Headers/WebRTC/RTCVideoCodecInfo.h",
1002 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP8.h",
1003 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP9.h",
1004 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP8.h",
1005 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP9.h",
1006 "objc/Framework/Headers/WebRTC/RTCVideoFrame.h",
1007 "objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.h",
1008 "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h",
1009 "objc/Framework/Headers/WebRTC/RTCVideoSource.h",
1010 "objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
1011 "objc/Framework/Headers/WebRTC/RTCVideoViewShading.h",
1012 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
1013 "objc/Framework/Native/api/audio_device_module.h",
1014 "objc/Framework/Native/api/video_decoder_factory.h",
1015 "objc/Framework/Native/api/video_encoder_factory.h",
1016 "objc/Framework/Native/api/video_frame_buffer.h",
1017 "objc/Framework/Native/src/objc_video_decoder_factory.h",
1018 "objc/Framework/Native/src/objc_video_encoder_factory.h",
1019 ]
1020 }
1021
mbonadei2c8ac1b2017-05-31 05:14:26 -07001022 if (rtc_include_tests) {
Daniela012b56b2017-11-15 13:15:24 +01001023 if (is_ios) {
Danielaae012cf2017-10-12 13:46:00 +02001024 rtc_source_set("sdk_unittests_sources") {
1025 testonly = true
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001026 include_dirs = [ "objc/" ]
Daniela012b56b2017-11-15 13:15:24 +01001027
Danielaae012cf2017-10-12 13:46:00 +02001028 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001029 "objc/unittests/ObjCVideoTrackSource_xctest.mm",
1030 "objc/unittests/RTCCVPixelBuffer_xctest.mm",
1031 "objc/unittests/RTCCallbackLogger_xctest.m",
1032 "objc/unittests/RTCFileVideoCapturer_xctest.mm",
1033 "objc/unittests/RTCH264ProfileLevelId_xctest.m",
Aaron Goldenfb4e9bc2019-01-04 12:03:31 -08001034 "objc/unittests/RTCNV12TextureCache_xctest.m",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001035 "objc/unittests/RTCPeerConnectionFactory_xctest.m",
1036 "objc/unittests/frame_buffer_helpers.h",
1037 "objc/unittests/frame_buffer_helpers.mm",
Artem Titarenko42b43152018-10-29 18:18:09 +01001038 "objc/unittests/nalu_rewriter_xctest.mm",
Danielaae012cf2017-10-12 13:46:00 +02001039 ]
Daniela012b56b2017-11-15 13:15:24 +01001040
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001041 # TODO(peterhanspers): Reenable these tests on simulator.
1042 # See bugs.webrtc.org/7812
1043 if (!use_ios_simulator) {
1044 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001045 "objc/unittests/RTCAudioDeviceModule_xctest.mm",
1046 "objc/unittests/RTCAudioDevice_xctest.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001047 ]
1048 }
1049
Danielaae012cf2017-10-12 13:46:00 +02001050 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001051 ":audio_device",
1052 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001053 ":base_objc",
1054 ":callback_logger_objc",
Anders Carlssondc6b4772018-01-15 13:31:03 +01001055 ":framework_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001056 ":mediaconstraints_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001057 ":native_api",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001058 ":native_api_audio_device_module",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001059 ":native_video",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001060 ":peerconnectionfactory_base_objc",
Aaron Goldenfb4e9bc2019-01-04 12:03:31 -08001061 ":video_objc",
Artem Titarenko42b43152018-10-29 18:18:09 +01001062 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001063 ":videocapture_objc",
Anders Carlsson79ce8202018-06-01 12:51:09 +02001064 ":videocodec_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001065 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001066 ":videosource_objc",
Danielaae012cf2017-10-12 13:46:00 +02001067 ":videotoolbox_objc",
Mirko Bonadeid9708072019-01-25 20:26:48 +01001068 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001069 "../api/video:video_frame_i420",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001070 "../common_video:common_video",
Danielaae012cf2017-10-12 13:46:00 +02001071 "../media:rtc_media_base",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001072 "../media:rtc_media_tests_utils",
Danielaae012cf2017-10-12 13:46:00 +02001073 "../modules:module_api",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001074 "../rtc_base:gunit_helpers",
Danielaae012cf2017-10-12 13:46:00 +02001075 "../rtc_base:rtc_base",
Oleh Prypinda04e062018-07-23 10:04:12 +02001076 "../system_wrappers:system_wrappers",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001077 "//third_party/libyuv",
Danielaae012cf2017-10-12 13:46:00 +02001078 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001079
1080 if (rtc_use_metal_rendering) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001081 sources += [ "objc/unittests/RTCMTLVideoView_xctest.m" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001082 deps += [ ":metal_objc" ]
1083 }
1084
Danielaae012cf2017-10-12 13:46:00 +02001085 public_deps = [
1086 "//build/config/ios:xctest",
1087 "//third_party/ocmock",
1088 ]
1089 }
1090
Daniela012b56b2017-11-15 13:15:24 +01001091 bundle_data("sdk_unittests_bundle_data") {
Daniela012b56b2017-11-15 13:15:24 +01001092 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001093 "objc/unittests/audio_short16.pcm",
1094 "objc/unittests/audio_short44.pcm",
1095 "objc/unittests/audio_short48.pcm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001096
1097 # Sample video taken from https://media.xiph.org/video/derf/
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001098 "objc/unittests/foreman.mp4",
Daniela012b56b2017-11-15 13:15:24 +01001099 ]
1100 outputs = [
1101 "{{bundle_resources_dir}}/{{source_file_part}}",
1102 ]
1103 }
1104
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001105 # These tests use static linking.
Danielaae012cf2017-10-12 13:46:00 +02001106 rtc_ios_xctest_test("sdk_unittests") {
1107 info_plist = "//test/ios/Info.plist"
1108 sources = [
Artem Titarenko34fc3462018-11-06 12:29:29 +01001109 "objc/unittests/main.mm",
Danielaae012cf2017-10-12 13:46:00 +02001110 ]
Daniela012b56b2017-11-15 13:15:24 +01001111
Danielaae012cf2017-10-12 13:46:00 +02001112 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
1113 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
1114 deps = [
Yura Yaroshevich5297bd22018-06-19 12:51:51 +03001115 ":peerconnectionfactory_base_objc",
Daniela012b56b2017-11-15 13:15:24 +01001116 ":sdk_unittests_bundle_data",
Danielaae012cf2017-10-12 13:46:00 +02001117 ":sdk_unittests_sources",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001118 "//test:test_support",
Danielaae012cf2017-10-12 13:46:00 +02001119 ]
1120 ldflags = [ "-all_load" ]
1121 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001122
1123 # These tests link to the framework.
1124 rtc_ios_xctest_test("sdk_framework_unittests") {
1125 info_plist = "//test/ios/Info.plist"
1126 sources = [
1127 "objc/unittests/RTCDoNotPutCPlusPlusInFrameworkHeaders_xctest.m",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001128 "objc/unittests/main.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001129 ]
1130
1131 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
1132 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
1133 deps = [
1134 ":framework_objc+link",
1135 ":ios_framework_bundle",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001136 "//test:test_support",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001137 ]
1138 }
Danielaae012cf2017-10-12 13:46:00 +02001139 }
1140
1141 # TODO(denicija): once all tests are migrated to xctest remove this source set.
Kári Tristan Helgason90143242018-07-27 12:34:54 +02001142 rtc_source_set("rtc_unittests_objc") {
mbonadei2c8ac1b2017-05-31 05:14:26 -07001143 testonly = true
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001144
mbonadei2c8ac1b2017-05-31 05:14:26 -07001145 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001146 "objc/unittests/RTCCertificateTest.mm",
1147 "objc/unittests/RTCConfigurationTest.mm",
1148 "objc/unittests/RTCDataChannelConfigurationTest.mm",
1149 "objc/unittests/RTCIceCandidateTest.mm",
1150 "objc/unittests/RTCIceServerTest.mm",
1151 "objc/unittests/RTCIntervalRangeTests.mm",
1152 "objc/unittests/RTCMediaConstraintsTest.mm",
1153 "objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm",
1154 "objc/unittests/RTCPeerConnectionTest.mm",
1155 "objc/unittests/RTCSessionDescriptionTest.mm",
1156 "objc/unittests/RTCTracingTest.mm",
1157 "objc/unittests/objc_video_decoder_factory_tests.mm",
1158 "objc/unittests/objc_video_encoder_factory_tests.mm",
1159 "objc/unittests/scoped_cftyperef_tests.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001160 ]
Anders Carlssone7dd83f2018-01-19 11:28:44 +01001161 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001162 sources += [ "objc/unittests/RTCCameraVideoCapturerTests.mm" ]
oprypin45197522017-06-22 01:47:20 -07001163 }
mbonadeid7620582017-05-30 01:50:35 -07001164
mbonadei2c8ac1b2017-05-31 05:14:26 -07001165 # |-ObjC| flag needed to make sure category method implementations
1166 # are included:
1167 # https://developer.apple.com/library/mac/qa/qa1490/_index.html
1168 ldflags = [ "-ObjC" ]
magjed3149e092017-05-08 05:32:05 -07001169
mbonadei2c8ac1b2017-05-31 05:14:26 -07001170 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001171 ":base_objc",
1172 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001173 ":mediaconstraints_objc",
1174 ":native_api",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001175 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001176 ":peerconnectionfactory_base_objc",
1177 ":video_objc",
1178 ":videocapture_objc",
1179 ":videocodec_objc",
1180 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001181 ":videosource_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001182 ":videotoolbox_objc",
Piotr (Peter) Slatalae0c2e972018-10-08 09:43:21 -07001183 "../api:libjingle_peerconnection_api",
Jiawei Ouae810c12018-06-20 16:18:59 -07001184 "../api/audio_codecs:audio_codecs_api",
1185 "../api/audio_codecs:builtin_audio_decoder_factory",
1186 "../api/audio_codecs:builtin_audio_encoder_factory",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001187 "../api/video_codecs:video_codecs_api",
kthelgasonebd4f792017-09-04 04:36:21 -07001188 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -07001189 "../modules:module_api",
Jiawei Ouae810c12018-06-20 16:18:59 -07001190 "../modules/audio_device:audio_device_api",
Alessio Bazzicab768e882018-11-07 14:29:54 +00001191 "../modules/audio_processing:api",
Jiawei Ouae810c12018-06-20 16:18:59 -07001192 "../modules/audio_processing:audio_processing",
Patrik Höglund99175c62018-01-08 11:05:10 +01001193 "../modules/video_coding:video_codec_interface",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001194 "../rtc_base:gunit_helpers",
Niels Möllera12c42a2018-07-25 16:05:48 +02001195 "../rtc_base/system:unused",
Yves Gerey21cddff2018-10-30 21:12:42 +01001196 "../test:test_support",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001197 "//third_party/ocmock",
1198 ]
magjed3149e092017-05-08 05:32:05 -07001199
denicija59ee91b2017-06-05 05:48:47 -07001200 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001201 sources += [ "objc/unittests/RTCAudioSessionTest.mm" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001202 deps += [ ":audio_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001203 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001204 }
kthelgason2f088792017-05-30 01:48:47 -07001205 }
1206
mbonadei2c8ac1b2017-05-31 05:14:26 -07001207 if (is_ios) {
Anders Carlssondc6b4772018-01-15 13:31:03 +01001208 ios_framework_bundle_with_umbrella_header("framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001209 info_plist = "objc/Info.plist"
mbonadei2c8ac1b2017-05-31 05:14:26 -07001210 output_name = "WebRTC"
Magnus Jedvertf83dc8b2017-08-29 09:49:43 +00001211
mbonadei2c8ac1b2017-05-31 05:14:26 -07001212 common_objc_headers = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001213 "objc/base/RTCCodecSpecificInfo.h",
1214 "objc/base/RTCEncodedImage.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001215 "objc/base/RTCI420Buffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001216 "objc/base/RTCLogging.h",
1217 "objc/base/RTCMacros.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001218 "objc/base/RTCMutableI420Buffer.h",
1219 "objc/base/RTCMutableYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001220 "objc/base/RTCRtpFragmentationHeader.h",
1221 "objc/base/RTCVideoCapturer.h",
1222 "objc/base/RTCVideoCodecInfo.h",
1223 "objc/base/RTCVideoDecoder.h",
1224 "objc/base/RTCVideoDecoderFactory.h",
1225 "objc/base/RTCVideoEncoder.h",
1226 "objc/base/RTCVideoEncoderFactory.h",
1227 "objc/base/RTCVideoEncoderQpThresholds.h",
1228 "objc/base/RTCVideoEncoderSettings.h",
1229 "objc/base/RTCVideoFrame.h",
1230 "objc/base/RTCVideoFrameBuffer.h",
1231 "objc/base/RTCVideoRenderer.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001232 "objc/base/RTCYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001233 "objc/components/audio/RTCAudioSession.h",
1234 "objc/components/audio/RTCAudioSessionConfiguration.h",
1235 "objc/components/capturer/RTCCameraVideoCapturer.h",
1236 "objc/components/capturer/RTCFileVideoCapturer.h",
1237 "objc/components/renderer/metal/RTCMTLVideoView.h",
1238 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
1239 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1240 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1241 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1242 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1243 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1244 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1245 "objc/components/video_codec/RTCVideoDecoderH264.h",
1246 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1247 "objc/components/video_codec/RTCVideoEncoderH264.h",
1248 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1249 "objc/helpers/RTCCameraPreviewView.h",
1250 "objc/helpers/RTCDispatcher.h",
1251 "objc/helpers/UIDevice+RTCDevice.h",
1252 "objc/api/peerconnection/RTCAudioSource.h",
1253 "objc/api/peerconnection/RTCAudioTrack.h",
1254 "objc/api/peerconnection/RTCConfiguration.h",
1255 "objc/api/peerconnection/RTCDataChannel.h",
1256 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1257 "objc/api/peerconnection/RTCFieldTrials.h",
1258 "objc/api/peerconnection/RTCIceCandidate.h",
1259 "objc/api/peerconnection/RTCIceServer.h",
1260 "objc/api/peerconnection/RTCIntervalRange.h",
1261 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1262 "objc/api/peerconnection/RTCMediaConstraints.h",
1263 "objc/api/peerconnection/RTCMediaSource.h",
1264 "objc/api/peerconnection/RTCMediaStream.h",
1265 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1266 "objc/api/peerconnection/RTCMetrics.h",
1267 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1268 "objc/api/peerconnection/RTCPeerConnection.h",
1269 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1270 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1271 "objc/api/peerconnection/RTCRtcpParameters.h",
1272 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1273 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1274 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1275 "objc/api/peerconnection/RTCRtpParameters.h",
1276 "objc/api/peerconnection/RTCRtpReceiver.h",
1277 "objc/api/peerconnection/RTCRtpSender.h",
1278 "objc/api/peerconnection/RTCRtpTransceiver.h",
1279 "objc/api/peerconnection/RTCDtmfSender.h",
1280 "objc/api/peerconnection/RTCSSLAdapter.h",
1281 "objc/api/peerconnection/RTCSessionDescription.h",
1282 "objc/api/peerconnection/RTCTracing.h",
1283 "objc/api/peerconnection/RTCCertificate.h",
Benjamin Wright8c27cca2018-10-25 10:16:44 -07001284 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001285 "objc/api/peerconnection/RTCVideoSource.h",
1286 "objc/api/peerconnection/RTCVideoTrack.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001287 "objc/api/video_codec/RTCVideoCodecConstants.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001288 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1289 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1290 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1291 "objc/api/video_codec/RTCVideoEncoderVP9.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001292 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1293 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001294 ]
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001295
mbonadei2c8ac1b2017-05-31 05:14:26 -07001296 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001297 common_objc_headers += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001298 "objc/api/logging/RTCCallbackLogger.h",
1299 "objc/api/peerconnection/RTCFileLogger.h",
Anders Carlsson3b3364e2018-01-30 15:46:13 +01001300 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001301 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001302
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001303 sources = common_objc_headers
1304 public_headers = common_objc_headers
1305
mbonadei2c8ac1b2017-05-31 05:14:26 -07001306 ldflags = [
1307 "-all_load",
1308 "-install_name",
1309 "@rpath/$output_name.framework/$output_name",
1310 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001311
mbonadei2c8ac1b2017-05-31 05:14:26 -07001312 deps = [
kthelgason36d658d2017-08-24 05:43:45 -07001313 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001314 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001315 ":default_codec_factory_objc",
1316 ":native_api",
1317 ":native_video",
1318 ":peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001319 ":ui_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001320 ":videocapture_objc",
1321 ":videocodec_objc",
1322 ":videotoolbox_objc",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001323 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001324 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001325 if (rtc_use_metal_rendering) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001326 deps += [ ":metal_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
mbonadei2c8ac1b2017-05-31 05:14:26 -07001335 libs = [
1336 "AVFoundation.framework",
1337 "CoreGraphics.framework",
1338 "CoreMedia.framework",
1339 "GLKit.framework",
1340 ]
1341
Anders Carlsson358f2e02018-06-04 10:24:37 +02001342 configs += [
1343 "..:common_objc",
1344 ":used_from_extension",
1345 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001346
kthelgason36d658d2017-08-24 05:43:45 -07001347 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001348 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001349
1350 bundle_data("ios_framework_bundle") {
1351 deps = [
1352 "../sdk:framework_objc",
1353 ]
1354 sources = [
1355 "$root_build_dir/WebRTC.framework",
1356 ]
1357 outputs = [
1358 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
1359 ]
1360 }
1361 }
1362
1363 if (is_mac) {
Anders Carlsson37bbf792018-09-05 16:29:27 +02001364 mac_framework_bundle_with_umbrella_header("mac_framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001365 info_plist = "objc/Info.plist"
1366 output_name = "WebRTC"
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001367
Anders Carlsson37bbf792018-09-05 16:29:27 +02001368 sources = [
1369 "objc/api/peerconnection/RTCAudioSource.h",
1370 "objc/api/peerconnection/RTCAudioTrack.h",
1371 "objc/api/peerconnection/RTCCertificate.h",
1372 "objc/api/peerconnection/RTCConfiguration.h",
Benjamin Wright8c27cca2018-10-25 10:16:44 -07001373 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001374 "objc/api/peerconnection/RTCDataChannel.h",
1375 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1376 "objc/api/peerconnection/RTCDtmfSender.h",
1377 "objc/api/peerconnection/RTCFieldTrials.h",
1378 "objc/api/peerconnection/RTCIceCandidate.h",
1379 "objc/api/peerconnection/RTCIceServer.h",
1380 "objc/api/peerconnection/RTCIntervalRange.h",
1381 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1382 "objc/api/peerconnection/RTCMediaConstraints.h",
1383 "objc/api/peerconnection/RTCMediaSource.h",
1384 "objc/api/peerconnection/RTCMediaStream.h",
1385 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1386 "objc/api/peerconnection/RTCMetrics.h",
1387 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1388 "objc/api/peerconnection/RTCPeerConnection.h",
1389 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1390 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1391 "objc/api/peerconnection/RTCRtcpParameters.h",
1392 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1393 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1394 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1395 "objc/api/peerconnection/RTCRtpParameters.h",
1396 "objc/api/peerconnection/RTCRtpReceiver.h",
1397 "objc/api/peerconnection/RTCRtpSender.h",
1398 "objc/api/peerconnection/RTCRtpTransceiver.h",
1399 "objc/api/peerconnection/RTCSSLAdapter.h",
1400 "objc/api/peerconnection/RTCSessionDescription.h",
1401 "objc/api/peerconnection/RTCTracing.h",
1402 "objc/api/peerconnection/RTCVideoSource.h",
1403 "objc/api/peerconnection/RTCVideoTrack.h",
1404 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1405 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1406 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1407 "objc/api/video_codec/RTCVideoEncoderVP9.h",
1408 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1409 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
1410 "objc/base/RTCCodecSpecificInfo.h",
1411 "objc/base/RTCEncodedImage.h",
1412 "objc/base/RTCI420Buffer.h",
1413 "objc/base/RTCLogging.h",
1414 "objc/base/RTCMacros.h",
1415 "objc/base/RTCMutableI420Buffer.h",
1416 "objc/base/RTCMutableYUVPlanarBuffer.h",
1417 "objc/base/RTCRtpFragmentationHeader.h",
1418 "objc/base/RTCVideoCapturer.h",
1419 "objc/base/RTCVideoCodecInfo.h",
1420 "objc/base/RTCVideoDecoder.h",
1421 "objc/base/RTCVideoDecoderFactory.h",
1422 "objc/base/RTCVideoEncoder.h",
1423 "objc/base/RTCVideoEncoderFactory.h",
1424 "objc/base/RTCVideoEncoderQpThresholds.h",
1425 "objc/base/RTCVideoEncoderSettings.h",
1426 "objc/base/RTCVideoFrame.h",
1427 "objc/base/RTCVideoFrameBuffer.h",
1428 "objc/base/RTCVideoRenderer.h",
1429 "objc/base/RTCYUVPlanarBuffer.h",
1430 "objc/components/capturer/RTCCameraVideoCapturer.h",
1431 "objc/components/capturer/RTCFileVideoCapturer.h",
1432 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
1433 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
1434 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1435 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1436 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1437 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1438 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1439 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1440 "objc/components/video_codec/RTCVideoDecoderH264.h",
1441 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1442 "objc/components/video_codec/RTCVideoEncoderH264.h",
1443 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1444 "objc/helpers/RTCDispatcher.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001445 ]
Anders Carlsson37bbf792018-09-05 16:29:27 +02001446 if (!build_with_chromium) {
1447 sources += [
1448 "objc/api/logging/RTCCallbackLogger.h",
1449 "objc/api/peerconnection/RTCFileLogger.h",
1450 ]
1451 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001452
1453 deps = [
1454 ":base_objc",
1455 ":default_codec_factory_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001456 ":native_api",
1457 ":native_video",
1458 ":peerconnectionfactory_base_objc",
1459 ":ui_objc",
1460 ":videocapture_objc",
1461 ":videocodec_objc",
1462 ":videotoolbox_objc",
1463 "../rtc_base:rtc_base_approved",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001464 ]
1465 if (rtc_use_metal_rendering) {
1466 deps += [ ":metal_objc" ]
1467 }
1468 if (!build_with_chromium) {
1469 deps += [
1470 ":callback_logger_objc",
1471 ":file_logger_objc",
1472 ]
1473 }
1474
1475 libs = [
1476 "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") {
1488 deps = [
1489 "../sdk:mac_framework_objc",
1490 ]
1491 sources = [
1492 "$root_build_dir/WebRTC.framework",
1493 ]
1494 outputs = [
Anders Carlsson24d8ec32018-12-10 14:04:12 +01001495 "{{bundle_contents_dir}}/Frameworks/{{source_file_part}}",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001496 ]
1497 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001498 }
1499
Anders Carlsson9823ee42018-03-07 10:32:03 +01001500 rtc_static_library("wrapped_native_codec_objc") {
1501 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001502 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.h",
1503 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm",
1504 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.h",
1505 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001506 ]
1507
1508 configs += [ "..:common_objc" ]
1509 public_configs = [ ":common_config_objc" ]
1510
Anders Carlsson9823ee42018-03-07 10:32:03 +01001511 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001512 ":base_objc",
1513 ":helpers_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001514 "../api/video_codecs:video_codecs_api",
1515 "../media:rtc_media_base",
1516 ]
1517 }
1518
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001519 # The native API is currently experimental and may change without notice.
1520 rtc_static_library("native_api") {
1521 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +01001522 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001523 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001524 "objc/native/api/video_capturer.h",
1525 "objc/native/api/video_capturer.mm",
1526 "objc/native/api/video_decoder_factory.h",
1527 "objc/native/api/video_decoder_factory.mm",
1528 "objc/native/api/video_encoder_factory.h",
1529 "objc/native/api/video_encoder_factory.mm",
1530 "objc/native/api/video_frame.h",
1531 "objc/native/api/video_frame.mm",
1532 "objc/native/api/video_frame_buffer.h",
1533 "objc/native/api/video_frame_buffer.mm",
1534 "objc/native/api/video_renderer.h",
1535 "objc/native/api/video_renderer.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001536 ]
1537
1538 configs += [ "..:common_objc" ]
1539
1540 public_configs = [ ":common_config_objc" ]
1541
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001542 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001543 ":base_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001544 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001545 ":videoframebuffer_objc",
Anders Carlsson73119182018-03-15 09:41:03 +01001546 "../api:libjingle_peerconnection_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +01001547 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001548 "../api/video:video_frame",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001549 "../api/video_codecs:video_codecs_api",
1550 "../common_video",
1551 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +02001552 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001553 ]
1554 }
1555
1556 rtc_static_library("native_video") {
1557 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001558 "objc/native/src/objc_frame_buffer.h",
1559 "objc/native/src/objc_frame_buffer.mm",
1560 "objc/native/src/objc_video_decoder_factory.h",
1561 "objc/native/src/objc_video_decoder_factory.mm",
1562 "objc/native/src/objc_video_encoder_factory.h",
1563 "objc/native/src/objc_video_encoder_factory.mm",
1564 "objc/native/src/objc_video_frame.h",
1565 "objc/native/src/objc_video_frame.mm",
1566 "objc/native/src/objc_video_renderer.h",
1567 "objc/native/src/objc_video_renderer.mm",
1568 "objc/native/src/objc_video_track_source.h",
1569 "objc/native/src/objc_video_track_source.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001570 ]
1571
1572 configs += [ "..:common_objc" ]
1573
1574 public_configs = [ ":common_config_objc" ]
1575
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001576 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001577 ":base_native_additions_objc",
1578 ":base_objc",
1579 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001580 ":videocodec_objc",
1581 ":videoframebuffer_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001582 ":vpx_codec_constants",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001583 ":wrapped_native_codec_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001584 "../api/video:video_frame",
1585 "../api/video:video_frame_i420",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001586 "../api/video_codecs:video_codecs_api",
1587 "../common_video",
1588 "../media:rtc_audio_video",
1589 "../media:rtc_media_base",
1590 "../modules:module_api",
1591 "../modules/video_coding:video_codec_interface",
1592 "../rtc_base:checks",
1593 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +02001594 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001595 ]
1596 }
1597
mbonadeic0af5ac2017-08-24 12:26:05 -07001598 rtc_static_library("video_toolbox_cc") {
Artem Titarenko42b43152018-10-29 18:18:09 +01001599 visibility = [
1600 ":videotoolbox_objc",
1601 ":sdk_unittests_sources",
1602 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001603 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001604 "objc/components/video_codec/helpers.cc",
1605 "objc/components/video_codec/helpers.h",
1606 "objc/components/video_codec/nalu_rewriter.cc",
1607 "objc/components/video_codec/nalu_rewriter.h",
mbonadeic0af5ac2017-08-24 12:26:05 -07001608 ]
1609 deps = [
1610 "../common_video",
1611 "../modules:module_api",
1612 "../modules/video_coding:webrtc_h264",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001613 "../rtc_base:checks",
mbonadeic0af5ac2017-08-24 12:26:05 -07001614 "../rtc_base:rtc_base_approved",
1615 ]
mbonadeic0af5ac2017-08-24 12:26:05 -07001616 }
1617
1618 rtc_static_library("videotoolbox_objc") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001619 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +01001620 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadeic0af5ac2017-08-24 12:26:05 -07001621 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001622 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1623 "objc/components/video_codec/RTCVideoDecoderFactoryH264.m",
1624 "objc/components/video_codec/RTCVideoDecoderH264.h",
1625 "objc/components/video_codec/RTCVideoDecoderH264.mm",
1626 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1627 "objc/components/video_codec/RTCVideoEncoderFactoryH264.m",
1628 "objc/components/video_codec/RTCVideoEncoderH264.h",
1629 "objc/components/video_codec/RTCVideoEncoderH264.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001630 ]
1631
Anders Carlsson358f2e02018-06-04 10:24:37 +02001632 configs += [
1633 "..:common_objc",
1634 ":used_from_extension",
1635 ]
1636
1637 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
1638 defines = [ "RTC_APPRTCMOBILE_BROADCAST_EXTENSION" ]
1639 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001640
1641 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001642 ":base_native_additions_objc",
1643 ":base_objc",
1644 ":helpers_objc",
mbonadeic0af5ac2017-08-24 12:26:05 -07001645 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001646 ":videocodec_objc",
1647 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001648 "../common_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001649 "../modules:module_api",
Patrik Höglund99175c62018-01-08 11:05:10 +01001650 "../modules/video_coding:video_codec_interface",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001651 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001652 "../rtc_base:rtc_base_approved",
Mirko Bonadei401d0562017-12-14 11:24:00 +01001653 "//third_party/libyuv",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001654 ]
1655
1656 libs = [
1657 "CoreFoundation.framework",
1658 "CoreMedia.framework",
1659 "CoreVideo.framework",
1660 "VideoToolbox.framework",
1661 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001662 }
1663 }
tkchin9eeb6242016-04-27 01:54:20 -07001664}