mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-05 08:58:01 +02:00
default-nodes/rescan: remove unused table and access node.properties only once
This commit is contained in:
parent
a433a49e28
commit
f1c96843ee
1 changed files with 3 additions and 3 deletions
|
|
@ -97,8 +97,8 @@ function collectAvailableNodes (si_om, devices_om, port_direction, media_classes
|
|||
type = "SiLinkable",
|
||||
Constraint { "media.class", "c", table.unpack (media_classes) },
|
||||
} do
|
||||
local linkable_props = linkable.properties
|
||||
local node = linkable:get_associated_proxy ("node")
|
||||
local node_props = node.properties
|
||||
|
||||
-- check that the node has ports in the requested direction
|
||||
if not node:lookup_port {
|
||||
|
|
@ -109,11 +109,11 @@ function collectAvailableNodes (si_om, devices_om, port_direction, media_classes
|
|||
|
||||
-- check that the node has available routes,
|
||||
-- if it is associated to a real device
|
||||
if not lutils.haveAvailableRoutes (node.properties, devices_om) then
|
||||
if not lutils.haveAvailableRoutes (node_props, devices_om) then
|
||||
goto next_linkable
|
||||
end
|
||||
|
||||
table.insert (collected, Json.Object (node.properties))
|
||||
table.insert (collected, Json.Object (node_props))
|
||||
|
||||
::next_linkable::
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue