gst/gstbin.c: Make it clear with a FIXME and a real define what the #if 0 previously disabled.

Original commit message from CVS:
* gst/gstbin.c: (bin_query_duration_done), (gst_bin_query):
Make it clear with a FIXME and a real define what the #if 0
previously disabled.
This commit is contained in:
Wim Taymans 2006-06-14 10:34:14 +00:00
parent b9000a7878
commit 44547817c6
2 changed files with 14 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2006-06-14 Wim Taymans <wim@fluendo.com>
* gst/gstbin.c: (bin_query_duration_done), (gst_bin_query):
Make it clear with a FIXME and a real define what the #if 0
previously disabled.
2006-06-14 Wim Taymans <wim@fluendo.com> 2006-06-14 Wim Taymans <wim@fluendo.com>
* libs/gst/base/gstbasesink.c: (gst_base_sink_configure_segment), * libs/gst/base/gstbasesink.c: (gst_base_sink_configure_segment),

View file

@ -164,6 +164,11 @@
#include "gstutils.h" #include "gstutils.h"
#include "gstchildproxy.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.
* #define DURATION_CACHING */
GST_DEBUG_CATEGORY_STATIC (bin_debug); GST_DEBUG_CATEGORY_STATIC (bin_debug);
#define GST_CAT_DEFAULT bin_debug #define GST_CAT_DEFAULT bin_debug
@ -2254,7 +2259,7 @@ bin_query_duration_done (GstBin * bin, QueryFold * fold)
GST_DEBUG_OBJECT (bin, "max duration %" G_GINT64_FORMAT, fold->max); GST_DEBUG_OBJECT (bin, "max duration %" G_GINT64_FORMAT, fold->max);
#if 0 #ifdef DURATION_CACHING
/* and cache now */ /* and cache now */
GST_OBJECT_LOCK (bin); GST_OBJECT_LOCK (bin);
bin->messages = g_list_prepend (bin->messages, bin->messages = g_list_prepend (bin->messages,
@ -2326,7 +2331,7 @@ gst_bin_query (GstElement * element, GstQuery * query)
switch (GST_QUERY_TYPE (query)) { switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_DURATION: case GST_QUERY_DURATION:
{ {
#if 0 #ifdef DURATION_CACHING
GList *cached; GList *cached;
GstFormat qformat; GstFormat qformat;
@ -2358,6 +2363,7 @@ gst_bin_query (GstElement * element, GstQuery * query)
} }
GST_OBJECT_UNLOCK (bin); GST_OBJECT_UNLOCK (bin);
#endif #endif
/* no cached value found, iterate and collect durations */
fold_func = (GstIteratorFoldFunction) bin_query_duration_fold; fold_func = (GstIteratorFoldFunction) bin_query_duration_fold;
fold_init = bin_query_max_init; fold_init = bin_query_max_init;
fold_done = bin_query_duration_done; fold_done = bin_query_duration_done;