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 Constants

From androidx.media3.effect.SingleInputVideoGraph
static final int

The ID registerInput returns.

Inherited methods

From androidx.media3.effect.SingleInputVideoGraph
long
ColorInfo
@Nullable Presentation
VideoFrameProcessor
getProcessor(int inputId)

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

int

Registers a new input to the VideoGraph.

void

Releases the associated resources.

void

Sets the output surface and supporting information.

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.