jaseg / python-mpv

Python interface to the awesome mpv media player
https://git.jaseg.de/python-mpv.git
Other
531 stars 67 forks source link

embedded mpv window does not work on wayland. #196

Closed kanehekili closed 2 years ago

kanehekili commented 2 years ago

Having mpv integrated into a pyqt5 app the window floats freely - outside the app. Size can't be controlled. If starting with QT_QPA_PLATTFORM=wayland the following error is shown:

`Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb. ` mpv based "celluloid" crashes while trying to create an GL context - something I don't do. Looks like an upstream problem

Any idea if that is solvable?

trin94 commented 2 years ago

The window id method doesn't work for Wayland since there is no window id for each widget anymore.

You need to make use of the renderer api functionality as seen here: https://github.com/feeluown/FeelUOwn/blob/master/feeluown/gui/widgets/mpv.py

kanehekili commented 2 years ago

Right - works perfectly. Thanks a lot. Closing issue ...