This is a behavioural change in effect since pipewire 0.3.68, where
pipewire's link-factory ignores the link.passive property and the
node.pasive = in/out/true is used instead.
This allows partially parsing a json object, allowing some parts to be
passed on as strings to another component that does its own parsing
(ex. a pipewire module)
This will completely clear all the default nodes (current and previous ones)
if the configured metadata value has been set to NULL. This is needed so that
the 'wpctl clear-default' command completely clears all the default nodes state.
Add a new signal that gets emitted if any WpLink changes to an error
state. This allows better error handling in cases where e.g. no format
could be negotiated.
The node priorities are difficult to configure for users, and are
not necessarily meaningful for them.
When there is no configured default node, or the configured default node
does not exist, prioritize previously configured default nodes over the
automatic node priorities.
Keep track of a stack of previous configured nodes, and update the stack
when the configured node changes.
SiLink should not wait for WpLinks becoming ESTABLISHED, before
activation. That flag shows whether a link has moved away from the
"init" state, however, links to e.g. Pulseaudio corked streams can stay
in "init" state until uncorking. This causes trouble for policies,
which needlessly wait for such links to establish.
The WpLink objects may also be kept alive by other referents, and
just unrefing them does not necessarily destroy the PW objects.
Activate SiLink even if the WpLink is still in "init" state. It's enough
that the link otherwise successfully establishes.
At dispose time, explicitly request destroying the WpLinks that were
created by the SiLink, to ensure they are removed even if there's
something else referring to them.
The move to the WpDbus API dropped the "state" property from the plugin,
but left the property enum and use of it in alsa.lua. Remove the enum and
port over the code in alsa.lua.
This allows to transparently wait until a link is PAUSED before
returning from the activation transition. This way we can also
catch negotiation/allocation errors while activating a link.
PAUSED is used instead of ACTIVE because ACTIVE depends on the
nodes being activated as well. There are cases where a link may not
activate the nodes (ex, a passive link) and the link may remain
PAUSED for a long time.
Related to: #294
Since the string length returned by wp_spa_pod_get_data() does not always match
the size of the actual json object because it is stored in contiguous memory, we
cannot always rely on that API to get the json string data.
The new wp_spa_pod_to_string() always allocates a new string with the same
length as the json size, guaranteeing that the string returned always represents
the json object, regardless of whether it is nested or not. It is always
recommented to use wp_spa_pod_to_string() unless you know what you are doing.
Currently, if the default node appears without ports for a short period of time,
the default nodes module will never select it immediately because it does not
listen for port changes. We want to listen for port changes to reevaluate again
the nodes that did not have ports before. This allows switching to the default
node as soon as it has ports if it did not had ports before.
7908b8d7be2a2992c57cd549054eda7ce46e4b44 ("m-lua-scripting: allow
converting GValue holding NULL objects to Lua") accidentally added a second
refcount. As a result, the objects are never freeded.
Remove the second refcount to fix this.
This check was originally added to avoid a small audio glitch when changing
default nodes while also changing the device profile (eg Gnome Sound Settings).
The check is removed because it causes issues when disabling alsa nodes. There
are plans to fix the audio glitch issue in the future with the planned
event-dispatcher architecture.
Fixes#279
There is no need to have this as an optional module, since libintl
is a hard dependency of both PipeWire and GLib. This way we can keep
things a bit simpler and faster (no string copies and plugin lookups)
Bump meson dependency to 0.59 to benefit of the libintl lookup that
is now built into meson's dependency() function.
We're only interested in notifications for user state changes, so we should
better be more specific about it when creating the systemd login monitor.
This avoids issues with sd_login_monitor_new() returning EINVAL if
systemd-machined is not running (and thus /run/systemd/machines does
not exist).
This allows scripts to declare when they have finished their loading,
so we can now also know when wireplumber is done loading and ready to
handle clients
Related to !313
The load functions used to do 3 things:
- push the sandbox function on the stack
- load the file and push it as a function on the stack
- call the sandbox (or the file)
Now there are separate functions to do these 3:
- wplua_push_sandbox
- wplua_load_*
- wplua_pcall
Some nodes can omit the format/rate/channels to indicate that they can
deal with all possibilities and adapt to what they are linked to.
See pipewire#876