# VideoFrameMetadataListener

Artifact: [androidx.media3:media3-exoplayer](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/exoplayer/video/VideoFrameMetadataListener.java+class:androidx.media3.exoplayer.video.VideoFrameMetadataListener)

*** ** * ** ***


```
@UnstableApi
public interface VideoFrameMetadataListener
```

<br />

*** ** * ** ***

A listener for metadata corresponding to video frames being rendered.

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/media3/exoplayer/video/VideoFrameMetadataListener#onVideoFrameAboutToBeRendered(long,long,androidx.media3.common.Format,android.media.MediaFormat)( long presentationTimeUs, long releaseTimeNs, https://developer.android.com/reference/androidx/media3/common/Format format, @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/media/MediaFormat.html mediaFormat )` Called on the playback thread when a video frame is about to be rendered. |

## Public methods

### onVideoFrameAboutToBeRendered

```
abstract void onVideoFrameAboutToBeRendered(
    long presentationTimeUs,
    long releaseTimeNs,
    Format format,
    @Nullable MediaFormat mediaFormat
)
```

Called on the playback thread 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 `https://developer.android.com/reference/java/lang/System.html#nanoTime()`. It will be `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()`, if the frame is rendered immediately automatically, this is typically the last frame that is rendered. |
| `https://developer.android.com/reference/androidx/media3/common/Format format` | The format associated with the frame. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/media/MediaFormat.html 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 `https://developer.android.com/reference/android/media/MediaCodec.html`). |