libuvc 0.1.0

Safe wrapper around libuvc, a cross-platform library for USB video devices
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use libuvc::{Context, Error};

fn main() -> Result<(), Error> {
    let ctx = Context::new()?;
    let dev = ctx.find_device(None, None, None)?;
    let devh = dev.open()?;

    for format in devh.format_descs() {
        println!("{:?}", format.descriptor_subtype());

        for frame in format.frame_descs() {
            println!("    {:?}", frame.descriptor_subtype());
        }
    }

    Ok(())
}