mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
glupload: Do not propose allocators with sysmem
None of the GL allocators actually offer a generic alloc() implementation. As a side effect, they cannot be offered as they don't work with generic video buffer pool. Our specialized buffer pool can be dropped by tee or alphacombine as sharing the same buffer pool over two branch is not supported by the pool API. Fixes #3372 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6327>
This commit is contained in:
parent
c9aaf39279
commit
bcad005d05
1 changed files with 14 additions and 8 deletions
|
@ -525,7 +525,7 @@ _gl_memory_upload_propose_allocation (gpointer impl, GstQuery * decide_query,
|
|||
guint n_pools, i;
|
||||
GstCaps *caps;
|
||||
GstCapsFeatures *features_gl, *features_sys;
|
||||
GstAllocator *allocator;
|
||||
GstAllocator *allocator = NULL;
|
||||
GstAllocationParams params;
|
||||
gboolean use_sys_mem = FALSE;
|
||||
const gchar *target_pool_option_str = NULL;
|
||||
|
@ -567,20 +567,26 @@ _gl_memory_upload_propose_allocation (gpointer impl, GstQuery * decide_query,
|
|||
|
||||
gst_allocation_params_init (¶ms);
|
||||
|
||||
allocator =
|
||||
GST_ALLOCATOR (gst_gl_memory_allocator_get_default (upload->
|
||||
upload->context));
|
||||
|
||||
if (!use_sys_mem) {
|
||||
allocator =
|
||||
GST_ALLOCATOR (gst_gl_memory_allocator_get_default (upload->
|
||||
upload->context));
|
||||
}
|
||||
|
||||
gst_query_add_allocation_param (query, allocator, ¶ms);
|
||||
gst_object_unref (allocator);
|
||||
gst_clear_object (&allocator);
|
||||
|
||||
#if GST_GL_HAVE_PLATFORM_EGL
|
||||
if (upload->upload->context
|
||||
&& gst_gl_context_get_gl_platform (upload->upload->context) ==
|
||||
GST_GL_PLATFORM_EGL) {
|
||||
allocator =
|
||||
GST_ALLOCATOR (gst_allocator_find (GST_GL_MEMORY_EGL_ALLOCATOR_NAME));
|
||||
if (!use_sys_mem) {
|
||||
allocator =
|
||||
GST_ALLOCATOR (gst_allocator_find (GST_GL_MEMORY_EGL_ALLOCATOR_NAME));
|
||||
}
|
||||
gst_query_add_allocation_param (query, allocator, ¶ms);
|
||||
gst_object_unref (allocator);
|
||||
gst_clear_object (&allocator);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue