blob: 943ddc8685e5a266a9c75a5c6c8da983ae2587d3 [file] [log] [blame]
sakal3883ccb2017-03-31 05:12:12 -07001/*
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#import <Foundation/Foundation.h>
hansknoechel921b2469b2017-06-21 03:44:05 -070012#import <AVFoundation/AVFoundation.h>
sakal3883ccb2017-03-31 05:12:12 -070013
14#import <WebRTC/RTCMacros.h>
15#import <WebRTC/RTCVideoCapturer.h>
16
17NS_ASSUME_NONNULL_BEGIN
18
19RTC_EXPORT
20// Camera capture that implements RTCVideoCapturer. Delivers frames to a RTCVideoCapturerDelegate
21// (usually RTCVideoSource).
22@interface RTCCameraVideoCapturer : RTCVideoCapturer
23
sakalcee51412017-05-03 03:50:17 -070024// Capture session that is used for capturing. Valid from initialization to dealloc.
25@property(readonly, nonatomic) AVCaptureSession *captureSession;
26
sakal3883ccb2017-03-31 05:12:12 -070027// Returns list of available capture devices that support video capture.
28+ (NSArray<AVCaptureDevice *> *)captureDevices;
29// Returns list of formats that are supported by this class for this device.
30+ (NSArray<AVCaptureDeviceFormat *> *)supportedFormatsForDevice:(AVCaptureDevice *)device;
31
32// Starts and stops the capture session asynchronously.
33- (void)startCaptureWithDevice:(AVCaptureDevice *)device
34 format:(AVCaptureDeviceFormat *)format
sakalea12f4c2017-05-05 00:45:30 -070035 fps:(NSInteger)fps;
sakal3883ccb2017-03-31 05:12:12 -070036// Stops the capture session asynchronously.
37- (void)stopCapture;
38
sakal3883ccb2017-03-31 05:12:12 -070039@end
40
41NS_ASSUME_NONNULL_END