blob: 8d1ee7e22741f319f2abbe18a62b4b79330b77b4 [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",
Jiawei Ouae810c12018-06-20 16:18:59 -0700897 "../api/audio_codecs:audio_codecs_api",
Karl Wiberg5817d3d2018-04-06 10:06:42 +0200898 "../api/audio_codecs:builtin_audio_decoder_factory",
Jiawei Ouae810c12018-06-20 16:18:59 -0700899 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200900 "../api/video:video_frame",
Anders Carlsson7e042812017-10-05 16:55:38 +0200901 "../api/video_codecs:video_codecs_api",
Anders Carlssone5960ce2017-06-22 15:26:30 +0200902 "../common_video",
Bjorn Tereliusb8b3c992019-01-09 11:15:34 +0100903 "../logging:rtc_event_log_impl_base",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700904 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -0700905 "../modules:module_api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700906 "../modules/audio_device:audio_device_api",
Alessio Bazzicab768e882018-11-07 14:29:54 +0000907 "../modules/audio_processing:api",
Jiawei Ouae810c12018-06-20 16:18:59 -0700908 "../modules/audio_processing:audio_processing",
Patrik Höglund99175c62018-01-08 11:05:10 +0100909 "../modules/video_coding:video_codec_interface",
zhihuanga4c113a2017-06-28 14:05:44 -0700910 "../pc:peerconnection",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100911 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700912 "../rtc_base:rtc_base",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200913 "../system_wrappers:field_trial",
914 "../system_wrappers:metrics",
Mirko Bonadei879f7882018-07-11 09:18:37 +0200915 "//third_party/abseil-cpp/absl/memory",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700916 ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200917
918 if (is_ios) {
919 deps += [ ":native_api_audio_device_module" ]
920 }
kthelgasonebc34e72016-09-15 04:30:18 -0700921 }
Zeke Chindd0e1e02016-10-11 13:27:26 -0700922
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200923 # TODO(bugs.webrtc.org/9627): Remove this target.
924 rtc_source_set("legacy_header_paths") {
925 sources = [
926 "objc/Framework/Classes/Common/NSString+StdString.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200927 "objc/Framework/Classes/Common/scoped_cftyperef.h",
928 "objc/Framework/Classes/PeerConnection/RTCConfiguration+Native.h",
929 "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Native.h",
930 "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Native.h",
931 "objc/Framework/Classes/PeerConnection/RTCVideoCodec+Private.h",
932 "objc/Framework/Classes/Video/RTCDefaultShader.h",
933 "objc/Framework/Classes/Video/RTCNV12TextureCache.h",
934 "objc/Framework/Classes/VideoToolbox/nalu_rewriter.h",
935 "objc/Framework/Headers/WebRTC/RTCAudioSession.h",
936 "objc/Framework/Headers/WebRTC/RTCAudioSessionConfiguration.h",
937 "objc/Framework/Headers/WebRTC/RTCAudioSource.h",
938 "objc/Framework/Headers/WebRTC/RTCAudioTrack.h",
939 "objc/Framework/Headers/WebRTC/RTCCVPixelBuffer.h",
940 "objc/Framework/Headers/WebRTC/RTCCallbackLogger.h",
941 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
942 "objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h",
943 "objc/Framework/Headers/WebRTC/RTCCertificate.h",
944 "objc/Framework/Headers/WebRTC/RTCConfiguration.h",
945 "objc/Framework/Headers/WebRTC/RTCDataChannel.h",
946 "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h",
947 "objc/Framework/Headers/WebRTC/RTCDefaultVideoDecoderFactory.h",
948 "objc/Framework/Headers/WebRTC/RTCDefaultVideoEncoderFactory.h",
949 "objc/Framework/Headers/WebRTC/RTCDispatcher.h",
950 "objc/Framework/Headers/WebRTC/RTCDtmfSender.h",
951 "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
952 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h",
953 "objc/Framework/Headers/WebRTC/RTCFileLogger.h",
954 "objc/Framework/Headers/WebRTC/RTCFileVideoCapturer.h",
955 "objc/Framework/Headers/WebRTC/RTCH264ProfileLevelId.h",
956 "objc/Framework/Headers/WebRTC/RTCIceCandidate.h",
957 "objc/Framework/Headers/WebRTC/RTCIceServer.h",
958 "objc/Framework/Headers/WebRTC/RTCIntervalRange.h",
959 "objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h",
960 "objc/Framework/Headers/WebRTC/RTCLogging.h",
961 "objc/Framework/Headers/WebRTC/RTCMTLNSVideoView.h",
962 "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h",
963 "objc/Framework/Headers/WebRTC/RTCMacros.h",
964 "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h",
965 "objc/Framework/Headers/WebRTC/RTCMediaSource.h",
966 "objc/Framework/Headers/WebRTC/RTCMediaStream.h",
967 "objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h",
968 "objc/Framework/Headers/WebRTC/RTCMetrics.h",
969 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h",
970 "objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h",
971 "objc/Framework/Headers/WebRTC/RTCPeerConnection.h",
972 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h",
973 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactoryOptions.h",
974 "objc/Framework/Headers/WebRTC/RTCRtcpParameters.h",
975 "objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h",
976 "objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h",
977 "objc/Framework/Headers/WebRTC/RTCRtpHeaderExtension.h",
978 "objc/Framework/Headers/WebRTC/RTCRtpParameters.h",
979 "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h",
980 "objc/Framework/Headers/WebRTC/RTCRtpSender.h",
981 "objc/Framework/Headers/WebRTC/RTCRtpTransceiver.h",
982 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
983 "objc/Framework/Headers/WebRTC/RTCSessionDescription.h",
984 "objc/Framework/Headers/WebRTC/RTCTracing.h",
985 "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h",
986 "objc/Framework/Headers/WebRTC/RTCVideoCodec.h",
987 "objc/Framework/Headers/WebRTC/RTCVideoCodecFactory.h",
988 "objc/Framework/Headers/WebRTC/RTCVideoCodecH264.h",
989 "objc/Framework/Headers/WebRTC/RTCVideoCodecInfo.h",
990 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP8.h",
991 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP9.h",
992 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP8.h",
993 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP9.h",
994 "objc/Framework/Headers/WebRTC/RTCVideoFrame.h",
995 "objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.h",
996 "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h",
997 "objc/Framework/Headers/WebRTC/RTCVideoSource.h",
998 "objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
999 "objc/Framework/Headers/WebRTC/RTCVideoViewShading.h",
1000 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
1001 "objc/Framework/Native/api/audio_device_module.h",
1002 "objc/Framework/Native/api/video_decoder_factory.h",
1003 "objc/Framework/Native/api/video_encoder_factory.h",
1004 "objc/Framework/Native/api/video_frame_buffer.h",
1005 "objc/Framework/Native/src/objc_video_decoder_factory.h",
1006 "objc/Framework/Native/src/objc_video_encoder_factory.h",
1007 ]
1008 }
1009
mbonadei2c8ac1b2017-05-31 05:14:26 -07001010 if (rtc_include_tests) {
Daniela012b56b2017-11-15 13:15:24 +01001011 if (is_ios) {
Danielaae012cf2017-10-12 13:46:00 +02001012 rtc_source_set("sdk_unittests_sources") {
1013 testonly = true
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001014 include_dirs = [ "objc/" ]
Daniela012b56b2017-11-15 13:15:24 +01001015
Danielaae012cf2017-10-12 13:46:00 +02001016 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001017 "objc/unittests/ObjCVideoTrackSource_xctest.mm",
1018 "objc/unittests/RTCCVPixelBuffer_xctest.mm",
1019 "objc/unittests/RTCCallbackLogger_xctest.m",
1020 "objc/unittests/RTCFileVideoCapturer_xctest.mm",
1021 "objc/unittests/RTCH264ProfileLevelId_xctest.m",
Aaron Goldenfb4e9bc2019-01-04 12:03:31 -08001022 "objc/unittests/RTCNV12TextureCache_xctest.m",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001023 "objc/unittests/RTCPeerConnectionFactory_xctest.m",
1024 "objc/unittests/frame_buffer_helpers.h",
1025 "objc/unittests/frame_buffer_helpers.mm",
Artem Titarenko42b43152018-10-29 18:18:09 +01001026 "objc/unittests/nalu_rewriter_xctest.mm",
Danielaae012cf2017-10-12 13:46:00 +02001027 ]
Daniela012b56b2017-11-15 13:15:24 +01001028
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001029 # TODO(peterhanspers): Reenable these tests on simulator.
1030 # See bugs.webrtc.org/7812
1031 if (!use_ios_simulator) {
1032 sources += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001033 "objc/unittests/RTCAudioDeviceModule_xctest.mm",
1034 "objc/unittests/RTCAudioDevice_xctest.mm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001035 ]
1036 }
1037
Danielaae012cf2017-10-12 13:46:00 +02001038 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001039 ":audio_device",
1040 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001041 ":base_objc",
1042 ":callback_logger_objc",
Anders Carlssondc6b4772018-01-15 13:31:03 +01001043 ":framework_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001044 ":mediaconstraints_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001045 ":native_api",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001046 ":native_api_audio_device_module",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001047 ":native_video",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001048 ":peerconnectionfactory_base_objc",
Aaron Goldenfb4e9bc2019-01-04 12:03:31 -08001049 ":video_objc",
Artem Titarenko42b43152018-10-29 18:18:09 +01001050 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001051 ":videocapture_objc",
Anders Carlsson79ce8202018-06-01 12:51:09 +02001052 ":videocodec_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001053 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001054 ":videosource_objc",
Danielaae012cf2017-10-12 13:46:00 +02001055 ":videotoolbox_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001056 "../api/video:video_frame_i420",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001057 "../common_video:common_video",
Danielaae012cf2017-10-12 13:46:00 +02001058 "../media:rtc_media_base",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001059 "../media:rtc_media_tests_utils",
Danielaae012cf2017-10-12 13:46:00 +02001060 "../modules:module_api",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001061 "../rtc_base:gunit_helpers",
Danielaae012cf2017-10-12 13:46:00 +02001062 "../rtc_base:rtc_base",
Oleh Prypinda04e062018-07-23 10:04:12 +02001063 "../system_wrappers:system_wrappers",
Anders Carlssonfe9d8172018-04-03 11:40:39 +02001064 "//third_party/libyuv",
Danielaae012cf2017-10-12 13:46:00 +02001065 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001066
1067 if (rtc_use_metal_rendering) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001068 sources += [ "objc/unittests/RTCMTLVideoView_xctest.m" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001069 deps += [ ":metal_objc" ]
1070 }
1071
Danielaae012cf2017-10-12 13:46:00 +02001072 public_deps = [
1073 "//build/config/ios:xctest",
1074 "//third_party/ocmock",
1075 ]
1076 }
1077
Daniela012b56b2017-11-15 13:15:24 +01001078 bundle_data("sdk_unittests_bundle_data") {
Daniela012b56b2017-11-15 13:15:24 +01001079 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001080 "objc/unittests/audio_short16.pcm",
1081 "objc/unittests/audio_short44.pcm",
1082 "objc/unittests/audio_short48.pcm",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001083
1084 # Sample video taken from https://media.xiph.org/video/derf/
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001085 "objc/unittests/foreman.mp4",
Daniela012b56b2017-11-15 13:15:24 +01001086 ]
1087 outputs = [
1088 "{{bundle_resources_dir}}/{{source_file_part}}",
1089 ]
1090 }
1091
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001092 # These tests use static linking.
Danielaae012cf2017-10-12 13:46:00 +02001093 rtc_ios_xctest_test("sdk_unittests") {
1094 info_plist = "//test/ios/Info.plist"
1095 sources = [
Artem Titarenko34fc3462018-11-06 12:29:29 +01001096 "objc/unittests/main.mm",
Danielaae012cf2017-10-12 13:46:00 +02001097 ]
Daniela012b56b2017-11-15 13:15:24 +01001098
Danielaae012cf2017-10-12 13:46:00 +02001099 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
1100 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
1101 deps = [
Yura Yaroshevich5297bd22018-06-19 12:51:51 +03001102 ":peerconnectionfactory_base_objc",
Daniela012b56b2017-11-15 13:15:24 +01001103 ":sdk_unittests_bundle_data",
Danielaae012cf2017-10-12 13:46:00 +02001104 ":sdk_unittests_sources",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001105 "//test:test_support",
Danielaae012cf2017-10-12 13:46:00 +02001106 ]
1107 ldflags = [ "-all_load" ]
1108 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001109
1110 # These tests link to the framework.
1111 rtc_ios_xctest_test("sdk_framework_unittests") {
1112 info_plist = "//test/ios/Info.plist"
1113 sources = [
1114 "objc/unittests/RTCDoNotPutCPlusPlusInFrameworkHeaders_xctest.m",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001115 "objc/unittests/main.mm",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001116 ]
1117
1118 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
1119 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
1120 deps = [
1121 ":framework_objc+link",
1122 ":ios_framework_bundle",
Artem Titarenko34fc3462018-11-06 12:29:29 +01001123 "//test:test_support",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001124 ]
1125 }
Danielaae012cf2017-10-12 13:46:00 +02001126 }
1127
1128 # TODO(denicija): once all tests are migrated to xctest remove this source set.
Kári Tristan Helgason90143242018-07-27 12:34:54 +02001129 rtc_source_set("rtc_unittests_objc") {
mbonadei2c8ac1b2017-05-31 05:14:26 -07001130 testonly = true
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001131
mbonadei2c8ac1b2017-05-31 05:14:26 -07001132 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001133 "objc/unittests/RTCCertificateTest.mm",
1134 "objc/unittests/RTCConfigurationTest.mm",
1135 "objc/unittests/RTCDataChannelConfigurationTest.mm",
1136 "objc/unittests/RTCIceCandidateTest.mm",
1137 "objc/unittests/RTCIceServerTest.mm",
1138 "objc/unittests/RTCIntervalRangeTests.mm",
1139 "objc/unittests/RTCMediaConstraintsTest.mm",
1140 "objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm",
1141 "objc/unittests/RTCPeerConnectionTest.mm",
1142 "objc/unittests/RTCSessionDescriptionTest.mm",
1143 "objc/unittests/RTCTracingTest.mm",
1144 "objc/unittests/objc_video_decoder_factory_tests.mm",
1145 "objc/unittests/objc_video_encoder_factory_tests.mm",
1146 "objc/unittests/scoped_cftyperef_tests.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001147 ]
Anders Carlssone7dd83f2018-01-19 11:28:44 +01001148 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001149 sources += [ "objc/unittests/RTCCameraVideoCapturerTests.mm" ]
oprypin45197522017-06-22 01:47:20 -07001150 }
mbonadeid7620582017-05-30 01:50:35 -07001151
mbonadei2c8ac1b2017-05-31 05:14:26 -07001152 # |-ObjC| flag needed to make sure category method implementations
1153 # are included:
1154 # https://developer.apple.com/library/mac/qa/qa1490/_index.html
1155 ldflags = [ "-ObjC" ]
magjed3149e092017-05-08 05:32:05 -07001156
mbonadei2c8ac1b2017-05-31 05:14:26 -07001157 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001158 ":base_objc",
1159 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001160 ":mediaconstraints_objc",
1161 ":native_api",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001162 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001163 ":peerconnectionfactory_base_objc",
1164 ":video_objc",
1165 ":videocapture_objc",
1166 ":videocodec_objc",
1167 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001168 ":videosource_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001169 ":videotoolbox_objc",
Piotr (Peter) Slatalae0c2e972018-10-08 09:43:21 -07001170 "../api:libjingle_peerconnection_api",
Jiawei Ouae810c12018-06-20 16:18:59 -07001171 "../api/audio_codecs:audio_codecs_api",
1172 "../api/audio_codecs:builtin_audio_decoder_factory",
1173 "../api/audio_codecs:builtin_audio_encoder_factory",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001174 "../api/video_codecs:video_codecs_api",
kthelgasonebd4f792017-09-04 04:36:21 -07001175 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -07001176 "../modules:module_api",
Jiawei Ouae810c12018-06-20 16:18:59 -07001177 "../modules/audio_device:audio_device_api",
Alessio Bazzicab768e882018-11-07 14:29:54 +00001178 "../modules/audio_processing:api",
Jiawei Ouae810c12018-06-20 16:18:59 -07001179 "../modules/audio_processing:audio_processing",
Patrik Höglund99175c62018-01-08 11:05:10 +01001180 "../modules/video_coding:video_codec_interface",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001181 "../rtc_base:gunit_helpers",
Niels Möllera12c42a2018-07-25 16:05:48 +02001182 "../rtc_base/system:unused",
Yves Gerey21cddff2018-10-30 21:12:42 +01001183 "../test:test_support",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001184 "//third_party/ocmock",
1185 ]
magjed3149e092017-05-08 05:32:05 -07001186
denicija59ee91b2017-06-05 05:48:47 -07001187 if (is_ios) {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001188 sources += [ "objc/unittests/RTCAudioSessionTest.mm" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001189 deps += [ ":audio_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001190 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001191 }
kthelgason2f088792017-05-30 01:48:47 -07001192 }
1193
mbonadei2c8ac1b2017-05-31 05:14:26 -07001194 if (is_ios) {
Anders Carlssondc6b4772018-01-15 13:31:03 +01001195 ios_framework_bundle_with_umbrella_header("framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001196 info_plist = "objc/Info.plist"
mbonadei2c8ac1b2017-05-31 05:14:26 -07001197 output_name = "WebRTC"
Magnus Jedvertf83dc8b2017-08-29 09:49:43 +00001198
mbonadei2c8ac1b2017-05-31 05:14:26 -07001199 common_objc_headers = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001200 "objc/base/RTCCodecSpecificInfo.h",
1201 "objc/base/RTCEncodedImage.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001202 "objc/base/RTCI420Buffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001203 "objc/base/RTCLogging.h",
1204 "objc/base/RTCMacros.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001205 "objc/base/RTCMutableI420Buffer.h",
1206 "objc/base/RTCMutableYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001207 "objc/base/RTCRtpFragmentationHeader.h",
1208 "objc/base/RTCVideoCapturer.h",
1209 "objc/base/RTCVideoCodecInfo.h",
1210 "objc/base/RTCVideoDecoder.h",
1211 "objc/base/RTCVideoDecoderFactory.h",
1212 "objc/base/RTCVideoEncoder.h",
1213 "objc/base/RTCVideoEncoderFactory.h",
1214 "objc/base/RTCVideoEncoderQpThresholds.h",
1215 "objc/base/RTCVideoEncoderSettings.h",
1216 "objc/base/RTCVideoFrame.h",
1217 "objc/base/RTCVideoFrameBuffer.h",
1218 "objc/base/RTCVideoRenderer.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001219 "objc/base/RTCYUVPlanarBuffer.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001220 "objc/components/audio/RTCAudioSession.h",
1221 "objc/components/audio/RTCAudioSessionConfiguration.h",
1222 "objc/components/capturer/RTCCameraVideoCapturer.h",
1223 "objc/components/capturer/RTCFileVideoCapturer.h",
1224 "objc/components/renderer/metal/RTCMTLVideoView.h",
1225 "objc/components/renderer/opengl/RTCEAGLVideoView.h",
1226 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1227 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1228 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1229 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1230 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1231 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1232 "objc/components/video_codec/RTCVideoDecoderH264.h",
1233 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1234 "objc/components/video_codec/RTCVideoEncoderH264.h",
1235 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1236 "objc/helpers/RTCCameraPreviewView.h",
1237 "objc/helpers/RTCDispatcher.h",
1238 "objc/helpers/UIDevice+RTCDevice.h",
1239 "objc/api/peerconnection/RTCAudioSource.h",
1240 "objc/api/peerconnection/RTCAudioTrack.h",
1241 "objc/api/peerconnection/RTCConfiguration.h",
1242 "objc/api/peerconnection/RTCDataChannel.h",
1243 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1244 "objc/api/peerconnection/RTCFieldTrials.h",
1245 "objc/api/peerconnection/RTCIceCandidate.h",
1246 "objc/api/peerconnection/RTCIceServer.h",
1247 "objc/api/peerconnection/RTCIntervalRange.h",
1248 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1249 "objc/api/peerconnection/RTCMediaConstraints.h",
1250 "objc/api/peerconnection/RTCMediaSource.h",
1251 "objc/api/peerconnection/RTCMediaStream.h",
1252 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1253 "objc/api/peerconnection/RTCMetrics.h",
1254 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1255 "objc/api/peerconnection/RTCPeerConnection.h",
1256 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1257 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1258 "objc/api/peerconnection/RTCRtcpParameters.h",
1259 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1260 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1261 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1262 "objc/api/peerconnection/RTCRtpParameters.h",
1263 "objc/api/peerconnection/RTCRtpReceiver.h",
1264 "objc/api/peerconnection/RTCRtpSender.h",
1265 "objc/api/peerconnection/RTCRtpTransceiver.h",
1266 "objc/api/peerconnection/RTCDtmfSender.h",
1267 "objc/api/peerconnection/RTCSSLAdapter.h",
1268 "objc/api/peerconnection/RTCSessionDescription.h",
1269 "objc/api/peerconnection/RTCTracing.h",
1270 "objc/api/peerconnection/RTCCertificate.h",
Benjamin Wright8c27cca2018-10-25 10:16:44 -07001271 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001272 "objc/api/peerconnection/RTCVideoSource.h",
1273 "objc/api/peerconnection/RTCVideoTrack.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001274 "objc/api/video_codec/RTCVideoCodecConstants.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001275 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1276 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1277 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1278 "objc/api/video_codec/RTCVideoEncoderVP9.h",
Anders Carlsson4e5af962018-09-03 14:44:50 +02001279 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1280 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001281 ]
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001282
mbonadei2c8ac1b2017-05-31 05:14:26 -07001283 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001284 common_objc_headers += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001285 "objc/api/logging/RTCCallbackLogger.h",
1286 "objc/api/peerconnection/RTCFileLogger.h",
Anders Carlsson3b3364e2018-01-30 15:46:13 +01001287 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001288 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001289
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001290 sources = common_objc_headers
1291 public_headers = common_objc_headers
1292
mbonadei2c8ac1b2017-05-31 05:14:26 -07001293 ldflags = [
1294 "-all_load",
1295 "-install_name",
1296 "@rpath/$output_name.framework/$output_name",
1297 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001298
mbonadei2c8ac1b2017-05-31 05:14:26 -07001299 deps = [
kthelgason36d658d2017-08-24 05:43:45 -07001300 ":audio_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001301 ":base_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001302 ":default_codec_factory_objc",
1303 ":native_api",
1304 ":native_video",
1305 ":peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001306 ":ui_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001307 ":videocapture_objc",
1308 ":videocodec_objc",
1309 ":videotoolbox_objc",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001310 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001311 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001312 if (rtc_use_metal_rendering) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001313 deps += [ ":metal_objc" ]
1314 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001315 if (!build_with_chromium) {
1316 deps += [
1317 ":callback_logger_objc",
1318 ":file_logger_objc",
1319 ]
1320 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001321
mbonadei2c8ac1b2017-05-31 05:14:26 -07001322 libs = [
1323 "AVFoundation.framework",
1324 "CoreGraphics.framework",
1325 "CoreMedia.framework",
1326 "GLKit.framework",
1327 ]
1328
Anders Carlsson358f2e02018-06-04 10:24:37 +02001329 configs += [
1330 "..:common_objc",
1331 ":used_from_extension",
1332 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001333
kthelgason36d658d2017-08-24 05:43:45 -07001334 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001335 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001336
1337 bundle_data("ios_framework_bundle") {
1338 deps = [
1339 "../sdk:framework_objc",
1340 ]
1341 sources = [
1342 "$root_build_dir/WebRTC.framework",
1343 ]
1344 outputs = [
1345 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
1346 ]
1347 }
1348 }
1349
1350 if (is_mac) {
Anders Carlsson37bbf792018-09-05 16:29:27 +02001351 mac_framework_bundle_with_umbrella_header("mac_framework_objc") {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001352 info_plist = "objc/Info.plist"
1353 output_name = "WebRTC"
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001354
Anders Carlsson37bbf792018-09-05 16:29:27 +02001355 sources = [
1356 "objc/api/peerconnection/RTCAudioSource.h",
1357 "objc/api/peerconnection/RTCAudioTrack.h",
1358 "objc/api/peerconnection/RTCCertificate.h",
1359 "objc/api/peerconnection/RTCConfiguration.h",
Benjamin Wright8c27cca2018-10-25 10:16:44 -07001360 "objc/api/peerconnection/RTCCryptoOptions.h",
Anders Carlsson37bbf792018-09-05 16:29:27 +02001361 "objc/api/peerconnection/RTCDataChannel.h",
1362 "objc/api/peerconnection/RTCDataChannelConfiguration.h",
1363 "objc/api/peerconnection/RTCDtmfSender.h",
1364 "objc/api/peerconnection/RTCFieldTrials.h",
1365 "objc/api/peerconnection/RTCIceCandidate.h",
1366 "objc/api/peerconnection/RTCIceServer.h",
1367 "objc/api/peerconnection/RTCIntervalRange.h",
1368 "objc/api/peerconnection/RTCLegacyStatsReport.h",
1369 "objc/api/peerconnection/RTCMediaConstraints.h",
1370 "objc/api/peerconnection/RTCMediaSource.h",
1371 "objc/api/peerconnection/RTCMediaStream.h",
1372 "objc/api/peerconnection/RTCMediaStreamTrack.h",
1373 "objc/api/peerconnection/RTCMetrics.h",
1374 "objc/api/peerconnection/RTCMetricsSampleInfo.h",
1375 "objc/api/peerconnection/RTCPeerConnection.h",
1376 "objc/api/peerconnection/RTCPeerConnectionFactory.h",
1377 "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
1378 "objc/api/peerconnection/RTCRtcpParameters.h",
1379 "objc/api/peerconnection/RTCRtpCodecParameters.h",
1380 "objc/api/peerconnection/RTCRtpEncodingParameters.h",
1381 "objc/api/peerconnection/RTCRtpHeaderExtension.h",
1382 "objc/api/peerconnection/RTCRtpParameters.h",
1383 "objc/api/peerconnection/RTCRtpReceiver.h",
1384 "objc/api/peerconnection/RTCRtpSender.h",
1385 "objc/api/peerconnection/RTCRtpTransceiver.h",
1386 "objc/api/peerconnection/RTCSSLAdapter.h",
1387 "objc/api/peerconnection/RTCSessionDescription.h",
1388 "objc/api/peerconnection/RTCTracing.h",
1389 "objc/api/peerconnection/RTCVideoSource.h",
1390 "objc/api/peerconnection/RTCVideoTrack.h",
1391 "objc/api/video_codec/RTCVideoDecoderVP8.h",
1392 "objc/api/video_codec/RTCVideoDecoderVP9.h",
1393 "objc/api/video_codec/RTCVideoEncoderVP8.h",
1394 "objc/api/video_codec/RTCVideoEncoderVP9.h",
1395 "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
1396 "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
1397 "objc/base/RTCCodecSpecificInfo.h",
1398 "objc/base/RTCEncodedImage.h",
1399 "objc/base/RTCI420Buffer.h",
1400 "objc/base/RTCLogging.h",
1401 "objc/base/RTCMacros.h",
1402 "objc/base/RTCMutableI420Buffer.h",
1403 "objc/base/RTCMutableYUVPlanarBuffer.h",
1404 "objc/base/RTCRtpFragmentationHeader.h",
1405 "objc/base/RTCVideoCapturer.h",
1406 "objc/base/RTCVideoCodecInfo.h",
1407 "objc/base/RTCVideoDecoder.h",
1408 "objc/base/RTCVideoDecoderFactory.h",
1409 "objc/base/RTCVideoEncoder.h",
1410 "objc/base/RTCVideoEncoderFactory.h",
1411 "objc/base/RTCVideoEncoderQpThresholds.h",
1412 "objc/base/RTCVideoEncoderSettings.h",
1413 "objc/base/RTCVideoFrame.h",
1414 "objc/base/RTCVideoFrameBuffer.h",
1415 "objc/base/RTCVideoRenderer.h",
1416 "objc/base/RTCYUVPlanarBuffer.h",
1417 "objc/components/capturer/RTCCameraVideoCapturer.h",
1418 "objc/components/capturer/RTCFileVideoCapturer.h",
1419 "objc/components/renderer/metal/RTCMTLNSVideoView.h",
1420 "objc/components/renderer/opengl/RTCNSGLVideoView.h",
1421 "objc/components/renderer/opengl/RTCVideoViewShading.h",
1422 "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
1423 "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
1424 "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
1425 "objc/components/video_codec/RTCH264ProfileLevelId.h",
1426 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1427 "objc/components/video_codec/RTCVideoDecoderH264.h",
1428 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1429 "objc/components/video_codec/RTCVideoEncoderH264.h",
1430 "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
1431 "objc/helpers/RTCDispatcher.h",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001432 ]
Anders Carlsson37bbf792018-09-05 16:29:27 +02001433 if (!build_with_chromium) {
1434 sources += [
1435 "objc/api/logging/RTCCallbackLogger.h",
1436 "objc/api/peerconnection/RTCFileLogger.h",
1437 ]
1438 }
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001439
1440 deps = [
1441 ":base_objc",
1442 ":default_codec_factory_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001443 ":native_api",
1444 ":native_video",
1445 ":peerconnectionfactory_base_objc",
1446 ":ui_objc",
1447 ":videocapture_objc",
1448 ":videocodec_objc",
1449 ":videotoolbox_objc",
1450 "../rtc_base:rtc_base_approved",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001451 ]
1452 if (rtc_use_metal_rendering) {
1453 deps += [ ":metal_objc" ]
1454 }
1455 if (!build_with_chromium) {
1456 deps += [
1457 ":callback_logger_objc",
1458 ":file_logger_objc",
1459 ]
1460 }
1461
1462 libs = [
1463 "AVFoundation.framework",
1464 "CoreGraphics.framework",
1465 "CoreMedia.framework",
1466 "OpenGL.framework",
1467 ]
1468
Anders Carlsson37bbf792018-09-05 16:29:27 +02001469 configs = [ "..:common_objc" ]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001470
1471 public_configs = [ ":common_config_objc" ]
1472 }
1473
1474 bundle_data("mac_framework_bundle") {
1475 deps = [
1476 "../sdk:mac_framework_objc",
1477 ]
1478 sources = [
1479 "$root_build_dir/WebRTC.framework",
1480 ]
1481 outputs = [
Anders Carlsson24d8ec32018-12-10 14:04:12 +01001482 "{{bundle_contents_dir}}/Frameworks/{{source_file_part}}",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001483 ]
1484 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001485 }
1486
Anders Carlsson9823ee42018-03-07 10:32:03 +01001487 rtc_static_library("wrapped_native_codec_objc") {
1488 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001489 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.h",
1490 "objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm",
1491 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.h",
1492 "objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001493 ]
1494
1495 configs += [ "..:common_objc" ]
1496 public_configs = [ ":common_config_objc" ]
1497
Anders Carlsson9823ee42018-03-07 10:32:03 +01001498 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001499 ":base_objc",
1500 ":helpers_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001501 "../api/video_codecs:video_codecs_api",
1502 "../media:rtc_media_base",
1503 ]
1504 }
1505
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001506 # The native API is currently experimental and may change without notice.
1507 rtc_static_library("native_api") {
1508 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +01001509 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001510 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001511 "objc/native/api/video_capturer.h",
1512 "objc/native/api/video_capturer.mm",
1513 "objc/native/api/video_decoder_factory.h",
1514 "objc/native/api/video_decoder_factory.mm",
1515 "objc/native/api/video_encoder_factory.h",
1516 "objc/native/api/video_encoder_factory.mm",
1517 "objc/native/api/video_frame.h",
1518 "objc/native/api/video_frame.mm",
1519 "objc/native/api/video_frame_buffer.h",
1520 "objc/native/api/video_frame_buffer.mm",
1521 "objc/native/api/video_renderer.h",
1522 "objc/native/api/video_renderer.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001523 ]
1524
1525 configs += [ "..:common_objc" ]
1526
1527 public_configs = [ ":common_config_objc" ]
1528
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001529 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001530 ":base_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001531 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001532 ":videoframebuffer_objc",
Anders Carlsson73119182018-03-15 09:41:03 +01001533 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001534 "../api/video:video_frame",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001535 "../api/video_codecs:video_codecs_api",
1536 "../common_video",
1537 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +02001538 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001539 ]
1540 }
1541
1542 rtc_static_library("native_video") {
1543 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001544 "objc/native/src/objc_frame_buffer.h",
1545 "objc/native/src/objc_frame_buffer.mm",
1546 "objc/native/src/objc_video_decoder_factory.h",
1547 "objc/native/src/objc_video_decoder_factory.mm",
1548 "objc/native/src/objc_video_encoder_factory.h",
1549 "objc/native/src/objc_video_encoder_factory.mm",
1550 "objc/native/src/objc_video_frame.h",
1551 "objc/native/src/objc_video_frame.mm",
1552 "objc/native/src/objc_video_renderer.h",
1553 "objc/native/src/objc_video_renderer.mm",
1554 "objc/native/src/objc_video_track_source.h",
1555 "objc/native/src/objc_video_track_source.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001556 ]
1557
1558 configs += [ "..:common_objc" ]
1559
1560 public_configs = [ ":common_config_objc" ]
1561
1562 if (!build_with_chromium && is_clang) {
1563 # Suppress warnings from the Chromium Clang plugin
1564 # (bugs.webrtc.org/163).
1565 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1566 }
1567
1568 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001569 ":base_native_additions_objc",
1570 ":base_objc",
1571 ":helpers_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001572 ":videocodec_objc",
1573 ":videoframebuffer_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001574 ":vpx_codec_constants",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001575 ":wrapped_native_codec_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001576 "../api/video:video_frame",
1577 "../api/video:video_frame_i420",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001578 "../api/video_codecs:video_codecs_api",
1579 "../common_video",
1580 "../media:rtc_audio_video",
1581 "../media:rtc_media_base",
1582 "../modules:module_api",
1583 "../modules/video_coding:video_codec_interface",
1584 "../rtc_base:checks",
1585 "../rtc_base:rtc_base",
Mirko Bonadei879f7882018-07-11 09:18:37 +02001586 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001587 ]
1588 }
1589
mbonadeic0af5ac2017-08-24 12:26:05 -07001590 rtc_static_library("video_toolbox_cc") {
Artem Titarenko42b43152018-10-29 18:18:09 +01001591 visibility = [
1592 ":videotoolbox_objc",
1593 ":sdk_unittests_sources",
1594 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001595 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001596 "objc/components/video_codec/helpers.cc",
1597 "objc/components/video_codec/helpers.h",
1598 "objc/components/video_codec/nalu_rewriter.cc",
1599 "objc/components/video_codec/nalu_rewriter.h",
mbonadeic0af5ac2017-08-24 12:26:05 -07001600 ]
1601 deps = [
1602 "../common_video",
1603 "../modules:module_api",
1604 "../modules/video_coding:webrtc_h264",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001605 "../rtc_base:checks",
mbonadeic0af5ac2017-08-24 12:26:05 -07001606 "../rtc_base:rtc_base_approved",
1607 ]
mbonadeic0af5ac2017-08-24 12:26:05 -07001608 }
1609
1610 rtc_static_library("videotoolbox_objc") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001611 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +01001612 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
mbonadeic0af5ac2017-08-24 12:26:05 -07001613 sources = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001614 "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
1615 "objc/components/video_codec/RTCVideoDecoderFactoryH264.m",
1616 "objc/components/video_codec/RTCVideoDecoderH264.h",
1617 "objc/components/video_codec/RTCVideoDecoderH264.mm",
1618 "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
1619 "objc/components/video_codec/RTCVideoEncoderFactoryH264.m",
1620 "objc/components/video_codec/RTCVideoEncoderH264.h",
1621 "objc/components/video_codec/RTCVideoEncoderH264.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001622 ]
1623
Anders Carlsson358f2e02018-06-04 10:24:37 +02001624 configs += [
1625 "..:common_objc",
1626 ":used_from_extension",
1627 ]
1628
1629 if (is_ios && rtc_apprtcmobile_broadcast_extension) {
1630 defines = [ "RTC_APPRTCMOBILE_BROADCAST_EXTENSION" ]
1631 }
mbonadei2c8ac1b2017-05-31 05:14:26 -07001632
1633 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001634 ":base_native_additions_objc",
1635 ":base_objc",
1636 ":helpers_objc",
mbonadeic0af5ac2017-08-24 12:26:05 -07001637 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001638 ":videocodec_objc",
1639 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001640 "../common_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001641 "../modules:module_api",
Patrik Höglund99175c62018-01-08 11:05:10 +01001642 "../modules/video_coding:video_codec_interface",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001643 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001644 "../rtc_base:rtc_base_approved",
Mirko Bonadei401d0562017-12-14 11:24:00 +01001645 "//third_party/libyuv",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001646 ]
1647
1648 libs = [
1649 "CoreFoundation.framework",
1650 "CoreMedia.framework",
1651 "CoreVideo.framework",
1652 "VideoToolbox.framework",
1653 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001654 }
1655 }
tkchin9eeb6242016-04-27 01:54:20 -07001656}