If one link fails, the activation transition will return, but then
other links will continue to call the callback and try to access
the now invalid activation transition. With this change, the callback
is bound to the lifetime of the transition and will stop being called
after the transition returns
Fixes#76
There is a chance of race condition here in case the client knows which target
it wants to link to, but wireplumber has not yet "seen" this target because
it is getting prepared asynchronously
This may stall for up to 2 seconds clients that start streams with an invalid
node.target property, but then they will be re-routed to the default node
If the item was not already handled or if there is no target,
we don't need to search for existing links... we will not find any
Also, don't remove links or schedule rescan if the node is not eligible
for reconnection... we will delete the node below instead
* First of all, do not clear the stack... it's not necessary to do
so and it causes trouble if this function is called from within
itself, as it clears the stack of the previous context
* Then, do not stop/restart the garbage collector unless this is
the base call
Fixes#73
This is now done by the metadata implementation.
Doing this manually causes assertion failures, because then the
target.node is removed before policy-node "unhandles" the associated
session item and it tries to re-link it to the default source/sink
Now that the build directory is found automatically, if it so
happens that you have more than one build dir in your tree,
'make run' may not run the version that you expect...
./builddir/wp-uninstalled.sh can now be called without a -b argument,
it'll automatically set the full paths. This is useful when building as
a subproject.
meson has a limitation: the configure_file() object is just a file
wrapper object. Wrap this into a custom_target() whose return value has
a full_path() method. This way, pipewire can use
wireplumber_uninstalled.full_path() without having to build the
directory structure itself.
AUX channels can link to any other channel but when AUX channels are
linked, they must match exactly.
Fixes some issues with split devices with aux channels.
"unpositioned" nodes don't have a specific channel layout
(ex the Pro Audio profile); in that case, we should not try to copy this
undefined layout to the peer node, we need to configure both in their
preferred layout and do a best-effort linking of ports.
-some modules will not be available during runtime, due to
external dependencies.
-these modules can now be marked optional.
-loading of these optional modules will be attempted and if
they are not available, wp will recover and will not be
terminated.
We can use spa_format_audio_raw_parse() because we need to parse
the samplerate here optionally.
Many virtual sinks will not set a rate, which makes parsing fail and
the node will end up with the default channels/positions, which is
most likely wrong.
Fixes channel positions for virtual sinks.
when coming from a gstreamer element's stream-properties property,
the boolean values use capitals:
gst-launch-1.0 ... ! pipewiresink stream-properties="p,foo=true"
pw-cli info <node>
-> "foo" = "TRUE"
* also respect node.exclusive
* also send error to clients if a target node was not found
or if it is not possible to link to it
* also allow dont-reconnect nodes to be handled normally
the first time they appear, until they are linked once
* find out if the node supports iec958 or dsd
* use spa_pod_fixate() to get the default format of the node, like p-m-s does
* use _enum_formats_sync() to utilize the param cache, assuming that the node
always has all features enabled (which is always the case when coming from
an ObjectManager that was defined in Lua)
* simplify the activation / deactivation procedure
* configure nodes with unpositioned channels early, as if they were devices
When the default node changes to become the same as the target.node value
that was set in the metadata, remove this target.node from the metadata
to let the stream follow the default.
Also cleanup the useless target.node == -1 metadata that pipewire-pulse sets
when a stream is moved to the default node
Fixes#65