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:

committed by
George Kiagiadakis

parent
07a0a5b404
commit
40b16974cf
@@ -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 {})
|
||||
|
Reference in New Issue
Block a user