Creating and controlling multiple pipewire instances per one user
Hi, I'm trying to create multiple pipewire servers for one user. I already used pulseaudio for this and I'd like it to work this way:
- One default server - controlling built-in and plugged-in devices (in this case pipewire-0 using unix native socket)
- abiility to create multiple pipewire servers - controlling virtual devices that are 'binded' to those servers. When using such additional server, I don't want to see built-in devices in settings, only those that I created for this server. I already know how to capture data from any device using Pipewire API. But I'd like it to be server-specific - by setting environmental variable PULSE_SERVER or by passing some properties to pw_context_connect(), so I can connect only to these devices that are binded to the current server. I also want to have independent default sink/source configuration - i.e. if I changed the output for one server, nothing would change for other pipewire instances. So I tried to do this: I changed a bit configuration files pipewire.conf and pipewire-pulse.conf in order to create another pipewire server and virtual devices that I want. I loaded the .conf files and set the environmental variable PULSE_SERVER to tcp:localhost:<port_number> - I just use some available ports. I managed to load it without fatal errors and even capture some data using this method, but:
- all virtual devices are visible all the time - if I used i.e. pipewire-1 I'd like to see only the devices created for this particular server
- I can't set default sink/source for only one server (I know it has something to do with pipewire session manager, but I don't know how to configure wireplumber so it'd work the way I want)
- All created instances seem to be dependent from the 'pipewire-0' instance In 'wpctl status' I see that wireplumber, pipewire servers, pipewire-pulse servers are all clients of pipewire-0. And default sink/source configuration is set globally by wireplumber. Is there any chance to create another instance that has the same properties as pipewire-0? How to create a wireplumber instance with an independent pipewire server and default sink/source configuration? And is there any chance to somehow 'bind' virtual devices to a specific server, so they are visible only when I set specific PULSE_SERVER value?