qtdemux: increase some logging on streams and sample parsing
authorMatthew Waters <matthew@centricular.com>
Thu, 25 Jun 2020 06:37:56 +0000 (16:37 +1000)
committerMatthew Waters <matthew@centricular.com>
Mon, 21 Sep 2020 02:08:14 +0000 (12:08 +1000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/643>

gst/isomp4/qtdemux.c

index 8fd74b8..3e06079 100644 (file)
@@ -3544,7 +3544,7 @@ invalid_track:
   }
 unknown_stream:
   {
-    GST_DEBUG_OBJECT (qtdemux, "unknown stream in tfhd");
+    GST_DEBUG_OBJECT (qtdemux, "unknown stream (%u) in tfhd", track_id);
     return TRUE;
   }
 }
@@ -5180,6 +5180,9 @@ gst_qtdemux_advance_sample (GstQTDemux * qtdemux, QtDemuxStream * stream)
   stream->sample_index++;
   stream->offset_in_sample = 0;
 
+  GST_TRACE_OBJECT (qtdemux, "advance to sample %u/%u", stream->sample_index,
+      stream->n_samples);
+
   /* reached the last sample, we need the next segment */
   if (G_UNLIKELY (stream->sample_index >= stream->n_samples))
     goto next_segment;
@@ -5193,6 +5196,10 @@ gst_qtdemux_advance_sample (GstQTDemux * qtdemux, QtDemuxStream * stream)
   /* get next sample */
   sample = &stream->samples[stream->sample_index];
 
+  GST_TRACE_OBJECT (qtdemux, "sample dts %" GST_TIME_FORMAT " media_stop: %"
+      GST_TIME_FORMAT, GST_TIME_ARGS (QTSAMPLE_DTS (stream, sample)),
+      GST_TIME_ARGS (segment->media_stop));
+
   /* see if we are past the segment */
   if (G_UNLIKELY (QTSAMPLE_DTS (stream, sample) >= segment->media_stop))
     goto next_segment;
@@ -12964,7 +12971,7 @@ qtdemux_prepare_streams (GstQTDemux * qtdemux)
   GstFlowReturn ret = GST_FLOW_OK;
   gint i;
 
-  GST_DEBUG_OBJECT (qtdemux, "prepare streams");
+  GST_DEBUG_OBJECT (qtdemux, "prepare %u streams", QTDEMUX_N_STREAMS (qtdemux));
 
   for (i = 0; i < QTDEMUX_N_STREAMS (qtdemux); i++) {
     QtDemuxStream *stream = QTDEMUX_NTH_STREAM (qtdemux, i);