mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-01 14:11:15 +00:00
Request minimum buffer even if need_pool is FALSE
When tee is used, it will not request a pool, but still it wants to know how many buffers are required. https://bugzilla.gnome.org/show_bug.cgi?id=730758
This commit is contained in:
parent
3573238683
commit
c1f524f3a8
1 changed files with 11 additions and 12 deletions
|
@ -140,10 +140,10 @@ gst_gl_mixer_propose_allocation (GstAggregator * agg,
|
||||||
GstBufferPool *pool = NULL;
|
GstBufferPool *pool = NULL;
|
||||||
GstStructure *config;
|
GstStructure *config;
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
|
GstVideoInfo info;
|
||||||
guint size = 0;
|
guint size = 0;
|
||||||
gboolean need_pool;
|
gboolean need_pool;
|
||||||
|
|
||||||
|
|
||||||
if (!GST_AGGREGATOR_CLASS (gst_gl_mixer_parent_class)->propose_allocation
|
if (!GST_AGGREGATOR_CLASS (gst_gl_mixer_parent_class)->propose_allocation
|
||||||
(agg, agg_pad, decide_query, query))
|
(agg, agg_pad, decide_query, query))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -155,18 +155,16 @@ gst_gl_mixer_propose_allocation (GstAggregator * agg,
|
||||||
if (caps == NULL)
|
if (caps == NULL)
|
||||||
goto no_caps;
|
goto no_caps;
|
||||||
|
|
||||||
|
if (!gst_video_info_from_caps (&info, caps))
|
||||||
|
goto invalid_caps;
|
||||||
|
|
||||||
|
/* the normal size of a frame */
|
||||||
|
size = info.size;
|
||||||
|
|
||||||
if (need_pool) {
|
if (need_pool) {
|
||||||
GstVideoInfo info;
|
|
||||||
|
|
||||||
if (!gst_video_info_from_caps (&info, caps))
|
|
||||||
goto invalid_caps;
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (mix, "create new pool");
|
GST_DEBUG_OBJECT (mix, "create new pool");
|
||||||
pool = gst_gl_buffer_pool_new (context);
|
pool = gst_gl_buffer_pool_new (context);
|
||||||
|
|
||||||
/* the normal size of a frame */
|
|
||||||
size = info.size;
|
|
||||||
|
|
||||||
config = gst_buffer_pool_get_config (pool);
|
config = gst_buffer_pool_get_config (pool);
|
||||||
gst_buffer_pool_config_set_params (config, caps, size, 0, 0);
|
gst_buffer_pool_config_set_params (config, caps, size, 0, 0);
|
||||||
|
|
||||||
|
@ -174,11 +172,12 @@ gst_gl_mixer_propose_allocation (GstAggregator * agg,
|
||||||
g_object_unref (pool);
|
g_object_unref (pool);
|
||||||
goto config_failed;
|
goto config_failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_query_add_allocation_pool (query, pool, size, 1, 0);
|
|
||||||
g_object_unref (pool);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gst_query_add_allocation_pool (query, pool, size, 1, 0);
|
||||||
|
if (pool)
|
||||||
|
g_object_unref (pool);
|
||||||
|
|
||||||
/* we also support various metadata */
|
/* we also support various metadata */
|
||||||
if (context->gl_vtable->FenceSync)
|
if (context->gl_vtable->FenceSync)
|
||||||
gst_query_add_allocation_meta (query, GST_GL_SYNC_META_API_TYPE, 0);
|
gst_query_add_allocation_meta (query, GST_GL_SYNC_META_API_TYPE, 0);
|
||||||
|
|
Loading…
Reference in a new issue