mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
gl/display: check the correct env variable for choosing an egl display
GST_GL_WINDOW is used for window system specific choices. An EGLDisplay can be created from window systems with egl support by using eglGetDisplay(). https://bugzilla.gnome.org/show_bug.cgi?id=729551
This commit is contained in:
parent
47a4be4721
commit
320ceef471
1 changed files with 4 additions and 2 deletions
|
@ -120,7 +120,7 @@ GstGLDisplay *
|
||||||
gst_gl_display_new (void)
|
gst_gl_display_new (void)
|
||||||
{
|
{
|
||||||
GstGLDisplay *display = NULL;
|
GstGLDisplay *display = NULL;
|
||||||
const gchar *user_choice;
|
const gchar *user_choice, *platform_choice;
|
||||||
static volatile gsize _init = 0;
|
static volatile gsize _init = 0;
|
||||||
|
|
||||||
if (g_once_init_enter (&_init)) {
|
if (g_once_init_enter (&_init)) {
|
||||||
|
@ -130,6 +130,7 @@ gst_gl_display_new (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
user_choice = g_getenv ("GST_GL_WINDOW");
|
user_choice = g_getenv ("GST_GL_WINDOW");
|
||||||
|
platform_choice = g_getenv ("GST_GL_PLATFORM");
|
||||||
GST_INFO ("creating a window, user choice:%s", user_choice);
|
GST_INFO ("creating a window, user choice:%s", user_choice);
|
||||||
|
|
||||||
#if GST_GL_HAVE_WINDOW_X11
|
#if GST_GL_HAVE_WINDOW_X11
|
||||||
|
@ -137,7 +138,8 @@ gst_gl_display_new (void)
|
||||||
display = GST_GL_DISPLAY (gst_gl_display_x11_new (NULL));
|
display = GST_GL_DISPLAY (gst_gl_display_x11_new (NULL));
|
||||||
#endif
|
#endif
|
||||||
#if GST_GL_HAVE_PLATFORM_EGL
|
#if GST_GL_HAVE_PLATFORM_EGL
|
||||||
if (!display && (!user_choice || g_strstr_len (user_choice, 3, "egl")))
|
if (!display && (!platform_choice
|
||||||
|
|| g_strstr_len (platform_choice, 3, "egl")))
|
||||||
display = GST_GL_DISPLAY (gst_gl_display_egl_new ());
|
display = GST_GL_DISPLAY (gst_gl_display_egl_new ());
|
||||||
#endif
|
#endif
|
||||||
if (!display) {
|
if (!display) {
|
||||||
|
|
Loading…
Reference in a new issue