Index: webrtc/sdk/BUILD.gn |
diff --git a/webrtc/sdk/BUILD.gn b/webrtc/sdk/BUILD.gn |
index 78e10025801ad55d4dfc619fed2ddaca150ddeee..fd2c551ebf2d3a24fa5de68816d07c211e11fddf 100644 |
--- a/webrtc/sdk/BUILD.gn |
+++ b/webrtc/sdk/BUILD.gn |
@@ -101,8 +101,11 @@ if (is_ios || is_mac) { |
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
} |
} |
+ |
rtc_static_library("objc_video") { |
+ defines = [ "HAVE_RTC_VIDEO" ] |
sources = [ |
+ "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Video.mm", |
"objc/Framework/Classes/Video/RTCAVFoundationVideoCapturerInternal.h", |
"objc/Framework/Classes/Video/RTCAVFoundationVideoCapturerInternal.mm", |
"objc/Framework/Classes/Video/RTCDefaultShader.h", |
@@ -157,6 +160,19 @@ if (is_ios || is_mac) { |
} |
} |
+ rtc_source_set("objc_null_video") { |
+ sources = [ |
+ "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Video.mm", |
+ ] |
+ |
+ 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" ] |
+ } |
+ } |
+ |
rtc_static_library("objc_ui") { |
if (is_ios) { |
sources = [ |
@@ -221,11 +237,66 @@ if (is_ios || is_mac) { |
sources = [ |
"objc/Framework/Classes/PeerConnection/RTCAVFoundationVideoSource+Private.h", |
"objc/Framework/Classes/PeerConnection/RTCAVFoundationVideoSource.mm", |
+ "objc/Framework/Classes/PeerConnection/RTCCameraVideoCapturer.m", |
+ "objc/Framework/Classes/PeerConnection/RTCMediaStream+Private.h", |
+ "objc/Framework/Classes/PeerConnection/RTCMediaStream.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", |
+ ] |
+ 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 = [ ":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_media", |
+ ":objc_peerconnection_base", |
+ ":objc_video", |
+ "../api:video_frame_api", |
+ "../base:rtc_base", |
+ "../media:rtc_media_base", |
+ "../pc:create_pc_factory", |
+ "../pc:libjingle_peerconnection", |
+ ] |
+ |
+ if (rtc_use_metal_rendering) { |
+ deps += [ ":objc_metal" ] |
+ } |
+ |
+ if (rtc_build_libyuv) { |
+ deps += [ "$rtc_libyuv_dir" ] |
+ public_deps = [ |
+ "$rtc_libyuv_dir", |
+ ] |
+ } |
+ } |
+ |
+ rtc_static_library("objc_peerconnection_base") { |
+ 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/RTCCameraVideoCapturer.m", |
"objc/Framework/Classes/PeerConnection/RTCConfiguration+Private.h", |
"objc/Framework/Classes/PeerConnection/RTCConfiguration.mm", |
"objc/Framework/Classes/PeerConnection/RTCDataChannel+Private.h", |
@@ -242,8 +313,6 @@ if (is_ios || is_mac) { |
"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", |
@@ -275,10 +344,6 @@ if (is_ios || is_mac) { |
"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", |
@@ -312,17 +377,6 @@ if (is_ios || is_mac) { |
"objc/Framework/Headers/WebRTC/RTCVideoTrack.h", |
"objc/Framework/Headers/WebRTC/RTCVideoViewShading.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" ] |
@@ -336,23 +390,11 @@ if (is_ios || is_mac) { |
deps = [ |
":objc_common", |
":objc_corevideoframebuffer", |
- ":objc_video", |
"../api:video_frame_api", |
"../base:rtc_base", |
"../media:rtc_media_base", |
- "../pc:libjingle_peerconnection", |
+ "../pc:peerconnection", |
] |
- |
- if (rtc_use_metal_rendering) { |
- deps += [ ":objc_metal" ] |
- } |
- |
- if (rtc_build_libyuv) { |
- deps += [ "$rtc_libyuv_dir" ] |
- public_deps = [ |
- "$rtc_libyuv_dir", |
- ] |
- } |
} |
if (rtc_include_tests) { |
@@ -483,7 +525,9 @@ if (is_ios || is_mac) { |
":objc_audio", |
":objc_peerconnection", |
":objc_ui", |
+ ":objc_video", |
"../base:rtc_base_approved", |
+ "../pc:create_pc_factory", |
"../system_wrappers:field_trial_default", |
"../system_wrappers:metrics_default", |
] |
@@ -584,5 +628,52 @@ if (is_ios || is_mac) { |
include_dirs = [ "$rtc_libyuv_dir/include" ] |
} |
} |
+ |
+ rtc_source_set("objc_media") { |
+ defines = [ |
+ "HAVE_RTC_AUDIO", |
+ "HAVE_RTC_VIDEO", |
+ ] |
+ sources = [ |
+ "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Media.mm", |
+ "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Media.mm", |
+ ] |
+ |
+ 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" ] |
+ } |
+ |
+ public_deps = [ |
+ "../pc:create_pc_factory", |
+ ] |
+ } |
+ |
+ rtc_source_set("objc_null_media") { |
+ sources = [ |
+ "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Media.mm", |
+ "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Media.mm", |
+ ] |
+ |
+ 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" ] |
+ } |
+ } |
+ |
+ rtc_static_library("objc_peerconnection_datachannelonly") { |
+ complete_static_lib = true |
+ public_deps = [ |
+ ":objc_null_media", |
+ ":objc_null_video", |
+ ":objc_peerconnection_base", |
+ "../system_wrappers:field_trial_default", |
+ "../system_wrappers:metrics_default", |
+ ] |
+ } |
} |
} |