Crate adts_reader [] [src]

A Rust parser for the Audio Data Transport Stream framing format often used to carry encoded AAC audio data.

AdtsHeader is the primary type provided by this crate.

Given a buffer containing some number of ADTS frames, the first frame may be inspected by constructing a header instance with,

use adts_reader::AdtsHeader;
// let buf = ...;
match AdtsHeader::from_bytes(&buf) {
    Ok(header) => println!("length (headers+payload) is {}", header.frame_length()),
    Err(e) => panic!("failed to read header: {:?}", e),
}

TODO

  • CRC handling
  • Iterator over frames within a given buffer

Structs

AdtsHeader
PayloadError

Error indicating that not enough data was provided to AdtsHeader to be able to extract the whole ADTS payload following the header fields.

Enums

AdtsHeaderError
AudioObjectType
ChannelConfiguration
CopyrightIdentificationStart
MpegVersion
Originality
ProtectionIndicator
SamplingFrequency