public interface

VideoGraph.Listener

 androidx.media3.common.VideoGraph.Listener

Subclasses:

CompositingVideoSinkProvider

Overview

Listener for video frame processing events.

Summary

Methods
public voidonEnded(long finalFramePresentationTimeUs)

Called after the VideoGraph has rendered its final output frame.

public voidonError(VideoFrameProcessingException exception)

Called when an exception occurs during video frame processing.

public voidonOutputFrameAvailableForRendering(long framePresentationTimeUs)

Called when an output frame with the given framePresentationTimeUs becomes available for rendering.

public voidonOutputSizeChanged(int width, int height)

Called when the output size changes.

Methods

public void onOutputSizeChanged(int width, int height)

Called when the output size changes.

Parameters:

width: The new output width in pixels.
height: The new output width in pixels.

public void onOutputFrameAvailableForRendering(long framePresentationTimeUs)

Called when an output frame with the given framePresentationTimeUs becomes available for rendering.

Parameters:

framePresentationTimeUs: The presentation time of the frame, in microseconds.

public void onEnded(long finalFramePresentationTimeUs)

Called after the VideoGraph has rendered its final output frame.

Parameters:

finalFramePresentationTimeUs: The timestamp of the last output frame, in microseconds.

public void onError(VideoFrameProcessingException exception)

Called when an exception occurs during video frame processing.

If this is called, the calling VideoGraph must immediately be released.