mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
[841/906] osx: allow x11/glx backend and set default runtime to cocoa/nsgl
https://bugzilla.gnome.org/show_bug.cgi?id=719757
This commit is contained in:
parent
665d58b322
commit
f506e80686
2 changed files with 8 additions and 10 deletions
|
@ -150,15 +150,14 @@ gst_gl_context_new (GstGLDisplay * display)
|
||||||
if (!context && (!user_choice || g_strstr_len (user_choice, 7, "egl")))
|
if (!context && (!user_choice || g_strstr_len (user_choice, 7, "egl")))
|
||||||
context = GST_GL_CONTEXT (gst_gl_context_egl_new ());
|
context = GST_GL_CONTEXT (gst_gl_context_egl_new ());
|
||||||
#endif
|
#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 GST_GL_HAVE_PLATFORM_GLX
|
||||||
if (!context && (!user_choice || g_strstr_len (user_choice, 3, "glx")))
|
if (!context && (!user_choice || g_strstr_len (user_choice, 3, "glx")))
|
||||||
context = GST_GL_CONTEXT (gst_gl_context_glx_new ());
|
context = GST_GL_CONTEXT (gst_gl_context_glx_new ());
|
||||||
#endif
|
#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 GST_GL_HAVE_PLATFORM_WGL
|
||||||
if (!context && (!user_choice || g_strstr_len (user_choice, 3, "wgl"))) {
|
if (!context && (!user_choice || g_strstr_len (user_choice, 3, "wgl"))) {
|
||||||
context = GST_GL_CONTEXT (gst_gl_context_wgl_new ());
|
context = GST_GL_CONTEXT (gst_gl_context_wgl_new ());
|
||||||
|
|
|
@ -126,6 +126,10 @@ gst_gl_window_new (GstGLDisplay * display)
|
||||||
user_choice = g_getenv ("GST_GL_WINDOW");
|
user_choice = g_getenv ("GST_GL_WINDOW");
|
||||||
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_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 GST_GL_HAVE_WINDOW_X11
|
||||||
if (!window && (!user_choice || g_strstr_len (user_choice, 3, "x11")))
|
if (!window && (!user_choice || g_strstr_len (user_choice, 3, "x11")))
|
||||||
window = GST_GL_WINDOW (gst_gl_window_x11_new ());
|
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")))
|
if (!window && (!user_choice || g_strstr_len (user_choice, 5, "win32")))
|
||||||
window = GST_GL_WINDOW (gst_gl_window_win32_new ());
|
window = GST_GL_WINDOW (gst_gl_window_win32_new ());
|
||||||
#endif
|
#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 GST_GL_HAVE_WINDOW_WAYLAND
|
||||||
if (!window && (!user_choice || g_strstr_len (user_choice, 7, "wayland")))
|
if (!window && (!user_choice || g_strstr_len (user_choice, 7, "wayland")))
|
||||||
window = GST_GL_WINDOW (gst_gl_window_wayland_egl_new ());
|
window = GST_GL_WINDOW (gst_gl_window_wayland_egl_new ());
|
||||||
|
|
Loading…
Reference in a new issue