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

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

Issue 2700113003: Add RTCVideoFrame init function from CVPixelBufferRef (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « webrtc/sdk/objc/Framework/Classes/RTCVideoFrame.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoFrame.h
diff --git a/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoFrame.h b/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoFrame.h
index 6f062f814e8de9a3f0860b10b4e6c9c62f3fe413..4fbc0b9dc8f9653935596a7699c2eec422c4800e 100644
--- a/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoFrame.h
+++ b/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoFrame.h
@@ -43,8 +43,28 @@ RTC_EXPORT
- (instancetype)init NS_UNAVAILABLE;
daniela-webrtc 2017/02/20 12:10:31 Super nit: I know that this is not part of the CL,
magjed_webrtc 2017/02/20 16:59:03 Done.
+/** Initialize an RTCVideoFrame from a pixel buffer, rotation, and timestamp.
+ */
+- (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer
+ rotation:(int)rotation
+ timeStampNs:(int64_t)timeStampNs;
+
+/** Initialize an RTCVideoFrame from a pixel buffer combined with cropping and
+ * scaling. Cropping will be applied first on the pixel buffer, followed by
+ * scaling to the final resolution of scaledWidth x scaledHeight.
+ */
+- (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer
+ scaledWidth:(int)scaledWidth
+ scaledHeight:(int)scaledHeight
+ cropWidth:(int)cropWidth
+ cropHeight:(int)cropHeight
+ cropX:(int)cropX
+ cropY:(int)cropY
+ rotation:(int)rotation
+ timeStampNs:(int64_t)timeStampNs;
+
/** Return a frame that is guaranteed to be I420, i.e. it is possible to access
- * the YUV data on it.
+ * the YUV data on it.
*/
- (RTCVideoFrame*)convertToI420;
« no previous file with comments | « webrtc/sdk/objc/Framework/Classes/RTCVideoFrame.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698