mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
libs/glheaders: move object creation to the gl thread where necessary
Some GL platforms (EGL, WGL) require deactivating the OpenGL context in one thread before it can be used in another thread which this test currently violates and would e.g. result in EGL_BAD_ACCESS errors from gst_gl_context_activate(). Fix by moving the object creation into the GL thread instead and not requiring additional gst_gl_context_activate() calls. https://bugzilla.gnome.org/show_bug.cgi?id=792158
This commit is contained in:
parent
9e563a20c2
commit
7cc1431a56
1 changed files with 6 additions and 7 deletions
|
@ -137,20 +137,19 @@ GST_START_TEST (test_constructors)
|
|||
|
||||
GST_END_TEST;
|
||||
|
||||
GST_START_TEST (test_constructors_require_activated_context)
|
||||
static void
|
||||
_construct_with_activated_context (GstGLContext * context, gpointer unused)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
GstGLFramebuffer *framebuffer = NULL;
|
||||
|
||||
ret = gst_gl_context_activate (context, TRUE);
|
||||
fail_if (!ret);
|
||||
|
||||
framebuffer = gst_gl_framebuffer_new (context);
|
||||
fail_if (framebuffer == NULL);
|
||||
gst_object_unref (framebuffer);
|
||||
}
|
||||
|
||||
ret = gst_gl_context_activate (context, FALSE);
|
||||
fail_if (!ret);
|
||||
GST_START_TEST (test_constructors_require_activated_context)
|
||||
{
|
||||
gst_gl_context_thread_add (context, _construct_with_activated_context, NULL);
|
||||
}
|
||||
|
||||
GST_END_TEST;
|
||||
|
|
Loading…
Reference in a new issue