| 1 | use calling::camera::list_cameras; |
| 2 | use calling::screen::{ShareKind, list_share_sources}; |
| 3 | |
| 4 | fn main() { |
| 5 | let cameras = list_cameras(); |
| 6 | println!("cameras: {}", cameras.len()); |
| 7 | for (index, camera) in cameras.iter().enumerate() { |
| 8 | println!(" camera {index}: key {:?}, name {} chars", camera.key, camera.name.chars().count()); |
| 9 | } |
| 10 | let sources = list_share_sources(); |
| 11 | for kind in [ShareKind::Screen, ShareKind::Window] { |
| 12 | let of_kind: Vec<_> = sources.iter().filter(|source| source.kind == kind).collect(); |
| 13 | println!("{kind:?} sources: {}", of_kind.len()); |
| 14 | for (index, source) in of_kind.iter().enumerate() { |
| 15 | println!(" {kind:?} {index}: id {}, title {} chars", source.id, source.title.chars().count()); |
| 16 | } |
| 17 | } |
| 18 | } |