Trait rinvideo::Video[][src]

pub trait Video {
    fn recv_frame(&self) -> Result<Rc<Frame>, RecvError>;
fn try_recv_frame(&self) -> Result<Rc<Frame>, TryRecvError>;
fn recv_last_frame(&self) -> Result<Rc<Frame>, RecvError>;
fn try_recv_last_frame(&self) -> Result<Rc<Frame>, TryRecvError>;
fn update(&mut self);
fn last_frame(&self) -> Option<&Rc<Frame>>;
fn width(&self) -> i32;
fn height(&self) -> i32;
fn fps(&self) -> f64;
fn real_fps(&self) -> f64; fn size(&self) -> Vec2<i32> { ... } }

Required Methods

Blocks till a new frame is availble can return None if the output format is not supported

Tries to receive a new frame and returns immediately if there's none available. It also returns Empty if the output format is not supported

Blocks till a new frame is available, if there's more than one frame it discards them till the last one

Tries to receive a new frame and returns immediately if there's none available. It also returns Empty if the output format is not supported. If there's more than one frame it discards them till the last one

Tries to receive the last frame and stores it internally, it can be recovered using last_frame

Returns a reference to the last frame if there's one available

Width of the video

Height of the video

fps of the video, this should be the reported framerate by the underlying backend not the real fps

fps of the video, this should be the real fps calculated when calling any of the functions to return a new frame or update

Provided Methods

Size (width x height) of the video

Implementors