New problem with gstreamer, gl, threads and fences
Now that we've fixed the gstreamer media backend to wait in the right context, it appears we are waiting in the wrong thread.
Starting gtk4-widget-factory yields a constant stream of:
(gtk4-widget-factory:738102): GStreamer-GL-CRITICAL **: 12:00:18.710: gst_gl_context_thread_add: assertion 'context->priv->active_thread == g_thread_self ()' failed
which originate in this line:
gst_gl_sync_meta_wait (sync_meta, self->gst_gdk_context);
I assume the reason is that we are calling it in gtk_gst_sink_texture_from_buffer which gets called in gtk_gst_sink_show_frame, which is a gst vfunc that gets called in some random gst thread.