ao_pipewire: feature notify pulseaudio of mpv's pid#17966
Conversation
| NULL | ||
| ); | ||
|
|
||
| pw_properties_setf(props, PW_KEY_APP_PROCESS_ID, "%ld", (long)getpid()); |
There was a problem hiding this comment.
Isn't this populated by default on new context? https://github.com/PipeWire/pipewire/blob/4e1257a6e6cc1f2d08632d83b074489063709142/src/pipewire/context.c#L88-L90
There was a problem hiding this comment.
Indeed, so this is only needed for Pulse if Pulse doesn't populate it by default as well
There was a problem hiding this comment.
Would you prefer it be removed from ao_pulse?
- Presumed to remove ao_pulse
- Replaced with mp_getpid()
- Removed long cast based off other
mp_getpid()implementations.
There was a problem hiding this comment.
If you remove it from ao_pulse then this PR does nothing. We can see that Pipewire populates this by default, now you need to verify is Pulse does the same or not and adjust the commit accordingly
There was a problem hiding this comment.
I'm seeing different results than what is being expected based off the pipewire code provided.
- Pulse system
- mpv master
pactl list sink-inputsshows application.process.id already populated. ao_pulse modification is not required.
- mpv master
- Pipewire system
- mpv master
pactl list sink-inputsNo application.process.id. - mpv mpv_application_process_id ao_pulse change only No application.process.id
- mpv mpv_application_process_id ao_pipewire change only application.process.id is populated
- mpv mpv_application_process_id ao_pipewire and ao_pulse application.process.id is populated
- mpv master
The above results lead me to believe the ao_pulse changes are not needed and do not alter either pipewire or pulseaudio environments pulseaudio's application.process.id while ao_pipewire is required for pipewire to populate pulseaudio application.process.id
I don't mind including ao_pulse but from what I'm seeing the ao_pulse doesn't have any effect in either PulseAudio or Pipewire environments.
There was a problem hiding this comment.
On pipewire the property is already set by default for the context, which ends up in the "PipeWire:Interface:Client" object. You are now also setting it on the "PipeWire:Interface:Node".
IMO if this is useful, pipewire core should also set it automatically on the node.
Can you open a ticket with your usecase there?
fd11f51 to
959a09a
Compare
959a09a to
a1c5514
Compare
|
moving to draft while requesting inclusion into pipewire core for an upstream resolution |
Goal is to link mpv's pulseaudio sink data against playerctl instance data.
Playerctl defines instances by
$PROCESS.instance$PIDby passing the pid to pulseaudio we are able to reliably generate the playerctl instance identity purely from pulseaudio information.The ao_pipewire solution uses pipewire library functions alongside mp_getpid() to set the pulseaudio property application.process.id.