From db647ee55bd95e421148ec1ae25c8f93eaa221e8 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Wed, 20 Mar 2019 15:45:35 -0400 Subject: [PATCH] rtprtxsend: Improve looging of not found RTX packet When an RTX packet is not found, display a message that say if the packet have not arrived yet or if it was already removed from the RTX packet queue. --- gst/rtpmanager/gstrtprtxsend.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gst/rtpmanager/gstrtprtxsend.c b/gst/rtpmanager/gstrtprtxsend.c index 58892f3..8c08f32 100644 --- a/gst/rtpmanager/gstrtprtxsend.c +++ b/gst/rtpmanager/gstrtprtxsend.c @@ -494,6 +494,26 @@ gst_rtp_rtx_send_src_event (GstPad * pad, GstObject * parent, GstEvent * event) GST_LOG_OBJECT (rtx, "found %u", item->seqnum); rtx_buf = gst_rtp_rtx_buffer_new (rtx, item->buffer); } +#ifndef GST_DISABLE_DEBUG + else { + BufferQueueItem *item = NULL; + + iter = g_sequence_get_begin_iter (data->queue); + if (!g_sequence_iter_is_end (iter)) + item = g_sequence_get (iter); + + if (item && seqnum < item->seqnum) { + GST_DEBUG_OBJECT (rtx, "requested seqnum %u has already been " + "removed from the rtx queue; the first available is %u", + seqnum, item->seqnum); + } else { + GST_WARNING_OBJECT (rtx, "requested seqnum %u has not been " + "transmitted yet in the original stream; either the remote end " + "is not configured correctly, or the source is too slow", + seqnum); + } + } +#endif } GST_OBJECT_UNLOCK (rtx); -- 2.7.4