rscam 0.2.5

Wrapper for v4l2.
docs.rs failed to build rscam-0.2.5
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: rscam-0.5.5

rscam

Rust wrapper for v4l2.

let mut camera = rscam::new("/dev/video0").unwrap();

camera.start(&rscam::Config {
    interval: (1, 30),  // 30 fps.
    width: 1280,
    height: 720,
    format: b"MJPG"
}).unwrap();

for i in range(0u, 10) {
    let frame = camera.shot().unwrap();
    let mut file = fs::File::create(&Path::new(format!("frame-{}.jpg", i)));
    file.write(frame.data).unwrap();
}

TODO

  • userptr and read methods.
  • test on raspberry pi.