mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2025-12-20 05:20:05 +01:00
monitor-utils: Check all libcamera v4l2 devices
The actual deduplication only checked the first device. Extend it to the
full list, as intended.
Fixes: 848b6326 (monitor-utils: Rework camera deduplication code)
This commit is contained in:
parent
848b6326a9
commit
b2d2f656fd
1 changed files with 14 additions and 3 deletions
|
|
@ -98,11 +98,22 @@ function mutils.create_cam_nodes(self)
|
|||
end
|
||||
|
||||
for _, data in ipairs(libcamera_cameras) do
|
||||
if table_contains(device_ids_v4l2, data.dev_ids[1]) then
|
||||
log:debug ("skipping device " .. data.obj_path)
|
||||
local should_create = true
|
||||
|
||||
for _, dev_id in ipairs(data.dev_ids) do
|
||||
if table_contains(device_ids_v4l2, dev_id) then
|
||||
should_create = false
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if not should_create then
|
||||
log:warning ("skipping device " .. data.obj_path)
|
||||
else
|
||||
create_cam_node (data)
|
||||
table.insert(device_ids_libcamera, data.dev_ids[1])
|
||||
for _, dev_id in ipairs(data.dev_ids) do
|
||||
table.insert(device_ids_libcamera, dev_id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue