| Index: webrtc/sdk/BUILD.gn
|
| diff --git a/webrtc/sdk/BUILD.gn b/webrtc/sdk/BUILD.gn
|
| index ff11540509a54771807c9c7f43a6b7aa80baa9b7..d774fc63588297cd03313d106f8d5f0eff18a8c5 100644
|
| --- a/webrtc/sdk/BUILD.gn
|
| +++ b/webrtc/sdk/BUILD.gn
|
| @@ -17,7 +17,7 @@ declare_args() {
|
| }
|
|
|
| group("sdk") {
|
| - if (is_ios) {
|
| + if (!build_with_chromium && is_ios) {
|
| public_deps = [
|
| ":objc_framework",
|
| ]
|
| @@ -79,331 +79,195 @@ if (is_ios || is_mac) {
|
| }
|
| }
|
|
|
| - rtc_static_library("objc_video") {
|
| - sources = [
|
| - "objc/Framework/Classes/Video/RTCAVFoundationVideoCapturerInternal.h",
|
| - "objc/Framework/Classes/Video/RTCAVFoundationVideoCapturerInternal.mm",
|
| - "objc/Framework/Classes/Video/RTCDefaultShader.h",
|
| - "objc/Framework/Classes/Video/RTCDefaultShader.mm",
|
| - "objc/Framework/Classes/Video/RTCI420TextureCache.h",
|
| - "objc/Framework/Classes/Video/RTCI420TextureCache.mm",
|
| - "objc/Framework/Classes/Video/RTCOpenGLDefines.h",
|
| - "objc/Framework/Classes/Video/RTCShader.h",
|
| - "objc/Framework/Classes/Video/RTCShader.mm",
|
| - "objc/Framework/Classes/Video/avfoundationformatmapper.h",
|
| - "objc/Framework/Classes/Video/avfoundationformatmapper.mm",
|
| - "objc/Framework/Classes/Video/avfoundationvideocapturer.h",
|
| - "objc/Framework/Classes/Video/avfoundationvideocapturer.mm",
|
| - "objc/Framework/Classes/Video/objcvideotracksource.h",
|
| - "objc/Framework/Classes/Video/objcvideotracksource.mm",
|
| - ]
|
| - libs = []
|
| - if (is_ios) {
|
| - sources += [
|
| - "objc/Framework/Classes/Video/RTCNV12TextureCache.h",
|
| - "objc/Framework/Classes/Video/RTCNV12TextureCache.m",
|
| - ]
|
| - libs += [
|
| - "GLKit.framework",
|
| - "OpenGLES.framework",
|
| - "QuartzCore.framework",
|
| - ]
|
| - } else if (is_mac) {
|
| - sources += []
|
| -
|
| - libs += [
|
| - "CoreMedia.framework",
|
| - "CoreVideo.framework",
|
| - "OpenGL.framework",
|
| - ]
|
| - }
|
| -
|
| - deps = [
|
| - ":objc_common",
|
| - ":objc_corevideoframebuffer",
|
| - ":objc_videotoolbox",
|
| - "../api:libjingle_peerconnection_api",
|
| - "../base:rtc_base",
|
| - "../common_video",
|
| - "../media:rtc_media_base",
|
| - ]
|
| -
|
| - configs += [ "..:common_objc" ]
|
| - if (!build_with_chromium && is_clang) {
|
| - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
| - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
| - }
|
| - }
|
| -
|
| - rtc_static_library("objc_ui") {
|
| - if (is_ios) {
|
| - sources = [
|
| - "objc/Framework/Classes/UI/RTCCameraPreviewView.m",
|
| - "objc/Framework/Classes/UI/RTCEAGLVideoView.m",
|
| - "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
|
| - "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
|
| - ]
|
| - }
|
| - if (is_mac) {
|
| + if (!build_with_chromium) {
|
| + rtc_static_library("objc_video") {
|
| sources = [
|
| - "objc/Framework/Classes/UI/RTCNSGLVideoView.m",
|
| - "objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h",
|
| - ]
|
| - }
|
| - configs += [ "..:common_objc" ]
|
| - deps = [
|
| - ":objc_common",
|
| - ":objc_peerconnection",
|
| - ]
|
| - }
|
| -
|
| - if (rtc_use_metal_rendering) {
|
| - rtc_static_library("objc_metal") {
|
| - sources = [
|
| - "objc/Framework/Classes/Metal/RTCMTLI420Renderer.h",
|
| - "objc/Framework/Classes/Metal/RTCMTLI420Renderer.mm",
|
| - "objc/Framework/Classes/Metal/RTCMTLRenderer+Private.h",
|
| - "objc/Framework/Classes/Metal/RTCMTLRenderer.h",
|
| - "objc/Framework/Classes/Metal/RTCMTLRenderer.mm",
|
| + "objc/Framework/Classes/Video/RTCAVFoundationVideoCapturerInternal.h",
|
| + "objc/Framework/Classes/Video/RTCAVFoundationVideoCapturerInternal.mm",
|
| + "objc/Framework/Classes/Video/RTCDefaultShader.h",
|
| + "objc/Framework/Classes/Video/RTCDefaultShader.mm",
|
| + "objc/Framework/Classes/Video/RTCI420TextureCache.h",
|
| + "objc/Framework/Classes/Video/RTCI420TextureCache.mm",
|
| + "objc/Framework/Classes/Video/RTCOpenGLDefines.h",
|
| + "objc/Framework/Classes/Video/RTCShader.h",
|
| + "objc/Framework/Classes/Video/RTCShader.mm",
|
| + "objc/Framework/Classes/Video/avfoundationformatmapper.h",
|
| + "objc/Framework/Classes/Video/avfoundationformatmapper.mm",
|
| + "objc/Framework/Classes/Video/avfoundationvideocapturer.h",
|
| + "objc/Framework/Classes/Video/avfoundationvideocapturer.mm",
|
| + "objc/Framework/Classes/Video/objcvideotracksource.h",
|
| + "objc/Framework/Classes/Video/objcvideotracksource.mm",
|
| ]
|
| + libs = []
|
| if (is_ios) {
|
| sources += [
|
| - "objc/Framework/Classes/Metal/RTCMTLNV12Renderer.h",
|
| - "objc/Framework/Classes/Metal/RTCMTLNV12Renderer.mm",
|
| - "objc/Framework/Classes/Metal/RTCMTLVideoView.m",
|
| - "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h",
|
| + "objc/Framework/Classes/Video/RTCNV12TextureCache.h",
|
| + "objc/Framework/Classes/Video/RTCNV12TextureCache.m",
|
| ]
|
| - }
|
| - if (is_mac) {
|
| - sources += [
|
| - "objc/Framework/Classes/Metal/RTCMTLNSVideoView.m",
|
| - "objc/Framework/Headers/WebRTC/RTCMTLNSVideoView.h",
|
| + libs += [
|
| + "GLKit.framework",
|
| + "OpenGLES.framework",
|
| + "QuartzCore.framework",
|
| + ]
|
| + } else if (is_mac) {
|
| + sources += []
|
| +
|
| + libs += [
|
| + "CoreMedia.framework",
|
| + "CoreVideo.framework",
|
| + "OpenGL.framework",
|
| ]
|
| }
|
| - libs = [
|
| - "CoreVideo.framework",
|
| - "Metal.framework",
|
| - "MetalKit.framework",
|
| - ]
|
| +
|
| deps = [
|
| - ":objc_video",
|
| - "../api:video_frame_api",
|
| - "../base:rtc_base_approved",
|
| + ":objc_common",
|
| + ":objc_corevideoframebuffer",
|
| + ":objc_videotoolbox",
|
| + "../api:libjingle_peerconnection_api",
|
| + "../base:rtc_base",
|
| + "../common_video",
|
| + "../media:rtc_media_base",
|
| ]
|
| - configs += [ "..:common_objc" ]
|
| - public_configs = [ ":objc_common_config" ]
|
| - }
|
| - }
|
| -
|
| - rtc_static_library("objc_peerconnection") {
|
| - sources = [
|
| - "objc/Framework/Classes/PeerConnection/RTCAVFoundationVideoSource+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCAVFoundationVideoSource.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCAudioSource+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCAudioSource.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCAudioTrack+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCAudioTrack.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCCameraVideoCapturer.m",
|
| - "objc/Framework/Classes/PeerConnection/RTCConfiguration+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCConfiguration.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCDataChannel+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCDataChannel.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCDataChannelConfiguration+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCDataChannelConfiguration.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCIceCandidate+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCIceCandidate.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCIceServer+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCIceServer.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCLegacyStatsReport+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCLegacyStatsReport.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCMediaConstraints+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCMediaConstraints.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCMediaSource+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCMediaSource.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCMediaStream+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCMediaStream.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCMediaStreamTrack+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCMediaStreamTrack.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCMetrics.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCMetricsSampleInfo+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCMetricsSampleInfo.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCPeerConnection+DataChannel.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Stats.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCPeerConnection.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCRtpCodecParameters+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCRtpCodecParameters.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCRtpEncodingParameters+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCRtpEncodingParameters.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCRtpParameters+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCRtpParameters.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCRtpReceiver+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCRtpReceiver.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCRtpSender+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCRtpSender.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCSSLAdapter.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCSessionDescription+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCSessionDescription.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCTracing.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCVideoCapturer.m",
|
| - "objc/Framework/Classes/PeerConnection/RTCVideoFrame+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCVideoFrame.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCVideoRendererAdapter+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCVideoRendererAdapter.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCVideoRendererAdapter.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCVideoSource+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCVideoSource.mm",
|
| - "objc/Framework/Classes/PeerConnection/RTCVideoTrack+Private.h",
|
| - "objc/Framework/Classes/PeerConnection/RTCVideoTrack.mm",
|
| - "objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h",
|
| - "objc/Framework/Headers/WebRTC/RTCAudioSource.h",
|
| - "objc/Framework/Headers/WebRTC/RTCAudioTrack.h",
|
| - "objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h",
|
| - "objc/Framework/Headers/WebRTC/RTCConfiguration.h",
|
| - "objc/Framework/Headers/WebRTC/RTCDataChannel.h",
|
| - "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h",
|
| - "objc/Framework/Headers/WebRTC/RTCIceCandidate.h",
|
| - "objc/Framework/Headers/WebRTC/RTCIceServer.h",
|
| - "objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h",
|
| - "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h",
|
| - "objc/Framework/Headers/WebRTC/RTCMediaSource.h",
|
| - "objc/Framework/Headers/WebRTC/RTCMediaStream.h",
|
| - "objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h",
|
| - "objc/Framework/Headers/WebRTC/RTCMetrics.h",
|
| - "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h",
|
| - "objc/Framework/Headers/WebRTC/RTCPeerConnection.h",
|
| - "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h",
|
| - "objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h",
|
| - "objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h",
|
| - "objc/Framework/Headers/WebRTC/RTCRtpParameters.h",
|
| - "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h",
|
| - "objc/Framework/Headers/WebRTC/RTCRtpSender.h",
|
| - "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
|
| - "objc/Framework/Headers/WebRTC/RTCSessionDescription.h",
|
| - "objc/Framework/Headers/WebRTC/RTCTracing.h",
|
| - "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h",
|
| - "objc/Framework/Headers/WebRTC/RTCVideoFrame.h",
|
| - "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h",
|
| - "objc/Framework/Headers/WebRTC/RTCVideoSource.h",
|
| - "objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
|
| - "objc/Framework/Headers/WebRTC/RTCVideoViewShading.h",
|
| - ]
|
|
|
| - libs = [ "AVFoundation.framework" ]
|
| -
|
| - if (is_ios) {
|
| - libs += [ "CoreGraphics.framework" ]
|
| - }
|
| -
|
| - configs += [ "..:common_objc" ]
|
| -
|
| - public_configs = [ ":objc_common_config" ]
|
| -
|
| - if (!build_with_chromium && is_clang) {
|
| - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
| - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
| - }
|
| -
|
| - deps = [
|
| - ":objc_common",
|
| - ":objc_corevideoframebuffer",
|
| - ":objc_video",
|
| - "../api:video_frame_api",
|
| - "../base:rtc_base",
|
| - "../media:rtc_media_base",
|
| - "../pc:libjingle_peerconnection",
|
| - ]
|
| -
|
| - if (rtc_use_metal_rendering) {
|
| - deps += [ ":objc_metal" ]
|
| - }
|
| -
|
| - if (rtc_build_libyuv) {
|
| - deps += [ "$rtc_libyuv_dir" ]
|
| - public_deps = [
|
| - "$rtc_libyuv_dir",
|
| - ]
|
| + configs += [ "..:common_objc" ]
|
| + if (!build_with_chromium && is_clang) {
|
| + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
| + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
| + }
|
| }
|
| - }
|
| -
|
| - if (rtc_include_tests) {
|
| - rtc_source_set("objc_sdk_unittests") {
|
| - testonly = true
|
|
|
| - # Skip restricting visibility on mobile platforms since the tests on those
|
| - # gets additional generated targets which would require many lines here to
|
| - # cover (which would be confusing to read and hard to maintain).
|
| - if (!is_android && !is_ios) {
|
| - visibility = [ "..:rtc_unittests" ]
|
| + rtc_static_library("objc_ui") {
|
| + if (is_ios) {
|
| + sources = [
|
| + "objc/Framework/Classes/UI/RTCCameraPreviewView.m",
|
| + "objc/Framework/Classes/UI/RTCEAGLVideoView.m",
|
| + "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
|
| + "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
|
| + ]
|
| }
|
| - sources = [
|
| - "objc/Framework/UnitTests/RTCCameraVideoCapturerTests.mm",
|
| - "objc/Framework/UnitTests/RTCConfigurationTest.mm",
|
| - "objc/Framework/UnitTests/RTCDataChannelConfigurationTest.mm",
|
| - "objc/Framework/UnitTests/RTCIceCandidateTest.mm",
|
| - "objc/Framework/UnitTests/RTCIceServerTest.mm",
|
| - "objc/Framework/UnitTests/RTCMediaConstraintsTest.mm",
|
| - "objc/Framework/UnitTests/RTCPeerConnectionTest.mm",
|
| - "objc/Framework/UnitTests/RTCSessionDescriptionTest.mm",
|
| - "objc/Framework/UnitTests/avformatmappertests.mm",
|
| - ]
|
| -
|
| - # |-ObjC| flag needed to make sure category method implementations
|
| - # are included:
|
| - # https://developer.apple.com/library/mac/qa/qa1490/_index.html
|
| - ldflags = [ "-ObjC" ]
|
| -
|
| - defines = [ "GTEST_RELATIVE_PATH" ]
|
| + if (is_mac) {
|
| + sources = [
|
| + "objc/Framework/Classes/UI/RTCNSGLVideoView.m",
|
| + "objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h",
|
| + ]
|
| + }
|
| + configs += [ "..:common_objc" ]
|
| deps = [
|
| + ":objc_common",
|
| ":objc_peerconnection",
|
| - "..//system_wrappers:system_wrappers_default",
|
| - "../base:rtc_base_tests_utils",
|
| - "../system_wrappers:system_wrappers_default",
|
| - "//third_party/ocmock",
|
| ]
|
| + }
|
|
|
| - # RTCMTLVideoView not supported on 32-bit arm
|
| - if (is_ios && current_cpu != "arm") {
|
| - sources += [ "objc/Framework/UnitTests/RTCMTLVideoViewTests.mm" ]
|
| - if (current_cpu != "arm64") {
|
| - # Only include this file on simulator, as it's already
|
| - # included in device builds.
|
| - sources += [ "objc/Framework/Classes/Metal/RTCMTLVideoView.m" ]
|
| - libs = [ "CoreVideo.framework" ]
|
| + if (rtc_use_metal_rendering) {
|
| + rtc_static_library("objc_metal") {
|
| + sources = [
|
| + "objc/Framework/Classes/Metal/RTCMTLI420Renderer.h",
|
| + "objc/Framework/Classes/Metal/RTCMTLI420Renderer.mm",
|
| + "objc/Framework/Classes/Metal/RTCMTLRenderer+Private.h",
|
| + "objc/Framework/Classes/Metal/RTCMTLRenderer.h",
|
| + "objc/Framework/Classes/Metal/RTCMTLRenderer.mm",
|
| + ]
|
| + if (is_ios) {
|
| + sources += [
|
| + "objc/Framework/Classes/Metal/RTCMTLNV12Renderer.h",
|
| + "objc/Framework/Classes/Metal/RTCMTLNV12Renderer.mm",
|
| + "objc/Framework/Classes/Metal/RTCMTLVideoView.m",
|
| + "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h",
|
| + ]
|
| }
|
| - }
|
| -
|
| - if (!build_with_chromium && is_clang) {
|
| - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
| - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
| + if (is_mac) {
|
| + sources += [
|
| + "objc/Framework/Classes/Metal/RTCMTLNSVideoView.m",
|
| + "objc/Framework/Headers/WebRTC/RTCMTLNSVideoView.h",
|
| + ]
|
| + }
|
| + libs = [
|
| + "CoreVideo.framework",
|
| + "Metal.framework",
|
| + "MetalKit.framework",
|
| + ]
|
| + deps = [
|
| + ":objc_video",
|
| + "../api:video_frame_api",
|
| + "../base:rtc_base_approved",
|
| + ]
|
| + configs += [ "..:common_objc" ]
|
| + public_configs = [ ":objc_common_config" ]
|
| }
|
| }
|
| - }
|
| -
|
| - if (is_ios) {
|
| - ios_framework_bundle("objc_framework") {
|
| - info_plist = "objc/Framework/Info.plist"
|
| - output_name = "WebRTC"
|
|
|
| - common_objc_headers = [
|
| + rtc_static_library("objc_peerconnection") {
|
| + sources = [
|
| + "objc/Framework/Classes/PeerConnection/RTCAVFoundationVideoSource+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCAVFoundationVideoSource.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCAudioSource+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCAudioSource.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCAudioTrack+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCAudioTrack.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCCameraVideoCapturer.m",
|
| + "objc/Framework/Classes/PeerConnection/RTCConfiguration+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCConfiguration.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCDataChannel+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCDataChannel.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCDataChannelConfiguration+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCDataChannelConfiguration.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCIceCandidate+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCIceCandidate.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCIceServer+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCIceServer.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCLegacyStatsReport+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCLegacyStatsReport.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCMediaConstraints+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCMediaConstraints.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCMediaSource+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCMediaSource.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCMediaStream+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCMediaStream.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCMediaStreamTrack+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCMediaStreamTrack.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCMetrics.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCMetricsSampleInfo+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCMetricsSampleInfo.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCPeerConnection+DataChannel.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Stats.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCPeerConnection.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCRtpCodecParameters+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCRtpCodecParameters.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCRtpEncodingParameters+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCRtpEncodingParameters.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCRtpParameters+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCRtpParameters.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCRtpReceiver+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCRtpReceiver.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCRtpSender+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCRtpSender.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCSSLAdapter.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCSessionDescription+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCSessionDescription.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCTracing.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCVideoCapturer.m",
|
| + "objc/Framework/Classes/PeerConnection/RTCVideoFrame+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCVideoFrame.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCVideoRendererAdapter+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCVideoRendererAdapter.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCVideoRendererAdapter.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCVideoSource+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCVideoSource.mm",
|
| + "objc/Framework/Classes/PeerConnection/RTCVideoTrack+Private.h",
|
| + "objc/Framework/Classes/PeerConnection/RTCVideoTrack.mm",
|
| "objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h",
|
| "objc/Framework/Headers/WebRTC/RTCAudioSource.h",
|
| "objc/Framework/Headers/WebRTC/RTCAudioTrack.h",
|
| "objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h",
|
| - "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
|
| "objc/Framework/Headers/WebRTC/RTCConfiguration.h",
|
| "objc/Framework/Headers/WebRTC/RTCDataChannel.h",
|
| "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h",
|
| - "objc/Framework/Headers/WebRTC/RTCDispatcher.h",
|
| - "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
|
| - "objc/Framework/Headers/WebRTC/RTCFieldTrials.h",
|
| "objc/Framework/Headers/WebRTC/RTCIceCandidate.h",
|
| "objc/Framework/Headers/WebRTC/RTCIceServer.h",
|
| "objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h",
|
| - "objc/Framework/Headers/WebRTC/RTCLogging.h",
|
| - "objc/Framework/Headers/WebRTC/RTCMacros.h",
|
| "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h",
|
| "objc/Framework/Headers/WebRTC/RTCMediaSource.h",
|
| "objc/Framework/Headers/WebRTC/RTCMediaStream.h",
|
| @@ -426,132 +290,270 @@ if (is_ios || is_mac) {
|
| "objc/Framework/Headers/WebRTC/RTCVideoSource.h",
|
| "objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
|
| "objc/Framework/Headers/WebRTC/RTCVideoViewShading.h",
|
| - "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
|
| - "objc/Framework/Headers/WebRTC/WebRTC.h",
|
| ]
|
| - if (rtc_use_metal_rendering) {
|
| - common_objc_headers +=
|
| - [ "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h" ]
|
| - }
|
| - sources = common_objc_headers
|
| - public_headers = common_objc_headers
|
|
|
| - if (!build_with_chromium) {
|
| - sources += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ]
|
| - public_headers += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ]
|
| + libs = [ "AVFoundation.framework" ]
|
| +
|
| + if (is_ios) {
|
| + libs += [ "CoreGraphics.framework" ]
|
| }
|
|
|
| - ldflags = [
|
| - "-all_load",
|
| - "-install_name",
|
| - "@rpath/$output_name.framework/$output_name",
|
| - ]
|
| + configs += [ "..:common_objc" ]
|
| +
|
| + public_configs = [ ":objc_common_config" ]
|
| +
|
| + if (!build_with_chromium && is_clang) {
|
| + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
| + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
| + }
|
|
|
| deps = [
|
| - ":objc_peerconnection",
|
| - ":objc_ui",
|
| - "../base:rtc_base_approved",
|
| - "../system_wrappers:field_trial_default",
|
| - "../system_wrappers:metrics_default",
|
| + ":objc_common",
|
| + ":objc_corevideoframebuffer",
|
| + ":objc_video",
|
| + "../api:video_frame_api",
|
| + "../base:rtc_base",
|
| + "../media:rtc_media_base",
|
| + "../pc:libjingle_peerconnection",
|
| ]
|
|
|
| - libs = [
|
| - "AVFoundation.framework",
|
| - "CoreGraphics.framework",
|
| - "CoreMedia.framework",
|
| - "GLKit.framework",
|
| - ]
|
| + if (rtc_use_metal_rendering) {
|
| + deps += [ ":objc_metal" ]
|
| + }
|
|
|
| - configs += [ "..:common_objc" ]
|
| + if (rtc_build_libyuv) {
|
| + deps += [ "$rtc_libyuv_dir" ]
|
| + public_deps = [
|
| + "$rtc_libyuv_dir",
|
| + ]
|
| + }
|
| + }
|
|
|
| - public_configs = [ ":objc_common_config" ]
|
| + if (rtc_include_tests) {
|
| + rtc_source_set("objc_sdk_unittests") {
|
| + testonly = true
|
|
|
| - if (!build_with_chromium && is_clang) {
|
| - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163)
|
| - configs -= [ "//build/config/clang:find_bad_constructs" ]
|
| + # Skip restricting visibility on mobile platforms since the tests on those
|
| + # gets additional generated targets which would require many lines here to
|
| + # cover (which would be confusing to read and hard to maintain).
|
| + if (!is_android && !is_ios) {
|
| + visibility = [ "..:rtc_unittests" ]
|
| + }
|
| + sources = [
|
| + "objc/Framework/UnitTests/RTCCameraVideoCapturerTests.mm",
|
| + "objc/Framework/UnitTests/RTCConfigurationTest.mm",
|
| + "objc/Framework/UnitTests/RTCDataChannelConfigurationTest.mm",
|
| + "objc/Framework/UnitTests/RTCIceCandidateTest.mm",
|
| + "objc/Framework/UnitTests/RTCIceServerTest.mm",
|
| + "objc/Framework/UnitTests/RTCMediaConstraintsTest.mm",
|
| + "objc/Framework/UnitTests/RTCPeerConnectionTest.mm",
|
| + "objc/Framework/UnitTests/RTCSessionDescriptionTest.mm",
|
| + "objc/Framework/UnitTests/avformatmappertests.mm",
|
| + ]
|
| +
|
| + # |-ObjC| flag needed to make sure category method implementations
|
| + # are included:
|
| + # https://developer.apple.com/library/mac/qa/qa1490/_index.html
|
| + ldflags = [ "-ObjC" ]
|
| +
|
| + defines = [ "GTEST_RELATIVE_PATH" ]
|
| + deps = [
|
| + ":objc_peerconnection",
|
| + "..//system_wrappers:system_wrappers_default",
|
| + "../base:rtc_base_tests_utils",
|
| + "../system_wrappers:system_wrappers_default",
|
| + "//third_party/ocmock",
|
| + ]
|
| +
|
| + # RTCMTLVideoView not supported on 32-bit arm
|
| + if (is_ios && current_cpu != "arm") {
|
| + sources += [ "objc/Framework/UnitTests/RTCMTLVideoViewTests.mm" ]
|
| + if (current_cpu != "arm64") {
|
| + # Only include this file on simulator, as it's already
|
| + # included in device builds.
|
| + sources += [ "objc/Framework/Classes/Metal/RTCMTLVideoView.m" ]
|
| + libs = [ "CoreVideo.framework" ]
|
| + }
|
| + }
|
| +
|
| + if (!build_with_chromium && is_clang) {
|
| + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
| + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
| + }
|
| }
|
| }
|
| - }
|
|
|
| - rtc_static_library("rtc_sdk_objc") {
|
| - complete_static_lib = true
|
| - deps = [
|
| - ":objc_peerconnection",
|
| - ":objc_ui",
|
| - "../system_wrappers:field_trial_default",
|
| - "../system_wrappers:metrics_default",
|
| - ]
|
| - }
|
| + if (is_ios) {
|
| + ios_framework_bundle("objc_framework") {
|
| + info_plist = "objc/Framework/Info.plist"
|
| + output_name = "WebRTC"
|
| +
|
| + common_objc_headers = [
|
| + "objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h",
|
| + "objc/Framework/Headers/WebRTC/RTCAudioSource.h",
|
| + "objc/Framework/Headers/WebRTC/RTCAudioTrack.h",
|
| + "objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h",
|
| + "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
|
| + "objc/Framework/Headers/WebRTC/RTCConfiguration.h",
|
| + "objc/Framework/Headers/WebRTC/RTCDataChannel.h",
|
| + "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h",
|
| + "objc/Framework/Headers/WebRTC/RTCDispatcher.h",
|
| + "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
|
| + "objc/Framework/Headers/WebRTC/RTCFieldTrials.h",
|
| + "objc/Framework/Headers/WebRTC/RTCIceCandidate.h",
|
| + "objc/Framework/Headers/WebRTC/RTCIceServer.h",
|
| + "objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h",
|
| + "objc/Framework/Headers/WebRTC/RTCLogging.h",
|
| + "objc/Framework/Headers/WebRTC/RTCMacros.h",
|
| + "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h",
|
| + "objc/Framework/Headers/WebRTC/RTCMediaSource.h",
|
| + "objc/Framework/Headers/WebRTC/RTCMediaStream.h",
|
| + "objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h",
|
| + "objc/Framework/Headers/WebRTC/RTCMetrics.h",
|
| + "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h",
|
| + "objc/Framework/Headers/WebRTC/RTCPeerConnection.h",
|
| + "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h",
|
| + "objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h",
|
| + "objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h",
|
| + "objc/Framework/Headers/WebRTC/RTCRtpParameters.h",
|
| + "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h",
|
| + "objc/Framework/Headers/WebRTC/RTCRtpSender.h",
|
| + "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
|
| + "objc/Framework/Headers/WebRTC/RTCSessionDescription.h",
|
| + "objc/Framework/Headers/WebRTC/RTCTracing.h",
|
| + "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h",
|
| + "objc/Framework/Headers/WebRTC/RTCVideoFrame.h",
|
| + "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h",
|
| + "objc/Framework/Headers/WebRTC/RTCVideoSource.h",
|
| + "objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
|
| + "objc/Framework/Headers/WebRTC/RTCVideoViewShading.h",
|
| + "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
|
| + "objc/Framework/Headers/WebRTC/WebRTC.h",
|
| + ]
|
| + if (rtc_use_metal_rendering) {
|
| + common_objc_headers +=
|
| + [ "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h" ]
|
| + }
|
| + sources = common_objc_headers
|
| + public_headers = common_objc_headers
|
|
|
| - rtc_static_library("objc_corevideoframebuffer") {
|
| - sources = [
|
| - "objc/Framework/Classes/Video/corevideo_frame_buffer.cc",
|
| - "objc/Framework/Classes/Video/corevideo_frame_buffer.h",
|
| + if (!build_with_chromium) {
|
| + sources += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ]
|
| + public_headers += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ]
|
| + }
|
|
|
| - # TODO(mbonadei): remove this backward compatibility header
|
| - "objc/Framework/Classes/corevideo_frame_buffer.h",
|
| - ]
|
| + ldflags = [
|
| + "-all_load",
|
| + "-install_name",
|
| + "@rpath/$output_name.framework/$output_name",
|
| + ]
|
|
|
| - deps = [
|
| - "../base:rtc_base_approved",
|
| - "../common_video",
|
| - ]
|
| + deps = [
|
| + ":objc_peerconnection",
|
| + ":objc_ui",
|
| + "../base:rtc_base_approved",
|
| + "../system_wrappers:field_trial_default",
|
| + "../system_wrappers:metrics_default",
|
| + ]
|
| +
|
| + libs = [
|
| + "AVFoundation.framework",
|
| + "CoreGraphics.framework",
|
| + "CoreMedia.framework",
|
| + "GLKit.framework",
|
| + ]
|
| +
|
| + configs += [ "..:common_objc" ]
|
|
|
| - if (!build_with_chromium && is_clang) {
|
| - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
| - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
| + public_configs = [ ":objc_common_config" ]
|
| +
|
| + if (!build_with_chromium && is_clang) {
|
| + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163)
|
| + configs -= [ "//build/config/clang:find_bad_constructs" ]
|
| + }
|
| + }
|
| }
|
|
|
| - libs = [ "CoreVideo.framework" ]
|
| - }
|
| + rtc_static_library("rtc_sdk_objc") {
|
| + complete_static_lib = true
|
| + deps = [
|
| + ":objc_peerconnection",
|
| + ":objc_ui",
|
| + "../system_wrappers:field_trial_default",
|
| + "../system_wrappers:metrics_default",
|
| + ]
|
| + }
|
|
|
| - rtc_static_library("objc_videotoolbox") {
|
| - sources = [
|
| - "objc/Framework/Classes/VideoToolbox/decoder.cc",
|
| - "objc/Framework/Classes/VideoToolbox/decoder.h",
|
| - "objc/Framework/Classes/VideoToolbox/encoder.h",
|
| - "objc/Framework/Classes/VideoToolbox/encoder.mm",
|
| - "objc/Framework/Classes/VideoToolbox/nalu_rewriter.cc",
|
| - "objc/Framework/Classes/VideoToolbox/nalu_rewriter.h",
|
| - "objc/Framework/Classes/VideoToolbox/videocodecfactory.cc",
|
| - "objc/Framework/Classes/VideoToolbox/videocodecfactory.h",
|
| - ]
|
| + rtc_static_library("objc_corevideoframebuffer") {
|
| + sources = [
|
| + "objc/Framework/Classes/Video/corevideo_frame_buffer.cc",
|
| + "objc/Framework/Classes/Video/corevideo_frame_buffer.h",
|
|
|
| - configs += [ "..:common_objc" ]
|
| + # TODO(mbonadei): remove this backward compatibility header
|
| + "objc/Framework/Classes/corevideo_frame_buffer.h",
|
| + ]
|
|
|
| - deps = [
|
| - ":objc_common",
|
| - ":objc_corevideoframebuffer",
|
| - "../base:rtc_base_approved",
|
| - "../common_video",
|
| - "../media:rtc_media",
|
| - "../media:rtc_media_base",
|
| - "../modules:module_api",
|
| - "../modules/video_coding:video_coding_utility",
|
| - "../modules/video_coding:webrtc_h264",
|
| - "../system_wrappers",
|
| - ]
|
| + deps = [
|
| + "../base:rtc_base_approved",
|
| + "../common_video",
|
| + ]
|
|
|
| - libs = [
|
| - "CoreFoundation.framework",
|
| - "CoreMedia.framework",
|
| - "CoreVideo.framework",
|
| - "VideoToolbox.framework",
|
| - ]
|
| + if (!build_with_chromium && is_clang) {
|
| + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
| + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
| + }
|
|
|
| - if (!build_with_chromium && is_clang) {
|
| - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
| - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
| + libs = [ "CoreVideo.framework" ]
|
| }
|
|
|
| - if (rtc_build_libyuv) {
|
| - deps += [ "$rtc_libyuv_dir" ]
|
| - public_deps = [
|
| - "$rtc_libyuv_dir",
|
| + rtc_static_library("objc_videotoolbox") {
|
| + sources = [
|
| + "objc/Framework/Classes/VideoToolbox/decoder.cc",
|
| + "objc/Framework/Classes/VideoToolbox/decoder.h",
|
| + "objc/Framework/Classes/VideoToolbox/encoder.h",
|
| + "objc/Framework/Classes/VideoToolbox/encoder.mm",
|
| + "objc/Framework/Classes/VideoToolbox/nalu_rewriter.cc",
|
| + "objc/Framework/Classes/VideoToolbox/nalu_rewriter.h",
|
| + "objc/Framework/Classes/VideoToolbox/videocodecfactory.cc",
|
| + "objc/Framework/Classes/VideoToolbox/videocodecfactory.h",
|
| ]
|
| - } else {
|
| - # Need to add a directory normally exported by libyuv.
|
| - include_dirs = [ "$rtc_libyuv_dir/include" ]
|
| +
|
| + configs += [ "..:common_objc" ]
|
| +
|
| + deps = [
|
| + ":objc_common",
|
| + ":objc_corevideoframebuffer",
|
| + "../base:rtc_base_approved",
|
| + "../common_video",
|
| + "../media:rtc_media",
|
| + "../media:rtc_media_base",
|
| + "../modules:module_api",
|
| + "../modules/video_coding:video_coding_utility",
|
| + "../modules/video_coding:webrtc_h264",
|
| + "../system_wrappers",
|
| + ]
|
| +
|
| + libs = [
|
| + "CoreFoundation.framework",
|
| + "CoreMedia.framework",
|
| + "CoreVideo.framework",
|
| + "VideoToolbox.framework",
|
| + ]
|
| +
|
| + if (!build_with_chromium && is_clang) {
|
| + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
| + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
| + }
|
| +
|
| + if (rtc_build_libyuv) {
|
| + deps += [ "$rtc_libyuv_dir" ]
|
| + public_deps = [
|
| + "$rtc_libyuv_dir",
|
| + ]
|
| + } else {
|
| + # Need to add a directory normally exported by libyuv.
|
| + include_dirs = [ "$rtc_libyuv_dir/include" ]
|
| + }
|
| }
|
| }
|
| }
|
|
|