blob: 9a04322bd5db937a049c642e2f26a1581beba344 [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) {
11 import("//build/config/ios/rules.gni")
oprypin45197522017-06-22 01:47:20 -070012 import("//build/config/ios/ios_sdk.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
kthelgasoncc2d1c62016-11-09 07:44:27 -080030if (is_ios || is_mac) {
kthelgason36d658d2017-08-24 05:43:45 -070031 config("common_config_objc") {
kjellander080a1e32016-05-25 11:37:11 -070032 include_dirs = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020033 "objc",
34
35 # This is needed so that framework headers can include base headers
36 # without pathname (so it works from within the framework module).
37 "objc/base",
38
39 # This is here for backward compatiblity reasons.
40 "objc/Framework/Headers", # TODO(bugs.webrtc.org/9627): Remove this.
kjellander080a1e32016-05-25 11:37:11 -070041 ]
Kári Tristan Helgason47d3a012017-10-24 15:28:51 +020042 cflags = [
43 "-Wstrict-overflow",
44 "-Wmissing-field-initializers",
45 ]
Artem Titarenko17ad64e2018-09-19 17:53:59 +020046
47 if (use_clang_coverage) {
48 configs = [ "//build/config/coverage:default_coverage" ]
49 }
kjellander080a1e32016-05-25 11:37:11 -070050 }
51
Anders Carlsson358f2e02018-06-04 10:24:37 +020052 config("used_from_extension") {
53 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
54 cflags = [ "-fapplication-extension" ]
55 }
56 }
57
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020058 # TODO(bugs.webrtc.org/9627): Remove this when unused. Targets should depend on base_objc
59 # or helpers_objc directly instead.
kthelgason36d658d2017-08-24 05:43:45 -070060 rtc_static_library("common_objc") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +020061 visibility = [ "*" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020062
tkchin9eeb6242016-04-27 01:54:20 -070063 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020064 "objc/helpers/noop.mm",
65 ]
66
67 public_configs = [ ":common_config_objc" ]
68
69 deps = [
70 ":base_objc",
71 ":helpers_objc",
72 ]
73 }
74
75 rtc_static_library("base_objc") {
76 visibility = [ "*" ]
77 sources = [
78 "objc/base/RTCCodecSpecificInfo.h",
79 "objc/base/RTCEncodedImage.h",
80 "objc/base/RTCEncodedImage.m",
81 "objc/base/RTCI420Buffer.h",
82 "objc/base/RTCLogging.h",
83 "objc/base/RTCLogging.mm",
84 "objc/base/RTCMacros.h",
85 "objc/base/RTCMutableI420Buffer.h",
86 "objc/base/RTCMutableYUVPlanarBuffer.h",
87 "objc/base/RTCRtpFragmentationHeader.h",
88 "objc/base/RTCRtpFragmentationHeader.m",
89 "objc/base/RTCVideoCapturer.h",
90 "objc/base/RTCVideoCapturer.m",
91 "objc/base/RTCVideoCodecInfo.h",
92 "objc/base/RTCVideoCodecInfo.m",
93 "objc/base/RTCVideoDecoder.h",
94 "objc/base/RTCVideoDecoderFactory.h",
95 "objc/base/RTCVideoEncoder.h",
96 "objc/base/RTCVideoEncoderFactory.h",
97 "objc/base/RTCVideoEncoderQpThresholds.h",
98 "objc/base/RTCVideoEncoderQpThresholds.m",
99 "objc/base/RTCVideoEncoderSettings.h",
100 "objc/base/RTCVideoEncoderSettings.m",
101 "objc/base/RTCVideoFrame.h",
102 "objc/base/RTCVideoFrame.mm",
103 "objc/base/RTCVideoFrameBuffer.h",
104 "objc/base/RTCVideoRenderer.h",
105 "objc/base/RTCYUVPlanarBuffer.h",
tkchin9eeb6242016-04-27 01:54:20 -0700106 ]
denicijad2088152017-04-28 02:14:54 -0700107
mbonadei1e060c62017-04-21 00:02:02 -0700108 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100109 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700110 "../rtc_base:rtc_base",
mbonadei1e060c62017-04-21 00:02:02 -0700111 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200112 configs += [
113 "..:common_objc",
114 ":used_from_extension",
115 ]
kthelgasonc0977102017-04-24 00:57:16 -0700116
kthelgason36d658d2017-08-24 05:43:45 -0700117 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200118 }
119
120 rtc_static_library("helpers_objc") {
121 sources = [
122 "objc/helpers/AVCaptureSession+DevicePosition.h",
123 "objc/helpers/AVCaptureSession+DevicePosition.mm",
124 "objc/helpers/NSString+StdString.h",
125 "objc/helpers/NSString+StdString.mm",
126 "objc/helpers/RTCDispatcher+Private.h",
127 "objc/helpers/RTCDispatcher.h",
128 "objc/helpers/RTCDispatcher.m",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200129 "objc/helpers/scoped_cftyperef.h",
130 ]
131
132 deps = [
133 ":base_objc",
134 "../rtc_base:checks",
135 ]
136
137 libs = [
138 "AVFoundation.framework",
139 "CoreMedia.framework",
140 ]
141
142 configs += [
143 "..:common_objc",
144 ":used_from_extension",
145 ]
146
147 public_configs = [ ":common_config_objc" ]
denicijad2088152017-04-28 02:14:54 -0700148
kjellander3bcedd32016-06-08 01:14:15 -0700149 if (is_ios) {
150 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200151 "objc/helpers/RTCCameraPreviewView.h",
152 "objc/helpers/RTCCameraPreviewView.m",
153 "objc/helpers/UIDevice+RTCDevice.h",
154 "objc/helpers/UIDevice+RTCDevice.mm",
155 ]
156 }
157 }
158
159 if (!build_with_chromium) {
160 rtc_static_library("callback_logger_objc") {
161 sources = [
162 "objc/api/logging/RTCCallbackLogger.h",
163 "objc/api/logging/RTCCallbackLogger.mm",
164 ]
165
166 deps = [
167 ":base_objc",
168 "../rtc_base:checks",
169 "../rtc_base:logging",
170 "../rtc_base:rtc_base",
171 ]
172
173 configs += [
174 "..:common_objc",
175 ":used_from_extension",
kjellander3bcedd32016-06-08 01:14:15 -0700176 ]
denicijad2088152017-04-28 02:14:54 -0700177 }
178
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200179 rtc_static_library("file_logger_objc") {
180 sources = [
181 "objc/api/peerconnection/RTCFileLogger.h",
182 "objc/api/peerconnection/RTCFileLogger.mm",
183 ]
184
185 deps = [
186 ":base_objc",
187 "../rtc_base:checks",
188 "../rtc_base:logging",
189 "../rtc_base:rtc_base",
190 ]
191
192 configs += [
193 "..:common_objc",
194 ":used_from_extension",
kthelgason2f088792017-05-30 01:48:47 -0700195 ]
196 }
197 }
198
mbonadei2c8ac1b2017-05-31 05:14:26 -0700199 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100200 if (is_ios) {
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200201 rtc_static_library("native_api_audio_device_module") {
202 visibility = [ "*" ]
203
204 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200205 "objc/native/api/audio_device_module.h",
206 "objc/native/api/audio_device_module.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200207 ]
208
209 deps = [
210 ":audio_device",
211 "../modules/audio_device:audio_device_api",
212 "../modules/audio_device:audio_device_generic",
213 "../rtc_base:checks",
214 "../rtc_base:rtc_base_approved",
215 "../system_wrappers",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200216 ]
217
218 if (is_clang) {
219 # Suppress warnings from the Chromium Clang plugin
220 # (bugs.webrtc.org/163).
221 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
222 }
223 }
224
225 rtc_source_set("audio_session_observer") {
226 visibility = [ ":*" ]
227
228 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200229 "objc/native/src/audio/audio_session_observer.h",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200230 ]
231
232 deps = [
233 "../rtc_base:rtc_base",
234 ]
235 }
236
237 rtc_static_library("audio_device") {
238 visibility = [ "*" ]
239
240 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200241 "objc/native/src/audio/audio_device_ios.h",
242 "objc/native/src/audio/audio_device_ios.mm",
243 "objc/native/src/audio/audio_device_module_ios.h",
244 "objc/native/src/audio/audio_device_module_ios.mm",
245 "objc/native/src/audio/helpers.h",
246 "objc/native/src/audio/helpers.mm",
247 "objc/native/src/audio/voice_processing_audio_unit.h",
248 "objc/native/src/audio/voice_processing_audio_unit.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200249 ]
250
251 deps = [
252 ":audio_objc",
253 ":audio_session_observer",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200254 ":base_objc",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200255 "../api:array_view",
256 "../modules/audio_device:audio_device_api",
257 "../modules/audio_device:audio_device_buffer",
258 "../modules/audio_device:audio_device_generic",
259 "../rtc_base:checks",
260 "../rtc_base:rtc_base",
261 "../rtc_base/system:fallthrough",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200262 "../system_wrappers:metrics",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200263 ]
264
265 if (is_clang) {
266 # Suppress warnings from the Chromium Clang plugin
267 # (bugs.webrtc.org/163).
268 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
269 }
270 }
271
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100272 rtc_static_library("audio_objc") {
273 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200274 "objc/components/audio/RTCAudioSession+Configuration.mm",
275 "objc/components/audio/RTCAudioSession+Private.h",
276 "objc/components/audio/RTCAudioSession.h",
277 "objc/components/audio/RTCAudioSession.mm",
278 "objc/components/audio/RTCAudioSessionConfiguration.h",
279 "objc/components/audio/RTCAudioSessionConfiguration.m",
280 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.h",
281 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100282 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200283 configs += [
284 "..:common_objc",
285 ":used_from_extension",
286 ]
denicija59ee91b2017-06-05 05:48:47 -0700287
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100288 public_configs = [ ":common_config_objc" ]
Anders Carlsson8ecfd802017-09-15 14:07:30 +0200289
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100290 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200291 ":audio_session_observer",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200292 ":base_objc",
293 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100294 "../rtc_base:checks",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200295 "../rtc_base:rtc_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100296 "../rtc_base:rtc_base_approved",
297 ]
denicija59ee91b2017-06-05 05:48:47 -0700298 }
299 }
zhihuanga4c113a2017-06-28 14:05:44 -0700300
Anders Carlsson9823ee42018-03-07 10:32:03 +0100301 rtc_static_library("videosource_objc") {
zhihuanga4c113a2017-06-28 14:05:44 -0700302 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200303 "objc/api/peerconnection/RTCVideoSource+Private.h",
304 "objc/api/peerconnection/RTCVideoSource.h",
305 "objc/api/peerconnection/RTCVideoSource.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700306 ]
307
308 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200309 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100310 ":mediasource_objc",
311 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100312 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700313 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200314 "../api/video:video_frame",
315 "../api/video:video_frame_i420",
zhihuanga4c113a2017-06-28 14:05:44 -0700316 "../common_video",
317 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100318 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700319 "../rtc_base:rtc_base",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100320 "//third_party/libyuv",
zhihuanga4c113a2017-06-28 14:05:44 -0700321 ]
322
Anders Carlsson358f2e02018-06-04 10:24:37 +0200323 configs += [
324 "..:common_objc",
325 ":used_from_extension",
326 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700327 }
328
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100329 rtc_static_library("videoframebuffer_objc") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200330 visibility = [ "*" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100331 sources = [
Anders Carlsson4e5af962018-09-03 14:44:50 +0200332 "objc/api/video_frame_buffer/RTCNativeI420Buffer+Private.h",
333 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
334 "objc/api/video_frame_buffer/RTCNativeI420Buffer.mm",
335 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
336 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200337 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
338 "objc/components/video_frame_buffer/RTCCVPixelBuffer.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100339 ]
340 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200341 ":base_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200342 "//api/video:video_frame",
343 "//api/video:video_frame_i420",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100344 "//common_video",
345 "//rtc_base:checks",
346 "//rtc_base:rtc_base_approved",
347 "//third_party/libyuv",
348 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200349 configs += [
350 "..:common_objc",
351 ":used_from_extension",
352 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100353 }
354
kthelgason36d658d2017-08-24 05:43:45 -0700355 rtc_static_library("video_objc") {
kthelgason2f088792017-05-30 01:48:47 -0700356 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200357 "objc/components/renderer/opengl/RTCDefaultShader.h",
358 "objc/components/renderer/opengl/RTCDefaultShader.mm",
359 "objc/components/renderer/opengl/RTCI420TextureCache.h",
360 "objc/components/renderer/opengl/RTCI420TextureCache.mm",
361 "objc/components/renderer/opengl/RTCOpenGLDefines.h",
362 "objc/components/renderer/opengl/RTCShader.h",
363 "objc/components/renderer/opengl/RTCShader.mm",
364 "objc/components/renderer/opengl/RTCVideoViewShading.h",
kthelgason2f088792017-05-30 01:48:47 -0700365 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700366 libs = []
denicijad2088152017-04-28 02:14:54 -0700367 if (is_ios) {
denicija070d5e32017-02-26 11:44:13 -0800368 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200369 "objc/components/renderer/opengl/RTCNV12TextureCache.h",
370 "objc/components/renderer/opengl/RTCNV12TextureCache.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700371 ]
372 libs += [
373 "GLKit.framework",
374 "OpenGLES.framework",
375 "QuartzCore.framework",
376 ]
377 } else if (is_mac) {
mbonadei2c8ac1b2017-05-31 05:14:26 -0700378 libs += [
379 "CoreMedia.framework",
380 "CoreVideo.framework",
381 "OpenGL.framework",
denicija070d5e32017-02-26 11:44:13 -0800382 ]
383 }
mbonadei2c8ac1b2017-05-31 05:14:26 -0700384
kthelgason2f088792017-05-30 01:48:47 -0700385 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200386 ":base_objc",
387 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100388 ":mediaconstraints_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100389 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100390 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100391 ":videosource_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700392 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200393 "../api/video:video_frame",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700394 "../common_video",
395 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100396 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700397 "../rtc_base:rtc_base",
Danil Chapovalov196100e2018-06-21 10:17:24 +0200398 "//third_party/abseil-cpp/absl/types:optional",
tkchin9eeb6242016-04-27 01:54:20 -0700399 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700400
Anders Carlsson358f2e02018-06-04 10:24:37 +0200401 configs += [
402 "..:common_objc",
403 ":used_from_extension",
404 ]
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800405 }
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800406
kthelgason36d658d2017-08-24 05:43:45 -0700407 rtc_static_library("ui_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000408 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200409 allow_poison = [
410 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
411 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
412 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700413 if (is_ios) {
414 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200415 "objc/components/renderer/opengl/RTCDisplayLinkTimer.h",
416 "objc/components/renderer/opengl/RTCDisplayLinkTimer.m",
417 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
418 "objc/components/renderer/opengl/RTCEAGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700419 ]
420 }
421 if (is_mac) {
422 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200423 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
424 "objc/components/renderer/opengl/RTCNSGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700425 ]
426 }
427 configs += [ "..:common_objc" ]
428 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200429 ":base_objc",
430 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100431 ":video_objc",
432 ":videocapture_objc",
433 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700434 ]
435 }
kthelgasonebc34e72016-09-15 04:30:18 -0700436
mbonadei2c8ac1b2017-05-31 05:14:26 -0700437 if (rtc_use_metal_rendering) {
kthelgason36d658d2017-08-24 05:43:45 -0700438 rtc_static_library("metal_objc") {
Mirko Bonadeid68956d2018-02-16 17:55:36 +0100439 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200440 allow_poison = [
441 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
442 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
443 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700444 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200445 "objc/components/renderer/metal/RTCMTLI420Renderer.h",
446 "objc/components/renderer/metal/RTCMTLI420Renderer.mm",
447 "objc/components/renderer/metal/RTCMTLRenderer+Private.h",
448 "objc/components/renderer/metal/RTCMTLRenderer.h",
449 "objc/components/renderer/metal/RTCMTLRenderer.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700450 ]
451 if (is_ios) {
452 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200453 "objc/components/renderer/metal/RTCMTLNV12Renderer.h",
454 "objc/components/renderer/metal/RTCMTLNV12Renderer.mm",
455 "objc/components/renderer/metal/RTCMTLRGBRenderer.h",
456 "objc/components/renderer/metal/RTCMTLRGBRenderer.mm",
457 "objc/components/renderer/metal/RTCMTLVideoView.h",
458 "objc/components/renderer/metal/RTCMTLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700459 ]
460 }
461 if (is_mac) {
462 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200463 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
464 "objc/components/renderer/metal/RTCMTLNSVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700465 ]
466 }
467 libs = [
468 "CoreVideo.framework",
469 "Metal.framework",
470 "MetalKit.framework",
471 ]
472 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200473 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100474 ":peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700475 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100476 ":videoframebuffer_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200477 "../api/video:video_frame",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100478 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700479 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700480 ]
481 configs += [ "..:common_objc" ]
kthelgason36d658d2017-08-24 05:43:45 -0700482 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700483 }
484 }
485
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200486 # TODO(bugs.webrtc.org/9627): Remove this target.
Anders Carlsson73119182018-03-15 09:41:03 +0100487 rtc_static_library("videocapturebase_objc") {
488 visibility = [ "*" ]
489 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200490 "objc/helpers/noop.mm",
Anders Carlsson73119182018-03-15 09:41:03 +0100491 ]
Anders Carlsson73119182018-03-15 09:41:03 +0100492
493 configs += [ "..:common_objc" ]
494
495 public_configs = [ ":common_config_objc" ]
496
497 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200498 ":base_objc",
Anders Carlsson73119182018-03-15 09:41:03 +0100499 ":videoframebuffer_objc",
500 ]
501 }
502
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100503 rtc_static_library("videocapture_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000504 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200505 allow_poison = [
506 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
507 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
508 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700509 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200510 "objc/components/capturer/RTCCameraVideoCapturer.h",
511 "objc/components/capturer/RTCCameraVideoCapturer.m",
zhihuanga4c113a2017-06-28 14:05:44 -0700512 ]
513 if (is_ios) {
514 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200515 "objc/components/capturer/RTCFileVideoCapturer.h",
516 "objc/components/capturer/RTCFileVideoCapturer.m",
zhihuanga4c113a2017-06-28 14:05:44 -0700517 ]
518 }
519 libs = [ "AVFoundation.framework" ]
520
zhihuanga4c113a2017-06-28 14:05:44 -0700521 configs += [ "..:common_objc" ]
522
kthelgason36d658d2017-08-24 05:43:45 -0700523 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700524
zhihuanga4c113a2017-06-28 14:05:44 -0700525 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200526 ":base_objc",
527 ":helpers_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700528 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100529 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700530 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700531 }
532
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100533 rtc_static_library("videocodec_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200534 visibility = [ "*" ]
Mirko Bonadei96ede162018-09-06 13:45:44 +0200535 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100536 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200537 "objc/components/video_codec/RTCCodecSpecificInfoH264+Private.h",
538 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
539 "objc/components/video_codec/RTCCodecSpecificInfoH264.mm",
540 "objc/components/video_codec/RTCH264ProfileLevelId.h",
541 "objc/components/video_codec/RTCH264ProfileLevelId.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700542 ]
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300543 if (is_ios) {
544 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200545 "objc/components/video_codec/UIDevice+H264Profile.h",
546 "objc/components/video_codec/UIDevice+H264Profile.mm",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300547 ]
548 }
zhihuanga4c113a2017-06-28 14:05:44 -0700549 if (!build_with_chromium && is_clang) {
550 # Suppress warnings from the Chromium Clang plugin
551 # (bugs.webrtc.org/163).
552 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
553 }
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100554 public_configs = [ ":common_config_objc" ]
555 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200556 ":base_objc",
557 ":helpers_objc",
kthelgasonfb143122017-07-25 07:55:58 -0700558 "../api/video_codecs:video_codecs_api",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100559 "../common_video",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300560 "../media:rtc_h264_profile_id",
zhihuanga4c113a2017-06-28 14:05:44 -0700561 "../media:rtc_media_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100562 "../modules:module_api",
563 "../modules/video_coding:video_codec_interface",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200564 "../rtc_base:checks",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100565 "../rtc_base:rtc_base_approved",
zhihuanga4c113a2017-06-28 14:05:44 -0700566 ]
567 }
568
Anders Carlssondd8c1652018-01-30 10:32:13 +0100569 rtc_static_library("default_codec_factory_objc") {
570 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200571 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
572 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.m",
573 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
574 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.m",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100575 ]
576
577 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200578 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100579 ":native_video",
580 ":videocodec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200581 ":videotoolbox_objc",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +0200582 ":vp8",
583 ":vp9",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200584 ":vpx_codec_constants",
585 ]
586 }
587
588 rtc_static_library("vpx_codec_constants") {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200589 configs += [ "..:no_global_constructors" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200590 sources = [
591 "objc/api/video_codec/RTCVideoCodecConstants.h",
592 "objc/api/video_codec/RTCVideoCodecConstants.mm",
593 ]
594
595 deps = [
596 ":base_objc",
597 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100598 ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100599 }
600
601 rtc_static_library("vp8") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100602 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200603 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100604 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200605 "objc/api/video_codec/RTCVideoDecoderVP8.h",
606 "objc/api/video_codec/RTCVideoDecoderVP8.mm",
607 "objc/api/video_codec/RTCVideoEncoderVP8.h",
608 "objc/api/video_codec/RTCVideoEncoderVP8.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100609 ]
610
Anders Carlssondd8c1652018-01-30 10:32:13 +0100611 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200612 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100613 ":wrapped_native_codec_objc",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100614 "../modules/video_coding:webrtc_vp8",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100615 ]
616 }
617
618 rtc_static_library("vp9") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100619 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200620 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100621 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200622 "objc/api/video_codec/RTCVideoDecoderVP9.h",
623 "objc/api/video_codec/RTCVideoDecoderVP9.mm",
624 "objc/api/video_codec/RTCVideoEncoderVP9.h",
625 "objc/api/video_codec/RTCVideoEncoderVP9.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100626 ]
627
Anders Carlssondd8c1652018-01-30 10:32:13 +0100628 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200629 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100630 ":wrapped_native_codec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200631 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100632 "../modules/video_coding:webrtc_vp9",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100633 ]
634 }
635
zhihuanga4c113a2017-06-28 14:05:44 -0700636 # Build the PeerConnectionFactory without audio/video support.
637 # This target depends on the objc_peeerconnectionfactory_base which still
638 # includes some audio/video related objects such as RTCAudioSource because
639 # these objects are just thin wrappers of native C++ interfaces required
640 # when implementing webrtc::PeerConnectionFactoryInterface and
641 # webrtc::PeerConnectionInterface.
Kári Tristan Helgasona2d89fc2018-03-06 10:18:43 +0100642 # The applications which only use WebRTC DataChannel can depend on this.
kthelgason36d658d2017-08-24 05:43:45 -0700643 rtc_static_library("peerconnectionfactory_no_media_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000644 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200645 allow_poison = [
646 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
647 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
648 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700649 defines = [ "HAVE_NO_MEDIA" ]
650
651 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200652 "objc/helpers/noop.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700653 ]
654
kthelgason36d658d2017-08-24 05:43:45 -0700655 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700656
zhihuanga4c113a2017-06-28 14:05:44 -0700657 deps = [
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100658 ":native_api",
659 ":native_video",
kthelgason36d658d2017-08-24 05:43:45 -0700660 ":peerconnectionfactory_base_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700661 "../api:libjingle_peerconnection_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700662 "../rtc_base:rtc_base",
zhihuanga4c113a2017-06-28 14:05:44 -0700663 ]
664 }
665
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100666 rtc_static_library("mediaconstraints_objc") {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200667 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100668 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200669 "objc/api/peerconnection/RTCMediaConstraints+Private.h",
670 "objc/api/peerconnection/RTCMediaConstraints.h",
671 "objc/api/peerconnection/RTCMediaConstraints.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100672 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100673
674 public_configs = [ ":common_config_objc" ]
675 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200676 ":base_objc",
677 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100678 "../api:libjingle_peerconnection_api",
679 ]
680 }
681
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200682 # TODO(bugs.webrtc.org/9627): Remove, targets should depend on base_objc.
Anders Carlsson9823ee42018-03-07 10:32:03 +0100683 rtc_source_set("videorenderer_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200684 visibility = [ "*" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100685 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200686 "objc/helpers/noop.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100687 ]
688
689 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100690 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200691
692 deps = [
693 ":base_objc",
694 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100695 }
696
697 rtc_static_library("videorendereradapter_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200698 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200699 allow_poison = [
700 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
701 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
702 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100703 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200704 "objc/api/RTCVideoRendererAdapter+Private.h",
705 "objc/api/RTCVideoRendererAdapter.h",
706 "objc/api/RTCVideoRendererAdapter.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100707 ]
708
709 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100710 public_configs = [ ":common_config_objc" ]
711
712 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200713 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100714 ":native_api",
715 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100716 "../api:libjingle_peerconnection_api",
717 ]
718 }
719
720 rtc_static_library("mediasource_objc") {
721 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200722 "objc/api/peerconnection/RTCMediaSource+Private.h",
723 "objc/api/peerconnection/RTCMediaSource.h",
724 "objc/api/peerconnection/RTCMediaSource.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100725 ]
726
Anders Carlsson358f2e02018-06-04 10:24:37 +0200727 configs += [
728 "..:common_objc",
729 ":used_from_extension",
730 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100731 public_configs = [ ":common_config_objc" ]
732
733 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200734 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100735 "../api:libjingle_peerconnection_api",
736 "../rtc_base:checks",
737 ]
738 }
739
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200740 rtc_static_library("base_native_additions_objc") {
741 sources = [
742 "objc/api/peerconnection/RTCEncodedImage+Private.h",
743 "objc/api/peerconnection/RTCEncodedImage+Private.mm",
744 "objc/api/peerconnection/RTCRtpFragmentationHeader+Private.h",
745 "objc/api/peerconnection/RTCRtpFragmentationHeader+Private.mm",
746 "objc/api/peerconnection/RTCVideoCodecInfo+Private.h",
747 "objc/api/peerconnection/RTCVideoCodecInfo+Private.mm",
748 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.h",
749 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.mm",
750 ]
751
752 configs += [ "..:common_objc" ]
753
754 public_configs = [ ":common_config_objc" ]
755
756 deps = [
757 ":base_objc",
758 ":helpers_objc",
759 "../api/video_codecs:video_codecs_api",
760 "../common_video",
761 "../modules:module_api",
762 "../modules/video_coding:video_codec_interface",
763 "../rtc_base:rtc_base",
764 ]
765
766 if (!build_with_chromium && is_clang) {
767 # Suppress warnings from the Chromium Clang plugin
768 # (bugs.webrtc.org/163).
769 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
770 }
771 }
772
kthelgason36d658d2017-08-24 05:43:45 -0700773 rtc_static_library("peerconnectionfactory_base_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200774 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200775 allow_poison = [
776 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
777 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
778 ]
Mirko Bonadei96ede162018-09-06 13:45:44 +0200779 configs += [
780 "..:no_exit_time_destructors",
781 "..:no_global_constructors",
782 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700783 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200784 "objc/api/peerconnection/RTCAudioSource+Private.h",
785 "objc/api/peerconnection/RTCAudioSource.h",
786 "objc/api/peerconnection/RTCAudioSource.mm",
787 "objc/api/peerconnection/RTCAudioTrack+Private.h",
788 "objc/api/peerconnection/RTCAudioTrack.h",
789 "objc/api/peerconnection/RTCAudioTrack.mm",
790 "objc/api/peerconnection/RTCCertificate.h",
791 "objc/api/peerconnection/RTCCertificate.mm",
792 "objc/api/peerconnection/RTCConfiguration+Native.h",
793 "objc/api/peerconnection/RTCConfiguration+Private.h",
794 "objc/api/peerconnection/RTCConfiguration.h",
795 "objc/api/peerconnection/RTCConfiguration.mm",
796 "objc/api/peerconnection/RTCDataChannel+Private.h",
797 "objc/api/peerconnection/RTCDataChannel.h",
798 "objc/api/peerconnection/RTCDataChannel.mm",
799 "objc/api/peerconnection/RTCDataChannelConfiguration+Private.h",
800 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
801 "objc/api/peerconnection/RTCDataChannelConfiguration.mm",
802 "objc/api/peerconnection/RTCDtmfSender+Private.h",
803 "objc/api/peerconnection/RTCDtmfSender.h",
804 "objc/api/peerconnection/RTCDtmfSender.mm",
805 "objc/api/peerconnection/RTCFieldTrials.h",
806 "objc/api/peerconnection/RTCFieldTrials.mm",
807 "objc/api/peerconnection/RTCIceCandidate+Private.h",
808 "objc/api/peerconnection/RTCIceCandidate.h",
809 "objc/api/peerconnection/RTCIceCandidate.mm",
810 "objc/api/peerconnection/RTCIceServer+Private.h",
811 "objc/api/peerconnection/RTCIceServer.h",
812 "objc/api/peerconnection/RTCIceServer.mm",
813 "objc/api/peerconnection/RTCIntervalRange+Private.h",
814 "objc/api/peerconnection/RTCIntervalRange.h",
815 "objc/api/peerconnection/RTCIntervalRange.mm",
816 "objc/api/peerconnection/RTCLegacyStatsReport+Private.h",
817 "objc/api/peerconnection/RTCLegacyStatsReport.h",
818 "objc/api/peerconnection/RTCLegacyStatsReport.mm",
819 "objc/api/peerconnection/RTCMediaStream+Private.h",
820 "objc/api/peerconnection/RTCMediaStream.h",
821 "objc/api/peerconnection/RTCMediaStream.mm",
822 "objc/api/peerconnection/RTCMediaStreamTrack+Private.h",
823 "objc/api/peerconnection/RTCMediaStreamTrack.h",
824 "objc/api/peerconnection/RTCMediaStreamTrack.mm",
825 "objc/api/peerconnection/RTCMetrics.h",
826 "objc/api/peerconnection/RTCMetrics.mm",
827 "objc/api/peerconnection/RTCMetricsSampleInfo+Private.h",
828 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
829 "objc/api/peerconnection/RTCMetricsSampleInfo.mm",
830 "objc/api/peerconnection/RTCPeerConnection+DataChannel.mm",
831 "objc/api/peerconnection/RTCPeerConnection+Native.h",
832 "objc/api/peerconnection/RTCPeerConnection+Private.h",
833 "objc/api/peerconnection/RTCPeerConnection+Stats.mm",
834 "objc/api/peerconnection/RTCPeerConnection.h",
835 "objc/api/peerconnection/RTCPeerConnection.mm",
836 "objc/api/peerconnection/RTCPeerConnectionFactory+Native.h",
837 "objc/api/peerconnection/RTCPeerConnectionFactory+Private.h",
838 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
839 "objc/api/peerconnection/RTCPeerConnectionFactory.mm",
840 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.h",
841 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.mm",
842 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.h",
843 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.mm",
844 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions+Private.h",
845 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
846 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.mm",
847 "objc/api/peerconnection/RTCRtcpParameters+Private.h",
848 "objc/api/peerconnection/RTCRtcpParameters.h",
849 "objc/api/peerconnection/RTCRtcpParameters.mm",
850 "objc/api/peerconnection/RTCRtpCodecParameters+Private.h",
851 "objc/api/peerconnection/RTCRtpCodecParameters.h",
852 "objc/api/peerconnection/RTCRtpCodecParameters.mm",
853 "objc/api/peerconnection/RTCRtpEncodingParameters+Private.h",
854 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
855 "objc/api/peerconnection/RTCRtpEncodingParameters.mm",
856 "objc/api/peerconnection/RTCRtpHeaderExtension+Private.h",
857 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
858 "objc/api/peerconnection/RTCRtpHeaderExtension.mm",
859 "objc/api/peerconnection/RTCRtpParameters+Private.h",
860 "objc/api/peerconnection/RTCRtpParameters.h",
861 "objc/api/peerconnection/RTCRtpParameters.mm",
862 "objc/api/peerconnection/RTCRtpReceiver+Private.h",
863 "objc/api/peerconnection/RTCRtpReceiver.h",
864 "objc/api/peerconnection/RTCRtpReceiver.mm",
865 "objc/api/peerconnection/RTCRtpSender+Private.h",
866 "objc/api/peerconnection/RTCRtpSender.h",
867 "objc/api/peerconnection/RTCRtpSender.mm",
868 "objc/api/peerconnection/RTCRtpTransceiver+Private.h",
869 "objc/api/peerconnection/RTCRtpTransceiver.h",
870 "objc/api/peerconnection/RTCRtpTransceiver.mm",
871 "objc/api/peerconnection/RTCSSLAdapter.h",
872 "objc/api/peerconnection/RTCSSLAdapter.mm",
873 "objc/api/peerconnection/RTCSessionDescription+Private.h",
874 "objc/api/peerconnection/RTCSessionDescription.h",
875 "objc/api/peerconnection/RTCSessionDescription.mm",
876 "objc/api/peerconnection/RTCTracing.h",
877 "objc/api/peerconnection/RTCTracing.mm",
878 "objc/api/peerconnection/RTCVideoTrack+Private.h",
879 "objc/api/peerconnection/RTCVideoTrack.h",
880 "objc/api/peerconnection/RTCVideoTrack.mm",
kthelgason5fe4d492016-12-05 11:27:30 -0800881 ]
kthelgasonebc34e72016-09-15 04:30:18 -0700882
Anders Carlsson358f2e02018-06-04 10:24:37 +0200883 configs += [
884 "..:common_objc",
885 ":used_from_extension",
886 ]
kthelgason36d658d2017-08-24 05:43:45 -0700887 public_configs = [ ":common_config_objc" ]
kthelgasonc0977102017-04-24 00:57:16 -0700888
mbonadei2c8ac1b2017-05-31 05:14:26 -0700889 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200890 ":base_native_additions_objc",
891 ":base_objc",
892 ":file_logger_objc",
893 ":helpers_objc",
894 ":legacy_header_paths",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100895 ":mediaconstraints_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100896 ":mediasource_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100897 ":native_api",
898 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100899 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100900 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100901 ":videorendereradapter_objc",
902 ":videosource_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200903 ":videotoolbox_objc",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100904 "../api:libjingle_peerconnection_api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700905 "../api/audio_codecs:audio_codecs_api",
Karl Wiberg5817d3d2018-04-06 10:06:42 +0200906 "../api/audio_codecs:builtin_audio_decoder_factory",
Jiawei Ouae810c12018-06-20 16:18:59 -0700907 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200908 "../api/video:video_frame",
Anders Carlsson7e042812017-10-05 16:55:38 +0200909 "../api/video_codecs:video_codecs_api",
Anders Carlssone5960ce2017-06-22 15:26:30 +0200910 "../common_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700911 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -0700912 "../modules:module_api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700913 "../modules/audio_device:audio_device_api",
914 "../modules/audio_processing:audio_processing",
Patrik Höglund99175c62018-01-08 11:05:10 +0100915 "../modules/video_coding:video_codec_interface",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100916 "../pc:create_pc_factory",
zhihuanga4c113a2017-06-28 14:05:44 -0700917 "../pc:peerconnection",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100918 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700919 "../rtc_base:rtc_base",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200920 "../system_wrappers:field_trial",
921 "../system_wrappers:metrics",
Mirko Bonadei879f7882018-07-11 09:18:37 +0200922 "//third_party/abseil-cpp/absl/memory",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700923 ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200924
925 if (is_ios) {
926 deps += [ ":native_api_audio_device_module" ]
927 }
kthelgasonebc34e72016-09-15 04:30:18 -0700928 }
Zeke Chindd0e1e02016-10-11 13:27:26 -0700929
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200930 # TODO(bugs.webrtc.org/9627): Remove this target.
931 rtc_source_set("legacy_header_paths") {
932 sources = [
933 "objc/Framework/Classes/Common/NSString+StdString.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200934 "objc/Framework/Classes/Common/scoped_cftyperef.h",
935 "objc/Framework/Classes/PeerConnection/RTCConfiguration+Native.h",
936 "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Native.h",
937 "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Native.h",
938 "objc/Framework/Classes/PeerConnection/RTCVideoCodec+Private.h",
939 "objc/Framework/Classes/Video/RTCDefaultShader.h",
940 "objc/Framework/Classes/Video/RTCNV12TextureCache.h",
941 "objc/Framework/Classes/VideoToolbox/nalu_rewriter.h",
942 "objc/Framework/Headers/WebRTC/RTCAudioSession.h",
943 "objc/Framework/Headers/WebRTC/RTCAudioSessionConfiguration.h",
944 "objc/Framework/Headers/WebRTC/RTCAudioSource.h",
945 "objc/Framework/Headers/WebRTC/RTCAudioTrack.h",
946 "objc/Framework/Headers/WebRTC/RTCCVPixelBuffer.h",
947 "objc/Framework/Headers/WebRTC/RTCCallbackLogger.h",
948 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
949 "objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h",
950 "objc/Framework/Headers/WebRTC/RTCCertificate.h",
951 "objc/Framework/Headers/WebRTC/RTCConfiguration.h",
952 "objc/Framework/Headers/WebRTC/RTCDataChannel.h",
953 "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h",
954 "objc/Framework/Headers/WebRTC/RTCDefaultVideoDecoderFactory.h",
955 "objc/Framework/Headers/WebRTC/RTCDefaultVideoEncoderFactory.h",
956 "objc/Framework/Headers/WebRTC/RTCDispatcher.h",
957 "objc/Framework/Headers/WebRTC/RTCDtmfSender.h",
958 "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
959 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h",
960 "objc/Framework/Headers/WebRTC/RTCFileLogger.h",
961 "objc/Framework/Headers/WebRTC/RTCFileVideoCapturer.h",
962 "objc/Framework/Headers/WebRTC/RTCH264ProfileLevelId.h",
963 "objc/Framework/Headers/WebRTC/RTCIceCandidate.h",
964 "objc/Framework/Headers/WebRTC/RTCIceServer.h",
965 "objc/Framework/Headers/WebRTC/RTCIntervalRange.h",
966 "objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h",
967 "objc/Framework/Headers/WebRTC/RTCLogging.h",
968 "objc/Framework/Headers/WebRTC/RTCMTLNSVideoView.h",
969 "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h",
970 "objc/Framework/Headers/WebRTC/RTCMacros.h",
971 "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h",
972 "objc/Framework/Headers/WebRTC/RTCMediaSource.h",
973 "objc/Framework/Headers/WebRTC/RTCMediaStream.h",
974 "objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h",
975 "objc/Framework/Headers/WebRTC/RTCMetrics.h",
976 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h",
977 "objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h",
978 "objc/Framework/Headers/WebRTC/RTCPeerConnection.h",
979 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h",
980 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactoryOptions.h",
981 "objc/Framework/Headers/WebRTC/RTCRtcpParameters.h",
982 "objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h",
983 "objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h",
984 "objc/Framework/Headers/WebRTC/RTCRtpHeaderExtension.h",
985 "objc/Framework/Headers/WebRTC/RTCRtpParameters.h",
986 "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h",
987 "objc/Framework/Headers/WebRTC/RTCRtpSender.h",
988 "objc/Framework/Headers/WebRTC/RTCRtpTransceiver.h",
989 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
990 "objc/Framework/Headers/WebRTC/RTCSessionDescription.h",
991 "objc/Framework/Headers/WebRTC/RTCTracing.h",
992 "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h",
993 "objc/Framework/Headers/WebRTC/RTCVideoCodec.h",
994 "objc/Framework/Headers/WebRTC/RTCVideoCodecFactory.h",
995 "objc/Framework/Headers/WebRTC/RTCVideoCodecH264.h",
996 "objc/Framework/Headers/WebRTC/RTCVideoCodecInfo.h",
997 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP8.h",
998 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP9.h",
999 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP8.h",
1000 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP9.h",
1001 "objc/Framework/Headers/WebRTC/RTCVideoFrame.h",
1002 "objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.h",
1003 "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h",
1004 "objc/Framework/Headers/WebRTC/RTCVideoSource.h",
1005 "objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
1006 "objc/Framework/Headers/WebRTC/RTCVideoViewShading.h",
1007 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
1008 "objc/Framework/Native/api/audio_device_module.h",
1009 "objc/Framework/Native/api/video_decoder_factory.h",
1010 "objc/Framework/Native/api/video_encoder_factory.h",
1011 "objc/Framework/Native/api/video_frame_buffer.h",
1012 "objc/Framework/Native/src/objc_video_decoder_factory.h",
1013 "objc/Framework/Native/src/objc_video_encoder_factory.h",
1014 ]
1015 }
1016
mbonadei2c8ac1b2017-05-31 05:14:26 -07001017 if (rtc_include_tests) {
Daniela012b56b2017-11-15 13:15:24 +01001018 if (is_ios) {
Danielaae012cf2017-10-12 13:46:00 +02001019 rtc_source_set("sdk_unittests_sources") {
1020 testonly = true
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001021 include_dirs = [ "objc/" ]
Daniela012b56b2017-11-15 13:15:24 +01001022
Danielaae012cf2017-10-12 13:46:00 +02001023 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001024 "objc/unittests/ObjCVideoTrackSource_xctest.mm",
1025 "objc/unittests/RTCCVPixelBuffer_xctest.mm",
1026 "objc/unittests/RTCCallbackLogger_xctest.m",
1027 "objc/unittests/RTCFileVideoCapturer_xctest.mm",
1028 "objc/unittests/RTCH264ProfileLevelId_xctest.m",
1029 "objc/unittests/RTCPeerConnectionFactory_xctest.m",
1030 "objc/unittests/frame_buffer_helpers.h",
1031 "objc/unittests/frame_buffer_helpers.mm",
Danielaae012cf2017-10-12 13:46:00 +02001032 ]
Daniela012b56b2017-11-15 13:15:24 +01001033
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001034 # TODO(peterhanspers): Reenable these tests on simulator.
1035 # See bugs.webrtc.org/7812
1036 if (!use_ios_simulator) {
1037 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001038 "objc/unittests/RTCAudioDeviceModule_xctest.mm",
1039 "objc/unittests/RTCAudioDevice_xctest.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001040 ]
1041 }
1042
Danielaae012cf2017-10-12 13:46:00 +02001043 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001044 ":audio_device",
1045 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001046 ":base_objc",
1047 ":callback_logger_objc",
Anders Carlssondc6b4772018-01-15 13:31:03 +01001048 ":framework_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001049 ":mediaconstraints_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001050 ":native_api",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001051 ":native_api_audio_device_module",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001052 ":native_video",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001053 ":peerconnectionfactory_base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001054 ":videocapture_objc",
Anders Carlsson79ce8202018-06-01 12:51:09 +02001055 ":videocodec_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001056 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001057 ":videosource_objc",
Danielaae012cf2017-10-12 13:46:00 +02001058 ":videotoolbox_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001059 "../api/video:video_frame_i420",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001060 "../common_video:common_video",
Danielaae012cf2017-10-12 13:46:00 +02001061 "../media:rtc_media_base",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001062 "../media:rtc_media_tests_utils",
Danielaae012cf2017-10-12 13:46:00 +02001063 "../modules:module_api",
1064 "../rtc_base:rtc_base",
1065 "../rtc_base:rtc_base_tests_utils",
Oleh Prypinda04e062018-07-23 10:04:12 +02001066 "../system_wrappers:system_wrappers",
1067 "../system_wrappers:system_wrappers_default",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001068 "//third_party/libyuv",
Danielaae012cf2017-10-12 13:46:00 +02001069 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001070
1071 if (rtc_use_metal_rendering) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001072 sources += [ "objc/unittests/RTCMTLVideoView_xctest.m" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001073 deps += [ ":metal_objc" ]
1074 }
1075
Danielaae012cf2017-10-12 13:46:00 +02001076 public_deps = [
1077 "//build/config/ios:xctest",
1078 "//third_party/ocmock",
1079 ]
1080 }
1081
Daniela012b56b2017-11-15 13:15:24 +01001082 bundle_data("sdk_unittests_bundle_data") {
Daniela012b56b2017-11-15 13:15:24 +01001083 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001084 "objc/unittests/audio_short16.pcm",
1085 "objc/unittests/audio_short44.pcm",
1086 "objc/unittests/audio_short48.pcm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001087
1088 # Sample video taken from https://media.xiph.org/video/derf/
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001089 "objc/unittests/foreman.mp4",
Daniela012b56b2017-11-15 13:15:24 +01001090 ]
1091 outputs = [
1092 "{{bundle_resources_dir}}/{{source_file_part}}",
1093 ]
1094 }
1095
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001096 # These tests use static linking.
Danielaae012cf2017-10-12 13:46:00 +02001097 rtc_ios_xctest_test("sdk_unittests") {
1098 info_plist = "//test/ios/Info.plist"
1099 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001100 "objc/unittests/main.m",
Danielaae012cf2017-10-12 13:46:00 +02001101 ]
Daniela012b56b2017-11-15 13:15:24 +01001102
Danielaae012cf2017-10-12 13:46:00 +02001103 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
1104 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
1105 deps = [
Yura Yaroshevich5297bd22018-06-19 12:51:51 +03001106 ":peerconnectionfactory_base_objc",
Daniela012b56b2017-11-15 13:15:24 +01001107 ":sdk_unittests_bundle_data",
Danielaae012cf2017-10-12 13:46:00 +02001108 ":sdk_unittests_sources",
1109 ]
1110 ldflags = [ "-all_load" ]
1111 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001112
1113 # These tests link to the framework.
1114 rtc_ios_xctest_test("sdk_framework_unittests") {
1115 info_plist = "//test/ios/Info.plist"
1116 sources = [
1117 "objc/unittests/RTCDoNotPutCPlusPlusInFrameworkHeaders_xctest.m",
1118 "objc/unittests/main.m",
1119 ]
1120
1121 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
1122 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
1123 deps = [
1124 ":framework_objc+link",
1125 ":ios_framework_bundle",
1126 ]
1127 }
Danielaae012cf2017-10-12 13:46:00 +02001128 }
1129
1130 # TODO(denicija): once all tests are migrated to xctest remove this source set.
Kári Tristan Helgason90143242018-07-27 12:34:54 +02001131 rtc_source_set("rtc_unittests_objc") {
mbonadei2c8ac1b2017-05-31 05:14:26 -07001132 testonly = true
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001133
mbonadei2c8ac1b2017-05-31 05:14:26 -07001134 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001135 "objc/unittests/RTCCertificateTest.mm",
1136 "objc/unittests/RTCConfigurationTest.mm",
1137 "objc/unittests/RTCDataChannelConfigurationTest.mm",
1138 "objc/unittests/RTCIceCandidateTest.mm",
1139 "objc/unittests/RTCIceServerTest.mm",
1140 "objc/unittests/RTCIntervalRangeTests.mm",
1141 "objc/unittests/RTCMediaConstraintsTest.mm",
1142 "objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm",
1143 "objc/unittests/RTCPeerConnectionTest.mm",
1144 "objc/unittests/RTCSessionDescriptionTest.mm",
1145 "objc/unittests/RTCTracingTest.mm",
1146 "objc/unittests/objc_video_decoder_factory_tests.mm",
1147 "objc/unittests/objc_video_encoder_factory_tests.mm",
1148 "objc/unittests/scoped_cftyperef_tests.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001149 ]
Anders Carlssone7dd83f2018-01-19 11:28:44 +01001150 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001151 sources += [ "objc/unittests/RTCCameraVideoCapturerTests.mm" ]
oprypin45197522017-06-22 01:47:20 -07001152 }
mbonadeid7620582017-05-30 01:50:35 -07001153
mbonadei2c8ac1b2017-05-31 05:14:26 -07001154 # |-ObjC| flag needed to make sure category method implementations
1155 # are included:
1156 # https://developer.apple.com/library/mac/qa/qa1490/_index.html
1157 ldflags = [ "-ObjC" ]
magjed3149e092017-05-08 05:32:05 -07001158
mbonadei2c8ac1b2017-05-31 05:14:26 -07001159 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001160 ":base_objc",
1161 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001162 ":mediaconstraints_objc",
1163 ":native_api",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001164 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001165 ":peerconnectionfactory_base_objc",
1166 ":video_objc",
1167 ":videocapture_objc",
1168 ":videocodec_objc",
1169 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001170 ":videosource_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001171 ":videotoolbox_objc",
Jiawei Ouae810c12018-06-20 16:18:59 -07001172 "../api/audio_codecs:audio_codecs_api",
1173 "../api/audio_codecs:builtin_audio_decoder_factory",
1174 "../api/audio_codecs:builtin_audio_encoder_factory",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001175 "../api/video_codecs:video_codecs_api",
kthelgasonebd4f792017-09-04 04:36:21 -07001176 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -07001177 "../modules:module_api",
Jiawei Ouae810c12018-06-20 16:18:59 -07001178 "../modules/audio_device:audio_device_api",
1179 "../modules/audio_processing:audio_processing",
Patrik Höglund99175c62018-01-08 11:05:10 +01001180 "../modules/video_coding:video_codec_interface",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001181 "../rtc_base:rtc_base_tests_utils",
Niels Möllera12c42a2018-07-25 16:05:48 +02001182 "../rtc_base/system:unused",
Oleh Prypinda04e062018-07-23 10:04:12 +02001183 "../system_wrappers:system_wrappers_default",
Kári Tristan Helgasonca957482017-10-05 14:06:52 +02001184 "//test:test_support",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001185 "//third_party/ocmock",
1186 ]
magjed3149e092017-05-08 05:32:05 -07001187
denicija59ee91b2017-06-05 05:48:47 -07001188 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001189 sources += [ "objc/unittests/RTCAudioSessionTest.mm" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001190 deps += [ ":audio_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001191 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001192 }
kthelgason2f088792017-05-30 01:48:47 -07001193 }
1194
mbonadei2c8ac1b2017-05-31 05:14:26 -07001195 if (is_ios) {
Anders Carlssondc6b4772018-01-15 13:31:03 +01001196 ios_framework_bundle_with_umbrella_header("framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001197 info_plist = "objc/Info.plist"
mbonadei2c8ac1b2017-05-31 05:14:26 -07001198 output_name = "WebRTC"
Magnus Jedvertf83dc8b2017-08-29 09:49:43 +00001199
mbonadei2c8ac1b2017-05-31 05:14:26 -07001200 common_objc_headers = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001201 "objc/base/RTCCodecSpecificInfo.h",
1202 "objc/base/RTCEncodedImage.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001203 "objc/base/RTCI420Buffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001204 "objc/base/RTCLogging.h",
1205 "objc/base/RTCMacros.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001206 "objc/base/RTCMutableI420Buffer.h",
1207 "objc/base/RTCMutableYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001208 "objc/base/RTCRtpFragmentationHeader.h",
1209 "objc/base/RTCVideoCapturer.h",
1210 "objc/base/RTCVideoCodecInfo.h",
1211 "objc/base/RTCVideoDecoder.h",
1212 "objc/base/RTCVideoDecoderFactory.h",
1213 "objc/base/RTCVideoEncoder.h",
1214 "objc/base/RTCVideoEncoderFactory.h",
1215 "objc/base/RTCVideoEncoderQpThresholds.h",
1216 "objc/base/RTCVideoEncoderSettings.h",
1217 "objc/base/RTCVideoFrame.h",
1218 "objc/base/RTCVideoFrameBuffer.h",
1219 "objc/base/RTCVideoRenderer.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001220 "objc/base/RTCYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001221 "objc/components/audio/RTCAudioSession.h",
1222 "objc/components/audio/RTCAudioSessionConfiguration.h",
1223 "objc/components/capturer/RTCCameraVideoCapturer.h",
1224 "objc/components/capturer/RTCFileVideoCapturer.h",
1225 "objc/components/renderer/metal/RTCMTLVideoView.h",
1226 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
1227 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1228 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1229 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1230 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1231 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1232 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1233 "objc/components/video_codec/RTCVideoDecoderH264.h",
1234 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1235 "objc/components/video_codec/RTCVideoEncoderH264.h",
1236 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1237 "objc/helpers/RTCCameraPreviewView.h",
1238 "objc/helpers/RTCDispatcher.h",
1239 "objc/helpers/UIDevice+RTCDevice.h",
1240 "objc/api/peerconnection/RTCAudioSource.h",
1241 "objc/api/peerconnection/RTCAudioTrack.h",
1242 "objc/api/peerconnection/RTCConfiguration.h",
1243 "objc/api/peerconnection/RTCDataChannel.h",
1244 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1245 "objc/api/peerconnection/RTCFieldTrials.h",
1246 "objc/api/peerconnection/RTCIceCandidate.h",
1247 "objc/api/peerconnection/RTCIceServer.h",
1248 "objc/api/peerconnection/RTCIntervalRange.h",
1249 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1250 "objc/api/peerconnection/RTCMediaConstraints.h",
1251 "objc/api/peerconnection/RTCMediaSource.h",
1252 "objc/api/peerconnection/RTCMediaStream.h",
1253 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1254 "objc/api/peerconnection/RTCMetrics.h",
1255 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1256 "objc/api/peerconnection/RTCPeerConnection.h",
1257 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1258 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1259 "objc/api/peerconnection/RTCRtcpParameters.h",
1260 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1261 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1262 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1263 "objc/api/peerconnection/RTCRtpParameters.h",
1264 "objc/api/peerconnection/RTCRtpReceiver.h",
1265 "objc/api/peerconnection/RTCRtpSender.h",
1266 "objc/api/peerconnection/RTCRtpTransceiver.h",
1267 "objc/api/peerconnection/RTCDtmfSender.h",
1268 "objc/api/peerconnection/RTCSSLAdapter.h",
1269 "objc/api/peerconnection/RTCSessionDescription.h",
1270 "objc/api/peerconnection/RTCTracing.h",
1271 "objc/api/peerconnection/RTCCertificate.h",
1272 "objc/api/peerconnection/RTCVideoSource.h",
1273 "objc/api/peerconnection/RTCVideoTrack.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001274 "objc/api/video_codec/RTCVideoCodecConstants.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001275 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1276 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1277 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1278 "objc/api/video_codec/RTCVideoEncoderVP9.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001279 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1280 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001281 ]
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001282
mbonadei2c8ac1b2017-05-31 05:14:26 -07001283 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001284 common_objc_headers += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001285 "objc/api/logging/RTCCallbackLogger.h",
1286 "objc/api/peerconnection/RTCFileLogger.h",
Anders Carlsson3b3364e2018-01-30 15:46:13 +01001287 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001288 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001289
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001290 sources = common_objc_headers
1291 public_headers = common_objc_headers
1292
mbonadei2c8ac1b2017-05-31 05:14:26 -07001293 ldflags = [
1294 "-all_load",
1295 "-install_name",
1296 "@rpath/$output_name.framework/$output_name",
1297 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001298
mbonadei2c8ac1b2017-05-31 05:14:26 -07001299 deps = [
kthelgason36d658d2017-08-24 05:43:45 -07001300 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001301 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001302 ":default_codec_factory_objc",
1303 ":native_api",
1304 ":native_video",
1305 ":peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001306 ":ui_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001307 ":videocapture_objc",
1308 ":videocodec_objc",
1309 ":videotoolbox_objc",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001310 "../rtc_base:rtc_base_approved",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +00001311 "../system_wrappers:runtime_enabled_features_default",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001312 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001313 if (rtc_use_metal_rendering) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001314 deps += [ ":metal_objc" ]
1315 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001316 if (!build_with_chromium) {
1317 deps += [
1318 ":callback_logger_objc",
1319 ":file_logger_objc",
1320 ]
1321 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001322
mbonadei2c8ac1b2017-05-31 05:14:26 -07001323 libs = [
1324 "AVFoundation.framework",
1325 "CoreGraphics.framework",
1326 "CoreMedia.framework",
1327 "GLKit.framework",
1328 ]
1329
Anders Carlsson358f2e02018-06-04 10:24:37 +02001330 configs += [
1331 "..:common_objc",
1332 ":used_from_extension",
1333 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001334
kthelgason36d658d2017-08-24 05:43:45 -07001335 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001336 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001337
1338 bundle_data("ios_framework_bundle") {
1339 deps = [
1340 "../sdk:framework_objc",
1341 ]
1342 sources = [
1343 "$root_build_dir/WebRTC.framework",
1344 ]
1345 outputs = [
1346 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
1347 ]
1348 }
1349 }
1350
1351 if (is_mac) {
Anders Carlsson37bbf792018-09-05 16:29:27 +02001352 mac_framework_bundle_with_umbrella_header("mac_framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001353 info_plist = "objc/Info.plist"
1354 output_name = "WebRTC"
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001355
Anders Carlsson37bbf792018-09-05 16:29:27 +02001356 sources = [
1357 "objc/api/peerconnection/RTCAudioSource.h",
1358 "objc/api/peerconnection/RTCAudioTrack.h",
1359 "objc/api/peerconnection/RTCCertificate.h",
1360 "objc/api/peerconnection/RTCConfiguration.h",
1361 "objc/api/peerconnection/RTCDataChannel.h",
1362 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1363 "objc/api/peerconnection/RTCDtmfSender.h",
1364 "objc/api/peerconnection/RTCFieldTrials.h",
1365 "objc/api/peerconnection/RTCIceCandidate.h",
1366 "objc/api/peerconnection/RTCIceServer.h",
1367 "objc/api/peerconnection/RTCIntervalRange.h",
1368 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1369 "objc/api/peerconnection/RTCMediaConstraints.h",
1370 "objc/api/peerconnection/RTCMediaSource.h",
1371 "objc/api/peerconnection/RTCMediaStream.h",
1372 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1373 "objc/api/peerconnection/RTCMetrics.h",
1374 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1375 "objc/api/peerconnection/RTCPeerConnection.h",
1376 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1377 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1378 "objc/api/peerconnection/RTCRtcpParameters.h",
1379 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1380 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1381 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1382 "objc/api/peerconnection/RTCRtpParameters.h",
1383 "objc/api/peerconnection/RTCRtpReceiver.h",
1384 "objc/api/peerconnection/RTCRtpSender.h",
1385 "objc/api/peerconnection/RTCRtpTransceiver.h",
1386 "objc/api/peerconnection/RTCSSLAdapter.h",
1387 "objc/api/peerconnection/RTCSessionDescription.h",
1388 "objc/api/peerconnection/RTCTracing.h",
1389 "objc/api/peerconnection/RTCVideoSource.h",
1390 "objc/api/peerconnection/RTCVideoTrack.h",
1391 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1392 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1393 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1394 "objc/api/video_codec/RTCVideoEncoderVP9.h",
1395 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1396 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
1397 "objc/base/RTCCodecSpecificInfo.h",
1398 "objc/base/RTCEncodedImage.h",
1399 "objc/base/RTCI420Buffer.h",
1400 "objc/base/RTCLogging.h",
1401 "objc/base/RTCMacros.h",
1402 "objc/base/RTCMutableI420Buffer.h",
1403 "objc/base/RTCMutableYUVPlanarBuffer.h",
1404 "objc/base/RTCRtpFragmentationHeader.h",
1405 "objc/base/RTCVideoCapturer.h",
1406 "objc/base/RTCVideoCodecInfo.h",
1407 "objc/base/RTCVideoDecoder.h",
1408 "objc/base/RTCVideoDecoderFactory.h",
1409 "objc/base/RTCVideoEncoder.h",
1410 "objc/base/RTCVideoEncoderFactory.h",
1411 "objc/base/RTCVideoEncoderQpThresholds.h",
1412 "objc/base/RTCVideoEncoderSettings.h",
1413 "objc/base/RTCVideoFrame.h",
1414 "objc/base/RTCVideoFrameBuffer.h",
1415 "objc/base/RTCVideoRenderer.h",
1416 "objc/base/RTCYUVPlanarBuffer.h",
1417 "objc/components/capturer/RTCCameraVideoCapturer.h",
1418 "objc/components/capturer/RTCFileVideoCapturer.h",
1419 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
1420 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
1421 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1422 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1423 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1424 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1425 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1426 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1427 "objc/components/video_codec/RTCVideoDecoderH264.h",
1428 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1429 "objc/components/video_codec/RTCVideoEncoderH264.h",
1430 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1431 "objc/helpers/RTCDispatcher.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001432 ]
Anders Carlsson37bbf792018-09-05 16:29:27 +02001433 if (!build_with_chromium) {
1434 sources += [
1435 "objc/api/logging/RTCCallbackLogger.h",
1436 "objc/api/peerconnection/RTCFileLogger.h",
1437 ]
1438 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001439
1440 deps = [
1441 ":base_objc",
1442 ":default_codec_factory_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001443 ":native_api",
1444 ":native_video",
1445 ":peerconnectionfactory_base_objc",
1446 ":ui_objc",
1447 ":videocapture_objc",
1448 ":videocodec_objc",
1449 ":videotoolbox_objc",
1450 "../rtc_base:rtc_base_approved",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001451 "../system_wrappers:runtime_enabled_features_default",
1452 ]
1453 if (rtc_use_metal_rendering) {
1454 deps += [ ":metal_objc" ]
1455 }
1456 if (!build_with_chromium) {
1457 deps += [
1458 ":callback_logger_objc",
1459 ":file_logger_objc",
1460 ]
1461 }
1462
1463 libs = [
1464 "AVFoundation.framework",
1465 "CoreGraphics.framework",
1466 "CoreMedia.framework",
1467 "OpenGL.framework",
1468 ]
1469
Anders Carlsson37bbf792018-09-05 16:29:27 +02001470 configs = [ "..:common_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001471
1472 public_configs = [ ":common_config_objc" ]
1473 }
1474
1475 bundle_data("mac_framework_bundle") {
1476 deps = [
1477 "../sdk:mac_framework_objc",
1478 ]
1479 sources = [
1480 "$root_build_dir/WebRTC.framework",
1481 ]
1482 outputs = [
1483 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
1484 ]
1485 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001486 }
1487
Anders Carlsson9823ee42018-03-07 10:32:03 +01001488 rtc_static_library("wrapped_native_codec_objc") {
1489 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001490 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.h",
1491 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm",
1492 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.h",
1493 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001494 ]
1495
1496 configs += [ "..:common_objc" ]
1497 public_configs = [ ":common_config_objc" ]
1498
Anders Carlsson9823ee42018-03-07 10:32:03 +01001499 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001500 ":base_objc",
1501 ":helpers_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001502 "../api/video_codecs:video_codecs_api",
1503 "../media:rtc_media_base",
1504 ]
1505 }
1506
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001507 # The native API is currently experimental and may change without notice.
1508 rtc_static_library("native_api") {
1509 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +02001510 allow_poison = [
1511 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
1512 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
1513 ]
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001514 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001515 "objc/native/api/video_capturer.h",
1516 "objc/native/api/video_capturer.mm",
1517 "objc/native/api/video_decoder_factory.h",
1518 "objc/native/api/video_decoder_factory.mm",
1519 "objc/native/api/video_encoder_factory.h",
1520 "objc/native/api/video_encoder_factory.mm",
1521 "objc/native/api/video_frame.h",
1522 "objc/native/api/video_frame.mm",
1523 "objc/native/api/video_frame_buffer.h",
1524 "objc/native/api/video_frame_buffer.mm",
1525 "objc/native/api/video_renderer.h",
1526 "objc/native/api/video_renderer.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001527 ]
1528
1529 configs += [ "..:common_objc" ]
1530
1531 public_configs = [ ":common_config_objc" ]
1532
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001533 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001534 ":base_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001535 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001536 ":videoframebuffer_objc",
Anders Carlsson73119182018-03-15 09:41:03 +01001537 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001538 "../api/video:video_frame",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001539 "../api/video_codecs:video_codecs_api",
1540 "../common_video",
1541 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +02001542 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001543 ]
1544 }
1545
1546 rtc_static_library("native_video") {
1547 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001548 "objc/native/src/objc_frame_buffer.h",
1549 "objc/native/src/objc_frame_buffer.mm",
1550 "objc/native/src/objc_video_decoder_factory.h",
1551 "objc/native/src/objc_video_decoder_factory.mm",
1552 "objc/native/src/objc_video_encoder_factory.h",
1553 "objc/native/src/objc_video_encoder_factory.mm",
1554 "objc/native/src/objc_video_frame.h",
1555 "objc/native/src/objc_video_frame.mm",
1556 "objc/native/src/objc_video_renderer.h",
1557 "objc/native/src/objc_video_renderer.mm",
1558 "objc/native/src/objc_video_track_source.h",
1559 "objc/native/src/objc_video_track_source.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001560 ]
1561
1562 configs += [ "..:common_objc" ]
1563
1564 public_configs = [ ":common_config_objc" ]
1565
1566 if (!build_with_chromium && is_clang) {
1567 # Suppress warnings from the Chromium Clang plugin
1568 # (bugs.webrtc.org/163).
1569 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1570 }
1571
1572 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001573 ":base_native_additions_objc",
1574 ":base_objc",
1575 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001576 ":videocodec_objc",
1577 ":videoframebuffer_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001578 ":vpx_codec_constants",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001579 ":wrapped_native_codec_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001580 "../api/video:video_frame",
1581 "../api/video:video_frame_i420",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001582 "../api/video_codecs:video_codecs_api",
1583 "../common_video",
1584 "../media:rtc_audio_video",
1585 "../media:rtc_media_base",
1586 "../modules:module_api",
1587 "../modules/video_coding:video_codec_interface",
1588 "../rtc_base:checks",
1589 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +02001590 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001591 ]
1592 }
1593
mbonadeic0af5ac2017-08-24 12:26:05 -07001594 rtc_static_library("video_toolbox_cc") {
mbonadei6ff8f962017-09-04 05:51:34 -07001595 visibility = [ ":videotoolbox_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001596 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001597 "objc/components/video_codec/helpers.cc",
1598 "objc/components/video_codec/helpers.h",
1599 "objc/components/video_codec/nalu_rewriter.cc",
1600 "objc/components/video_codec/nalu_rewriter.h",
mbonadeic0af5ac2017-08-24 12:26:05 -07001601 ]
1602 deps = [
1603 "../common_video",
1604 "../modules:module_api",
1605 "../modules/video_coding:webrtc_h264",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001606 "../rtc_base:checks",
mbonadeic0af5ac2017-08-24 12:26:05 -07001607 "../rtc_base:rtc_base_approved",
1608 ]
mbonadeic0af5ac2017-08-24 12:26:05 -07001609 }
1610
1611 rtc_static_library("videotoolbox_objc") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001612 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +02001613 allow_poison = [
1614 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
1615 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
1616 ]
mbonadeic0af5ac2017-08-24 12:26:05 -07001617 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001618 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1619 "objc/components/video_codec/RTCVideoDecoderFactoryH264.m",
1620 "objc/components/video_codec/RTCVideoDecoderH264.h",
1621 "objc/components/video_codec/RTCVideoDecoderH264.mm",
1622 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1623 "objc/components/video_codec/RTCVideoEncoderFactoryH264.m",
1624 "objc/components/video_codec/RTCVideoEncoderH264.h",
1625 "objc/components/video_codec/RTCVideoEncoderH264.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001626 ]
1627
Anders Carlsson358f2e02018-06-04 10:24:37 +02001628 configs += [
1629 "..:common_objc",
1630 ":used_from_extension",
1631 ]
1632
1633 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
1634 defines = [ "RTC_APPRTCMOBILE_BROADCAST_EXTENSION" ]
1635 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001636
1637 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001638 ":base_native_additions_objc",
1639 ":base_objc",
1640 ":helpers_objc",
mbonadeic0af5ac2017-08-24 12:26:05 -07001641 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001642 ":videocodec_objc",
1643 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001644 "../common_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001645 "../modules:module_api",
Patrik Höglund99175c62018-01-08 11:05:10 +01001646 "../modules/video_coding:video_codec_interface",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001647 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001648 "../rtc_base:rtc_base_approved",
Mirko Bonadei401d0562017-12-14 11:24:00 +01001649 "//third_party/libyuv",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001650 ]
1651
1652 libs = [
1653 "CoreFoundation.framework",
1654 "CoreMedia.framework",
1655 "CoreVideo.framework",
1656 "VideoToolbox.framework",
1657 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001658 }
1659 }
tkchin9eeb6242016-04-27 01:54:20 -07001660}