Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(686)

Unified Diff: webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoSource.h

Issue 2745193002: iOS: Add new RTCVideoSource interface (Closed)
Patch Set: Remove didStart/didStop callbacks. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..27a58f27cb782eb87d91353b2a45ae1ca06086e4 100644
--- a/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoSource.h
+++ b/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoSource.h
@@ -12,14 +12,30 @@
#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

Powered by Google App Engine
This is Rietveld 408576698