mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-14 17:11:29 +03:00
Update example based on api changes
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -34,7 +34,7 @@ fn record(i: usize) {
|
||||
loop {
|
||||
// Wait until there's a frame.
|
||||
|
||||
let buffer = match capturer.frame(0) {
|
||||
let buffer = match capturer.frame(Duration::from_millis(0)) {
|
||||
Ok(buffer) => buffer,
|
||||
Err(error) => {
|
||||
if error.kind() == WouldBlock {
|
||||
@@ -83,7 +83,7 @@ fn record(i: usize) {
|
||||
loop {
|
||||
// Wait until there's a frame.
|
||||
|
||||
let buffer = match capturer.frame(0) {
|
||||
let buffer = match capturer.frame(Duration::from_millis(0)) {
|
||||
Ok(buffer) => buffer,
|
||||
Err(error) => {
|
||||
if error.kind() == WouldBlock {
|
||||
|
||||
Reference in New Issue
Block a user