mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 12:32:29 +00:00
plugins: provide at least two buffers in sink pool
Adds two buffers as the default value of minimum buffer. This would be used when creating and proposing vaapi bufferpool for sink pad, hence the upstream element will keep, at least, these two buffers. https://bugzilla.gnome.org/show_bug.cgi?id=775203 Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
This commit is contained in:
parent
58e7b575bb
commit
bca2b1680b
1 changed files with 6 additions and 2 deletions
|
@ -34,6 +34,8 @@
|
||||||
/* Default debug category is from the subclass */
|
/* Default debug category is from the subclass */
|
||||||
#define GST_CAT_DEFAULT (plugin->debug_category)
|
#define GST_CAT_DEFAULT (plugin->debug_category)
|
||||||
|
|
||||||
|
#define BUFFER_POOL_SINK_MIN_BUFFERS 2
|
||||||
|
|
||||||
/* GstVideoContext interface */
|
/* GstVideoContext interface */
|
||||||
static void
|
static void
|
||||||
plugin_set_display (GstVaapiPluginBase * plugin, GstVaapiDisplay * display)
|
plugin_set_display (GstVaapiPluginBase * plugin, GstVaapiDisplay * display)
|
||||||
|
@ -714,7 +716,9 @@ ensure_sinkpad_buffer_pool (GstVaapiPluginBase * plugin, GstCaps * caps)
|
||||||
if (!ensure_sinkpad_allocator (plugin, caps, &size))
|
if (!ensure_sinkpad_allocator (plugin, caps, &size))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
pool = gst_vaapi_plugin_base_create_pool (plugin, caps, size, 0, 0,
|
pool =
|
||||||
|
gst_vaapi_plugin_base_create_pool (plugin, caps, size,
|
||||||
|
BUFFER_POOL_SINK_MIN_BUFFERS, 0,
|
||||||
GST_VAAPI_VIDEO_BUFFER_POOL_OPTION_VIDEO_META, plugin->sinkpad_allocator);
|
GST_VAAPI_VIDEO_BUFFER_POOL_OPTION_VIDEO_META, plugin->sinkpad_allocator);
|
||||||
if (!pool)
|
if (!pool)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -789,7 +793,7 @@ gst_vaapi_plugin_base_propose_allocation (GstVaapiPluginBase * plugin,
|
||||||
if (!ensure_sinkpad_buffer_pool (plugin, caps))
|
if (!ensure_sinkpad_buffer_pool (plugin, caps))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
gst_query_add_allocation_pool (query, plugin->sinkpad_buffer_pool,
|
gst_query_add_allocation_pool (query, plugin->sinkpad_buffer_pool,
|
||||||
plugin->sinkpad_buffer_size, 0, 0);
|
plugin->sinkpad_buffer_size, BUFFER_POOL_SINK_MIN_BUFFERS, 0);
|
||||||
gst_query_add_allocation_param (query, plugin->sinkpad_allocator, NULL);
|
gst_query_add_allocation_param (query, plugin->sinkpad_allocator, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue