gl/display: avoid opening the X11 display on systems with Cocoa (OS X)
authorMatthew Waters <ystreet00@gmail.com>
Tue, 6 May 2014 07:08:18 +0000 (17:08 +1000)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:31:39 +0000 (19:31 +0000)
https://bugzilla.gnome.org/show_bug.cgi?id=729551

gst-libs/gst/gl/gstgldisplay.c

index b6b46d5..5f5627d 100644 (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));