obs-studio
obs-studio copied to clipboard
UI/importers: Translate capture sources depending on display server
Description
Fixes a crash when importing scenes from Windows by translating window and game capture sources to xcomposite or pipewire depending on the display server used.
This change prevents xcomposite from being assigned on non-X11 systems, which causes the crash due to the module not being loaded.
Motivation and Context
Fixes the issue reported in #6398 and at the end of #5323
How Has This Been Tested?
Tested under Ubuntu 24.10 with KDE Plasma 6.1.5 under both Wayland and X11
Types of changes
- Bug fix (non-breaking change which fixes an issue)
Checklist:
- [x] My code has been run through clang-format.
- [x] I have read the contributing document.
- [x] My code is not on the master branch.
- [x] The code has been tested.
- [x] All commit messages are properly formatted and commits squashed where appropriate.
- [ ] I have included updates to all appropriate documentation.
I also noticed that the Windows and MacOS translation implementations are missing translations for pipewire. Should they be added to this request or a new one?
Translate capture sources depending on WM
This is not a good wording, Wayland and X11 are not WMs but windowing systems.
Sorry, I realized that after I submitted my request
The commit d7b1be3c1 has a too long description in a line, 88 characters, limit 72:
Use pipewire-screen-capture instead of the currently discouraged pipewire-window-capture
The commit d7b1be3 has a too long description in a line, 88 characters, limit 72:
Use pipewire-screen-capture instead of the currently discouraged pipewire-window-capture
Corrected, apologies
The folding looks fine. Though, three commits should be squashed into one commit.
Agreed with norihiro, squash the latter two commits into the first commit and it should be good.
If a user imports a scene collection in Wayland, and then swaps to X11 later, what happens to these sources? Do they simply not load? Will OBS crash if you try to access their properties?
cc @kkartaltepe since we might have had prior conversations about what to do about this.
If this fixes a GitHub issue, use this syntax in the PR description:
Fixes #5323
If a user imports a scene collection in Wayland, and then swaps to X11 later, what happens to these sources? Do they simply not load? Will OBS crash if you try to access their properties?
They just have no properties and are not useful. This was considered fine when we decided to split the capture plugins between the platforms. I don't have a problem with the implementation as is.