blob: cc8f0a2627a9898fe5ec6649d0bb257be6828def [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 = [
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 Carlsson1f433e42018-04-24 16:39:05 +0200414 allow_poison = [
415 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
416 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
417 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700418 if (is_ios) {
419 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200420 "objc/components/renderer/opengl/RTCDisplayLinkTimer.h",
421 "objc/components/renderer/opengl/RTCDisplayLinkTimer.m",
422 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
423 "objc/components/renderer/opengl/RTCEAGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700424 ]
425 }
426 if (is_mac) {
427 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200428 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
429 "objc/components/renderer/opengl/RTCNSGLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700430 ]
431 }
432 configs += [ "..:common_objc" ]
433 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200434 ":base_objc",
435 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100436 ":video_objc",
437 ":videocapture_objc",
438 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700439 ]
440 }
kthelgasonebc34e72016-09-15 04:30:18 -0700441
mbonadei2c8ac1b2017-05-31 05:14:26 -0700442 if (rtc_use_metal_rendering) {
kthelgason36d658d2017-08-24 05:43:45 -0700443 rtc_static_library("metal_objc") {
Mirko Bonadeid68956d2018-02-16 17:55:36 +0100444 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200445 allow_poison = [
446 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
447 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
448 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700449 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200450 "objc/components/renderer/metal/RTCMTLI420Renderer.h",
451 "objc/components/renderer/metal/RTCMTLI420Renderer.mm",
452 "objc/components/renderer/metal/RTCMTLRenderer+Private.h",
453 "objc/components/renderer/metal/RTCMTLRenderer.h",
454 "objc/components/renderer/metal/RTCMTLRenderer.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700455 ]
456 if (is_ios) {
457 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200458 "objc/components/renderer/metal/RTCMTLNV12Renderer.h",
459 "objc/components/renderer/metal/RTCMTLNV12Renderer.mm",
460 "objc/components/renderer/metal/RTCMTLRGBRenderer.h",
461 "objc/components/renderer/metal/RTCMTLRGBRenderer.mm",
462 "objc/components/renderer/metal/RTCMTLVideoView.h",
463 "objc/components/renderer/metal/RTCMTLVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700464 ]
465 }
466 if (is_mac) {
467 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200468 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
469 "objc/components/renderer/metal/RTCMTLNSVideoView.m",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700470 ]
471 }
472 libs = [
473 "CoreVideo.framework",
474 "Metal.framework",
475 "MetalKit.framework",
476 ]
477 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200478 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100479 ":peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700480 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100481 ":videoframebuffer_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200482 "../api/video:video_frame",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100483 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700484 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700485 ]
486 configs += [ "..:common_objc" ]
kthelgason36d658d2017-08-24 05:43:45 -0700487 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700488 }
489 }
490
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200491 # TODO(bugs.webrtc.org/9627): Remove this target.
Anders Carlsson73119182018-03-15 09:41:03 +0100492 rtc_static_library("videocapturebase_objc") {
493 visibility = [ "*" ]
494 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200495 "objc/helpers/noop.mm",
Anders Carlsson73119182018-03-15 09:41:03 +0100496 ]
Anders Carlsson73119182018-03-15 09:41:03 +0100497
498 configs += [ "..:common_objc" ]
499
500 public_configs = [ ":common_config_objc" ]
501
502 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200503 ":base_objc",
Anders Carlsson73119182018-03-15 09:41:03 +0100504 ":videoframebuffer_objc",
505 ]
506 }
507
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100508 rtc_static_library("videocapture_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000509 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200510 allow_poison = [
511 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
512 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
513 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700514 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200515 "objc/components/capturer/RTCCameraVideoCapturer.h",
516 "objc/components/capturer/RTCCameraVideoCapturer.m",
zhihuanga4c113a2017-06-28 14:05:44 -0700517 ]
518 if (is_ios) {
519 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200520 "objc/components/capturer/RTCFileVideoCapturer.h",
521 "objc/components/capturer/RTCFileVideoCapturer.m",
zhihuanga4c113a2017-06-28 14:05:44 -0700522 ]
523 }
524 libs = [ "AVFoundation.framework" ]
525
zhihuanga4c113a2017-06-28 14:05:44 -0700526 configs += [ "..:common_objc" ]
527
kthelgason36d658d2017-08-24 05:43:45 -0700528 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700529
zhihuanga4c113a2017-06-28 14:05:44 -0700530 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200531 ":base_objc",
532 ":helpers_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700533 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100534 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700535 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700536 }
537
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100538 rtc_static_library("videocodec_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200539 visibility = [ "*" ]
Mirko Bonadei96ede162018-09-06 13:45:44 +0200540 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100541 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200542 "objc/components/video_codec/RTCCodecSpecificInfoH264+Private.h",
543 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
544 "objc/components/video_codec/RTCCodecSpecificInfoH264.mm",
545 "objc/components/video_codec/RTCH264ProfileLevelId.h",
546 "objc/components/video_codec/RTCH264ProfileLevelId.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700547 ]
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300548 if (is_ios) {
549 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200550 "objc/components/video_codec/UIDevice+H264Profile.h",
551 "objc/components/video_codec/UIDevice+H264Profile.mm",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300552 ]
553 }
zhihuanga4c113a2017-06-28 14:05:44 -0700554 if (!build_with_chromium && is_clang) {
555 # Suppress warnings from the Chromium Clang plugin
556 # (bugs.webrtc.org/163).
557 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
558 }
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100559 public_configs = [ ":common_config_objc" ]
560 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200561 ":base_objc",
562 ":helpers_objc",
kthelgasonfb143122017-07-25 07:55:58 -0700563 "../api/video_codecs:video_codecs_api",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100564 "../common_video",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300565 "../media:rtc_h264_profile_id",
zhihuanga4c113a2017-06-28 14:05:44 -0700566 "../media:rtc_media_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100567 "../modules:module_api",
568 "../modules/video_coding:video_codec_interface",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200569 "../rtc_base:checks",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100570 "../rtc_base:rtc_base_approved",
zhihuanga4c113a2017-06-28 14:05:44 -0700571 ]
572 }
573
Anders Carlssondd8c1652018-01-30 10:32:13 +0100574 rtc_static_library("default_codec_factory_objc") {
575 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200576 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
577 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.m",
578 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
579 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.m",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100580 ]
581
582 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200583 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100584 ":native_video",
585 ":videocodec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200586 ":videotoolbox_objc",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +0200587 ":vp8",
588 ":vp9",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200589 ":vpx_codec_constants",
590 ]
591 }
592
593 rtc_static_library("vpx_codec_constants") {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200594 configs += [ "..:no_global_constructors" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200595 sources = [
596 "objc/api/video_codec/RTCVideoCodecConstants.h",
597 "objc/api/video_codec/RTCVideoCodecConstants.mm",
598 ]
599
600 deps = [
601 ":base_objc",
602 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100603 ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100604 }
605
606 rtc_static_library("vp8") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100607 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200608 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100609 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200610 "objc/api/video_codec/RTCVideoDecoderVP8.h",
611 "objc/api/video_codec/RTCVideoDecoderVP8.mm",
612 "objc/api/video_codec/RTCVideoEncoderVP8.h",
613 "objc/api/video_codec/RTCVideoEncoderVP8.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100614 ]
615
Anders Carlssondd8c1652018-01-30 10:32:13 +0100616 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200617 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100618 ":wrapped_native_codec_objc",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100619 "../modules/video_coding:webrtc_vp8",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100620 ]
621 }
622
623 rtc_static_library("vp9") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100624 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200625 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100626 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200627 "objc/api/video_codec/RTCVideoDecoderVP9.h",
628 "objc/api/video_codec/RTCVideoDecoderVP9.mm",
629 "objc/api/video_codec/RTCVideoEncoderVP9.h",
630 "objc/api/video_codec/RTCVideoEncoderVP9.mm",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100631 ]
632
Anders Carlssondd8c1652018-01-30 10:32:13 +0100633 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200634 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100635 ":wrapped_native_codec_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200636 "../media:rtc_media_base",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100637 "../modules/video_coding:webrtc_vp9",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100638 ]
639 }
640
zhihuanga4c113a2017-06-28 14:05:44 -0700641 # Build the PeerConnectionFactory without audio/video support.
642 # This target depends on the objc_peeerconnectionfactory_base which still
643 # includes some audio/video related objects such as RTCAudioSource because
644 # these objects are just thin wrappers of native C++ interfaces required
645 # when implementing webrtc::PeerConnectionFactoryInterface and
646 # webrtc::PeerConnectionInterface.
Kári Tristan Helgasona2d89fc2018-03-06 10:18:43 +0100647 # The applications which only use WebRTC DataChannel can depend on this.
kthelgason36d658d2017-08-24 05:43:45 -0700648 rtc_static_library("peerconnectionfactory_no_media_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000649 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200650 allow_poison = [
651 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
652 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
653 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700654 defines = [ "HAVE_NO_MEDIA" ]
655
656 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200657 "objc/helpers/noop.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700658 ]
659
kthelgason36d658d2017-08-24 05:43:45 -0700660 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700661
zhihuanga4c113a2017-06-28 14:05:44 -0700662 deps = [
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100663 ":native_api",
664 ":native_video",
kthelgason36d658d2017-08-24 05:43:45 -0700665 ":peerconnectionfactory_base_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700666 "../api:libjingle_peerconnection_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700667 "../rtc_base:rtc_base",
zhihuanga4c113a2017-06-28 14:05:44 -0700668 ]
669 }
670
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100671 rtc_static_library("mediaconstraints_objc") {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200672 configs += [ "..:no_global_constructors" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100673 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200674 "objc/api/peerconnection/RTCMediaConstraints+Private.h",
675 "objc/api/peerconnection/RTCMediaConstraints.h",
676 "objc/api/peerconnection/RTCMediaConstraints.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100677 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100678
679 public_configs = [ ":common_config_objc" ]
680 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200681 ":base_objc",
682 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100683 "../api:libjingle_peerconnection_api",
684 ]
685 }
686
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200687 # TODO(bugs.webrtc.org/9627): Remove, targets should depend on base_objc.
Anders Carlsson9823ee42018-03-07 10:32:03 +0100688 rtc_source_set("videorenderer_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200689 visibility = [ "*" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100690 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200691 "objc/helpers/noop.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100692 ]
693
694 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100695 public_configs = [ ":common_config_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200696
697 deps = [
698 ":base_objc",
699 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100700 }
701
702 rtc_static_library("videorendereradapter_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200703 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200704 allow_poison = [
705 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
706 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
707 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100708 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200709 "objc/api/RTCVideoRendererAdapter+Private.h",
710 "objc/api/RTCVideoRendererAdapter.h",
711 "objc/api/RTCVideoRendererAdapter.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100712 ]
713
714 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100715 public_configs = [ ":common_config_objc" ]
716
717 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200718 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100719 ":native_api",
720 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100721 "../api:libjingle_peerconnection_api",
722 ]
723 }
724
725 rtc_static_library("mediasource_objc") {
726 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200727 "objc/api/peerconnection/RTCMediaSource+Private.h",
728 "objc/api/peerconnection/RTCMediaSource.h",
729 "objc/api/peerconnection/RTCMediaSource.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100730 ]
731
Anders Carlsson358f2e02018-06-04 10:24:37 +0200732 configs += [
733 "..:common_objc",
734 ":used_from_extension",
735 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100736 public_configs = [ ":common_config_objc" ]
737
738 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200739 ":base_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100740 "../api:libjingle_peerconnection_api",
741 "../rtc_base:checks",
742 ]
743 }
744
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200745 rtc_static_library("base_native_additions_objc") {
746 sources = [
747 "objc/api/peerconnection/RTCEncodedImage+Private.h",
748 "objc/api/peerconnection/RTCEncodedImage+Private.mm",
749 "objc/api/peerconnection/RTCRtpFragmentationHeader+Private.h",
750 "objc/api/peerconnection/RTCRtpFragmentationHeader+Private.mm",
751 "objc/api/peerconnection/RTCVideoCodecInfo+Private.h",
752 "objc/api/peerconnection/RTCVideoCodecInfo+Private.mm",
753 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.h",
754 "objc/api/peerconnection/RTCVideoEncoderSettings+Private.mm",
755 ]
756
757 configs += [ "..:common_objc" ]
758
759 public_configs = [ ":common_config_objc" ]
760
761 deps = [
762 ":base_objc",
763 ":helpers_objc",
Niels Möller4dc66c52018-10-05 14:17:58 +0200764 "../api/video:encoded_image",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200765 "../api/video_codecs:video_codecs_api",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200766 "../modules:module_api",
767 "../modules/video_coding:video_codec_interface",
768 "../rtc_base:rtc_base",
769 ]
770
771 if (!build_with_chromium && is_clang) {
772 # Suppress warnings from the Chromium Clang plugin
773 # (bugs.webrtc.org/163).
774 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
775 }
776 }
777
kthelgason36d658d2017-08-24 05:43:45 -0700778 rtc_static_library("peerconnectionfactory_base_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200779 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200780 allow_poison = [
781 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
782 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
783 ]
Mirko Bonadei96ede162018-09-06 13:45:44 +0200784 configs += [
785 "..:no_exit_time_destructors",
786 "..:no_global_constructors",
787 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700788 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200789 "objc/api/peerconnection/RTCAudioSource+Private.h",
790 "objc/api/peerconnection/RTCAudioSource.h",
791 "objc/api/peerconnection/RTCAudioSource.mm",
792 "objc/api/peerconnection/RTCAudioTrack+Private.h",
793 "objc/api/peerconnection/RTCAudioTrack.h",
794 "objc/api/peerconnection/RTCAudioTrack.mm",
795 "objc/api/peerconnection/RTCCertificate.h",
796 "objc/api/peerconnection/RTCCertificate.mm",
797 "objc/api/peerconnection/RTCConfiguration+Native.h",
798 "objc/api/peerconnection/RTCConfiguration+Private.h",
799 "objc/api/peerconnection/RTCConfiguration.h",
800 "objc/api/peerconnection/RTCConfiguration.mm",
Benjamin Wright8c27cca2018-10-25 10:16:44 -0700801 "objc/api/peerconnection/RTCCryptoOptions.h",
802 "objc/api/peerconnection/RTCCryptoOptions.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200803 "objc/api/peerconnection/RTCDataChannel+Private.h",
804 "objc/api/peerconnection/RTCDataChannel.h",
805 "objc/api/peerconnection/RTCDataChannel.mm",
806 "objc/api/peerconnection/RTCDataChannelConfiguration+Private.h",
807 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
808 "objc/api/peerconnection/RTCDataChannelConfiguration.mm",
809 "objc/api/peerconnection/RTCDtmfSender+Private.h",
810 "objc/api/peerconnection/RTCDtmfSender.h",
811 "objc/api/peerconnection/RTCDtmfSender.mm",
812 "objc/api/peerconnection/RTCFieldTrials.h",
813 "objc/api/peerconnection/RTCFieldTrials.mm",
814 "objc/api/peerconnection/RTCIceCandidate+Private.h",
815 "objc/api/peerconnection/RTCIceCandidate.h",
816 "objc/api/peerconnection/RTCIceCandidate.mm",
817 "objc/api/peerconnection/RTCIceServer+Private.h",
818 "objc/api/peerconnection/RTCIceServer.h",
819 "objc/api/peerconnection/RTCIceServer.mm",
820 "objc/api/peerconnection/RTCIntervalRange+Private.h",
821 "objc/api/peerconnection/RTCIntervalRange.h",
822 "objc/api/peerconnection/RTCIntervalRange.mm",
823 "objc/api/peerconnection/RTCLegacyStatsReport+Private.h",
824 "objc/api/peerconnection/RTCLegacyStatsReport.h",
825 "objc/api/peerconnection/RTCLegacyStatsReport.mm",
826 "objc/api/peerconnection/RTCMediaStream+Private.h",
827 "objc/api/peerconnection/RTCMediaStream.h",
828 "objc/api/peerconnection/RTCMediaStream.mm",
829 "objc/api/peerconnection/RTCMediaStreamTrack+Private.h",
830 "objc/api/peerconnection/RTCMediaStreamTrack.h",
831 "objc/api/peerconnection/RTCMediaStreamTrack.mm",
832 "objc/api/peerconnection/RTCMetrics.h",
833 "objc/api/peerconnection/RTCMetrics.mm",
834 "objc/api/peerconnection/RTCMetricsSampleInfo+Private.h",
835 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
836 "objc/api/peerconnection/RTCMetricsSampleInfo.mm",
837 "objc/api/peerconnection/RTCPeerConnection+DataChannel.mm",
838 "objc/api/peerconnection/RTCPeerConnection+Native.h",
839 "objc/api/peerconnection/RTCPeerConnection+Private.h",
840 "objc/api/peerconnection/RTCPeerConnection+Stats.mm",
841 "objc/api/peerconnection/RTCPeerConnection.h",
842 "objc/api/peerconnection/RTCPeerConnection.mm",
843 "objc/api/peerconnection/RTCPeerConnectionFactory+Native.h",
844 "objc/api/peerconnection/RTCPeerConnectionFactory+Private.h",
845 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
846 "objc/api/peerconnection/RTCPeerConnectionFactory.mm",
847 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.h",
848 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.mm",
849 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.h",
850 "objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.mm",
851 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions+Private.h",
852 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
853 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.mm",
854 "objc/api/peerconnection/RTCRtcpParameters+Private.h",
855 "objc/api/peerconnection/RTCRtcpParameters.h",
856 "objc/api/peerconnection/RTCRtcpParameters.mm",
857 "objc/api/peerconnection/RTCRtpCodecParameters+Private.h",
858 "objc/api/peerconnection/RTCRtpCodecParameters.h",
859 "objc/api/peerconnection/RTCRtpCodecParameters.mm",
860 "objc/api/peerconnection/RTCRtpEncodingParameters+Private.h",
861 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
862 "objc/api/peerconnection/RTCRtpEncodingParameters.mm",
863 "objc/api/peerconnection/RTCRtpHeaderExtension+Private.h",
864 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
865 "objc/api/peerconnection/RTCRtpHeaderExtension.mm",
866 "objc/api/peerconnection/RTCRtpParameters+Private.h",
867 "objc/api/peerconnection/RTCRtpParameters.h",
868 "objc/api/peerconnection/RTCRtpParameters.mm",
Benjamin Wrightddf1a3e2018-10-02 10:20:58 -0700869 "objc/api/peerconnection/RTCRtpReceiver+Native.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200870 "objc/api/peerconnection/RTCRtpReceiver+Private.h",
871 "objc/api/peerconnection/RTCRtpReceiver.h",
872 "objc/api/peerconnection/RTCRtpReceiver.mm",
Benjamin Wrightddf1a3e2018-10-02 10:20:58 -0700873 "objc/api/peerconnection/RTCRtpSender+Native.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200874 "objc/api/peerconnection/RTCRtpSender+Private.h",
875 "objc/api/peerconnection/RTCRtpSender.h",
876 "objc/api/peerconnection/RTCRtpSender.mm",
877 "objc/api/peerconnection/RTCRtpTransceiver+Private.h",
878 "objc/api/peerconnection/RTCRtpTransceiver.h",
879 "objc/api/peerconnection/RTCRtpTransceiver.mm",
880 "objc/api/peerconnection/RTCSSLAdapter.h",
881 "objc/api/peerconnection/RTCSSLAdapter.mm",
882 "objc/api/peerconnection/RTCSessionDescription+Private.h",
883 "objc/api/peerconnection/RTCSessionDescription.h",
884 "objc/api/peerconnection/RTCSessionDescription.mm",
885 "objc/api/peerconnection/RTCTracing.h",
886 "objc/api/peerconnection/RTCTracing.mm",
887 "objc/api/peerconnection/RTCVideoTrack+Private.h",
888 "objc/api/peerconnection/RTCVideoTrack.h",
889 "objc/api/peerconnection/RTCVideoTrack.mm",
kthelgason5fe4d492016-12-05 11:27:30 -0800890 ]
kthelgasonebc34e72016-09-15 04:30:18 -0700891
Anders Carlsson358f2e02018-06-04 10:24:37 +0200892 configs += [
893 "..:common_objc",
894 ":used_from_extension",
895 ]
kthelgason36d658d2017-08-24 05:43:45 -0700896 public_configs = [ ":common_config_objc" ]
kthelgasonc0977102017-04-24 00:57:16 -0700897
mbonadei2c8ac1b2017-05-31 05:14:26 -0700898 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200899 ":base_native_additions_objc",
900 ":base_objc",
901 ":file_logger_objc",
902 ":helpers_objc",
903 ":legacy_header_paths",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100904 ":mediaconstraints_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100905 ":mediasource_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100906 ":native_api",
907 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100908 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100909 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100910 ":videorendereradapter_objc",
911 ":videosource_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200912 ":videotoolbox_objc",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100913 "../api:libjingle_peerconnection_api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700914 "../api/audio_codecs:audio_codecs_api",
Karl Wiberg5817d3d2018-04-06 10:06:42 +0200915 "../api/audio_codecs:builtin_audio_decoder_factory",
Jiawei Ouae810c12018-06-20 16:18:59 -0700916 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200917 "../api/video:video_frame",
Anders Carlsson7e042812017-10-05 16:55:38 +0200918 "../api/video_codecs:video_codecs_api",
Anders Carlssone5960ce2017-06-22 15:26:30 +0200919 "../common_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700920 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -0700921 "../modules:module_api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700922 "../modules/audio_device:audio_device_api",
Alessio Bazzicab768e882018-11-07 14:29:54 +0000923 "../modules/audio_processing:api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700924 "../modules/audio_processing:audio_processing",
Patrik Höglund99175c62018-01-08 11:05:10 +0100925 "../modules/video_coding:video_codec_interface",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100926 "../pc:create_pc_factory",
zhihuanga4c113a2017-06-28 14:05:44 -0700927 "../pc:peerconnection",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100928 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700929 "../rtc_base:rtc_base",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200930 "../system_wrappers:field_trial",
931 "../system_wrappers:metrics",
Mirko Bonadei879f7882018-07-11 09:18:37 +0200932 "//third_party/abseil-cpp/absl/memory",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700933 ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200934
935 if (is_ios) {
936 deps += [ ":native_api_audio_device_module" ]
937 }
kthelgasonebc34e72016-09-15 04:30:18 -0700938 }
Zeke Chindd0e1e02016-10-11 13:27:26 -0700939
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200940 # TODO(bugs.webrtc.org/9627): Remove this target.
941 rtc_source_set("legacy_header_paths") {
942 sources = [
943 "objc/Framework/Classes/Common/NSString+StdString.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200944 "objc/Framework/Classes/Common/scoped_cftyperef.h",
945 "objc/Framework/Classes/PeerConnection/RTCConfiguration+Native.h",
946 "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Native.h",
947 "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Native.h",
948 "objc/Framework/Classes/PeerConnection/RTCVideoCodec+Private.h",
949 "objc/Framework/Classes/Video/RTCDefaultShader.h",
950 "objc/Framework/Classes/Video/RTCNV12TextureCache.h",
951 "objc/Framework/Classes/VideoToolbox/nalu_rewriter.h",
952 "objc/Framework/Headers/WebRTC/RTCAudioSession.h",
953 "objc/Framework/Headers/WebRTC/RTCAudioSessionConfiguration.h",
954 "objc/Framework/Headers/WebRTC/RTCAudioSource.h",
955 "objc/Framework/Headers/WebRTC/RTCAudioTrack.h",
956 "objc/Framework/Headers/WebRTC/RTCCVPixelBuffer.h",
957 "objc/Framework/Headers/WebRTC/RTCCallbackLogger.h",
958 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
959 "objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h",
960 "objc/Framework/Headers/WebRTC/RTCCertificate.h",
961 "objc/Framework/Headers/WebRTC/RTCConfiguration.h",
962 "objc/Framework/Headers/WebRTC/RTCDataChannel.h",
963 "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h",
964 "objc/Framework/Headers/WebRTC/RTCDefaultVideoDecoderFactory.h",
965 "objc/Framework/Headers/WebRTC/RTCDefaultVideoEncoderFactory.h",
966 "objc/Framework/Headers/WebRTC/RTCDispatcher.h",
967 "objc/Framework/Headers/WebRTC/RTCDtmfSender.h",
968 "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
969 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h",
970 "objc/Framework/Headers/WebRTC/RTCFileLogger.h",
971 "objc/Framework/Headers/WebRTC/RTCFileVideoCapturer.h",
972 "objc/Framework/Headers/WebRTC/RTCH264ProfileLevelId.h",
973 "objc/Framework/Headers/WebRTC/RTCIceCandidate.h",
974 "objc/Framework/Headers/WebRTC/RTCIceServer.h",
975 "objc/Framework/Headers/WebRTC/RTCIntervalRange.h",
976 "objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h",
977 "objc/Framework/Headers/WebRTC/RTCLogging.h",
978 "objc/Framework/Headers/WebRTC/RTCMTLNSVideoView.h",
979 "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h",
980 "objc/Framework/Headers/WebRTC/RTCMacros.h",
981 "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h",
982 "objc/Framework/Headers/WebRTC/RTCMediaSource.h",
983 "objc/Framework/Headers/WebRTC/RTCMediaStream.h",
984 "objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h",
985 "objc/Framework/Headers/WebRTC/RTCMetrics.h",
986 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h",
987 "objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h",
988 "objc/Framework/Headers/WebRTC/RTCPeerConnection.h",
989 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h",
990 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactoryOptions.h",
991 "objc/Framework/Headers/WebRTC/RTCRtcpParameters.h",
992 "objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h",
993 "objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h",
994 "objc/Framework/Headers/WebRTC/RTCRtpHeaderExtension.h",
995 "objc/Framework/Headers/WebRTC/RTCRtpParameters.h",
996 "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h",
997 "objc/Framework/Headers/WebRTC/RTCRtpSender.h",
998 "objc/Framework/Headers/WebRTC/RTCRtpTransceiver.h",
999 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
1000 "objc/Framework/Headers/WebRTC/RTCSessionDescription.h",
1001 "objc/Framework/Headers/WebRTC/RTCTracing.h",
1002 "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h",
1003 "objc/Framework/Headers/WebRTC/RTCVideoCodec.h",
1004 "objc/Framework/Headers/WebRTC/RTCVideoCodecFactory.h",
1005 "objc/Framework/Headers/WebRTC/RTCVideoCodecH264.h",
1006 "objc/Framework/Headers/WebRTC/RTCVideoCodecInfo.h",
1007 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP8.h",
1008 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP9.h",
1009 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP8.h",
1010 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP9.h",
1011 "objc/Framework/Headers/WebRTC/RTCVideoFrame.h",
1012 "objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.h",
1013 "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h",
1014 "objc/Framework/Headers/WebRTC/RTCVideoSource.h",
1015 "objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
1016 "objc/Framework/Headers/WebRTC/RTCVideoViewShading.h",
1017 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
1018 "objc/Framework/Native/api/audio_device_module.h",
1019 "objc/Framework/Native/api/video_decoder_factory.h",
1020 "objc/Framework/Native/api/video_encoder_factory.h",
1021 "objc/Framework/Native/api/video_frame_buffer.h",
1022 "objc/Framework/Native/src/objc_video_decoder_factory.h",
1023 "objc/Framework/Native/src/objc_video_encoder_factory.h",
1024 ]
1025 }
1026
mbonadei2c8ac1b2017-05-31 05:14:26 -07001027 if (rtc_include_tests) {
Daniela012b56b2017-11-15 13:15:24 +01001028 if (is_ios) {
Danielaae012cf2017-10-12 13:46:00 +02001029 rtc_source_set("sdk_unittests_sources") {
1030 testonly = true
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001031 include_dirs = [ "objc/" ]
Daniela012b56b2017-11-15 13:15:24 +01001032
Danielaae012cf2017-10-12 13:46:00 +02001033 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001034 "objc/unittests/ObjCVideoTrackSource_xctest.mm",
1035 "objc/unittests/RTCCVPixelBuffer_xctest.mm",
1036 "objc/unittests/RTCCallbackLogger_xctest.m",
1037 "objc/unittests/RTCFileVideoCapturer_xctest.mm",
1038 "objc/unittests/RTCH264ProfileLevelId_xctest.m",
1039 "objc/unittests/RTCPeerConnectionFactory_xctest.m",
1040 "objc/unittests/frame_buffer_helpers.h",
1041 "objc/unittests/frame_buffer_helpers.mm",
Artem Titarenko42b43152018-10-29 18:18:09 +01001042 "objc/unittests/nalu_rewriter_xctest.mm",
Danielaae012cf2017-10-12 13:46:00 +02001043 ]
Daniela012b56b2017-11-15 13:15:24 +01001044
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001045 # TODO(peterhanspers): Reenable these tests on simulator.
1046 # See bugs.webrtc.org/7812
1047 if (!use_ios_simulator) {
1048 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001049 "objc/unittests/RTCAudioDeviceModule_xctest.mm",
1050 "objc/unittests/RTCAudioDevice_xctest.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001051 ]
1052 }
1053
Danielaae012cf2017-10-12 13:46:00 +02001054 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001055 ":audio_device",
1056 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001057 ":base_objc",
1058 ":callback_logger_objc",
Anders Carlssondc6b4772018-01-15 13:31:03 +01001059 ":framework_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001060 ":mediaconstraints_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001061 ":native_api",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001062 ":native_api_audio_device_module",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001063 ":native_video",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001064 ":peerconnectionfactory_base_objc",
Artem Titarenko42b43152018-10-29 18:18:09 +01001065 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001066 ":videocapture_objc",
Anders Carlsson79ce8202018-06-01 12:51:09 +02001067 ":videocodec_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001068 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001069 ":videosource_objc",
Danielaae012cf2017-10-12 13:46:00 +02001070 ":videotoolbox_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001071 "../api/video:video_frame_i420",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001072 "../common_video:common_video",
Danielaae012cf2017-10-12 13:46:00 +02001073 "../media:rtc_media_base",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001074 "../media:rtc_media_tests_utils",
Danielaae012cf2017-10-12 13:46:00 +02001075 "../modules:module_api",
1076 "../rtc_base:rtc_base",
1077 "../rtc_base:rtc_base_tests_utils",
Oleh Prypinda04e062018-07-23 10:04:12 +02001078 "../system_wrappers:system_wrappers",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001079 "//third_party/libyuv",
Danielaae012cf2017-10-12 13:46:00 +02001080 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001081
1082 if (rtc_use_metal_rendering) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001083 sources += [ "objc/unittests/RTCMTLVideoView_xctest.m" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001084 deps += [ ":metal_objc" ]
1085 }
1086
Danielaae012cf2017-10-12 13:46:00 +02001087 public_deps = [
1088 "//build/config/ios:xctest",
1089 "//third_party/ocmock",
1090 ]
1091 }
1092
Daniela012b56b2017-11-15 13:15:24 +01001093 bundle_data("sdk_unittests_bundle_data") {
Daniela012b56b2017-11-15 13:15:24 +01001094 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001095 "objc/unittests/audio_short16.pcm",
1096 "objc/unittests/audio_short44.pcm",
1097 "objc/unittests/audio_short48.pcm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001098
1099 # Sample video taken from https://media.xiph.org/video/derf/
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001100 "objc/unittests/foreman.mp4",
Daniela012b56b2017-11-15 13:15:24 +01001101 ]
1102 outputs = [
1103 "{{bundle_resources_dir}}/{{source_file_part}}",
1104 ]
1105 }
1106
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001107 # These tests use static linking.
Danielaae012cf2017-10-12 13:46:00 +02001108 rtc_ios_xctest_test("sdk_unittests") {
1109 info_plist = "//test/ios/Info.plist"
1110 sources = [
Artem Titarenko34fc3462018-11-06 12:29:29 +01001111 "objc/unittests/main.mm",
Danielaae012cf2017-10-12 13:46:00 +02001112 ]
Daniela012b56b2017-11-15 13:15:24 +01001113
Danielaae012cf2017-10-12 13:46:00 +02001114 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
1115 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
1116 deps = [
Yura Yaroshevich5297bd22018-06-19 12:51:51 +03001117 ":peerconnectionfactory_base_objc",
Daniela012b56b2017-11-15 13:15:24 +01001118 ":sdk_unittests_bundle_data",
Danielaae012cf2017-10-12 13:46:00 +02001119 ":sdk_unittests_sources",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001120 "//test:test_support",
Danielaae012cf2017-10-12 13:46:00 +02001121 ]
1122 ldflags = [ "-all_load" ]
1123 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001124
1125 # These tests link to the framework.
1126 rtc_ios_xctest_test("sdk_framework_unittests") {
1127 info_plist = "//test/ios/Info.plist"
1128 sources = [
1129 "objc/unittests/RTCDoNotPutCPlusPlusInFrameworkHeaders_xctest.m",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001130 "objc/unittests/main.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001131 ]
1132
1133 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
1134 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
1135 deps = [
1136 ":framework_objc+link",
1137 ":ios_framework_bundle",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001138 "//test:test_support",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001139 ]
1140 }
Danielaae012cf2017-10-12 13:46:00 +02001141 }
1142
1143 # TODO(denicija): once all tests are migrated to xctest remove this source set.
Kári Tristan Helgason90143242018-07-27 12:34:54 +02001144 rtc_source_set("rtc_unittests_objc") {
mbonadei2c8ac1b2017-05-31 05:14:26 -07001145 testonly = true
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001146
mbonadei2c8ac1b2017-05-31 05:14:26 -07001147 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001148 "objc/unittests/RTCCertificateTest.mm",
1149 "objc/unittests/RTCConfigurationTest.mm",
1150 "objc/unittests/RTCDataChannelConfigurationTest.mm",
1151 "objc/unittests/RTCIceCandidateTest.mm",
1152 "objc/unittests/RTCIceServerTest.mm",
1153 "objc/unittests/RTCIntervalRangeTests.mm",
1154 "objc/unittests/RTCMediaConstraintsTest.mm",
1155 "objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm",
1156 "objc/unittests/RTCPeerConnectionTest.mm",
1157 "objc/unittests/RTCSessionDescriptionTest.mm",
1158 "objc/unittests/RTCTracingTest.mm",
1159 "objc/unittests/objc_video_decoder_factory_tests.mm",
1160 "objc/unittests/objc_video_encoder_factory_tests.mm",
1161 "objc/unittests/scoped_cftyperef_tests.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001162 ]
Anders Carlssone7dd83f2018-01-19 11:28:44 +01001163 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001164 sources += [ "objc/unittests/RTCCameraVideoCapturerTests.mm" ]
oprypin45197522017-06-22 01:47:20 -07001165 }
mbonadeid7620582017-05-30 01:50:35 -07001166
mbonadei2c8ac1b2017-05-31 05:14:26 -07001167 # |-ObjC| flag needed to make sure category method implementations
1168 # are included:
1169 # https://developer.apple.com/library/mac/qa/qa1490/_index.html
1170 ldflags = [ "-ObjC" ]
magjed3149e092017-05-08 05:32:05 -07001171
mbonadei2c8ac1b2017-05-31 05:14:26 -07001172 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001173 ":base_objc",
1174 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001175 ":mediaconstraints_objc",
1176 ":native_api",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001177 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001178 ":peerconnectionfactory_base_objc",
1179 ":video_objc",
1180 ":videocapture_objc",
1181 ":videocodec_objc",
1182 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001183 ":videosource_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001184 ":videotoolbox_objc",
Piotr (Peter) Slatalae0c2e972018-10-08 09:43:21 -07001185 "../api:libjingle_peerconnection_api",
Jiawei Ouae810c12018-06-20 16:18:59 -07001186 "../api/audio_codecs:audio_codecs_api",
1187 "../api/audio_codecs:builtin_audio_decoder_factory",
1188 "../api/audio_codecs:builtin_audio_encoder_factory",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001189 "../api/video_codecs:video_codecs_api",
kthelgasonebd4f792017-09-04 04:36:21 -07001190 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -07001191 "../modules:module_api",
Jiawei Ouae810c12018-06-20 16:18:59 -07001192 "../modules/audio_device:audio_device_api",
Alessio Bazzicab768e882018-11-07 14:29:54 +00001193 "../modules/audio_processing:api",
Jiawei Ouae810c12018-06-20 16:18:59 -07001194 "../modules/audio_processing:audio_processing",
Patrik Höglund99175c62018-01-08 11:05:10 +01001195 "../modules/video_coding:video_codec_interface",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001196 "../rtc_base:rtc_base_tests_utils",
Niels Möllera12c42a2018-07-25 16:05:48 +02001197 "../rtc_base/system:unused",
Yves Gerey21cddff2018-10-30 21:12:42 +01001198 "../test:test_support",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001199 "//third_party/ocmock",
1200 ]
magjed3149e092017-05-08 05:32:05 -07001201
denicija59ee91b2017-06-05 05:48:47 -07001202 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001203 sources += [ "objc/unittests/RTCAudioSessionTest.mm" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001204 deps += [ ":audio_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001205 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001206 }
kthelgason2f088792017-05-30 01:48:47 -07001207 }
1208
mbonadei2c8ac1b2017-05-31 05:14:26 -07001209 if (is_ios) {
Anders Carlssondc6b4772018-01-15 13:31:03 +01001210 ios_framework_bundle_with_umbrella_header("framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001211 info_plist = "objc/Info.plist"
mbonadei2c8ac1b2017-05-31 05:14:26 -07001212 output_name = "WebRTC"
Magnus Jedvertf83dc8b2017-08-29 09:49:43 +00001213
mbonadei2c8ac1b2017-05-31 05:14:26 -07001214 common_objc_headers = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001215 "objc/base/RTCCodecSpecificInfo.h",
1216 "objc/base/RTCEncodedImage.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001217 "objc/base/RTCI420Buffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001218 "objc/base/RTCLogging.h",
1219 "objc/base/RTCMacros.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001220 "objc/base/RTCMutableI420Buffer.h",
1221 "objc/base/RTCMutableYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001222 "objc/base/RTCRtpFragmentationHeader.h",
1223 "objc/base/RTCVideoCapturer.h",
1224 "objc/base/RTCVideoCodecInfo.h",
1225 "objc/base/RTCVideoDecoder.h",
1226 "objc/base/RTCVideoDecoderFactory.h",
1227 "objc/base/RTCVideoEncoder.h",
1228 "objc/base/RTCVideoEncoderFactory.h",
1229 "objc/base/RTCVideoEncoderQpThresholds.h",
1230 "objc/base/RTCVideoEncoderSettings.h",
1231 "objc/base/RTCVideoFrame.h",
1232 "objc/base/RTCVideoFrameBuffer.h",
1233 "objc/base/RTCVideoRenderer.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001234 "objc/base/RTCYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001235 "objc/components/audio/RTCAudioSession.h",
1236 "objc/components/audio/RTCAudioSessionConfiguration.h",
1237 "objc/components/capturer/RTCCameraVideoCapturer.h",
1238 "objc/components/capturer/RTCFileVideoCapturer.h",
1239 "objc/components/renderer/metal/RTCMTLVideoView.h",
1240 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
1241 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1242 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1243 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1244 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1245 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1246 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1247 "objc/components/video_codec/RTCVideoDecoderH264.h",
1248 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1249 "objc/components/video_codec/RTCVideoEncoderH264.h",
1250 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1251 "objc/helpers/RTCCameraPreviewView.h",
1252 "objc/helpers/RTCDispatcher.h",
1253 "objc/helpers/UIDevice+RTCDevice.h",
1254 "objc/api/peerconnection/RTCAudioSource.h",
1255 "objc/api/peerconnection/RTCAudioTrack.h",
1256 "objc/api/peerconnection/RTCConfiguration.h",
1257 "objc/api/peerconnection/RTCDataChannel.h",
1258 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1259 "objc/api/peerconnection/RTCFieldTrials.h",
1260 "objc/api/peerconnection/RTCIceCandidate.h",
1261 "objc/api/peerconnection/RTCIceServer.h",
1262 "objc/api/peerconnection/RTCIntervalRange.h",
1263 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1264 "objc/api/peerconnection/RTCMediaConstraints.h",
1265 "objc/api/peerconnection/RTCMediaSource.h",
1266 "objc/api/peerconnection/RTCMediaStream.h",
1267 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1268 "objc/api/peerconnection/RTCMetrics.h",
1269 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1270 "objc/api/peerconnection/RTCPeerConnection.h",
1271 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1272 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1273 "objc/api/peerconnection/RTCRtcpParameters.h",
1274 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1275 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1276 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1277 "objc/api/peerconnection/RTCRtpParameters.h",
1278 "objc/api/peerconnection/RTCRtpReceiver.h",
1279 "objc/api/peerconnection/RTCRtpSender.h",
1280 "objc/api/peerconnection/RTCRtpTransceiver.h",
1281 "objc/api/peerconnection/RTCDtmfSender.h",
1282 "objc/api/peerconnection/RTCSSLAdapter.h",
1283 "objc/api/peerconnection/RTCSessionDescription.h",
1284 "objc/api/peerconnection/RTCTracing.h",
1285 "objc/api/peerconnection/RTCCertificate.h",
Benjamin Wright8c27cca2018-10-25 10:16:44 -07001286 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001287 "objc/api/peerconnection/RTCVideoSource.h",
1288 "objc/api/peerconnection/RTCVideoTrack.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001289 "objc/api/video_codec/RTCVideoCodecConstants.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001290 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1291 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1292 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1293 "objc/api/video_codec/RTCVideoEncoderVP9.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001294 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1295 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001296 ]
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001297
mbonadei2c8ac1b2017-05-31 05:14:26 -07001298 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001299 common_objc_headers += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001300 "objc/api/logging/RTCCallbackLogger.h",
1301 "objc/api/peerconnection/RTCFileLogger.h",
Anders Carlsson3b3364e2018-01-30 15:46:13 +01001302 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001303 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001304
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001305 sources = common_objc_headers
1306 public_headers = common_objc_headers
1307
mbonadei2c8ac1b2017-05-31 05:14:26 -07001308 ldflags = [
1309 "-all_load",
1310 "-install_name",
1311 "@rpath/$output_name.framework/$output_name",
1312 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001313
mbonadei2c8ac1b2017-05-31 05:14:26 -07001314 deps = [
kthelgason36d658d2017-08-24 05:43:45 -07001315 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001316 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001317 ":default_codec_factory_objc",
1318 ":native_api",
1319 ":native_video",
1320 ":peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001321 ":ui_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001322 ":videocapture_objc",
1323 ":videocodec_objc",
1324 ":videotoolbox_objc",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001325 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001326 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001327 if (rtc_use_metal_rendering) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001328 deps += [ ":metal_objc" ]
1329 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001330 if (!build_with_chromium) {
1331 deps += [
1332 ":callback_logger_objc",
1333 ":file_logger_objc",
1334 ]
1335 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001336
mbonadei2c8ac1b2017-05-31 05:14:26 -07001337 libs = [
1338 "AVFoundation.framework",
1339 "CoreGraphics.framework",
1340 "CoreMedia.framework",
1341 "GLKit.framework",
1342 ]
1343
Anders Carlsson358f2e02018-06-04 10:24:37 +02001344 configs += [
1345 "..:common_objc",
1346 ":used_from_extension",
1347 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001348
kthelgason36d658d2017-08-24 05:43:45 -07001349 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001350 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001351
1352 bundle_data("ios_framework_bundle") {
1353 deps = [
1354 "../sdk:framework_objc",
1355 ]
1356 sources = [
1357 "$root_build_dir/WebRTC.framework",
1358 ]
1359 outputs = [
1360 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
1361 ]
1362 }
1363 }
1364
1365 if (is_mac) {
Anders Carlsson37bbf792018-09-05 16:29:27 +02001366 mac_framework_bundle_with_umbrella_header("mac_framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001367 info_plist = "objc/Info.plist"
1368 output_name = "WebRTC"
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001369
Anders Carlsson37bbf792018-09-05 16:29:27 +02001370 sources = [
1371 "objc/api/peerconnection/RTCAudioSource.h",
1372 "objc/api/peerconnection/RTCAudioTrack.h",
1373 "objc/api/peerconnection/RTCCertificate.h",
1374 "objc/api/peerconnection/RTCConfiguration.h",
Benjamin Wright8c27cca2018-10-25 10:16:44 -07001375 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001376 "objc/api/peerconnection/RTCDataChannel.h",
1377 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1378 "objc/api/peerconnection/RTCDtmfSender.h",
1379 "objc/api/peerconnection/RTCFieldTrials.h",
1380 "objc/api/peerconnection/RTCIceCandidate.h",
1381 "objc/api/peerconnection/RTCIceServer.h",
1382 "objc/api/peerconnection/RTCIntervalRange.h",
1383 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1384 "objc/api/peerconnection/RTCMediaConstraints.h",
1385 "objc/api/peerconnection/RTCMediaSource.h",
1386 "objc/api/peerconnection/RTCMediaStream.h",
1387 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1388 "objc/api/peerconnection/RTCMetrics.h",
1389 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1390 "objc/api/peerconnection/RTCPeerConnection.h",
1391 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1392 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1393 "objc/api/peerconnection/RTCRtcpParameters.h",
1394 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1395 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1396 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1397 "objc/api/peerconnection/RTCRtpParameters.h",
1398 "objc/api/peerconnection/RTCRtpReceiver.h",
1399 "objc/api/peerconnection/RTCRtpSender.h",
1400 "objc/api/peerconnection/RTCRtpTransceiver.h",
1401 "objc/api/peerconnection/RTCSSLAdapter.h",
1402 "objc/api/peerconnection/RTCSessionDescription.h",
1403 "objc/api/peerconnection/RTCTracing.h",
1404 "objc/api/peerconnection/RTCVideoSource.h",
1405 "objc/api/peerconnection/RTCVideoTrack.h",
1406 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1407 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1408 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1409 "objc/api/video_codec/RTCVideoEncoderVP9.h",
1410 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1411 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
1412 "objc/base/RTCCodecSpecificInfo.h",
1413 "objc/base/RTCEncodedImage.h",
1414 "objc/base/RTCI420Buffer.h",
1415 "objc/base/RTCLogging.h",
1416 "objc/base/RTCMacros.h",
1417 "objc/base/RTCMutableI420Buffer.h",
1418 "objc/base/RTCMutableYUVPlanarBuffer.h",
1419 "objc/base/RTCRtpFragmentationHeader.h",
1420 "objc/base/RTCVideoCapturer.h",
1421 "objc/base/RTCVideoCodecInfo.h",
1422 "objc/base/RTCVideoDecoder.h",
1423 "objc/base/RTCVideoDecoderFactory.h",
1424 "objc/base/RTCVideoEncoder.h",
1425 "objc/base/RTCVideoEncoderFactory.h",
1426 "objc/base/RTCVideoEncoderQpThresholds.h",
1427 "objc/base/RTCVideoEncoderSettings.h",
1428 "objc/base/RTCVideoFrame.h",
1429 "objc/base/RTCVideoFrameBuffer.h",
1430 "objc/base/RTCVideoRenderer.h",
1431 "objc/base/RTCYUVPlanarBuffer.h",
1432 "objc/components/capturer/RTCCameraVideoCapturer.h",
1433 "objc/components/capturer/RTCFileVideoCapturer.h",
1434 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
1435 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
1436 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1437 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1438 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1439 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1440 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1441 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1442 "objc/components/video_codec/RTCVideoDecoderH264.h",
1443 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1444 "objc/components/video_codec/RTCVideoEncoderH264.h",
1445 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1446 "objc/helpers/RTCDispatcher.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001447 ]
Anders Carlsson37bbf792018-09-05 16:29:27 +02001448 if (!build_with_chromium) {
1449 sources += [
1450 "objc/api/logging/RTCCallbackLogger.h",
1451 "objc/api/peerconnection/RTCFileLogger.h",
1452 ]
1453 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001454
1455 deps = [
1456 ":base_objc",
1457 ":default_codec_factory_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001458 ":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",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001466 ]
1467 if (rtc_use_metal_rendering) {
1468 deps += [ ":metal_objc" ]
1469 }
1470 if (!build_with_chromium) {
1471 deps += [
1472 ":callback_logger_objc",
1473 ":file_logger_objc",
1474 ]
1475 }
1476
1477 libs = [
1478 "AVFoundation.framework",
1479 "CoreGraphics.framework",
1480 "CoreMedia.framework",
1481 "OpenGL.framework",
1482 ]
1483
Anders Carlsson37bbf792018-09-05 16:29:27 +02001484 configs = [ "..:common_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001485
1486 public_configs = [ ":common_config_objc" ]
1487 }
1488
1489 bundle_data("mac_framework_bundle") {
1490 deps = [
1491 "../sdk:mac_framework_objc",
1492 ]
1493 sources = [
1494 "$root_build_dir/WebRTC.framework",
1495 ]
1496 outputs = [
1497 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
1498 ]
1499 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001500 }
1501
Anders Carlsson9823ee42018-03-07 10:32:03 +01001502 rtc_static_library("wrapped_native_codec_objc") {
1503 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001504 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.h",
1505 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm",
1506 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.h",
1507 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001508 ]
1509
1510 configs += [ "..:common_objc" ]
1511 public_configs = [ ":common_config_objc" ]
1512
Anders Carlsson9823ee42018-03-07 10:32:03 +01001513 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001514 ":base_objc",
1515 ":helpers_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001516 "../api/video_codecs:video_codecs_api",
1517 "../media:rtc_media_base",
1518 ]
1519 }
1520
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001521 # The native API is currently experimental and may change without notice.
1522 rtc_static_library("native_api") {
1523 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +02001524 allow_poison = [
1525 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
1526 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
1527 ]
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001528 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001529 "objc/native/api/video_capturer.h",
1530 "objc/native/api/video_capturer.mm",
1531 "objc/native/api/video_decoder_factory.h",
1532 "objc/native/api/video_decoder_factory.mm",
1533 "objc/native/api/video_encoder_factory.h",
1534 "objc/native/api/video_encoder_factory.mm",
1535 "objc/native/api/video_frame.h",
1536 "objc/native/api/video_frame.mm",
1537 "objc/native/api/video_frame_buffer.h",
1538 "objc/native/api/video_frame_buffer.mm",
1539 "objc/native/api/video_renderer.h",
1540 "objc/native/api/video_renderer.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001541 ]
1542
1543 configs += [ "..:common_objc" ]
1544
1545 public_configs = [ ":common_config_objc" ]
1546
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001547 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001548 ":base_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001549 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001550 ":videoframebuffer_objc",
Anders Carlsson73119182018-03-15 09:41:03 +01001551 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001552 "../api/video:video_frame",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001553 "../api/video_codecs:video_codecs_api",
1554 "../common_video",
1555 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +02001556 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001557 ]
1558 }
1559
1560 rtc_static_library("native_video") {
1561 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001562 "objc/native/src/objc_frame_buffer.h",
1563 "objc/native/src/objc_frame_buffer.mm",
1564 "objc/native/src/objc_video_decoder_factory.h",
1565 "objc/native/src/objc_video_decoder_factory.mm",
1566 "objc/native/src/objc_video_encoder_factory.h",
1567 "objc/native/src/objc_video_encoder_factory.mm",
1568 "objc/native/src/objc_video_frame.h",
1569 "objc/native/src/objc_video_frame.mm",
1570 "objc/native/src/objc_video_renderer.h",
1571 "objc/native/src/objc_video_renderer.mm",
1572 "objc/native/src/objc_video_track_source.h",
1573 "objc/native/src/objc_video_track_source.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001574 ]
1575
1576 configs += [ "..:common_objc" ]
1577
1578 public_configs = [ ":common_config_objc" ]
1579
1580 if (!build_with_chromium && is_clang) {
1581 # Suppress warnings from the Chromium Clang plugin
1582 # (bugs.webrtc.org/163).
1583 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1584 }
1585
1586 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001587 ":base_native_additions_objc",
1588 ":base_objc",
1589 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001590 ":videocodec_objc",
1591 ":videoframebuffer_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001592 ":vpx_codec_constants",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001593 ":wrapped_native_codec_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001594 "../api/video:video_frame",
1595 "../api/video:video_frame_i420",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001596 "../api/video_codecs:video_codecs_api",
1597 "../common_video",
1598 "../media:rtc_audio_video",
1599 "../media:rtc_media_base",
1600 "../modules:module_api",
1601 "../modules/video_coding:video_codec_interface",
1602 "../rtc_base:checks",
1603 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +02001604 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001605 ]
1606 }
1607
mbonadeic0af5ac2017-08-24 12:26:05 -07001608 rtc_static_library("video_toolbox_cc") {
Artem Titarenko42b43152018-10-29 18:18:09 +01001609 visibility = [
1610 ":videotoolbox_objc",
1611 ":sdk_unittests_sources",
1612 ]
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}