����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
-- WirePlumber
--
-- Copyright © 2024 Collabora Ltd.
--
-- SPDX-License-Identifier: MIT
local cutils = require ("common-utils")
local module = {}
function module.get_session_priority (node_props)
local priority = node_props ["priority.session"]
-- fallback to driver priority if session priority is not set
if not priority then
priority = node_props ["priority.driver"]
end
return math.tointeger (priority) or 0
end
function module.get_route_priority (node_props)
local card_profile_device = node_props ["card.profile.device"]
local device_id = node_props ["device.id"]
-- if the node does not have an associated device, just return 0
if not card_profile_device or not device_id then
return 0
end
-- Get the device
devices_om = cutils.get_object_manager ("device")
local device = devices_om:lookup {
Constraint { "bound-id", "=", device_id, type = "gobject" },
}
if not device then
return 0
end
-- Get the priority of the associated route
for p in device:iterate_params ("Route") do
local route = cutils.parseParam (p, "Route")
if route and (route.device == tonumber (card_profile_device)) then
return route.priority
end
end
return 0
end
return module
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| audio-group-utils.lua | File | 643 B | 0644 |
|
| common-utils.lua | File | 2.33 KB | 0644 |
|
| device-info-cache.lua | File | 1.78 KB | 0644 |
|
| filter-utils.lua | File | 12.41 KB | 0644 |
|
| linking-utils.lua | File | 13.21 KB | 0644 |
|
| monitor-utils.lua | File | 4.41 KB | 0644 |
|
| node-utils.lua | File | 1.21 KB | 0644 |
|