PreviewingVideoGraph


@UnstableApi
public interface PreviewingVideoGraph extends VideoGraph

Known direct subclasses
PreviewingSingleInputVideoGraph

A Previewing specific implementation of .


A VideoGraph specific to previewing.

Summary

Nested types

A factory for creating a PreviewingVideoGraph.

Public methods

abstract 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.common.VideoGraph
abstract VideoFrameProcessor
getProcessor(int inputId)

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

abstract boolean

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

abstract void

Initialize the VideoGraph.

abstract int

Registers a new input to the VideoGraph.

abstract void

Releases the associated resources.

abstract void

Sets the output surface and supporting information.

Public methods

renderOutputFrame

abstract 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.