Struct screen_framing::Capturer
[−]
[src]
pub struct Capturer { /* fields omitted */ }
A screen-capturing session.
This is just a small wrapper around the underlying library that adds width and height information to each individual captured frame.
Methods
impl Capturer
[src]
fn new(display: Display) -> Result<Self>
Begins a capturing session.
fn width(&self) -> usize
Gets the width (in pixels) of each captured frame.
fn height(&self) -> usize
Gets the height (in pixels) of each captured frame.
fn frame(&mut self) -> Result<Chunky<Bgra, Screenshot>>
Captures a frame, but returns Err(WouldBlock)
if the operating system
doesn't have a frame for us yet. Only one frame can be borrowed at a
time, since in most cases the memory is reused.