rtpstorage: Add more debug messages
[platform/upstream/gst-plugins-good.git] / gst / rtp / rtpstoragestream.c
index c4d09bb..2bdec5e 100644 (file)
@@ -76,6 +76,10 @@ rtp_storage_stream_resize (RtpStorageStream * stream, GstClockTime size_time)
 
   for (i = 0; i < too_old_buffers_num; ++i) {
     RtpStorageItem *item = g_queue_pop_tail (&stream->queue);
+
+    GST_TRACE ("Removing %u/%u buffers, pt=%d seq=%d for ssrc=%08x",
+        i, too_old_buffers_num, item->pt, item->seq, stream->ssrc);
+
     rtp_storage_item_free (item);
   }
 }
@@ -198,6 +202,9 @@ rtp_storage_stream_get_packets_for_recovery (RtpStorageStream * stream,
     GstBufferList *ret = gst_buffer_list_new_sized (ret_length);
     GList *it;
 
+    GST_LOG ("Found %u buffers with lost seq=%d for ssrc=%08x, creating %"
+        GST_PTR_FORMAT, ret_length, lost_seq, stream->ssrc, ret);
+
     for (it = start; it != end->prev; it = it->prev)
       gst_buffer_list_add (ret,
           gst_buffer_ref (((RtpStorageItem *) it->data)->buffer));
@@ -214,8 +221,13 @@ rtp_storage_stream_get_redundant_packet (RtpStorageStream * stream,
   GList *it;
   for (it = stream->queue.head; it; it = it->next) {
     RtpStorageItem *item = it->data;
-    if (item->seq == lost_seq)
+    if (item->seq == lost_seq) {
+      GST_LOG ("Found buffer pt=%u seq=%u for ssrc=%08x %" GST_PTR_FORMAT,
+          item->pt, item->seq, stream->ssrc, item->buffer);
       return gst_buffer_ref (item->buffer);
+    }
   }
+  GST_DEBUG ("Could not find packet with seq=%u for ssrc=%08x",
+      lost_seq, stream->ssrc);
   return NULL;
 }