iOS: Add new RTCVideoSource interface
The new RTCVideoSource interface can be used by custom implementations of RTCVideoCapturer. BUG=webrtc:7177 TBR=tommi Review-Url: https://codereview.webrtc.org/2745193002 Cr-Commit-Position: refs/heads/master@{#17409}
This commit is contained in:
@ -12,14 +12,29 @@
|
||||
|
||||
#import <WebRTC/RTCMacros.h>
|
||||
#import <WebRTC/RTCMediaSource.h>
|
||||
#import <WebRTC/RTCVideoCapturer.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
RTC_EXPORT
|
||||
@interface RTCVideoSource : RTCMediaSource
|
||||
|
||||
@interface RTCVideoSource : RTCMediaSource<RTCVideoCapturerDelegate>
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
|
||||
// RTCVideoCapturerDelegate protocol implementation.
|
||||
- (void)capturer:(RTCVideoCapturer*)capturer didCaptureVideoFrame:(RTCVideoFrame*)frame;
|
||||
|
||||
/**
|
||||
* Calling this function will cause frames to be scaled down to the
|
||||
* requested resolution. Also, frames will be cropped to match the
|
||||
* requested aspect ratio, and frames will be dropped to match the
|
||||
* requested fps. The requested aspect ratio is orientation agnostic and
|
||||
* will be adjusted to maintain the input orientation, so it doesn't
|
||||
* matter if e.g. 1280x720 or 720x1280 is requested.
|
||||
*/
|
||||
- (void)adaptOutputFormatToWidth:(int)width height:(int)height fps:(int)fps;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
Reference in New Issue
Block a user