camera_get_twice/
camera_get_twice.rsuse vidi as camera;
use std::io;
fn main() -> io::Result<()> {
let cameras_list = camera::actors::camera_list::spawn()?;
let cameras = cameras_list.cameras();
dbg!(&cameras);
let camera = cameras_list.create(&cameras[0].info.id())
.unwrap().unwrap();
dbg!(camera.get_id());
{
let _q = camera.acquire();
let cameras_list = camera::actors::camera_list::spawn()?;
let camera2 = cameras_list.create(&cameras[0].info.id())
.expect("No such camera").unwrap();
assert!(camera2.acquire().is_err());
}
Ok(())
}