@UnstableApi
class HevcSeiUtil


Utility methods for handling HEVC SEI messages.

Summary

Public functions

java-static Unit

Modifies the provided ByteBuffer in place to strip all ITU-T T.35 SEI messages.

java-static Unit

Modifies the provided ByteBuffer 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 ByteBuffer 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 (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: ByteBuffer!

The ByteBuffer containing the HEVC bitstream with Annex B start codes.

stripNonHdr10PlusT35Metadata

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

Modifies the provided ByteBuffer 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 (SEI_PAYLOAD_TYPE_UNSPECIFIED).

Parameters
buffer: ByteBuffer!

The ByteBuffer containing the HEVC bitstream with Annex B start codes.