obs-studio icon indicating copy to clipboard operation
obs-studio copied to clipboard

UI/importers: Translate capture sources depending on display server

Open SarenDev opened this issue 1 year ago • 5 comments
trafficstars

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.

SarenDev avatar Oct 18 '24 01:10 SarenDev

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?

SarenDev avatar Oct 18 '24 01:10 SarenDev

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

SarenDev avatar Oct 18 '24 12:10 SarenDev

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

norihiro avatar Oct 19 '24 06:10 norihiro

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

SarenDev avatar Oct 19 '24 10:10 SarenDev

The folding looks fine. Though, three commits should be squashed into one commit.

norihiro avatar Oct 19 '24 10:10 norihiro

Agreed with norihiro, squash the latter two commits into the first commit and it should be good.

Lain-B avatar Oct 26 '24 20:10 Lain-B

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

RytoEX avatar Oct 29 '24 19:10 RytoEX

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.

kkartaltepe avatar Oct 30 '24 00:10 kkartaltepe