mirror of
https://github.com/l1npengtul/nokhwa.git
synced 2026-07-04 02:27:26 +00:00
chore: implement review feedback
This commit is contained in:
@@ -14,4 +14,4 @@ default-features = false
|
||||
[dependencies.nokhwa]
|
||||
path = "../../../nokhwa"
|
||||
# EDIT THIS!
|
||||
features = ["input-avfoundation", "output-threaded"]
|
||||
features = ["input-native", "output-threaded"]
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user