The idea is to have the rtp-source and rtp-sink be separate modules that
can be loaded a static ip/port as well.
The SAP module would then expose existing rtp-sinks or additionally load
rtp-sources based on SAP messages.
This makes things a bit more flexible when we also want to expose the
rtp-sink using zeroconf, for example.
Now that always-process nodes (the default for jack clients) can never
idle (even with passive nodes), force the qsynth client to
node.always-process = false
We can then also use the new node.passive = out handling to only idle
and suspend when nothing is linked on the input ports.
The node.passive property can actually take true, in and out as values
to mark what ports to make passive. Keep track of what port direction to
make passive.
Set the passive property also on ports and make all port inherit the
property from the node first (based on direction) and then use the new
port.passive property as an override.
Make the link use the passive property from the ports that it links to
check the passive state of the link.
PIPEWIRE_LINK_PASSIVE is to let this client make passive links, this
doesn't mean that the client wants passive links to its own node in all
cases so don't use the node.passive for that.
Instead use a new jack.passive-links. This can then also be set per
client to make it make passive links.
Parse the NODE_PASSIVE flag on nodes.
When a node is marked passive, make a passive link unless explicitly
set with a link property.
This removes the need for the session manager to set the passive flag
and it also makes things work better when using tools like pw-link.
When we are triggered, always call the process function, even if we
don't have buffers yet.
We need to do this because a usual pattern is to dequeue a buffer from
the capture stream and feed it into a playback stream. When we don't
call the process function if the playback stream is not negotiated yet,
we will run out of buffers in the capture stream and stall.
This might also be able to fix this by calling the process function of
the capture stream when we still have queued buffers that need to be
processed but this might require some more adapter changes.
Fixes#3028
We need to unescape the module argument values, just like pulseaudio
does. We might end up with invalid escape sequences for the JSON
parser.
Fixes#3071
In order for stream buffers to be captured and then processed by other
threads, pipewire needs to guarantee that the buffer will remain alive
until the application is notified of its removal. In this case pipewire
uses the "remove_buffer" callback to notify the application that a buffer
is about to be removed, so pipewire must guarantee that it is alive up
to that point.
Nodes marked as always_process will never be passive so use that as
the default case. This makes it possible to remove some checks because
always_process will imply want_driver and !passive.
In collect_nodes, don't update the passive state of the parent node
just yet. Leave the passive states of the nodes as they are found when
following links (or always_process) and update the passive state of
the driver when we add the collected nodes to it.
For unassigned nodes, this results in a more accurate passive state
calculation, not depending on the passive state of some child.