From e42b5bc9854ba38727131df471e6c5624ca838df Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Sat, 30 Nov 2013 09:51:49 +0000 Subject: [PATCH] [841/906] osx: allow x11/glx backend and set default runtime to cocoa/nsgl https://bugzilla.gnome.org/show_bug.cgi?id=719757 --- gst-libs/gst/gl/gstglcontext.c | 9 ++++----- gst-libs/gst/gl/gstglwindow.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c index b68bd25625..a57e2e625a 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 ff6ade630d..79bd4cd702 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 ());