linux-pipewire: Unify ScreenCast source as Screen Capture #10565
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
Allow to select both main type of ScreenCast (monitor, window) with only one source type rather than adding a source type per ScreenCast type.
This change is made as a new Screen Capture source type which obsoletes the use of the previous Screen Capture (monitor-only) and Window Capture.
NOTE: An obsolete OBS source type is only hidden from the add list, already existing sources will still work as expected.
Why a new id rather than modifying display capture ?
I can't check or predict all portals implementation, and if one them create a restore token based on the asked types rather than only selected sources. Not changing id might introduce unwanted breaks on now obsoleted type.
Coherence in the id
Screenshots
GNOME monitor-only screencast selector (shown by obsoleted screen capture):
GNOME window-only screencast selector (shown by obsoleted window capture):
GNOME monitor+window screencast selector (shown by new screen capture):
Motivation and Context
The way the ScreenCast portal was designed does not require a OBS source type per ScreenCast type, but the feature was introduced as 1:1 towards X11 implementations.
But unlike on X11, there is also other types like virtual type for virtual monitor that can be used by Desktop Environment (or one for applications once I finish my app to app portal).
And I think rather than adding a third OBS source type, it would better to unify them like macOS has one OBS source type for SCK.
How Has This Been Tested?
Types of changes
Checklist: