blob: 3f70c75566b0b723cab647a2409a3faf78789fc8 [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}
tkchin9eeb6242016-04-27 01:54:20 -070014
kthelgason2f088792017-05-30 01:48:47 -070015declare_args() {
16 # Determine whether or not to include metal rendering
17 rtc_use_metal_rendering = is_mac || (is_ios && current_cpu == "arm64")
18}
19
kjellander6ceab082016-10-28 05:44:03 -070020group("sdk") {
Henrik Kjellandera7d0df72017-06-27 08:56:46 +020021 public_deps = []
22 if (!build_with_chromium) {
23 if (is_android) {
24 public_deps += [ "android" ]
25 }
26 if (is_ios) {
kthelgason36d658d2017-08-24 05:43:45 -070027 public_deps += [ ":framework_objc" ]
Henrik Kjellandera7d0df72017-06-27 08:56:46 +020028 }
kjellander6ceab082016-10-28 05:44:03 -070029 }
30}
31
kthelgasoncc2d1c62016-11-09 07:44:27 -080032if (is_ios || is_mac) {
kthelgason36d658d2017-08-24 05:43:45 -070033 config("common_config_objc") {
kjellander080a1e32016-05-25 11:37:11 -070034 include_dirs = [
35 "objc/Framework/Classes",
kthelgason2f088792017-05-30 01:48:47 -070036 "objc/Framework/Classes/Audio",
37 "objc/Framework/Classes/Common",
38 "objc/Framework/Classes/Metal",
39 "objc/Framework/Classes/PeerConnection",
40 "objc/Framework/Classes/UI",
41 "objc/Framework/Classes/Video",
42 "objc/Framework/Classes/VideoToolbox",
kjellander080a1e32016-05-25 11:37:11 -070043 "objc/Framework/Headers",
44 ]
Kári Tristan Helgason47d3a012017-10-24 15:28:51 +020045 cflags = [
46 "-Wstrict-overflow",
47 "-Wmissing-field-initializers",
48 ]
kjellander080a1e32016-05-25 11:37:11 -070049 }
50
kthelgason36d658d2017-08-24 05:43:45 -070051 rtc_static_library("common_objc") {
tkchin9eeb6242016-04-27 01:54:20 -070052 sources = [
kthelgason2f088792017-05-30 01:48:47 -070053 "objc/Framework/Classes/Common/NSString+StdString.h",
54 "objc/Framework/Classes/Common/NSString+StdString.mm",
55 "objc/Framework/Classes/Common/RTCDispatcher+Private.h",
56 "objc/Framework/Classes/Common/RTCDispatcher.m",
57 "objc/Framework/Classes/Common/RTCFieldTrials.mm",
58 "objc/Framework/Classes/Common/RTCLogging.mm",
Anders Carlssonfc309752017-06-12 14:16:20 +020059 "objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.h",
60 "objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.m",
kthelgason2f088792017-05-30 01:48:47 -070061 "objc/Framework/Classes/Common/helpers.h",
62 "objc/Framework/Classes/Common/helpers.mm",
Kári Tristan Helgasona17ddcd2017-09-28 19:28:52 +020063 "objc/Framework/Classes/Common/scoped_cftyperef.h",
tkchin9eeb6242016-04-27 01:54:20 -070064 "objc/Framework/Headers/WebRTC/RTCDispatcher.h",
65 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h",
66 "objc/Framework/Headers/WebRTC/RTCLogging.h",
67 "objc/Framework/Headers/WebRTC/RTCMacros.h",
tkchin9eeb6242016-04-27 01:54:20 -070068 ]
denicijad2088152017-04-28 02:14:54 -070069
mbonadei1e060c62017-04-21 00:02:02 -070070 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +010071 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -070072 "../rtc_base:rtc_base",
mbonadei1e060c62017-04-21 00:02:02 -070073 ]
kthelgasonc0977102017-04-24 00:57:16 -070074 configs += [ "..:common_objc" ]
75
kthelgason36d658d2017-08-24 05:43:45 -070076 public_configs = [ ":common_config_objc" ]
denicijad2088152017-04-28 02:14:54 -070077
kjellander3bcedd32016-06-08 01:14:15 -070078 if (is_ios) {
79 sources += [
kthelgason2f088792017-05-30 01:48:47 -070080 "objc/Framework/Classes/Common/UIDevice+RTCDevice.mm",
tkchind7629102016-07-28 14:52:55 -070081 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
kjellander3bcedd32016-06-08 01:14:15 -070082 ]
denicijad2088152017-04-28 02:14:54 -070083 }
84
kthelgason2f088792017-05-30 01:48:47 -070085 if (!build_with_chromium) {
denicijad2088152017-04-28 02:14:54 -070086 sources += [
Anders Carlsson3b3364e2018-01-30 15:46:13 +010087 "objc/Framework/Classes/Common/RTCCallbackLogger.mm",
kthelgason2f088792017-05-30 01:48:47 -070088 "objc/Framework/Classes/Common/RTCFileLogger.mm",
Anders Carlsson3b3364e2018-01-30 15:46:13 +010089 "objc/Framework/Headers/WebRTC/RTCCallbackLogger.h",
kthelgason2f088792017-05-30 01:48:47 -070090 "objc/Framework/Headers/WebRTC/RTCFileLogger.h",
91 ]
92 }
93 }
94
mbonadei2c8ac1b2017-05-31 05:14:26 -070095 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +010096 if (is_ios) {
Peter Hanspers8d95e3b2018-05-15 10:22:36 +020097 rtc_static_library("native_api_audio_device_module") {
98 visibility = [ "*" ]
99
100 sources = [
101 "objc/Framework/Native/api/audio_device_module.h",
102 "objc/Framework/Native/api/audio_device_module.mm",
103 ]
104
105 deps = [
106 ":audio_device",
107 "../modules/audio_device:audio_device_api",
108 "../modules/audio_device:audio_device_generic",
109 "../rtc_base:checks",
110 "../rtc_base:rtc_base_approved",
111 "../system_wrappers",
112 "../system_wrappers:metrics_api",
113 ]
114
115 if (is_clang) {
116 # Suppress warnings from the Chromium Clang plugin
117 # (bugs.webrtc.org/163).
118 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
119 }
120 }
121
122 rtc_source_set("audio_session_observer") {
123 visibility = [ ":*" ]
124
125 sources = [
126 "objc/Framework/Native/src/audio/audio_session_observer.h",
127 ]
128
129 deps = [
130 "../rtc_base:rtc_base",
131 ]
132 }
133
134 rtc_static_library("audio_device") {
135 visibility = [ "*" ]
136
137 sources = [
138 "objc/Framework/Native/src/audio/audio_device_ios.h",
139 "objc/Framework/Native/src/audio/audio_device_ios.mm",
140 "objc/Framework/Native/src/audio/audio_device_module_ios.h",
141 "objc/Framework/Native/src/audio/audio_device_module_ios.mm",
142 "objc/Framework/Native/src/audio/voice_processing_audio_unit.h",
143 "objc/Framework/Native/src/audio/voice_processing_audio_unit.mm",
144 ]
145
146 deps = [
147 ":audio_objc",
148 ":audio_session_observer",
149 ":common_objc",
150 "../api:array_view",
151 "../modules/audio_device:audio_device_api",
152 "../modules/audio_device:audio_device_buffer",
153 "../modules/audio_device:audio_device_generic",
154 "../rtc_base:checks",
155 "../rtc_base:rtc_base",
156 "../rtc_base/system:fallthrough",
157 "../sdk:common_objc",
158 "../system_wrappers:metrics_api",
159 ]
160
161 if (is_clang) {
162 # Suppress warnings from the Chromium Clang plugin
163 # (bugs.webrtc.org/163).
164 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
165 }
166 }
167
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100168 rtc_static_library("audio_objc") {
169 sources = [
170 "objc/Framework/Classes/Audio/RTCAudioSession+Configuration.mm",
171 "objc/Framework/Classes/Audio/RTCAudioSession+Private.h",
172 "objc/Framework/Classes/Audio/RTCAudioSession.mm",
173 "objc/Framework/Classes/Audio/RTCAudioSessionConfiguration.m",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200174 "objc/Framework/Classes/Audio/RTCNativeAudioSessionDelegateAdapter.h",
175 "objc/Framework/Classes/Audio/RTCNativeAudioSessionDelegateAdapter.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100176 "objc/Framework/Headers/WebRTC/RTCAudioSession.h",
177 "objc/Framework/Headers/WebRTC/RTCAudioSessionConfiguration.h",
178 ]
179 configs += [ "..:common_objc" ]
denicija59ee91b2017-06-05 05:48:47 -0700180
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100181 public_configs = [ ":common_config_objc" ]
Anders Carlsson8ecfd802017-09-15 14:07:30 +0200182
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100183 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200184 ":audio_session_observer",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100185 ":common_objc",
186 "../rtc_base:checks",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200187 "../rtc_base:rtc_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100188 "../rtc_base:rtc_base_approved",
189 ]
denicija59ee91b2017-06-05 05:48:47 -0700190
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100191 if (is_clang) {
192 # Suppress warnings from the Chromium Clang plugin
193 # (bugs.webrtc.org/163).
194 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
195 }
denicija59ee91b2017-06-05 05:48:47 -0700196 }
197 }
zhihuanga4c113a2017-06-28 14:05:44 -0700198
Anders Carlsson9823ee42018-03-07 10:32:03 +0100199 rtc_static_library("videosource_objc") {
zhihuanga4c113a2017-06-28 14:05:44 -0700200 sources = [
Anders Carlsson9823ee42018-03-07 10:32:03 +0100201 "objc/Framework/Classes/PeerConnection/RTCVideoSource+Private.h",
202 "objc/Framework/Classes/PeerConnection/RTCVideoSource.mm",
203 "objc/Framework/Headers/WebRTC/RTCVideoSource.h",
zhihuanga4c113a2017-06-28 14:05:44 -0700204 ]
205
206 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700207 ":common_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100208 ":mediasource_objc",
209 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100210 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700211 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200212 "../api/video:video_frame",
213 "../api/video:video_frame_i420",
zhihuanga4c113a2017-06-28 14:05:44 -0700214 "../common_video",
215 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100216 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700217 "../rtc_base:rtc_base",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100218 "//third_party/libyuv",
zhihuanga4c113a2017-06-28 14:05:44 -0700219 ]
220
221 configs += [ "..:common_objc" ]
222 if (!build_with_chromium && is_clang) {
223 # Suppress warnings from the Chromium Clang plugin
224 # (bugs.webrtc.org/163).
225 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
226 }
227 }
228
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100229 rtc_static_library("videoframebuffer_objc") {
230 sources = [
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100231 "objc/Framework/Classes/PeerConnection/RTCVideoFrame.mm",
232 "objc/Framework/Classes/Video/RTCCVPixelBuffer.mm",
233 "objc/Framework/Classes/Video/RTCI420Buffer+Private.h",
234 "objc/Framework/Classes/Video/RTCI420Buffer.mm",
235 "objc/Framework/Headers/WebRTC/RTCVideoFrame.h",
236 "objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.h",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100237 ]
238 deps = [
239 ":common_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200240 "//api/video:video_frame",
241 "//api/video:video_frame_i420",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100242 "//common_video",
243 "//rtc_base:checks",
244 "//rtc_base:rtc_base_approved",
245 "//third_party/libyuv",
246 ]
247 configs += [ "..:common_objc" ]
248 }
249
kthelgason36d658d2017-08-24 05:43:45 -0700250 rtc_static_library("video_objc") {
kthelgason2f088792017-05-30 01:48:47 -0700251 sources = [
jtteh3b673c62017-07-25 15:48:39 -0700252 "objc/Framework/Classes/Video/AVCaptureSession+DevicePosition.h",
253 "objc/Framework/Classes/Video/AVCaptureSession+DevicePosition.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700254 "objc/Framework/Classes/Video/RTCDefaultShader.h",
255 "objc/Framework/Classes/Video/RTCDefaultShader.mm",
256 "objc/Framework/Classes/Video/RTCI420TextureCache.h",
257 "objc/Framework/Classes/Video/RTCI420TextureCache.mm",
258 "objc/Framework/Classes/Video/RTCOpenGLDefines.h",
259 "objc/Framework/Classes/Video/RTCShader.h",
260 "objc/Framework/Classes/Video/RTCShader.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100261 "objc/Framework/Headers/WebRTC/RTCVideoViewShading.h",
kthelgason2f088792017-05-30 01:48:47 -0700262 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700263 libs = []
denicijad2088152017-04-28 02:14:54 -0700264 if (is_ios) {
denicija070d5e32017-02-26 11:44:13 -0800265 sources += [
mbonadei2c8ac1b2017-05-31 05:14:26 -0700266 "objc/Framework/Classes/Video/RTCNV12TextureCache.h",
267 "objc/Framework/Classes/Video/RTCNV12TextureCache.m",
268 ]
269 libs += [
270 "GLKit.framework",
271 "OpenGLES.framework",
272 "QuartzCore.framework",
273 ]
274 } else if (is_mac) {
mbonadei2c8ac1b2017-05-31 05:14:26 -0700275 libs += [
276 "CoreMedia.framework",
277 "CoreVideo.framework",
278 "OpenGL.framework",
denicija070d5e32017-02-26 11:44:13 -0800279 ]
280 }
mbonadei2c8ac1b2017-05-31 05:14:26 -0700281
kthelgason2f088792017-05-30 01:48:47 -0700282 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700283 ":common_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100284 ":mediaconstraints_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100285 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100286 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100287 ":videosource_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700288 "../api:libjingle_peerconnection_api",
kwiberg84f6a3f2017-09-05 08:43:13 -0700289 "../api:optional",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200290 "../api/video:video_frame",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700291 "../common_video",
292 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100293 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700294 "../rtc_base:rtc_base",
tkchin9eeb6242016-04-27 01:54:20 -0700295 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700296
kthelgason2f088792017-05-30 01:48:47 -0700297 configs += [ "..:common_objc" ]
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800298 if (!build_with_chromium && is_clang) {
zhihuanga4c113a2017-06-28 14:05:44 -0700299 # Suppress warnings from the Chromium Clang plugin
300 # (bugs.webrtc.org/163).
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800301 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
302 }
303 }
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800304
kthelgason36d658d2017-08-24 05:43:45 -0700305 rtc_static_library("ui_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000306 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200307 allow_poison = [
308 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
309 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
310 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700311 if (is_ios) {
312 sources = [
313 "objc/Framework/Classes/UI/RTCCameraPreviewView.m",
314 "objc/Framework/Classes/UI/RTCEAGLVideoView.m",
315 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
316 "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
317 ]
318 }
319 if (is_mac) {
320 sources = [
321 "objc/Framework/Classes/UI/RTCNSGLVideoView.m",
322 "objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h",
323 ]
324 }
325 configs += [ "..:common_objc" ]
326 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700327 ":common_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100328 ":video_objc",
329 ":videocapture_objc",
330 ":videoframebuffer_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700331 ]
332 }
kthelgasonebc34e72016-09-15 04:30:18 -0700333
mbonadei2c8ac1b2017-05-31 05:14:26 -0700334 if (rtc_use_metal_rendering) {
kthelgason36d658d2017-08-24 05:43:45 -0700335 rtc_static_library("metal_objc") {
Mirko Bonadeid68956d2018-02-16 17:55:36 +0100336 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200337 allow_poison = [
338 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
339 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
340 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700341 sources = [
342 "objc/Framework/Classes/Metal/RTCMTLI420Renderer.h",
343 "objc/Framework/Classes/Metal/RTCMTLI420Renderer.mm",
344 "objc/Framework/Classes/Metal/RTCMTLRenderer+Private.h",
345 "objc/Framework/Classes/Metal/RTCMTLRenderer.h",
346 "objc/Framework/Classes/Metal/RTCMTLRenderer.mm",
347 ]
348 if (is_ios) {
349 sources += [
350 "objc/Framework/Classes/Metal/RTCMTLNV12Renderer.h",
351 "objc/Framework/Classes/Metal/RTCMTLNV12Renderer.mm",
Peter Hanspers1c62b982018-05-03 14:06:04 +0200352 "objc/Framework/Classes/Metal/RTCMTLRGBRenderer.h",
353 "objc/Framework/Classes/Metal/RTCMTLRGBRenderer.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700354 "objc/Framework/Classes/Metal/RTCMTLVideoView.m",
355 "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h",
356 ]
357 }
358 if (is_mac) {
359 sources += [
360 "objc/Framework/Classes/Metal/RTCMTLNSVideoView.m",
361 "objc/Framework/Headers/WebRTC/RTCMTLNSVideoView.h",
362 ]
363 }
364 libs = [
365 "CoreVideo.framework",
366 "Metal.framework",
367 "MetalKit.framework",
368 ]
369 deps = [
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100370 ":common_objc",
371 ":peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700372 ":video_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100373 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100374 ":videorenderer_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200375 "../api/video:video_frame",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100376 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700377 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700378 ]
379 configs += [ "..:common_objc" ]
kthelgason36d658d2017-08-24 05:43:45 -0700380 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700381 }
382 }
383
Anders Carlsson73119182018-03-15 09:41:03 +0100384 rtc_static_library("videocapturebase_objc") {
385 visibility = [ "*" ]
386 sources = [
387 "objc/Framework/Classes/PeerConnection/RTCVideoCapturer.m",
388 "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h",
389 ]
390 libs = [ "AVFoundation.framework" ]
391
392 configs += [ "..:common_objc" ]
393
394 public_configs = [ ":common_config_objc" ]
395
396 deps = [
397 ":common_objc",
398 ":videoframebuffer_objc",
399 ]
400 }
401
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100402 rtc_static_library("videocapture_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000403 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200404 allow_poison = [
405 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
406 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
407 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700408 sources = [
zhihuanga4c113a2017-06-28 14:05:44 -0700409 "objc/Framework/Classes/PeerConnection/RTCCameraVideoCapturer.m",
410 "objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h",
411 ]
412 if (is_ios) {
413 sources += [
zhihuanga4c113a2017-06-28 14:05:44 -0700414 "objc/Framework/Classes/PeerConnection/RTCFileVideoCapturer.m",
Daniela012b56b2017-11-15 13:15:24 +0100415 "objc/Framework/Headers/WebRTC/RTCFileVideoCapturer.h",
zhihuanga4c113a2017-06-28 14:05:44 -0700416 ]
417 }
418 libs = [ "AVFoundation.framework" ]
419
zhihuanga4c113a2017-06-28 14:05:44 -0700420 configs += [ "..:common_objc" ]
421
kthelgason36d658d2017-08-24 05:43:45 -0700422 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700423
424 if (!build_with_chromium && is_clang) {
425 # Suppress warnings from the Chromium Clang plugin
426 # (bugs.webrtc.org/163).
427 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
428 }
429
430 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700431 ":common_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700432 ":video_objc",
Anders Carlsson73119182018-03-15 09:41:03 +0100433 ":videocapturebase_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100434 ":videoframebuffer_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700435 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700436 }
437
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100438 rtc_static_library("videocodec_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200439 visibility = [ "*" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100440 sources = [
441 "objc/Framework/Classes/PeerConnection/RTCEncodedImage.mm",
442 "objc/Framework/Classes/PeerConnection/RTCRtpFragmentationHeader.mm",
443 "objc/Framework/Classes/PeerConnection/RTCVideoCodec+Private.h",
444 "objc/Framework/Classes/PeerConnection/RTCVideoCodec.mm",
kthelgasonfb143122017-07-25 07:55:58 -0700445 "objc/Framework/Classes/PeerConnection/RTCVideoCodecH264.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100446 "objc/Framework/Classes/PeerConnection/RTCVideoEncoderSettings.mm",
447 "objc/Framework/Headers/WebRTC/RTCVideoCodec.h",
448 "objc/Framework/Headers/WebRTC/RTCVideoCodecFactory.h",
449 "objc/Framework/Headers/WebRTC/RTCVideoCodecH264.h",
zhihuanga4c113a2017-06-28 14:05:44 -0700450 ]
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300451 if (is_ios) {
452 sources += [
453 "objc/Framework/Classes/Video/UIDevice+H264Profile.h",
454 "objc/Framework/Classes/Video/UIDevice+H264Profile.mm",
455 ]
456 }
zhihuanga4c113a2017-06-28 14:05:44 -0700457 if (!build_with_chromium && is_clang) {
458 # Suppress warnings from the Chromium Clang plugin
459 # (bugs.webrtc.org/163).
460 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
461 }
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100462 public_configs = [ ":common_config_objc" ]
463 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700464 ":common_objc",
kthelgasonfb143122017-07-25 07:55:58 -0700465 "../api/video_codecs:video_codecs_api",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100466 "../common_video",
Yura Yaroshevich0f77fea2018-04-26 15:41:01 +0300467 "../media:rtc_h264_profile_id",
zhihuanga4c113a2017-06-28 14:05:44 -0700468 "../media:rtc_media_base",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100469 "../modules:module_api",
470 "../modules/video_coding:video_codec_interface",
471 "../rtc_base:rtc_base_approved",
kthelgasonfb143122017-07-25 07:55:58 -0700472 "../system_wrappers:field_trial_api",
zhihuanga4c113a2017-06-28 14:05:44 -0700473 ]
474 }
475
Anders Carlssondd8c1652018-01-30 10:32:13 +0100476 rtc_static_library("default_codec_factory_objc") {
477 sources = [
478 "objc/Framework/Classes/PeerConnection/RTCDefaultVideoDecoderFactory.m",
479 "objc/Framework/Classes/PeerConnection/RTCDefaultVideoEncoderFactory.m",
480 ]
481
482 deps = [
483 ":common_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100484 ":native_video",
485 ":videocodec_objc",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +0200486 ":vp8",
487 ":vp9",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100488 ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100489 }
490
491 rtc_static_library("vp8") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100492 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200493 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100494 sources = [
495 "objc/Framework/Classes/PeerConnection/RTCVideoCodecVP8.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100496 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP8.h",
497 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP8.h",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100498 ]
499
500 if (!build_with_chromium && is_clang) {
501 # Suppress warnings from the Chromium Clang plugin
502 # (bugs.webrtc.org/163).
503 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
504 }
505
506 deps = [
Anders Carlsson9823ee42018-03-07 10:32:03 +0100507 ":wrapped_native_codec_objc",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100508 "../modules/video_coding:webrtc_vp8",
509 "../system_wrappers:metrics_default",
510 ]
511 }
512
513 rtc_static_library("vp9") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100514 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200515 allow_poison = [ "software_video_codecs" ]
Anders Carlssondd8c1652018-01-30 10:32:13 +0100516 sources = [
517 "objc/Framework/Classes/PeerConnection/RTCVideoCodecVP9.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100518 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP9.h",
519 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP9.h",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100520 ]
521
522 if (!build_with_chromium && is_clang) {
523 # Suppress warnings from the Chromium Clang plugin
524 # (bugs.webrtc.org/163).
525 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
526 }
527
528 deps = [
Anders Carlsson9823ee42018-03-07 10:32:03 +0100529 ":wrapped_native_codec_objc",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100530 "../modules/video_coding:webrtc_vp9",
531 "../system_wrappers:metrics_default",
532 ]
533 }
534
zhihuanga4c113a2017-06-28 14:05:44 -0700535 # Build the PeerConnectionFactory without audio/video support.
536 # This target depends on the objc_peeerconnectionfactory_base which still
537 # includes some audio/video related objects such as RTCAudioSource because
538 # these objects are just thin wrappers of native C++ interfaces required
539 # when implementing webrtc::PeerConnectionFactoryInterface and
540 # webrtc::PeerConnectionInterface.
Kári Tristan Helgasona2d89fc2018-03-06 10:18:43 +0100541 # The applications which only use WebRTC DataChannel can depend on this.
kthelgason36d658d2017-08-24 05:43:45 -0700542 rtc_static_library("peerconnectionfactory_no_media_objc") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000543 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200544 allow_poison = [
545 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
546 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
547 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700548 defines = [ "HAVE_NO_MEDIA" ]
549
550 sources = [
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100551 "objc/Framework/Classes/Common/noop.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700552 ]
553
kthelgason36d658d2017-08-24 05:43:45 -0700554 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700555
556 if (!build_with_chromium && is_clang) {
557 # Suppress warnings from the Chromium Clang plugin
558 # (bugs.webrtc.org/163).
559 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
560 }
561
562 deps = [
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100563 ":native_api",
564 ":native_video",
kthelgason36d658d2017-08-24 05:43:45 -0700565 ":peerconnectionfactory_base_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700566 "../api:libjingle_peerconnection_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700567 "../rtc_base:rtc_base",
zhihuanga4c113a2017-06-28 14:05:44 -0700568 ]
569 }
570
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100571 rtc_static_library("mediaconstraints_objc") {
572 sources = [
573 "objc/Framework/Classes/PeerConnection/RTCMediaConstraints+Private.h",
574 "objc/Framework/Classes/PeerConnection/RTCMediaConstraints.mm",
575 "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h",
576 ]
577 if (!build_with_chromium && is_clang) {
578 # Suppress warnings from the Chromium Clang plugin
579 # (bugs.webrtc.org/163).
580 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
581 }
582
583 public_configs = [ ":common_config_objc" ]
584 deps = [
585 ":common_objc",
586 "../api:libjingle_peerconnection_api",
587 ]
588 }
589
Anders Carlsson9823ee42018-03-07 10:32:03 +0100590 rtc_source_set("videorenderer_objc") {
591 sources = [
592 "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h",
593 ]
594
595 configs += [ "..:common_objc" ]
596 visibility = [ "*" ]
597 public_configs = [ ":common_config_objc" ]
598 }
599
600 rtc_static_library("videorendereradapter_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200601 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200602 allow_poison = [
603 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
604 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
605 ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100606 sources = [
607 "objc/Framework/Classes/PeerConnection/RTCVideoRendererAdapter+Private.h",
608 "objc/Framework/Classes/PeerConnection/RTCVideoRendererAdapter.h",
609 "objc/Framework/Classes/PeerConnection/RTCVideoRendererAdapter.mm",
610 ]
611
612 configs += [ "..:common_objc" ]
Anders Carlsson9823ee42018-03-07 10:32:03 +0100613 public_configs = [ ":common_config_objc" ]
614
615 deps = [
616 ":common_objc",
617 ":native_api",
618 ":videoframebuffer_objc",
619 ":videorenderer_objc",
620 "../api:libjingle_peerconnection_api",
621 ]
622 }
623
624 rtc_static_library("mediasource_objc") {
625 sources = [
626 "objc/Framework/Classes/PeerConnection/RTCMediaSource+Private.h",
627 "objc/Framework/Classes/PeerConnection/RTCMediaSource.mm",
628 "objc/Framework/Headers/WebRTC/RTCMediaSource.h",
629 ]
630
631 configs += [ "..:common_objc" ]
632 public_configs = [ ":common_config_objc" ]
633
634 deps = [
635 ":common_objc",
636 "../api:libjingle_peerconnection_api",
637 "../rtc_base:checks",
638 ]
639 }
640
kthelgason36d658d2017-08-24 05:43:45 -0700641 rtc_static_library("peerconnectionfactory_base_objc") {
Karl Wibergbb23c832018-04-22 19:55:00 +0200642 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200643 allow_poison = [
644 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
645 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
646 ]
zhihuanga4c113a2017-06-28 14:05:44 -0700647 sources = [
mbonadei2c8ac1b2017-05-31 05:14:26 -0700648 "objc/Framework/Classes/PeerConnection/RTCAudioSource+Private.h",
649 "objc/Framework/Classes/PeerConnection/RTCAudioSource.mm",
650 "objc/Framework/Classes/PeerConnection/RTCAudioTrack+Private.h",
651 "objc/Framework/Classes/PeerConnection/RTCAudioTrack.mm",
Zeke Chinef1140e2017-10-27 15:42:08 -0700652 "objc/Framework/Classes/PeerConnection/RTCConfiguration+Native.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700653 "objc/Framework/Classes/PeerConnection/RTCConfiguration+Private.h",
654 "objc/Framework/Classes/PeerConnection/RTCConfiguration.mm",
655 "objc/Framework/Classes/PeerConnection/RTCDataChannel+Private.h",
656 "objc/Framework/Classes/PeerConnection/RTCDataChannel.mm",
657 "objc/Framework/Classes/PeerConnection/RTCDataChannelConfiguration+Private.h",
658 "objc/Framework/Classes/PeerConnection/RTCDataChannelConfiguration.mm",
Yura Yaroshevich27676322018-01-02 14:44:35 +0300659 "objc/Framework/Classes/PeerConnection/RTCDtmfSender+Private.h",
660 "objc/Framework/Classes/PeerConnection/RTCDtmfSender.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700661 "objc/Framework/Classes/PeerConnection/RTCIceCandidate+Private.h",
662 "objc/Framework/Classes/PeerConnection/RTCIceCandidate.mm",
663 "objc/Framework/Classes/PeerConnection/RTCIceServer+Private.h",
664 "objc/Framework/Classes/PeerConnection/RTCIceServer.mm",
Steve Antond295e402017-07-14 16:06:41 -0700665 "objc/Framework/Classes/PeerConnection/RTCIntervalRange+Private.h",
666 "objc/Framework/Classes/PeerConnection/RTCIntervalRange.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700667 "objc/Framework/Classes/PeerConnection/RTCLegacyStatsReport+Private.h",
668 "objc/Framework/Classes/PeerConnection/RTCLegacyStatsReport.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700669 "objc/Framework/Classes/PeerConnection/RTCMediaStream+Private.h",
670 "objc/Framework/Classes/PeerConnection/RTCMediaStream.mm",
671 "objc/Framework/Classes/PeerConnection/RTCMediaStreamTrack+Private.h",
672 "objc/Framework/Classes/PeerConnection/RTCMediaStreamTrack.mm",
673 "objc/Framework/Classes/PeerConnection/RTCMetrics.mm",
674 "objc/Framework/Classes/PeerConnection/RTCMetricsSampleInfo+Private.h",
675 "objc/Framework/Classes/PeerConnection/RTCMetricsSampleInfo.mm",
676 "objc/Framework/Classes/PeerConnection/RTCPeerConnection+DataChannel.mm",
Magnus Jedvert0af86d12017-10-28 16:26:55 +0200677 "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Native.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700678 "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Private.h",
679 "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Stats.mm",
680 "objc/Framework/Classes/PeerConnection/RTCPeerConnection.mm",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100681 "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Native.h",
682 "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Private.h",
683 "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory.mm",
Yura Yaroshevichbf567122018-01-02 13:33:16 +0300684 "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactoryOptions+Private.h",
685 "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactoryOptions.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700686 "objc/Framework/Classes/PeerConnection/RTCRtpCodecParameters+Private.h",
687 "objc/Framework/Classes/PeerConnection/RTCRtpCodecParameters.mm",
688 "objc/Framework/Classes/PeerConnection/RTCRtpEncodingParameters+Private.h",
689 "objc/Framework/Classes/PeerConnection/RTCRtpEncodingParameters.mm",
690 "objc/Framework/Classes/PeerConnection/RTCRtpParameters+Private.h",
691 "objc/Framework/Classes/PeerConnection/RTCRtpParameters.mm",
692 "objc/Framework/Classes/PeerConnection/RTCRtpReceiver+Private.h",
693 "objc/Framework/Classes/PeerConnection/RTCRtpReceiver.mm",
694 "objc/Framework/Classes/PeerConnection/RTCRtpSender+Private.h",
695 "objc/Framework/Classes/PeerConnection/RTCRtpSender.mm",
Steve Anton8cb344a2018-02-27 15:34:53 -0800696 "objc/Framework/Classes/PeerConnection/RTCRtpTransceiver+Private.h",
697 "objc/Framework/Classes/PeerConnection/RTCRtpTransceiver.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700698 "objc/Framework/Classes/PeerConnection/RTCSSLAdapter.mm",
699 "objc/Framework/Classes/PeerConnection/RTCSessionDescription+Private.h",
700 "objc/Framework/Classes/PeerConnection/RTCSessionDescription.mm",
701 "objc/Framework/Classes/PeerConnection/RTCTracing.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700702 "objc/Framework/Classes/PeerConnection/RTCVideoTrack+Private.h",
703 "objc/Framework/Classes/PeerConnection/RTCVideoTrack.mm",
Kári Tristan Helgasonf93f5a42017-05-31 10:04:55 +0200704 "objc/Framework/Headers/WebRTC/RTCAudioSource.h",
705 "objc/Framework/Headers/WebRTC/RTCAudioTrack.h",
kthelgason5fe4d492016-12-05 11:27:30 -0800706 "objc/Framework/Headers/WebRTC/RTCConfiguration.h",
707 "objc/Framework/Headers/WebRTC/RTCDataChannel.h",
708 "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h",
Yura Yaroshevich27676322018-01-02 14:44:35 +0300709 "objc/Framework/Headers/WebRTC/RTCDtmfSender.h",
kthelgason5fe4d492016-12-05 11:27:30 -0800710 "objc/Framework/Headers/WebRTC/RTCIceCandidate.h",
711 "objc/Framework/Headers/WebRTC/RTCIceServer.h",
Steve Antond295e402017-07-14 16:06:41 -0700712 "objc/Framework/Headers/WebRTC/RTCIntervalRange.h",
kthelgason5fe4d492016-12-05 11:27:30 -0800713 "objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h",
kthelgason5fe4d492016-12-05 11:27:30 -0800714 "objc/Framework/Headers/WebRTC/RTCMediaStream.h",
715 "objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h",
716 "objc/Framework/Headers/WebRTC/RTCMetrics.h",
717 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h",
718 "objc/Framework/Headers/WebRTC/RTCPeerConnection.h",
719 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h",
Yura Yaroshevichbf567122018-01-02 13:33:16 +0300720 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactoryOptions.h",
kthelgason5fe4d492016-12-05 11:27:30 -0800721 "objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h",
722 "objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h",
723 "objc/Framework/Headers/WebRTC/RTCRtpParameters.h",
724 "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h",
725 "objc/Framework/Headers/WebRTC/RTCRtpSender.h",
Steve Anton8cb344a2018-02-27 15:34:53 -0800726 "objc/Framework/Headers/WebRTC/RTCRtpTransceiver.h",
kthelgason5fe4d492016-12-05 11:27:30 -0800727 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
728 "objc/Framework/Headers/WebRTC/RTCSessionDescription.h",
729 "objc/Framework/Headers/WebRTC/RTCTracing.h",
kthelgason5fe4d492016-12-05 11:27:30 -0800730 "objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
kthelgason5fe4d492016-12-05 11:27:30 -0800731 ]
kthelgasonebc34e72016-09-15 04:30:18 -0700732
kthelgasonc0977102017-04-24 00:57:16 -0700733 configs += [ "..:common_objc" ]
kthelgason36d658d2017-08-24 05:43:45 -0700734 public_configs = [ ":common_config_objc" ]
kthelgasonc0977102017-04-24 00:57:16 -0700735
kjellandere40a7ee2016-10-16 23:56:12 -0700736 if (!build_with_chromium && is_clang) {
zhihuanga4c113a2017-06-28 14:05:44 -0700737 # Suppress warnings from the Chromium Clang plugin
738 # (bugs.webrtc.org/163).
mbonadei2c8ac1b2017-05-31 05:14:26 -0700739 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
740 }
741
742 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700743 ":common_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100744 ":mediaconstraints_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100745 ":mediasource_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100746 ":native_api",
747 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100748 ":video_objc",
749 ":videocodec_objc",
750 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100751 ":videorenderer_objc",
752 ":videorendereradapter_objc",
753 ":videosource_objc",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100754 "../api:libjingle_peerconnection_api",
Karl Wiberg5817d3d2018-04-06 10:06:42 +0200755 "../api/audio_codecs:builtin_audio_decoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200756 "../api/video:video_frame",
Anders Carlsson7e042812017-10-05 16:55:38 +0200757 "../api/video_codecs:video_codecs_api",
Anders Carlssone5960ce2017-06-22 15:26:30 +0200758 "../common_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700759 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -0700760 "../modules:module_api",
Patrik Höglund99175c62018-01-08 11:05:10 +0100761 "../modules/video_coding:video_codec_interface",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100762 "../pc:create_pc_factory",
zhihuanga4c113a2017-06-28 14:05:44 -0700763 "../pc:peerconnection",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100764 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700765 "../rtc_base:rtc_base",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700766 ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200767
768 if (is_ios) {
769 deps += [ ":native_api_audio_device_module" ]
770 }
kthelgasonebc34e72016-09-15 04:30:18 -0700771 }
Zeke Chindd0e1e02016-10-11 13:27:26 -0700772
mbonadei2c8ac1b2017-05-31 05:14:26 -0700773 if (rtc_include_tests) {
Daniela012b56b2017-11-15 13:15:24 +0100774 if (is_ios) {
Danielaae012cf2017-10-12 13:46:00 +0200775 rtc_source_set("sdk_unittests_sources") {
776 testonly = true
777 include_dirs = [
778 "objc/Framework/Headers",
779 "objc/Framework/Classes",
780 ]
Daniela012b56b2017-11-15 13:15:24 +0100781
Danielaae012cf2017-10-12 13:46:00 +0200782 sources = [
Anders Carlssonfe9d8172018-04-03 11:40:39 +0200783 "objc/Framework/UnitTests/ObjCVideoTrackSource_xctest.mm",
784 "objc/Framework/UnitTests/RTCCVPixelBuffer_xctest.mm",
Anders Carlsson3b3364e2018-01-30 15:46:13 +0100785 "objc/Framework/UnitTests/RTCCallbackLogger_xctest.m",
Peter Hanspers8020ae82018-01-09 14:26:41 +0100786 "objc/Framework/UnitTests/RTCDoNotPutCPlusPlusInFrameworkHeaders_xctest.m",
Daniela012b56b2017-11-15 13:15:24 +0100787 "objc/Framework/UnitTests/RTCFileVideoCapturer_xctest.mm",
Anders Carlssonfe9d8172018-04-03 11:40:39 +0200788 "objc/Framework/UnitTests/frame_buffer_helpers.h",
789 "objc/Framework/UnitTests/frame_buffer_helpers.mm",
Danielaae012cf2017-10-12 13:46:00 +0200790 ]
Daniela012b56b2017-11-15 13:15:24 +0100791
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200792 # TODO(peterhanspers): Reenable these tests on simulator.
793 # See bugs.webrtc.org/7812
794 if (!use_ios_simulator) {
795 sources += [
796 "objc/Framework/UnitTests/RTCAudioDeviceModule_xctest.mm",
797 "objc/Framework/UnitTests/RTCAudioDevice_xctest.mm",
798 ]
799 }
800
Danielaae012cf2017-10-12 13:46:00 +0200801 deps = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200802 ":audio_device",
803 ":audio_objc",
Danielaae012cf2017-10-12 13:46:00 +0200804 ":common_objc",
Anders Carlssondc6b4772018-01-15 13:31:03 +0100805 ":framework_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +0200806 ":native_api",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200807 ":native_api_audio_device_module",
Anders Carlssonfe9d8172018-04-03 11:40:39 +0200808 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100809 ":videocapture_objc",
Anders Carlssonfe9d8172018-04-03 11:40:39 +0200810 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100811 ":videosource_objc",
Danielaae012cf2017-10-12 13:46:00 +0200812 ":videotoolbox_objc",
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200813 "../../system_wrappers:system_wrappers",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100814 "../../system_wrappers:system_wrappers_default",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200815 "../api/video:video_frame_i420",
Anders Carlssonfe9d8172018-04-03 11:40:39 +0200816 "../common_video:common_video",
Danielaae012cf2017-10-12 13:46:00 +0200817 "../media:rtc_media_base",
Anders Carlssonfe9d8172018-04-03 11:40:39 +0200818 "../media:rtc_media_tests_utils",
Danielaae012cf2017-10-12 13:46:00 +0200819 "../modules:module_api",
820 "../rtc_base:rtc_base",
821 "../rtc_base:rtc_base_tests_utils",
Anders Carlssonfe9d8172018-04-03 11:40:39 +0200822 "//third_party/libyuv",
Danielaae012cf2017-10-12 13:46:00 +0200823 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100824
825 if (rtc_use_metal_rendering) {
Kári Tristan Helgason06d094f2018-04-19 17:38:05 +0200826 sources += [ "objc/Framework/UnitTests/RTCMTLVideoView_xctest.m" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100827 deps += [ ":metal_objc" ]
828 }
829
Danielaae012cf2017-10-12 13:46:00 +0200830 public_deps = [
831 "//build/config/ios:xctest",
832 "//third_party/ocmock",
833 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100834
Anders Carlssondc6b4772018-01-15 13:31:03 +0100835 include_dirs += [ "$root_out_dir/WebRTC.framework/Headers/" ]
Anders Carlssonfe9d8172018-04-03 11:40:39 +0200836
837 if (!build_with_chromium && is_clang) {
838 # Suppress warnings from the Chromium Clang plugin
839 # (bugs.webrtc.org/163).
840 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
841 }
Danielaae012cf2017-10-12 13:46:00 +0200842 }
843
Daniela012b56b2017-11-15 13:15:24 +0100844 bundle_data("sdk_unittests_bundle_data") {
Daniela012b56b2017-11-15 13:15:24 +0100845 sources = [
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200846 "objc/Framework/UnitTests/audio_short16.pcm",
847 "objc/Framework/UnitTests/audio_short44.pcm",
848 "objc/Framework/UnitTests/audio_short48.pcm",
849
850 # Sample video taken from https://media.xiph.org/video/derf/
Daniela012b56b2017-11-15 13:15:24 +0100851 "objc/Framework/UnitTests/foreman.mp4",
852 ]
853 outputs = [
854 "{{bundle_resources_dir}}/{{source_file_part}}",
855 ]
856 }
857
Danielaae012cf2017-10-12 13:46:00 +0200858 rtc_ios_xctest_test("sdk_unittests") {
859 info_plist = "//test/ios/Info.plist"
860 sources = [
861 "objc/Framework/UnitTests/main.m",
862 ]
Daniela012b56b2017-11-15 13:15:24 +0100863
Danielaae012cf2017-10-12 13:46:00 +0200864 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
865 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
866 deps = [
Daniela012b56b2017-11-15 13:15:24 +0100867 ":sdk_unittests_bundle_data",
Danielaae012cf2017-10-12 13:46:00 +0200868 ":sdk_unittests_sources",
869 ]
870 ldflags = [ "-all_load" ]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +0200871
872 if (is_clang) {
873 # Suppress warnings from the Chromium Clang plugin
874 # (bugs.webrtc.org/163).
875 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
876 }
Danielaae012cf2017-10-12 13:46:00 +0200877 }
878 }
879
880 # TODO(denicija): once all tests are migrated to xctest remove this source set.
kthelgason36d658d2017-08-24 05:43:45 -0700881 rtc_source_set("sdk_unittests_objc") {
mbonadei2c8ac1b2017-05-31 05:14:26 -0700882 testonly = true
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +0100883
mbonadei2c8ac1b2017-05-31 05:14:26 -0700884 sources = [
mbonadei2c8ac1b2017-05-31 05:14:26 -0700885 "objc/Framework/UnitTests/RTCConfigurationTest.mm",
886 "objc/Framework/UnitTests/RTCDataChannelConfigurationTest.mm",
887 "objc/Framework/UnitTests/RTCIceCandidateTest.mm",
888 "objc/Framework/UnitTests/RTCIceServerTest.mm",
Steve Antond295e402017-07-14 16:06:41 -0700889 "objc/Framework/UnitTests/RTCIntervalRangeTests.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700890 "objc/Framework/UnitTests/RTCMediaConstraintsTest.mm",
891 "objc/Framework/UnitTests/RTCPeerConnectionTest.mm",
892 "objc/Framework/UnitTests/RTCSessionDescriptionTest.mm",
jtteh7480da42017-07-07 11:02:15 -0700893 "objc/Framework/UnitTests/RTCTracingTest.mm",
kthelgasonfb143122017-07-25 07:55:58 -0700894 "objc/Framework/UnitTests/objc_video_decoder_factory_tests.mm",
895 "objc/Framework/UnitTests/objc_video_encoder_factory_tests.mm",
Kári Tristan Helgasonca957482017-10-05 14:06:52 +0200896 "objc/Framework/UnitTests/scoped_cftyperef_tests.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700897 ]
Anders Carlssone7dd83f2018-01-19 11:28:44 +0100898 if (is_ios) {
oprypin45197522017-06-22 01:47:20 -0700899 sources +=
900 [ "objc/Framework/UnitTests/RTCCameraVideoCapturerTests.mm" ]
901 }
mbonadeid7620582017-05-30 01:50:35 -0700902
mbonadei2c8ac1b2017-05-31 05:14:26 -0700903 # |-ObjC| flag needed to make sure category method implementations
904 # are included:
905 # https://developer.apple.com/library/mac/qa/qa1490/_index.html
906 ldflags = [ "-ObjC" ]
magjed3149e092017-05-08 05:32:05 -0700907
mbonadei2c8ac1b2017-05-31 05:14:26 -0700908 defines = [ "GTEST_RELATIVE_PATH" ]
909 deps = [
Kári Tristan Helgasonca957482017-10-05 14:06:52 +0200910 ":common_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100911 ":mediaconstraints_objc",
912 ":native_api",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100913 ":native_video",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100914 ":peerconnectionfactory_base_objc",
915 ":video_objc",
916 ":videocapture_objc",
917 ":videocodec_objc",
918 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100919 ":videosource_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700920 ":videotoolbox_objc",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100921 "../../system_wrappers:system_wrappers_default",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +0200922 "../api/video_codecs:video_codecs_api",
kthelgasonebd4f792017-09-04 04:36:21 -0700923 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -0700924 "../modules:module_api",
Patrik Höglund99175c62018-01-08 11:05:10 +0100925 "../modules/video_coding:video_codec_interface",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700926 "../rtc_base:rtc_base_tests_utils",
Kári Tristan Helgasonca957482017-10-05 14:06:52 +0200927 "//test:test_support",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700928 "//third_party/ocmock",
929 ]
magjed3149e092017-05-08 05:32:05 -0700930
denicija59ee91b2017-06-05 05:48:47 -0700931 if (is_ios) {
932 sources += [ "objc/Framework/UnitTests/RTCAudioSessionTest.mm" ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100933 deps += [ ":audio_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700934 }
Danielaae012cf2017-10-12 13:46:00 +0200935
mbonadei2c8ac1b2017-05-31 05:14:26 -0700936 if (!build_with_chromium && is_clang) {
zhihuanga4c113a2017-06-28 14:05:44 -0700937 # Suppress warnings from the Chromium Clang plugin
938 # (bugs.webrtc.org/163).
mbonadei2c8ac1b2017-05-31 05:14:26 -0700939 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
940 }
941 }
kthelgason2f088792017-05-30 01:48:47 -0700942 }
943
mbonadei2c8ac1b2017-05-31 05:14:26 -0700944 if (is_ios) {
Anders Carlssondc6b4772018-01-15 13:31:03 +0100945 ios_framework_bundle_with_umbrella_header("framework_objc") {
mbonadei2c8ac1b2017-05-31 05:14:26 -0700946 info_plist = "objc/Framework/Info.plist"
947 output_name = "WebRTC"
Magnus Jedvertf83dc8b2017-08-29 09:49:43 +0000948
mbonadei2c8ac1b2017-05-31 05:14:26 -0700949 common_objc_headers = [
Jeremy Newton-Smith96de4282017-08-23 10:02:23 -0700950 "objc/Framework/Headers/WebRTC/RTCAudioSession.h",
Magnus Jedvertf83dc8b2017-08-29 09:49:43 +0000951 "objc/Framework/Headers/WebRTC/RTCVideoCodec.h",
952 "objc/Framework/Headers/WebRTC/RTCVideoCodecFactory.h",
Jeremy Newton-Smith96de4282017-08-23 10:02:23 -0700953 "objc/Framework/Headers/WebRTC/RTCAudioSessionConfiguration.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700954 "objc/Framework/Headers/WebRTC/RTCAudioSource.h",
955 "objc/Framework/Headers/WebRTC/RTCAudioTrack.h",
956 "objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h",
957 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
958 "objc/Framework/Headers/WebRTC/RTCConfiguration.h",
959 "objc/Framework/Headers/WebRTC/RTCDataChannel.h",
960 "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h",
961 "objc/Framework/Headers/WebRTC/RTCDispatcher.h",
962 "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
963 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h",
Daniela012b56b2017-11-15 13:15:24 +0100964 "objc/Framework/Headers/WebRTC/RTCFileVideoCapturer.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700965 "objc/Framework/Headers/WebRTC/RTCIceCandidate.h",
966 "objc/Framework/Headers/WebRTC/RTCIceServer.h",
Steve Antond295e402017-07-14 16:06:41 -0700967 "objc/Framework/Headers/WebRTC/RTCIntervalRange.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700968 "objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h",
969 "objc/Framework/Headers/WebRTC/RTCLogging.h",
970 "objc/Framework/Headers/WebRTC/RTCMacros.h",
971 "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h",
972 "objc/Framework/Headers/WebRTC/RTCMediaSource.h",
973 "objc/Framework/Headers/WebRTC/RTCMediaStream.h",
974 "objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h",
975 "objc/Framework/Headers/WebRTC/RTCMetrics.h",
976 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h",
977 "objc/Framework/Headers/WebRTC/RTCPeerConnection.h",
978 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h",
Yura Yaroshevichbf567122018-01-02 13:33:16 +0300979 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactoryOptions.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700980 "objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h",
981 "objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h",
982 "objc/Framework/Headers/WebRTC/RTCRtpParameters.h",
983 "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h",
984 "objc/Framework/Headers/WebRTC/RTCRtpSender.h",
Steve Anton8cb344a2018-02-27 15:34:53 -0800985 "objc/Framework/Headers/WebRTC/RTCRtpTransceiver.h",
Yura Yaroshevich27676322018-01-02 14:44:35 +0300986 "objc/Framework/Headers/WebRTC/RTCDtmfSender.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700987 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
988 "objc/Framework/Headers/WebRTC/RTCSessionDescription.h",
989 "objc/Framework/Headers/WebRTC/RTCTracing.h",
990 "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h",
Anders Carlsson7e042812017-10-05 16:55:38 +0200991 "objc/Framework/Headers/WebRTC/RTCVideoCodecH264.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700992 "objc/Framework/Headers/WebRTC/RTCVideoFrame.h",
Anders Carlssone5960ce2017-06-22 15:26:30 +0200993 "objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700994 "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h",
995 "objc/Framework/Headers/WebRTC/RTCVideoSource.h",
996 "objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
997 "objc/Framework/Headers/WebRTC/RTCVideoViewShading.h",
998 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +0200999 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP8.h",
1000 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP9.h",
1001 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP8.h",
1002 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP9.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001003 ]
Magnus Jedvert8b4e92d2018-04-13 15:36:43 +02001004
mbonadei2c8ac1b2017-05-31 05:14:26 -07001005 if (!build_with_chromium) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001006 common_objc_headers += [
Anders Carlsson3b3364e2018-01-30 15:46:13 +01001007 "objc/Framework/Headers/WebRTC/RTCCallbackLogger.h",
1008 "objc/Framework/Headers/WebRTC/RTCFileLogger.h",
1009 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001010 }
Anders Carlssonc3d1e092018-03-21 12:38:37 +01001011 if (rtc_use_metal_rendering) {
1012 common_objc_headers +=
1013 [ "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h" ]
1014 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001015
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001016 sources = common_objc_headers
1017 public_headers = common_objc_headers
1018
mbonadei2c8ac1b2017-05-31 05:14:26 -07001019 ldflags = [
1020 "-all_load",
1021 "-install_name",
1022 "@rpath/$output_name.framework/$output_name",
1023 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001024
mbonadei2c8ac1b2017-05-31 05:14:26 -07001025 deps = [
kthelgason36d658d2017-08-24 05:43:45 -07001026 ":audio_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001027 ":common_objc",
1028 ":default_codec_factory_objc",
1029 ":native_api",
1030 ":native_video",
1031 ":peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -07001032 ":ui_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001033 ":videocapture_objc",
1034 ":videocodec_objc",
1035 ":videotoolbox_objc",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001036 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001037 "../system_wrappers:field_trial_default",
1038 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +00001039 "../system_wrappers:runtime_enabled_features_default",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001040 ]
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001041 if (rtc_use_metal_rendering) {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001042 deps += [ ":metal_objc" ]
1043 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001044
mbonadei2c8ac1b2017-05-31 05:14:26 -07001045 libs = [
1046 "AVFoundation.framework",
1047 "CoreGraphics.framework",
1048 "CoreMedia.framework",
1049 "GLKit.framework",
1050 ]
1051
1052 configs += [ "..:common_objc" ]
1053
kthelgason36d658d2017-08-24 05:43:45 -07001054 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001055
1056 if (!build_with_chromium && is_clang) {
zhihuanga4c113a2017-06-28 14:05:44 -07001057 # Suppress warnings from the Chromium Clang plugin
1058 # (bugs.webrtc.org/163).
mbonadei2c8ac1b2017-05-31 05:14:26 -07001059 configs -= [ "//build/config/clang:find_bad_constructs" ]
1060 }
1061 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001062 }
1063
Anders Carlsson9823ee42018-03-07 10:32:03 +01001064 rtc_static_library("wrapped_native_codec_objc") {
1065 sources = [
1066 "objc/Framework/Classes/PeerConnection/RTCWrappedNativeVideoDecoder.h",
1067 "objc/Framework/Classes/PeerConnection/RTCWrappedNativeVideoDecoder.mm",
1068 "objc/Framework/Classes/PeerConnection/RTCWrappedNativeVideoEncoder.h",
1069 "objc/Framework/Classes/PeerConnection/RTCWrappedNativeVideoEncoder.mm",
1070 ]
1071
1072 configs += [ "..:common_objc" ]
1073 public_configs = [ ":common_config_objc" ]
1074
1075 if (!build_with_chromium && is_clang) {
1076 # Suppress warnings from the Chromium Clang plugin
1077 # (bugs.webrtc.org/163).
1078 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1079 }
1080
1081 deps = [
1082 ":common_objc",
1083 ":videocodec_objc",
1084 "../api/video_codecs:video_codecs_api",
1085 "../media:rtc_media_base",
1086 ]
1087 }
1088
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001089 # The native API is currently experimental and may change without notice.
1090 rtc_static_library("native_api") {
1091 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +02001092 allow_poison = [
1093 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
1094 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
1095 ]
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001096 sources = [
Anders Carlsson73119182018-03-15 09:41:03 +01001097 "objc/Framework/Native/api/video_capturer.h",
1098 "objc/Framework/Native/api/video_capturer.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001099 "objc/Framework/Native/api/video_decoder_factory.h",
1100 "objc/Framework/Native/api/video_decoder_factory.mm",
1101 "objc/Framework/Native/api/video_encoder_factory.h",
1102 "objc/Framework/Native/api/video_encoder_factory.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001103 "objc/Framework/Native/api/video_frame.h",
1104 "objc/Framework/Native/api/video_frame.mm",
1105 "objc/Framework/Native/api/video_frame_buffer.h",
1106 "objc/Framework/Native/api/video_frame_buffer.mm",
1107 "objc/Framework/Native/api/video_renderer.h",
1108 "objc/Framework/Native/api/video_renderer.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001109 ]
1110
1111 configs += [ "..:common_objc" ]
1112
1113 public_configs = [ ":common_config_objc" ]
1114
1115 if (!build_with_chromium && is_clang) {
1116 # Suppress warnings from the Chromium Clang plugin
1117 # (bugs.webrtc.org/163).
1118 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1119 }
1120
1121 deps = [
1122 ":native_video",
Anders Carlsson73119182018-03-15 09:41:03 +01001123 ":videocapturebase_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001124 ":videocodec_objc",
1125 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001126 ":videorenderer_objc",
Anders Carlsson73119182018-03-15 09:41:03 +01001127 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001128 "../api/video:video_frame",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001129 "../api/video_codecs:video_codecs_api",
1130 "../common_video",
1131 "../rtc_base:rtc_base",
1132 ]
1133 }
1134
1135 rtc_static_library("native_video") {
1136 sources = [
Anders Carlsson9823ee42018-03-07 10:32:03 +01001137 "objc/Framework/Native/src/objc_frame_buffer.h",
1138 "objc/Framework/Native/src/objc_frame_buffer.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001139 "objc/Framework/Native/src/objc_video_decoder_factory.h",
1140 "objc/Framework/Native/src/objc_video_decoder_factory.mm",
1141 "objc/Framework/Native/src/objc_video_encoder_factory.h",
1142 "objc/Framework/Native/src/objc_video_encoder_factory.mm",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001143 "objc/Framework/Native/src/objc_video_frame.h",
1144 "objc/Framework/Native/src/objc_video_frame.mm",
1145 "objc/Framework/Native/src/objc_video_renderer.h",
1146 "objc/Framework/Native/src/objc_video_renderer.mm",
1147 "objc/Framework/Native/src/objc_video_track_source.h",
1148 "objc/Framework/Native/src/objc_video_track_source.mm",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001149 ]
1150
1151 configs += [ "..:common_objc" ]
1152
1153 public_configs = [ ":common_config_objc" ]
1154
1155 if (!build_with_chromium && is_clang) {
1156 # Suppress warnings from the Chromium Clang plugin
1157 # (bugs.webrtc.org/163).
1158 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1159 }
1160
1161 deps = [
1162 ":common_objc",
Anders Carlsson73119182018-03-15 09:41:03 +01001163 ":videocapturebase_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001164 ":videocodec_objc",
1165 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001166 ":videorenderer_objc",
1167 ":wrapped_native_codec_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001168 "../api/video:video_frame",
1169 "../api/video:video_frame_i420",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001170 "../api/video_codecs:video_codecs_api",
1171 "../common_video",
1172 "../media:rtc_audio_video",
1173 "../media:rtc_media_base",
1174 "../modules:module_api",
1175 "../modules/video_coding:video_codec_interface",
1176 "../rtc_base:checks",
1177 "../rtc_base:rtc_base",
1178 ]
1179 }
1180
mbonadeic0af5ac2017-08-24 12:26:05 -07001181 rtc_static_library("video_toolbox_cc") {
mbonadei6ff8f962017-09-04 05:51:34 -07001182 visibility = [ ":videotoolbox_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -07001183 sources = [
magjed73c0eb52017-08-07 06:55:28 -07001184 "objc/Framework/Classes/VideoToolbox/helpers.cc",
1185 "objc/Framework/Classes/VideoToolbox/helpers.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001186 "objc/Framework/Classes/VideoToolbox/nalu_rewriter.cc",
1187 "objc/Framework/Classes/VideoToolbox/nalu_rewriter.h",
mbonadeic0af5ac2017-08-24 12:26:05 -07001188 ]
1189 deps = [
1190 "../common_video",
1191 "../modules:module_api",
1192 "../modules/video_coding:webrtc_h264",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001193 "../rtc_base:checks",
mbonadeic0af5ac2017-08-24 12:26:05 -07001194 "../rtc_base:rtc_base_approved",
1195 ]
1196 if (!build_with_chromium && is_clang) {
1197 # Suppress warnings from the Chromium Clang plugin
1198 # (bugs.webrtc.org/163).
1199 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1200 }
1201 }
1202
1203 rtc_static_library("videotoolbox_objc") {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001204 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +02001205 allow_poison = [
1206 "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
1207 "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
1208 ]
mbonadeic0af5ac2017-08-24 12:26:05 -07001209 sources = [
1210 "objc/Framework/Classes/VideoToolbox/RTCVideoDecoderH264.mm",
1211 "objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001212 ]
1213
1214 configs += [ "..:common_objc" ]
1215
1216 deps = [
kthelgason36d658d2017-08-24 05:43:45 -07001217 ":common_objc",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001218 ":native_api",
kthelgason36d658d2017-08-24 05:43:45 -07001219 ":video_objc",
mbonadeic0af5ac2017-08-24 12:26:05 -07001220 ":video_toolbox_cc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +01001221 ":videocodec_objc",
1222 ":videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +01001223 ":videosource_objc",
Niels Möllerc6ce9c52018-05-11 11:15:30 +02001224 "../api/video:video_frame",
kthelgasonfb143122017-07-25 07:55:58 -07001225 "../api/video_codecs:video_codecs_api",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001226 "../common_video",
Mirko Bonadei75baa492018-01-11 17:07:30 +01001227 "../media:rtc_audio_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001228 "../media:rtc_media",
1229 "../media:rtc_media_base",
1230 "../modules:module_api",
Patrik Höglund99175c62018-01-08 11:05:10 +01001231 "../modules/video_coding:video_codec_interface",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001232 "../modules/video_coding:video_coding_utility",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001233 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001234 "../rtc_base:rtc_base_approved",
Mirko Bonadei401d0562017-12-14 11:24:00 +01001235 "//third_party/libyuv",
mbonadei2c8ac1b2017-05-31 05:14:26 -07001236 ]
1237
1238 libs = [
1239 "CoreFoundation.framework",
1240 "CoreMedia.framework",
1241 "CoreVideo.framework",
1242 "VideoToolbox.framework",
1243 ]
1244
1245 if (!build_with_chromium && is_clang) {
zhihuanga4c113a2017-06-28 14:05:44 -07001246 # Suppress warnings from the Chromium Clang plugin
1247 # (bugs.webrtc.org/163).
mbonadei2c8ac1b2017-05-31 05:14:26 -07001248 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1249 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +01001250 }
1251 }
tkchin9eeb6242016-04-27 01:54:20 -07001252}