| 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!( |
| 9 | " camera {index}: key {:?}, name {} chars", |
| 10 | camera.key, |
| 11 | camera.name.chars().count() |
| 12 | ); |
| 13 | } |
| 14 | let sources = list_share_sources(); |
| 15 | for kind in [ShareKind::Screen, ShareKind::Window] { |
| 16 | let of_kind: Vec<_> = sources |
| 17 | .iter() |
| 18 | .filter(|source| source.kind == kind) |
| 19 | .collect(); |
| 20 | println!("{kind:?} sources: {}", of_kind.len()); |
| 21 | for (index, source) in of_kind.iter().enumerate() { |
| 22 | println!( |
| 23 | " {kind:?} {index}: id {}, title {} chars", |
| 24 | source.id, |
| 25 | source.title.chars().count() |
| 26 | ); |
| 27 | } |
| 28 | } |
| 29 | } |