Update example based on api changes

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2022-06-29 09:38:01 +08:00
parent 3c0f2dfed7
commit b45dc606f1
4 changed files with 10 additions and 9 deletions

View File

@@ -1,3 +1,5 @@
use std::time::Duration;
extern crate scrap;
fn main() {
@@ -29,7 +31,7 @@ fn main() {
let mut out = child.stdin.unwrap();
loop {
match capturer.frame(0) {
match capturer.frame(Duration::from_millis(0)) {
Ok(frame) => {
// Write the frame, removing end-of-row padding.
let stride = frame.len() / h;