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
AESinkPulse: Implement Hotplug monitor #16881
Conversation
Huge thanks to @FernetMenta PS: I tried to use clang-format as good as possible, curious what I have forgotten. |
Please rebase to get rid of the changes from #16851 in your commit. |
Ha, nice one - an --ammend slipped in. |
I added some commits. As jenkins does not turn green, I need to gather the stuff here a bit, don't want to maintain more than 10 PRs in parallel. |
jenkins build this please |
In preparation of using e.g. ALSA + PULSE in combination, like: ALSA for PT / normal audio, but pulse for network-stream, rtp or airplay - it's not good when a pulse device reenumeration would make entire audio engine stop playing audio via another driver. Therefore a string parameter to identify the Driver is used to only reenumerate the driver actually needing reenumeration. |
f0765b4
to
0587e9a
Compare
jenkins build this please I plan to merge this very soon, as it does not effect UWP specifics - I don't consider this as a blocker. |
jenkins build this please |
Mergeing tomorrow if no further remarks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow the code guidelines.
1bc9290
to
66fb0b3
Compare
@Rechi can you trigger it again. git clang-format of already existing commits is a PITA as all rebases go wrong - I hope I got most. Edit: I mean the automated clang-format check |
jenkins build this please |
66fb0b3
to
82eb2b5
Compare
I think I fixed everything you asked for.
jenkins build this please |
82eb2b5
to
4302b54
Compare
Nice jenkins seems happy (minus UWP), also there is no clang patch generated. Okay to merge? |
@notspiff please always set the version label and other labels before or right after merging a PR. |
AESinkPulse: Implement Hotplug monitor
This implements hotplugging and device change functionality one level higher.
Use-Case:
Get device changes for pulseaudio even if kodi is idleing and not outputting audio
Reasoning:
Pulse-Sink is suspended and deinitialized after a longer idle period, especially if keep alive always is not used. While kodi is not outputting on the sink a new device is registered. As the ctx and the sink registration towards pulseaudio is not there - kodi does not get knowledge of this event and the new device won't be listed.
Implementation:
AESinkFactory has function ptrs for a long time to register an infrastructure / device whatever you want to call it. That way a sink can initialize its static DriverMonitor and register it with the SinkFactory. This DriverMonitor has its own pulse context and outlives the Sink itself.