diff --git a/src/capture.rs b/src/capture.rs index e5def11..62d7b0a 100644 --- a/src/capture.rs +++ b/src/capture.rs @@ -27,7 +27,8 @@ impl Capture // v4l2-ctl -d /dev/video0 --list-formats-ext let x = x.video_capture (PixFormat::new (1280, 720, PixelFormat::MJPG))?; - x.set_frame_interval(linuxvideo::Fract::new(1, 30)).unwrap (); + let interval = x.set_frame_interval(linuxvideo::Fract::new(1, 30)).unwrap (); + dbg! (interval); dbg! (x.format ()); let size_image = usize::try_from (x.format ().size_image ()).unwrap (); let stream = x.into_stream ()?; diff --git a/src/main.rs b/src/main.rs index e2e6d67..1efb7c8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -33,8 +33,9 @@ fn main() -> Result <(), Error> println! ("Measuring..."); let start = Instant::now (); - for _ in 0..30 + for i in 0..30 { + dbg! (i); capture.wait_for_frame (&mut buf).unwrap (); } let stop = Instant::now ();