Available on crate feature
codec only.Expand description
Codec bitstream helpers — turning wire bytes into engine metadata and
MediaFrame classification.
Gated behind the per-codec features (codec-h264, codec-h265, codec-av1,
codec-vp9, codec-vvc, codec-aac; codec = H.264 + AAC; codecs-all =
everything). Every parser is pure Rust with no native dependencies.
All codecs share the CodecParser contract: extract VideoParams from a
config header, and classify random-access points so the kernel’s GOP cache,
segmenter, eviction, and recorder — which key only on
MediaFrame::is_keyframe — work unchanged.
use arcly_stream::codec::dispatch;
use arcly_stream::CodecId;
let access_unit: &[u8] = &[/* … Annex-B HEVC bytes … */];
// Codec-erased dispatch by CodecId (used at the ingest boundary):
let is_rap = dispatch::is_random_access_point(CodecId::H265, access_unit);Re-exports§
pub use parser::CodecConfig;pub use parser::CodecParser;pub use parser::VideoParams;pub use aac::parse_adts;codec-aacpub use aac::AdtsHeader;codec-aacpub use h264::annexb_to_avcc;codec-h264pub use h264::avcc_to_annexb;codec-h264pub use h264::iter_nals_annexb;codec-h264pub use h264::parse_sps;codec-h264pub use h264::SpsInfo;codec-h264
Modules§
- aac
codec-aac - AAC helpers: ADTS frame-header parsing.
- av1
codec-av1 - AV1 bitstream helpers: OBU sequence-header resolution extraction and random-access detection.
- dispatch
- Codec-erased dispatch over
CodecId. - h264
codec-h264 - H.264 (AVC) bitstream helpers: NAL iteration, Annex-B ↔ AVCC conversion, and SPS resolution extraction.
- h265
codec-h265 - H.265 (HEVC) bitstream helpers: NAL classification and SPS resolution extraction. Shares the Annex-B scanner and conformance-crop math with H.264.
- nal
_nal - Shared Annex-B NAL utilities for the NAL-based codecs (H.264, H.265, VVC).
- parser
- Codec-agnostic parsing contracts shared by every codec module.
- vp9
codec-vp9 - VP9 bitstream helpers: uncompressed frame-header resolution extraction and keyframe detection.
- vvc
codec-vvc - VVC (H.266) bitstream helpers: NAL classification and SPS resolution extraction. Shares the Annex-B scanner and conformance-crop math with the other NAL codecs.