TVIVideoCapturer Protocol Reference
TVIVideoCapturer defines a video capture source which provides frames directly to the video pipeline.
You should expect that all of the methods defined in
TVIVideoCapturer will be called on an internal
worker thread in response to adding / removing a
TVILocalVideoTrack. Capture implementations should provide a list
of supported formats, and specify if their content is screen based or not. Ultimately,
used to determine which one of the supported formats is chosen. You should not call these methods directly!
Indicates if the video pipeline should treat the content as a screen capture or normal video.
@property (nonatomic, assign, readonly, getter=isScreencast) BOOL screencast
Returns a list of all supported video formats this capturer supports.
@property (nonatomic, copy, readonly, nonnull) NSArray<TVIVideoFormat*> *supportedFormats
This method will be invoked prior to
startCapture. If you return no formats we will assume 640x480x30
TVIPixelFormatYUV420BiPlanarFullRange as a default.
Start capturing, and begin delivering frames to the capture consumer as soon as possible.
- (void)startCapture:(nonnull TVIVideoFormat *)format consumer:(nonnull id<TVIVideoCaptureConsumer>)consumer
The format which has been selected via
The consumer. You should weakly reference this consumer until
When this method is called your capturer should prepare any resources it needs, and start capturing video.
Your capturer MUST call
captureDidStart on the consumer once it has either succeeded or failed to start.
If your capturer starts synchronously you may inform the consumer before this callback returns. As frames are captured
you should deliver them to the consumer by calling
consumeCapturedFrame: with a
TVIVideoFrame. You should not
call this method yourself, it is invoked in response to adding a video track to
Stop capturing, and do not deliver any more frames to
This method will be invoked on an internal worker thread. Your capturer should block until capture has
stopped. You should not call this method yourself, it is invoked in response to removing a video track from