VideoFrameMetadataListener


@UnstableApi
interface VideoFrameMetadataListener


A listener for metadata corresponding to video frames being rendered.

Summary

Public functions

Unit
onVideoFrameAboutToBeRendered(
    presentationTimeUs: Long,
    releaseTimeNs: Long,
    format: Format!,
    mediaFormat: MediaFormat?
)

Called on the playback thread when a video frame is about to be rendered.

Public functions

onVideoFrameAboutToBeRendered

fun onVideoFrameAboutToBeRendered(
    presentationTimeUs: Long,
    releaseTimeNs: Long,
    format: Format!,
    mediaFormat: MediaFormat?
): Unit

Called on the playback thread 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.

format: Format!

The format associated with the frame.

mediaFormat: MediaFormat?

The framework media format associated with the frame, or null if not known or not applicable (e.g., because the frame was not output by a MediaCodec).