SingleInputVideoGraph.Factory


public final class SingleInputVideoGraph.Factory implements VideoGraph.Factory


A VideoGraph.Factory for SingleInputVideoGraph.

Summary

Public constructors

A Factory for SingleInputVideoGraph that uses a .

Factory(VideoFrameProcessor.Factory videoFrameProcessorFactory)

Public methods

SingleInputVideoGraph
create(
    Context context,
    ColorInfo outputColorInfo,
    DebugViewProvider debugViewProvider,
    VideoGraph.Listener listener,
    Executor listenerExecutor,
    VideoCompositorSettings videoCompositorSettings,
    List<Effect> compositionEffects,
    long initialTimestampOffsetUs,
    boolean renderFramesAutomatically
)

Creates a new VideoGraph instance.

boolean

Returns whether the createdVideoGraph supports multiple video inputs.

Public constructors

Factory

public Factory()

A Factory for SingleInputVideoGraph that uses a .

Factory

public Factory(VideoFrameProcessor.Factory videoFrameProcessorFactory)

Public methods

create

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

Creates a new VideoGraph 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.

VideoCompositorSettings videoCompositorSettings

The VideoCompositorSettings to apply to the composition.

List<Effect> compositionEffects

A list of effects to apply to the composition.

long initialTimestampOffsetUs

The timestamp offset for the first frame, in microseconds.

boolean renderFramesAutomatically

If true, the instance will render output frames to the output surface automatically as the instance is done processing them. If false, the instance will block until VideoGraph#renderOutputFrameWithMediaPresentationTime() is called, to render the frame.

Returns
SingleInputVideoGraph

A new instance.

supportsMultipleInputs

public boolean supportsMultipleInputs()

Returns whether the createdVideoGraph supports multiple video inputs.