Skip to content

Draft: monitor-utils: Stop deduplicating multi-device cameras

Robert Mader requested to merge rmader/wireplumber:issue708 into master

Camera nodes with multiple V4L2 devices can - currently - only be created by the libcamera plugin and we assume they should get preferred, i.e. they never intentionally get hidden in favor of a node from the V4L2 plugin.

Right now we still make such nodes go through the deduplication logic though, resulting in multiple issues:

  1. If multiple libcamera nodes using the same devices exist, we currently end up only creating a device node for one of them, making the others unusable.
  2. The camera deduplication was originally only intended for UVC cameras from the two plugins and it's not clear whether there are cases where UVC and non-UVC camera nodes share the same V4L2 devices - and we probably shouldn't hide cameras if we're not sure that it is benefitial.

Thus change the logic to just immediately create device nodes for the case in question. This will also allow us to simplify the deduplication code, which is done in a following commit.

Closes #689 Closes #708


Tested on:

  • multiple computers with UVC cameras (no regression)
  • Librem5 (no regression)
  • PinePhone (no regression)
  • PinePhone Pro (no regression)
  • Pixel 3a (fixed, both cameras work now)
Edited by Robert Mader

Merge request reports