Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XSHM disabled in X11 EGL, but works great when force enabled #5122

Closed
scaledteam opened this issue Aug 14, 2021 · 0 comments · Fixed by #5123
Closed

XSHM disabled in X11 EGL, but works great when force enabled #5122

scaledteam opened this issue Aug 14, 2021 · 0 comments · Fixed by #5123
Labels
Linux Affects Linux

Comments

@scaledteam
Copy link

Operating System Info

Other

Other OS

Debian 11

OBS Studio Version

27.0.1

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/s0PPoR3kl_oybJLW

OBS Studio Crash Log URL

No response

Expected Behavior

When OBS_USE_EGL=1 used, XSHM appear in list of sources, XComposite doesn't apper.

Current Behavior

XSHM and doesn't apper in sources list, but works fine in EGL under X11 with little patch. Xcomposite don't work and should not work, so this patch only for XSHM.

linux-capture.c

if (obs_get_nix_platform() == OBS_NIX_PLATFORM_X11_GLX || obs_get_nix_platform() == OBS_NIX_PLATFORM_X11_EGL) {
	obs_register_source(&xshm_input);
}

Steps to Reproduce

  1. Open OBS Studio with OBS_USE_EGL=1 parameter
  2. Don't notice any XSHM appearance
  3. Make little patch to linux-capture.c file
  4. Recompile
  5. Now XSHM works fine under EGL
    ...

Anything else we should know?

No response

@Fenrirthviti Fenrirthviti added the Linux Affects Linux label Aug 14, 2021
GeorgesStavracas added a commit to GeorgesStavracas/obs-studio that referenced this issue Aug 15, 2021
Unlike Xcomposite, the XSHM plugin does not use GLX code, and thus
can be used on when EGL renderer is used. It still is X11-specific
though, and shouldn't be used on Wayland.

Rework the obs_module_load() function of linux-capture to use a
switch statement, and load XSHM both on EGL/X11 and GLX/X11.

Fixes obsproject#5122
jp9000 pushed a commit that referenced this issue Aug 15, 2021
Unlike Xcomposite, the XSHM plugin does not use GLX code, and thus
can be used on when EGL renderer is used. It still is X11-specific
though, and shouldn't be used on Wayland.

Rework the obs_module_load() function of linux-capture to use a
switch statement, and load XSHM both on EGL/X11 and GLX/X11.

Fixes #5122
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Linux Affects Linux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants