Repository navigation
fix(pipewire): list video nodes without a node description (#3065) - #3066
Conversation
…sted (#3065) The camera registry test already advertises a Video/Source node that carries only node.name. #3047 asserted that node never reaches the camera portal; that is the regression #3065 reports: a camera whose description lives on the device, not the node, disappears from the device list. The test now requires the node to be admitted while the Audio/Source node stays out.
The #3047 filter required PW_KEY_NODE_DESCRIPTION on the registry global, so a Video/Source node whose description lives on its device (or in node.nickname) was dropped from the camera list. Only the media class decides whether a node is a camera; the label now falls back node.description -> node.nickname -> device.description -> node.name, so no row is blank either.
zackees
left a comment
There was a problem hiding this comment.
Coordinator review: LGTM. This fixes the regression #3047 introduced (the unnamed-camera point from that review).
media.class == "Video/Source"alone decides camera-ness, and the label falls back through description → nick → device description → node id, so no row is blank and no camera is hidden.- The test change is to our own test from #3047, not an upstream one, and it reverses an assertion that pinned the bug. That's allowed.
- RED was not run locally (no CMocka on the host); the Tier 2 lane on this PR is the RED/GREEN proof. Please paste the passing case from the CI log into the body once it's green.
Still open from #3047 and not covered here: the exact match also hides Video/Source/Virtual nodes. If that's intended (OBS's own virtual camera shouldn't list itself), add a one-line comment saying so; otherwise match the prefix.
|
Handed off to the coordinator. Tier 2 Linux (tests ON) passed, which runs Branch is based on current master ( |
Fixes #3065 (regression from #3047).
RED —
7e4f58ee5test_pipewire_camera_registry_race.cadvertised aVideo/Sourcenode with onlynode.name(obs-test-unnamed-camera) and #3047 asserted it must never reach the camera portal. That is the bug: the node is a camera, and #3047'snode.descriptionrequirement is what hides it. The case is renamedcamera_list_excludes_non_video_nodes: it still requires theAudio/Sourcenode to be absent, and now requires the unnamed video node to be found.It fails before the fix at the filter gate in
on_registry_global_cb(camera-portal.c.h:1285): withPW_KEY_NODE_DESCRIPTIONmissing the callback returns before[camera-portal] Found device obs-test-unnamed-camerais logged, sowait_for_unnamed_camera()times out.Not run in this session. The host has no CMocka (
CMockaConfig.cmakeis absent), soENABLE_UNIT_TESTS=ONcannot configure here and the case runs in the Tier 2 Docker lane, where this PR's CI executes it. The RED is code-level: the assertion needs a log line the pre-fix filter cannot emit.GREEN —
0ac7c4d91media.class == "Video/Source"decides that a node is a camera.node.descriptionis no longer required.camera_device_label()labels each row from the first non-empty ofnode.description,node.nickname,device.description, thennode.name, so a description-less camera is listed under a readable name instead of a blank row — both halves of bug: <sources>: Linux pipewire video lists non-video and blank devices #3041 stay satisfied.Validation
ninja -C build linux-pipewire:linux-pipewire.nix-camera+.h.crebuilt with the project's warning set, no diagnostics../lint:clang-format --dry-run --Werrorclean on both files; everyci/test_*self-test passes exceptci/test_check_changes.py, which fails in this session because it clearsPATHwhilegitexists only as a session shim (/usr/bin/gitis absent) — pre-existing and unrelated, as noted on Fix PipeWire camera device filtering #3047.Fixes #3065.