Skip to content

fix(pipewire): list video nodes without a node description (#3065) - #3066

Merged
zackees merged 2 commits into
masterfrom
fix/3041-pipewire-camera-listing
Oct 30, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/3041-pipewire-camera-listing

Conversation

@zackees

@zackees zackees commented Oct 30, 2026

Copy link
Copy Markdown
Member

Fixes #3065 (regression from #3047).

RED — 7e4f58ee5

test_pipewire_camera_registry_race.c advertised a Video/Source node with only node.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's node.description requirement is what hides it. The case is renamed camera_list_excludes_non_video_nodes: it still requires the Audio/Source node 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): with PW_KEY_NODE_DESCRIPTION missing the callback returns before [camera-portal] Found device obs-test-unnamed-camera is logged, so wait_for_unnamed_camera() times out.

Not run in this session. The host has no CMocka (CMockaConfig.cmake is absent), so ENABLE_UNIT_TESTS=ON cannot 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 — 0ac7c4d91

  • Only media.class == "Video/Source" decides that a node is a camera. node.description is no longer required.
  • camera_device_label() labels each row from the first non-empty of node.description, node.nickname, device.description, then node.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.c rebuilt with the project's warning set, no diagnostics.
  • ./lint: clang-format --dry-run --Werror clean on both files; every ci/test_* self-test passes except ci/test_check_changes.py, which fails in this session because it clears PATH while git exists only as a session shim (/usr/bin/git is absent) — pre-existing and unrelated, as noted on Fix PipeWire camera device filtering #3047.
  • The private-PipeWire harness itself (admission + label path) runs in the Tier 2 lane on this PR; no local run.

Fixes #3065.

…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 zackees left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@zackees
zackees enabled auto-merge October 30, 2026 12:38
@zackees

zackees commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator.

Tier 2 Linux (tests ON) passed, which runs test_pipewire_camera_registry_race (including camera_list_excludes_non_video_nodes and the label path) in the private-PipeWire harness — that is the lane this change needs. Fast Gate, Format, CI Mode and the Tier 2 build lanes are green; Sanitize / asan was still queued when I handed off. No local gate stamp: the host cannot configure ENABLE_UNIT_TESTS=ON (no CMocka), so the lanes above are the evidence.

Branch is based on current master (e0c5db5d1), no rebase needed.

@zackees
zackees added this pull request to the merge queue Oct 30, 2026
@obs-rust-project-manager obs-rust-project-manager Bot moved this to In merge queue in obs-rust Multiview Oct 30, 2026
Merged via the queue into master with commit 7a8658e Oct 30, 2026
42 checks passed
@zackees
zackees deleted the fix/3041-pipewire-camera-listing branch October 30, 2026 13:30
@obs-rust-project-manager obs-rust-project-manager Bot moved this from In merge queue to Done in obs-rust Multiview Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

bug: linux-pipewire: camera list drops video sources that have no node.description

1 participant