From a9e688cf32dca0ea929823d2fe6dc1212e949d40 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Mon, 10 May 2010 18:32:15 +0200 Subject: [PATCH] qtdemux: cleanup a comment and add some debug and conditional compilation --- gst/qtdemux/qtdemux.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index 5a1242e0b3..09cdad279b 100644 --- a/gst/qtdemux/qtdemux.c +++ b/gst/qtdemux/qtdemux.c @@ -1318,6 +1318,8 @@ qtdemux_ensure_index (GstQTDemux * qtdemux) { guint i; + GST_DEBUG_OBJECT (qtdemux, "collecting all metadata for all streams"); + /* Build complete index */ for (i = 0; i < qtdemux->n_streams; i++) { QtDemuxStream *stream = qtdemux->streams[i]; @@ -1345,13 +1347,17 @@ gst_qtdemux_handle_src_event (GstPad * pad, GstEvent * event) switch (GST_EVENT_TYPE (event)) { case GST_EVENT_SEEK: { +#ifndef GST_DISABLE_GST_DEBUG GstClockTime ts = gst_util_get_timestamp (); +#endif /* Build complete index for seeking */ if (!qtdemux_ensure_index (qtdemux)) goto index_failed; +#ifndef GST_DISABLE_GST_DEBUG ts = gst_util_get_timestamp () - ts; GST_INFO_OBJECT (qtdemux, "Time taken to parse index %" GST_TIME_FORMAT, GST_TIME_ARGS (ts)); +#endif } if (qtdemux->pullbased) { res = gst_qtdemux_do_seek (qtdemux, pad, event); @@ -4318,11 +4324,14 @@ static gboolean qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, guint32 n) { gint i, j, k; - //gint index = 0; QtDemuxSample *samples, *first, *cur, *last; guint32 n_samples_per_chunk; guint32 n_samples; + GST_LOG_OBJECT (qtdemux, "parsing samples for stream fourcc %" + GST_FOURCC_FORMAT ", pad %s", GST_FOURCC_ARGS (stream->fourcc), + stream->pad ? GST_PAD_NAME (stream->pad) : "(NULL)"); + n_samples = stream->n_samples; if (n >= n_samples)