gl/display: avoid opening the X11 display on systems with Cocoa (OS X)

https://bugzilla.gnome.org/show_bug.cgi?id=729551
This commit is contained in:
Matthew Waters 2014-05-06 17:08:18 +10:00 committed by Tim-Philipp Müller
parent 6a2f2088e9
commit c5a11aa448

View file

@ -133,6 +133,10 @@ gst_gl_display_new (void)
platform_choice = g_getenv ("GST_GL_PLATFORM");
GST_INFO ("creating a window, user choice:%s", user_choice);
#if GST_GL_HAVE_WINDOW_COCOA
if (!display && (!user_choice || g_strstr_len (user_choice, 5, "cocoa")))
display = GST_GL_DISPLAY (gst_gl_display_new ());
#endif
#if GST_GL_HAVE_WINDOW_X11
if (!display && (!user_choice || g_strstr_len (user_choice, 3, "x11")))
display = GST_GL_DISPLAY (gst_gl_display_x11_new (NULL));