chore: implement review feedback

This commit is contained in:
Daniel Schmidt
2022-11-24 18:14:53 +01:00
parent e1a03cf62a
commit 57ad5fc924
2 changed files with 4 additions and 7 deletions
+1 -1
View File
@@ -14,4 +14,4 @@ default-features = false
[dependencies.nokhwa]
path = "../../../nokhwa"
# EDIT THIS!
features = ["input-avfoundation", "output-threaded"]
features = ["input-native", "output-threaded"]
+3 -6
View File
@@ -16,9 +16,9 @@
use nokhwa::{
nokhwa_initialize,
pixel_format::RgbAFormat,
pixel_format::{RgbAFormat, RgbFormat},
query,
utils::{ApiBackend, FrameFormat, RequestedFormat, RequestedFormatType},
utils::{ApiBackend, RequestedFormat, RequestedFormatType},
CallbackCamera,
};
@@ -30,10 +30,7 @@ fn main() {
let cameras = query(ApiBackend::Auto).unwrap();
cameras.iter().for_each(|cam| println!("{:?}", cam));
let format = RequestedFormat::with_formats(
RequestedFormatType::AbsoluteHighestFrameRate,
&[FrameFormat::GRAY],
);
let format = RequestedFormat::new::<RgbFormat>(RequestedFormatType::AbsoluteHighestFrameRate);
let first_camera = cameras.first().unwrap();