chore: add premission granting as first step

This commit is contained in:
Daniel Schmidt
2022-11-23 18:39:23 +01:00
parent d308c92141
commit e1a03cf62a
+5
View File
@@ -15,6 +15,7 @@
*/
use nokhwa::{
nokhwa_initialize,
pixel_format::RgbAFormat,
query,
utils::{ApiBackend, FrameFormat, RequestedFormat, RequestedFormatType},
@@ -22,6 +23,10 @@ use nokhwa::{
};
fn main() {
// only needs to be run on OSX
nokhwa_initialize(|granted| {
println!("User said {}", granted);
});
let cameras = query(ApiBackend::Auto).unwrap();
cameras.iter().for_each(|cam| println!("{:?}", cam));