gstreamer/gst-libs/gst/gl/cocoa
Julien Isorce 3c49f0f42a gl/cocoa: ensure to call NSApplication:sharedApplication in the main thread
"(NSApplication *)sharedApplication This method also makes a connection
to the window server and completes other initialization"
The implicit thing which is not mentioned is that it required
to be called in the main thread.

Fix a regression introduces by 82b7c915bb
When using with gst-launch, it was not possible to click on the close
cross of the window anymore which is a bit anoying and also because
it's was possible before.

Prior to this commit the GstGLContextCocoaClass was initialized
in the main thread because gst_gl_context_new was called in the
state change function from going from ready to paused.

From this commit this call is done from the streaming thread.
So that the call to [NSApplication sharedApplication];
was not done in the main thread anymore.

We now ensure that by assuming there is a GMainLoop running.
It's for debugging purpose so that's ok to do that. Also
note we already do this assumtion to run app itereations.

The regression had no consequence on the cocoa/videooverlay example
(that should be moved from gst-plugins-gl to -bad) because the
application is responsible for that necessary call.
2014-04-12 15:46:47 +01:00
..
gstgl_cocoa_private.h [837/906] cocoa: resize OpenGL view size each time the window is resized 2014-03-15 18:37:03 +01:00
gstglcontext_cocoa.h [794/906] context: add subclasses for the different platforms (egl, glx, wgl, etc) 2014-03-15 18:37:01 +01:00
gstglcontext_cocoa.m gl/cocoa: ensure to call NSApplication:sharedApplication in the main thread 2014-04-12 15:46:47 +01:00
gstglwindow_cocoa.h [733/906] gl: Major header and include cleanup 2014-03-15 18:36:57 +01:00
gstglwindow_cocoa.m gl/cocoa: ensure to call NSApplication:sharedApplication in the main thread 2014-04-12 15:46:47 +01:00
Makefile.am gl: fix out-of-source builds pt2 2014-03-27 22:03:14 +11:00