diff --git a/docs/random/porting-to-0.11.txt b/docs/random/porting-to-0.11.txt index 9d601d29b4..b99363e0d0 100644 --- a/docs/random/porting-to-0.11.txt +++ b/docs/random/porting-to-0.11.txt @@ -50,6 +50,9 @@ The 0.11 porting guide gst_element_class_add_pad_template() takes ownership of the template + Elements that change the duration must post DURATION messages on the + bus when the duration changes in PAUSED or PLAYING. + * GstPad: gst_pad_get_caps() does not return writable caps anymore and an explicit gst_caps_make_writable() needs to be performed. This was the functionality diff --git a/gst/gstbin.c b/gst/gstbin.c index 36bf4f9b4c..3007d48ec7 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -170,11 +170,6 @@ #include "gstutils.h" #include "gstchildproxy.h" -/* enable for DURATION caching. - * FIXME currently too many elements don't update - * their duration when it changes so we return inaccurate values. */ -#undef DURATION_CACHING - /* latency is by default enabled now. * live-preroll and no-live-preroll in the environment var GST_COMPAT * to enables or disable it respectively. @@ -3412,13 +3407,11 @@ bin_query_duration_done (GstBin * bin, QueryFold * fold) GST_DEBUG_OBJECT (bin, "max duration %" G_GINT64_FORMAT, fold->max); -#ifdef DURATION_CACHING /* and cache now */ GST_OBJECT_LOCK (bin); bin->messages = g_list_prepend (bin->messages, gst_message_new_duration (GST_OBJECT_CAST (bin), format, fold->max)); GST_OBJECT_UNLOCK (bin); -#endif } static gboolean @@ -3531,7 +3524,6 @@ gst_bin_query (GstElement * element, GstQuery * query) switch (GST_QUERY_TYPE (query)) { case GST_QUERY_DURATION: { -#ifdef DURATION_CACHING GList *cached; GstFormat qformat; @@ -3562,7 +3554,6 @@ gst_bin_query (GstElement * element, GstQuery * query) } } GST_OBJECT_UNLOCK (bin); -#endif /* no cached value found, iterate and collect durations */ fold_func = (GstIteratorFoldFunction) bin_query_duration_fold; fold_init = bin_query_min_max_init; @@ -3628,9 +3619,7 @@ gst_bin_query (GstElement * element, GstQuery * query) done: gst_iterator_free (iter); -#ifdef DURATION_CACHING exit: -#endif GST_DEBUG_OBJECT (bin, "query %p result %d", query, res); return res;