MCPcopy Create free account
hub / github.com/RustCV/RustCV / dump_capabilities

Function dump_capabilities

rustcv-backend-msmf/examples/camera_view/main.rs:145–161  ·  view source on GitHub ↗
(dev_path: &str)

Source from the content-addressed store, hash-verified

143 }
144
145 fn dump_capabilities(dev_path: &str) -> anyhow::Result<()> {
146 println!("--- Inspecting capabilities for: {} ---", dev_path);
147
148 let driver = MsmfDriver::new();
149 let devices = driver.list_devices()?;
150
151 if let Some(dev) = devices.iter().find(|d| d.id == dev_path) {
152 println!("Device: {} ({})", dev.name, dev.id);
153 println!("Backend: {}", dev.backend);
154 println!("Bus Info: {}", dev.bus_info.as_deref().unwrap_or("N/A"));
155 } else {
156 println!("Device not found: {}", dev_path);
157 }
158
159 println!("----------------------------------------\n");
160 Ok(())
161 }
162}
163
164#[tokio::main]

Callers 1

main_bodyFunction · 0.70

Calls 1

list_devicesMethod · 0.45

Tested by

no test coverage detected