G_DEFINE_TYPE (GstGLContextCocoa, gst_gl_context_cocoa, GST_GL_TYPE_CONTEXT);
+/* Define this if the GLib patch from
+ * https://bugzilla.gnome.org/show_bug.cgi?id=741450
+ * is used
+ */
+#ifndef GSTREAMER_GLIB_COCOA_NSAPPLICATION
+
static GMutex nsapp_lock;
static GCond nsapp_cond;
return TRUE;
}
+#endif
static void
gst_gl_context_cocoa_class_init (GstGLContextCocoaClass * klass)
{
GstGLContextClass *context_class = (GstGLContextClass *) klass;
+#ifndef GSTREAMER_GLIB_COCOA_NSAPPLICATION
NSAutoreleasePool* pool = nil;
+#endif
g_type_class_add_private (klass, sizeof (GstGLContextCocoaPrivate));
context_class->get_gl_platform =
GST_DEBUG_FUNCPTR (gst_gl_context_cocoa_get_gl_platform);
+#ifndef GSTREAMER_GLIB_COCOA_NSAPPLICATION
pool = [[NSAutoreleasePool alloc] init];
/* [NSApplication sharedApplication] will usually be
}
[pool release];
+#endif
}
static void
GstGLWindowCocoa *window_cocoa = GST_GL_WINDOW_COCOA (window);
__block NSOpenGLContext *glContext = nil;
+#ifndef GSTREAMER_GLIB_COCOA_NSAPPLICATION
priv->source_id = g_timeout_add (200, gst_gl_window_cocoa_nsapp_iteration, NULL);
+#endif
priv->gl_context = nil;
if (other_context)