mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-01-10 03:00:15 +01:00
18 lines
408 B
Lua
18 lines
408 B
Lua
-- WirePlumber
|
|
--
|
|
-- Copyright © 2024 Collabora Ltd.
|
|
--
|
|
-- SPDX-License-Identifier: MIT
|
|
|
|
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
|
|
|
|
return module
|