[Bug 741054] gl/cocoa: Simplify NSApplication initialisation for console apps

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Dec 2 21:03:43 PST 2014


https://bugzilla.gnome.org/show_bug.cgi?id=741054
  GStreamer | gst-plugins-bad | unspecified

--- Comment #1 from Arun Raghavan <arun at accosted.net> 2014-12-03 05:03:40 UTC ---
Created an attachment (id=292038)
 View: https://bugzilla.gnome.org/attachment.cgi?id=292038
 Review: https://bugzilla.gnome.org/review?bug=741054&attachment=292038

gl/cocoa: Simplify NSApplication initialisation for console apps

This eliminates a possible deadlock in GL context initialisation -- if
the GLib mainloop was creating an object (trying to get a GType registry
lock) when a streaming thread asked for a GL context, we would try to
create the context in class init (also holding the GType registry lock),
we would deadlock because we were trying to wait for an idle callback to
be called in the mainloop, which was currently blocked on the GType lock.

Instead, we now schedule the idle callback and hope it gets called
before we need to create the actual context. If there's a delay there,
we introduce a 1s wait for the the callback to be called. If that fails,
we bail.

While this seems a bit of a regression to the previous state that was
fixed by 8d92b6a3, this makes things a bit more robust, and properly
fails if NSApplication initialisation is not completed by the time we
need it.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list