CustomVideoSource

class CustomVideoSource : ICustomSource<VideoTrack, VideoFrame>

The CustomVideoSource class serves as a customizable source for capturing and providing video data. The class is useful for filter application such as AI video filters or video view injection.

Properties

Link copied to clipboard
open override val isCapturing: Boolean

Returns a boolean indicating whether the CustomSource instance is actively capturing video data. This allows the application to check the current state of the capturing process.

Functions

Link copied to clipboard
open override fun onFrame(frame: VideoFrame)

Injects a video frame which content depends on the developer. For performance reasons, prefer recycling the VideoFrame to make sure not too many allocations are performed over time

Link copied to clipboard
open override fun startCapture(): VideoTrack

Defines and creates a new video track to send it to a Publisher's addTrack().

Link copied to clipboard
open override fun stopCapture()

Stops the underlying video tracks and informs the SDK to stop any pending operations related to this custom source.