VideoGraph.Listener


@UnstableApi
public interface VideoGraph.Listener


Listener for video frame processing events.

Summary

Public methods

default void
onEnded(long finalFramePresentationTimeUs)

Called after the VideoGraph has rendered its final output frame.

default void

Called when an exception occurs during video frame processing.

default void
onOutputFrameAvailableForRendering(long framePresentationTimeUs)

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

default void
onOutputSizeChanged(int width, int height)

Called when the output size changes.

Public methods

onEnded

default void onEnded(long finalFramePresentationTimeUs)

Called after the VideoGraph has rendered its final output frame.

Parameters
long finalFramePresentationTimeUs

The timestamp of the last output frame, in microseconds.

onError

default void onError(VideoFrameProcessingException exception)

Called when an exception occurs during video frame processing.

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

onOutputFrameAvailableForRendering

default void onOutputFrameAvailableForRendering(long framePresentationTimeUs)

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

Parameters
long framePresentationTimeUs

The presentation time of the frame, in microseconds.

onOutputSizeChanged

default void onOutputSizeChanged(int width, int height)

Called when the output size changes.

Parameters
int width

The new output width in pixels.

int height

The new output width in pixels.