blob: 95750fceac2919ac5f0cc8a9cec444e8971bf414 [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 ]
kjellander080a1e32016-05-25 11:37:11 -070046 }
47
Anders Carlsson358f2e02018-06-04 10:24:37 +020048 config("used_from_extension") {
49 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
50 cflags = [ "-fapplication-extension" ]
51 }
52 }
53
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020054 # TODO(bugs.webrtc.org/9627): Remove this when unused. Targets should depend on base_objc
55 # or helpers_objc directly instead.
kthelgason36d658d2017-08-24 05:43:45 -070056 rtc_static_library("common_objc") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +020057 visibility = [ "*" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020058
tkchin9eeb6242016-04-27 01:54:20 -070059 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020060 "objc/helpers/noop.mm",
61 ]
62
63 public_configs = [ ":common_config_objc" ]
64
65 deps = [
66 ":base_objc",
67 ":helpers_objc",
68 ]
69 }
70
71 rtc_static_library("base_objc") {
72 visibility = [ "*" ]
73 sources = [
74 "objc/base/RTCCodecSpecificInfo.h",
75 "objc/base/RTCEncodedImage.h",
76 "objc/base/RTCEncodedImage.m",
77 "objc/base/RTCI420Buffer.h",
78 "objc/base/RTCLogging.h",
79 "objc/base/RTCLogging.mm",
80 "objc/base/RTCMacros.h",
81 "objc/base/RTCMutableI420Buffer.h",
82 "objc/base/RTCMutableYUVPlanarBuffer.h",
83 "objc/base/RTCRtpFragmentationHeader.h",
84 "objc/base/RTCRtpFragmentationHeader.m",
85 "objc/base/RTCVideoCapturer.h",
86 "objc/base/RTCVideoCapturer.m",
87 "objc/base/RTCVideoCodecInfo.h",
88 "objc/base/RTCVideoCodecInfo.m",
89 "objc/base/RTCVideoDecoder.h",
90 "objc/base/RTCVideoDecoderFactory.h",
91 "objc/base/RTCVideoEncoder.h",
92 "objc/base/RTCVideoEncoderFactory.h",
93 "objc/base/RTCVideoEncoderQpThresholds.h",
94 "objc/base/RTCVideoEncoderQpThresholds.m",
95 "objc/base/RTCVideoEncoderSettings.h",
96 "objc/base/RTCVideoEncoderSettings.m",
97 "objc/base/RTCVideoFrame.h",
98 "objc/base/RTCVideoFrame.mm",
99 "objc/base/RTCVideoFrameBuffer.h",
100 "objc/base/RTCVideoRenderer.h",
101 "objc/base/RTCYUVPlanarBuffer.h",
tkchin9eeb6242016-04-27 01:54:20 -0700102 ]
denicijad2088152017-04-28 02:14:54 -0700103
mbonadei1e060c62017-04-21 00:02:02 -0700104 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100105 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700106 "../rtc_base:rtc_base",
mbonadei1e060c62017-04-21 00:02:02 -0700107 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200108 configs += [
109 "..:common_objc",
110 ":used_from_extension",
111 ]
kthelgasonc0977102017-04-24 00:57:16 -0700112
kthelgason36d658d2017-08-24 05:43:45 -0700113 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200114 }
115
116 rtc_static_library("helpers_objc") {
117 sources = [
118 "objc/helpers/AVCaptureSession+DevicePosition.h",
119 "objc/helpers/AVCaptureSession+DevicePosition.mm",
120 "objc/helpers/NSString+StdString.h",
121 "objc/helpers/NSString+StdString.mm",
122 "objc/helpers/RTCDispatcher+Private.h",
123 "objc/helpers/RTCDispatcher.h",
124 "objc/helpers/RTCDispatcher.m",
125 "objc/helpers/RTCUIApplicationStatusObserver.h",
126 "objc/helpers/RTCUIApplicationStatusObserver.m",
127 "objc/helpers/scoped_cftyperef.h",
128 ]
129
130 deps = [
131 ":base_objc",
132 "../rtc_base:checks",
133 ]
134
135 libs = [
136 "AVFoundation.framework",
137 "CoreMedia.framework",
138 ]
139
140 configs += [
141 "..:common_objc",
142 ":used_from_extension",
143 ]
144
145 public_configs = [ ":common_config_objc" ]
denicijad2088152017-04-28 02:14:54 -0700146
kjellander3bcedd32016-06-08 01:14:15 -0700147 if (is_ios) {
148 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200149 "objc/helpers/RTCCameraPreviewView.h",
150 "objc/helpers/RTCCameraPreviewView.m",
151 "objc/helpers/UIDevice+RTCDevice.h",
152 "objc/helpers/UIDevice+RTCDevice.mm",
153 ]
154 }
155 }
156
157 if (!build_with_chromium) {
158 rtc_static_library("callback_logger_objc") {
159 sources = [
160 "objc/api/logging/RTCCallbackLogger.h",
161 "objc/api/logging/RTCCallbackLogger.mm",
162 ]
163
164 deps = [
165 ":base_objc",
166 "../rtc_base:checks",
167 "../rtc_base:logging",
168 "../rtc_base:rtc_base",
169 ]
170
171 configs += [
172 "..:common_objc",
173 ":used_from_extension",
kjellander3bcedd32016-06-08 01:14:15 -0700174 ]
denicijad2088152017-04-28 02:14:54 -0700175 }
176
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200177 rtc_static_library("file_logger_objc") {
178 sources = [
179 "objc/api/peerconnection/RTCFileLogger.h",
180 "objc/api/peerconnection/RTCFileLogger.mm",
181 ]
182
183 deps = [
184 ":base_objc",
185 "../rtc_base:checks",
186 "../rtc_base:logging",
187 "../rtc_base:rtc_base",
188 ]
189
190 configs += [
191 "..:common_objc",
192 ":used_from_extension",
kthelgason2f088792017-05-30 01:48:47 -0700193 ]
194 }
195 }
196
mbonadei2c8ac1b2017-05-31 05:14:26 -0700197 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100198 if (is_ios) {
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200199 rtc_static_library("native_api_audio_device_module") {
200 visibility = [ "*" ]
201
202 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200203 "objc/native/api/audio_device_module.h",
204 "objc/native/api/audio_device_module.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200205 ]
206
207 deps = [
208 ":audio_device",
209 "../modules/audio_device:audio_device_api",
210 "../modules/audio_device:audio_device_generic",
211 "../rtc_base:checks",
212 "../rtc_base:rtc_base_approved",
213 "../system_wrappers",
214 "../system_wrappers:metrics_api",
215 ]
216
217 if (is_clang) {
218 # Suppress warnings from the Chromium Clang plugin
219 # (bugs.webrtc.org/163).
220 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
221 }
222 }
223
224 rtc_source_set("audio_session_observer") {
225 visibility = [ ":*" ]
226
227 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200228 "objc/native/src/audio/audio_session_observer.h",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200229 ]
230
231 deps = [
232 "../rtc_base:rtc_base",
233 ]
234 }
235
236 rtc_static_library("audio_device") {
237 visibility = [ "*" ]
238
239 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200240 "objc/native/src/audio/audio_device_ios.h",
241 "objc/native/src/audio/audio_device_ios.mm",
242 "objc/native/src/audio/audio_device_module_ios.h",
243 "objc/native/src/audio/audio_device_module_ios.mm",
244 "objc/native/src/audio/helpers.h",
245 "objc/native/src/audio/helpers.mm",
246 "objc/native/src/audio/voice_processing_audio_unit.h",
247 "objc/native/src/audio/voice_processing_audio_unit.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200248 ]
249
250 deps = [
251 ":audio_objc",
252 ":audio_session_observer",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200253 ":base_objc",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200254 "../api:array_view",
255 "../modules/audio_device:audio_device_api",
256 "../modules/audio_device:audio_device_buffer",
257 "../modules/audio_device:audio_device_generic",
258 "../rtc_base:checks",
259 "../rtc_base:rtc_base",
260 "../rtc_base/system:fallthrough",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200261 "../system_wrappers:metrics_api",
262 ]
263
264 if (is_clang) {
265 # Suppress warnings from the Chromium Clang plugin
266 # (bugs.webrtc.org/163).
267 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
268 }
269 }
270
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100271 rtc_static_library("audio_objc") {
272 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200273 "objc/components/audio/RTCAudioSession+Configuration.mm",
274 "objc/components/audio/RTCAudioSession+Private.h",
275 "objc/components/audio/RTCAudioSession.h",
276 "objc/components/audio/RTCAudioSession.mm",
277 "objc/components/audio/RTCAudioSessionConfiguration.h",
278 "objc/components/audio/RTCAudioSessionConfiguration.m",
279 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.h",
280 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100281 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200282 configs += [
283 "..:common_objc",
284 ":used_from_extension",
285 ]
denicija59ee91b2017-06-05 05:48:47 -0700286
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100287 public_configs = [ ":common_config_objc" ]
Anders Carlsson8ecfd802017-09-15 14:07:30 +0200288
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100289 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200290 ":audio_session_observer",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200291 ":base_objc",
292 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100293 "../rtc_base:checks",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200294 "../rtc_base:rtc_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100295 "../rtc_base:rtc_base_approved",
296 ]
denicija59ee91b2017-06-05 05:48:47 -0700297 }
298 }
zhihuanga4c113a2017-06-28 14:05:44 -0700299
Anders Carlsson9823ee42018-03-07 10:32:03 +0100300 rtc_static_library("videosource_objc") {
zhihuanga4c113a2017-06-28 14:05:44 -0700301 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200302 "objc/api/peerconnection/RTCVideoSource+Private.h",
303 "objc/api/peerconnection/RTCVideoSource.h",
304 "objc/api/peerconnection/RTCVideoSource.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700305 ]
306
307 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200308 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100309 ":mediasource_objc",
310 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100311 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700312 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200313 "../api/video:video_frame",
314 "../api/video:video_frame_i420",
zhihuanga4c113a2017-06-28 14:05:44 -0700315 "../common_video",
316 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100317 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700318 "../rtc_base:rtc_base",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100319 "//third_party/libyuv",
zhihuanga4c113a2017-06-28 14:05:44 -0700320 ]
321
Anders Carlsson358f2e02018-06-04 10:24:37 +0200322 configs += [
323 "..:common_objc",
324 ":used_from_extension",
325 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700326 }
327
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100328 rtc_static_library("videoframebuffer_objc") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200329 visibility = [ "*" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100330 sources = [
Anders Carlsson4e5af962018-09-03 14:44:50 +0200331 "objc/api/video_frame_buffer/RTCNativeI420Buffer+Private.h",
332 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
333 "objc/api/video_frame_buffer/RTCNativeI420Buffer.mm",
334 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
335 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200336 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
337 "objc/components/video_frame_buffer/RTCCVPixelBuffer.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100338 ]
339 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200340 ":base_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200341 "//api/video:video_frame",
342 "//api/video:video_frame_i420",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100343 "//common_video",
344 "//rtc_base:checks",
345 "//rtc_base:rtc_base_approved",
346 "//third_party/libyuv",
347 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200348 configs += [
349 "..:common_objc",
350 ":used_from_extension",
351 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100352 }
353
kthelgason36d658d2017-08-24 05:43:45 -0700354 rtc_static_library("video_objc") {
kthelgason2f088792017-05-30 01:48:47 -0700355 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200356 "objc/components/renderer/opengl/RTCDefaultShader.h",
357 "objc/components/renderer/opengl/RTCDefaultShader.mm",
358 "objc/components/renderer/opengl/RTCI420TextureCache.h",
359 "objc/components/renderer/opengl/RTCI420TextureCache.mm",
360 "objc/components/renderer/opengl/RTCOpenGLDefines.h",
361 "objc/components/renderer/opengl/RTCShader.h",
362 "objc/components/renderer/opengl/RTCShader.mm",
363 "objc/components/renderer/opengl/RTCVideoViewShading.h",
kthelgason2f088792017-05-30 01:48:47 -0700364 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700365 libs = []
denicijad2088152017-04-28 02:14:54 -0700366 if (is_ios) {
denicija070d5e32017-02-26 11:44:13 -0800367 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200368 "objc/components/renderer/opengl/RTCNV12TextureCache.h",
369 "objc/components/renderer/opengl/RTCNV12TextureCache.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700370 ]
371 libs += [
372 "GLKit.framework",
373 "OpenGLES.framework",
374 "QuartzCore.framework",
375 ]
376 } else if (is_mac) {
mbonadei2c8ac1b2017-05-31 05:14:26 -0700377 libs += [
378 "CoreMedia.framework",
379 "CoreVideo.framework",
380 "OpenGL.framework",
denicija070d5e32017-02-26 11:44:13 -0800381 ]
382 }
mbonadei2c8ac1b2017-05-31 05:14:26 -0700383
kthelgason2f088792017-05-30 01:48:47 -0700384 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200385 ":base_objc",
386 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100387 ":mediaconstraints_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100388 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100389 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100390 ":videosource_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700391 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200392 "../api/video:video_frame",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700393 "../common_video",
394 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100395 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700396 "../rtc_base:rtc_base",
Danil Chapovalov196100e2018-06-21 10:17:24 +0200397 "//third_party/abseil-cpp/absl/types:optional",
tkchin9eeb6242016-04-27 01:54:20 -0700398 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700399
Anders Carlsson358f2e02018-06-04 10:24:37 +0200400 configs += [
401 "..:common_objc",
402 ":used_from_extension",
403 ]
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800404 }
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800405
kthelgason36d658d2017-08-24 05:43:45 -0700406 rtc_static_library("ui_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000407 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200408 allow_poison = [
409 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
410 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
411 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700412 if (is_ios) {
413 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200414 "objc/components/renderer/opengl/RTCDisplayLinkTimer.h",
415 "objc/components/renderer/opengl/RTCDisplayLinkTimer.m",
416 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
417 "objc/components/renderer/opengl/RTCEAGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700418 ]
419 }
420 if (is_mac) {
421 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200422 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
423 "objc/components/renderer/opengl/RTCNSGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700424 ]
425 }
426 configs += [ "..:common_objc" ]
427 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200428 ":base_objc",
429 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100430 ":video_objc",
431 ":videocapture_objc",
432 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700433 ]
434 }
kthelgasonebc34e72016-09-15 04:30:18 -0700435
mbonadei2c8ac1b2017-05-31 05:14:26 -0700436 if (rtc_use_metal_rendering) {
kthelgason36d658d2017-08-24 05:43:45 -0700437 rtc_static_library("metal_objc") {
Mirko Bonadeid68956d2018-02-16 17:55:36 +0100438 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200439 allow_poison = [
440 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
441 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
442 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700443 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200444 "objc/components/renderer/metal/RTCMTLI420Renderer.h",
445 "objc/components/renderer/metal/RTCMTLI420Renderer.mm",
446 "objc/components/renderer/metal/RTCMTLRenderer+Private.h",
447 "objc/components/renderer/metal/RTCMTLRenderer.h",
448 "objc/components/renderer/metal/RTCMTLRenderer.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700449 ]
450 if (is_ios) {
451 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200452 "objc/components/renderer/metal/RTCMTLNV12Renderer.h",
453 "objc/components/renderer/metal/RTCMTLNV12Renderer.mm",
454 "objc/components/renderer/metal/RTCMTLRGBRenderer.h",
455 "objc/components/renderer/metal/RTCMTLRGBRenderer.mm",
456 "objc/components/renderer/metal/RTCMTLVideoView.h",
457 "objc/components/renderer/metal/RTCMTLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700458 ]
459 }
460 if (is_mac) {
461 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200462 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
463 "objc/components/renderer/metal/RTCMTLNSVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700464 ]
465 }
466 libs = [
467 "CoreVideo.framework",
468 "Metal.framework",
469 "MetalKit.framework",
470 ]
471 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200472 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100473 ":peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700474 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100475 ":videoframebuffer_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200476 "../api/video:video_frame",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100477 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700478 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700479 ]
480 configs += [ "..:common_objc" ]
kthelgason36d658d2017-08-24 05:43:45 -0700481 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700482 }
483 }
484
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200485 # TODO(bugs.webrtc.org/9627): Remove this target.
Anders Carlsson73119182018-03-15 09:41:03 +0100486 rtc_static_library("videocapturebase_objc") {
487 visibility = [ "*" ]
488 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200489 "objc/helpers/noop.mm",
Anders Carlsson73119182018-03-15 09:41:03 +0100490 ]
Anders Carlsson73119182018-03-15 09:41:03 +0100491
492 configs += [ "..:common_objc" ]
493
494 public_configs = [ ":common_config_objc" ]
495
496 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200497 ":base_objc",
Anders Carlsson73119182018-03-15 09:41:03 +0100498 ":videoframebuffer_objc",
499 ]
500 }
501
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100502 rtc_static_library("videocapture_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000503 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200504 allow_poison = [
505 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
506 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
507 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700508 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200509 "objc/components/capturer/RTCCameraVideoCapturer.h",
510 "objc/components/capturer/RTCCameraVideoCapturer.m",
zhihuanga4c113a2017-06-28 14:05:44 -0700511 ]
512 if (is_ios) {
513 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200514 "objc/components/capturer/RTCFileVideoCapturer.h",
515 "objc/components/capturer/RTCFileVideoCapturer.m",
zhihuanga4c113a2017-06-28 14:05:44 -0700516 ]
517 }
518 libs = [ "AVFoundation.framework" ]
519
zhihuanga4c113a2017-06-28 14:05:44 -0700520 configs += [ "..:common_objc" ]
521
kthelgason36d658d2017-08-24 05:43:45 -0700522 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700523
zhihuanga4c113a2017-06-28 14:05:44 -0700524 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200525 ":base_objc",
526 ":helpers_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700527 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100528 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700529 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700530 }
531
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100532 rtc_static_library("videocodec_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200533 visibility = [ "*" ]
Mirko Bonadei96ede162018-09-06 13:45:44 +0200534 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100535 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200536 "objc/components/video_codec/RTCCodecSpecificInfoH264+Private.h",
537 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
538 "objc/components/video_codec/RTCCodecSpecificInfoH264.mm",
539 "objc/components/video_codec/RTCH264ProfileLevelId.h",
540 "objc/components/video_codec/RTCH264ProfileLevelId.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700541 ]
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300542 if (is_ios) {
543 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200544 "objc/components/video_codec/UIDevice+H264Profile.h",
545 "objc/components/video_codec/UIDevice+H264Profile.mm",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300546 ]
547 }
zhihuanga4c113a2017-06-28 14:05:44 -0700548 if (!build_with_chromium && is_clang) {
549 # Suppress warnings from the Chromium Clang plugin
550 # (bugs.webrtc.org/163).
551 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
552 }
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100553 public_configs = [ ":common_config_objc" ]
554 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200555 ":base_objc",
556 ":helpers_objc",
kthelgasonfb143122017-07-25 07:55:58 -0700557 "../api/video_codecs:video_codecs_api",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100558 "../common_video",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300559 "../media:rtc_h264_profile_id",
zhihuanga4c113a2017-06-28 14:05:44 -0700560 "../media:rtc_media_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100561 "../modules:module_api",
562 "../modules/video_coding:video_codec_interface",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200563 "../rtc_base:checks",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100564 "../rtc_base:rtc_base_approved",
kthelgasonfb143122017-07-25 07:55:58 -0700565 "../system_wrappers:field_trial_api",
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",
615 "../system_wrappers:metrics_default",
616 ]
617 }
618
619 rtc_static_library("vp9") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100620 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200621 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100622 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200623 "objc/api/video_codec/RTCVideoDecoderVP9.h",
624 "objc/api/video_codec/RTCVideoDecoderVP9.mm",
625 "objc/api/video_codec/RTCVideoEncoderVP9.h",
626 "objc/api/video_codec/RTCVideoEncoderVP9.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100627 ]
628
Anders Carlssondd8c1652018-01-30 10:32:13 +0100629 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200630 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100631 ":wrapped_native_codec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200632 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100633 "../modules/video_coding:webrtc_vp9",
634 "../system_wrappers:metrics_default",
635 ]
636 }
637
zhihuanga4c113a2017-06-28 14:05:44 -0700638 # Build the PeerConnectionFactory without audio/video support.
639 # This target depends on the objc_peeerconnectionfactory_base which still
640 # includes some audio/video related objects such as RTCAudioSource because
641 # these objects are just thin wrappers of native C++ interfaces required
642 # when implementing webrtc::PeerConnectionFactoryInterface and
643 # webrtc::PeerConnectionInterface.
Kári Tristan Helgasona2d89fc2018-03-06 10:18:43 +0100644 # The applications which only use WebRTC DataChannel can depend on this.
kthelgason36d658d2017-08-24 05:43:45 -0700645 rtc_static_library("peerconnectionfactory_no_media_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000646 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200647 allow_poison = [
648 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
649 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
650 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700651 defines = [ "HAVE_NO_MEDIA" ]
652
653 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200654 "objc/helpers/noop.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700655 ]
656
kthelgason36d658d2017-08-24 05:43:45 -0700657 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700658
zhihuanga4c113a2017-06-28 14:05:44 -0700659 deps = [
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100660 ":native_api",
661 ":native_video",
kthelgason36d658d2017-08-24 05:43:45 -0700662 ":peerconnectionfactory_base_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700663 "../api:libjingle_peerconnection_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700664 "../rtc_base:rtc_base",
zhihuanga4c113a2017-06-28 14:05:44 -0700665 ]
666 }
667
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100668 rtc_static_library("mediaconstraints_objc") {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200669 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100670 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200671 "objc/api/peerconnection/RTCMediaConstraints+Private.h",
672 "objc/api/peerconnection/RTCMediaConstraints.h",
673 "objc/api/peerconnection/RTCMediaConstraints.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100674 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100675
676 public_configs = [ ":common_config_objc" ]
677 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200678 ":base_objc",
679 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100680 "../api:libjingle_peerconnection_api",
681 ]
682 }
683
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200684 # TODO(bugs.webrtc.org/9627): Remove, targets should depend on base_objc.
Anders Carlsson9823ee42018-03-07 10:32:03 +0100685 rtc_source_set("videorenderer_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200686 visibility = [ "*" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100687 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200688 "objc/helpers/noop.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100689 ]
690
691 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100692 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200693
694 deps = [
695 ":base_objc",
696 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100697 }
698
699 rtc_static_library("videorendereradapter_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200700 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200701 allow_poison = [
702 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
703 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
704 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100705 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200706 "objc/api/RTCVideoRendererAdapter+Private.h",
707 "objc/api/RTCVideoRendererAdapter.h",
708 "objc/api/RTCVideoRendererAdapter.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100709 ]
710
711 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100712 public_configs = [ ":common_config_objc" ]
713
714 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200715 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100716 ":native_api",
717 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100718 "../api:libjingle_peerconnection_api",
719 ]
720 }
721
722 rtc_static_library("mediasource_objc") {
723 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200724 "objc/api/peerconnection/RTCMediaSource+Private.h",
725 "objc/api/peerconnection/RTCMediaSource.h",
726 "objc/api/peerconnection/RTCMediaSource.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100727 ]
728
Anders Carlsson358f2e02018-06-04 10:24:37 +0200729 configs += [
730 "..:common_objc",
731 ":used_from_extension",
732 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100733 public_configs = [ ":common_config_objc" ]
734
735 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200736 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100737 "../api:libjingle_peerconnection_api",
738 "../rtc_base:checks",
739 ]
740 }
741
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200742 rtc_static_library("base_native_additions_objc") {
743 sources = [
744 "objc/api/peerconnection/RTCEncodedImage+Private.h",
745 "objc/api/peerconnection/RTCEncodedImage+Private.mm",
746 "objc/api/peerconnection/RTCRtpFragmentationHeader+Private.h",
747 "objc/api/peerconnection/RTCRtpFragmentationHeader+Private.mm",
748 "objc/api/peerconnection/RTCVideoCodecInfo+Private.h",
749 "objc/api/peerconnection/RTCVideoCodecInfo+Private.mm",
750 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.h",
751 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.mm",
752 ]
753
754 configs += [ "..:common_objc" ]
755
756 public_configs = [ ":common_config_objc" ]
757
758 deps = [
759 ":base_objc",
760 ":helpers_objc",
761 "../api/video_codecs:video_codecs_api",
762 "../common_video",
763 "../modules:module_api",
764 "../modules/video_coding:video_codec_interface",
765 "../rtc_base:rtc_base",
766 ]
767
768 if (!build_with_chromium && is_clang) {
769 # Suppress warnings from the Chromium Clang plugin
770 # (bugs.webrtc.org/163).
771 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
772 }
773 }
774
kthelgason36d658d2017-08-24 05:43:45 -0700775 rtc_static_library("peerconnectionfactory_base_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200776 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200777 allow_poison = [
778 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
779 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
780 ]
Mirko Bonadei96ede162018-09-06 13:45:44 +0200781 configs += [
782 "..:no_exit_time_destructors",
783 "..:no_global_constructors",
784 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700785 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200786 "objc/api/peerconnection/RTCAudioSource+Private.h",
787 "objc/api/peerconnection/RTCAudioSource.h",
788 "objc/api/peerconnection/RTCAudioSource.mm",
789 "objc/api/peerconnection/RTCAudioTrack+Private.h",
790 "objc/api/peerconnection/RTCAudioTrack.h",
791 "objc/api/peerconnection/RTCAudioTrack.mm",
792 "objc/api/peerconnection/RTCCertificate.h",
793 "objc/api/peerconnection/RTCCertificate.mm",
794 "objc/api/peerconnection/RTCConfiguration+Native.h",
795 "objc/api/peerconnection/RTCConfiguration+Private.h",
796 "objc/api/peerconnection/RTCConfiguration.h",
797 "objc/api/peerconnection/RTCConfiguration.mm",
798 "objc/api/peerconnection/RTCDataChannel+Private.h",
799 "objc/api/peerconnection/RTCDataChannel.h",
800 "objc/api/peerconnection/RTCDataChannel.mm",
801 "objc/api/peerconnection/RTCDataChannelConfiguration+Private.h",
802 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
803 "objc/api/peerconnection/RTCDataChannelConfiguration.mm",
804 "objc/api/peerconnection/RTCDtmfSender+Private.h",
805 "objc/api/peerconnection/RTCDtmfSender.h",
806 "objc/api/peerconnection/RTCDtmfSender.mm",
807 "objc/api/peerconnection/RTCFieldTrials.h",
808 "objc/api/peerconnection/RTCFieldTrials.mm",
809 "objc/api/peerconnection/RTCIceCandidate+Private.h",
810 "objc/api/peerconnection/RTCIceCandidate.h",
811 "objc/api/peerconnection/RTCIceCandidate.mm",
812 "objc/api/peerconnection/RTCIceServer+Private.h",
813 "objc/api/peerconnection/RTCIceServer.h",
814 "objc/api/peerconnection/RTCIceServer.mm",
815 "objc/api/peerconnection/RTCIntervalRange+Private.h",
816 "objc/api/peerconnection/RTCIntervalRange.h",
817 "objc/api/peerconnection/RTCIntervalRange.mm",
818 "objc/api/peerconnection/RTCLegacyStatsReport+Private.h",
819 "objc/api/peerconnection/RTCLegacyStatsReport.h",
820 "objc/api/peerconnection/RTCLegacyStatsReport.mm",
821 "objc/api/peerconnection/RTCMediaStream+Private.h",
822 "objc/api/peerconnection/RTCMediaStream.h",
823 "objc/api/peerconnection/RTCMediaStream.mm",
824 "objc/api/peerconnection/RTCMediaStreamTrack+Private.h",
825 "objc/api/peerconnection/RTCMediaStreamTrack.h",
826 "objc/api/peerconnection/RTCMediaStreamTrack.mm",
827 "objc/api/peerconnection/RTCMetrics.h",
828 "objc/api/peerconnection/RTCMetrics.mm",
829 "objc/api/peerconnection/RTCMetricsSampleInfo+Private.h",
830 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
831 "objc/api/peerconnection/RTCMetricsSampleInfo.mm",
832 "objc/api/peerconnection/RTCPeerConnection+DataChannel.mm",
833 "objc/api/peerconnection/RTCPeerConnection+Native.h",
834 "objc/api/peerconnection/RTCPeerConnection+Private.h",
835 "objc/api/peerconnection/RTCPeerConnection+Stats.mm",
836 "objc/api/peerconnection/RTCPeerConnection.h",
837 "objc/api/peerconnection/RTCPeerConnection.mm",
838 "objc/api/peerconnection/RTCPeerConnectionFactory+Native.h",
839 "objc/api/peerconnection/RTCPeerConnectionFactory+Private.h",
840 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
841 "objc/api/peerconnection/RTCPeerConnectionFactory.mm",
842 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.h",
843 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.mm",
844 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.h",
845 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.mm",
846 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions+Private.h",
847 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
848 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.mm",
849 "objc/api/peerconnection/RTCRtcpParameters+Private.h",
850 "objc/api/peerconnection/RTCRtcpParameters.h",
851 "objc/api/peerconnection/RTCRtcpParameters.mm",
852 "objc/api/peerconnection/RTCRtpCodecParameters+Private.h",
853 "objc/api/peerconnection/RTCRtpCodecParameters.h",
854 "objc/api/peerconnection/RTCRtpCodecParameters.mm",
855 "objc/api/peerconnection/RTCRtpEncodingParameters+Private.h",
856 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
857 "objc/api/peerconnection/RTCRtpEncodingParameters.mm",
858 "objc/api/peerconnection/RTCRtpHeaderExtension+Private.h",
859 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
860 "objc/api/peerconnection/RTCRtpHeaderExtension.mm",
861 "objc/api/peerconnection/RTCRtpParameters+Private.h",
862 "objc/api/peerconnection/RTCRtpParameters.h",
863 "objc/api/peerconnection/RTCRtpParameters.mm",
864 "objc/api/peerconnection/RTCRtpReceiver+Private.h",
865 "objc/api/peerconnection/RTCRtpReceiver.h",
866 "objc/api/peerconnection/RTCRtpReceiver.mm",
867 "objc/api/peerconnection/RTCRtpSender+Private.h",
868 "objc/api/peerconnection/RTCRtpSender.h",
869 "objc/api/peerconnection/RTCRtpSender.mm",
870 "objc/api/peerconnection/RTCRtpTransceiver+Private.h",
871 "objc/api/peerconnection/RTCRtpTransceiver.h",
872 "objc/api/peerconnection/RTCRtpTransceiver.mm",
873 "objc/api/peerconnection/RTCSSLAdapter.h",
874 "objc/api/peerconnection/RTCSSLAdapter.mm",
875 "objc/api/peerconnection/RTCSessionDescription+Private.h",
876 "objc/api/peerconnection/RTCSessionDescription.h",
877 "objc/api/peerconnection/RTCSessionDescription.mm",
878 "objc/api/peerconnection/RTCTracing.h",
879 "objc/api/peerconnection/RTCTracing.mm",
880 "objc/api/peerconnection/RTCVideoTrack+Private.h",
881 "objc/api/peerconnection/RTCVideoTrack.h",
882 "objc/api/peerconnection/RTCVideoTrack.mm",
kthelgason5fe4d492016-12-05 11:27:30 -0800883 ]
kthelgasonebc34e72016-09-15 04:30:18 -0700884
Anders Carlsson358f2e02018-06-04 10:24:37 +0200885 configs += [
886 "..:common_objc",
887 ":used_from_extension",
888 ]
kthelgason36d658d2017-08-24 05:43:45 -0700889 public_configs = [ ":common_config_objc" ]
kthelgasonc0977102017-04-24 00:57:16 -0700890
mbonadei2c8ac1b2017-05-31 05:14:26 -0700891 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200892 ":base_native_additions_objc",
893 ":base_objc",
894 ":file_logger_objc",
895 ":helpers_objc",
896 ":legacy_header_paths",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100897 ":mediaconstraints_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100898 ":mediasource_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100899 ":native_api",
900 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100901 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100902 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100903 ":videorendereradapter_objc",
904 ":videosource_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200905 ":videotoolbox_objc",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100906 "../api:libjingle_peerconnection_api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700907 "../api/audio_codecs:audio_codecs_api",
Karl Wiberg5817d3d2018-04-06 10:06:42 +0200908 "../api/audio_codecs:builtin_audio_decoder_factory",
Jiawei Ouae810c12018-06-20 16:18:59 -0700909 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200910 "../api/video:video_frame",
Anders Carlsson7e042812017-10-05 16:55:38 +0200911 "../api/video_codecs:video_codecs_api",
Anders Carlssone5960ce2017-06-22 15:26:30 +0200912 "../common_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700913 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -0700914 "../modules:module_api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700915 "../modules/audio_device:audio_device_api",
916 "../modules/audio_processing:audio_processing",
Patrik Höglund99175c62018-01-08 11:05:10 +0100917 "../modules/video_coding:video_codec_interface",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100918 "../pc:create_pc_factory",
zhihuanga4c113a2017-06-28 14:05:44 -0700919 "../pc:peerconnection",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100920 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700921 "../rtc_base:rtc_base",
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",
934 "objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.h",
935 "objc/Framework/Classes/Common/scoped_cftyperef.h",
936 "objc/Framework/Classes/PeerConnection/RTCConfiguration+Native.h",
937 "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Native.h",
938 "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Native.h",
939 "objc/Framework/Classes/PeerConnection/RTCVideoCodec+Private.h",
940 "objc/Framework/Classes/Video/RTCDefaultShader.h",
941 "objc/Framework/Classes/Video/RTCNV12TextureCache.h",
942 "objc/Framework/Classes/VideoToolbox/nalu_rewriter.h",
943 "objc/Framework/Headers/WebRTC/RTCAudioSession.h",
944 "objc/Framework/Headers/WebRTC/RTCAudioSessionConfiguration.h",
945 "objc/Framework/Headers/WebRTC/RTCAudioSource.h",
946 "objc/Framework/Headers/WebRTC/RTCAudioTrack.h",
947 "objc/Framework/Headers/WebRTC/RTCCVPixelBuffer.h",
948 "objc/Framework/Headers/WebRTC/RTCCallbackLogger.h",
949 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
950 "objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h",
951 "objc/Framework/Headers/WebRTC/RTCCertificate.h",
952 "objc/Framework/Headers/WebRTC/RTCConfiguration.h",
953 "objc/Framework/Headers/WebRTC/RTCDataChannel.h",
954 "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h",
955 "objc/Framework/Headers/WebRTC/RTCDefaultVideoDecoderFactory.h",
956 "objc/Framework/Headers/WebRTC/RTCDefaultVideoEncoderFactory.h",
957 "objc/Framework/Headers/WebRTC/RTCDispatcher.h",
958 "objc/Framework/Headers/WebRTC/RTCDtmfSender.h",
959 "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
960 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h",
961 "objc/Framework/Headers/WebRTC/RTCFileLogger.h",
962 "objc/Framework/Headers/WebRTC/RTCFileVideoCapturer.h",
963 "objc/Framework/Headers/WebRTC/RTCH264ProfileLevelId.h",
964 "objc/Framework/Headers/WebRTC/RTCIceCandidate.h",
965 "objc/Framework/Headers/WebRTC/RTCIceServer.h",
966 "objc/Framework/Headers/WebRTC/RTCIntervalRange.h",
967 "objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h",
968 "objc/Framework/Headers/WebRTC/RTCLogging.h",
969 "objc/Framework/Headers/WebRTC/RTCMTLNSVideoView.h",
970 "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h",
971 "objc/Framework/Headers/WebRTC/RTCMacros.h",
972 "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h",
973 "objc/Framework/Headers/WebRTC/RTCMediaSource.h",
974 "objc/Framework/Headers/WebRTC/RTCMediaStream.h",
975 "objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h",
976 "objc/Framework/Headers/WebRTC/RTCMetrics.h",
977 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h",
978 "objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h",
979 "objc/Framework/Headers/WebRTC/RTCPeerConnection.h",
980 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h",
981 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactoryOptions.h",
982 "objc/Framework/Headers/WebRTC/RTCRtcpParameters.h",
983 "objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h",
984 "objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h",
985 "objc/Framework/Headers/WebRTC/RTCRtpHeaderExtension.h",
986 "objc/Framework/Headers/WebRTC/RTCRtpParameters.h",
987 "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h",
988 "objc/Framework/Headers/WebRTC/RTCRtpSender.h",
989 "objc/Framework/Headers/WebRTC/RTCRtpTransceiver.h",
990 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
991 "objc/Framework/Headers/WebRTC/RTCSessionDescription.h",
992 "objc/Framework/Headers/WebRTC/RTCTracing.h",
993 "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h",
994 "objc/Framework/Headers/WebRTC/RTCVideoCodec.h",
995 "objc/Framework/Headers/WebRTC/RTCVideoCodecFactory.h",
996 "objc/Framework/Headers/WebRTC/RTCVideoCodecH264.h",
997 "objc/Framework/Headers/WebRTC/RTCVideoCodecInfo.h",
998 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP8.h",
999 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP9.h",
1000 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP8.h",
1001 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP9.h",
1002 "objc/Framework/Headers/WebRTC/RTCVideoFrame.h",
1003 "objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.h",
1004 "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h",
1005 "objc/Framework/Headers/WebRTC/RTCVideoSource.h",
1006 "objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
1007 "objc/Framework/Headers/WebRTC/RTCVideoViewShading.h",
1008 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
1009 "objc/Framework/Native/api/audio_device_module.h",
1010 "objc/Framework/Native/api/video_decoder_factory.h",
1011 "objc/Framework/Native/api/video_encoder_factory.h",
1012 "objc/Framework/Native/api/video_frame_buffer.h",
1013 "objc/Framework/Native/src/objc_video_decoder_factory.h",
1014 "objc/Framework/Native/src/objc_video_encoder_factory.h",
1015 ]
1016 }
1017
mbonadei2c8ac1b2017-05-31 05:14:26 -07001018 if (rtc_include_tests) {
Daniela012b56b2017-11-15 13:15:24 +01001019 if (is_ios) {
Danielaae012cf2017-10-12 13:46:00 +02001020 rtc_source_set("sdk_unittests_sources") {
1021 testonly = true
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001022 include_dirs = [ "objc/" ]
Daniela012b56b2017-11-15 13:15:24 +01001023
Danielaae012cf2017-10-12 13:46:00 +02001024 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001025 "objc/unittests/ObjCVideoTrackSource_xctest.mm",
1026 "objc/unittests/RTCCVPixelBuffer_xctest.mm",
1027 "objc/unittests/RTCCallbackLogger_xctest.m",
1028 "objc/unittests/RTCFileVideoCapturer_xctest.mm",
1029 "objc/unittests/RTCH264ProfileLevelId_xctest.m",
1030 "objc/unittests/RTCPeerConnectionFactory_xctest.m",
1031 "objc/unittests/frame_buffer_helpers.h",
1032 "objc/unittests/frame_buffer_helpers.mm",
Danielaae012cf2017-10-12 13:46:00 +02001033 ]
Daniela012b56b2017-11-15 13:15:24 +01001034
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001035 # TODO(peterhanspers): Reenable these tests on simulator.
1036 # See bugs.webrtc.org/7812
1037 if (!use_ios_simulator) {
1038 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001039 "objc/unittests/RTCAudioDeviceModule_xctest.mm",
1040 "objc/unittests/RTCAudioDevice_xctest.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001041 ]
1042 }
1043
Danielaae012cf2017-10-12 13:46:00 +02001044 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001045 ":audio_device",
1046 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001047 ":base_objc",
1048 ":callback_logger_objc",
Anders Carlssondc6b4772018-01-15 13:31:03 +01001049 ":framework_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001050 ":mediaconstraints_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001051 ":native_api",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001052 ":native_api_audio_device_module",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001053 ":native_video",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001054 ":peerconnectionfactory_base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001055 ":videocapture_objc",
Anders Carlsson79ce8202018-06-01 12:51:09 +02001056 ":videocodec_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001057 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001058 ":videosource_objc",
Danielaae012cf2017-10-12 13:46:00 +02001059 ":videotoolbox_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001060 "../api/video:video_frame_i420",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001061 "../common_video:common_video",
Danielaae012cf2017-10-12 13:46:00 +02001062 "../media:rtc_media_base",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001063 "../media:rtc_media_tests_utils",
Danielaae012cf2017-10-12 13:46:00 +02001064 "../modules:module_api",
1065 "../rtc_base:rtc_base",
1066 "../rtc_base:rtc_base_tests_utils",
Oleh Prypinda04e062018-07-23 10:04:12 +02001067 "../system_wrappers:system_wrappers",
1068 "../system_wrappers:system_wrappers_default",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001069 "//third_party/libyuv",
Danielaae012cf2017-10-12 13:46:00 +02001070 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001071
1072 if (rtc_use_metal_rendering) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001073 sources += [ "objc/unittests/RTCMTLVideoView_xctest.m" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001074 deps += [ ":metal_objc" ]
1075 }
1076
Danielaae012cf2017-10-12 13:46:00 +02001077 public_deps = [
1078 "//build/config/ios:xctest",
1079 "//third_party/ocmock",
1080 ]
1081 }
1082
Daniela012b56b2017-11-15 13:15:24 +01001083 bundle_data("sdk_unittests_bundle_data") {
Daniela012b56b2017-11-15 13:15:24 +01001084 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001085 "objc/unittests/audio_short16.pcm",
1086 "objc/unittests/audio_short44.pcm",
1087 "objc/unittests/audio_short48.pcm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001088
1089 # Sample video taken from https://media.xiph.org/video/derf/
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001090 "objc/unittests/foreman.mp4",
Daniela012b56b2017-11-15 13:15:24 +01001091 ]
1092 outputs = [
1093 "{{bundle_resources_dir}}/{{source_file_part}}",
1094 ]
1095 }
1096
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001097 # These tests use static linking.
Danielaae012cf2017-10-12 13:46:00 +02001098 rtc_ios_xctest_test("sdk_unittests") {
1099 info_plist = "//test/ios/Info.plist"
1100 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001101 "objc/unittests/main.m",
Danielaae012cf2017-10-12 13:46:00 +02001102 ]
Daniela012b56b2017-11-15 13:15:24 +01001103
Danielaae012cf2017-10-12 13:46:00 +02001104 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
1105 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
1106 deps = [
Yura Yaroshevich5297bd22018-06-19 12:51:51 +03001107 ":peerconnectionfactory_base_objc",
Daniela012b56b2017-11-15 13:15:24 +01001108 ":sdk_unittests_bundle_data",
Danielaae012cf2017-10-12 13:46:00 +02001109 ":sdk_unittests_sources",
1110 ]
1111 ldflags = [ "-all_load" ]
1112 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001113
1114 # These tests link to the framework.
1115 rtc_ios_xctest_test("sdk_framework_unittests") {
1116 info_plist = "//test/ios/Info.plist"
1117 sources = [
1118 "objc/unittests/RTCDoNotPutCPlusPlusInFrameworkHeaders_xctest.m",
1119 "objc/unittests/main.m",
1120 ]
1121
1122 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
1123 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
1124 deps = [
1125 ":framework_objc+link",
1126 ":ios_framework_bundle",
1127 ]
1128 }
Danielaae012cf2017-10-12 13:46:00 +02001129 }
1130
1131 # TODO(denicija): once all tests are migrated to xctest remove this source set.
Kári Tristan Helgason90143242018-07-27 12:34:54 +02001132 rtc_source_set("rtc_unittests_objc") {
mbonadei2c8ac1b2017-05-31 05:14:26 -07001133 testonly = true
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001134
mbonadei2c8ac1b2017-05-31 05:14:26 -07001135 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001136 "objc/unittests/RTCCertificateTest.mm",
1137 "objc/unittests/RTCConfigurationTest.mm",
1138 "objc/unittests/RTCDataChannelConfigurationTest.mm",
1139 "objc/unittests/RTCIceCandidateTest.mm",
1140 "objc/unittests/RTCIceServerTest.mm",
1141 "objc/unittests/RTCIntervalRangeTests.mm",
1142 "objc/unittests/RTCMediaConstraintsTest.mm",
1143 "objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm",
1144 "objc/unittests/RTCPeerConnectionTest.mm",
1145 "objc/unittests/RTCSessionDescriptionTest.mm",
1146 "objc/unittests/RTCTracingTest.mm",
1147 "objc/unittests/objc_video_decoder_factory_tests.mm",
1148 "objc/unittests/objc_video_encoder_factory_tests.mm",
1149 "objc/unittests/scoped_cftyperef_tests.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001150 ]
Anders Carlssone7dd83f2018-01-19 11:28:44 +01001151 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001152 sources += [ "objc/unittests/RTCCameraVideoCapturerTests.mm" ]
oprypin45197522017-06-22 01:47:20 -07001153 }
mbonadeid7620582017-05-30 01:50:35 -07001154
mbonadei2c8ac1b2017-05-31 05:14:26 -07001155 # |-ObjC| flag needed to make sure category method implementations
1156 # are included:
1157 # https://developer.apple.com/library/mac/qa/qa1490/_index.html
1158 ldflags = [ "-ObjC" ]
magjed3149e092017-05-08 05:32:05 -07001159
mbonadei2c8ac1b2017-05-31 05:14:26 -07001160 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001161 ":base_objc",
1162 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001163 ":mediaconstraints_objc",
1164 ":native_api",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001165 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001166 ":peerconnectionfactory_base_objc",
1167 ":video_objc",
1168 ":videocapture_objc",
1169 ":videocodec_objc",
1170 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001171 ":videosource_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001172 ":videotoolbox_objc",
Jiawei Ouae810c12018-06-20 16:18:59 -07001173 "../api/audio_codecs:audio_codecs_api",
1174 "../api/audio_codecs:builtin_audio_decoder_factory",
1175 "../api/audio_codecs:builtin_audio_encoder_factory",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001176 "../api/video_codecs:video_codecs_api",
kthelgasonebd4f792017-09-04 04:36:21 -07001177 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -07001178 "../modules:module_api",
Jiawei Ouae810c12018-06-20 16:18:59 -07001179 "../modules/audio_device:audio_device_api",
1180 "../modules/audio_processing:audio_processing",
Patrik Höglund99175c62018-01-08 11:05:10 +01001181 "../modules/video_coding:video_codec_interface",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001182 "../rtc_base:rtc_base_tests_utils",
Niels Möllera12c42a2018-07-25 16:05:48 +02001183 "../rtc_base/system:unused",
Oleh Prypinda04e062018-07-23 10:04:12 +02001184 "../system_wrappers:system_wrappers_default",
Kári Tristan Helgasonca957482017-10-05 14:06:52 +02001185 "//test:test_support",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001186 "//third_party/ocmock",
1187 ]
magjed3149e092017-05-08 05:32:05 -07001188
denicija59ee91b2017-06-05 05:48:47 -07001189 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001190 sources += [ "objc/unittests/RTCAudioSessionTest.mm" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001191 deps += [ ":audio_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001192 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001193 }
kthelgason2f088792017-05-30 01:48:47 -07001194 }
1195
mbonadei2c8ac1b2017-05-31 05:14:26 -07001196 if (is_ios) {
Anders Carlssondc6b4772018-01-15 13:31:03 +01001197 ios_framework_bundle_with_umbrella_header("framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001198 info_plist = "objc/Info.plist"
mbonadei2c8ac1b2017-05-31 05:14:26 -07001199 output_name = "WebRTC"
Magnus Jedvertf83dc8b2017-08-29 09:49:43 +00001200
mbonadei2c8ac1b2017-05-31 05:14:26 -07001201 common_objc_headers = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001202 "objc/base/RTCCodecSpecificInfo.h",
1203 "objc/base/RTCEncodedImage.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001204 "objc/base/RTCI420Buffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001205 "objc/base/RTCLogging.h",
1206 "objc/base/RTCMacros.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001207 "objc/base/RTCMutableI420Buffer.h",
1208 "objc/base/RTCMutableYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001209 "objc/base/RTCRtpFragmentationHeader.h",
1210 "objc/base/RTCVideoCapturer.h",
1211 "objc/base/RTCVideoCodecInfo.h",
1212 "objc/base/RTCVideoDecoder.h",
1213 "objc/base/RTCVideoDecoderFactory.h",
1214 "objc/base/RTCVideoEncoder.h",
1215 "objc/base/RTCVideoEncoderFactory.h",
1216 "objc/base/RTCVideoEncoderQpThresholds.h",
1217 "objc/base/RTCVideoEncoderSettings.h",
1218 "objc/base/RTCVideoFrame.h",
1219 "objc/base/RTCVideoFrameBuffer.h",
1220 "objc/base/RTCVideoRenderer.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001221 "objc/base/RTCYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001222 "objc/components/audio/RTCAudioSession.h",
1223 "objc/components/audio/RTCAudioSessionConfiguration.h",
1224 "objc/components/capturer/RTCCameraVideoCapturer.h",
1225 "objc/components/capturer/RTCFileVideoCapturer.h",
1226 "objc/components/renderer/metal/RTCMTLVideoView.h",
1227 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
1228 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1229 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1230 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1231 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1232 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1233 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1234 "objc/components/video_codec/RTCVideoDecoderH264.h",
1235 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1236 "objc/components/video_codec/RTCVideoEncoderH264.h",
1237 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1238 "objc/helpers/RTCCameraPreviewView.h",
1239 "objc/helpers/RTCDispatcher.h",
1240 "objc/helpers/UIDevice+RTCDevice.h",
1241 "objc/api/peerconnection/RTCAudioSource.h",
1242 "objc/api/peerconnection/RTCAudioTrack.h",
1243 "objc/api/peerconnection/RTCConfiguration.h",
1244 "objc/api/peerconnection/RTCDataChannel.h",
1245 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1246 "objc/api/peerconnection/RTCFieldTrials.h",
1247 "objc/api/peerconnection/RTCIceCandidate.h",
1248 "objc/api/peerconnection/RTCIceServer.h",
1249 "objc/api/peerconnection/RTCIntervalRange.h",
1250 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1251 "objc/api/peerconnection/RTCMediaConstraints.h",
1252 "objc/api/peerconnection/RTCMediaSource.h",
1253 "objc/api/peerconnection/RTCMediaStream.h",
1254 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1255 "objc/api/peerconnection/RTCMetrics.h",
1256 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1257 "objc/api/peerconnection/RTCPeerConnection.h",
1258 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1259 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1260 "objc/api/peerconnection/RTCRtcpParameters.h",
1261 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1262 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1263 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1264 "objc/api/peerconnection/RTCRtpParameters.h",
1265 "objc/api/peerconnection/RTCRtpReceiver.h",
1266 "objc/api/peerconnection/RTCRtpSender.h",
1267 "objc/api/peerconnection/RTCRtpTransceiver.h",
1268 "objc/api/peerconnection/RTCDtmfSender.h",
1269 "objc/api/peerconnection/RTCSSLAdapter.h",
1270 "objc/api/peerconnection/RTCSessionDescription.h",
1271 "objc/api/peerconnection/RTCTracing.h",
1272 "objc/api/peerconnection/RTCCertificate.h",
1273 "objc/api/peerconnection/RTCVideoSource.h",
1274 "objc/api/peerconnection/RTCVideoTrack.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001275 "objc/api/video_codec/RTCVideoCodecConstants.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001276 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1277 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1278 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1279 "objc/api/video_codec/RTCVideoEncoderVP9.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001280 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1281 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001282 ]
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001283
mbonadei2c8ac1b2017-05-31 05:14:26 -07001284 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001285 common_objc_headers += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001286 "objc/api/logging/RTCCallbackLogger.h",
1287 "objc/api/peerconnection/RTCFileLogger.h",
Anders Carlsson3b3364e2018-01-30 15:46:13 +01001288 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001289 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001290
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001291 sources = common_objc_headers
1292 public_headers = common_objc_headers
1293
mbonadei2c8ac1b2017-05-31 05:14:26 -07001294 ldflags = [
1295 "-all_load",
1296 "-install_name",
1297 "@rpath/$output_name.framework/$output_name",
1298 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001299
mbonadei2c8ac1b2017-05-31 05:14:26 -07001300 deps = [
kthelgason36d658d2017-08-24 05:43:45 -07001301 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001302 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001303 ":default_codec_factory_objc",
1304 ":native_api",
1305 ":native_video",
1306 ":peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001307 ":ui_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001308 ":videocapture_objc",
1309 ":videocodec_objc",
1310 ":videotoolbox_objc",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001311 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001312 "../system_wrappers:field_trial_default",
1313 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +00001314 "../system_wrappers:runtime_enabled_features_default",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001315 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001316 if (rtc_use_metal_rendering) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001317 deps += [ ":metal_objc" ]
1318 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001319 if (!build_with_chromium) {
1320 deps += [
1321 ":callback_logger_objc",
1322 ":file_logger_objc",
1323 ]
1324 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001325
mbonadei2c8ac1b2017-05-31 05:14:26 -07001326 libs = [
1327 "AVFoundation.framework",
1328 "CoreGraphics.framework",
1329 "CoreMedia.framework",
1330 "GLKit.framework",
1331 ]
1332
Anders Carlsson358f2e02018-06-04 10:24:37 +02001333 configs += [
1334 "..:common_objc",
1335 ":used_from_extension",
1336 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001337
kthelgason36d658d2017-08-24 05:43:45 -07001338 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001339 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001340
1341 bundle_data("ios_framework_bundle") {
1342 deps = [
1343 "../sdk:framework_objc",
1344 ]
1345 sources = [
1346 "$root_build_dir/WebRTC.framework",
1347 ]
1348 outputs = [
1349 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
1350 ]
1351 }
1352 }
1353
1354 if (is_mac) {
Anders Carlsson37bbf792018-09-05 16:29:27 +02001355 mac_framework_bundle_with_umbrella_header("mac_framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001356 info_plist = "objc/Info.plist"
1357 output_name = "WebRTC"
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001358
Anders Carlsson37bbf792018-09-05 16:29:27 +02001359 sources = [
1360 "objc/api/peerconnection/RTCAudioSource.h",
1361 "objc/api/peerconnection/RTCAudioTrack.h",
1362 "objc/api/peerconnection/RTCCertificate.h",
1363 "objc/api/peerconnection/RTCConfiguration.h",
1364 "objc/api/peerconnection/RTCDataChannel.h",
1365 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1366 "objc/api/peerconnection/RTCDtmfSender.h",
1367 "objc/api/peerconnection/RTCFieldTrials.h",
1368 "objc/api/peerconnection/RTCIceCandidate.h",
1369 "objc/api/peerconnection/RTCIceServer.h",
1370 "objc/api/peerconnection/RTCIntervalRange.h",
1371 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1372 "objc/api/peerconnection/RTCMediaConstraints.h",
1373 "objc/api/peerconnection/RTCMediaSource.h",
1374 "objc/api/peerconnection/RTCMediaStream.h",
1375 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1376 "objc/api/peerconnection/RTCMetrics.h",
1377 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1378 "objc/api/peerconnection/RTCPeerConnection.h",
1379 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1380 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1381 "objc/api/peerconnection/RTCRtcpParameters.h",
1382 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1383 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1384 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1385 "objc/api/peerconnection/RTCRtpParameters.h",
1386 "objc/api/peerconnection/RTCRtpReceiver.h",
1387 "objc/api/peerconnection/RTCRtpSender.h",
1388 "objc/api/peerconnection/RTCRtpTransceiver.h",
1389 "objc/api/peerconnection/RTCSSLAdapter.h",
1390 "objc/api/peerconnection/RTCSessionDescription.h",
1391 "objc/api/peerconnection/RTCTracing.h",
1392 "objc/api/peerconnection/RTCVideoSource.h",
1393 "objc/api/peerconnection/RTCVideoTrack.h",
1394 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1395 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1396 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1397 "objc/api/video_codec/RTCVideoEncoderVP9.h",
1398 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1399 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
1400 "objc/base/RTCCodecSpecificInfo.h",
1401 "objc/base/RTCEncodedImage.h",
1402 "objc/base/RTCI420Buffer.h",
1403 "objc/base/RTCLogging.h",
1404 "objc/base/RTCMacros.h",
1405 "objc/base/RTCMutableI420Buffer.h",
1406 "objc/base/RTCMutableYUVPlanarBuffer.h",
1407 "objc/base/RTCRtpFragmentationHeader.h",
1408 "objc/base/RTCVideoCapturer.h",
1409 "objc/base/RTCVideoCodecInfo.h",
1410 "objc/base/RTCVideoDecoder.h",
1411 "objc/base/RTCVideoDecoderFactory.h",
1412 "objc/base/RTCVideoEncoder.h",
1413 "objc/base/RTCVideoEncoderFactory.h",
1414 "objc/base/RTCVideoEncoderQpThresholds.h",
1415 "objc/base/RTCVideoEncoderSettings.h",
1416 "objc/base/RTCVideoFrame.h",
1417 "objc/base/RTCVideoFrameBuffer.h",
1418 "objc/base/RTCVideoRenderer.h",
1419 "objc/base/RTCYUVPlanarBuffer.h",
1420 "objc/components/capturer/RTCCameraVideoCapturer.h",
1421 "objc/components/capturer/RTCFileVideoCapturer.h",
1422 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
1423 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
1424 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1425 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1426 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1427 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1428 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1429 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1430 "objc/components/video_codec/RTCVideoDecoderH264.h",
1431 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1432 "objc/components/video_codec/RTCVideoEncoderH264.h",
1433 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1434 "objc/helpers/RTCDispatcher.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001435 ]
Anders Carlsson37bbf792018-09-05 16:29:27 +02001436 if (!build_with_chromium) {
1437 sources += [
1438 "objc/api/logging/RTCCallbackLogger.h",
1439 "objc/api/peerconnection/RTCFileLogger.h",
1440 ]
1441 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001442
1443 deps = [
1444 ":base_objc",
1445 ":default_codec_factory_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001446 ":native_api",
1447 ":native_video",
1448 ":peerconnectionfactory_base_objc",
1449 ":ui_objc",
1450 ":videocapture_objc",
1451 ":videocodec_objc",
1452 ":videotoolbox_objc",
1453 "../rtc_base:rtc_base_approved",
1454 "../system_wrappers:field_trial_default",
1455 "../system_wrappers:metrics_default",
1456 "../system_wrappers:runtime_enabled_features_default",
1457 ]
1458 if (rtc_use_metal_rendering) {
1459 deps += [ ":metal_objc" ]
1460 }
1461 if (!build_with_chromium) {
1462 deps += [
1463 ":callback_logger_objc",
1464 ":file_logger_objc",
1465 ]
1466 }
1467
1468 libs = [
1469 "AVFoundation.framework",
1470 "CoreGraphics.framework",
1471 "CoreMedia.framework",
1472 "OpenGL.framework",
1473 ]
1474
Anders Carlsson37bbf792018-09-05 16:29:27 +02001475 configs = [ "..:common_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001476
1477 public_configs = [ ":common_config_objc" ]
1478 }
1479
1480 bundle_data("mac_framework_bundle") {
1481 deps = [
1482 "../sdk:mac_framework_objc",
1483 ]
1484 sources = [
1485 "$root_build_dir/WebRTC.framework",
1486 ]
1487 outputs = [
1488 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
1489 ]
1490 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001491 }
1492
Anders Carlsson9823ee42018-03-07 10:32:03 +01001493 rtc_static_library("wrapped_native_codec_objc") {
1494 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001495 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.h",
1496 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm",
1497 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.h",
1498 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001499 ]
1500
1501 configs += [ "..:common_objc" ]
1502 public_configs = [ ":common_config_objc" ]
1503
Anders Carlsson9823ee42018-03-07 10:32:03 +01001504 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001505 ":base_objc",
1506 ":helpers_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001507 "../api/video_codecs:video_codecs_api",
1508 "../media:rtc_media_base",
1509 ]
1510 }
1511
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001512 # The native API is currently experimental and may change without notice.
1513 rtc_static_library("native_api") {
1514 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +02001515 allow_poison = [
1516 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
1517 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
1518 ]
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001519 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001520 "objc/native/api/video_capturer.h",
1521 "objc/native/api/video_capturer.mm",
1522 "objc/native/api/video_decoder_factory.h",
1523 "objc/native/api/video_decoder_factory.mm",
1524 "objc/native/api/video_encoder_factory.h",
1525 "objc/native/api/video_encoder_factory.mm",
1526 "objc/native/api/video_frame.h",
1527 "objc/native/api/video_frame.mm",
1528 "objc/native/api/video_frame_buffer.h",
1529 "objc/native/api/video_frame_buffer.mm",
1530 "objc/native/api/video_renderer.h",
1531 "objc/native/api/video_renderer.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001532 ]
1533
1534 configs += [ "..:common_objc" ]
1535
1536 public_configs = [ ":common_config_objc" ]
1537
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001538 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001539 ":base_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001540 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001541 ":videoframebuffer_objc",
Anders Carlsson73119182018-03-15 09:41:03 +01001542 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001543 "../api/video:video_frame",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001544 "../api/video_codecs:video_codecs_api",
1545 "../common_video",
1546 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +02001547 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001548 ]
1549 }
1550
1551 rtc_static_library("native_video") {
1552 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001553 "objc/native/src/objc_frame_buffer.h",
1554 "objc/native/src/objc_frame_buffer.mm",
1555 "objc/native/src/objc_video_decoder_factory.h",
1556 "objc/native/src/objc_video_decoder_factory.mm",
1557 "objc/native/src/objc_video_encoder_factory.h",
1558 "objc/native/src/objc_video_encoder_factory.mm",
1559 "objc/native/src/objc_video_frame.h",
1560 "objc/native/src/objc_video_frame.mm",
1561 "objc/native/src/objc_video_renderer.h",
1562 "objc/native/src/objc_video_renderer.mm",
1563 "objc/native/src/objc_video_track_source.h",
1564 "objc/native/src/objc_video_track_source.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001565 ]
1566
1567 configs += [ "..:common_objc" ]
1568
1569 public_configs = [ ":common_config_objc" ]
1570
1571 if (!build_with_chromium && is_clang) {
1572 # Suppress warnings from the Chromium Clang plugin
1573 # (bugs.webrtc.org/163).
1574 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1575 }
1576
1577 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001578 ":base_native_additions_objc",
1579 ":base_objc",
1580 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001581 ":videocodec_objc",
1582 ":videoframebuffer_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001583 ":vpx_codec_constants",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001584 ":wrapped_native_codec_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001585 "../api/video:video_frame",
1586 "../api/video:video_frame_i420",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001587 "../api/video_codecs:video_codecs_api",
1588 "../common_video",
1589 "../media:rtc_audio_video",
1590 "../media:rtc_media_base",
1591 "../modules:module_api",
1592 "../modules/video_coding:video_codec_interface",
1593 "../rtc_base:checks",
1594 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +02001595 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001596 ]
1597 }
1598
mbonadeic0af5ac2017-08-24 12:26:05 -07001599 rtc_static_library("video_toolbox_cc") {
mbonadei6ff8f962017-09-04 05:51:34 -07001600 visibility = [ ":videotoolbox_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001601 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001602 "objc/components/video_codec/helpers.cc",
1603 "objc/components/video_codec/helpers.h",
1604 "objc/components/video_codec/nalu_rewriter.cc",
1605 "objc/components/video_codec/nalu_rewriter.h",
mbonadeic0af5ac2017-08-24 12:26:05 -07001606 ]
1607 deps = [
1608 "../common_video",
1609 "../modules:module_api",
1610 "../modules/video_coding:webrtc_h264",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001611 "../rtc_base:checks",
mbonadeic0af5ac2017-08-24 12:26:05 -07001612 "../rtc_base:rtc_base_approved",
1613 ]
mbonadeic0af5ac2017-08-24 12:26:05 -07001614 }
1615
1616 rtc_static_library("videotoolbox_objc") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001617 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +02001618 allow_poison = [
1619 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
1620 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
1621 ]
mbonadeic0af5ac2017-08-24 12:26:05 -07001622 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001623 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1624 "objc/components/video_codec/RTCVideoDecoderFactoryH264.m",
1625 "objc/components/video_codec/RTCVideoDecoderH264.h",
1626 "objc/components/video_codec/RTCVideoDecoderH264.mm",
1627 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1628 "objc/components/video_codec/RTCVideoEncoderFactoryH264.m",
1629 "objc/components/video_codec/RTCVideoEncoderH264.h",
1630 "objc/components/video_codec/RTCVideoEncoderH264.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001631 ]
1632
Anders Carlsson358f2e02018-06-04 10:24:37 +02001633 configs += [
1634 "..:common_objc",
1635 ":used_from_extension",
1636 ]
1637
1638 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
1639 defines = [ "RTC_APPRTCMOBILE_BROADCAST_EXTENSION" ]
1640 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001641
1642 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001643 ":base_native_additions_objc",
1644 ":base_objc",
1645 ":helpers_objc",
mbonadeic0af5ac2017-08-24 12:26:05 -07001646 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001647 ":videocodec_objc",
1648 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001649 "../common_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001650 "../modules:module_api",
Patrik Höglund99175c62018-01-08 11:05:10 +01001651 "../modules/video_coding:video_codec_interface",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001652 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001653 "../rtc_base:rtc_base_approved",
Mirko Bonadei401d0562017-12-14 11:24:00 +01001654 "//third_party/libyuv",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001655 ]
1656
1657 libs = [
1658 "CoreFoundation.framework",
1659 "CoreMedia.framework",
1660 "CoreVideo.framework",
1661 "VideoToolbox.framework",
1662 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001663 }
1664 }
tkchin9eeb6242016-04-27 01:54:20 -07001665}