mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 04:52:28 +00:00
glbufferpool: introduce check for GLMemory allocators
The last missing piece of EGLImage support has been pushed.
This commit is contained in:
parent
0aae67d261
commit
28d3ab2922
1 changed files with 12 additions and 2 deletions
|
@ -115,8 +115,13 @@ gst_gl_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
|
||||||
if (priv->allocator)
|
if (priv->allocator)
|
||||||
gst_object_unref (priv->allocator);
|
gst_object_unref (priv->allocator);
|
||||||
|
|
||||||
if (allocator /* && GST_IS_GL_MEMORY_ALLOCATOR (allocator) FIXME EGLImage */ ) {
|
if (allocator) {
|
||||||
priv->allocator = gst_object_ref (allocator);
|
if (!GST_IS_GL_MEMORY_ALLOCATOR (allocator)) {
|
||||||
|
gst_object_unref (allocator);
|
||||||
|
goto wrong_allocator;
|
||||||
|
} else {
|
||||||
|
priv->allocator = gst_object_ref (allocator);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
priv->allocator =
|
priv->allocator =
|
||||||
GST_ALLOCATOR (gst_gl_memory_allocator_get_default (glpool->context));
|
GST_ALLOCATOR (gst_gl_memory_allocator_get_default (glpool->context));
|
||||||
|
@ -241,6 +246,11 @@ wrong_caps:
|
||||||
"failed getting geometry from caps %" GST_PTR_FORMAT, caps);
|
"failed getting geometry from caps %" GST_PTR_FORMAT, caps);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
wrong_allocator:
|
||||||
|
{
|
||||||
|
GST_WARNING_OBJECT (pool, "Incorrect allocator type for this pool");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
Loading…
Reference in a new issue