summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Isorce <julien.isorce@gmail.com>2013-11-30 09:51:49 +0000
committerMatthew Waters <ystreet00@gmail.com>2014-03-15 18:37:04 +0100
commitf506e80686eedc66912583db11914ec3f713b478 (patch)
tree1137407f3c22003ccd3ef7172393ae6966cd8c1a
parent665d58b32217e707971879cf848fd5f79711b4a4 (diff)
[841/906] osx: allow x11/glx backend and set default runtime to cocoa/nsgl
https://bugzilla.gnome.org/show_bug.cgi?id=719757
-rw-r--r--gst-libs/gst/gl/gstglcontext.c9
-rw-r--r--gst-libs/gst/gl/gstglwindow.c9
2 files changed, 8 insertions, 10 deletions
diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c
index b68bd2562..a57e2e625 100644
--- a/gst-libs/gst/gl/gstglcontext.c
+++ b/gst-libs/gst/gl/gstglcontext.c
@@ -150,15 +150,14 @@ gst_gl_context_new (GstGLDisplay * display)
if (!context && (!user_choice || g_strstr_len (user_choice, 7, "egl")))
context = GST_GL_CONTEXT (gst_gl_context_egl_new ());
#endif
+#if GST_GL_HAVE_PLATFORM_COCOA
+ if (!context && (!user_choice || g_strstr_len (user_choice, 5, "cocoa")))
+ 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_COCOA
- if (!context && (!user_choice || g_strstr_len (user_choice, 5, "cocoa"))) {
- context = GST_GL_CONTEXT (gst_gl_context_cocoa_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 ());
diff --git a/gst-libs/gst/gl/gstglwindow.c b/gst-libs/gst/gl/gstglwindow.c
index ff6ade630..79bd4cd70 100644
--- a/gst-libs/gst/gl/gstglwindow.c
+++ b/gst-libs/gst/gl/gstglwindow.c
@@ -126,6 +126,10 @@ gst_gl_window_new (GstGLDisplay * display)
user_choice = g_getenv ("GST_GL_WINDOW");
GST_INFO ("creating a window, user choice:%s", user_choice);
+#if GST_GL_HAVE_WINDOW_COCOA
+ if (!window && (!user_choice || g_strstr_len (user_choice, 5, "cocoa")))
+ window = GST_GL_WINDOW (gst_gl_window_cocoa_new ());
+#endif
#if GST_GL_HAVE_WINDOW_X11
if (!window && (!user_choice || g_strstr_len (user_choice, 3, "x11")))
window = GST_GL_WINDOW (gst_gl_window_x11_new ());
@@ -134,11 +138,6 @@ gst_gl_window_new (GstGLDisplay * display)
if (!window && (!user_choice || g_strstr_len (user_choice, 5, "win32")))
window = GST_GL_WINDOW (gst_gl_window_win32_new ());
#endif
-#if GST_GL_HAVE_WINDOW_COCOA
- if (!window && (!user_choice || g_strstr_len (user_choice, 5, "cocoa"))) {
- window = GST_GL_WINDOW (gst_gl_window_cocoa_new ());
- }
-#endif
#if GST_GL_HAVE_WINDOW_WAYLAND
if (!window && (!user_choice || g_strstr_len (user_choice, 7, "wayland")))
window = GST_GL_WINDOW (gst_gl_window_wayland_egl_new ());