pub struct VideoFrameStream { /* private fields */ }Expand description
A sequential decoder for file-backed video frames.
This stream decodes frames on demand and can be restarted when playback seeks backward.
Implementations§
Source§impl VideoFrameStream
impl VideoFrameStream
Sourcepub fn new(source: impl Into<MediaSource>) -> Result<Self, MediaDecodeError>
pub fn new(source: impl Into<MediaSource>) -> Result<Self, MediaDecodeError>
Create a new sequential frame stream for the given media source.
Sourcepub fn source(&self) -> &MediaSource
pub fn source(&self) -> &MediaSource
Return the source associated with this stream.
Sourcepub fn metadata(&self) -> VideoMetadata
pub fn metadata(&self) -> VideoMetadata
Return the decoded video metadata.
Sourcepub fn restart(&mut self) -> Result<(), MediaDecodeError>
pub fn restart(&mut self) -> Result<(), MediaDecodeError>
Restart decoding from the beginning of the media source.
Sourcepub fn next_frame(&mut self) -> Result<Option<VideoFrame>, MediaDecodeError>
pub fn next_frame(&mut self) -> Result<Option<VideoFrame>, MediaDecodeError>
Decode and return the next video frame, or None after end-of-stream.
Auto Trait Implementations§
impl !RefUnwindSafe for VideoFrameStream
impl !Send for VideoFrameStream
impl !Sync for VideoFrameStream
impl !UnwindSafe for VideoFrameStream
impl Freeze for VideoFrameStream
impl Unpin for VideoFrameStream
impl UnsafeUnpin for VideoFrameStream
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