policy-node/create-item: fix handling of linkables pending activation
Policies need to know if there are session items that are pending activation. Linkables are not activated in the same order as nodes appear, which causes problems for e.g. resolving target nodes, if some of the linkables are pending. Register linkables in create-items before they are activated. When activation completes, remove those that did not activate successfully. Policies can filter out inactive items by tracking active-features flags. If there are existing linkables that are not ready, suspend policy-node processing, and continue it only after all linkables are ready.
This commit is contained in:
@@ -199,6 +199,7 @@ linkables_om = ObjectManager {
|
||||
-- only handle device si-audio-adapter items
|
||||
Constraint { "item.factory.name", "=", "si-audio-adapter", type = "pw-global" },
|
||||
Constraint { "item.node.type", "=", "device", type = "pw-global" },
|
||||
Constraint { "active-features", "!", 0, type = "gobject" },
|
||||
}
|
||||
}
|
||||
links_om = ObjectManager {
|
||||
|
||||
Reference in New Issue
Block a user