-
Notifications
You must be signed in to change notification settings - Fork 4
PipeWire: fix stopped stream ejection #115
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
PipeWire: fix stopped stream ejection #115
Conversation
1bfd825 to
1359359
Compare
|
I just learned about this pipewire property:
So in theory setting this property could fix the issue without the complexity of this PR (but with some side-effects). I'll give it a try. |
|
@strohel Were you able to try |
I haven't tried yet, will do once I find time. I think it will also break our "callback not called" detection, but that's not something the upstream should be concerned about. |
|
@strohel please rebase onto, or merge main, to update your branch, and I'll merge after CI passes 👍🏻 |
..instead of sending it through a command channel. I haven't found the reason to do this the more complicated way..?
Attempt to fix SolarLiner#105 v2: don't use a `Mutex`, do some Arc/Weak/Drop/channel/unsave tricks instead.
1359359 to
2f7bd85
Compare
|
Rebased, the eject_stream_pipewire.rs example still executes correctly as a sanity check. |
Description
Fixes #105, at least for me.
To be reviewed by commits:
eject_stream_pipewire.rs, which hangs at this pointpw-linkcommandStreamCommands in theprocess()callback (which runs in the RT thread), we now handle them in the PipeWire main loop. This also prompted a transition fromrtrbtopipewire::channel; this makes their handling independentMutexis introduced in the audio callback but we never wait on it in the audio process() callback. I tried hard to avoid it, but I believe it is necessary (short of unsafe code), as we need&mutaccess to theOption<Callback>in two separate threads.Type of Change
Please delete options that are not relevant.
How Has This Been Tested?
eject_stream_pipewire.rsexample.Checklist:
I have made corresponding changes to the documentationCC @mbernat. Supersedes tonarino#5.