struct ImageSource {
path: String,
size: (u32, u32),
cache: HashMap<(u32, u32), Vec<u8>>,
}Expand description
Still image: decoded once per requested size (-frames:v 1), t ignored.
Fields§
§path: String§size: (u32, u32)§cache: HashMap<(u32, u32), Vec<u8>>Trait Implementations§
Source§impl VideoSource for ImageSource
impl VideoSource for ImageSource
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 ImageSource
impl RefUnwindSafe for ImageSource
impl Send for ImageSource
impl Sync for ImageSource
impl Unpin for ImageSource
impl UnwindSafe for ImageSource
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