# Copyright 2016 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contributing project authors may # be found in the AUTHORS file in the root of the source tree. import("../webrtc.gni") if (is_ios) { import("//build/config/ios/rules.gni") import("//build/config/ios/ios_sdk.gni") } declare_args() { # Determine whether or not to include metal rendering rtc_use_metal_rendering = is_mac || (is_ios && current_cpu == "arm64") } group("sdk") { public_deps = [] if (!build_with_chromium) { if (is_android) { public_deps += [ "android" ] } if (is_ios) { public_deps += [ ":framework_objc" ] } } } if (is_ios || is_mac) { config("common_config_objc") { include_dirs = [ "objc/Framework/Classes", "objc/Framework/Classes/Audio", "objc/Framework/Classes/Common", "objc/Framework/Classes/Metal", "objc/Framework/Classes/PeerConnection", "objc/Framework/Classes/UI", "objc/Framework/Classes/Video", "objc/Framework/Classes/VideoToolbox", "objc/Framework/Headers", ] } rtc_static_library("common_objc") { sources = [ "objc/Framework/Classes/Common/NSString+StdString.h", "objc/Framework/Classes/Common/NSString+StdString.mm", "objc/Framework/Classes/Common/RTCDispatcher+Private.h", "objc/Framework/Classes/Common/RTCDispatcher.m", "objc/Framework/Classes/Common/RTCFieldTrials.mm", "objc/Framework/Classes/Common/RTCLogging.mm", "objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.h", "objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.m", "objc/Framework/Classes/Common/helpers.h", "objc/Framework/Classes/Common/helpers.mm", "objc/Framework/Classes/Common/scoped_cftyperef.h", "objc/Framework/Headers/WebRTC/RTCDispatcher.h", "objc/Framework/Headers/WebRTC/RTCFieldTrials.h", "objc/Framework/Headers/WebRTC/RTCLogging.h", "objc/Framework/Headers/WebRTC/RTCMacros.h", ] deps = [ "../rtc_base:rtc_base", ] configs += [ "..:common_objc" ] public_configs = [ ":common_config_objc" ] if (is_ios) { sources += [ "objc/Framework/Classes/Common/UIDevice+RTCDevice.mm", "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h", ] } if (!build_with_chromium) { sources += [ "objc/Framework/Classes/Common/RTCFileLogger.mm", "objc/Framework/Headers/WebRTC/RTCFileLogger.h", ] } } if (!build_with_chromium) { rtc_static_library("audio_objc") { sources = [ "objc/Framework/Classes/Audio/RTCAudioSession+Configuration.mm", "objc/Framework/Classes/Audio/RTCAudioSession+Private.h", "objc/Framework/Classes/Audio/RTCAudioSession.mm", "objc/Framework/Classes/Audio/RTCAudioSessionConfiguration.m", "objc/Framework/Headers/WebRTC/RTCAudioSession.h", "objc/Framework/Headers/WebRTC/RTCAudioSessionConfiguration.h", ] configs += [ "..:common_objc" ] public_configs = [ ":common_config_objc" ] deps = [ ":common_objc", "../rtc_base:rtc_base_approved", ] if (is_clang) { # Suppress warnings from the Chromium Clang plugin # (bugs.webrtc.org/163). suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } # Keep videotracksource related code in a separate target so that we can # build PeerConnectionFactory without audio/video support when that's called # for. rtc_static_library("videotracksource_objc") { sources = [ "objc/Framework/Classes/Video/RTCCVPixelBuffer.mm", "objc/Framework/Classes/Video/RTCI420Buffer+Private.h", "objc/Framework/Classes/Video/RTCI420Buffer.mm", "objc/Framework/Classes/Video/objc_frame_buffer.h", "objc/Framework/Classes/Video/objc_frame_buffer.mm", "objc/Framework/Classes/Video/objcvideotracksource.h", "objc/Framework/Classes/Video/objcvideotracksource.mm", "objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.h", ] deps = [ ":common_objc", "../api:libjingle_peerconnection_api", "../api:video_frame_api", "../common_video", "../media:rtc_media_base", "../rtc_base:rtc_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("video_objc") { sources = [ "objc/Framework/Classes/Video/AVCaptureSession+DevicePosition.h", "objc/Framework/Classes/Video/AVCaptureSession+DevicePosition.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", ] 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 = [ ":common_objc", ":videotracksource_objc", "../api:libjingle_peerconnection_api", "../api:optional", "../common_video", "../media:rtc_media_base", "../rtc_base:rtc_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("ui_objc") { 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) { sources = [ "objc/Framework/Classes/UI/RTCNSGLVideoView.m", "objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h", ] } configs += [ "..:common_objc" ] deps = [ ":common_objc", ":peerconnection_objc", ] } if (rtc_use_metal_rendering) { rtc_static_library("metal_objc") { 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 (is_mac) { sources += [ "objc/Framework/Classes/Metal/RTCMTLNSVideoView.m", "objc/Framework/Headers/WebRTC/RTCMTLNSVideoView.h", ] } libs = [ "CoreVideo.framework", "Metal.framework", "MetalKit.framework", ] deps = [ ":video_objc", "../api:video_frame_api", "../rtc_base:rtc_base_approved", ] configs += [ "..:common_objc" ] public_configs = [ ":common_config_objc" ] } } rtc_static_library("peerconnection_objc") { sources = [ "objc/Framework/Classes/PeerConnection/RTCAVFoundationVideoSource+Private.h", "objc/Framework/Classes/PeerConnection/RTCAVFoundationVideoSource.mm", "objc/Framework/Classes/PeerConnection/RTCCameraVideoCapturer.m", "objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h", ] if (is_ios) { sources += [ "objc/Framework/Classes/PeerConnection/RTCFileVideoCapturer.h", "objc/Framework/Classes/PeerConnection/RTCFileVideoCapturer.m", ] } libs = [ "AVFoundation.framework" ] if (is_ios) { libs += [ "CoreGraphics.framework" ] } configs += [ "..:common_objc" ] public_configs = [ ":common_config_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" ] } deps = [ ":common_objc", ":corevideoframebuffer_objc", ":peerconnectionfactory_objc", ":video_objc", "../api:video_frame_api", "../media:rtc_media_base", "../pc:libjingle_peerconnection", "../rtc_base:rtc_base", ] if (rtc_use_metal_rendering) { deps += [ ":metal_objc" ] } if (rtc_build_libyuv) { deps += [ "$rtc_libyuv_dir" ] public_deps = [ "$rtc_libyuv_dir", ] } } rtc_static_library("peerconnectionfactory_objc") { sources = [ "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Native.h", "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Private.h", "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory.mm", "objc/Framework/Classes/PeerConnection/RTCVideoCodecH264.mm", ] public_configs = [ ":common_config_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" ] } deps = [ ":common_objc", ":corevideoframebuffer_objc", ":peerconnectionfactory_base_objc", ":video_objc", ":videotoolbox_objc", ":videotracksource_objc", "../api:video_frame_api", "../api/audio_codecs:builtin_audio_decoder_factory", "../api/audio_codecs:builtin_audio_encoder_factory", "../api/video_codecs:video_codecs_api", "../media:rtc_audio_video", "../media:rtc_media_base", "../pc:create_pc_factory", "../pc:peerconnection", "../rtc_base:rtc_base", "../system_wrappers:field_trial_api", ] } # Build the PeerConnectionFactory without audio/video support. # This target depends on the objc_peeerconnectionfactory_base which still # includes some audio/video related objects such as RTCAudioSource because # these objects are just thin wrappers of native C++ interfaces required # when implementing webrtc::PeerConnectionFactoryInterface and # webrtc::PeerConnectionInterface. # The applications which only use WebRTC DataChannel can depend on this # target instead of rtc_sdk_objc. rtc_static_library("peerconnectionfactory_no_media_objc") { defines = [ "HAVE_NO_MEDIA" ] sources = [ "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Native.h", "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Private.h", "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory.mm", ] public_configs = [ ":common_config_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" ] } deps = [ ":peerconnectionfactory_base_objc", "../api:libjingle_peerconnection_api", "../rtc_base:rtc_base", ] } rtc_static_library("peerconnectionfactory_base_objc") { sources = [ "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/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/RTCEncodedImage.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/RTCIntervalRange+Private.h", "objc/Framework/Classes/PeerConnection/RTCIntervalRange.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/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/RTCRtpFragmentationHeader.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/RTCVideoCodec+Private.h", "objc/Framework/Classes/PeerConnection/RTCVideoCodec.mm", "objc/Framework/Classes/PeerConnection/RTCVideoCodecVP8.mm", "objc/Framework/Classes/PeerConnection/RTCVideoCodecVP9.mm", "objc/Framework/Classes/PeerConnection/RTCVideoEncoderSettings.mm", "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/Classes/PeerConnection/RTCWrappedNativeVideoDecoder.h", "objc/Framework/Classes/PeerConnection/RTCWrappedNativeVideoDecoder.mm", "objc/Framework/Classes/PeerConnection/RTCWrappedNativeVideoEncoder.h", "objc/Framework/Classes/PeerConnection/RTCWrappedNativeVideoEncoder.mm", "objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h", "objc/Framework/Headers/WebRTC/RTCAudioSource.h", "objc/Framework/Headers/WebRTC/RTCAudioTrack.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/RTCIntervalRange.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/RTCVideoFrameBuffer.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", ] configs += [ "..:common_objc" ] public_configs = [ ":common_config_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" ] } deps = [ ":common_objc", ":corevideoframebuffer_objc", ":videotracksource_objc", "../api:video_frame_api", "../api/video_codecs:video_codecs_api", "../common_video", "../media:rtc_media_base", "../modules:module_api", "../modules/video_coding:webrtc_vp8", "../modules/video_coding:webrtc_vp9", "../pc:peerconnection", "../rtc_base:rtc_base", ] } if (rtc_include_tests) { rtc_source_set("sdk_unittests_objc") { 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" ] } sources = [ "objc/Framework/UnitTests/RTCConfigurationTest.mm", "objc/Framework/UnitTests/RTCDataChannelConfigurationTest.mm", "objc/Framework/UnitTests/RTCIceCandidateTest.mm", "objc/Framework/UnitTests/RTCIceServerTest.mm", "objc/Framework/UnitTests/RTCIntervalRangeTests.mm", "objc/Framework/UnitTests/RTCMediaConstraintsTest.mm", "objc/Framework/UnitTests/RTCPeerConnectionTest.mm", "objc/Framework/UnitTests/RTCSessionDescriptionTest.mm", "objc/Framework/UnitTests/RTCTracingTest.mm", "objc/Framework/UnitTests/avformatmappertests.mm", "objc/Framework/UnitTests/objc_video_decoder_factory_tests.mm", "objc/Framework/UnitTests/objc_video_encoder_factory_tests.mm", "objc/Framework/UnitTests/scoped_cftyperef_tests.mm", ] if (is_ios && !(use_ios_simulator && # The tests crash on these simulator versions: (ios_sdk_version == "10.0" || ios_sdk_version == "10.1"))) { sources += [ "objc/Framework/UnitTests/RTCCameraVideoCapturerTests.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 = [ ":common_objc", ":peerconnection_objc", ":peerconnectionfactory_objc", ":videotoolbox_objc", ":videotracksource_objc", "..//system_wrappers:system_wrappers_default", "../media:rtc_media_base", "../modules:module_api", "../rtc_base:rtc_base_tests_utils", "../system_wrappers:system_wrappers_default", "//test:test_support", "//third_party/ocmock", ] if (is_ios) { sources += [ "objc/Framework/UnitTests/RTCAudioSessionTest.mm" ] # RTCMTLVideoView not supported on 32-bit arm if (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" ] } } } if (is_ios) { ios_framework_bundle("framework_objc") { info_plist = "objc/Framework/Info.plist" output_name = "WebRTC" common_objc_headers = [ "objc/Framework/Headers/WebRTC/RTCAudioSession.h", "objc/Framework/Headers/WebRTC/RTCVideoCodec.h", "objc/Framework/Headers/WebRTC/RTCVideoCodecFactory.h", "objc/Framework/Headers/WebRTC/RTCAudioSessionConfiguration.h", "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/RTCIntervalRange.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/RTCVideoCodecH264.h", "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP8.h", "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP9.h", "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP8.h", "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP9.h", "objc/Framework/Headers/WebRTC/RTCVideoFrame.h", "objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.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 if (!build_with_chromium) { sources += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ] public_headers += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ] } ldflags = [ "-all_load", "-install_name", "@rpath/$output_name.framework/$output_name", ] deps = [ ":audio_objc", ":peerconnection_objc", ":ui_objc", "../rtc_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" ] public_configs = [ ":common_config_objc" ] if (!build_with_chromium && is_clang) { # Suppress warnings from the Chromium Clang plugin # (bugs.webrtc.org/163). configs -= [ "//build/config/clang:find_bad_constructs" ] } } } rtc_static_library("rtc_sdk_objc") { complete_static_lib = true deps = [ ":peerconnection_objc", ":ui_objc", "../system_wrappers:field_trial_default", "../system_wrappers:metrics_default", ] } rtc_static_library("corevideoframebuffer_objc") { sources = [ "objc/Framework/Classes/Video/corevideo_frame_buffer.cc", "objc/Framework/Classes/Video/corevideo_frame_buffer.h", ] deps = [ "../common_video", "../rtc_base:rtc_base_approved", ] 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" ] } rtc_static_library("video_toolbox_cc") { visibility = [ ":videotoolbox_objc" ] sources = [ "objc/Framework/Classes/VideoToolbox/helpers.cc", "objc/Framework/Classes/VideoToolbox/helpers.h", "objc/Framework/Classes/VideoToolbox/nalu_rewriter.cc", "objc/Framework/Classes/VideoToolbox/nalu_rewriter.h", ] deps = [ "../common_video", "../modules:module_api", "../modules/video_coding:webrtc_h264", "../rtc_base:rtc_base_approved", ] 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("videotoolbox_objc") { sources = [ "objc/Framework/Classes/VideoToolbox/RTCVideoDecoderH264.mm", "objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm", "objc/Framework/Classes/VideoToolbox/objc_video_decoder_factory.h", "objc/Framework/Classes/VideoToolbox/objc_video_decoder_factory.mm", "objc/Framework/Classes/VideoToolbox/objc_video_encoder_factory.h", "objc/Framework/Classes/VideoToolbox/objc_video_encoder_factory.mm", "objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.h", ] configs += [ "..:common_objc" ] deps = [ ":common_objc", ":video_objc", ":video_toolbox_cc", ":videotracksource_objc", "../api/video_codecs:video_codecs_api", "../common_video", "../media:rtc_media", "../media:rtc_media_base", "../modules:module_api", "../modules/video_coding:video_coding_utility", "../modules/video_coding:webrtc_h264", "../rtc_base:rtc_base_approved", "../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" ] } } } }