Struct adts_reader::AdtsHeader
[−]
[src]
pub struct AdtsHeader<'buf> { /* fields omitted */ }
Methods
impl<'buf> AdtsHeader<'buf>
[src]
fn from_bytes(buf: &'buf [u8]) -> Result<AdtsHeader, AdtsHeaderError>
[src]
Note that this function returns Err
if there is not enough data to parse the whole
header, but it can return Ok
even if there is not enough data in the given buffer to hold
the whole of the payload that the header indicates should be present (however if there is
not enough data to hold the payload, then payload()
will return
None
).
fn mpeg_version(&self) -> MpegVersion
[src]
fn protection(&self) -> ProtectionIndicator
[src]
fn audio_object_type(&self) -> AudioObjectType
[src]
fn sampling_frequency(&self) -> SamplingFrequency
[src]
fn private_bit(&self) -> u8
[src]
either 1 or 0
fn channel_configuration(&self) -> ChannelConfiguration
[src]
fn originality(&self) -> Originality
[src]
fn home(&self) -> u8
[src]
either 1 or 0
fn copyright_identification_bit(&self) -> u8
[src]
either 1 or 0
fn copyright_identification_start(&self) -> CopyrightIdentificationStart
[src]
fn frame_length(&self) -> u16
[src]
length of this frame, including the length of the header.
fn payload_length(&self) -> Option<u16>
[src]
Calculates the length of the frame payload from the frame_length
header value, and the
total size of headers in this frame -- returning None
if the frame_length
header had a
value too small to even include the headers
fn adts_buffer_fullness(&self) -> u16
[src]
fn number_of_raw_data_blocks_in_frame(&self) -> u8
[src]
The number of data blocks in the frame, a value between 1 and 4 inclusive.
(Note that in the serialised ADTS data stores the number of blocks - 1. This method returns the actual number of blocks by adding one to the serialised value.)
Most streams store a single block per ADTS frame
fn payload(&self) -> Result<&'buf [u8], PayloadError>
[src]
The payload AAC data inside this ADTS frame