OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 * webrtc::AVFoundationVideoCapturer. We do not currently provide a wrapper for | 22 * webrtc::AVFoundationVideoCapturer. We do not currently provide a wrapper for |
23 * that capturer because cricket::VideoCapturer is not ref counted and we cannot | 23 * that capturer because cricket::VideoCapturer is not ref counted and we cannot |
24 * guarantee its lifetime. Instead, we expose its properties through the ref | 24 * guarantee its lifetime. Instead, we expose its properties through the ref |
25 * counted video source interface. | 25 * counted video source interface. |
26 */ | 26 */ |
27 RTC_EXPORT | 27 RTC_EXPORT |
28 @interface RTCAVFoundationVideoSource : RTCVideoSource | 28 @interface RTCAVFoundationVideoSource : RTCVideoSource |
29 | 29 |
30 - (instancetype)init NS_UNAVAILABLE; | 30 - (instancetype)init NS_UNAVAILABLE; |
31 | 31 |
| 32 /** |
| 33 * Calling this function will cause frames to be scaled down to the |
| 34 * requested resolution. Also, frames will be cropped to match the |
| 35 * requested aspect ratio, and frames will be dropped to match the |
| 36 * requested fps. The requested aspect ratio is orientation agnostic and |
| 37 * will be adjusted to maintain the input orientation, so it doesn't |
| 38 * matter if e.g. 1280x720 or 720x1280 is requested. |
| 39 */ |
| 40 - (void)adaptOutputFormatToWidth:(int)width height:(int)height fps:(int)fps; |
| 41 |
32 /** Returns whether rear-facing camera is available for use. */ | 42 /** Returns whether rear-facing camera is available for use. */ |
33 @property(nonatomic, readonly) BOOL canUseBackCamera; | 43 @property(nonatomic, readonly) BOOL canUseBackCamera; |
34 | 44 |
35 /** Switches the camera being used (either front or back). */ | 45 /** Switches the camera being used (either front or back). */ |
36 @property(nonatomic, assign) BOOL useBackCamera; | 46 @property(nonatomic, assign) BOOL useBackCamera; |
37 | 47 |
38 /** Returns the active capture session. */ | 48 /** Returns the active capture session. */ |
39 @property(nonatomic, readonly) AVCaptureSession *captureSession; | 49 @property(nonatomic, readonly) AVCaptureSession *captureSession; |
40 | 50 |
41 @end | 51 @end |
42 | 52 |
43 NS_ASSUME_NONNULL_END | 53 NS_ASSUME_NONNULL_END |
OLD | NEW |