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
It's possible that the stream is sent an error when the session manager
can't link the node (because, for example, the sink/source is not
available yet). We should not stop but just log this error.
When the session manager actively kills the stream (when it is
reconnected while the DONT_RECONNECT flag is true) we will end up in the
UNCONNECTED state and that's when we can unload the module.
Make collect_nodes return a list of all nodes that are in some way
linked to the node and need to be scheduled as a group.
Move all the collected nodes to a driver, a fallback driver or away
from a driver.
This fixes some cases where nodes were moved quickly between drivers,
causing a lot of activation messages to be sent and fds to be dupped.
Nodes should now only move when needed with minimal amount of
changes to their state.
See #2309
When the stream requests a 0 size buffer, don't start the drain but
simply queue a 0 size buffer.
Sometimes, switching quantums and drivers might request a 0 buffer
async and this should not cause a drain operation.
./spa/plugins/alsa/test-timer.c: In function ‘main’:
../spa/plugins/alsa/test-timer.c:224:79: warning: comparison is always true due to limited range of data type [-Wtype-limits]
224 | while ((c = getopt_long(argc, argv, "hD:f:r:c:", long_options, NULL)) != -1) {
|
When we detect that no new profiler info has arrived for a node, assume
it was removed from the driver.
This avoids having idle nodes seemingly attached to an idle driver
when there is no activity.
We can only call collect_nodes() once because it sets the visited state
to true.
So, move the unassigned nodes to the fallback driver but when they are
passive (nothing is linked), move them back to the NULL driver.
This fixes a case where when the fallback driver changes, only some
nodes are moved to the new driver (because the other ones were already
visited in the collect_nodes() check before).
Track the end-to-end latency of the stream and use that to drive
the resampler.
Hard reset the ringbuffer when under/overflow happens so that we
can recover quickly.
See #2230
Don't move passive nodes to the fallback driver when !always_process.
When we have a fallback driver, check if the node we want to add to it
is not a passive node (by doing collect_nodes), if it's passive and
doesn't always need to be processed, remove it from the driver.
This fixes the issue where nodes that are maked as want_driver are
unconditionally moved to the fallback driver (and activated) even if
there is nothing linked to them (passive).
Fixes#2309
Make helper method to parse thread properties and add 2 new properties
to control name and stack-size of the thread.
Use properties when creating threads with the default utils.
Use the default thread utils instead of pthread_create so that the
properties are used.