TVIVideoSource Protocol Reference

Conforms to NSObject
Declared in TVIVideoSource.h

Overview

A source produces video content and delivers it to a single TVIVideoSink. The output produced by a source may be modified by using a format request.

  sink required method

The sink where video frames and format requests will be delivered.

@property (nonatomic, weak, nullable) id<TVIVideoSink> sink

Discussion

This property is automatically set when a TVILocalVideoTrack is created with your source. This property is unset when the TVILocalVideoTrack is destroyed.

Declared In

TVIVideoSource.h

  screencast required method

Indicates that the content from this source is a screenshare. When a source produces screen content, encoders downstream from the source optimize for detail (spatial resolution) over frame rate (temporal resolution).

@property (nonatomic, assign, readonly, getter=isScreencast) BOOL screencast

Discussion

Indicates that the content from this source is a screenshare. When a source produces screen content, encoders downstream from the source optimize for detail (spatial resolution) over frame rate (temporal resolution).

Declared In

TVIVideoSource.h

– requestOutputFormat: required method

Requests that the source deliver frames in a specific format, which may have scaling and/or cropping applied.

- (void)requestOutputFormat:(nonnull TVIVideoFormat *)outputFormat

Parameters

outputFormat

A TVIVideoFormat instance which specifies the desired output size. A combination of scaling/cropping will be used to achieve the output dimensions. If a frame rate is specified then the sink will drop frames to achieve it.

Discussion

Output format requests are useful when you have a source that is restricted to capturing in certain formats, but you want to publish in another format. For example, capture in 640x480 from the camera, and crop to square 480x480. If you are implementing your own TVIVideoSource, you should respond to this method by forwarding the request to your sink via [TVIVideoSink onVideoFormatRequest:].

Declared In

TVIVideoSource.h