mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 04:22:27 +00:00
rtpstorage: Add more debug messages
This commit is contained in:
parent
785219a317
commit
7a317ff732
3 changed files with 30 additions and 2 deletions
|
@ -102,6 +102,8 @@ gst_rtp_storage_set_property (GObject * object, guint prop_id,
|
|||
|
||||
switch (prop_id) {
|
||||
case PROP_SIZE_TIME:
|
||||
GST_DEBUG_OBJECT (self, "RTP storage size set to %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (g_value_get_uint64 (value)));
|
||||
rtp_storage_set_size (self->storage, g_value_get_uint64 (value));
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -85,13 +85,17 @@ rtp_storage_get_packets_for_recovery (RtpStorage * self, gint fec_pt,
|
|||
STORAGE_UNLOCK (self);
|
||||
|
||||
if (NULL == stream) {
|
||||
GST_ERROR_OBJECT (self, "Cant find ssrc = 0x%x", ssrc);
|
||||
GST_ERROR_OBJECT (self, "Cant find ssrc = 0x08%x", ssrc);
|
||||
} else {
|
||||
STREAM_LOCK (stream);
|
||||
if (stream->queue.length > 0) {
|
||||
GST_LOG_OBJECT (self, "Looking for recovery packets for fec_pt=%u around"
|
||||
" lost_seq=%u for ssrc=%08x", fec_pt, lost_seq, ssrc);
|
||||
ret =
|
||||
rtp_storage_stream_get_packets_for_recovery (stream, fec_pt,
|
||||
lost_seq);
|
||||
} else {
|
||||
GST_DEBUG_OBJECT (self, "Empty RTP storage for ssrc=%08x", ssrc);
|
||||
}
|
||||
STREAM_UNLOCK (stream);
|
||||
}
|
||||
|
@ -116,6 +120,8 @@ rtp_storage_get_redundant_packet (RtpStorage * self, guint32 ssrc,
|
|||
STREAM_LOCK (stream);
|
||||
if (stream->queue.length > 0) {
|
||||
ret = rtp_storage_stream_get_redundant_packet (stream, lost_seq);
|
||||
} else {
|
||||
GST_DEBUG_OBJECT (self, "Empty RTP storage for ssrc=%08x", ssrc);
|
||||
}
|
||||
STREAM_UNLOCK (stream);
|
||||
}
|
||||
|
@ -135,6 +141,10 @@ rtp_storage_do_put_recovered_packet (RtpStorage * self,
|
|||
|
||||
g_assert (stream);
|
||||
|
||||
GST_LOG_OBJECT (self,
|
||||
"Storing recovered RTP packet with ssrc=%08x pt=%u seq=%u %"
|
||||
GST_PTR_FORMAT, ssrc, pt, seq, buffer);
|
||||
|
||||
STREAM_LOCK (stream);
|
||||
rtp_storage_stream_add_item (stream, buffer, pt, seq);
|
||||
STREAM_UNLOCK (stream);
|
||||
|
@ -186,6 +196,10 @@ rtp_storage_append_buffer (RtpStorage * self, GstBuffer * buf)
|
|||
|
||||
STORAGE_UNLOCK (self);
|
||||
|
||||
GST_LOG_OBJECT (self,
|
||||
"Storing RTP packet with ssrc=%08x pt=%u seq=%u %" GST_PTR_FORMAT,
|
||||
ssrc, pt, seq, buf);
|
||||
|
||||
STREAM_LOCK (stream);
|
||||
|
||||
/* Saving the buffer, now the storage owns it */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue