mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2025-12-26 16:30: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
|
end
|
||||||
|
|
||||||
for _, data in ipairs(libcamera_cameras) do
|
for _, data in ipairs(libcamera_cameras) do
|
||||||
if table_contains(device_ids_v4l2, data.dev_ids[1]) then
|
local should_create = true
|
||||||
log:debug ("skipping device " .. data.obj_path)
|
|
||||||
|
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
|
else
|
||||||
create_cam_node (data)
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue