summaryrefslogtreecommitdiff
path: root/gst-libs/gst/gl/gstglcontext.c
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2014-05-29 17:09:26 +0200
committerEdward Hervey <bilboed@bilboed.com>2014-05-29 17:12:41 +0200
commit45ec777cea0e69b2597d1ec02b18ec31d618c920 (patch)
tree04fde4173824ec3451128b6ee993000ed76ab4d9 /gst-libs/gst/gl/gstglcontext.c
parent30622337ab5ad66a5b3cdf1469dd02f72e74f886 (diff)
downloadgstreamer-plugins-bad-45ec777cea0e69b2597d1ec02b18ec31d618c920.tar.gz
glcontext: Try GLX support before EGL support
If available, glx has got a better chance of being the Gl platform we want to use compared to EGL
Diffstat (limited to 'gst-libs/gst/gl/gstglcontext.c')
-rw-r--r--gst-libs/gst/gl/gstglcontext.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c
index ff172d84d..b53e21087 100644
--- a/gst-libs/gst/gl/gstglcontext.c
+++ b/gst-libs/gst/gl/gstglcontext.c
@@ -260,6 +260,10 @@ gst_gl_context_new (GstGLDisplay * display)
user_choice = g_getenv ("GST_GL_PLATFORM");
GST_INFO ("creating a context, user choice:%s", user_choice);
+#if GST_GL_HAVE_PLATFORM_GLX
+ if (!context && (!user_choice || g_strstr_len (user_choice, 3, "glx")))
+ context = GST_GL_CONTEXT (gst_gl_context_glx_new ());
+#endif
#if GST_GL_HAVE_PLATFORM_EGL
if (!context && (!user_choice || g_strstr_len (user_choice, 7, "egl")))
context = GST_GL_CONTEXT (gst_gl_context_egl_new ());
@@ -268,10 +272,6 @@ gst_gl_context_new (GstGLDisplay * display)
if (!context && (!user_choice || g_strstr_len (user_choice, 5, "cgl")))
context = GST_GL_CONTEXT (gst_gl_context_cocoa_new ());
#endif
-#if GST_GL_HAVE_PLATFORM_GLX
- if (!context && (!user_choice || g_strstr_len (user_choice, 3, "glx")))
- context = GST_GL_CONTEXT (gst_gl_context_glx_new ());
-#endif
#if GST_GL_HAVE_PLATFORM_WGL
if (!context && (!user_choice || g_strstr_len (user_choice, 3, "wgl"))) {
context = GST_GL_CONTEXT (gst_gl_context_wgl_new ());