Add a client that subscribes to the list of subscribers and make the
client watch for EnumFormat changes.
When a subscribed client sees an EnumFormat change for a sink, emit EVENT
to the client.
This will send the EVENT to pavucontrol when the supported IEC958
formats change so that it can update the gui.
Add method to update the client routes. Add an event when the client
routes changed.
Listen for route_changed events on clients that do a subscribe on the
stream-restore extension. Emit an EVENT when the routes change.
This keeps the system notifications volumes in sync between
gnome-control center and pavucontrol and probably in other tools
as well.
Fixes#3805
Add extension support to modules. This is a list of extension commands
that can be performed on the module.
Remove the custom registry of extensions and make proper modules that
implement the extensions.
This is more in line with what pulseaudio does. The advantage is that the
modules actually show up in the module list and that we can use the
module user_data to implement the extension later.
When we are notifying the application of changed params, don't emit any
changes applied to the params from within the callback with
pw_stream_update_params(). This will be done after we complete the
callback.
This also avoids reseting the change counter so that we don't
accidentally think we updated the formats param when we simply changed
some other params.
Only listen for packets from source.ip in the unicast (v4) case by
calling connect(). If packets from any source address is wanted, set
source.ip = "0.0.0.0".
Now that both the expected input and output of the resampler is placed
in the rate_match, rename the 'requested' field in pw_time to 'size'
and update the docs.
See #3750
Now that the resampler input size is set in the io_rate field when we
start we can add it to the pw_time struct as well.
This way we can know the required resampler input without having
to dequeue a buffer. This can be handy when the stream is a driver
and needs to know how much data to accumulate before starting the graph.
See #3750
SNAP containers have two main "audio" security rules:
* audio-playback: the applications inside the container can
send audio samples into a sink
* audio-record: the applications inside the container can
get audio samples from a source
Also, old SNAP containers had the "pulseaudio" rule, which just
exposed the pulseaudio socket directly, without limits. This
is similar to the current Flatpak audio permissions.
In the pulseaudio days, a specific pulseaudio module was used
that checked the permissions given to the application and
allowed or forbade access to the pulseaudio operations.
With the change to pipewire, this functionality must be
implemented in pipewire-pulse to guarantee the sandbox
security.
This patch adds support for sandboxing permissions in the
pulseaudio module, and implements support for the SNAP audio
security model, thus forbiding a SNAP application to record
audio unless it has permissions to do so.
The current code for pipewire-pulseaudio checks the permissions
of the snap and adds three properties to each new client:
* pipewire.snap.id: contains the Snap ID of the client.
* pipewire.snap.audio.playback: its value is 'true' if the client
has permission to play audio, or 'false' if not.
* pipewire.snap.audio.record: its value is 'true' if the client
has permission to record audio, or 'false' if not.
These properties must be processed by wireplumber to add or
remove access permissions to the corresponding nodes. That
code is available in a separate patch: https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/567
Handle extend == 0 and don't expand the array but return -ENOSPC.
This makes it possible to handle static arrays, make a function to
make this easier. Remove pw_array_add_fixed() now that we support
this with extend==0 and because it was not used.
Round up the required space to next extend so that the total allocated
size if always a multiple of the extend.
Make pw_array_add_ptr() check for allocation errors instead of crashing.
Try to use `media.name` as the display name for a node
when none of the other keys are found in its properties.
For example, `pw_stream_new_simple()` only sets `media.name`
on the created node object by default.
Only names in the `org.freedesktop.ReserveDevice1` namespace
are interesting for the purposes of device reservation, so
use `arg0namespace` in the dbus match rule to filter out others.
Add a /core message to set the log level of the pulse-server.
An alternative would be to watch the settings metadata and follow the
server settings. This is however less flexible so the custom message
was chosen.
Add a function to check if a specfic custom log level has been defined
for a topic.
We can use this to dynamically check if we need to do the connection debug
messages.
We can also get rid of the conn.* pattern hack to disable connection
messages by default.
When there is no specific level for a topic we store the global log level
in the topic level. Make sure this invariant is preserved when the
the global log level is updated.
We can then simply update the log level after we processed the log level
string to update all topics.
This should also make it possible to just use the level from the topic
in all cases and remove a check.