# 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
class HevcSeiUtil
```

<br />

*** ** * ** ***

Utility methods for handling HEVC SEI messages.

## Summary

| ### Public functions |
|---|---|
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/video/HevcSeiUtil#stripAllT35Metadata(java.nio.ByteBuffer)(buffer: https://developer.android.com/reference/java/nio/ByteBuffer.html!)` Modifies the provided `https://developer.android.com/reference/java/nio/ByteBuffer.html` in place to strip all ITU-T T.35 SEI messages. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/video/HevcSeiUtil#stripNonHdr10PlusT35Metadata(java.nio.ByteBuffer)(buffer: https://developer.android.com/reference/java/nio/ByteBuffer.html!)` 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 functions

### stripAllT35Metadata

```
java-static fun stripAllT35Metadata(buffer: ByteBuffer!): Unit
```

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/kotlin/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 |
|---|---|
| `buffer: https://developer.android.com/reference/java/nio/ByteBuffer.html!` | The `https://developer.android.com/reference/java/nio/ByteBuffer.html` containing the HEVC bitstream with Annex B start codes. |

### stripNonHdr10PlusT35Metadata

```
java-static fun stripNonHdr10PlusT35Metadata(buffer: ByteBuffer!): Unit
```

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/kotlin/androidx/media3/exoplayer/video/HevcSeiUtil#SEI_PAYLOAD_TYPE_UNSPECIFIED()`).

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