blob: 77d3c43db8ecbe80338dd7f026d014b4d6304656 [file] [log] [blame]
tkchin9eeb6242016-04-27 01:54:20 -07001# Copyright 2016 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
mbonadei9aa3f0a2017-01-24 06:58:22 -08009import("../webrtc.gni")
kthelgasonebc34e72016-09-15 04:30:18 -070010if (is_ios) {
oprypin45197522017-06-22 01:47:20 -070011 import("//build/config/ios/ios_sdk.gni")
Mirko Bonadei2ff3f492018-11-22 09:00:13 +010012 import("//build/config/ios/rules.gni")
kthelgasonebc34e72016-09-15 04:30:18 -070013}
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020014if (is_mac) {
15 import("//build/config/mac/rules.gni")
kthelgason2f088792017-05-30 01:48:47 -070016}
17
kjellander6ceab082016-10-28 05:44:03 -070018group("sdk") {
Henrik Kjellandera7d0df72017-06-27 08:56:46 +020019 public_deps = []
20 if (!build_with_chromium) {
21 if (is_android) {
22 public_deps += [ "android" ]
23 }
24 if (is_ios) {
kthelgason36d658d2017-08-24 05:43:45 -070025 public_deps += [ ":framework_objc" ]
Henrik Kjellandera7d0df72017-06-27 08:56:46 +020026 }
kjellander6ceab082016-10-28 05:44:03 -070027 }
28}
29
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 = [
Jiawei Ou4aeb35b2018-11-09 13:55:45 -080043 "-Wimplicit-retain-self",
Kári Tristan Helgason47d3a012017-10-24 15:28:51 +020044 "-Wstrict-overflow",
45 "-Wmissing-field-initializers",
46 ]
Artem Titarenko17ad64e2018-09-19 17:53:59 +020047
48 if (use_clang_coverage) {
49 configs = [ "//build/config/coverage:default_coverage" ]
50 }
kjellander080a1e32016-05-25 11:37:11 -070051 }
52
Anders Carlsson358f2e02018-06-04 10:24:37 +020053 config("used_from_extension") {
54 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
55 cflags = [ "-fapplication-extension" ]
56 }
57 }
58
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020059 # TODO(bugs.webrtc.org/9627): Remove this when unused. Targets should depend on base_objc
60 # or helpers_objc directly instead.
kthelgason36d658d2017-08-24 05:43:45 -070061 rtc_static_library("common_objc") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +020062 visibility = [ "*" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020063
tkchin9eeb6242016-04-27 01:54:20 -070064 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020065 "objc/helpers/noop.mm",
66 ]
67
68 public_configs = [ ":common_config_objc" ]
69
70 deps = [
71 ":base_objc",
72 ":helpers_objc",
73 ]
74 }
75
76 rtc_static_library("base_objc") {
77 visibility = [ "*" ]
78 sources = [
79 "objc/base/RTCCodecSpecificInfo.h",
80 "objc/base/RTCEncodedImage.h",
81 "objc/base/RTCEncodedImage.m",
82 "objc/base/RTCI420Buffer.h",
83 "objc/base/RTCLogging.h",
84 "objc/base/RTCLogging.mm",
85 "objc/base/RTCMacros.h",
86 "objc/base/RTCMutableI420Buffer.h",
87 "objc/base/RTCMutableYUVPlanarBuffer.h",
88 "objc/base/RTCRtpFragmentationHeader.h",
89 "objc/base/RTCRtpFragmentationHeader.m",
90 "objc/base/RTCVideoCapturer.h",
91 "objc/base/RTCVideoCapturer.m",
92 "objc/base/RTCVideoCodecInfo.h",
93 "objc/base/RTCVideoCodecInfo.m",
94 "objc/base/RTCVideoDecoder.h",
95 "objc/base/RTCVideoDecoderFactory.h",
96 "objc/base/RTCVideoEncoder.h",
97 "objc/base/RTCVideoEncoderFactory.h",
98 "objc/base/RTCVideoEncoderQpThresholds.h",
99 "objc/base/RTCVideoEncoderQpThresholds.m",
100 "objc/base/RTCVideoEncoderSettings.h",
101 "objc/base/RTCVideoEncoderSettings.m",
102 "objc/base/RTCVideoFrame.h",
103 "objc/base/RTCVideoFrame.mm",
104 "objc/base/RTCVideoFrameBuffer.h",
105 "objc/base/RTCVideoRenderer.h",
106 "objc/base/RTCYUVPlanarBuffer.h",
tkchin9eeb6242016-04-27 01:54:20 -0700107 ]
denicijad2088152017-04-28 02:14:54 -0700108
mbonadei1e060c62017-04-21 00:02:02 -0700109 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100110 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700111 "../rtc_base:rtc_base",
mbonadei1e060c62017-04-21 00:02:02 -0700112 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200113 configs += [
114 "..:common_objc",
115 ":used_from_extension",
116 ]
kthelgasonc0977102017-04-24 00:57:16 -0700117
kthelgason36d658d2017-08-24 05:43:45 -0700118 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200119 }
120
121 rtc_static_library("helpers_objc") {
122 sources = [
123 "objc/helpers/AVCaptureSession+DevicePosition.h",
124 "objc/helpers/AVCaptureSession+DevicePosition.mm",
125 "objc/helpers/NSString+StdString.h",
126 "objc/helpers/NSString+StdString.mm",
127 "objc/helpers/RTCDispatcher+Private.h",
128 "objc/helpers/RTCDispatcher.h",
129 "objc/helpers/RTCDispatcher.m",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200130 "objc/helpers/scoped_cftyperef.h",
131 ]
132
133 deps = [
134 ":base_objc",
135 "../rtc_base:checks",
136 ]
137
138 libs = [
139 "AVFoundation.framework",
140 "CoreMedia.framework",
141 ]
142
143 configs += [
144 "..:common_objc",
145 ":used_from_extension",
146 ]
147
148 public_configs = [ ":common_config_objc" ]
denicijad2088152017-04-28 02:14:54 -0700149
kjellander3bcedd32016-06-08 01:14:15 -0700150 if (is_ios) {
151 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200152 "objc/helpers/RTCCameraPreviewView.h",
153 "objc/helpers/RTCCameraPreviewView.m",
154 "objc/helpers/UIDevice+RTCDevice.h",
155 "objc/helpers/UIDevice+RTCDevice.mm",
156 ]
157 }
158 }
159
160 if (!build_with_chromium) {
161 rtc_static_library("callback_logger_objc") {
162 sources = [
163 "objc/api/logging/RTCCallbackLogger.h",
164 "objc/api/logging/RTCCallbackLogger.mm",
165 ]
166
167 deps = [
168 ":base_objc",
169 "../rtc_base:checks",
170 "../rtc_base:logging",
171 "../rtc_base:rtc_base",
172 ]
173
174 configs += [
175 "..:common_objc",
176 ":used_from_extension",
kjellander3bcedd32016-06-08 01:14:15 -0700177 ]
denicijad2088152017-04-28 02:14:54 -0700178 }
179
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200180 rtc_static_library("file_logger_objc") {
181 sources = [
182 "objc/api/peerconnection/RTCFileLogger.h",
183 "objc/api/peerconnection/RTCFileLogger.mm",
184 ]
185
186 deps = [
187 ":base_objc",
188 "../rtc_base:checks",
189 "../rtc_base:logging",
190 "../rtc_base:rtc_base",
191 ]
192
193 configs += [
194 "..:common_objc",
195 ":used_from_extension",
kthelgason2f088792017-05-30 01:48:47 -0700196 ]
197 }
198 }
199
mbonadei2c8ac1b2017-05-31 05:14:26 -0700200 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100201 if (is_ios) {
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200202 rtc_static_library("native_api_audio_device_module") {
203 visibility = [ "*" ]
204
205 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200206 "objc/native/api/audio_device_module.h",
207 "objc/native/api/audio_device_module.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200208 ]
209
210 deps = [
211 ":audio_device",
212 "../modules/audio_device:audio_device_api",
213 "../modules/audio_device:audio_device_generic",
214 "../rtc_base:checks",
215 "../rtc_base:rtc_base_approved",
216 "../system_wrappers",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200217 ]
218
219 if (is_clang) {
220 # Suppress warnings from the Chromium Clang plugin
221 # (bugs.webrtc.org/163).
222 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
223 }
224 }
225
226 rtc_source_set("audio_session_observer") {
227 visibility = [ ":*" ]
228
229 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200230 "objc/native/src/audio/audio_session_observer.h",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200231 ]
232
233 deps = [
234 "../rtc_base:rtc_base",
235 ]
236 }
237
238 rtc_static_library("audio_device") {
239 visibility = [ "*" ]
240
241 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200242 "objc/native/src/audio/audio_device_ios.h",
243 "objc/native/src/audio/audio_device_ios.mm",
244 "objc/native/src/audio/audio_device_module_ios.h",
245 "objc/native/src/audio/audio_device_module_ios.mm",
246 "objc/native/src/audio/helpers.h",
247 "objc/native/src/audio/helpers.mm",
248 "objc/native/src/audio/voice_processing_audio_unit.h",
249 "objc/native/src/audio/voice_processing_audio_unit.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200250 ]
251
252 deps = [
253 ":audio_objc",
254 ":audio_session_observer",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200255 ":base_objc",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200256 "../api:array_view",
257 "../modules/audio_device:audio_device_api",
258 "../modules/audio_device:audio_device_buffer",
259 "../modules/audio_device:audio_device_generic",
260 "../rtc_base:checks",
261 "../rtc_base:rtc_base",
262 "../rtc_base/system:fallthrough",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200263 "../system_wrappers:metrics",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200264 ]
265
Jiawei Ouc9e6b962018-10-09 12:33:06 -0700266 libs = [ "AudioToolbox.framework" ]
267
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200268 if (is_clang) {
269 # Suppress warnings from the Chromium Clang plugin
270 # (bugs.webrtc.org/163).
271 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
272 }
273 }
274
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100275 rtc_static_library("audio_objc") {
276 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200277 "objc/components/audio/RTCAudioSession+Configuration.mm",
278 "objc/components/audio/RTCAudioSession+Private.h",
279 "objc/components/audio/RTCAudioSession.h",
280 "objc/components/audio/RTCAudioSession.mm",
281 "objc/components/audio/RTCAudioSessionConfiguration.h",
282 "objc/components/audio/RTCAudioSessionConfiguration.m",
283 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.h",
284 "objc/components/audio/RTCNativeAudioSessionDelegateAdapter.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100285 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200286 configs += [
287 "..:common_objc",
288 ":used_from_extension",
289 ]
denicija59ee91b2017-06-05 05:48:47 -0700290
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100291 public_configs = [ ":common_config_objc" ]
Anders Carlsson8ecfd802017-09-15 14:07:30 +0200292
Jiawei Ouc9e6b962018-10-09 12:33:06 -0700293 libs = [ "AVFoundation.framework" ]
294
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100295 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200296 ":audio_session_observer",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200297 ":base_objc",
298 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100299 "../rtc_base:checks",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200300 "../rtc_base:rtc_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100301 "../rtc_base:rtc_base_approved",
302 ]
denicija59ee91b2017-06-05 05:48:47 -0700303 }
304 }
zhihuanga4c113a2017-06-28 14:05:44 -0700305
Anders Carlsson9823ee42018-03-07 10:32:03 +0100306 rtc_static_library("videosource_objc") {
zhihuanga4c113a2017-06-28 14:05:44 -0700307 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200308 "objc/api/peerconnection/RTCVideoSource+Private.h",
309 "objc/api/peerconnection/RTCVideoSource.h",
310 "objc/api/peerconnection/RTCVideoSource.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700311 ]
312
313 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200314 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100315 ":mediasource_objc",
316 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100317 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700318 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200319 "../api/video:video_frame",
320 "../api/video:video_frame_i420",
zhihuanga4c113a2017-06-28 14:05:44 -0700321 "../common_video",
322 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100323 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700324 "../rtc_base:rtc_base",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100325 "//third_party/libyuv",
zhihuanga4c113a2017-06-28 14:05:44 -0700326 ]
327
Anders Carlsson358f2e02018-06-04 10:24:37 +0200328 configs += [
329 "..:common_objc",
330 ":used_from_extension",
331 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700332 }
333
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100334 rtc_static_library("videoframebuffer_objc") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200335 visibility = [ "*" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100336 sources = [
Anders Carlsson4e5af962018-09-03 14:44:50 +0200337 "objc/api/video_frame_buffer/RTCNativeI420Buffer+Private.h",
338 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
339 "objc/api/video_frame_buffer/RTCNativeI420Buffer.mm",
340 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
341 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200342 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
343 "objc/components/video_frame_buffer/RTCCVPixelBuffer.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100344 ]
345 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200346 ":base_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200347 "//api/video:video_frame",
348 "//api/video:video_frame_i420",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100349 "//common_video",
350 "//rtc_base:checks",
351 "//rtc_base:rtc_base_approved",
352 "//third_party/libyuv",
353 ]
Anders Carlsson358f2e02018-06-04 10:24:37 +0200354 configs += [
355 "..:common_objc",
356 ":used_from_extension",
357 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100358 }
359
kthelgason36d658d2017-08-24 05:43:45 -0700360 rtc_static_library("video_objc") {
kthelgason2f088792017-05-30 01:48:47 -0700361 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200362 "objc/components/renderer/opengl/RTCDefaultShader.h",
363 "objc/components/renderer/opengl/RTCDefaultShader.mm",
364 "objc/components/renderer/opengl/RTCI420TextureCache.h",
365 "objc/components/renderer/opengl/RTCI420TextureCache.mm",
366 "objc/components/renderer/opengl/RTCOpenGLDefines.h",
367 "objc/components/renderer/opengl/RTCShader.h",
368 "objc/components/renderer/opengl/RTCShader.mm",
369 "objc/components/renderer/opengl/RTCVideoViewShading.h",
kthelgason2f088792017-05-30 01:48:47 -0700370 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700371 libs = []
denicijad2088152017-04-28 02:14:54 -0700372 if (is_ios) {
denicija070d5e32017-02-26 11:44:13 -0800373 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200374 "objc/components/renderer/opengl/RTCNV12TextureCache.h",
375 "objc/components/renderer/opengl/RTCNV12TextureCache.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700376 ]
377 libs += [
378 "GLKit.framework",
379 "OpenGLES.framework",
380 "QuartzCore.framework",
381 ]
382 } else if (is_mac) {
mbonadei2c8ac1b2017-05-31 05:14:26 -0700383 libs += [
384 "CoreMedia.framework",
385 "CoreVideo.framework",
386 "OpenGL.framework",
denicija070d5e32017-02-26 11:44:13 -0800387 ]
388 }
mbonadei2c8ac1b2017-05-31 05:14:26 -0700389
kthelgason2f088792017-05-30 01:48:47 -0700390 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200391 ":base_objc",
392 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100393 ":mediaconstraints_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100394 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100395 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100396 ":videosource_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700397 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200398 "../api/video:video_frame",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700399 "../common_video",
400 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100401 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700402 "../rtc_base:rtc_base",
Danil Chapovalov196100e2018-06-21 10:17:24 +0200403 "//third_party/abseil-cpp/absl/types:optional",
tkchin9eeb6242016-04-27 01:54:20 -0700404 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700405
Anders Carlsson358f2e02018-06-04 10:24:37 +0200406 configs += [
407 "..:common_objc",
408 ":used_from_extension",
409 ]
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800410 }
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800411
kthelgason36d658d2017-08-24 05:43:45 -0700412 rtc_static_library("ui_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000413 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100414 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadei2c8ac1b2017-05-31 05:14:26 -0700415 if (is_ios) {
416 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200417 "objc/components/renderer/opengl/RTCDisplayLinkTimer.h",
418 "objc/components/renderer/opengl/RTCDisplayLinkTimer.m",
419 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
420 "objc/components/renderer/opengl/RTCEAGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700421 ]
422 }
423 if (is_mac) {
424 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200425 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
426 "objc/components/renderer/opengl/RTCNSGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700427 ]
428 }
429 configs += [ "..:common_objc" ]
430 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200431 ":base_objc",
432 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100433 ":video_objc",
434 ":videocapture_objc",
435 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700436 ]
437 }
kthelgasonebc34e72016-09-15 04:30:18 -0700438
mbonadei2c8ac1b2017-05-31 05:14:26 -0700439 if (rtc_use_metal_rendering) {
kthelgason36d658d2017-08-24 05:43:45 -0700440 rtc_static_library("metal_objc") {
Mirko Bonadeid68956d2018-02-16 17:55:36 +0100441 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100442 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
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 Carlsson45340ca2019-01-14 14:23:23 +0100504 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadei2c8ac1b2017-05-31 05:14:26 -0700505 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200506 "objc/components/capturer/RTCCameraVideoCapturer.h",
507 "objc/components/capturer/RTCCameraVideoCapturer.m",
zhihuanga4c113a2017-06-28 14:05:44 -0700508 ]
509 if (is_ios) {
510 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200511 "objc/components/capturer/RTCFileVideoCapturer.h",
512 "objc/components/capturer/RTCFileVideoCapturer.m",
zhihuanga4c113a2017-06-28 14:05:44 -0700513 ]
514 }
515 libs = [ "AVFoundation.framework" ]
516
zhihuanga4c113a2017-06-28 14:05:44 -0700517 configs += [ "..:common_objc" ]
518
kthelgason36d658d2017-08-24 05:43:45 -0700519 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700520
zhihuanga4c113a2017-06-28 14:05:44 -0700521 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200522 ":base_objc",
523 ":helpers_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700524 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100525 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700526 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700527 }
528
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100529 rtc_static_library("videocodec_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200530 visibility = [ "*" ]
Mirko Bonadei96ede162018-09-06 13:45:44 +0200531 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100532 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200533 "objc/components/video_codec/RTCCodecSpecificInfoH264+Private.h",
534 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
535 "objc/components/video_codec/RTCCodecSpecificInfoH264.mm",
536 "objc/components/video_codec/RTCH264ProfileLevelId.h",
537 "objc/components/video_codec/RTCH264ProfileLevelId.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700538 ]
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300539 if (is_ios) {
540 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200541 "objc/components/video_codec/UIDevice+H264Profile.h",
542 "objc/components/video_codec/UIDevice+H264Profile.mm",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300543 ]
544 }
zhihuanga4c113a2017-06-28 14:05:44 -0700545 if (!build_with_chromium && is_clang) {
546 # Suppress warnings from the Chromium Clang plugin
547 # (bugs.webrtc.org/163).
548 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
549 }
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100550 public_configs = [ ":common_config_objc" ]
551 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200552 ":base_objc",
553 ":helpers_objc",
kthelgasonfb143122017-07-25 07:55:58 -0700554 "../api/video_codecs:video_codecs_api",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100555 "../common_video",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300556 "../media:rtc_h264_profile_id",
zhihuanga4c113a2017-06-28 14:05:44 -0700557 "../media:rtc_media_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100558 "../modules:module_api",
559 "../modules/video_coding:video_codec_interface",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200560 "../rtc_base:checks",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100561 "../rtc_base:rtc_base_approved",
zhihuanga4c113a2017-06-28 14:05:44 -0700562 ]
563 }
564
Anders Carlssondd8c1652018-01-30 10:32:13 +0100565 rtc_static_library("default_codec_factory_objc") {
566 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200567 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
568 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.m",
569 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
570 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.m",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100571 ]
572
573 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200574 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100575 ":native_video",
576 ":videocodec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200577 ":videotoolbox_objc",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +0200578 ":vp8",
579 ":vp9",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200580 ":vpx_codec_constants",
581 ]
582 }
583
584 rtc_static_library("vpx_codec_constants") {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200585 configs += [ "..:no_global_constructors" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200586 sources = [
587 "objc/api/video_codec/RTCVideoCodecConstants.h",
588 "objc/api/video_codec/RTCVideoCodecConstants.mm",
589 ]
590
591 deps = [
592 ":base_objc",
593 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100594 ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100595 }
596
597 rtc_static_library("vp8") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100598 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200599 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100600 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200601 "objc/api/video_codec/RTCVideoDecoderVP8.h",
602 "objc/api/video_codec/RTCVideoDecoderVP8.mm",
603 "objc/api/video_codec/RTCVideoEncoderVP8.h",
604 "objc/api/video_codec/RTCVideoEncoderVP8.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100605 ]
606
Anders Carlssondd8c1652018-01-30 10:32:13 +0100607 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200608 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100609 ":wrapped_native_codec_objc",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100610 "../modules/video_coding:webrtc_vp8",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100611 ]
612 }
613
614 rtc_static_library("vp9") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100615 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200616 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100617 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200618 "objc/api/video_codec/RTCVideoDecoderVP9.h",
619 "objc/api/video_codec/RTCVideoDecoderVP9.mm",
620 "objc/api/video_codec/RTCVideoEncoderVP9.h",
621 "objc/api/video_codec/RTCVideoEncoderVP9.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100622 ]
623
Anders Carlssondd8c1652018-01-30 10:32:13 +0100624 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200625 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100626 ":wrapped_native_codec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200627 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100628 "../modules/video_coding:webrtc_vp9",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100629 ]
630 }
631
zhihuanga4c113a2017-06-28 14:05:44 -0700632 # Build the PeerConnectionFactory without audio/video support.
633 # This target depends on the objc_peeerconnectionfactory_base which still
634 # includes some audio/video related objects such as RTCAudioSource because
635 # these objects are just thin wrappers of native C++ interfaces required
636 # when implementing webrtc::PeerConnectionFactoryInterface and
637 # webrtc::PeerConnectionInterface.
Kári Tristan Helgasona2d89fc2018-03-06 10:18:43 +0100638 # The applications which only use WebRTC DataChannel can depend on this.
kthelgason36d658d2017-08-24 05:43:45 -0700639 rtc_static_library("peerconnectionfactory_no_media_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000640 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100641 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
zhihuanga4c113a2017-06-28 14:05:44 -0700642 defines = [ "HAVE_NO_MEDIA" ]
643
644 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200645 "objc/helpers/noop.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700646 ]
647
kthelgason36d658d2017-08-24 05:43:45 -0700648 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700649
zhihuanga4c113a2017-06-28 14:05:44 -0700650 deps = [
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100651 ":native_api",
652 ":native_video",
kthelgason36d658d2017-08-24 05:43:45 -0700653 ":peerconnectionfactory_base_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700654 "../api:libjingle_peerconnection_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700655 "../rtc_base:rtc_base",
zhihuanga4c113a2017-06-28 14:05:44 -0700656 ]
657 }
658
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100659 rtc_static_library("mediaconstraints_objc") {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200660 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100661 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200662 "objc/api/peerconnection/RTCMediaConstraints+Private.h",
663 "objc/api/peerconnection/RTCMediaConstraints.h",
664 "objc/api/peerconnection/RTCMediaConstraints.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100665 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100666
667 public_configs = [ ":common_config_objc" ]
668 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200669 ":base_objc",
670 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100671 "../api:libjingle_peerconnection_api",
672 ]
673 }
674
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200675 # TODO(bugs.webrtc.org/9627): Remove, targets should depend on base_objc.
Anders Carlsson9823ee42018-03-07 10:32:03 +0100676 rtc_source_set("videorenderer_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200677 visibility = [ "*" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100678 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200679 "objc/helpers/noop.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100680 ]
681
682 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100683 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200684
685 deps = [
686 ":base_objc",
687 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100688 }
689
690 rtc_static_library("videorendereradapter_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200691 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100692 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Anders Carlsson9823ee42018-03-07 10:32:03 +0100693 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200694 "objc/api/RTCVideoRendererAdapter+Private.h",
695 "objc/api/RTCVideoRendererAdapter.h",
696 "objc/api/RTCVideoRendererAdapter.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100697 ]
698
699 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100700 public_configs = [ ":common_config_objc" ]
701
702 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200703 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100704 ":native_api",
705 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100706 "../api:libjingle_peerconnection_api",
707 ]
708 }
709
710 rtc_static_library("mediasource_objc") {
711 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200712 "objc/api/peerconnection/RTCMediaSource+Private.h",
713 "objc/api/peerconnection/RTCMediaSource.h",
714 "objc/api/peerconnection/RTCMediaSource.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100715 ]
716
Anders Carlsson358f2e02018-06-04 10:24:37 +0200717 configs += [
718 "..:common_objc",
719 ":used_from_extension",
720 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100721 public_configs = [ ":common_config_objc" ]
722
723 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200724 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100725 "../api:libjingle_peerconnection_api",
726 "../rtc_base:checks",
727 ]
728 }
729
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200730 rtc_static_library("base_native_additions_objc") {
731 sources = [
732 "objc/api/peerconnection/RTCEncodedImage+Private.h",
733 "objc/api/peerconnection/RTCEncodedImage+Private.mm",
734 "objc/api/peerconnection/RTCRtpFragmentationHeader+Private.h",
735 "objc/api/peerconnection/RTCRtpFragmentationHeader+Private.mm",
736 "objc/api/peerconnection/RTCVideoCodecInfo+Private.h",
737 "objc/api/peerconnection/RTCVideoCodecInfo+Private.mm",
738 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.h",
739 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.mm",
740 ]
741
742 configs += [ "..:common_objc" ]
743
744 public_configs = [ ":common_config_objc" ]
745
746 deps = [
747 ":base_objc",
748 ":helpers_objc",
Niels Möller4dc66c52018-10-05 14:17:58 +0200749 "../api/video:encoded_image",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200750 "../api/video_codecs:video_codecs_api",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200751 "../modules:module_api",
752 "../modules/video_coding:video_codec_interface",
753 "../rtc_base:rtc_base",
754 ]
755
756 if (!build_with_chromium && is_clang) {
757 # Suppress warnings from the Chromium Clang plugin
758 # (bugs.webrtc.org/163).
759 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
760 }
761 }
762
kthelgason36d658d2017-08-24 05:43:45 -0700763 rtc_static_library("peerconnectionfactory_base_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200764 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100765 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Mirko Bonadei96ede162018-09-06 13:45:44 +0200766 configs += [
767 "..:no_exit_time_destructors",
768 "..:no_global_constructors",
769 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700770 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200771 "objc/api/peerconnection/RTCAudioSource+Private.h",
772 "objc/api/peerconnection/RTCAudioSource.h",
773 "objc/api/peerconnection/RTCAudioSource.mm",
774 "objc/api/peerconnection/RTCAudioTrack+Private.h",
775 "objc/api/peerconnection/RTCAudioTrack.h",
776 "objc/api/peerconnection/RTCAudioTrack.mm",
777 "objc/api/peerconnection/RTCCertificate.h",
778 "objc/api/peerconnection/RTCCertificate.mm",
779 "objc/api/peerconnection/RTCConfiguration+Native.h",
780 "objc/api/peerconnection/RTCConfiguration+Private.h",
781 "objc/api/peerconnection/RTCConfiguration.h",
782 "objc/api/peerconnection/RTCConfiguration.mm",
Benjamin Wright8c27cca2018-10-25 10:16:44 -0700783 "objc/api/peerconnection/RTCCryptoOptions.h",
784 "objc/api/peerconnection/RTCCryptoOptions.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200785 "objc/api/peerconnection/RTCDataChannel+Private.h",
786 "objc/api/peerconnection/RTCDataChannel.h",
787 "objc/api/peerconnection/RTCDataChannel.mm",
788 "objc/api/peerconnection/RTCDataChannelConfiguration+Private.h",
789 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
790 "objc/api/peerconnection/RTCDataChannelConfiguration.mm",
791 "objc/api/peerconnection/RTCDtmfSender+Private.h",
792 "objc/api/peerconnection/RTCDtmfSender.h",
793 "objc/api/peerconnection/RTCDtmfSender.mm",
794 "objc/api/peerconnection/RTCFieldTrials.h",
795 "objc/api/peerconnection/RTCFieldTrials.mm",
796 "objc/api/peerconnection/RTCIceCandidate+Private.h",
797 "objc/api/peerconnection/RTCIceCandidate.h",
798 "objc/api/peerconnection/RTCIceCandidate.mm",
799 "objc/api/peerconnection/RTCIceServer+Private.h",
800 "objc/api/peerconnection/RTCIceServer.h",
801 "objc/api/peerconnection/RTCIceServer.mm",
802 "objc/api/peerconnection/RTCIntervalRange+Private.h",
803 "objc/api/peerconnection/RTCIntervalRange.h",
804 "objc/api/peerconnection/RTCIntervalRange.mm",
805 "objc/api/peerconnection/RTCLegacyStatsReport+Private.h",
806 "objc/api/peerconnection/RTCLegacyStatsReport.h",
807 "objc/api/peerconnection/RTCLegacyStatsReport.mm",
808 "objc/api/peerconnection/RTCMediaStream+Private.h",
809 "objc/api/peerconnection/RTCMediaStream.h",
810 "objc/api/peerconnection/RTCMediaStream.mm",
811 "objc/api/peerconnection/RTCMediaStreamTrack+Private.h",
812 "objc/api/peerconnection/RTCMediaStreamTrack.h",
813 "objc/api/peerconnection/RTCMediaStreamTrack.mm",
814 "objc/api/peerconnection/RTCMetrics.h",
815 "objc/api/peerconnection/RTCMetrics.mm",
816 "objc/api/peerconnection/RTCMetricsSampleInfo+Private.h",
817 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
818 "objc/api/peerconnection/RTCMetricsSampleInfo.mm",
819 "objc/api/peerconnection/RTCPeerConnection+DataChannel.mm",
820 "objc/api/peerconnection/RTCPeerConnection+Native.h",
821 "objc/api/peerconnection/RTCPeerConnection+Private.h",
822 "objc/api/peerconnection/RTCPeerConnection+Stats.mm",
823 "objc/api/peerconnection/RTCPeerConnection.h",
824 "objc/api/peerconnection/RTCPeerConnection.mm",
825 "objc/api/peerconnection/RTCPeerConnectionFactory+Native.h",
826 "objc/api/peerconnection/RTCPeerConnectionFactory+Private.h",
827 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
828 "objc/api/peerconnection/RTCPeerConnectionFactory.mm",
829 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.h",
830 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.mm",
831 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.h",
832 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.mm",
833 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions+Private.h",
834 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
835 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.mm",
836 "objc/api/peerconnection/RTCRtcpParameters+Private.h",
837 "objc/api/peerconnection/RTCRtcpParameters.h",
838 "objc/api/peerconnection/RTCRtcpParameters.mm",
839 "objc/api/peerconnection/RTCRtpCodecParameters+Private.h",
840 "objc/api/peerconnection/RTCRtpCodecParameters.h",
841 "objc/api/peerconnection/RTCRtpCodecParameters.mm",
842 "objc/api/peerconnection/RTCRtpEncodingParameters+Private.h",
843 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
844 "objc/api/peerconnection/RTCRtpEncodingParameters.mm",
845 "objc/api/peerconnection/RTCRtpHeaderExtension+Private.h",
846 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
847 "objc/api/peerconnection/RTCRtpHeaderExtension.mm",
848 "objc/api/peerconnection/RTCRtpParameters+Private.h",
849 "objc/api/peerconnection/RTCRtpParameters.h",
850 "objc/api/peerconnection/RTCRtpParameters.mm",
Benjamin Wrightddf1a3e2018-10-02 10:20:58 -0700851 "objc/api/peerconnection/RTCRtpReceiver+Native.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200852 "objc/api/peerconnection/RTCRtpReceiver+Private.h",
853 "objc/api/peerconnection/RTCRtpReceiver.h",
854 "objc/api/peerconnection/RTCRtpReceiver.mm",
Benjamin Wrightddf1a3e2018-10-02 10:20:58 -0700855 "objc/api/peerconnection/RTCRtpSender+Native.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200856 "objc/api/peerconnection/RTCRtpSender+Private.h",
857 "objc/api/peerconnection/RTCRtpSender.h",
858 "objc/api/peerconnection/RTCRtpSender.mm",
859 "objc/api/peerconnection/RTCRtpTransceiver+Private.h",
860 "objc/api/peerconnection/RTCRtpTransceiver.h",
861 "objc/api/peerconnection/RTCRtpTransceiver.mm",
862 "objc/api/peerconnection/RTCSSLAdapter.h",
863 "objc/api/peerconnection/RTCSSLAdapter.mm",
864 "objc/api/peerconnection/RTCSessionDescription+Private.h",
865 "objc/api/peerconnection/RTCSessionDescription.h",
866 "objc/api/peerconnection/RTCSessionDescription.mm",
867 "objc/api/peerconnection/RTCTracing.h",
868 "objc/api/peerconnection/RTCTracing.mm",
869 "objc/api/peerconnection/RTCVideoTrack+Private.h",
870 "objc/api/peerconnection/RTCVideoTrack.h",
871 "objc/api/peerconnection/RTCVideoTrack.mm",
kthelgason5fe4d492016-12-05 11:27:30 -0800872 ]
kthelgasonebc34e72016-09-15 04:30:18 -0700873
Anders Carlsson358f2e02018-06-04 10:24:37 +0200874 configs += [
875 "..:common_objc",
876 ":used_from_extension",
877 ]
kthelgason36d658d2017-08-24 05:43:45 -0700878 public_configs = [ ":common_config_objc" ]
kthelgasonc0977102017-04-24 00:57:16 -0700879
mbonadei2c8ac1b2017-05-31 05:14:26 -0700880 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200881 ":base_native_additions_objc",
882 ":base_objc",
883 ":file_logger_objc",
884 ":helpers_objc",
885 ":legacy_header_paths",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100886 ":mediaconstraints_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100887 ":mediasource_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100888 ":native_api",
889 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100890 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100891 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100892 ":videorendereradapter_objc",
893 ":videosource_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200894 ":videotoolbox_objc",
Mirko Bonadei2ff3f492018-11-22 09:00:13 +0100895 "../api:create_peerconnection_factory",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100896 "../api:libjingle_peerconnection_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100897 "../api:scoped_refptr",
Jiawei Ouae810c12018-06-20 16:18:59 -0700898 "../api/audio_codecs:audio_codecs_api",
Karl Wiberg5817d3d2018-04-06 10:06:42 +0200899 "../api/audio_codecs:builtin_audio_decoder_factory",
Jiawei Ouae810c12018-06-20 16:18:59 -0700900 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200901 "../api/video:video_frame",
Anders Carlsson7e042812017-10-05 16:55:38 +0200902 "../api/video_codecs:video_codecs_api",
Anders Carlssone5960ce2017-06-22 15:26:30 +0200903 "../common_video",
Bjorn Tereliusb8b3c992019-01-09 11:15:34 +0100904 "../logging:rtc_event_log_impl_base",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700905 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -0700906 "../modules:module_api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700907 "../modules/audio_device:audio_device_api",
Alessio Bazzicab768e882018-11-07 14:29:54 +0000908 "../modules/audio_processing:api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700909 "../modules/audio_processing:audio_processing",
Patrik Höglund99175c62018-01-08 11:05:10 +0100910 "../modules/video_coding:video_codec_interface",
zhihuanga4c113a2017-06-28 14:05:44 -0700911 "../pc:peerconnection",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100912 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700913 "../rtc_base:rtc_base",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200914 "../system_wrappers:field_trial",
915 "../system_wrappers:metrics",
Mirko Bonadei879f7882018-07-11 09:18:37 +0200916 "//third_party/abseil-cpp/absl/memory",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700917 ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200918
919 if (is_ios) {
920 deps += [ ":native_api_audio_device_module" ]
921 }
kthelgasonebc34e72016-09-15 04:30:18 -0700922 }
Zeke Chindd0e1e02016-10-11 13:27:26 -0700923
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200924 # TODO(bugs.webrtc.org/9627): Remove this target.
925 rtc_source_set("legacy_header_paths") {
926 sources = [
927 "objc/Framework/Classes/Common/NSString+StdString.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200928 "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",
Aaron Goldenfb4e9bc2019-01-04 12:03:31 -08001023 "objc/unittests/RTCNV12TextureCache_xctest.m",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001024 "objc/unittests/RTCPeerConnectionFactory_xctest.m",
1025 "objc/unittests/frame_buffer_helpers.h",
1026 "objc/unittests/frame_buffer_helpers.mm",
Artem Titarenko42b43152018-10-29 18:18:09 +01001027 "objc/unittests/nalu_rewriter_xctest.mm",
Danielaae012cf2017-10-12 13:46:00 +02001028 ]
Daniela012b56b2017-11-15 13:15:24 +01001029
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001030 # TODO(peterhanspers): Reenable these tests on simulator.
1031 # See bugs.webrtc.org/7812
1032 if (!use_ios_simulator) {
1033 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001034 "objc/unittests/RTCAudioDeviceModule_xctest.mm",
1035 "objc/unittests/RTCAudioDevice_xctest.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001036 ]
1037 }
1038
Danielaae012cf2017-10-12 13:46:00 +02001039 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001040 ":audio_device",
1041 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001042 ":base_objc",
1043 ":callback_logger_objc",
Anders Carlssondc6b4772018-01-15 13:31:03 +01001044 ":framework_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001045 ":mediaconstraints_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001046 ":native_api",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001047 ":native_api_audio_device_module",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001048 ":native_video",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001049 ":peerconnectionfactory_base_objc",
Aaron Goldenfb4e9bc2019-01-04 12:03:31 -08001050 ":video_objc",
Artem Titarenko42b43152018-10-29 18:18:09 +01001051 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001052 ":videocapture_objc",
Anders Carlsson79ce8202018-06-01 12:51:09 +02001053 ":videocodec_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001054 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001055 ":videosource_objc",
Danielaae012cf2017-10-12 13:46:00 +02001056 ":videotoolbox_objc",
Mirko Bonadeid9708072019-01-25 20:26:48 +01001057 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001058 "../api/video:video_frame_i420",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001059 "../common_video:common_video",
Danielaae012cf2017-10-12 13:46:00 +02001060 "../media:rtc_media_base",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001061 "../media:rtc_media_tests_utils",
Danielaae012cf2017-10-12 13:46:00 +02001062 "../modules:module_api",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001063 "../rtc_base:gunit_helpers",
Danielaae012cf2017-10-12 13:46:00 +02001064 "../rtc_base:rtc_base",
Oleh Prypinda04e062018-07-23 10:04:12 +02001065 "../system_wrappers:system_wrappers",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001066 "//third_party/libyuv",
Danielaae012cf2017-10-12 13:46:00 +02001067 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001068
1069 if (rtc_use_metal_rendering) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001070 sources += [ "objc/unittests/RTCMTLVideoView_xctest.m" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001071 deps += [ ":metal_objc" ]
1072 }
1073
Danielaae012cf2017-10-12 13:46:00 +02001074 public_deps = [
1075 "//build/config/ios:xctest",
1076 "//third_party/ocmock",
1077 ]
1078 }
1079
Daniela012b56b2017-11-15 13:15:24 +01001080 bundle_data("sdk_unittests_bundle_data") {
Daniela012b56b2017-11-15 13:15:24 +01001081 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001082 "objc/unittests/audio_short16.pcm",
1083 "objc/unittests/audio_short44.pcm",
1084 "objc/unittests/audio_short48.pcm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001085
1086 # Sample video taken from https://media.xiph.org/video/derf/
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001087 "objc/unittests/foreman.mp4",
Daniela012b56b2017-11-15 13:15:24 +01001088 ]
1089 outputs = [
1090 "{{bundle_resources_dir}}/{{source_file_part}}",
1091 ]
1092 }
1093
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001094 # These tests use static linking.
Danielaae012cf2017-10-12 13:46:00 +02001095 rtc_ios_xctest_test("sdk_unittests") {
1096 info_plist = "//test/ios/Info.plist"
1097 sources = [
Artem Titarenko34fc3462018-11-06 12:29:29 +01001098 "objc/unittests/main.mm",
Danielaae012cf2017-10-12 13:46:00 +02001099 ]
Daniela012b56b2017-11-15 13:15:24 +01001100
Danielaae012cf2017-10-12 13:46:00 +02001101 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
1102 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
1103 deps = [
Yura Yaroshevich5297bd22018-06-19 12:51:51 +03001104 ":peerconnectionfactory_base_objc",
Daniela012b56b2017-11-15 13:15:24 +01001105 ":sdk_unittests_bundle_data",
Danielaae012cf2017-10-12 13:46:00 +02001106 ":sdk_unittests_sources",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001107 "//test:test_support",
Danielaae012cf2017-10-12 13:46:00 +02001108 ]
1109 ldflags = [ "-all_load" ]
1110 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001111
1112 # These tests link to the framework.
1113 rtc_ios_xctest_test("sdk_framework_unittests") {
1114 info_plist = "//test/ios/Info.plist"
1115 sources = [
1116 "objc/unittests/RTCDoNotPutCPlusPlusInFrameworkHeaders_xctest.m",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001117 "objc/unittests/main.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001118 ]
1119
1120 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
1121 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
1122 deps = [
1123 ":framework_objc+link",
1124 ":ios_framework_bundle",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001125 "//test:test_support",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001126 ]
1127 }
Danielaae012cf2017-10-12 13:46:00 +02001128 }
1129
1130 # TODO(denicija): once all tests are migrated to xctest remove this source set.
Kári Tristan Helgason90143242018-07-27 12:34:54 +02001131 rtc_source_set("rtc_unittests_objc") {
mbonadei2c8ac1b2017-05-31 05:14:26 -07001132 testonly = true
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001133
mbonadei2c8ac1b2017-05-31 05:14:26 -07001134 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001135 "objc/unittests/RTCCertificateTest.mm",
1136 "objc/unittests/RTCConfigurationTest.mm",
1137 "objc/unittests/RTCDataChannelConfigurationTest.mm",
1138 "objc/unittests/RTCIceCandidateTest.mm",
1139 "objc/unittests/RTCIceServerTest.mm",
1140 "objc/unittests/RTCIntervalRangeTests.mm",
1141 "objc/unittests/RTCMediaConstraintsTest.mm",
1142 "objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm",
1143 "objc/unittests/RTCPeerConnectionTest.mm",
1144 "objc/unittests/RTCSessionDescriptionTest.mm",
1145 "objc/unittests/RTCTracingTest.mm",
1146 "objc/unittests/objc_video_decoder_factory_tests.mm",
1147 "objc/unittests/objc_video_encoder_factory_tests.mm",
1148 "objc/unittests/scoped_cftyperef_tests.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001149 ]
Anders Carlssone7dd83f2018-01-19 11:28:44 +01001150 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001151 sources += [ "objc/unittests/RTCCameraVideoCapturerTests.mm" ]
oprypin45197522017-06-22 01:47:20 -07001152 }
mbonadeid7620582017-05-30 01:50:35 -07001153
mbonadei2c8ac1b2017-05-31 05:14:26 -07001154 # |-ObjC| flag needed to make sure category method implementations
1155 # are included:
1156 # https://developer.apple.com/library/mac/qa/qa1490/_index.html
1157 ldflags = [ "-ObjC" ]
magjed3149e092017-05-08 05:32:05 -07001158
mbonadei2c8ac1b2017-05-31 05:14:26 -07001159 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001160 ":base_objc",
1161 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001162 ":mediaconstraints_objc",
1163 ":native_api",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001164 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001165 ":peerconnectionfactory_base_objc",
1166 ":video_objc",
1167 ":videocapture_objc",
1168 ":videocodec_objc",
1169 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001170 ":videosource_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001171 ":videotoolbox_objc",
Piotr (Peter) Slatalae0c2e972018-10-08 09:43:21 -07001172 "../api:libjingle_peerconnection_api",
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",
Alessio Bazzicab768e882018-11-07 14:29:54 +00001180 "../modules/audio_processing:api",
Jiawei Ouae810c12018-06-20 16:18:59 -07001181 "../modules/audio_processing:audio_processing",
Patrik Höglund99175c62018-01-08 11:05:10 +01001182 "../modules/video_coding:video_codec_interface",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001183 "../rtc_base:gunit_helpers",
Niels Möllera12c42a2018-07-25 16:05:48 +02001184 "../rtc_base/system:unused",
Yves Gerey21cddff2018-10-30 21:12:42 +01001185 "../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",
Benjamin Wright8c27cca2018-10-25 10:16:44 -07001273 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001274 "objc/api/peerconnection/RTCVideoSource.h",
1275 "objc/api/peerconnection/RTCVideoTrack.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001276 "objc/api/video_codec/RTCVideoCodecConstants.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001277 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1278 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1279 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1280 "objc/api/video_codec/RTCVideoEncoderVP9.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001281 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1282 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001283 ]
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001284
mbonadei2c8ac1b2017-05-31 05:14:26 -07001285 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001286 common_objc_headers += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001287 "objc/api/logging/RTCCallbackLogger.h",
1288 "objc/api/peerconnection/RTCFileLogger.h",
Anders Carlsson3b3364e2018-01-30 15:46:13 +01001289 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001290 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001291
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001292 sources = common_objc_headers
1293 public_headers = common_objc_headers
1294
mbonadei2c8ac1b2017-05-31 05:14:26 -07001295 ldflags = [
1296 "-all_load",
1297 "-install_name",
1298 "@rpath/$output_name.framework/$output_name",
1299 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001300
mbonadei2c8ac1b2017-05-31 05:14:26 -07001301 deps = [
kthelgason36d658d2017-08-24 05:43:45 -07001302 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001303 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001304 ":default_codec_factory_objc",
1305 ":native_api",
1306 ":native_video",
1307 ":peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001308 ":ui_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001309 ":videocapture_objc",
1310 ":videocodec_objc",
1311 ":videotoolbox_objc",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001312 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001313 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001314 if (rtc_use_metal_rendering) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001315 deps += [ ":metal_objc" ]
1316 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001317 if (!build_with_chromium) {
1318 deps += [
1319 ":callback_logger_objc",
1320 ":file_logger_objc",
1321 ]
1322 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001323
mbonadei2c8ac1b2017-05-31 05:14:26 -07001324 libs = [
1325 "AVFoundation.framework",
1326 "CoreGraphics.framework",
1327 "CoreMedia.framework",
1328 "GLKit.framework",
1329 ]
1330
Anders Carlsson358f2e02018-06-04 10:24:37 +02001331 configs += [
1332 "..:common_objc",
1333 ":used_from_extension",
1334 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001335
kthelgason36d658d2017-08-24 05:43:45 -07001336 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001337 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001338
1339 bundle_data("ios_framework_bundle") {
1340 deps = [
1341 "../sdk:framework_objc",
1342 ]
1343 sources = [
1344 "$root_build_dir/WebRTC.framework",
1345 ]
1346 outputs = [
1347 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
1348 ]
1349 }
1350 }
1351
1352 if (is_mac) {
Anders Carlsson37bbf792018-09-05 16:29:27 +02001353 mac_framework_bundle_with_umbrella_header("mac_framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001354 info_plist = "objc/Info.plist"
1355 output_name = "WebRTC"
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001356
Anders Carlsson37bbf792018-09-05 16:29:27 +02001357 sources = [
1358 "objc/api/peerconnection/RTCAudioSource.h",
1359 "objc/api/peerconnection/RTCAudioTrack.h",
1360 "objc/api/peerconnection/RTCCertificate.h",
1361 "objc/api/peerconnection/RTCConfiguration.h",
Benjamin Wright8c27cca2018-10-25 10:16:44 -07001362 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001363 "objc/api/peerconnection/RTCDataChannel.h",
1364 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1365 "objc/api/peerconnection/RTCDtmfSender.h",
1366 "objc/api/peerconnection/RTCFieldTrials.h",
1367 "objc/api/peerconnection/RTCIceCandidate.h",
1368 "objc/api/peerconnection/RTCIceServer.h",
1369 "objc/api/peerconnection/RTCIntervalRange.h",
1370 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1371 "objc/api/peerconnection/RTCMediaConstraints.h",
1372 "objc/api/peerconnection/RTCMediaSource.h",
1373 "objc/api/peerconnection/RTCMediaStream.h",
1374 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1375 "objc/api/peerconnection/RTCMetrics.h",
1376 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1377 "objc/api/peerconnection/RTCPeerConnection.h",
1378 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1379 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1380 "objc/api/peerconnection/RTCRtcpParameters.h",
1381 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1382 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1383 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1384 "objc/api/peerconnection/RTCRtpParameters.h",
1385 "objc/api/peerconnection/RTCRtpReceiver.h",
1386 "objc/api/peerconnection/RTCRtpSender.h",
1387 "objc/api/peerconnection/RTCRtpTransceiver.h",
1388 "objc/api/peerconnection/RTCSSLAdapter.h",
1389 "objc/api/peerconnection/RTCSessionDescription.h",
1390 "objc/api/peerconnection/RTCTracing.h",
1391 "objc/api/peerconnection/RTCVideoSource.h",
1392 "objc/api/peerconnection/RTCVideoTrack.h",
1393 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1394 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1395 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1396 "objc/api/video_codec/RTCVideoEncoderVP9.h",
1397 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1398 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
1399 "objc/base/RTCCodecSpecificInfo.h",
1400 "objc/base/RTCEncodedImage.h",
1401 "objc/base/RTCI420Buffer.h",
1402 "objc/base/RTCLogging.h",
1403 "objc/base/RTCMacros.h",
1404 "objc/base/RTCMutableI420Buffer.h",
1405 "objc/base/RTCMutableYUVPlanarBuffer.h",
1406 "objc/base/RTCRtpFragmentationHeader.h",
1407 "objc/base/RTCVideoCapturer.h",
1408 "objc/base/RTCVideoCodecInfo.h",
1409 "objc/base/RTCVideoDecoder.h",
1410 "objc/base/RTCVideoDecoderFactory.h",
1411 "objc/base/RTCVideoEncoder.h",
1412 "objc/base/RTCVideoEncoderFactory.h",
1413 "objc/base/RTCVideoEncoderQpThresholds.h",
1414 "objc/base/RTCVideoEncoderSettings.h",
1415 "objc/base/RTCVideoFrame.h",
1416 "objc/base/RTCVideoFrameBuffer.h",
1417 "objc/base/RTCVideoRenderer.h",
1418 "objc/base/RTCYUVPlanarBuffer.h",
1419 "objc/components/capturer/RTCCameraVideoCapturer.h",
1420 "objc/components/capturer/RTCFileVideoCapturer.h",
1421 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
1422 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
1423 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1424 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1425 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1426 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1427 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1428 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1429 "objc/components/video_codec/RTCVideoDecoderH264.h",
1430 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1431 "objc/components/video_codec/RTCVideoEncoderH264.h",
1432 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1433 "objc/helpers/RTCDispatcher.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001434 ]
Anders Carlsson37bbf792018-09-05 16:29:27 +02001435 if (!build_with_chromium) {
1436 sources += [
1437 "objc/api/logging/RTCCallbackLogger.h",
1438 "objc/api/peerconnection/RTCFileLogger.h",
1439 ]
1440 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001441
1442 deps = [
1443 ":base_objc",
1444 ":default_codec_factory_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001445 ":native_api",
1446 ":native_video",
1447 ":peerconnectionfactory_base_objc",
1448 ":ui_objc",
1449 ":videocapture_objc",
1450 ":videocodec_objc",
1451 ":videotoolbox_objc",
1452 "../rtc_base:rtc_base_approved",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001453 ]
1454 if (rtc_use_metal_rendering) {
1455 deps += [ ":metal_objc" ]
1456 }
1457 if (!build_with_chromium) {
1458 deps += [
1459 ":callback_logger_objc",
1460 ":file_logger_objc",
1461 ]
1462 }
1463
1464 libs = [
1465 "AVFoundation.framework",
1466 "CoreGraphics.framework",
1467 "CoreMedia.framework",
1468 "OpenGL.framework",
1469 ]
1470
Anders Carlsson37bbf792018-09-05 16:29:27 +02001471 configs = [ "..:common_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001472
1473 public_configs = [ ":common_config_objc" ]
1474 }
1475
1476 bundle_data("mac_framework_bundle") {
1477 deps = [
1478 "../sdk:mac_framework_objc",
1479 ]
1480 sources = [
1481 "$root_build_dir/WebRTC.framework",
1482 ]
1483 outputs = [
Anders Carlsson24d8ec32018-12-10 14:04:12 +01001484 "{{bundle_contents_dir}}/Frameworks/{{source_file_part}}",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001485 ]
1486 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001487 }
1488
Anders Carlsson9823ee42018-03-07 10:32:03 +01001489 rtc_static_library("wrapped_native_codec_objc") {
1490 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001491 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.h",
1492 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm",
1493 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.h",
1494 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001495 ]
1496
1497 configs += [ "..:common_objc" ]
1498 public_configs = [ ":common_config_objc" ]
1499
Anders Carlsson9823ee42018-03-07 10:32:03 +01001500 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001501 ":base_objc",
1502 ":helpers_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001503 "../api/video_codecs:video_codecs_api",
1504 "../media:rtc_media_base",
1505 ]
1506 }
1507
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001508 # The native API is currently experimental and may change without notice.
1509 rtc_static_library("native_api") {
1510 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +01001511 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001512 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001513 "objc/native/api/video_capturer.h",
1514 "objc/native/api/video_capturer.mm",
1515 "objc/native/api/video_decoder_factory.h",
1516 "objc/native/api/video_decoder_factory.mm",
1517 "objc/native/api/video_encoder_factory.h",
1518 "objc/native/api/video_encoder_factory.mm",
1519 "objc/native/api/video_frame.h",
1520 "objc/native/api/video_frame.mm",
1521 "objc/native/api/video_frame_buffer.h",
1522 "objc/native/api/video_frame_buffer.mm",
1523 "objc/native/api/video_renderer.h",
1524 "objc/native/api/video_renderer.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001525 ]
1526
1527 configs += [ "..:common_objc" ]
1528
1529 public_configs = [ ":common_config_objc" ]
1530
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001531 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001532 ":base_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001533 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001534 ":videoframebuffer_objc",
Anders Carlsson73119182018-03-15 09:41:03 +01001535 "../api:libjingle_peerconnection_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +01001536 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001537 "../api/video:video_frame",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001538 "../api/video_codecs:video_codecs_api",
1539 "../common_video",
1540 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +02001541 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001542 ]
1543 }
1544
1545 rtc_static_library("native_video") {
1546 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001547 "objc/native/src/objc_frame_buffer.h",
1548 "objc/native/src/objc_frame_buffer.mm",
1549 "objc/native/src/objc_video_decoder_factory.h",
1550 "objc/native/src/objc_video_decoder_factory.mm",
1551 "objc/native/src/objc_video_encoder_factory.h",
1552 "objc/native/src/objc_video_encoder_factory.mm",
1553 "objc/native/src/objc_video_frame.h",
1554 "objc/native/src/objc_video_frame.mm",
1555 "objc/native/src/objc_video_renderer.h",
1556 "objc/native/src/objc_video_renderer.mm",
1557 "objc/native/src/objc_video_track_source.h",
1558 "objc/native/src/objc_video_track_source.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001559 ]
1560
1561 configs += [ "..:common_objc" ]
1562
1563 public_configs = [ ":common_config_objc" ]
1564
1565 if (!build_with_chromium && is_clang) {
1566 # Suppress warnings from the Chromium Clang plugin
1567 # (bugs.webrtc.org/163).
1568 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1569 }
1570
1571 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001572 ":base_native_additions_objc",
1573 ":base_objc",
1574 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001575 ":videocodec_objc",
1576 ":videoframebuffer_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001577 ":vpx_codec_constants",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001578 ":wrapped_native_codec_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001579 "../api/video:video_frame",
1580 "../api/video:video_frame_i420",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001581 "../api/video_codecs:video_codecs_api",
1582 "../common_video",
1583 "../media:rtc_audio_video",
1584 "../media:rtc_media_base",
1585 "../modules:module_api",
1586 "../modules/video_coding:video_codec_interface",
1587 "../rtc_base:checks",
1588 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +02001589 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001590 ]
1591 }
1592
mbonadeic0af5ac2017-08-24 12:26:05 -07001593 rtc_static_library("video_toolbox_cc") {
Artem Titarenko42b43152018-10-29 18:18:09 +01001594 visibility = [
1595 ":videotoolbox_objc",
1596 ":sdk_unittests_sources",
1597 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001598 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001599 "objc/components/video_codec/helpers.cc",
1600 "objc/components/video_codec/helpers.h",
1601 "objc/components/video_codec/nalu_rewriter.cc",
1602 "objc/components/video_codec/nalu_rewriter.h",
mbonadeic0af5ac2017-08-24 12:26:05 -07001603 ]
1604 deps = [
1605 "../common_video",
1606 "../modules:module_api",
1607 "../modules/video_coding:webrtc_h264",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001608 "../rtc_base:checks",
mbonadeic0af5ac2017-08-24 12:26:05 -07001609 "../rtc_base:rtc_base_approved",
1610 ]
mbonadeic0af5ac2017-08-24 12:26:05 -07001611 }
1612
1613 rtc_static_library("videotoolbox_objc") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001614 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +01001615 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadeic0af5ac2017-08-24 12:26:05 -07001616 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001617 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1618 "objc/components/video_codec/RTCVideoDecoderFactoryH264.m",
1619 "objc/components/video_codec/RTCVideoDecoderH264.h",
1620 "objc/components/video_codec/RTCVideoDecoderH264.mm",
1621 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1622 "objc/components/video_codec/RTCVideoEncoderFactoryH264.m",
1623 "objc/components/video_codec/RTCVideoEncoderH264.h",
1624 "objc/components/video_codec/RTCVideoEncoderH264.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001625 ]
1626
Anders Carlsson358f2e02018-06-04 10:24:37 +02001627 configs += [
1628 "..:common_objc",
1629 ":used_from_extension",
1630 ]
1631
1632 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
1633 defines = [ "RTC_APPRTCMOBILE_BROADCAST_EXTENSION" ]
1634 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001635
1636 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001637 ":base_native_additions_objc",
1638 ":base_objc",
1639 ":helpers_objc",
mbonadeic0af5ac2017-08-24 12:26:05 -07001640 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001641 ":videocodec_objc",
1642 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001643 "../common_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001644 "../modules:module_api",
Patrik Höglund99175c62018-01-08 11:05:10 +01001645 "../modules/video_coding:video_codec_interface",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001646 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001647 "../rtc_base:rtc_base_approved",
Mirko Bonadei401d0562017-12-14 11:24:00 +01001648 "//third_party/libyuv",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001649 ]
1650
1651 libs = [
1652 "CoreFoundation.framework",
1653 "CoreMedia.framework",
1654 "CoreVideo.framework",
1655 "VideoToolbox.framework",
1656 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001657 }
1658 }
tkchin9eeb6242016-04-27 01:54:20 -07001659}