When the global is destroyed, we remove our listeners and set the global
to NULL. We then destroy the module but because the global is NULL, we
don't remove ourselves from the list of modules, causing a crash later.
Fix this by always adding ourself to the list of modules and always
removing ourselves on destroy.
See #565
Use the new requested buffer field to only queue the amount of samples
required by the resampler for the current quantum. This avoid spikes
when the maxsize block of samples is processed.
Fixes#2353
Add some more context to the match rules and return how many properties
changed. If something changed, send all the properties as updates
instead of just the original changed ones.
With this commit, something like
`pw-link -d my-device alsa_output.headset` can be used to destroy
all links from output ports of `my-device` to input ports of
`alsa_output.headset`.
This allows to call pw-link with output and input nodes instead of
ports and pw-link will connect all output ports from the first node
to all input ports in the second node by port-id.
Note that the number of ports in each node isn't checked before
starting, so the ports will be connected until there's no matching
port to connect (i.e. if the output node has 2 output ports and
the input node has 5 ports, then only the first two ports will be
connected).
Add support for loading an additional config section when the config.ext
property was set.
This makes it possible to have per module config of stream.properties
and rules sections.
One use case is when there are multiple module-protocol-pulse modules
loaded where each module will use a different set of *.properties
and *.rules from the config. Each module will have a config.ext
property in the args with the suffix of the section that is loaded.
Make all streams and filters handle PIPEWIRE_PROPS.
The order for applying stream/filter properties is:
1) application provided properties.
2) generic config.
3) match rules.
4) environment variables (PIPEWIRE_PROPS, ...) from generic to
more specific.
5) defaults.
This commit allows to specify the port-ids as "*" in
create-link in order to connect all output ports from the
first node to all input ports from the second node (in
port-id order). For example, executing something like:
`create-link my-virtual-device * alsa_output.usb-headset *`
So that all nodes attach to some driver to be scheduled.
For the virtual sink/sources this is a normal thing and we can remove
the custom settings.
For normal stream, this now makes it possible to link pw-play directly
to pw-record and have it transport data.
Fixes#1761