VideoGraph.Listener


@UnstableApi
public interface VideoGraph.Listener


Listener for video frame processing events.

Summary

Public methods

abstract void
onEnded(long finalFramePresentationTimeUs)

Called after the VideoGraph has rendered its final output frame.

abstract void

Called when an exception occurs during video frame processing.

abstract void
onOutputFrameAvailableForRendering(long presentationTimeUs)

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

abstract void
onOutputSizeChanged(int width, int height)

Called when the output size changes.

Public methods

onEnded

abstract 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

abstract 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

abstract void onOutputFrameAvailableForRendering(long presentationTimeUs)

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

Parameters
long presentationTimeUs

The presentation time of the frame, in microseconds.

onOutputSizeChanged

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