[−][src]Struct adts_reader::AdtsParser
Find ADTS frames within provided buffers of data, announcing audio configuration as it is discovered (normally just once at the start, but possibly changing during the stream if the stream is malformed).
Does not currently try to handle re-synchronise with the ADTS bitstream on encountering bad data.
Fields
consumer: C
Methods
impl<C> AdtsParser<C> where
C: AdtsConsumer,
[src]
C: AdtsConsumer,
pub fn new(consumer: C) -> AdtsParser<C>
[src]
pub fn start(&mut self)
[src]
Initialize or re-initialize parser state. Call this function before processing a group of ADTS frames to ensure that any error state due to processing an earlier group of ADTS frames is cleared.
pub fn push(&mut self, adts_buf: &[u8])
[src]
Extracts information about each ADTS frame in the given buffer, which is passed to the
AdtsConsumer
implementation supplied at construction time.
If the given buffer ends part-way through an ADTS frame, the remaining unconsumed data will be buffered inside this AdtsParser instance, and the rest of the ADTS frame may be passed in another buffer in the next call to this method.
Auto Trait Implementations
impl<C> Sync for AdtsParser<C> where
C: Sync,
C: Sync,
impl<C> Unpin for AdtsParser<C> where
C: Unpin,
C: Unpin,
impl<C> Send for AdtsParser<C> where
C: Send,
C: Send,
impl<C> UnwindSafe for AdtsParser<C> where
C: UnwindSafe,
C: UnwindSafe,
impl<C> RefUnwindSafe for AdtsParser<C> where
C: RefUnwindSafe,
C: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,