pub struct Demuxer { /* private fields */ }Expand description
Reads back-to-back ADTS frames from pushed byte chunks.
Implementations§
Source§impl Demuxer
impl Demuxer
Sourcepub fn push_bytes(&mut self, data: &[u8])
pub fn push_bytes(&mut self, data: &[u8])
Append incoming bytes.
Sourcepub const fn config(&self) -> Option<AdtsConfig>
pub const fn config(&self) -> Option<AdtsConfig>
AdtsConfig parsed from the most recently returned frame’s header, if any.
Sourcepub fn poll_frame(&mut self) -> Result<Option<Bytes>, Error>
pub fn poll_frame(&mut self) -> Result<Option<Bytes>, Error>
Pop the next complete frame’s raw AAC payload (ADTS header stripped), or
Ok(None) if the buffer doesn’t yet hold a full frame — call again after
more push_bytes. Errors on a bad sync word or a reserved
sampling_frequency_index, rather than silently emitting garbage.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Demuxer
impl RefUnwindSafe for Demuxer
impl Send for Demuxer
impl Sync for Demuxer
impl Unpin for Demuxer
impl UnsafeUnpin for Demuxer
impl UnwindSafe for Demuxer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more