sakal | 3883ccb | 2017-03-31 05:12:12 -0700 | [diff] [blame] | 1 | /* |
| 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> |
hansknoechel92 | 1b2469b | 2017-06-21 03:44:05 -0700 | [diff] [blame] | 12 | #import <AVFoundation/AVFoundation.h> |
sakal | 3883ccb | 2017-03-31 05:12:12 -0700 | [diff] [blame] | 13 | |
| 14 | #import <WebRTC/RTCMacros.h> |
| 15 | #import <WebRTC/RTCVideoCapturer.h> |
| 16 | |
| 17 | NS_ASSUME_NONNULL_BEGIN |
| 18 | |
| 19 | RTC_EXPORT |
| 20 | // Camera capture that implements RTCVideoCapturer. Delivers frames to a RTCVideoCapturerDelegate |
| 21 | // (usually RTCVideoSource). |
| 22 | @interface RTCCameraVideoCapturer : RTCVideoCapturer |
| 23 | |
sakal | cee5141 | 2017-05-03 03:50:17 -0700 | [diff] [blame] | 24 | // Capture session that is used for capturing. Valid from initialization to dealloc. |
| 25 | @property(readonly, nonatomic) AVCaptureSession *captureSession; |
| 26 | |
sakal | 3883ccb | 2017-03-31 05:12:12 -0700 | [diff] [blame] | 27 | // 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 |
sakal | ea12f4c | 2017-05-05 00:45:30 -0700 | [diff] [blame] | 35 | fps:(NSInteger)fps; |
sakal | 3883ccb | 2017-03-31 05:12:12 -0700 | [diff] [blame] | 36 | // Stops the capture session asynchronously. |
| 37 | - (void)stopCapture; |
| 38 | |
sakal | 3883ccb | 2017-03-31 05:12:12 -0700 | [diff] [blame] | 39 | @end |
| 40 | |
| 41 | NS_ASSUME_NONNULL_END |