If the default nodes module is loaded, and the default node is not found, it
means that there is no valid target for that session item. We only need to
manually find a default target if the default nodes module is not loaded.
This makes sure nodes are ready before finding the default node, avoiding audio
glitch in wrong device if profile was also changed while changing the default
node (can happen with Gnome Sound Settings).
Since nodes are destroyed and recreated again when a device profile changes, the
only way to make sure device nodes are ready is to check the profile classes
structure, which tell us how many total nodes the device has, and then check
that those nodes exist for that device. A rescan is triggered whenever devices,
nodes or ports changed.
This patch also improves the logic when finding default nodes, allowing virtual
sources to be set as default sources.
Fixes#85 and #130
Fixes the warning:
[string "policy-node.lua"]:117: attempt to index a nil value (field '?')
stack traceback:
[string "policy-node.lua"]:117: in function <[string "policy-node.lua"]:109>
* Add information about multiple instances
* Document better how the lua config files work
* Document how lua config files get merged from different places
* Copy over additional documentation for ALSA from pw-media-session
* Fix rst syntax issues
If a global is removed while an activation transition is in progress
and it happens that this activation transition was triggered by an
object manager, it is theoretically possible that this object manager
will then add this proxy after the transition completes, since
the transition is holding a ref on the proxy and therefore it will
not be destroyed. This ensures that the transitions are stopped on time
and the ref is dropped.
Because of this change, it is now also necessary to destroy the pw_proxy
on WpProxy's dispose() function, because if a proxy is removed before
it is bound, the registry aborts the activation but wp_proxy_deactivate()
is not destroying the proxy, since FEATURE_BOUND is not active.
In dispose() we can guarantee that the pw_proxy is destroyed.
meson devenv provides a convenient way of running the application
without installing it by overriding certain environment variables.
meson automatically overrides PATH and LD_LIBRARY_PATH, thus
there is no need to manually set those.
Running `meson devenv -C <builddir>` opens a new shell in the
build directory with the environment variables set up.
All core `pw_*_info` structures have a 64-bit change mask.
However, the `change_mask` in the session manager extension
info structures is only 32-bit. The differing sizes can cause
problems, especially on big endian architectures at the moment.
See #49
This fixes a race condition that can happen when a proxy requests a new feature
(for example WP_NODE_FEATURE_PORTS) and PipeWire destroys the proxy before the
activation finishes. This race condition was causing the current activation
transition of a proxy to never finish, creating a memory leak because the
transition holds a strong reference of the proxy. Appart from this, since the
activation never finishes, WirePlumber could wait forever and not respond to
other requests.
This also removes the wp_proxy_watch_bind_error() API for subclasses as it is
not needed anymore.
If si_link fails to activate, we got an error saying
"attempt to index a nil value". This fixes the nil value problem
and also changes the warning to an info, since some of our badly
behaved apps can cause this and we don't see any problems resulting
from it.
When a pulse client connects with TCP, it is given the 'restricted'
access policy. Assign 'rx' permissions for those clients instead of
blocking forever.
See pipewire#1863
Consider invalid id as removed marker, similarly as in the preceding for
loop. This condition should currently not be possible to hit in
practice, but better to clean up.
This reverts commit b6072f4179.
This is not right because when 2 nodes have the same name, there is
no way to know which one to use. It is better to rely on the
PW_KEY_STREAM_CAPTURE_SINK property when capturing from a monitor.