wpe: Don't crash when running on X11.
authorJan Schmidt <jan@centricular.com>
Fri, 14 Aug 2020 16:02:44 +0000 (02:02 +1000)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sun, 15 Nov 2020 15:27:08 +0000 (15:27 +0000)
commit92472ef0887e2eb817c8250b4273601738f6ca11
treecab4f456470485ba3c887b8ed0dcbfc44f795008
parentc118ae11ab9a25f450926c9e23fee6c510fb6ba8
wpe: Don't crash when running on X11.

Don't assume the available EGL display is a wayland display -
instead, check the the GStreamer GL context is EGL, and then
use gst_gl_display_egl_from_gl_display to create a
GstGLDisplayEGL from that, which also adds refcounting
around the underlying EGLDisplay.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1385

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1752>
ext/wpe/WPEThreadedView.cpp
ext/wpe/WPEThreadedView.h