TVIVideoRenderer Protocol Reference
Conforms to | NSObject |
---|---|
Declared in | TVIVideoRenderer.h |
Overview
TVIVideoRenderers render frames from video tracks.
@note: All the renderers attached to a video track will be called back on the same background thread.
– renderFrame:
required method
Render an individual frame.
- (void)renderFrame:(nonnull TVII420Frame *)frame
Parameters
frame |
The frame to be rendered. |
---|
Discussion
Note: You must copy or strongly reference (retain) the TVII420Frame object before this call returns.
Declared In
TVIVideoRenderer.h
– updateVideoSize:orientation:
required method
Informs your renderer that the size and/or orientation of the video stream is about to change.
- (void)updateVideoSize:(CMVideoDimensions)videoSize orientation:(TVIVideoOrientation)orientation
Parameters
videoSize |
The new dimensions for the video stream. |
---|---|
orientation |
The new orientation of the video stream.
Always |
Discussion
Note: Expect the next delivered frame to have the new orientation.
Declared In
TVIVideoRenderer.h
– supportsVideoFrameOrientation
Indicates support for video frame orientation metadata.
- (BOOL)supportsVideoFrameOrientation
Return Value
Your renderer should return YES
if it prefers un-rotated metadata tagged frames.
If you would instead prefer pre-rotated frames you should either return NO
or not implement this method.
Discussion
Note: Supporting orientation allows frames to be delivered to the renderer without an additional copy.
Declared In
TVIVideoRenderer.h