scripts: use the event stack to handle virtual session items
This removes both the policy-virtual-client.lua and policy-virtual-device.lua scripts, and creates a new linking/find-virtual-target.lua script to link clients with virtual session items if one of them can be found. In addition to this, this patch also ports the policy-virtual-client-links.lua into a new scripts/rescan-virtual-links.lua to use the event stack. The idea is for the scripts/link-target.lua to create all links but only activate non virtual links, and for the scripts/rescan-virtual-links.lua to activate/deactivate virtual links based on role priorities.
This commit is contained in:
@@ -24,6 +24,12 @@ end
|
||||
|
||||
function cutils.getTargetDirection (properties)
|
||||
local target_direction = nil
|
||||
|
||||
-- retrun same direction for si-audio-virtual session items
|
||||
if properties ["item.factory.name"] == "si-audio-virtual" then
|
||||
return properties ["item.node.direction"]
|
||||
end
|
||||
|
||||
if properties ["item.node.direction"] == "output" or
|
||||
(properties ["item.node.direction"] == "input" and
|
||||
cutils.parseBool (properties ["stream.capture.sink"])) then
|
||||
|
Reference in New Issue
Block a user