SpsColorPatcher

Patches H.264 / H.265 SPS NAL units to embed BT.709 colour metadata. Hardware encoders typically ignore MediaFormat KEY_COLOR_* when generating the SPS VUI, so we must fix the raw bytes directly. Call sites: - Recording path: patchMediaFormatColorToBt709(videoFormat) before mediaMuxer.addTrack() - Streaming path: patchSpsNalColorToBt709(spsBytes, isHevc) before onVideoInfo()

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
Patches csd-0 in a MediaFormat in-place before mediaMuxer.addTrack().
Link copied to clipboard
Patches colour_primaries / transfer_characteristics / matrix_coefficients to BT.709 (1, 1, 1) in a raw SPS NAL ByteBuffer.