VideoGraph.Listener


@UnstableApi
interface VideoGraph.Listener


Listener for video frame processing events.

Summary

Public functions

Unit
onEnded(finalFramePresentationTimeUs: Long)

Called after the VideoGraph has rendered its final output frame.

Unit

Called when an exception occurs during video frame processing.

Unit
onOutputFrameAvailableForRendering(framePresentationTimeUs: Long)

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

Unit
onOutputSizeChanged(width: Int, height: Int)

Called when the output size changes.

Public functions

onEnded

fun onEnded(finalFramePresentationTimeUs: Long): Unit

Called after the VideoGraph has rendered its final output frame.

Parameters
finalFramePresentationTimeUs: Long

The timestamp of the last output frame, in microseconds.

onError

fun onError(exception: VideoFrameProcessingException!): Unit

Called when an exception occurs during video frame processing.

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

onOutputFrameAvailableForRendering

fun onOutputFrameAvailableForRendering(framePresentationTimeUs: Long): Unit

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

Parameters
framePresentationTimeUs: Long

The presentation time of the frame, in microseconds.

onOutputSizeChanged

fun onOutputSizeChanged(width: Int, height: Int): Unit

Called when the output size changes.

Parameters
width: Int

The new output width in pixels.

height: Int

The new output width in pixels.