blob: 8a58a20b04e20362c328fc34dd531954bdf6f924 [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 = [ "*" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100534 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200535 "objc/components/video_codec/RTCCodecSpecificInfoH264+Private.h",
536 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
537 "objc/components/video_codec/RTCCodecSpecificInfoH264.mm",
538 "objc/components/video_codec/RTCH264ProfileLevelId.h",
539 "objc/components/video_codec/RTCH264ProfileLevelId.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700540 ]
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300541 if (is_ios) {
542 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200543 "objc/components/video_codec/UIDevice+H264Profile.h",
544 "objc/components/video_codec/UIDevice+H264Profile.mm",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300545 ]
546 }
zhihuanga4c113a2017-06-28 14:05:44 -0700547 if (!build_with_chromium && is_clang) {
548 # Suppress warnings from the Chromium Clang plugin
549 # (bugs.webrtc.org/163).
550 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
551 }
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100552 public_configs = [ ":common_config_objc" ]
553 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200554 ":base_objc",
555 ":helpers_objc",
kthelgasonfb143122017-07-25 07:55:58 -0700556 "../api/video_codecs:video_codecs_api",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100557 "../common_video",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300558 "../media:rtc_h264_profile_id",
zhihuanga4c113a2017-06-28 14:05:44 -0700559 "../media:rtc_media_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100560 "../modules:module_api",
561 "../modules/video_coding:video_codec_interface",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200562 "../rtc_base:checks",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100563 "../rtc_base:rtc_base_approved",
kthelgasonfb143122017-07-25 07:55:58 -0700564 "../system_wrappers:field_trial_api",
zhihuanga4c113a2017-06-28 14:05:44 -0700565 ]
566 }
567
Anders Carlssondd8c1652018-01-30 10:32:13 +0100568 rtc_static_library("default_codec_factory_objc") {
569 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200570 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
571 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.m",
572 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
573 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.m",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100574 ]
575
576 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200577 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100578 ":native_video",
579 ":videocodec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200580 ":videotoolbox_objc",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +0200581 ":vp8",
582 ":vp9",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200583 ":vpx_codec_constants",
584 ]
585 }
586
587 rtc_static_library("vpx_codec_constants") {
588 sources = [
589 "objc/api/video_codec/RTCVideoCodecConstants.h",
590 "objc/api/video_codec/RTCVideoCodecConstants.mm",
591 ]
592
593 deps = [
594 ":base_objc",
595 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100596 ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100597 }
598
599 rtc_static_library("vp8") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100600 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200601 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100602 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200603 "objc/api/video_codec/RTCVideoDecoderVP8.h",
604 "objc/api/video_codec/RTCVideoDecoderVP8.mm",
605 "objc/api/video_codec/RTCVideoEncoderVP8.h",
606 "objc/api/video_codec/RTCVideoEncoderVP8.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100607 ]
608
Anders Carlssondd8c1652018-01-30 10:32:13 +0100609 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200610 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100611 ":wrapped_native_codec_objc",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100612 "../modules/video_coding:webrtc_vp8",
613 "../system_wrappers:metrics_default",
614 ]
615 }
616
617 rtc_static_library("vp9") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100618 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200619 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100620 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200621 "objc/api/video_codec/RTCVideoDecoderVP9.h",
622 "objc/api/video_codec/RTCVideoDecoderVP9.mm",
623 "objc/api/video_codec/RTCVideoEncoderVP9.h",
624 "objc/api/video_codec/RTCVideoEncoderVP9.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100625 ]
626
Anders Carlssondd8c1652018-01-30 10:32:13 +0100627 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200628 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100629 ":wrapped_native_codec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200630 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100631 "../modules/video_coding:webrtc_vp9",
632 "../system_wrappers:metrics_default",
633 ]
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") {
667 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200668 "objc/api/peerconnection/RTCMediaConstraints+Private.h",
669 "objc/api/peerconnection/RTCMediaConstraints.h",
670 "objc/api/peerconnection/RTCMediaConstraints.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100671 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100672
673 public_configs = [ ":common_config_objc" ]
674 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200675 ":base_objc",
676 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100677 "../api:libjingle_peerconnection_api",
678 ]
679 }
680
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200681 # TODO(bugs.webrtc.org/9627): Remove, targets should depend on base_objc.
Anders Carlsson9823ee42018-03-07 10:32:03 +0100682 rtc_source_set("videorenderer_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200683 visibility = [ "*" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100684 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200685 "objc/helpers/noop.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100686 ]
687
688 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100689 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200690
691 deps = [
692 ":base_objc",
693 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100694 }
695
696 rtc_static_library("videorendereradapter_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200697 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200698 allow_poison = [
699 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
700 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
701 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100702 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200703 "objc/api/RTCVideoRendererAdapter+Private.h",
704 "objc/api/RTCVideoRendererAdapter.h",
705 "objc/api/RTCVideoRendererAdapter.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100706 ]
707
708 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100709 public_configs = [ ":common_config_objc" ]
710
711 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200712 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100713 ":native_api",
714 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100715 "../api:libjingle_peerconnection_api",
716 ]
717 }
718
719 rtc_static_library("mediasource_objc") {
720 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200721 "objc/api/peerconnection/RTCMediaSource+Private.h",
722 "objc/api/peerconnection/RTCMediaSource.h",
723 "objc/api/peerconnection/RTCMediaSource.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100724 ]
725
Anders Carlsson358f2e02018-06-04 10:24:37 +0200726 configs += [
727 "..:common_objc",
728 ":used_from_extension",
729 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100730 public_configs = [ ":common_config_objc" ]
731
732 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200733 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100734 "../api:libjingle_peerconnection_api",
735 "../rtc_base:checks",
736 ]
737 }
738
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200739 rtc_static_library("base_native_additions_objc") {
740 sources = [
741 "objc/api/peerconnection/RTCEncodedImage+Private.h",
742 "objc/api/peerconnection/RTCEncodedImage+Private.mm",
743 "objc/api/peerconnection/RTCRtpFragmentationHeader+Private.h",
744 "objc/api/peerconnection/RTCRtpFragmentationHeader+Private.mm",
745 "objc/api/peerconnection/RTCVideoCodecInfo+Private.h",
746 "objc/api/peerconnection/RTCVideoCodecInfo+Private.mm",
747 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.h",
748 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.mm",
749 ]
750
751 configs += [ "..:common_objc" ]
752
753 public_configs = [ ":common_config_objc" ]
754
755 deps = [
756 ":base_objc",
757 ":helpers_objc",
758 "../api/video_codecs:video_codecs_api",
759 "../common_video",
760 "../modules:module_api",
761 "../modules/video_coding:video_codec_interface",
762 "../rtc_base:rtc_base",
763 ]
764
765 if (!build_with_chromium && is_clang) {
766 # Suppress warnings from the Chromium Clang plugin
767 # (bugs.webrtc.org/163).
768 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
769 }
770 }
771
kthelgason36d658d2017-08-24 05:43:45 -0700772 rtc_static_library("peerconnectionfactory_base_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200773 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200774 allow_poison = [
775 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
776 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
777 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700778 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200779 "objc/api/peerconnection/RTCAudioSource+Private.h",
780 "objc/api/peerconnection/RTCAudioSource.h",
781 "objc/api/peerconnection/RTCAudioSource.mm",
782 "objc/api/peerconnection/RTCAudioTrack+Private.h",
783 "objc/api/peerconnection/RTCAudioTrack.h",
784 "objc/api/peerconnection/RTCAudioTrack.mm",
785 "objc/api/peerconnection/RTCCertificate.h",
786 "objc/api/peerconnection/RTCCertificate.mm",
787 "objc/api/peerconnection/RTCConfiguration+Native.h",
788 "objc/api/peerconnection/RTCConfiguration+Private.h",
789 "objc/api/peerconnection/RTCConfiguration.h",
790 "objc/api/peerconnection/RTCConfiguration.mm",
791 "objc/api/peerconnection/RTCDataChannel+Private.h",
792 "objc/api/peerconnection/RTCDataChannel.h",
793 "objc/api/peerconnection/RTCDataChannel.mm",
794 "objc/api/peerconnection/RTCDataChannelConfiguration+Private.h",
795 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
796 "objc/api/peerconnection/RTCDataChannelConfiguration.mm",
797 "objc/api/peerconnection/RTCDtmfSender+Private.h",
798 "objc/api/peerconnection/RTCDtmfSender.h",
799 "objc/api/peerconnection/RTCDtmfSender.mm",
800 "objc/api/peerconnection/RTCFieldTrials.h",
801 "objc/api/peerconnection/RTCFieldTrials.mm",
802 "objc/api/peerconnection/RTCIceCandidate+Private.h",
803 "objc/api/peerconnection/RTCIceCandidate.h",
804 "objc/api/peerconnection/RTCIceCandidate.mm",
805 "objc/api/peerconnection/RTCIceServer+Private.h",
806 "objc/api/peerconnection/RTCIceServer.h",
807 "objc/api/peerconnection/RTCIceServer.mm",
808 "objc/api/peerconnection/RTCIntervalRange+Private.h",
809 "objc/api/peerconnection/RTCIntervalRange.h",
810 "objc/api/peerconnection/RTCIntervalRange.mm",
811 "objc/api/peerconnection/RTCLegacyStatsReport+Private.h",
812 "objc/api/peerconnection/RTCLegacyStatsReport.h",
813 "objc/api/peerconnection/RTCLegacyStatsReport.mm",
814 "objc/api/peerconnection/RTCMediaStream+Private.h",
815 "objc/api/peerconnection/RTCMediaStream.h",
816 "objc/api/peerconnection/RTCMediaStream.mm",
817 "objc/api/peerconnection/RTCMediaStreamTrack+Private.h",
818 "objc/api/peerconnection/RTCMediaStreamTrack.h",
819 "objc/api/peerconnection/RTCMediaStreamTrack.mm",
820 "objc/api/peerconnection/RTCMetrics.h",
821 "objc/api/peerconnection/RTCMetrics.mm",
822 "objc/api/peerconnection/RTCMetricsSampleInfo+Private.h",
823 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
824 "objc/api/peerconnection/RTCMetricsSampleInfo.mm",
825 "objc/api/peerconnection/RTCPeerConnection+DataChannel.mm",
826 "objc/api/peerconnection/RTCPeerConnection+Native.h",
827 "objc/api/peerconnection/RTCPeerConnection+Private.h",
828 "objc/api/peerconnection/RTCPeerConnection+Stats.mm",
829 "objc/api/peerconnection/RTCPeerConnection.h",
830 "objc/api/peerconnection/RTCPeerConnection.mm",
831 "objc/api/peerconnection/RTCPeerConnectionFactory+Native.h",
832 "objc/api/peerconnection/RTCPeerConnectionFactory+Private.h",
833 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
834 "objc/api/peerconnection/RTCPeerConnectionFactory.mm",
835 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.h",
836 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.mm",
837 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.h",
838 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.mm",
839 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions+Private.h",
840 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
841 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.mm",
842 "objc/api/peerconnection/RTCRtcpParameters+Private.h",
843 "objc/api/peerconnection/RTCRtcpParameters.h",
844 "objc/api/peerconnection/RTCRtcpParameters.mm",
845 "objc/api/peerconnection/RTCRtpCodecParameters+Private.h",
846 "objc/api/peerconnection/RTCRtpCodecParameters.h",
847 "objc/api/peerconnection/RTCRtpCodecParameters.mm",
848 "objc/api/peerconnection/RTCRtpEncodingParameters+Private.h",
849 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
850 "objc/api/peerconnection/RTCRtpEncodingParameters.mm",
851 "objc/api/peerconnection/RTCRtpHeaderExtension+Private.h",
852 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
853 "objc/api/peerconnection/RTCRtpHeaderExtension.mm",
854 "objc/api/peerconnection/RTCRtpParameters+Private.h",
855 "objc/api/peerconnection/RTCRtpParameters.h",
856 "objc/api/peerconnection/RTCRtpParameters.mm",
857 "objc/api/peerconnection/RTCRtpReceiver+Private.h",
858 "objc/api/peerconnection/RTCRtpReceiver.h",
859 "objc/api/peerconnection/RTCRtpReceiver.mm",
860 "objc/api/peerconnection/RTCRtpSender+Private.h",
861 "objc/api/peerconnection/RTCRtpSender.h",
862 "objc/api/peerconnection/RTCRtpSender.mm",
863 "objc/api/peerconnection/RTCRtpTransceiver+Private.h",
864 "objc/api/peerconnection/RTCRtpTransceiver.h",
865 "objc/api/peerconnection/RTCRtpTransceiver.mm",
866 "objc/api/peerconnection/RTCSSLAdapter.h",
867 "objc/api/peerconnection/RTCSSLAdapter.mm",
868 "objc/api/peerconnection/RTCSessionDescription+Private.h",
869 "objc/api/peerconnection/RTCSessionDescription.h",
870 "objc/api/peerconnection/RTCSessionDescription.mm",
871 "objc/api/peerconnection/RTCTracing.h",
872 "objc/api/peerconnection/RTCTracing.mm",
873 "objc/api/peerconnection/RTCVideoTrack+Private.h",
874 "objc/api/peerconnection/RTCVideoTrack.h",
875 "objc/api/peerconnection/RTCVideoTrack.mm",
kthelgason5fe4d492016-12-05 11:27:30 -0800876 ]
kthelgasonebc34e72016-09-15 04:30:18 -0700877
Anders Carlsson358f2e02018-06-04 10:24:37 +0200878 configs += [
879 "..:common_objc",
880 ":used_from_extension",
881 ]
kthelgason36d658d2017-08-24 05:43:45 -0700882 public_configs = [ ":common_config_objc" ]
kthelgasonc0977102017-04-24 00:57:16 -0700883
mbonadei2c8ac1b2017-05-31 05:14:26 -0700884 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200885 ":base_native_additions_objc",
886 ":base_objc",
887 ":file_logger_objc",
888 ":helpers_objc",
889 ":legacy_header_paths",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100890 ":mediaconstraints_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100891 ":mediasource_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100892 ":native_api",
893 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100894 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100895 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100896 ":videorendereradapter_objc",
897 ":videosource_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200898 ":videotoolbox_objc",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100899 "../api:libjingle_peerconnection_api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700900 "../api/audio_codecs:audio_codecs_api",
Karl Wiberg5817d3d2018-04-06 10:06:42 +0200901 "../api/audio_codecs:builtin_audio_decoder_factory",
Jiawei Ouae810c12018-06-20 16:18:59 -0700902 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200903 "../api/video:video_frame",
Anders Carlsson7e042812017-10-05 16:55:38 +0200904 "../api/video_codecs:video_codecs_api",
Anders Carlssone5960ce2017-06-22 15:26:30 +0200905 "../common_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700906 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -0700907 "../modules:module_api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700908 "../modules/audio_device:audio_device_api",
909 "../modules/audio_processing:audio_processing",
Patrik Höglund99175c62018-01-08 11:05:10 +0100910 "../modules/video_coding:video_codec_interface",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100911 "../pc:create_pc_factory",
zhihuanga4c113a2017-06-28 14:05:44 -0700912 "../pc:peerconnection",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100913 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700914 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +0200915 "//third_party/abseil-cpp/absl/memory",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700916 ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200917
918 if (is_ios) {
919 deps += [ ":native_api_audio_device_module" ]
920 }
kthelgasonebc34e72016-09-15 04:30:18 -0700921 }
Zeke Chindd0e1e02016-10-11 13:27:26 -0700922
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200923 # TODO(bugs.webrtc.org/9627): Remove this target.
924 rtc_source_set("legacy_header_paths") {
925 sources = [
926 "objc/Framework/Classes/Common/NSString+StdString.h",
927 "objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.h",
928 "objc/Framework/Classes/Common/scoped_cftyperef.h",
929 "objc/Framework/Classes/PeerConnection/RTCConfiguration+Native.h",
930 "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Native.h",
931 "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Native.h",
932 "objc/Framework/Classes/PeerConnection/RTCVideoCodec+Private.h",
933 "objc/Framework/Classes/Video/RTCDefaultShader.h",
934 "objc/Framework/Classes/Video/RTCNV12TextureCache.h",
935 "objc/Framework/Classes/VideoToolbox/nalu_rewriter.h",
936 "objc/Framework/Headers/WebRTC/RTCAudioSession.h",
937 "objc/Framework/Headers/WebRTC/RTCAudioSessionConfiguration.h",
938 "objc/Framework/Headers/WebRTC/RTCAudioSource.h",
939 "objc/Framework/Headers/WebRTC/RTCAudioTrack.h",
940 "objc/Framework/Headers/WebRTC/RTCCVPixelBuffer.h",
941 "objc/Framework/Headers/WebRTC/RTCCallbackLogger.h",
942 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
943 "objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h",
944 "objc/Framework/Headers/WebRTC/RTCCertificate.h",
945 "objc/Framework/Headers/WebRTC/RTCConfiguration.h",
946 "objc/Framework/Headers/WebRTC/RTCDataChannel.h",
947 "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h",
948 "objc/Framework/Headers/WebRTC/RTCDefaultVideoDecoderFactory.h",
949 "objc/Framework/Headers/WebRTC/RTCDefaultVideoEncoderFactory.h",
950 "objc/Framework/Headers/WebRTC/RTCDispatcher.h",
951 "objc/Framework/Headers/WebRTC/RTCDtmfSender.h",
952 "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
953 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h",
954 "objc/Framework/Headers/WebRTC/RTCFileLogger.h",
955 "objc/Framework/Headers/WebRTC/RTCFileVideoCapturer.h",
956 "objc/Framework/Headers/WebRTC/RTCH264ProfileLevelId.h",
957 "objc/Framework/Headers/WebRTC/RTCIceCandidate.h",
958 "objc/Framework/Headers/WebRTC/RTCIceServer.h",
959 "objc/Framework/Headers/WebRTC/RTCIntervalRange.h",
960 "objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h",
961 "objc/Framework/Headers/WebRTC/RTCLogging.h",
962 "objc/Framework/Headers/WebRTC/RTCMTLNSVideoView.h",
963 "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h",
964 "objc/Framework/Headers/WebRTC/RTCMacros.h",
965 "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h",
966 "objc/Framework/Headers/WebRTC/RTCMediaSource.h",
967 "objc/Framework/Headers/WebRTC/RTCMediaStream.h",
968 "objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h",
969 "objc/Framework/Headers/WebRTC/RTCMetrics.h",
970 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h",
971 "objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h",
972 "objc/Framework/Headers/WebRTC/RTCPeerConnection.h",
973 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h",
974 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactoryOptions.h",
975 "objc/Framework/Headers/WebRTC/RTCRtcpParameters.h",
976 "objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h",
977 "objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h",
978 "objc/Framework/Headers/WebRTC/RTCRtpHeaderExtension.h",
979 "objc/Framework/Headers/WebRTC/RTCRtpParameters.h",
980 "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h",
981 "objc/Framework/Headers/WebRTC/RTCRtpSender.h",
982 "objc/Framework/Headers/WebRTC/RTCRtpTransceiver.h",
983 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
984 "objc/Framework/Headers/WebRTC/RTCSessionDescription.h",
985 "objc/Framework/Headers/WebRTC/RTCTracing.h",
986 "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h",
987 "objc/Framework/Headers/WebRTC/RTCVideoCodec.h",
988 "objc/Framework/Headers/WebRTC/RTCVideoCodecFactory.h",
989 "objc/Framework/Headers/WebRTC/RTCVideoCodecH264.h",
990 "objc/Framework/Headers/WebRTC/RTCVideoCodecInfo.h",
991 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP8.h",
992 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP9.h",
993 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP8.h",
994 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP9.h",
995 "objc/Framework/Headers/WebRTC/RTCVideoFrame.h",
996 "objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.h",
997 "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h",
998 "objc/Framework/Headers/WebRTC/RTCVideoSource.h",
999 "objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
1000 "objc/Framework/Headers/WebRTC/RTCVideoViewShading.h",
1001 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
1002 "objc/Framework/Native/api/audio_device_module.h",
1003 "objc/Framework/Native/api/video_decoder_factory.h",
1004 "objc/Framework/Native/api/video_encoder_factory.h",
1005 "objc/Framework/Native/api/video_frame_buffer.h",
1006 "objc/Framework/Native/src/objc_video_decoder_factory.h",
1007 "objc/Framework/Native/src/objc_video_encoder_factory.h",
1008 ]
1009 }
1010
mbonadei2c8ac1b2017-05-31 05:14:26 -07001011 if (rtc_include_tests) {
Daniela012b56b2017-11-15 13:15:24 +01001012 if (is_ios) {
Danielaae012cf2017-10-12 13:46:00 +02001013 rtc_source_set("sdk_unittests_sources") {
1014 testonly = true
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001015 include_dirs = [ "objc/" ]
Daniela012b56b2017-11-15 13:15:24 +01001016
Danielaae012cf2017-10-12 13:46:00 +02001017 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001018 "objc/unittests/ObjCVideoTrackSource_xctest.mm",
1019 "objc/unittests/RTCCVPixelBuffer_xctest.mm",
1020 "objc/unittests/RTCCallbackLogger_xctest.m",
1021 "objc/unittests/RTCFileVideoCapturer_xctest.mm",
1022 "objc/unittests/RTCH264ProfileLevelId_xctest.m",
1023 "objc/unittests/RTCPeerConnectionFactory_xctest.m",
1024 "objc/unittests/frame_buffer_helpers.h",
1025 "objc/unittests/frame_buffer_helpers.mm",
Danielaae012cf2017-10-12 13:46:00 +02001026 ]
Daniela012b56b2017-11-15 13:15:24 +01001027
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001028 # TODO(peterhanspers): Reenable these tests on simulator.
1029 # See bugs.webrtc.org/7812
1030 if (!use_ios_simulator) {
1031 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001032 "objc/unittests/RTCAudioDeviceModule_xctest.mm",
1033 "objc/unittests/RTCAudioDevice_xctest.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001034 ]
1035 }
1036
Danielaae012cf2017-10-12 13:46:00 +02001037 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001038 ":audio_device",
1039 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001040 ":base_objc",
1041 ":callback_logger_objc",
Anders Carlssondc6b4772018-01-15 13:31:03 +01001042 ":framework_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001043 ":mediaconstraints_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001044 ":native_api",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001045 ":native_api_audio_device_module",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001046 ":native_video",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001047 ":peerconnectionfactory_base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001048 ":videocapture_objc",
Anders Carlsson79ce8202018-06-01 12:51:09 +02001049 ":videocodec_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001050 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001051 ":videosource_objc",
Danielaae012cf2017-10-12 13:46:00 +02001052 ":videotoolbox_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001053 "../api/video:video_frame_i420",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001054 "../common_video:common_video",
Danielaae012cf2017-10-12 13:46:00 +02001055 "../media:rtc_media_base",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001056 "../media:rtc_media_tests_utils",
Danielaae012cf2017-10-12 13:46:00 +02001057 "../modules:module_api",
1058 "../rtc_base:rtc_base",
1059 "../rtc_base:rtc_base_tests_utils",
Oleh Prypinda04e062018-07-23 10:04:12 +02001060 "../system_wrappers:system_wrappers",
1061 "../system_wrappers:system_wrappers_default",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001062 "//third_party/libyuv",
Danielaae012cf2017-10-12 13:46:00 +02001063 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001064
1065 if (rtc_use_metal_rendering) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001066 sources += [ "objc/unittests/RTCMTLVideoView_xctest.m" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001067 deps += [ ":metal_objc" ]
1068 }
1069
Danielaae012cf2017-10-12 13:46:00 +02001070 public_deps = [
1071 "//build/config/ios:xctest",
1072 "//third_party/ocmock",
1073 ]
1074 }
1075
Daniela012b56b2017-11-15 13:15:24 +01001076 bundle_data("sdk_unittests_bundle_data") {
Daniela012b56b2017-11-15 13:15:24 +01001077 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001078 "objc/unittests/audio_short16.pcm",
1079 "objc/unittests/audio_short44.pcm",
1080 "objc/unittests/audio_short48.pcm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001081
1082 # Sample video taken from https://media.xiph.org/video/derf/
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001083 "objc/unittests/foreman.mp4",
Daniela012b56b2017-11-15 13:15:24 +01001084 ]
1085 outputs = [
1086 "{{bundle_resources_dir}}/{{source_file_part}}",
1087 ]
1088 }
1089
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001090 # These tests use static linking.
Danielaae012cf2017-10-12 13:46:00 +02001091 rtc_ios_xctest_test("sdk_unittests") {
1092 info_plist = "//test/ios/Info.plist"
1093 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001094 "objc/unittests/main.m",
Danielaae012cf2017-10-12 13:46:00 +02001095 ]
Daniela012b56b2017-11-15 13:15:24 +01001096
Danielaae012cf2017-10-12 13:46:00 +02001097 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
1098 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
1099 deps = [
Yura Yaroshevich5297bd22018-06-19 12:51:51 +03001100 ":peerconnectionfactory_base_objc",
Daniela012b56b2017-11-15 13:15:24 +01001101 ":sdk_unittests_bundle_data",
Danielaae012cf2017-10-12 13:46:00 +02001102 ":sdk_unittests_sources",
1103 ]
1104 ldflags = [ "-all_load" ]
1105 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001106
1107 # These tests link to the framework.
1108 rtc_ios_xctest_test("sdk_framework_unittests") {
1109 info_plist = "//test/ios/Info.plist"
1110 sources = [
1111 "objc/unittests/RTCDoNotPutCPlusPlusInFrameworkHeaders_xctest.m",
1112 "objc/unittests/main.m",
1113 ]
1114
1115 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
1116 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
1117 deps = [
1118 ":framework_objc+link",
1119 ":ios_framework_bundle",
1120 ]
1121 }
Danielaae012cf2017-10-12 13:46:00 +02001122 }
1123
1124 # TODO(denicija): once all tests are migrated to xctest remove this source set.
Kári Tristan Helgason90143242018-07-27 12:34:54 +02001125 rtc_source_set("rtc_unittests_objc") {
mbonadei2c8ac1b2017-05-31 05:14:26 -07001126 testonly = true
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001127
mbonadei2c8ac1b2017-05-31 05:14:26 -07001128 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001129 "objc/unittests/RTCCertificateTest.mm",
1130 "objc/unittests/RTCConfigurationTest.mm",
1131 "objc/unittests/RTCDataChannelConfigurationTest.mm",
1132 "objc/unittests/RTCIceCandidateTest.mm",
1133 "objc/unittests/RTCIceServerTest.mm",
1134 "objc/unittests/RTCIntervalRangeTests.mm",
1135 "objc/unittests/RTCMediaConstraintsTest.mm",
1136 "objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm",
1137 "objc/unittests/RTCPeerConnectionTest.mm",
1138 "objc/unittests/RTCSessionDescriptionTest.mm",
1139 "objc/unittests/RTCTracingTest.mm",
1140 "objc/unittests/objc_video_decoder_factory_tests.mm",
1141 "objc/unittests/objc_video_encoder_factory_tests.mm",
1142 "objc/unittests/scoped_cftyperef_tests.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001143 ]
Anders Carlssone7dd83f2018-01-19 11:28:44 +01001144 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001145 sources += [ "objc/unittests/RTCCameraVideoCapturerTests.mm" ]
oprypin45197522017-06-22 01:47:20 -07001146 }
mbonadeid7620582017-05-30 01:50:35 -07001147
mbonadei2c8ac1b2017-05-31 05:14:26 -07001148 # |-ObjC| flag needed to make sure category method implementations
1149 # are included:
1150 # https://developer.apple.com/library/mac/qa/qa1490/_index.html
1151 ldflags = [ "-ObjC" ]
magjed3149e092017-05-08 05:32:05 -07001152
mbonadei2c8ac1b2017-05-31 05:14:26 -07001153 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001154 ":base_objc",
1155 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001156 ":mediaconstraints_objc",
1157 ":native_api",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001158 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001159 ":peerconnectionfactory_base_objc",
1160 ":video_objc",
1161 ":videocapture_objc",
1162 ":videocodec_objc",
1163 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001164 ":videosource_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001165 ":videotoolbox_objc",
Jiawei Ouae810c12018-06-20 16:18:59 -07001166 "../api/audio_codecs:audio_codecs_api",
1167 "../api/audio_codecs:builtin_audio_decoder_factory",
1168 "../api/audio_codecs:builtin_audio_encoder_factory",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001169 "../api/video_codecs:video_codecs_api",
kthelgasonebd4f792017-09-04 04:36:21 -07001170 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -07001171 "../modules:module_api",
Jiawei Ouae810c12018-06-20 16:18:59 -07001172 "../modules/audio_device:audio_device_api",
1173 "../modules/audio_processing:audio_processing",
Patrik Höglund99175c62018-01-08 11:05:10 +01001174 "../modules/video_coding:video_codec_interface",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001175 "../rtc_base:rtc_base_tests_utils",
Niels Möllera12c42a2018-07-25 16:05:48 +02001176 "../rtc_base/system:unused",
Oleh Prypinda04e062018-07-23 10:04:12 +02001177 "../system_wrappers:system_wrappers_default",
Kári Tristan Helgasonca957482017-10-05 14:06:52 +02001178 "//test:test_support",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001179 "//third_party/ocmock",
1180 ]
magjed3149e092017-05-08 05:32:05 -07001181
denicija59ee91b2017-06-05 05:48:47 -07001182 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001183 sources += [ "objc/unittests/RTCAudioSessionTest.mm" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001184 deps += [ ":audio_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001185 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001186 }
kthelgason2f088792017-05-30 01:48:47 -07001187 }
1188
mbonadei2c8ac1b2017-05-31 05:14:26 -07001189 if (is_ios) {
Anders Carlssondc6b4772018-01-15 13:31:03 +01001190 ios_framework_bundle_with_umbrella_header("framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001191 info_plist = "objc/Info.plist"
mbonadei2c8ac1b2017-05-31 05:14:26 -07001192 output_name = "WebRTC"
Magnus Jedvertf83dc8b2017-08-29 09:49:43 +00001193
mbonadei2c8ac1b2017-05-31 05:14:26 -07001194 common_objc_headers = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001195 "objc/base/RTCCodecSpecificInfo.h",
1196 "objc/base/RTCEncodedImage.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001197 "objc/base/RTCI420Buffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001198 "objc/base/RTCLogging.h",
1199 "objc/base/RTCMacros.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001200 "objc/base/RTCMutableI420Buffer.h",
1201 "objc/base/RTCMutableYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001202 "objc/base/RTCRtpFragmentationHeader.h",
1203 "objc/base/RTCVideoCapturer.h",
1204 "objc/base/RTCVideoCodecInfo.h",
1205 "objc/base/RTCVideoDecoder.h",
1206 "objc/base/RTCVideoDecoderFactory.h",
1207 "objc/base/RTCVideoEncoder.h",
1208 "objc/base/RTCVideoEncoderFactory.h",
1209 "objc/base/RTCVideoEncoderQpThresholds.h",
1210 "objc/base/RTCVideoEncoderSettings.h",
1211 "objc/base/RTCVideoFrame.h",
1212 "objc/base/RTCVideoFrameBuffer.h",
1213 "objc/base/RTCVideoRenderer.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001214 "objc/base/RTCYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001215 "objc/components/audio/RTCAudioSession.h",
1216 "objc/components/audio/RTCAudioSessionConfiguration.h",
1217 "objc/components/capturer/RTCCameraVideoCapturer.h",
1218 "objc/components/capturer/RTCFileVideoCapturer.h",
1219 "objc/components/renderer/metal/RTCMTLVideoView.h",
1220 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
1221 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1222 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1223 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1224 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1225 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1226 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1227 "objc/components/video_codec/RTCVideoDecoderH264.h",
1228 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1229 "objc/components/video_codec/RTCVideoEncoderH264.h",
1230 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1231 "objc/helpers/RTCCameraPreviewView.h",
1232 "objc/helpers/RTCDispatcher.h",
1233 "objc/helpers/UIDevice+RTCDevice.h",
1234 "objc/api/peerconnection/RTCAudioSource.h",
1235 "objc/api/peerconnection/RTCAudioTrack.h",
1236 "objc/api/peerconnection/RTCConfiguration.h",
1237 "objc/api/peerconnection/RTCDataChannel.h",
1238 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1239 "objc/api/peerconnection/RTCFieldTrials.h",
1240 "objc/api/peerconnection/RTCIceCandidate.h",
1241 "objc/api/peerconnection/RTCIceServer.h",
1242 "objc/api/peerconnection/RTCIntervalRange.h",
1243 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1244 "objc/api/peerconnection/RTCMediaConstraints.h",
1245 "objc/api/peerconnection/RTCMediaSource.h",
1246 "objc/api/peerconnection/RTCMediaStream.h",
1247 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1248 "objc/api/peerconnection/RTCMetrics.h",
1249 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1250 "objc/api/peerconnection/RTCPeerConnection.h",
1251 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1252 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1253 "objc/api/peerconnection/RTCRtcpParameters.h",
1254 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1255 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1256 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1257 "objc/api/peerconnection/RTCRtpParameters.h",
1258 "objc/api/peerconnection/RTCRtpReceiver.h",
1259 "objc/api/peerconnection/RTCRtpSender.h",
1260 "objc/api/peerconnection/RTCRtpTransceiver.h",
1261 "objc/api/peerconnection/RTCDtmfSender.h",
1262 "objc/api/peerconnection/RTCSSLAdapter.h",
1263 "objc/api/peerconnection/RTCSessionDescription.h",
1264 "objc/api/peerconnection/RTCTracing.h",
1265 "objc/api/peerconnection/RTCCertificate.h",
1266 "objc/api/peerconnection/RTCVideoSource.h",
1267 "objc/api/peerconnection/RTCVideoTrack.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001268 "objc/api/video_codec/RTCVideoCodecConstants.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001269 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1270 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1271 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1272 "objc/api/video_codec/RTCVideoEncoderVP9.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001273 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1274 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001275 ]
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001276
mbonadei2c8ac1b2017-05-31 05:14:26 -07001277 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001278 common_objc_headers += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001279 "objc/api/logging/RTCCallbackLogger.h",
1280 "objc/api/peerconnection/RTCFileLogger.h",
Anders Carlsson3b3364e2018-01-30 15:46:13 +01001281 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001282 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001283
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001284 sources = common_objc_headers
1285 public_headers = common_objc_headers
1286
mbonadei2c8ac1b2017-05-31 05:14:26 -07001287 ldflags = [
1288 "-all_load",
1289 "-install_name",
1290 "@rpath/$output_name.framework/$output_name",
1291 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001292
mbonadei2c8ac1b2017-05-31 05:14:26 -07001293 deps = [
kthelgason36d658d2017-08-24 05:43:45 -07001294 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001295 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001296 ":default_codec_factory_objc",
1297 ":native_api",
1298 ":native_video",
1299 ":peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001300 ":ui_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001301 ":videocapture_objc",
1302 ":videocodec_objc",
1303 ":videotoolbox_objc",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001304 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001305 "../system_wrappers:field_trial_default",
1306 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +00001307 "../system_wrappers:runtime_enabled_features_default",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001308 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001309 if (rtc_use_metal_rendering) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001310 deps += [ ":metal_objc" ]
1311 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001312 if (!build_with_chromium) {
1313 deps += [
1314 ":callback_logger_objc",
1315 ":file_logger_objc",
1316 ]
1317 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001318
mbonadei2c8ac1b2017-05-31 05:14:26 -07001319 libs = [
1320 "AVFoundation.framework",
1321 "CoreGraphics.framework",
1322 "CoreMedia.framework",
1323 "GLKit.framework",
1324 ]
1325
Anders Carlsson358f2e02018-06-04 10:24:37 +02001326 configs += [
1327 "..:common_objc",
1328 ":used_from_extension",
1329 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001330
kthelgason36d658d2017-08-24 05:43:45 -07001331 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001332 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001333
1334 bundle_data("ios_framework_bundle") {
1335 deps = [
1336 "../sdk:framework_objc",
1337 ]
1338 sources = [
1339 "$root_build_dir/WebRTC.framework",
1340 ]
1341 outputs = [
1342 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
1343 ]
1344 }
1345 }
1346
1347 if (is_mac) {
1348 mac_framework_header_files = [
1349 "objc/base/RTCCodecSpecificInfo.h",
1350 "objc/base/RTCEncodedImage.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001351 "objc/base/RTCI420Buffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001352 "objc/base/RTCLogging.h",
1353 "objc/base/RTCMacros.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001354 "objc/base/RTCMutableI420Buffer.h",
1355 "objc/base/RTCMutableYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001356 "objc/base/RTCRtpFragmentationHeader.h",
1357 "objc/base/RTCVideoCapturer.h",
1358 "objc/base/RTCVideoCodecInfo.h",
1359 "objc/base/RTCVideoDecoder.h",
1360 "objc/base/RTCVideoDecoderFactory.h",
1361 "objc/base/RTCVideoEncoder.h",
1362 "objc/base/RTCVideoEncoderFactory.h",
1363 "objc/base/RTCVideoEncoderQpThresholds.h",
1364 "objc/base/RTCVideoEncoderSettings.h",
1365 "objc/base/RTCVideoFrame.h",
1366 "objc/base/RTCVideoFrameBuffer.h",
1367 "objc/base/RTCVideoRenderer.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001368 "objc/base/RTCYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001369 "objc/components/capturer/RTCCameraVideoCapturer.h",
1370 "objc/components/capturer/RTCFileVideoCapturer.h",
1371 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
1372 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
1373 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1374 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1375 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1376 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1377 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1378 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1379 "objc/components/video_codec/RTCVideoDecoderH264.h",
1380 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1381 "objc/components/video_codec/RTCVideoEncoderH264.h",
1382 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1383 "objc/helpers/RTCDispatcher.h",
1384 "objc/api/peerconnection/RTCAudioSource.h",
1385 "objc/api/peerconnection/RTCAudioTrack.h",
1386 "objc/api/peerconnection/RTCConfiguration.h",
1387 "objc/api/peerconnection/RTCDataChannel.h",
1388 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1389 "objc/api/peerconnection/RTCFieldTrials.h",
1390 "objc/api/peerconnection/RTCIceCandidate.h",
1391 "objc/api/peerconnection/RTCIceServer.h",
1392 "objc/api/peerconnection/RTCIntervalRange.h",
1393 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1394 "objc/api/peerconnection/RTCMediaConstraints.h",
1395 "objc/api/peerconnection/RTCMediaSource.h",
1396 "objc/api/peerconnection/RTCMediaStream.h",
1397 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1398 "objc/api/peerconnection/RTCMetrics.h",
1399 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1400 "objc/api/peerconnection/RTCPeerConnection.h",
1401 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1402 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1403 "objc/api/peerconnection/RTCRtcpParameters.h",
1404 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1405 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1406 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1407 "objc/api/peerconnection/RTCRtpParameters.h",
1408 "objc/api/peerconnection/RTCRtpReceiver.h",
1409 "objc/api/peerconnection/RTCRtpSender.h",
1410 "objc/api/peerconnection/RTCRtpTransceiver.h",
1411 "objc/api/peerconnection/RTCDtmfSender.h",
1412 "objc/api/peerconnection/RTCSSLAdapter.h",
1413 "objc/api/peerconnection/RTCSessionDescription.h",
1414 "objc/api/peerconnection/RTCTracing.h",
1415 "objc/api/peerconnection/RTCCertificate.h",
1416 "objc/api/peerconnection/RTCVideoSource.h",
1417 "objc/api/peerconnection/RTCVideoTrack.h",
1418 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1419 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1420 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1421 "objc/api/video_codec/RTCVideoEncoderVP9.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001422 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1423 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001424 ]
1425 if (!build_with_chromium) {
1426 mac_framework_header_files += [
1427 "objc/api/logging/RTCCallbackLogger.h",
1428 "objc/api/peerconnection/RTCFileLogger.h",
1429 ]
1430 }
1431
1432 bundle_data("framework_headers") {
1433 # TODO(andersc): Generate umbrella header
1434 sources = mac_framework_header_files
1435 outputs = [
1436 "{{bundle_contents_dir}}/Headers/{{source_file_part}}",
1437 ]
1438 }
1439
1440 mac_framework_bundle("mac_framework_objc") {
1441 info_plist = "objc/Info.plist"
1442 output_name = "WebRTC"
1443 framework_version = "A"
1444 framework_contents = [ "Headers" ]
1445
1446 sources = mac_framework_header_files
1447
1448 ldflags = [
1449 "-all_load",
1450 "-install_name",
1451 "@rpath/$output_name.framework/$output_name",
1452 ]
1453
1454 deps = [
1455 ":base_objc",
1456 ":default_codec_factory_objc",
1457 ":framework_headers",
1458 ":native_api",
1459 ":native_video",
1460 ":peerconnectionfactory_base_objc",
1461 ":ui_objc",
1462 ":videocapture_objc",
1463 ":videocodec_objc",
1464 ":videotoolbox_objc",
1465 "../rtc_base:rtc_base_approved",
1466 "../system_wrappers:field_trial_default",
1467 "../system_wrappers:metrics_default",
1468 "../system_wrappers:runtime_enabled_features_default",
1469 ]
1470 if (rtc_use_metal_rendering) {
1471 deps += [ ":metal_objc" ]
1472 }
1473 if (!build_with_chromium) {
1474 deps += [
1475 ":callback_logger_objc",
1476 ":file_logger_objc",
1477 ]
1478 }
1479
1480 libs = [
1481 "AVFoundation.framework",
1482 "CoreGraphics.framework",
1483 "CoreMedia.framework",
1484 "OpenGL.framework",
1485 ]
1486
1487 configs += [ "..:common_objc" ]
1488
1489 public_configs = [ ":common_config_objc" ]
1490 }
1491
1492 bundle_data("mac_framework_bundle") {
1493 deps = [
1494 "../sdk:mac_framework_objc",
1495 ]
1496 sources = [
1497 "$root_build_dir/WebRTC.framework",
1498 ]
1499 outputs = [
1500 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
1501 ]
1502 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001503 }
1504
Anders Carlsson9823ee42018-03-07 10:32:03 +01001505 rtc_static_library("wrapped_native_codec_objc") {
1506 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001507 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.h",
1508 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm",
1509 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.h",
1510 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001511 ]
1512
1513 configs += [ "..:common_objc" ]
1514 public_configs = [ ":common_config_objc" ]
1515
Anders Carlsson9823ee42018-03-07 10:32:03 +01001516 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001517 ":base_objc",
1518 ":helpers_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001519 "../api/video_codecs:video_codecs_api",
1520 "../media:rtc_media_base",
1521 ]
1522 }
1523
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001524 # The native API is currently experimental and may change without notice.
1525 rtc_static_library("native_api") {
1526 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +02001527 allow_poison = [
1528 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
1529 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
1530 ]
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001531 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001532 "objc/native/api/video_capturer.h",
1533 "objc/native/api/video_capturer.mm",
1534 "objc/native/api/video_decoder_factory.h",
1535 "objc/native/api/video_decoder_factory.mm",
1536 "objc/native/api/video_encoder_factory.h",
1537 "objc/native/api/video_encoder_factory.mm",
1538 "objc/native/api/video_frame.h",
1539 "objc/native/api/video_frame.mm",
1540 "objc/native/api/video_frame_buffer.h",
1541 "objc/native/api/video_frame_buffer.mm",
1542 "objc/native/api/video_renderer.h",
1543 "objc/native/api/video_renderer.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001544 ]
1545
1546 configs += [ "..:common_objc" ]
1547
1548 public_configs = [ ":common_config_objc" ]
1549
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001550 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001551 ":base_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001552 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001553 ":videoframebuffer_objc",
Anders Carlsson73119182018-03-15 09:41:03 +01001554 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001555 "../api/video:video_frame",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001556 "../api/video_codecs:video_codecs_api",
1557 "../common_video",
1558 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +02001559 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001560 ]
1561 }
1562
1563 rtc_static_library("native_video") {
1564 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001565 "objc/native/src/objc_frame_buffer.h",
1566 "objc/native/src/objc_frame_buffer.mm",
1567 "objc/native/src/objc_video_decoder_factory.h",
1568 "objc/native/src/objc_video_decoder_factory.mm",
1569 "objc/native/src/objc_video_encoder_factory.h",
1570 "objc/native/src/objc_video_encoder_factory.mm",
1571 "objc/native/src/objc_video_frame.h",
1572 "objc/native/src/objc_video_frame.mm",
1573 "objc/native/src/objc_video_renderer.h",
1574 "objc/native/src/objc_video_renderer.mm",
1575 "objc/native/src/objc_video_track_source.h",
1576 "objc/native/src/objc_video_track_source.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001577 ]
1578
1579 configs += [ "..:common_objc" ]
1580
1581 public_configs = [ ":common_config_objc" ]
1582
1583 if (!build_with_chromium && is_clang) {
1584 # Suppress warnings from the Chromium Clang plugin
1585 # (bugs.webrtc.org/163).
1586 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1587 }
1588
1589 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001590 ":base_native_additions_objc",
1591 ":base_objc",
1592 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001593 ":videocodec_objc",
1594 ":videoframebuffer_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001595 ":vpx_codec_constants",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001596 ":wrapped_native_codec_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001597 "../api/video:video_frame",
1598 "../api/video:video_frame_i420",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001599 "../api/video_codecs:video_codecs_api",
1600 "../common_video",
1601 "../media:rtc_audio_video",
1602 "../media:rtc_media_base",
1603 "../modules:module_api",
1604 "../modules/video_coding:video_codec_interface",
1605 "../rtc_base:checks",
1606 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +02001607 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001608 ]
1609 }
1610
mbonadeic0af5ac2017-08-24 12:26:05 -07001611 rtc_static_library("video_toolbox_cc") {
mbonadei6ff8f962017-09-04 05:51:34 -07001612 visibility = [ ":videotoolbox_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001613 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001614 "objc/components/video_codec/helpers.cc",
1615 "objc/components/video_codec/helpers.h",
1616 "objc/components/video_codec/nalu_rewriter.cc",
1617 "objc/components/video_codec/nalu_rewriter.h",
mbonadeic0af5ac2017-08-24 12:26:05 -07001618 ]
1619 deps = [
1620 "../common_video",
1621 "../modules:module_api",
1622 "../modules/video_coding:webrtc_h264",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001623 "../rtc_base:checks",
mbonadeic0af5ac2017-08-24 12:26:05 -07001624 "../rtc_base:rtc_base_approved",
1625 ]
mbonadeic0af5ac2017-08-24 12:26:05 -07001626 }
1627
1628 rtc_static_library("videotoolbox_objc") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001629 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +02001630 allow_poison = [
1631 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
1632 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
1633 ]
mbonadeic0af5ac2017-08-24 12:26:05 -07001634 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001635 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1636 "objc/components/video_codec/RTCVideoDecoderFactoryH264.m",
1637 "objc/components/video_codec/RTCVideoDecoderH264.h",
1638 "objc/components/video_codec/RTCVideoDecoderH264.mm",
1639 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1640 "objc/components/video_codec/RTCVideoEncoderFactoryH264.m",
1641 "objc/components/video_codec/RTCVideoEncoderH264.h",
1642 "objc/components/video_codec/RTCVideoEncoderH264.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001643 ]
1644
Anders Carlsson358f2e02018-06-04 10:24:37 +02001645 configs += [
1646 "..:common_objc",
1647 ":used_from_extension",
1648 ]
1649
1650 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
1651 defines = [ "RTC_APPRTCMOBILE_BROADCAST_EXTENSION" ]
1652 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001653
1654 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001655 ":base_native_additions_objc",
1656 ":base_objc",
1657 ":helpers_objc",
mbonadeic0af5ac2017-08-24 12:26:05 -07001658 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001659 ":videocodec_objc",
1660 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001661 "../common_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001662 "../modules:module_api",
Patrik Höglund99175c62018-01-08 11:05:10 +01001663 "../modules/video_coding:video_codec_interface",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001664 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001665 "../rtc_base:rtc_base_approved",
Mirko Bonadei401d0562017-12-14 11:24:00 +01001666 "//third_party/libyuv",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001667 ]
1668
1669 libs = [
1670 "CoreFoundation.framework",
1671 "CoreMedia.framework",
1672 "CoreVideo.framework",
1673 "VideoToolbox.framework",
1674 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001675 }
1676 }
tkchin9eeb6242016-04-27 01:54:20 -07001677}