scap
scap copied to clipboard
target parameter
What's the correct syntax to pass target parameter? I can't figure it out Foe example, can i request it like this: .... target: Some(Target::Window(scap::targets::Window { id: 132, title: "Discord".to_string(), raw_handle: 132, })), ....
let window= targets
.into_iter()
.find(|target| match target {
Target::Window(window) => window.title == "if fixed title",
_ => false,
});
let options = Options {
fps: 30,
target: window,
show_cursor: false,
show_highlight: false,
excluded_targets: None,
output_type: FrameType::BGRAFrame,
output_resolution: Resolution::_480p,
crop_area: None,
..Default::default()
};