PreviewingSingleInputVideoGraph.Factory


public final class PreviewingSingleInputVideoGraph.Factory implements 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(VideoFrameProcessor.Factory videoFrameProcessorFactory)

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

Public methods

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

Creates a new PreviewingVideoGraph instance.

Public constructors

Factory

public Factory()

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

Factory

public Factory(VideoFrameProcessor.Factory videoFrameProcessorFactory)

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

Public methods

create

public PreviewingVideoGraph create(
    Context context,
    ColorInfo outputColorInfo,
    DebugViewProvider debugViewProvider,
    VideoGraph.Listener listener,
    Executor listenerExecutor,
    List<Effect> compositionEffects,
    long initialTimestampOffsetUs
)

Creates a new PreviewingVideoGraph instance.

Parameters
Context context

A Context.

ColorInfo outputColorInfo

The ColorInfo for the output frames.

DebugViewProvider debugViewProvider

A DebugViewProvider.

VideoGraph.Listener listener

A Listener.

Executor listenerExecutor

The Executor on which the listener is invoked.

List<Effect> compositionEffects

A list of effects to apply to the composition.

long initialTimestampOffsetUs

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 .