TVIVideoRenderer Protocol Reference

Conforms to NSObject
Declared in TVIVideoRenderer.h

Overview

TVIVideoRenderers render frames from video tracks.

– renderFrame: required method

Render an individual frame.

- (void)renderFrame:(nonnull TVIVideoFrame *)frame

Parameters

frame

The frame to be rendered.

Discussion

Your renderer is required to support frames in the format TVIPixelFormatYUV420PlanarFullRange. You should strongly reference (retain) the TVIVideoFrame before this call returns if you want to render it later. Frames are delivered to your renderer at or near their presentation timestamps.

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 TVIVideoOrientationUp unless you opt into orientation support.

Discussion

Expect the next delivered frame to have the new size and/or orientation.

Declared In

TVIVideoRenderer.h

  optionalPixelFormats

A list of the optional pixel formats that the renderer supports in addition to TVIPixelFormatYUV420PlanarFullRange.

@property (nonatomic, copy, readonly, nonnull) NSArray<NSNumber*> *optionalPixelFormats

Discussion

Allows your renderer to declare support for the optional TVIPixelFormat types that it can handle. Any source format defined in TVIPixelFormat can be converted to TVIPixelFormatYUV420PlanarFullRange. If an optional format is not supported then a format conversion is performed before delivering frames to the renderer.

Declared In

TVIVideoRenderer.h