mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-08 15:08:04 +02:00
scripts: monitors: log warning if spa devices were not created successfully
Can happen if the user does not have the specific spa pluging installed.
This commit is contained in:
parent
07a0a5b404
commit
40b16974cf
4 changed files with 28 additions and 11 deletions
|
|
@ -177,9 +177,13 @@ end
|
|||
|
||||
function createDevice(parent, id, factory, properties)
|
||||
local device = SpaDevice(factory, properties)
|
||||
device:connect("create-object", createNode)
|
||||
device:activate(Feature.SpaDevice.ENABLED | Feature.Proxy.BOUND)
|
||||
parent:store_managed_object(id, device)
|
||||
if device then
|
||||
device:connect("create-object", createNode)
|
||||
device:activate(Feature.SpaDevice.ENABLED | Feature.Proxy.BOUND)
|
||||
parent:store_managed_object(id, device)
|
||||
else
|
||||
Log.warning ("Failed to create '" .. factory .. "' device")
|
||||
end
|
||||
end
|
||||
|
||||
function prepareDevice(parent, id, type, factory, properties)
|
||||
|
|
|
|||
|
|
@ -109,8 +109,13 @@ function createDevice(parent, id, type, factory, properties)
|
|||
|
||||
-- create the device
|
||||
device = SpaDevice(factory, properties)
|
||||
device:connect("create-object", createNode)
|
||||
parent:store_managed_object(id, device)
|
||||
if device then
|
||||
device:connect("create-object", createNode)
|
||||
parent:store_managed_object(id, device)
|
||||
else
|
||||
Log.warning ("Failed to create '" .. factory .. "' device")
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
Log.info(parent, string.format("%d, %s (%s): %s",
|
||||
|
|
|
|||
|
|
@ -125,9 +125,13 @@ function createDevice(parent, id, type, factory, properties)
|
|||
|
||||
-- create the device
|
||||
local device = SpaDevice(factory, properties)
|
||||
device:connect("create-object", createNode)
|
||||
device:activate(Feature.SpaDevice.ENABLED | Feature.Proxy.BOUND)
|
||||
parent:store_managed_object(id, device)
|
||||
if device then
|
||||
device:connect("create-object", createNode)
|
||||
device:activate(Feature.SpaDevice.ENABLED | Feature.Proxy.BOUND)
|
||||
parent:store_managed_object(id, device)
|
||||
else
|
||||
Log.warning ("Failed to create '" .. factory .. "' device")
|
||||
end
|
||||
end
|
||||
|
||||
monitor = SpaDevice("api.libcamera.enum.manager", config.properties or {})
|
||||
|
|
|
|||
|
|
@ -125,9 +125,13 @@ function createDevice(parent, id, type, factory, properties)
|
|||
|
||||
-- create the device
|
||||
local device = SpaDevice(factory, properties)
|
||||
device:connect("create-object", createNode)
|
||||
device:activate(Feature.SpaDevice.ENABLED | Feature.Proxy.BOUND)
|
||||
parent:store_managed_object(id, device)
|
||||
if device then
|
||||
device:connect("create-object", createNode)
|
||||
device:activate(Feature.SpaDevice.ENABLED | Feature.Proxy.BOUND)
|
||||
parent:store_managed_object(id, device)
|
||||
else
|
||||
Log.warning ("Failed to create '" .. factory .. "' device")
|
||||
end
|
||||
end
|
||||
|
||||
monitor = SpaDevice("api.v4l2.enum.udev", config.properties or {})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue