pub struct VideoStream { /* private fields */ }Expand description
A running decoder and the frames it produced. Dropping it kills the decoder.
Implementations§
Source§impl VideoStream
impl VideoStream
Sourcepub fn spawn(
command: Command,
(width, height): (u32, u32),
frames_per_second: u32,
) -> Result<Self>
pub fn spawn( command: Command, (width, height): (u32, u32), frames_per_second: u32, ) -> Result<Self>
Run command, which must write width x height RGBA frames
back to back on its standard output at frames_per_second.
Sourcepub fn ffmpeg<S: AsRef<OsStr>>(
input: &[S],
size: (u32, u32),
frames_per_second: u32,
) -> Result<Self>
pub fn ffmpeg<S: AsRef<OsStr>>( input: &[S], size: (u32, u32), frames_per_second: u32, ) -> Result<Self>
Decode with ffmpeg. input holds ffmpeg’s input arguments, such as
["-ss", "12", "-i", "clip.mp4"]. We letterbox the picture to
size and drop the sound.
Trait Implementations§
Source§impl Debug for VideoStream
impl Debug for VideoStream
Source§impl Drop for VideoStream
impl Drop for VideoStream
Auto Trait Implementations§
impl !Sync for VideoStream
impl Forget for VideoStream
impl Freeze for VideoStream
impl Move for VideoStream
impl RefUnwindSafe for VideoStream
impl Send for VideoStream
impl Unpin for VideoStream
impl UnsafeUnpin for VideoStream
impl UnwindSafe for VideoStream
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