diff --git a/examples/threaded-capture/Cargo.toml b/examples/threaded-capture/Cargo.toml index 69132eb..afdf203 100644 --- a/examples/threaded-capture/Cargo.toml +++ b/examples/threaded-capture/Cargo.toml @@ -14,4 +14,4 @@ default-features = false [dependencies.nokhwa] path = "../../../nokhwa" # EDIT THIS! -features = ["input-avfoundation", "output-threaded"] +features = ["input-native", "output-threaded"] diff --git a/examples/threaded-capture/src/main.rs b/examples/threaded-capture/src/main.rs index 94e6b64..6c216dc 100644 --- a/examples/threaded-capture/src/main.rs +++ b/examples/threaded-capture/src/main.rs @@ -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::(RequestedFormatType::AbsoluteHighestFrameRate); let first_camera = cameras.first().unwrap();