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

Fix Wayland support in OpenGL video output #36

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

xhaakon
Copy link

@xhaakon xhaakon commented Feb 10, 2020

Make the video play inside the multimedia pane, not open its own window.

Before:
Screenshot from 2020-02-10 12-01-18

After:
Screenshot from 2020-02-10 11-55-04

Maintain some minimal size to keep all media player controls visible.
At the moment "hide" means shrink to 1x1 px rectangle as GstVideoOverlay
provides no means to unmap its wl_subsurface on Wayland.
@kitone
Copy link
Owner

kitone commented Feb 22, 2020

Hi, thanks for the pull and sorry for the delay.
I don't have time to debug it, but a quick test make the application crash :

X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 3 (X_GetWindowAttributes)
Resource id in failed request: 0x26543b0
Serial number of failed request: 54
Current serial number in output stream: 55

@xhaakon
Copy link
Author

xhaakon commented Feb 24, 2020

Hi, I get this error when the video output in the preferences is set to Autodetect. Apparently autovideosink element makes a wrong choice on Wayland, instantiating an X11 video sink.

I guess we'll have to limit the choice of video outputs when Wayland gets detected and keep only OpenGL, and perhaps SDL.

This is the only configuration working so far. 'Autodetect' is disabled
as well since autovideosink prefers X11 output even on Wayland.

Prevents the following error

  X Error of failed request: BadWindow (invalid Window parameter)
  Major opcode of failed request: 3 (X_GetWindowAttributes)
@xhaakon
Copy link
Author

xhaakon commented Mar 7, 2020

Hi, I added another change that forces the application to use OpenGL video output when it's running on Wayland. This should prevent the crash due to X11 error you mentioned above.

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

Successfully merging this pull request may close these issues.

2 participants