v4l2object: Remove is_active checks

These checks are no longer required with recent change to the bufferpool. This
should allow changing the configuartion, hence the way forward renegotiation
support.

https://bugzilla.gnome.org/show_bug.cgi?id=728268
This commit is contained in:
Nicolas Dufresne 2014-05-24 19:02:59 -04:00
parent 5122410f11
commit e196906b99

View file

@ -3288,16 +3288,8 @@ gst_v4l2_object_decide_allocation (GstV4l2Object * obj, GstQuery * query)
max = MAX (min, max); max = MAX (min, max);
/* First step, configure our own pool */ /* First step, configure our own pool */
config = gst_buffer_pool_get_config (obj->pool); config = gst_buffer_pool_get_config (obj->pool);
/* If already configured/active, skip it */
/* FIXME not entirely correct, See bug 728268 */
if (gst_buffer_pool_is_active (obj->pool)) {
gst_structure_free (config);
goto setup_other_pool;
}
if (obj->need_video_meta || has_video_meta) { if (obj->need_video_meta || has_video_meta) {
GST_DEBUG_OBJECT (obj->element, "activate Video Meta"); GST_DEBUG_OBJECT (obj->element, "activate Video Meta");
gst_buffer_pool_config_add_option (config, gst_buffer_pool_config_add_option (config,
@ -3322,16 +3314,11 @@ gst_v4l2_object_decide_allocation (GstV4l2Object * obj, GstQuery * query)
goto config_failed; goto config_failed;
} }
setup_other_pool:
/* Now configure the other pool if different */ /* Now configure the other pool if different */
if (obj->pool != pool) if (obj->pool != pool)
other_pool = pool; other_pool = pool;
if (other_pool) { if (other_pool) {
if (gst_buffer_pool_is_active (other_pool))
goto done;
config = gst_buffer_pool_get_config (other_pool); config = gst_buffer_pool_get_config (other_pool);
gst_buffer_pool_config_set_allocator (config, allocator, &params); gst_buffer_pool_config_set_allocator (config, allocator, &params);
gst_buffer_pool_config_set_params (config, caps, size, min, max); gst_buffer_pool_config_set_params (config, caps, size, min, max);
@ -3368,7 +3355,6 @@ setup_other_pool:
gst_structure_free (config); gst_structure_free (config);
} }
done:
if (update) if (update)
gst_query_set_nth_allocation_pool (query, 0, pool, size, min, max); gst_query_set_nth_allocation_pool (query, 0, pool, size, min, max);
else else