mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-04-26 10:20:39 +02:00
conf: create-endpoint.lua: make sure endpoints always have a valid name
This commit is contained in:
parent
0beefe4d7e
commit
d315898477
1 changed files with 7 additions and 1 deletions
|
|
@ -12,9 +12,9 @@ session_items = {
|
|||
|
||||
function addEndpoint (node, session_name, endpoint_type, priority)
|
||||
local id = node["bound-id"]
|
||||
local name = node.properties['node.name']
|
||||
local media_class = node.properties['media.class']
|
||||
local session = nil
|
||||
local name = nil
|
||||
|
||||
-- find the session
|
||||
session = sessions_om:lookup(Interest { type = "session",
|
||||
|
|
@ -25,6 +25,12 @@ function addEndpoint (node, session_name, endpoint_type, priority)
|
|||
return
|
||||
end
|
||||
|
||||
-- get the endpoint name
|
||||
name = node.properties['node.name']
|
||||
if name == nil then
|
||||
name = "endpoint.node." .. id
|
||||
end
|
||||
|
||||
-- create endpoint
|
||||
session_items.endpoints[id] = SessionItem ( endpoint_type )
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue