PreviewingSingleInputVideoGraph


@UnstableApi
class PreviewingSingleInputVideoGraph : SingleInputVideoGraph, PreviewingVideoGraph


A Previewing specific implementation of .

Summary

Public functions

Unit
renderOutputFrame(renderTimeNs: Long)

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

Inherited functions

From androidx.media3.effect.SingleInputVideoGraph
VideoFrameProcessor!
getProcessor(inputIndex: Int)

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.

Unit

Initialize the VideoGraph}.

Unit
registerInput(inputIndex: Int)

Registers a new input to the VideoGraph.

Unit

Releases the associated resources.

Unit
setOutputSurfaceInfo(outputSurfaceInfo: SurfaceInfo?)

Sets the output surface and supporting information.

From androidx.media3.common.VideoGraph
abstract Unit
registerInput(inputIndex: @IntRange(from = 0) Int)

Registers a new input to the VideoGraph.

Public functions

renderOutputFrame

fun renderOutputFrame(renderTimeNs: Long): Unit

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
renderTimeNs: Long

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.