test-utils: align style
This commit is contained in:

committed by
Julian Bouzas

parent
c7c06351f7
commit
9a0f8647ac
@@ -25,7 +25,7 @@ SimpleEventHook {
|
||||
local lnkbl = event:get_subject ()
|
||||
local name = lnkbl.properties ["node.name"]
|
||||
|
||||
if tu.linkables_ready () and name ~= "stream-node" then
|
||||
if tu.linkablesReady () and name ~= "stream-node" then
|
||||
tu.createStreamNode ("playback")
|
||||
end
|
||||
end
|
||||
|
@@ -24,7 +24,7 @@ SimpleEventHook {
|
||||
execute = function (event)
|
||||
local lnkbl = event:get_subject ()
|
||||
local name = lnkbl.properties ["node.name"]
|
||||
if tu.linkables_ready () and name ~= "stream-node" then
|
||||
if tu.linkablesReady () and name ~= "stream-node" then
|
||||
tu.createStreamNode ("capture")
|
||||
end
|
||||
end
|
||||
|
@@ -26,7 +26,7 @@ SimpleEventHook {
|
||||
local lnkbl = event:get_subject ()
|
||||
local name = lnkbl.properties ["node.name"]
|
||||
|
||||
if tu.linkables_ready () and name ~= "stream-node" then
|
||||
if tu.linkablesReady () and name ~= "stream-node" then
|
||||
tu.createStreamNode ("playback")
|
||||
end
|
||||
end
|
||||
|
@@ -26,7 +26,7 @@ SimpleEventHook {
|
||||
local lnkbl = event:get_subject ()
|
||||
local name = lnkbl.properties ["node.name"]
|
||||
|
||||
if tu.linkables_ready () and name ~= "stream-node" then
|
||||
if tu.linkablesReady () and name ~= "stream-node" then
|
||||
tu.createStreamNode ("capture")
|
||||
end
|
||||
end
|
||||
|
@@ -27,7 +27,7 @@ SimpleEventHook {
|
||||
execute = function (event)
|
||||
local lnkbl = event:get_subject ()
|
||||
local name = lnkbl.properties ["node.name"]
|
||||
if tu.linkables_ready () and name ~= "stream-node" then
|
||||
if tu.linkablesReady () and name ~= "stream-node" then
|
||||
local props = {
|
||||
["target.object"] = tu.lnkbls ["defined-device-node"].properties ["node.id"]
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ SimpleEventHook {
|
||||
execute = function (event)
|
||||
local lnkbl = event:get_subject ()
|
||||
local name = lnkbl.properties ["node.name"]
|
||||
if tu.linkables_ready () and name ~= "stream-node" then
|
||||
if tu.linkablesReady () and name ~= "stream-node" then
|
||||
local props = {
|
||||
["target.object"] = tonumber (tu.lnkbls ["defined-device-node"].properties ["node.id"]),
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ SimpleEventHook {
|
||||
execute = function (event)
|
||||
local lnkbl = event:get_subject ()
|
||||
local name = lnkbl.properties ["node.name"]
|
||||
if tu.linkables_ready () and name ~= "stream-node" then
|
||||
if tu.linkablesReady () and name ~= "stream-node" then
|
||||
local props = {
|
||||
["target.object"] = tu.lnkbls ["defined-device-node"].properties ["node.name"]
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ SimpleEventHook {
|
||||
execute = function (event)
|
||||
local lnkbl = event:get_subject ()
|
||||
local name = lnkbl.properties ["node.name"]
|
||||
if tu.linkables_ready () and name ~= "stream-node" then
|
||||
if tu.linkablesReady () and name ~= "stream-node" then
|
||||
local props = {
|
||||
["target.object"] = tu.lnkbls ["defined-device-node"].properties ["node.id"]
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ SimpleEventHook {
|
||||
execute = function (event)
|
||||
local lnkbl = event:get_subject ()
|
||||
local name = lnkbl.properties ["node.name"]
|
||||
if tu.linkables_ready () and name ~= "stream-node" then
|
||||
if tu.linkablesReady () and name ~= "stream-node" then
|
||||
local props = {
|
||||
["target.object"] = tonumber (tu.lnkbls ["defined-device-node"].properties ["node.id"]),
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ SimpleEventHook {
|
||||
execute = function (event)
|
||||
local lnkbl = event:get_subject ()
|
||||
local name = lnkbl.properties ["node.name"]
|
||||
if tu.linkables_ready () and name ~= "stream-node" then
|
||||
if tu.linkablesReady () and name ~= "stream-node" then
|
||||
local props = {
|
||||
["target.object"] = tu.lnkbls ["defined-device-node"].properties ["node.name"]
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ SimpleEventHook {
|
||||
execute = function (event)
|
||||
local lnkbl = event:get_subject ()
|
||||
local name = lnkbl.properties ["node.name"]
|
||||
if tu.linkables_ready () and name ~= "stream-node" then
|
||||
if tu.linkablesReady () and name ~= "stream-node" then
|
||||
local props = {
|
||||
["node.target"] = tu.lnkbls ["defined-device-node"].properties ["node.id"]
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ SimpleEventHook {
|
||||
execute = function (event)
|
||||
local lnkbl = event:get_subject ()
|
||||
local name = lnkbl.properties ["node.name"]
|
||||
if tu.linkables_ready () and name ~= "stream-node" then
|
||||
if tu.linkablesReady () and name ~= "stream-node" then
|
||||
local props = {
|
||||
["node.target"] = tu.lnkbls ["defined-device-node"].properties ["node.id"]
|
||||
}
|
||||
|
@@ -28,12 +28,12 @@ SimpleEventHook {
|
||||
local lnkbl = event:get_subject ()
|
||||
local name = lnkbl.properties ["node.name"]
|
||||
|
||||
if tu.linkables_ready () and name ~= "stream-node" then
|
||||
if tu.linkablesReady () and name ~= "stream-node" then
|
||||
-- all linkables created execept stream-node
|
||||
tu.createStreamNode ("playback")
|
||||
elseif tu.linkables_ready () and tu.lnkbls ["stream-node"] then
|
||||
elseif tu.linkablesReady () and tu.lnkbls ["stream-node"] then
|
||||
-- when "stream-node" linkable is ready
|
||||
tu.set_target_in_metadata ("target.node", "defined-device-node")
|
||||
tu.setTargetInMetadata ("target.node", "defined-device-node")
|
||||
end
|
||||
end
|
||||
}:register ()
|
||||
@@ -51,8 +51,8 @@ SimpleEventHook {
|
||||
},
|
||||
},
|
||||
execute = function (event)
|
||||
if tu.linkables_ready () then
|
||||
tu.set_target_in_metadata ("target.node", "defined-device-node")
|
||||
if tu.linkablesReady () then
|
||||
tu.setTargetInMetadata ("target.node", "defined-device-node")
|
||||
end
|
||||
end
|
||||
}:register ()
|
||||
|
@@ -28,12 +28,12 @@ SimpleEventHook {
|
||||
local lnkbl = event:get_subject ()
|
||||
local name = lnkbl.properties ["node.name"]
|
||||
|
||||
if tu.linkables_ready () and name ~= "stream-node" then
|
||||
if tu.linkablesReady () and name ~= "stream-node" then
|
||||
-- all linkables created execept stream-node
|
||||
tu.createStreamNode ("capture")
|
||||
elseif tu.linkables_ready () and tu.lnkbls ["stream-node"] then
|
||||
elseif tu.linkablesReady () and tu.lnkbls ["stream-node"] then
|
||||
-- when "stream-node" linkable is ready
|
||||
tu.set_target_in_metadata ("target.node", "defined-device-node")
|
||||
tu.setTargetInMetadata ("target.node", "defined-device-node")
|
||||
end
|
||||
end
|
||||
}:register ()
|
||||
|
@@ -28,12 +28,12 @@ SimpleEventHook {
|
||||
local lnkbl = event:get_subject ()
|
||||
local name = lnkbl.properties ["node.name"]
|
||||
|
||||
if tu.linkables_ready () and name ~= "stream-node" then
|
||||
if tu.linkablesReady () and name ~= "stream-node" then
|
||||
-- all linkables created execept stream-node
|
||||
tu.createStreamNode ("playback")
|
||||
elseif tu.linkables_ready () and tu.lnkbls ["stream-node"] then
|
||||
elseif tu.linkablesReady () and tu.lnkbls ["stream-node"] then
|
||||
-- when "stream-node" linkable is ready
|
||||
tu.set_target_in_metadata ("target.object", "defined-device-node")
|
||||
tu.setTargetInMetadata ("target.object", "defined-device-node")
|
||||
end
|
||||
end
|
||||
}:register ()
|
||||
|
@@ -28,12 +28,12 @@ SimpleEventHook {
|
||||
local lnkbl = event:get_subject ()
|
||||
local name = lnkbl.properties ["node.name"]
|
||||
|
||||
if tu.linkables_ready () and name ~= "stream-node" then
|
||||
if tu.linkablesReady () and name ~= "stream-node" then
|
||||
-- all linkables created execept stream-node
|
||||
tu.createStreamNode ("capture")
|
||||
elseif tu.linkables_ready () and tu.lnkbls ["stream-node"] then
|
||||
elseif tu.linkablesReady () and tu.lnkbls ["stream-node"] then
|
||||
-- when "stream-node" linkable is ready
|
||||
tu.set_target_in_metadata ("target.object", "defined-device-node")
|
||||
tu.setTargetInMetadata ("target.object", "defined-device-node")
|
||||
end
|
||||
end
|
||||
}:register ()
|
||||
|
@@ -29,15 +29,15 @@ SimpleEventHook {
|
||||
local lnkbl = event:get_subject ()
|
||||
local name = lnkbl.properties ["node.name"]
|
||||
|
||||
if tu.linkables_ready () and name ~= "stream-node" then
|
||||
if tu.linkablesReady () and name ~= "stream-node" then
|
||||
-- all linkables created execept stream-node
|
||||
local props = {
|
||||
["target.object"] = tu.lnkbls ["defined-device-node-in-props"].properties ["node.id"]
|
||||
}
|
||||
tu.createStreamNode ("playback", props)
|
||||
elseif tu.linkables_ready () and tu.lnkbls ["stream-node"] then
|
||||
elseif tu.linkablesReady () and tu.lnkbls ["stream-node"] then
|
||||
-- when "stream-node" linkable is ready
|
||||
tu.set_target_in_metadata ("target.object", "defined-device-node-in-metadata")
|
||||
tu.setTargetInMetadata ("target.object", "defined-device-node-in-metadata")
|
||||
end
|
||||
end
|
||||
}:register ()
|
||||
|
@@ -29,15 +29,15 @@ SimpleEventHook {
|
||||
local lnkbl = event:get_subject ()
|
||||
local name = lnkbl.properties ["node.name"]
|
||||
|
||||
if tu.linkables_ready () and name ~= "stream-node" then
|
||||
if tu.linkablesReady () and name ~= "stream-node" then
|
||||
-- all linkables created execept stream-node
|
||||
local props = {
|
||||
["target.object"] = tu.lnkbls ["defined-device-node-in-props"].properties ["node.id"]
|
||||
}
|
||||
tu.createStreamNode ("capture", props)
|
||||
elseif tu.linkables_ready () and tu.lnkbls ["stream-node"] then
|
||||
elseif tu.linkablesReady () and tu.lnkbls ["stream-node"] then
|
||||
-- when "stream-node" linkable is ready
|
||||
tu.set_target_in_metadata ("target.object", "defined-device-node-in-metadata")
|
||||
tu.setTargetInMetadata ("target.object", "defined-device-node-in-metadata")
|
||||
end
|
||||
end
|
||||
}:register ()
|
||||
|
@@ -90,12 +90,12 @@ u.metadata = cu.default_metadata_om:lookup ()
|
||||
assert (u.metadata ~= nil)
|
||||
|
||||
-- update the defined target for stream session item in metadata.
|
||||
function u.set_target_in_metadata (prop, target_node_name)
|
||||
function u.setTargetInMetadata (prop, target_node_name)
|
||||
u.metadata:set (u.lnkbls ["stream-node"].properties ["node.id"], prop,
|
||||
"Spa:Id", u.lnkbls [target_node_name].properties ["node.id"])
|
||||
end
|
||||
|
||||
function u.linkables_ready ()
|
||||
function u.linkablesReady ()
|
||||
local count = 0
|
||||
for k, v in pairs (u.lnkbls) do
|
||||
if v then
|
||||
|
Reference in New Issue
Block a user