Struct webrtc_media::io::ivf_reader::IVFReader
source · pub struct IVFReader<R: Read> { /* private fields */ }
Expand description
IVFReader is used to read IVF files and return frame payloads
Implementations§
source§impl<R: Read> IVFReader<R>
impl<R: Read> IVFReader<R>
sourcepub fn new(reader: R) -> Result<(IVFReader<R>, IVFFileHeader), Error>
pub fn new(reader: R) -> Result<(IVFReader<R>, IVFFileHeader), Error>
new returns a new IVF reader and IVF file header with an io.Reader input
sourcepub fn reset_reader(&mut self, reset: ResetFn<R>)
pub fn reset_reader(&mut self, reset: ResetFn<R>)
reset_reader resets the internal stream of IVFReader. This is useful for live streams, where the end of the file might be read without the data being finished.
sourcepub fn parse_next_frame(&mut self) -> Result<(BytesMut, IVFFrameHeader), Error>
pub fn parse_next_frame(&mut self) -> Result<(BytesMut, IVFFrameHeader), Error>
parse_next_frame reads from stream and returns IVF frame payload, header, and an error if there is incomplete frame data. Returns all nil values when no more frames are available.
Auto Trait Implementations§
impl<R> RefUnwindSafe for IVFReader<R>where R: RefUnwindSafe,
impl<R> Send for IVFReader<R>where R: Send,
impl<R> Sync for IVFReader<R>where R: Sync,
impl<R> Unpin for IVFReader<R>where R: Unpin,
impl<R> UnwindSafe for IVFReader<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