Trait VideoSource

Source
pub trait VideoSource: Send {
    // Required methods
    fn size(&self) -> (u32, u32);
    fn frame_at(&mut self, t: f64, w: u32, h: u32, out: &mut Frame) -> bool;
}

Required Methods§

Source

fn size(&self) -> (u32, u32)

Native (coded) size.

Source

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.

Implementors§