"it's not just because it's dark" it is

main
_ 2023-09-12 21:31:12 -05:00
parent fb5013ef3e
commit 554bcb41cb
2 changed files with 4 additions and 2 deletions

View File

@ -27,7 +27,8 @@ impl Capture
// v4l2-ctl -d /dev/video0 --list-formats-ext // v4l2-ctl -d /dev/video0 --list-formats-ext
let x = x.video_capture (PixFormat::new (1280, 720, PixelFormat::MJPG))?; 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 ()); dbg! (x.format ());
let size_image = usize::try_from (x.format ().size_image ()).unwrap (); let size_image = usize::try_from (x.format ().size_image ()).unwrap ();
let stream = x.into_stream ()?; let stream = x.into_stream ()?;

View File

@ -33,8 +33,9 @@ fn main() -> Result <(), Error>
println! ("Measuring..."); println! ("Measuring...");
let start = Instant::now (); let start = Instant::now ();
for _ in 0..30 for i in 0..30
{ {
dbg! (i);
capture.wait_for_frame (&mut buf).unwrap (); capture.wait_for_frame (&mut buf).unwrap ();
} }
let stop = Instant::now (); let stop = Instant::now ();