# HevcSeiUtil

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/HevcSeiUtil.java+class:androidx.media3.exoplayer.video.HevcSeiUtil)

*** ** * ** ***


```
@UnstableApi
public final class HevcSeiUtil
```

<br />

*** ** * ** ***

Utility methods for handling HEVC SEI messages.

## Summary

| ### Public methods |
|---|---|
| `static void` | `https://developer.android.com/reference/androidx/media3/exoplayer/video/HevcSeiUtil#stripAllT35Metadata(java.nio.ByteBuffer)(https://developer.android.com/reference/java/nio/ByteBuffer.html buffer)` Modifies the provided `https://developer.android.com/reference/java/nio/ByteBuffer.html` in place to strip all ITU-T T.35 SEI messages. |
| `static void` | `https://developer.android.com/reference/androidx/media3/exoplayer/video/HevcSeiUtil#stripNonHdr10PlusT35Metadata(java.nio.ByteBuffer)(https://developer.android.com/reference/java/nio/ByteBuffer.html buffer)` Modifies the provided `https://developer.android.com/reference/java/nio/ByteBuffer.html` in place to strip all ITU-T T.35 SEI messages that are not HDR10+. |

## Public methods

### stripAllT35Metadata

```
public static void stripAllT35Metadata(ByteBuffer buffer)
```

Modifies the provided `https://developer.android.com/reference/java/nio/ByteBuffer.html` in place to strip all ITU-T T.35 SEI messages.

This is achieved by masking the payload type of any T.35 SEI message to an unspecified payload type (`https://developer.android.com/reference/androidx/media3/exoplayer/video/HevcSeiUtil#SEI_PAYLOAD_TYPE_UNSPECIFIED()`). The NAL unit lengths and message lengths remain unchanged, so the operation can be done in-place with zero memory allocations, avoiding the need to fully parse emulation prevention bytes or copy the buffer.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/nio/ByteBuffer.html buffer` | The `https://developer.android.com/reference/java/nio/ByteBuffer.html` containing the HEVC bitstream with Annex B start codes. |

### stripNonHdr10PlusT35Metadata

```
public static void stripNonHdr10PlusT35Metadata(ByteBuffer buffer)
```

Modifies the provided `https://developer.android.com/reference/java/nio/ByteBuffer.html` in place to strip all ITU-T T.35 SEI messages that are not HDR10+.

This is achieved by masking the payload type of any non-HDR10+ T.35 SEI message to an unspecified payload type (`https://developer.android.com/reference/androidx/media3/exoplayer/video/HevcSeiUtil#SEI_PAYLOAD_TYPE_UNSPECIFIED()`).

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/nio/ByteBuffer.html buffer` | The `https://developer.android.com/reference/java/nio/ByteBuffer.html` containing the HEVC bitstream with Annex B start codes. |