pub struct Smk {}Expand description
An open Smacker video; call Smk::next_frame to advance and read Smk::pixels.
Fields§
§data: Vec<u8>§width: usize§height: usize§frames: usize§frame_ms: f64Milliseconds per frame.
flags: u32§v4: bool§sizes: Vec<u32>§types: Vec<u8>§offsets: Vec<usize>§mmap: BigTree§mclr: BigTree§full: BigTree§ty: BigTree§index: Vec<u8>Current frame as palette indices, width * height.
palette: [u32; 256]Current palette, 0x00RRGGBB.
current: usizeImplementations§
Source§impl Smk
impl Smk
pub fn parse(data: Vec<u8>) -> Result<Smk>
Sourcepub fn display_height(&self) -> usize
pub fn display_height(&self) -> usize
Height the video is meant to be shown at (doubled/interlaced files are stretched).
Sourcepub fn next_frame(&mut self) -> Result<bool>
pub fn next_frame(&mut self) -> Result<bool>
Decodes the next frame. Returns false after the last one.
fn update_palette(&mut self, p: usize, end: usize)
fn decode_video(&mut self, p: usize, end: usize)
Auto Trait Implementations§
impl Freeze for Smk
impl RefUnwindSafe for Smk
impl Send for Smk
impl Sync for Smk
impl Unpin for Smk
impl UnsafeUnpin for Smk
impl UnwindSafe for Smk
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