Add an example app for iOS native API.
Demonstrates how to use the iOS native API to wrap components into
C++ classes.
This CL also introduces a native API wrapper for the capturer.
The C++ code is forked from the corresponding CL for Android at
https://webrtc-review.googlesource.com/c/src/+/60540
Bug: webrtc:8832
Change-Id: I12d9f30e701c0222628e329218f6d5bfca26e6e0
Reviewed-on: https://webrtc-review.googlesource.com/61422
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22484}
diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn
index 1ef7de2..e052edf 100644
--- a/sdk/BUILD.gn
+++ b/sdk/BUILD.gn
@@ -296,13 +296,29 @@
}
}
+ rtc_static_library("videocapturebase_objc") {
+ visibility = [ "*" ]
+ sources = [
+ "objc/Framework/Classes/PeerConnection/RTCVideoCapturer.m",
+ "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h",
+ ]
+ libs = [ "AVFoundation.framework" ]
+
+ configs += [ "..:common_objc" ]
+
+ public_configs = [ ":common_config_objc" ]
+
+ deps = [
+ ":common_objc",
+ ":videoframebuffer_objc",
+ ]
+ }
+
rtc_static_library("videocapture_objc") {
visibility = [ "*" ]
sources = [
"objc/Framework/Classes/PeerConnection/RTCCameraVideoCapturer.m",
- "objc/Framework/Classes/PeerConnection/RTCVideoCapturer.m",
"objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h",
- "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h",
]
if (is_ios) {
sources += [
@@ -325,6 +341,7 @@
deps = [
":common_objc",
":video_objc",
+ ":videocapturebase_objc",
":videoframebuffer_objc",
]
}
@@ -922,6 +939,8 @@
rtc_static_library("native_api") {
visibility = [ "*" ]
sources = [
+ "objc/Framework/Native/api/video_capturer.h",
+ "objc/Framework/Native/api/video_capturer.mm",
"objc/Framework/Native/api/video_decoder_factory.h",
"objc/Framework/Native/api/video_decoder_factory.mm",
"objc/Framework/Native/api/video_encoder_factory.h",
@@ -946,9 +965,11 @@
deps = [
":native_video",
+ ":videocapturebase_objc",
":videocodec_objc",
":videoframebuffer_objc",
":videorenderer_objc",
+ "../api:libjingle_peerconnection_api",
"../api:video_frame_api",
"../api/video_codecs:video_codecs_api",
"../common_video",
@@ -984,6 +1005,7 @@
deps = [
":common_objc",
+ ":videocapturebase_objc",
":videocodec_objc",
":videoframebuffer_objc",
":videorenderer_objc",