mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-05 07:48:01 +02:00
policy: reevaluate all linkables if one linkable was removed
Allows relinking client nodes to other devices if the current device has been removed. This allows audio to keep playing in a different device if a bluetooth device is disconnected.
This commit is contained in:
parent
7bc59afd81
commit
0ff0ef77f2
2 changed files with 8 additions and 0 deletions
|
|
@ -207,6 +207,12 @@ function unhandleSiLinkable (si)
|
|||
end
|
||||
end
|
||||
|
||||
function reevaluateSiLinkables ()
|
||||
for si in silinkables_om:iterate() do
|
||||
handleSiLinkable (si)
|
||||
end
|
||||
end
|
||||
|
||||
siendpoints_om = ObjectManager { Interest { type = "SiEndpoint" }}
|
||||
silinkables_om = ObjectManager { Interest { type = "SiLinkable",
|
||||
-- only handle si-audio-adapter and si-node
|
||||
|
|
@ -225,6 +231,7 @@ end)
|
|||
|
||||
silinkables_om:connect("object-removed", function (om, si)
|
||||
unhandleSiLinkable (si)
|
||||
reevaluateSiLinkables ()
|
||||
end)
|
||||
|
||||
siendpoints_om:activate()
|
||||
|
|
|
|||
|
|
@ -292,6 +292,7 @@ end)
|
|||
|
||||
silinkables_om:connect("object-removed", function (om, si)
|
||||
unhandleSiLinkable (si)
|
||||
reevaluateSiLinkables ()
|
||||
end)
|
||||
|
||||
metadatas_om:activate()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue