From 8c2ef0f02549aabbeeb97cb06409acdfcf88e6ba Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Mon, 14 Mar 2022 12:29:04 +0530 Subject: [PATCH] twcc: Add some logging to debug TWCC feedback This should allow people to debug when TWCC feedback is not enabled because they haven't set the extmap in the caps. Part-of: --- subprojects/gst-plugins-good/gst/rtpmanager/rtpsession.c | 2 ++ subprojects/gst-plugins-good/gst/rtpmanager/rtptwcc.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-good/gst/rtpmanager/rtpsession.c b/subprojects/gst-plugins-good/gst/rtpmanager/rtpsession.c index 04a73b9d42..80b788a3fc 100644 --- a/subprojects/gst-plugins-good/gst/rtpmanager/rtpsession.c +++ b/subprojects/gst-plugins-good/gst/rtpmanager/rtpsession.c @@ -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); diff --git a/subprojects/gst-plugins-good/gst/rtpmanager/rtptwcc.c b/subprojects/gst-plugins-good/gst/rtpmanager/rtptwcc.c index 368836cc6b..edbbfc2810 100644 --- a/subprojects/gst-plugins-good/gst/rtpmanager/rtptwcc.c +++ b/subprojects/gst-plugins-good/gst/rtpmanager/rtptwcc.c @@ -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);