struct VideoPipe {
path: String,
size: (u32, u32),
fps: f64,
duration: f64,
child: Option<(Child, ChildStdout)>,
out_size: (u32, u32),
next: i64,
cur: Frame,
have: bool,
end: f64,
scaled: Vec<u8>,
skey: (i64, u32, u32),
}Fields§
§path: String§size: (u32, u32)§fps: f64§duration: f64§child: Option<(Child, ChildStdout)>§out_size: (u32, u32)Output size of the running process.
next: i64Absolute frame index of the next frame the pipe will deliver.
cur: FrameLast delivered frame (index next-1), valid when have is true.
have: bool§end: f64Earliest known end (set when the pipe hits EOF) — avoids respawn storms past the end.
scaled: Vec<u8>cur shrunk to skey = (frame index, w, h): repeated calls at the same t and size are free.
skey: (i64, u32, u32)Implementations§
Trait Implementations§
Source§impl VideoSource for VideoPipe
impl VideoSource for VideoPipe
Source§fn frame_at(&mut self, t: f64, w: u32, h: u32, out: &mut Frame) -> bool
fn frame_at(&mut self, t: f64, w: u32, h: u32, out: &mut Frame) -> bool
Decode the frame displayed at source time
t, scaled (aspect-ignorant, caller picks w/h; the
compositor never asks for more than native size, so upscaling need only be correct) into out.
Returns false at/after EOF or on error (then out is untouched). Must be cheap for sequential
increasing t (playback: keep decoding forward); may seek for other jumps.Auto Trait Implementations§
impl Freeze for VideoPipe
impl RefUnwindSafe for VideoPipe
impl Send for VideoPipe
impl Sync for VideoPipe
impl Unpin for VideoPipe
impl UnwindSafe for VideoPipe
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
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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