gboolean has_video_meta;
gboolean can_share_own_pool, pushing_from_our_pool = FALSE;
struct v4l2_control ctl = { 0, };
+ GstAllocator *allocator = NULL;
+ GstAllocationParams params = { 0 };
GST_DEBUG_OBJECT (obj->element, "decide allocation");
goto pool_failed;
}
+ if (gst_query_get_n_allocation_params (query) > 0)
+ gst_query_parse_nth_allocation_param (query, 0, &allocator, ¶ms);
+
if (gst_query_get_n_allocation_pools (query) > 0) {
gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max);
update = TRUE;
GST_BUFFER_POOL_OPTION_VIDEO_META);
}
+ gst_buffer_pool_config_set_allocator (config, allocator, ¶ms);
gst_buffer_pool_config_set_params (config, caps, size, own_min, 0);
GST_DEBUG_OBJECT (obj->element, "setting own pool config to %"
goto done;
config = gst_buffer_pool_get_config (pool);
+ gst_buffer_pool_config_set_allocator (config, allocator, ¶ms);
gst_buffer_pool_config_set_params (config, caps, size, min, max);
GST_DEBUG_OBJECT (obj->element, "setting other pool config to %"
else
gst_query_add_allocation_pool (query, pool, size, min, max);
+ if (allocator)
+ gst_object_unref (allocator);
+
if (pool)
gst_object_unref (pool);
}
cleanup:
{
+ if (allocator)
+ gst_object_unref (allocator);
+
if (pool)
gst_object_unref (pool);
return FALSE;