PreviewingSingleInputVideoGraph


@UnstableApi
public final class PreviewingSingleInputVideoGraph extends SingleInputVideoGraph implements PreviewingVideoGraph


A Previewing specific implementation of .

Summary

Nested types

A factory for creating a PreviewingSingleInputVideoGraph.

Public methods

void
renderOutputFrame(long renderTimeNs)

Renders the oldest unrendered output frame that has become available for rendering at the given renderTimeNs.

Inherited methods

From androidx.media3.effect.SingleInputVideoGraph
long
int
VideoFrameProcessor
getProcessor(int inputIndex)

Returns the VideoFrameProcessor that handles the processing for an input registered via registerInput.

boolean

Returns whether the VideoGraph has produced a frame with zero presentation timestamp.

void

Initialize the VideoGraph}.

void
registerInput(int inputIndex)

Registers a new input to the VideoGraph.

void

Releases the associated resources.

void

Sets the output surface and supporting information.

From androidx.media3.common.VideoGraph
abstract void
registerInput(@IntRange(from = 0) int inputIndex)

Registers a new input to the VideoGraph.

Public methods

renderOutputFrame

public void renderOutputFrame(long renderTimeNs)

Renders the oldest unrendered output frame that has become available for rendering at the given renderTimeNs.

This will either render the output frame to the output surface, or drop the frame, per renderTimeNs.

The renderTimeNs may be passed to eglPresentationTimeANDROID depending on the implementation.

Parameters
long renderTimeNs

The render time to use for the frame, in nanoseconds. The render time can be before or after the current system time. Use DROP_OUTPUT_FRAME to drop the frame, or RENDER_OUTPUT_FRAME_IMMEDIATELY to render the frame immediately.