SurfaceHolderHardwareBufferFrameQueue.Listener


interface SurfaceHolderHardwareBufferFrameQueue.Listener


A listener for SurfaceHolderHardwareBufferFrameQueue events.

Summary

Public functions

Unit

Called when video output ends.

Unit
onError(videoFrameProcessingException: VideoFrameProcessingException!)

Called when an error occurs.

Unit
onFrameAboutToBeRendered(
    presentationTimeUs: Long,
    releaseTimeNs: Long,
    format: Format!
)

Called when a video frame is about to be rendered.

Public functions

onEnded

fun onEnded(): Unit

Called when video output ends.

onError

fun onError(videoFrameProcessingException: VideoFrameProcessingException!): Unit

Called when an error occurs.

Parameters
videoFrameProcessingException: VideoFrameProcessingException!

The error.

onFrameAboutToBeRendered

fun onFrameAboutToBeRendered(
    presentationTimeUs: Long,
    releaseTimeNs: Long,
    format: Format!
): Unit

Called when a video frame is about to be rendered.

Parameters
presentationTimeUs: Long

The presentation time of the frame, in microseconds.

releaseTimeNs: Long

The system time at which the frame should be displayed, in nanoseconds. Can be compared to nanoTime. It will be TIME_UNSET, if the frame is rendered immediately automatically, this is typically the last frame that is rendered.

format: Format!

The format associated with the frame.