scripts: remove 'active-features' session item constraints

I don't fully remember where this originates from, but it looks like
some sort of hack to workaround a race condition where the event handler
would try to iterate over items that were just created and were not yet
fully ready to be used.
This commit is contained in:
George Kiagiadakis
2023-09-30 11:05:11 +03:00
parent 6af88b283c
commit c7b00599d7
2 changed files with 0 additions and 4 deletions

View File

@@ -180,7 +180,6 @@ function putils.canLink (properties, si_target)
for n in cutils.get_object_manager ("session-item"):iterate {
type = "SiLinkable",
Constraint { "item.factory.name", "c", "si-audio-adapter", "si-node" },
Constraint { "active-features", "!", 0, type = "gobject" },
Constraint { "id", "!", si_target.id, type = "gobject" },
Constraint { "item.node.direction", "!", target_props ["item.node.direction"] },
Constraint { "node.link-group", "=", target_link_group },
@@ -196,7 +195,6 @@ function putils.canLink (properties, si_target)
local peer = cutils.get_object_manager ("session-item"):lookup {
type = "SiLinkable",
Constraint { "item.factory.name", "c", "si-audio-adapter", "si-node" },
Constraint { "active-features", "!", 0, type = "gobject" },
Constraint { "id", "=", peer_id, type = "gobject" },
}
if peer and not canLinkGroupCheck (link_group, peer, hops + 1) then
@@ -222,7 +220,6 @@ function putils.findDefaultLinkable (si)
return cutils.get_object_manager ("session-item"):lookup {
type = "SiLinkable",
Constraint { "item.factory.name", "c", "si-audio-adapter", "si-node" },
Constraint { "active-features", "!", 0, type = "gobject" },
Constraint { "node.id", "=", tostring (def_node_id) }
}
end

View File

@@ -87,7 +87,6 @@ SimpleEventHook {
Constraint { "event.session-item.interface", "=", "linkable" },
Constraint { "item.factory.name", "c", "si-audio-adapter", "si-node" },
Constraint { "media.class", "#", "Stream/*", type = "pw-global" },
Constraint { "active-features", "!", 0, type = "gobject" },
},
},
execute = function (event)