1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- #import <AVFoundation/AVFoundation.h>
- #import <Foundation/Foundation.h>
- #import "RTCMacros.h"
- NS_ASSUME_NONNULL_BEGIN
- typedef NS_ENUM(NSInteger, RTCVideoRotation) {
- RTCVideoRotation_0 = 0,
- RTCVideoRotation_90 = 90,
- RTCVideoRotation_180 = 180,
- RTCVideoRotation_270 = 270,
- };
- @protocol RTC_OBJC_TYPE
- (RTCVideoFrameBuffer);
- RTC_OBJC_EXPORT
- @interface RTC_OBJC_TYPE (RTCVideoFrame) : NSObject
- @property(nonatomic, readonly) int width;
- @property(nonatomic, readonly) int height;
- @property(nonatomic, readonly) RTCVideoRotation rotation;
- @property(nonatomic, readonly) int64_t timeStampNs;
- @property(nonatomic, assign) int32_t timeStamp;
- @property(nonatomic, readonly) id<RTC_OBJC_TYPE(RTCVideoFrameBuffer)> buffer;
- - (instancetype)init NS_UNAVAILABLE;
- - (instancetype) new NS_UNAVAILABLE;
- - (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer
- rotation:(RTCVideoRotation)rotation
- timeStampNs:(int64_t)timeStampNs
- DEPRECATED_MSG_ATTRIBUTE("use initWithBuffer instead");
- - (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer
- scaledWidth:(int)scaledWidth
- scaledHeight:(int)scaledHeight
- cropWidth:(int)cropWidth
- cropHeight:(int)cropHeight
- cropX:(int)cropX
- cropY:(int)cropY
- rotation:(RTCVideoRotation)rotation
- timeStampNs:(int64_t)timeStampNs
- DEPRECATED_MSG_ATTRIBUTE("use initWithBuffer instead");
- - (instancetype)initWithBuffer:(id<RTC_OBJC_TYPE(RTCVideoFrameBuffer)>)frameBuffer
- rotation:(RTCVideoRotation)rotation
- timeStampNs:(int64_t)timeStampNs;
- - (RTC_OBJC_TYPE(RTCVideoFrame) *)newI420VideoFrame;
- @end
- NS_ASSUME_NONNULL_END
|