PreviewingSingleInputVideoGraph.Factory


class PreviewingSingleInputVideoGraph.Factory : PreviewingVideoGraph.Factory


A factory for creating a PreviewingSingleInputVideoGraph.

Summary

Public constructors

Creates a new factory that uses the DefaultVideoFrameProcessor.Factory with its default values.

Factory(videoFrameProcessorFactory: VideoFrameProcessor.Factory!)

Creates an instance that uses the supplied videoFrameProcessorFactory to create VideoFrameProcessor instances.

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 constructors

Factory

Factory()

Creates a new factory that uses the DefaultVideoFrameProcessor.Factory with its default values.

Factory

Factory(videoFrameProcessorFactory: VideoFrameProcessor.Factory!)

Creates an instance that uses the supplied videoFrameProcessorFactory to create VideoFrameProcessor instances.

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 .