OTVideoFrame
Defines a frame of a video. See [OTVideoRender renderVideoFrame:] and [OTVideoCaptureConsumer consumeFrame:].
Properties
| Name | Type | Description |
|---|---|---|
planes |
NSPointerArray * | An array of planes in the video frame. |
timestamp |
CMTime | A timestap of the video frame. |
orientation |
OTVideoOrientation | The orientation of the video frame. |
format |
OTVideoFormat * | The format of the video frame. |
metadata |
NSData * | The metadata associated with this video frame, if any. Deprecated: This property is deprecated and will be removed in a future version of the library. |
Methods
| Name | Description |
|---|---|
init() → {id} |
Initializes an OTVideoFrame object. |
initWithFormat:(videoFormat) → {id} |
Initializes an OTVideoFrame object with a specified format. |
setPlanesWithPointers:numPlanes:(planes, numPlanes) |
Sets planes for the video frame. |
clearPlanes() |
Cleans the planes in the video frame. |
convertInPlace:planes:strides:(pixelFormat, planes, strides) |
Converts video frame without allocating new planes. |
getPlaneBinaryData:(plane) → {uint8_t *} |
Gets the binary data for the individual video frame. |
getPlaneStride:(plane) → {int} |
Gets the stride value for the plane |
init() → {id}
Initializes an OTVideoFrame object.
Returns:
initWithFormat:(videoFormat) → {id}
Initializes an OTVideoFrame object with a specified format.
Parameters:
| Name | Type | Description |
|---|---|---|
videoFormat |
OTVideoFormat * | The video format used by the video frame. |
Returns:
setPlanesWithPointers:numPlanes:(planes, numPlanes)
Sets planes for the video frame.
Parameters:
| Name | Type | Description |
|---|---|---|
planes |
uint8_t *[] | The planes to assign. |
numPlanes |
int | The number of planes to assign. |
clearPlanes()
Cleans the planes in the video frame.
convertInPlace:planes:strides:(pixelFormat, planes, strides)
Converts video frame without allocating new planes.
Parameters:
| Name | Type | Description |
|---|---|---|
pixelFormat |
OTPixelFormat | |
planes |
uint8_t * * | |
strides |
int * |
getPlaneBinaryData:(plane) → {uint8_t *}
Gets the binary data for the individual video frame.
Parameters:
| Name | Type | Description |
|---|---|---|
plane |
int | The planes to assign. |
Returns:
getPlaneStride:(plane) → {int}
Gets the stride value for the plane
Parameters:
| Name | Type | Description |
|---|---|---|
plane |
int | The planes to assign. |