pub struct RawVideoReader {
pub meta: VideoMeta,
/* private fields */
}Expand description
Reads raw RGB8 frames from a simple uncompressed video file.
Format: [8 bytes: magic “RCVVIDEO”] [4 bytes: width LE] [4 bytes: height LE] [4 bytes: frame_count LE] [4 bytes: fps as f32 LE bits] [frames: widthheight3 bytes each].
Fields§
§meta: VideoMetaImplementations§
Source§impl RawVideoReader
impl RawVideoReader
Sourcepub fn open(path: &Path) -> Result<Self, VideoError>
pub fn open(path: &Path) -> Result<Self, VideoError>
Opens a raw video file for reading.
Sourcepub fn next_frame(&mut self) -> Option<Rgb8Frame>
pub fn next_frame(&mut self) -> Option<Rgb8Frame>
Reads the next frame, if available.
Sourcepub fn seek_start(&mut self)
pub fn seek_start(&mut self)
Resets to the beginning.
Sourcepub fn frame_count(&self) -> u32
pub fn frame_count(&self) -> u32
Returns the frame count.
Auto Trait Implementations§
impl Freeze for RawVideoReader
impl RefUnwindSafe for RawVideoReader
impl Send for RawVideoReader
impl Sync for RawVideoReader
impl Unpin for RawVideoReader
impl UnsafeUnpin for RawVideoReader
impl UnwindSafe for RawVideoReader
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more