pub struct H26xSampleReader<R: Read> { /* private fields */ }Expand description
Reads whole samples from an H.264 or H.265 Annex B stream.
Implementations§
Source§impl<R: Read> H26xSampleReader<R>
impl<R: Read> H26xSampleReader<R>
Sourcepub fn new(reader: R, capacity: usize, is_hevc: bool) -> Self
pub fn new(reader: R, capacity: usize, is_hevc: bool) -> Self
Wraps reader, buffering up to capacity bytes.
Set is_hevc for H.265; the two codecs differ in how NAL headers are parsed.
Sourcepub fn next_sample(&mut self) -> Result<H26xSample>
pub fn next_sample(&mut self) -> Result<H26xSample>
Auto Trait Implementations§
impl<R> Freeze for H26xSampleReader<R>where
R: Freeze,
impl<R> RefUnwindSafe for H26xSampleReader<R>where
R: RefUnwindSafe,
impl<R> Send for H26xSampleReader<R>where
R: Send,
impl<R> Sync for H26xSampleReader<R>where
R: Sync,
impl<R> Unpin for H26xSampleReader<R>where
R: Unpin,
impl<R> UnsafeUnpin for H26xSampleReader<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for H26xSampleReader<R>where
R: UnwindSafe,
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