OTVideoFrame Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | OTVideoKit.h |
Overview
Defines a frame of a video. See [OTVideoRender renderVideoFrame:] and [OTVideoCaptureConsumer consumeFrame:].
Properties of OTVideoFrame objects
planes
An array of planes in the video frame.
@property (nonatomic, strong) NSPointerArray *planesDeclared In
OTVideoKit.h
timestamp
A timestap of the video frame.
@property (nonatomic, assign) CMTime timestampDeclared In
OTVideoKit.h
orientation
The orientation of the video frame.
@property (nonatomic, assign) OTVideoOrientation orientationDeclared In
OTVideoKit.h
format
The format of the video frame.
@property (nonatomic, strong) OTVideoFormat *formatDeclared In
OTVideoKit.h
metadata
The metadata associated with this video frame, if any.
@property (nonatomic, readonly) NSData *metadataDeclared In
OTVideoKit.h
Instantiating OTVideoFrame objects
– initWithFormat:
Initializes an OTVideoFrame object with a specified format.
- (nonnull id)initWithFormat:(nonnull OTVideoFormat *)videoFormatParameters
videoFormat |
The video format used by the video frame. |
|---|
Declared In
OTVideoKit.h
– setPlanesWithPointers:numPlanes:
Sets planes for the video frame.
- (void)setPlanesWithPointers:(uint8_t *_Nonnull [ _Nonnull ])planes numPlanes:(int)numPlanesParameters
planes |
The planes to assign. |
|---|---|
numPlanes |
The number of planes to assign. |
Declared In
OTVideoKit.h
– convertInPlace:planes:strides:
Converts video frame without allocating new planes.
- (void)convertInPlace:(OTPixelFormat)pixelFormat planes:(uint8_t *_Nonnull *_Nonnull)planes strides:(int *_Nonnull)stridesDeclared In
OTVideoKit.h
– getPlaneBinaryData:
Gets the binary data for the individual video frame.
- (uint8_t *_Nonnull)getPlaneBinaryData:(int)planeParameters
plane |
The planes to assign. |
|---|
Declared In
OTVideoKit.h
– getPlaneStride:
Gets the stride value for the plane
- (int)getPlaneStride:(int)planeParameters
plane |
The planes to assign. |
|---|
Declared In
OTVideoKit.h
– setMetadata:error:
Sets the metadata associated with this video frame.
- (void)setMetadata:(nonnull NSData *)data error:(out OTError *_Nullable *_Nullable)errorParameters
data |
The metadata to assign. |
|---|---|
error |
If the size of the metadata passed is bigger than 32 bytes
this value is set to an OTError object with the |
Declared In
OTVideoKit.h