pub struct Smk { /* private fields */ }Implementations§
Source§impl Smk
impl Smk
Sourcepub fn open_file(path: impl AsRef<Path>, memory_mode: bool) -> Result<Smk>
pub fn open_file(path: impl AsRef<Path>, memory_mode: bool) -> Result<Smk>
Open an SMK file from disk.
If memory_mode is true, all frame data is loaded into memory and the
file handle is closed. Otherwise the file is kept open for streaming.
Sourcepub fn open_memory(data: &[u8]) -> Result<Smk>
pub fn open_memory(data: &[u8]) -> Result<Smk>
Open an SMK from an in-memory buffer.
pub fn info(&self) -> SmkInfo
pub fn info_video(&self) -> VideoInfo
pub fn info_audio(&self) -> AudioInfo
pub fn enable_all(&mut self, mask: u8)
pub fn enable_video(&mut self, enable: bool)
pub fn enable_audio(&mut self, track: u8, enable: bool)
pub fn palette(&self) -> &[[u8; 3]; 256]
pub fn video_data(&self) -> &[u8] ⓘ
pub fn audio_data(&self, track: u8) -> Option<&[u8]>
Sourcepub fn first_frame(&mut self) -> Result<FrameStatus>
pub fn first_frame(&mut self) -> Result<FrameStatus>
Rewind to the first frame and decode it.
Sourcepub fn next_frame(&mut self) -> Result<FrameStatus>
pub fn next_frame(&mut self) -> Result<FrameStatus>
Advance to the next frame and decode it.
Sourcepub fn seek_keyframe(&mut self, frame: u32) -> Result<()>
pub fn seek_keyframe(&mut self, frame: u32) -> Result<()>
Seek to the keyframe at or before the given frame index, then decode it.
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