Struct rinvideo::Grabber [−][src]
pub struct Grabber { /* fields omitted */ }
Methods
impl Grabber
[src]
impl Grabber
pub fn new(
width: i32,
height: i32,
fps: i32,
gl: &mut Renderer
) -> Result<Grabber>
[src]
pub fn new(
width: i32,
height: i32,
fps: i32,
gl: &mut Renderer
) -> Result<Grabber>
pub fn new_with_format(
width: i32,
height: i32,
fps: i32,
out_format: Option<&str>,
gl: &mut Renderer
) -> Result<Grabber>
[src]
pub fn new_with_format(
width: i32,
height: i32,
fps: i32,
out_format: Option<&str>,
gl: &mut Renderer
) -> Result<Grabber>
pub fn play(&mut self)
[src]
pub fn play(&mut self)
pub fn pause(&mut self)
[src]
pub fn pause(&mut self)
pub fn stop(&mut self)
[src]
pub fn stop(&mut self)
pub fn is_paused(&self) -> bool
[src]
pub fn is_paused(&self) -> bool
pub fn is_stopped(&self) -> bool
[src]
pub fn is_stopped(&self) -> bool
pub fn appsink(&self) -> &VideoAppSink
[src]
pub fn appsink(&self) -> &VideoAppSink
pub fn appsink_mut(&mut self) -> &mut VideoAppSink
[src]
pub fn appsink_mut(&mut self) -> &mut VideoAppSink
Trait Implementations
impl Video for Grabber
[src]
impl Video for Grabber
fn recv_frame(&self) -> Result<Rc<Frame>, RecvError>
[src]
fn recv_frame(&self) -> Result<Rc<Frame>, RecvError>
Blocks till a new frame is availble can return None if the output format is not supported Read more
fn try_recv_frame(&self) -> Result<Rc<Frame>, TryRecvError>
[src]
fn try_recv_frame(&self) -> Result<Rc<Frame>, TryRecvError>
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 Read more
fn recv_last_frame(&self) -> Result<Rc<Frame>, RecvError>
[src]
fn recv_last_frame(&self) -> Result<Rc<Frame>, RecvError>
Blocks till a new frame is available, if there's more than one frame it discards them till the last one Read more
fn try_recv_last_frame(&self) -> Result<Rc<Frame>, TryRecvError>
[src]
fn try_recv_last_frame(&self) -> Result<Rc<Frame>, TryRecvError>
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 Read more
fn update(&mut self)
[src]
fn update(&mut self)
Tries to receive the last frame and stores it internally, it can be recovered using last_frame Read more
fn last_frame(&self) -> Option<&Rc<Frame>>
[src]
fn last_frame(&self) -> Option<&Rc<Frame>>
Returns a reference to the last frame if there's one available
fn width(&self) -> i32
[src]
fn width(&self) -> i32
Width of the video
fn height(&self) -> i32
[src]
fn height(&self) -> i32
Height of the video
fn fps(&self) -> f64
[src]
fn fps(&self) -> f64
fps of the video, this should be the reported framerate by the underlying backend not the real fps Read more
fn real_fps(&self) -> f64
[src]
fn real_fps(&self) -> f64
fps of the video, this should be the real fps calculated when calling any of the functions to return a new frame or update Read more
fn size(&self) -> Vec2<i32>
[src]
fn size(&self) -> Vec2<i32>
Size (width x height) of the video
impl<'a> Render2d for &'a Grabber
[src]
impl<'a> Render2d for &'a Grabber
type Material = Material<'a>
fn default_material(&self) -> Material<'a>
[src]
fn default_material(&self) -> Material<'a>
fn render<R: RenderSurface>(&self, renderer: &Renderer<R>, pos: &Pnt2)
[src]
fn render<R: RenderSurface>(&self, renderer: &Renderer<R>, pos: &Pnt2)
fn render_size<R: RenderSurface>(
&self,
renderer: &Renderer<R>,
pos: &Pnt2,
size: &Vec2
)
[src]
fn render_size<R: RenderSurface>(
&self,
renderer: &Renderer<R>,
pos: &Pnt2,
size: &Vec2
)
fn render_with_material<R: RenderSurface, M: Material>(
&self,
renderer: &Renderer<R>,
pos: &Pnt2,
material: &M
)
[src]
fn render_with_material<R: RenderSurface, M: Material>(
&self,
renderer: &Renderer<R>,
pos: &Pnt2,
material: &M
)
fn render_size_with_material<R: RenderSurface, M: Material>(
&self,
renderer: &Renderer<R>,
pos: &Pnt2,
size: &Vec2,
material: &M
)
[src]
fn render_size_with_material<R: RenderSurface, M: Material>(
&self,
renderer: &Renderer<R>,
pos: &Pnt2,
size: &Vec2,
material: &M
)