Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

target parameter #114

Open
m13v opened this issue Aug 15, 2024 · 1 comment
Open

target parameter #114

m13v opened this issue Aug 15, 2024 · 1 comment

Comments

@m13v
Copy link

m13v commented Aug 15, 2024

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

@1mZ1kk4d0
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants