Repository navigation
Fix PipeWire camera device filtering - #3047
Merged
Merged
Conversation
zackees
marked this pull request as ready for review
October 30, 2026 10:20
zackees
commented
Oct 30, 2026
zackees
left a comment
Member
Author
There was a problem hiding this comment.
Coordinator review. Thanks, this is a real usability fix for #3041. The change is small, RED → GREEN against a private PipeWire daemon is the right kind of proof, and the ledger line is there. Points, roughly most important first:
- The exact
Video/Sourcematch may drop real cameras. Some PipeWire setups advertise virtual or loopback video asVideo/Source/Virtual(pw-loopback, some virtual-camera tools). An exactstrcmphides those, which is a regression for anyone who uses one through the portal today. AcceptingVideo/Sourceand theVideo/Source/prefix would keep them while still dropping audio, MIDI and Bluetooth nodes. A one-line test case forVideo/Source/Virtualwould pin the choice. - Dropping nodes without
node.descriptionmatches the existing code, since the list label already comes fromPW_KEY_NODE_DESCRIPTIONatcamera-portal.c.h:1143. Still, a camera that sets onlynode.nickwould vanish rather than show blank. Falling back tonode.nick, thennode.name, before dropping would be kinder. Not blocking. - Duplicates, the third symptom in #3041, are not addressed. That is fine for this PR, but say so in the description, so #3041 does not close on "Fixes" with one symptom still open. Change it to
Refs #3041, or file the duplicates as a follow-up. - The shared test setup changed.
camera_plug()now also plugs the audio node and the unnamed node for every existing case intest_pipewire_camera_registry_race. That is a C plugin test, not a port, so the no-edit rule for ported C tests does not apply. But the existing cases now run with extra nodes. They passed (4/4), so no action needed; just noting it for reviewers. - Test cost:
wait_for_unexpected_device()waits its full 250 × 20 ms ≈ 5 s on the passing path. Please add a "Test cost" line (testing-policy "Test time"). Waiting until the real camera is found and then draining one more loop iteration would cut it to well under a second.
CI is still running (4 passed, 4 running). I will queue once it is green and 1 is either addressed or answered.
|
This fix is totally bogus. See issue. |
This was referenced Oct 30, 2026
MCPVOT
pushed a commit
to MCPVOT/obs-studio
that referenced
this pull request
Oct 30, 2026
…3065) (obs-rust#3066) * test(pipewire): require a video node without a description to stay listed (obs-rust#3065) The camera registry test already advertises a Video/Source node that carries only node.name. obs-rust#3047 asserted that node never reaches the camera portal; that is the regression obs-rust#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. * fix(pipewire): list video nodes without a node description (obs-rust#3065) The obs-rust#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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3041
RED: b6d2338 adds
camera_list_excludes_non_video_and_unnamed_nodes. It failed before the fix after a private PipeWire daemon advertised anAudio/Sourcenode and aVideo/Sourcenode withoutnode.description.GREEN: this change admits only nodes with a non-empty name and description whose
media.classis exactlyVideo/Source. The rebuilttest_pipewire_camera_registry_racepassed all four cases under its private PipeWire daemon.Validation:
./lint: formatting and all change-related checks passed, but the repository self-testci/test_check_changes.pyfails in this session because it clearsPATHwhilegitis available only through the session shim (not/usr/bin); reproduced directly and unrelated to this change.