pub fn parameter_sets(codec: CodecId, annexb: &[u8]) -> Option<Bytes>Available on crate feature
codec only.Expand description
Extract the codec’s parameter-set NAL units (H.264 SPS/PPS, H.265
VPS/SPS/PPS) from an Annex-B access unit, re-framed Annex-B with 4-byte
start codes — i.e. a config record suitable for parse_config /
Fmp4Muxer::init_segment. Returns None for codecs whose config is not a
NAL parameter set, or when the access unit carries none.
This lets in-band ingests (MPEG-TS over UDP/SRT, RTSP) synthesize the CONFIG access unit that container formats like FLV deliver out-of-band, so every downstream packager gets a decoder config regardless of ingest.