Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Unified Diff: webrtc/sdk/objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h

Issue 2776703002: New RTCCameraVideoCapturer. (Closed)
Patch Set: Address denicija's comments. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/sdk/objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h
diff --git a/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h b/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h
new file mode 100644
index 0000000000000000000000000000000000000000..3a6cf0e558c2bd98dc4344ec8450e00d73d58d0a
--- /dev/null
+++ b/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2017 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 <Foundation/Foundation.h>
+
+#import <WebRTC/RTCMacros.h>
+#import <WebRTC/RTCVideoCapturer.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+RTC_EXPORT
+// Camera capture that implements RTCVideoCapturer. Delivers frames to a RTCVideoCapturerDelegate
+// (usually RTCVideoSource).
+@interface RTCCameraVideoCapturer : RTCVideoCapturer
+
+// Returns list of available capture devices that support video capture.
++ (NSArray<AVCaptureDevice *> *)captureDevices;
+// Returns list of formats that are supported by this class for this device.
++ (NSArray<AVCaptureDeviceFormat *> *)supportedFormatsForDevice:(AVCaptureDevice *)device;
+
+// Starts and stops the capture session asynchronously.
+- (void)startCaptureWithDevice:(AVCaptureDevice *)device
tkchin_webrtc 2017/04/06 18:06:43 This is pretty unusual. How are we supposed to cha
sakal 2017/04/07 10:31:38 We wanted to add more flexibility to the applicati
+ format:(AVCaptureDeviceFormat *)format
+ fps:(int)fps;
+// Stops the capture session asynchronously.
+- (void)stopCapture;
+
+// Capture session that is used for capturing. Valid from initialization to dealloc.
+@property(readonly, nonatomic) AVCaptureSession *captureSession;
tkchin_webrtc 2017/04/06 18:06:43 nit: properties before methods
sakal 2017/04/07 10:31:38 Done.
+
+@end
+
+NS_ASSUME_NONNULL_END

Powered by Google App Engine
This is Rietveld 408576698