Skip to content

Gl ios safe uiview

commit d549f073

glcontext/eagl: handle sending one message during shutdown

gst_gl_window_quit() will attempt to send a message but will be called
from GstGLContext's finalize handler and so the weak ref that backs
gst_gl_window_get_context will return NULL as it has already been
cleared.  We need that context in send_message_async to decide whether
to run the provided callback immediately or queue in GCD

This is the equivalent commit for iOS as:
7f59cefafb1cd733cf527fb935b2cd32418fcbe2
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/618

commit 87622fb4

gl/eagl: don't access UIkit objects on the main thread

This means we cannot access [view layer] or view.bounds from the OpenGL
thread.  This also means that we need to call the main thread when
setting the window handle.  However, we cannot perform that
synchronously as that may deadlock with the application performing the
set_window_handle() call.

We need to defer the actual update and run it asynchronously and wait
for the window handle update internally at each point it is needed.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/372

commit 7f41522b

gl/ios: fix typo GS_GL -> GST_GL

Merge request reports

Loading