VideoFrameProcessor.Factory


interface VideoFrameProcessor.Factory


A factory for VideoFrameProcessor instances.

Summary

Public functions

VideoFrameProcessor!
create(
    context: Context!,
    debugViewProvider: DebugViewProvider!,
    outputColorInfo: ColorInfo!,
    renderFramesAutomatically: Boolean,
    listenerExecutor: Executor!,
    listener: VideoFrameProcessor.Listener!
)

Creates a new VideoFrameProcessor instance.

Public functions

create

fun create(
    context: Context!,
    debugViewProvider: DebugViewProvider!,
    outputColorInfo: ColorInfo!,
    renderFramesAutomatically: Boolean,
    listenerExecutor: Executor!,
    listener: VideoFrameProcessor.Listener!
): VideoFrameProcessor!

Creates a new VideoFrameProcessor instance.

Parameters
context: Context!

A Context.

debugViewProvider: DebugViewProvider!

A DebugViewProvider. In production usage, pass NONE.

outputColorInfo: ColorInfo!

The ColorInfo for the output frames.

renderFramesAutomatically: Boolean

If true, the instance will render output frames to the output surface automatically as VideoFrameProcessor is done processing them. If false, the will block until renderOutputFrame is called, to render or drop the frame.

listenerExecutor: Executor!

The Executor on which the listener is invoked.

listener: VideoFrameProcessor.Listener!

A Listener.

Returns
VideoFrameProcessor!

A new instance.

Throws
androidx.media3.common.VideoFrameProcessingException

If a problem occurs while creating the .