@UnstableApi
class Av1ObuUtil


Utility methods for AV1 OBUs.

Summary

Public functions

java-static Unit

Rewrites all ITU-T T35 metadata OBUs from the buffer.

java-static Unit

Rewrites all ITU-T T35 metadata OBUs from the buffer that are not HDR10+.

Public functions

stripAllT35Metadata

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

Rewrites all ITU-T T35 metadata OBUs from the buffer. This is done to prevent the decoder from prioritizing in-band T.35 metadata (like HDR10+, Dolby Vision, etc.) over out-of-band metadata. If a T.35 metadata OBU is found, buffer will be rewritten with that metadata OBU marked as an unknown metadata OBU. If no T.35 metadata OBUs are found, buffer will remain unchanged. In either case, the position() and limit() of the buffer remain unchanged.

stripNonHdr10PlusT35Metadata

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

Rewrites all ITU-T T35 metadata OBUs from the buffer that are not HDR10+. This is done to prevent the decoder on older SDK versions from misinterpreting them as HDR10+ metadata. If a non-HDR10+ metadata OBU is found, buffer will be rewritten with that metadata OBU marked as an unknown metadata OBU. If no non-HDR10+ metadata OBUs are found, buffer will remain unchanged. In either case, the position() and limit() of the buffer remain unchanged. This function is needed only when using MediaCodec on older SDK versions and is not necessary for other AV1 decoders.