Expand description
Portable derivation of WebCodecs codec strings and CodecProfile values
from raw MP4 hvcC/av1C/vpcC codec configuration boxes and for VP8,
which has none, and the VP9 codec configuration record
(Vp9CodecConfig).
This module contains no browser (web_sys) types so it can be unit
tested natively. It is consumed by the browser WebCodecs decoder factory
to build the codec string WebCodecs’ isConfigSupported/VideoDecoder
APIs require, and to select a normalized CodecProfile.
Structs§
- Derived
Codec String - A codec string plus the normalized profile it was derived from.
- Vp9Codec
Config - A VP9 stream’s codec configuration: what an MP4
vpcCbox or a WebMCodecPrivateelement says about it.
Functions§
- derive_
codec_ string - Derives a WebCodecs
codecstring andCodecProfilefrom a track’s complete raw codec configuration box (including its size/fourcc header):hvcC,av1Cor Opus’sdOps. Vorbis has no MP4 box, so its configuration is the Xiph-lacedCodecPrivatecrate::VorbisConfigreads.