camera monitors: pass device and node properties as event data
This avoids event properties show up in device and node properties.
This commit is contained in:

committed by
George Kiagiadakis

parent
3fe930f15f
commit
7bca8cacde
@@ -16,7 +16,8 @@ config.properties = Conf.get_section (
|
|||||||
function createCamDevice (parent, id, type, factory, properties)
|
function createCamDevice (parent, id, type, factory, properties)
|
||||||
source = source or Plugin.find ("standard-event-source")
|
source = source or Plugin.find ("standard-event-source")
|
||||||
|
|
||||||
local e = source:call ("create-event", "create-libcam-device", parent, properties)
|
local e = source:call ("create-event", "create-libcam-device", parent, nil)
|
||||||
|
e:set_data ("device-properties", properties)
|
||||||
e:set_data ("factory", factory)
|
e:set_data ("factory", factory)
|
||||||
e:set_data ("device-sub-id", id)
|
e:set_data ("device-sub-id", id)
|
||||||
|
|
||||||
|
@@ -17,8 +17,8 @@ SimpleEventHook {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
execute = function(event)
|
execute = function(event)
|
||||||
local properties = event:get_properties ()
|
|
||||||
local parent = event:get_subject ()
|
local parent = event:get_subject ()
|
||||||
|
local properties = event:get_data ("device-properties")
|
||||||
local id = event:get_data ("device-sub-id")
|
local id = event:get_data ("device-sub-id")
|
||||||
|
|
||||||
local name = "libcamera_device." ..
|
local name = "libcamera_device." ..
|
||||||
|
@@ -16,7 +16,7 @@ SimpleEventHook {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
execute = function(event)
|
execute = function(event)
|
||||||
local properties = event:get_properties ()
|
local properties = event:get_data ("node-properties")
|
||||||
local parent = event:get_subject ()
|
local parent = event:get_subject ()
|
||||||
local dev_props = parent.properties
|
local dev_props = parent.properties
|
||||||
local factory = event:get_data ("factory")
|
local factory = event:get_data ("factory")
|
||||||
|
@@ -17,7 +17,8 @@ config.properties = Conf.get_section (
|
|||||||
function createCamDevice (parent, id, type, factory, properties)
|
function createCamDevice (parent, id, type, factory, properties)
|
||||||
source = source or Plugin.find ("standard-event-source")
|
source = source or Plugin.find ("standard-event-source")
|
||||||
|
|
||||||
local e = source:call ("create-event", "create-v4l2-device", parent, properties)
|
local e = source:call ("create-event", "create-v4l2-device", parent, nil)
|
||||||
|
e:set_data ("device-properties", properties)
|
||||||
e:set_data ("factory", factory)
|
e:set_data ("factory", factory)
|
||||||
e:set_data ("device-sub-id", id)
|
e:set_data ("device-sub-id", id)
|
||||||
|
|
||||||
|
@@ -16,7 +16,7 @@ SimpleEventHook {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
execute = function(event)
|
execute = function(event)
|
||||||
local properties = event:get_properties ()
|
local properties = event:get_data ("device-properties")
|
||||||
local parent = event:get_subject ()
|
local parent = event:get_subject ()
|
||||||
local id = event:get_data ("device-sub-id")
|
local id = event:get_data ("device-sub-id")
|
||||||
|
|
||||||
|
@@ -16,7 +16,7 @@ SimpleEventHook {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
execute = function(event)
|
execute = function(event)
|
||||||
local properties = event:get_properties ()
|
local properties = event:get_data ("node-properties")
|
||||||
local parent = event:get_subject ()
|
local parent = event:get_subject ()
|
||||||
local dev_props = parent.properties
|
local dev_props = parent.properties
|
||||||
local factory = event:get_data ("factory")
|
local factory = event:get_data ("factory")
|
||||||
|
Reference in New Issue
Block a user