PreviewingVideoGraph.Factory


interface PreviewingVideoGraph.Factory


A factory for creating a PreviewingVideoGraph.

Summary

Public functions

PreviewingVideoGraph!
create(
    context: Context!,
    outputColorInfo: ColorInfo!,
    debugViewProvider: DebugViewProvider!,
    listener: VideoGraph.Listener!,
    listenerExecutor: Executor!,
    compositionEffects: (Mutable)List<Effect!>!,
    initialTimestampOffsetUs: Long
)

Creates a new PreviewingVideoGraph instance.

Public functions

create

fun create(
    context: Context!,
    outputColorInfo: ColorInfo!,
    debugViewProvider: DebugViewProvider!,
    listener: VideoGraph.Listener!,
    listenerExecutor: Executor!,
    compositionEffects: (Mutable)List<Effect!>!,
    initialTimestampOffsetUs: Long
): PreviewingVideoGraph!

Creates a new PreviewingVideoGraph instance.

Parameters
context: Context!

A Context.

outputColorInfo: ColorInfo!

The ColorInfo for the output frames.

debugViewProvider: DebugViewProvider!

A DebugViewProvider.

listener: VideoGraph.Listener!

A Listener.

listenerExecutor: Executor!

The Executor on which the listener is invoked.

compositionEffects: (Mutable)List<Effect!>!

A list of effects to apply to the composition.

initialTimestampOffsetUs: Long

The timestamp offset for the first frame, in microseconds.

Returns
PreviewingVideoGraph!

A new instance.

Throws
androidx.media3.common.VideoFrameProcessingException

If a problem occurs while creating the .