feat(linux/pipewire): Add support for pipewire stream selection by object serial#5054
Merged
ReenigneArcher merged 1 commit intoApr 27, 2026
Conversation
c4676e6 to
8d8959a
Compare
…cifiying the stream target via object serial
8d8959a to
5acbfc6
Compare
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5054 +/- ##
=========================================
Coverage ? 18.17%
=========================================
Files ? 109
Lines ? 23570
Branches ? 10398
=========================================
Hits ? 4285
Misses ? 14897
Partials ? 4388
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
|
Bundle ReportBundle size has no change ✅ |
21 tasks
21 tasks
ReenigneArcher
pushed a commit
to netanelbi/Sunshine
that referenced
this pull request
May 6, 2026
Currently the wlr-screencopy backend matches output_name only by parsing it as a numeric index into interface.monitors. That index is volatile under hotplug — connecting/disconnecting an external display shifts every other monitor's index. This is particularly painful for streaming setups using virtual headless outputs (e.g. HEADLESS-2) where the user wants a stable target across docking events. This patch: 1. Listens on every monitor's xdg_output before selection so that names (e.g. eDP-1, HEADLESS-2, DP-2) are populated and matchable. 2. Tries name-based matching first (stable across hotplug), then falls back to numeric index for backward compatibility with existing configs. 3. Exposes monitor names from wl_display_names() so the configuration picker offers the stable name instead of the volatile index. Existing output_name = 0 / = 1 configs continue to work via the numeric fallback. New picks via the UI use the stable name. The pipewire backend already supports stable selection via object serial (LizardByte#5054); this brings the wlr backend to parity.
This was referenced May 16, 2026
Merged
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.



Description
Add support for selecting pipewire stream via object serial in addition to current selection via node id.
Selecting via node id has known re-use issues and is therefore deprecated by pipewire. When a valid object serial is specified (lower bits != SPA_ID_INVALID) it will be preferred over node id. Since object serial is currently not set by portalgrab the current behaviour will therefore be unchanged.
This is to lay the groundwork for upcoming recommended changes in XDG portal (and also recommended to use with kde-screencast-v2/newer zkde_screencast_unstable_v1 iterations once available).
This PR will also fix the type of the node id parameter to match pipewire's uint32_t.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage