SurfaceHolderHardwareBufferFrameQueue.Listener


public interface SurfaceHolderHardwareBufferFrameQueue.Listener


A listener for SurfaceHolderHardwareBufferFrameQueue events.

Summary

Public methods

abstract void

Called when video output ends.

abstract void
onError(VideoFrameProcessingException videoFrameProcessingException)

Called when an error occurs.

abstract void
onFrameAboutToBeRendered(
    long presentationTimeUs,
    long releaseTimeNs,
    Format format
)

Called when a video frame is about to be rendered.

Public methods

onEnded

abstract void onEnded()

Called when video output ends.

onError

abstract void onError(VideoFrameProcessingException videoFrameProcessingException)

Called when an error occurs.

Parameters
VideoFrameProcessingException videoFrameProcessingException

The error.

onFrameAboutToBeRendered

abstract void onFrameAboutToBeRendered(
    long presentationTimeUs,
    long releaseTimeNs,
    Format format
)

Called when a video frame is about to be rendered.

Parameters
long presentationTimeUs

The presentation time of the frame, in microseconds.

long releaseTimeNs

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.