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:
@@ -180,7 +180,6 @@ function putils.canLink (properties, si_target)
|
|||||||
for n in cutils.get_object_manager ("session-item"):iterate {
|
for n in cutils.get_object_manager ("session-item"):iterate {
|
||||||
type = "SiLinkable",
|
type = "SiLinkable",
|
||||||
Constraint { "item.factory.name", "c", "si-audio-adapter", "si-node" },
|
Constraint { "item.factory.name", "c", "si-audio-adapter", "si-node" },
|
||||||
Constraint { "active-features", "!", 0, type = "gobject" },
|
|
||||||
Constraint { "id", "!", si_target.id, type = "gobject" },
|
Constraint { "id", "!", si_target.id, type = "gobject" },
|
||||||
Constraint { "item.node.direction", "!", target_props ["item.node.direction"] },
|
Constraint { "item.node.direction", "!", target_props ["item.node.direction"] },
|
||||||
Constraint { "node.link-group", "=", target_link_group },
|
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 {
|
local peer = cutils.get_object_manager ("session-item"):lookup {
|
||||||
type = "SiLinkable",
|
type = "SiLinkable",
|
||||||
Constraint { "item.factory.name", "c", "si-audio-adapter", "si-node" },
|
Constraint { "item.factory.name", "c", "si-audio-adapter", "si-node" },
|
||||||
Constraint { "active-features", "!", 0, type = "gobject" },
|
|
||||||
Constraint { "id", "=", peer_id, type = "gobject" },
|
Constraint { "id", "=", peer_id, type = "gobject" },
|
||||||
}
|
}
|
||||||
if peer and not canLinkGroupCheck (link_group, peer, hops + 1) then
|
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 {
|
return cutils.get_object_manager ("session-item"):lookup {
|
||||||
type = "SiLinkable",
|
type = "SiLinkable",
|
||||||
Constraint { "item.factory.name", "c", "si-audio-adapter", "si-node" },
|
Constraint { "item.factory.name", "c", "si-audio-adapter", "si-node" },
|
||||||
Constraint { "active-features", "!", 0, type = "gobject" },
|
|
||||||
Constraint { "node.id", "=", tostring (def_node_id) }
|
Constraint { "node.id", "=", tostring (def_node_id) }
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
@@ -87,7 +87,6 @@ SimpleEventHook {
|
|||||||
Constraint { "event.session-item.interface", "=", "linkable" },
|
Constraint { "event.session-item.interface", "=", "linkable" },
|
||||||
Constraint { "item.factory.name", "c", "si-audio-adapter", "si-node" },
|
Constraint { "item.factory.name", "c", "si-audio-adapter", "si-node" },
|
||||||
Constraint { "media.class", "#", "Stream/*", type = "pw-global" },
|
Constraint { "media.class", "#", "Stream/*", type = "pw-global" },
|
||||||
Constraint { "active-features", "!", 0, type = "gobject" },
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
execute = function (event)
|
execute = function (event)
|
||||||
|
Reference in New Issue
Block a user