pub struct Prepared { /* private fields */ }Expand description
A preview read and ready to play, as [Video::start] of what any thread
prepared: everything that waits on the file (AVFoundation reading its
header, FFmpeg probing its streams) has been done by then.
Implementations§
Source§impl Prepared
impl Prepared
Sourcepub fn new(path: &Path, max_side: u32) -> Result<Prepared>
pub fn new(path: &Path, max_side: u32) -> Result<Prepared>
Reads path for a preview whose pictures fit max_side on their
long side, on any thread. Fails for anything probe refuses.
Sourcepub fn start(self) -> Result<Video>
pub fn start(self) -> Result<Video>
The player, paused at the start. Main thread only. FFmpeg’s sound
stays silent until Video::set_mixer gives it an output, so a
muted preview needs none.
Auto Trait Implementations§
impl !RefUnwindSafe for Prepared
impl !UnwindSafe for Prepared
impl Freeze for Prepared
impl Send for Prepared
impl Sync for Prepared
impl Unpin for Prepared
impl UnsafeUnpin for Prepared
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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