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
/* 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) {
GstBufferPool *pool;
guint size, min, max;
GstStructure *config;
+ static GstAllocationParams params = { 0, 0, 0, 15, };
GST_DEBUG_OBJECT (dec, "setting up bufferpool");
}
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);
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
}
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) {
}
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) {
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
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");
}
/* 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);
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);
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);
/* 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);
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))