Index: webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoSource.h |
diff --git a/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoSource.h b/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoSource.h |
index 96bb6f369973c55ea7345d8528b368fc6cebb4e1..b5be132bcbd94d22a5792702804c2f4a66d2febb 100644 |
--- a/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoSource.h |
+++ b/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoSource.h |
@@ -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> |
tkchin_webrtc
2017/04/06 18:01:52
space after RTCMediaSource
magjed_webrtc
2017/04/10 12:12:50
Done.
|
- (instancetype)init NS_UNAVAILABLE; |
+// RTCVideoCapturerDelegate protocol implementation. |
tkchin_webrtc
2017/04/06 18:01:52
not required (part of decl above). Can be removed.
magjed_webrtc
2017/04/10 12:12:50
Done.
|
+- (void)capturer:(RTCVideoCapturer*)capturer didCaptureVideoFrame:(RTCVideoFrame*)frame; |
tkchin_webrtc
2017/04/06 18:01:52
style:
(RTCVideoCapturer *)
(RTCVideoFrame *)
magjed_webrtc
2017/04/10 12:12:50
Acknowledged.
|
+ |
+/** |
+ * 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 |