Make a method to pause and resume a stream and keep track of the paused
state of the stream. Use this function instead of setting the stream
inactive/active so that we get nice logging for each state change.
When a server is started, try to publish the pending services.
When a server is stopped, republish the services.
This makes it possible to load and unload the tcp protocol after loading
the zeroconf publish module and it will do the right thing.
Loop over the servers and use its family and port to publish the
zeroconf services.
This avoids exposing the services when we don't have any TCP servers
running to accept connections.
It also avoids exposing the services twice with both IP4 and IP6
addresses.
It also exposes the services with a port that is actually usable, in
case it's not the same as the default port.
The monitor mode does not create a echo-cancel-playback node, and makes the
echo-cancel-sink node to be a monitor node with media class Stream/Input/Audio
(instead of Audio/Sink).
Some applications get confused when their output stream node is not linked
directly to the actual device node. Having echo-cancel-sink as a monitor node
avoids this problem, allowing those applications to work properly even if echo
cancel is enabled.
This mode is disabled by default. You can enable it by passing the specific
option (monitor.mode = true) in the args when loading the module in the
pipewire context.modules configuration section.
If a node suggests a graph rate that is not in the list of allowed
rates, find the closest matching rate in the allowed rate instead of
just using the default.
When playing a file with a rate of 352800 and allowed rates of 44100,
48000, 96000 (default rate 48000) this will switch the graph to 96000
instead of the default 48000, which requires less resampling.
We checked above if the param is supported and return -ENOENT already.
When we actually go enumerate the params but don't have any, return 0
and not an error.
Fixes wireplumber#370
By default, buffer negotiation favours the default property values of
the output node. Make this configurable and reverse this logic when the
output is a driver.
This makes it so that a stream connecting to a source will negotiate
with the preferences of the stream and not the source.
An example is a stream that wants 4 buffers from v4l2-source, because
v4l2-source has a default of 4 buffers, this will always result in 4
buffers, ignoring the preference of the stream.
Just like the optional build, make all field parsing optional. This
will leave the fields with their default values if they are not parsed
from the param.
We can then remove our custom functions and use the generic ones in
various places.
Add a sequence number to pw_param.
Add param_info to param_update to filter out the params of the latest
sequence number.
This can be used to track params from a certain sequence number. Update
node, port and device.
Add a new seq field in the param-info struct. Users can use this
field to keep track of pending param updates.
Store the latest seq number of the param update in the seq field. Remove
all params that don't match the sequence number because they are too
old. This avoids duplicate old params in pw-dump output.
Rework the pulseaudio manager with this same method.
Only increment the index when we find the requirested param, this
makes the params go from index 0 to the last instead of starting at some
random index. The random index is not really a problem but it is also
no so nice.
Show the node state in the S column
Use the node state to show or hide info, this will only show info for
active nodes.
Do redraw updates when something important changes
Update man page
Make it possible for a aec-plugin to provide props/params
through module-echo-cancel and make it possible for a
aec-plugin to listen and react to these props/params getting updated.
Add method enum_props() that is used under setup_streams() to
get props from aec_plugin.
Add get_params() and set_params() for updating and getting
aec-plugin params under the input/output_param_changed calls
and getting params under setup_streams().
While we process the Pause, the node might sill emit some events or do
processing, which would give an error because we already removed the
node from the graph.
Instead, remove the node from the graph when the node state is updated
to the new state.
Also check the active state of the input node, not just if the node
was added to the graph because a node can become inactive and only
later be removed from the graph.
Do not use old delayed data in play_buffer when a new stream is started.
Copy silence to output until play_buffer has been filled with new data
instead.