Commit fd7b68df authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

scripts: remove static-sessions

parent ac9e1e89
default_policy = {}
default_policy.sessions = {
-- [session name] = { session properties }
["audio"] = { ["media.type"] = "Audio" },
["video"] = { ["media.type"] = "Video" },
}
default_policy.endpoints = {}
default_policy.policy = {
......@@ -27,9 +21,6 @@ function default_policy.enable()
-- API to access mixer controls, needed for volume ducking
load_module("mixer-api")
-- Create sessions statically at startup
load_script("static-sessions.lua", default_policy.sessions)
-- Create endpoints statically at startup
load_script("static-endpoints.lua", default_policy.endpoints)
......
-- WirePlumber
--
-- Copyright © 2021 Collabora Ltd.
-- @author George Kiagiadakis <george.kiagiadakis@collabora.com>
--
-- SPDX-License-Identifier: MIT
-- Receive script arguments from config.lua
local sessions_config = ...
if sessions_config then
sessions = {}
for k, v in pairs(sessions_config) do
Log.info("Creating session: " .. k)
sessions[k] = ImplSession()
if type(v) == "table" then
v["session.name"] = k
sessions[k]:update_properties(v)
else
sessions[k]:update_properties({
["session.name"] = k
})
end
sessions[k]:activate(Features.ALL)
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment