pub struct NalParser { /* private fields */ }Expand description
Splits an incrementally arriving bitstream into NAL units.
This searches for 001 marks in a byte stream, and deals with cross-boundary checks when
a frame is partially read.
Implementations§
Source§impl NalParser
impl NalParser
Sourcepub fn next(&mut self) -> Option<Vec<u8>>
pub fn next(&mut self) -> Option<Vec<u8>>
Tries to retrieve the next NAL unit, if present.
After feeding new data you should keep calling this method until it returns None.
Sourcepub fn feed(&mut self, buffer: impl AsRef<[u8]>)
pub fn feed(&mut self, buffer: impl AsRef<[u8]>)
Feeds more data to the processor.
After calling this method, there may be between 0 to M new NAL units present, which you can query with Self::next().
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NalParser
impl RefUnwindSafe for NalParser
impl Send for NalParser
impl Sync for NalParser
impl Unpin for NalParser
impl UnsafeUnpin for NalParser
impl UnwindSafe for NalParser
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