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

Cannot start a capturer after first capturer was shut down on pipewire #100

Open
quexten opened this issue Jul 18, 2024 · 0 comments
Open

Comments

@quexten
Copy link
Contributor

quexten commented Jul 18, 2024

Hi,
first of, thank you for putting the effort into this great crate!

Starting a capturer, stopping it (either by code, or by cancelling share in gnome) and starting another capturer, with the pipewire backend, currently results in RecvError on calling get_next_frame(), making it unusable until the process is restarted.

let mut capt: Capturer = Capturer::new(options.clone());
capt.start_capture();
let img = test.get_next_frame();
match img {
    Ok(img) => {
        println!("ok");
    }
    Err(err) => {
        println!("Failed to get frame: {:?}", err);
    }
}
capt.stop_capture();
let mut capt1: Capturer = Capturer::new(options.clone());
capt1.start_capture();
let img1 = test1.get_next_frame();
match img1 {
    Ok(img) => {
        println!("ok");
    }
    Err(err) => {
        println!("Failed to get frame: {:?}", err);
    }
}
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

1 participant