Skip to main content

capture

Function capture 

Source
fn capture(
    display: &str,
    tx: Sender<Vec<u8>>,
    activity: Activity,
) -> Result<(), String>
Expand description

The screen’s frames, made on a thread of their own (reading and encoding a screen is work that must not hold up input). The screen says when a part of it changed: nothing is read while it is still, so a page that is not moving costs next to nothing. A change is read where it happened and written into the picture of the whole screen, and a frame is made only if some pixel really differs. Frames are at most FPS a second, but come at once and quickly just after the person’s input (pace).