| 5 | #import <AVFoundation/AVFoundation.h> |
| 6 |
| 7 | #include <memory> |
| 8 | #include "api/scoped_refptr.h" |
| 9 | #include "api/media_stream_interface.h" |
| 10 | #include "Instance.h" |
| 11 |
| 12 | @class VideoCaptureView; |
| 13 |
| 14 | @interface VideoCameraCapturer : NSObject |
| 15 |
| 16 | + (NSArray<AVCaptureDevice *> *)captureDevices; |
| 17 | + (NSArray<AVCaptureDeviceFormat *> *)supportedFormatsForDevice:(AVCaptureDevice *)device; |
| 18 |
| 19 | - (instancetype)initWithSource:(webrtc::scoped_refptr<webrtc::VideoTrackSourceInterface>)source useFrontCamera:(bool)useFrontCamera keepLandscape:(bool)keepLandscape isActiveUpdated:(void (^)(bool))isActiveUpdated rotationUpdated:(void (^)(int))rotationUpdated; |
| 20 |
| 21 | - (void)startCaptureWithDevice:(AVCaptureDevice *)device format:(AVCaptureDeviceFormat *)format fps:(NSInteger)fps; |
| 22 | - (void)stopCapture; |
| 23 | - (void)setIsEnabled:(bool)isEnabled; |
| 24 | - (void)setPreferredCaptureAspectRatio:(float)aspectRatio; |
| 25 | - (void)setUncroppedSink:(std::shared_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>>)sink; |
| 26 | - (int)getRotation; |
| 27 |
| 28 | - (void)addPreviewView:(VideoCaptureView *)previewView; |
| 29 | - (void)addDirectSink:(std::weak_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>>)directSink; |
| 30 |
| 31 | @end |
| 32 | #endif // WEBRTC_IOS |
| 33 | #endif |
| 34 |