mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
update for bufferpool changes
This commit is contained in:
parent
f3a770a20c
commit
ced47580b7
10 changed files with 23 additions and 22 deletions
|
@ -286,7 +286,7 @@ gst_dvdec_negotiate_pool (GstDVDec * dec, GstCaps * caps, GstVideoInfo * info)
|
|||
dec->pool = pool;
|
||||
|
||||
config = gst_buffer_pool_get_config (pool);
|
||||
gst_buffer_pool_config_set (config, caps, size, min, max, 0, 0, 0);
|
||||
gst_buffer_pool_config_set_params (config, caps, size, min, max);
|
||||
|
||||
if (gst_query_has_allocation_meta (query, GST_VIDEO_META_API_TYPE)) {
|
||||
/* just set the option, if the pool can support it we will transparently use
|
||||
|
|
|
@ -255,7 +255,7 @@ gst_gdk_pixbuf_setup_pool (GstGdkPixbuf * filter, GstVideoInfo * info)
|
|||
|
||||
/* and configure */
|
||||
config = gst_buffer_pool_get_config (pool);
|
||||
gst_buffer_pool_config_set (config, target, size, min, max, 0, 0, 0);
|
||||
gst_buffer_pool_config_set_params (config, target, size, min, max);
|
||||
gst_buffer_pool_set_config (pool, config);
|
||||
|
||||
if (filter->pool) {
|
||||
|
|
|
@ -1166,6 +1166,7 @@ gst_jpeg_dec_buffer_pool (GstJpegDec * dec, GstCaps * caps)
|
|||
GstBufferPool *pool;
|
||||
guint size, min, max;
|
||||
GstStructure *config;
|
||||
static GstAllocationParams params = { 0, 0, 0, 15, };
|
||||
|
||||
GST_DEBUG_OBJECT (dec, "setting up bufferpool");
|
||||
|
||||
|
@ -1193,7 +1194,8 @@ gst_jpeg_dec_buffer_pool (GstJpegDec * dec, GstCaps * caps)
|
|||
}
|
||||
|
||||
config = gst_buffer_pool_get_config (pool);
|
||||
gst_buffer_pool_config_set (config, caps, size, min, max, 0, 0, 15);
|
||||
gst_buffer_pool_config_set_params (config, caps, size, min, max);
|
||||
gst_buffer_pool_config_set_allocator (config, NULL, ¶ms);
|
||||
/* and store */
|
||||
gst_buffer_pool_set_config (pool, config);
|
||||
|
||||
|
|
|
@ -372,7 +372,7 @@ gst_pngdec_negotiate_pool (GstPngDec * dec, GstCaps * caps, GstVideoInfo * info)
|
|||
dec->pool = pool;
|
||||
|
||||
config = gst_buffer_pool_get_config (pool);
|
||||
gst_buffer_pool_config_set (config, caps, size, min, max, 0, 0, 0);
|
||||
gst_buffer_pool_config_set_params (config, caps, size, min, max);
|
||||
|
||||
if (gst_query_has_allocation_meta (query, GST_VIDEO_META_API_TYPE)) {
|
||||
/* just set the option, if the pool can support it we will transparently use
|
||||
|
|
|
@ -309,7 +309,7 @@ gst_goom_src_negotiate (GstGoom * goom)
|
|||
}
|
||||
|
||||
config = gst_buffer_pool_get_config (pool);
|
||||
gst_buffer_pool_config_set (config, target, size, min, max, 0, 0, 0);
|
||||
gst_buffer_pool_config_set_params (config, target, size, min, max);
|
||||
gst_buffer_pool_set_config (pool, config);
|
||||
|
||||
if (goom->pool) {
|
||||
|
|
|
@ -305,7 +305,7 @@ gst_goom_src_negotiate (GstGoom * goom)
|
|||
}
|
||||
|
||||
config = gst_buffer_pool_get_config (pool);
|
||||
gst_buffer_pool_config_set (config, target, size, min, max, 0, 0, 0);
|
||||
gst_buffer_pool_config_set_params (config, target, size, min, max);
|
||||
gst_buffer_pool_set_config (pool, config);
|
||||
|
||||
if (goom->pool) {
|
||||
|
|
|
@ -148,7 +148,7 @@ gst_rtp_vraw_depay_negotiate_pool (GstRtpVRawDepay * depay, GstCaps * caps,
|
|||
depay->pool = pool;
|
||||
|
||||
config = gst_buffer_pool_get_config (pool);
|
||||
gst_buffer_pool_config_set (config, caps, size, min, max, 0, 0, 0);
|
||||
gst_buffer_pool_config_set_params (config, caps, size, min, max);
|
||||
if (gst_query_has_allocation_meta (query, GST_VIDEO_META_API_TYPE)) {
|
||||
/* just set the metadata, if the pool can support it we will transparently use
|
||||
* it through the video info API. We could also see if the pool support this
|
||||
|
|
|
@ -244,7 +244,8 @@ gst_v4l2_buffer_pool_set_config (GstBufferPool * bpool, GstStructure * config)
|
|||
GstV4l2Object *obj = pool->obj;
|
||||
const GstCaps *caps;
|
||||
guint size, min_buffers, max_buffers;
|
||||
guint prefix, padding, align;
|
||||
GstAllocator *allocator;
|
||||
GstAllocationParams params;
|
||||
|
||||
GST_DEBUG_OBJECT (pool, "set config");
|
||||
|
||||
|
@ -266,8 +267,11 @@ gst_v4l2_buffer_pool_set_config (GstBufferPool * bpool, GstStructure * config)
|
|||
}
|
||||
|
||||
/* parse the config and keep around */
|
||||
if (!gst_buffer_pool_config_get (config, &caps, &size, &min_buffers,
|
||||
&max_buffers, &prefix, &padding, &align))
|
||||
if (!gst_buffer_pool_config_get_params (config, &caps, &size, &min_buffers,
|
||||
&max_buffers))
|
||||
goto wrong_config;
|
||||
|
||||
if (!gst_buffer_pool_config_get_allocator (config, &allocator, ¶ms))
|
||||
goto wrong_config;
|
||||
|
||||
GST_DEBUG_OBJECT (pool, "config %" GST_PTR_FORMAT, config);
|
||||
|
@ -275,13 +279,10 @@ gst_v4l2_buffer_pool_set_config (GstBufferPool * bpool, GstStructure * config)
|
|||
pool->size = size;
|
||||
pool->max_buffers = MAX (min_buffers, max_buffers);
|
||||
pool->min_buffers = MIN (pool->max_buffers, min_buffers);
|
||||
gst_allocation_params_init (&pool->params);
|
||||
pool->params.prefix = prefix;
|
||||
pool->params.padding = padding;
|
||||
pool->params.align = align;
|
||||
pool->params = params;
|
||||
|
||||
gst_buffer_pool_config_set (config, caps, size, min_buffers,
|
||||
max_buffers, prefix, padding, align);
|
||||
gst_buffer_pool_config_set_params (config, caps, size, min_buffers,
|
||||
max_buffers);
|
||||
|
||||
return GST_BUFFER_POOL_CLASS (parent_class)->set_config (bpool, config);
|
||||
|
||||
|
@ -890,7 +891,7 @@ gst_v4l2_buffer_pool_new (GstV4l2Object * obj, GstCaps * caps)
|
|||
pool->obj = obj;
|
||||
|
||||
s = gst_buffer_pool_get_config (GST_BUFFER_POOL_CAST (pool));
|
||||
gst_buffer_pool_config_set (s, caps, obj->sizeimage, 2, 0, 0, 0, 0);
|
||||
gst_buffer_pool_config_set_params (s, caps, obj->sizeimage, 2, 0);
|
||||
gst_buffer_pool_set_config (GST_BUFFER_POOL_CAST (pool), s);
|
||||
|
||||
return GST_BUFFER_POOL (pool);
|
||||
|
|
|
@ -640,8 +640,7 @@ gst_v4l2sink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
|
|||
|
||||
/* we had a pool, check caps */
|
||||
config = gst_buffer_pool_get_config (pool);
|
||||
gst_buffer_pool_config_get (config, &pcaps, &size, NULL, NULL, NULL, NULL,
|
||||
NULL);
|
||||
gst_buffer_pool_config_get_params (config, &pcaps, &size, NULL, NULL);
|
||||
|
||||
GST_DEBUG_OBJECT (v4l2sink,
|
||||
"we had a pool with caps %" GST_PTR_FORMAT, pcaps);
|
||||
|
|
|
@ -576,9 +576,8 @@ gst_v4l2src_decide_allocation (GstBaseSrc * bsrc, GstQuery * query)
|
|||
const GstCaps *caps;
|
||||
|
||||
config = gst_buffer_pool_get_config (pool);
|
||||
gst_buffer_pool_config_get (config, &caps, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL);
|
||||
gst_buffer_pool_config_set (config, caps, size, min, max, 0, 0, 0);
|
||||
gst_buffer_pool_config_get_params (config, &caps, NULL, NULL, NULL);
|
||||
gst_buffer_pool_config_set_params (config, caps, size, min, max);
|
||||
|
||||
/* if downstream supports video metadata, add this to the pool config */
|
||||
if (gst_query_has_allocation_meta (query, GST_VIDEO_META_API_TYPE))
|
||||
|
|
Loading…
Reference in a new issue