scap icon indicating copy to clipboard operation
scap copied to clipboard

target parameter

Open m13v opened this issue 1 year ago • 1 comments

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, })), ....

m13v avatar Aug 15 '24 19:08 m13v

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()
};

1mZ1kk4d0 avatar Dec 10 '24 16:12 1mZ1kk4d0