| 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 bfad6088970ac7cc30dcf0c2e1d44885b895a992..cbd8cc74e81775fbe340a34a7dcd5f7d1d9bc385 100644
|
| --- a/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoFrame.h
|
| +++ b/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoFrame.h
|
| @@ -15,25 +15,33 @@
|
|
|
| NS_ASSUME_NONNULL_BEGIN
|
|
|
| +typedef NS_ENUM(NSInteger, RTCVideoRotation) {
|
| + RTCVideoRotation_0 = 0,
|
| + RTCVideoRotation_90 = 90,
|
| + RTCVideoRotation_180 = 180,
|
| + RTCVideoRotation_270 = 270,
|
| +};
|
| +
|
| // RTCVideoFrame is an ObjectiveC version of webrtc::VideoFrame.
|
| RTC_EXPORT
|
| @interface RTCVideoFrame : NSObject
|
|
|
| /** Width without rotation applied. */
|
| -@property(nonatomic, readonly) size_t width;
|
| +@property(nonatomic, readonly) int width;
|
|
|
| /** Height without rotation applied. */
|
| -@property(nonatomic, readonly) size_t height;
|
| -@property(nonatomic, readonly) int rotation;
|
| -@property(nonatomic, readonly) size_t chromaWidth;
|
| -@property(nonatomic, readonly) size_t chromaHeight;
|
| -// These can return NULL if the object is not backed by a buffer.
|
| -@property(nonatomic, readonly, nullable) const uint8_t *yPlane;
|
| -@property(nonatomic, readonly, nullable) const uint8_t *uPlane;
|
| -@property(nonatomic, readonly, nullable) const uint8_t *vPlane;
|
| -@property(nonatomic, readonly) int32_t yPitch;
|
| -@property(nonatomic, readonly) int32_t uPitch;
|
| -@property(nonatomic, readonly) int32_t vPitch;
|
| +@property(nonatomic, readonly) int height;
|
| +@property(nonatomic, readonly) RTCVideoRotation rotation;
|
| +/** Accessing YUV data should only be done for I420 frames, i.e. if nativeHandle
|
| + * is null. It is always possible to get such a frame by calling
|
| + * newI420VideoFrame.
|
| + */
|
| +@property(nonatomic, readonly, nullable) const uint8_t *dataY;
|
| +@property(nonatomic, readonly, nullable) const uint8_t *dataU;
|
| +@property(nonatomic, readonly, nullable) const uint8_t *dataV;
|
| +@property(nonatomic, readonly) int strideY;
|
| +@property(nonatomic, readonly) int strideU;
|
| +@property(nonatomic, readonly) int strideV;
|
|
|
| /** Timestamp in nanoseconds. */
|
| @property(nonatomic, readonly) int64_t timeStampNs;
|
| @@ -43,10 +51,10 @@ RTC_EXPORT
|
|
|
| - (instancetype)init NS_UNAVAILABLE;
|
|
|
| -/** If the frame is backed by a CVPixelBuffer, creates a backing i420 frame.
|
| - * Calling the yuv plane properties will call this method if needed.
|
| +/** Return a frame that is guaranteed to be I420, i.e. it is possible to access
|
| + * the YUV data on it.
|
| */
|
| -- (void)convertBufferIfNeeded;
|
| +- (RTCVideoFrame *)newI420VideoFrame;
|
|
|
| @end
|
|
|
|
|