IVideoInput

The public interface for the video input. It provides access to the video source, the video processor, and the streaming state.

Properties

Link copied to clipboard
open var isMuted: Boolean

Mute the video stream. The video stream will be replaced by a black screen. It is a shortcut to ISurfaceProcessor.isMuted

Link copied to clipboard
abstract val isStreamingFlow: StateFlow<Boolean>

Whether the video input is streaming.

Link copied to clipboard

The video processor for adding effects to the video frames.

Link copied to clipboard
abstract val sourceFlow: StateFlow<IVideoSource?>

The video source

Link copied to clipboard
abstract val withConfig: Boolean

Whether the video input has a configuration. It is true if the video source has been configured.

Link copied to clipboard

Whether the pipeline has a video source.

Functions

Link copied to clipboard
abstract suspend fun setSource(videoSourceFactory: IVideoSourceInternal.Factory)

Sets the video source.

Link copied to clipboard
suspend fun ISnapshotable.takeJpegSnapshot(outputStream: OutputStream, @IntRange(from = 0, to = 100) quality: Int = 100, @IntRange(from = 0, to = 359) rotationDegrees: Int = 0)

Takes a snapshot of the current video frame.

suspend fun ISnapshotable.takeJpegSnapshot(file: File, @IntRange(from = 0, to = 100) quality: Int = 100, @IntRange(from = 0, to = 359) rotationDegrees: Int = 0, dispatcher: CoroutineDispatcher = Dispatchers.IO)
suspend fun ISnapshotable.takeJpegSnapshot(filePathString: String, @IntRange(from = 0, to = 100) quality: Int = 100, @IntRange(from = 0, to = 359) rotationDegrees: Int = 0, dispatcher: CoroutineDispatcher = Dispatchers.IO)

Takes a JPEG snapshot of the current video frame.

Link copied to clipboard
abstract suspend fun takeSnapshot(@IntRange(from = 0, to = 359) rotationDegrees: Int = 0): Bitmap

Takes a snapshot of the current video frame.