twcc: Add some logging to debug TWCC feedback
authorNirbheek Chauhan <nirbheek@centricular.com>
Mon, 14 Mar 2022 06:59:04 +0000 (12:29 +0530)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 15 Mar 2022 22:32:07 +0000 (22:32 +0000)
This should allow people to debug when TWCC feedback is not enabled
because they haven't set the extmap in the caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1952>

subprojects/gst-plugins-good/gst/rtpmanager/rtpsession.c
subprojects/gst-plugins-good/gst/rtpmanager/rtptwcc.c

index 04a73b9..80b788a 100644 (file)
@@ -4245,6 +4245,8 @@ generate_twcc (const gchar * key, RTPSource * source, ReportData * data)
     return;
   }
 
+  GST_DEBUG ("generating TWCC feedback for source %08x", source->ssrc);
+
   while ((buf = rtp_twcc_manager_get_feedback (sess->twcc, source->ssrc))) {
     ReportOutput *output = g_slice_new (ReportOutput);
     output->source = g_object_ref (source);
index 368836c..edbbfc2 100644 (file)
@@ -336,8 +336,10 @@ rtp_twcc_manager_get_recv_twcc_seqnum (RTPTWCCManager * twcc,
   gint32 val = -1;
   gpointer data;
 
-  if (twcc->recv_ext_id == 0)
+  if (twcc->recv_ext_id == 0) {
+    GST_DEBUG ("Received TWCC packet, but no extension registered; ignoring");
     return val;
+  }
 
   if (_get_twcc_seqnum_data (pinfo, twcc->recv_ext_id, &data)) {
     val = GST_READ_UINT16_BE (data);