summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2007-04-29 14:46:27 +0000
committerWim Taymans <wim.taymans@gmail.com>2007-04-29 14:46:27 +0000
commitf4508d302c4edb5f51374815c360b4bcc6b9f43d (patch)
treef2dcae1dcbc249f2636978a70c77af338380c547
parentfe2b1129ba42738cc38812afa70e7fdbee832331 (diff)
downloadgst-plugins-bad-f4508d302c4edb5f51374815c360b4bcc6b9f43d.tar.gz
gst-plugins-bad-f4508d302c4edb5f51374815c360b4bcc6b9f43d.tar.bz2
gst-plugins-bad-f4508d302c4edb5f51374815c360b4bcc6b9f43d.zip
gst/rtpmanager/gstrtpsession.c: Remove debug.
Original commit message from CVS: * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_send_rtcp): Remove debug. * gst/rtpmanager/rtpsession.c: (rtp_session_process_sr), (rtp_session_process_sdes), (calculate_rtcp_interval), (rtp_session_next_timeout), (session_report_blocks): * gst/rtpmanager/rtpstats.c: (rtp_stats_calculate_rtcp_interval): Improve debugging Fix interval for BYE/RTCP packets.
-rw-r--r--ChangeLog12
-rw-r--r--gst/rtpmanager/gstrtpsession.c2
-rw-r--r--gst/rtpmanager/rtpsession.c22
-rw-r--r--gst/rtpmanager/rtpstats.c1
4 files changed, 26 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 0bc7ba43..4ebf8d7b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2007-04-29 Wim Taymans <wim@fluendo.com>
+
+ * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_send_rtcp):
+ Remove debug.
+
+ * gst/rtpmanager/rtpsession.c: (rtp_session_process_sr),
+ (rtp_session_process_sdes), (calculate_rtcp_interval),
+ (rtp_session_next_timeout), (session_report_blocks):
+ * gst/rtpmanager/rtpstats.c: (rtp_stats_calculate_rtcp_interval):
+ Improve debugging
+ Fix interval for BYE/RTCP packets.
+
2007-04-29 Thomas Vander Stichele <thomas at apestaart dot org>
* docs/plugins/gst-plugins-bad-plugins.args:
diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c
index 9545a92d..12a46fe6 100644
--- a/gst/rtpmanager/gstrtpsession.c
+++ b/gst/rtpmanager/gstrtpsession.c
@@ -497,8 +497,6 @@ gst_rtp_session_send_rtcp (RTPSession * sess, RTPSource * src,
GST_DEBUG_OBJECT (rtpsession, "sending RTCP");
- gst_util_dump_mem (GST_BUFFER_DATA (buffer), GST_BUFFER_SIZE (buffer));
-
if (rtpsession->send_rtcp_src) {
result = gst_pad_push (rtpsession->send_rtcp_src, buffer);
} else {
diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c
index 7244f5fb..af418abf 100644
--- a/gst/rtpmanager/rtpsession.c
+++ b/gst/rtpmanager/rtpsession.c
@@ -1051,7 +1051,8 @@ rtp_session_process_sr (RTPSession * sess, GstRTCPPacket * packet,
gst_rtcp_packet_sr_get_sender_info (packet, &senderssrc, &ntptime, &rtptime,
&packet_count, &octet_count);
- GST_DEBUG ("got SR packet: SSRC %08x", senderssrc);
+ GST_DEBUG ("got SR packet: SSRC %08x, time %" GST_TIME_FORMAT,
+ senderssrc, GST_TIME_ARGS (arrival->time));
source = obtain_source (sess, senderssrc, &created, arrival, FALSE);
@@ -1158,7 +1159,8 @@ rtp_session_process_sdes (RTPSession * sess, GstRTCPPacket * packet,
gst_rtcp_packet_sdes_get_entry (packet, &type, &len, &data);
- GST_DEBUG ("entry %d, type %d, len %d, data %s", j, type, len, data);
+ GST_DEBUG ("entry %d, type %d, len %d, data %.*s", j, type, len, len,
+ data);
more_entries = gst_rtcp_packet_sdes_next_entry (packet);
j++;
@@ -1395,14 +1397,14 @@ calculate_rtcp_interval (RTPSession * sess, gboolean deterministic,
GstClockTime result;
if (sess->source->received_bye) {
+ result = rtp_stats_calculate_bye_interval (&sess->stats);
+ } else {
result = rtp_stats_calculate_rtcp_interval (&sess->stats,
RTP_SOURCE_IS_SENDER (sess->source), first);
- } else {
- result = rtp_stats_calculate_bye_interval (&sess->stats);
}
- GST_DEBUG ("next deterministic interval: %" GST_TIME_FORMAT,
- GST_TIME_ARGS (result));
+ GST_DEBUG ("next deterministic interval: %" GST_TIME_FORMAT ", first %d",
+ GST_TIME_ARGS (result), first);
if (!deterministic)
result = rtp_stats_add_rtcp_jitter (&sess->stats, result);
@@ -1495,7 +1497,7 @@ rtp_session_next_timeout (RTPSession * sess, GstClockTime time)
result = GST_CLOCK_TIME_NONE;
else if (sess->stats.active_sources >= 50)
/* reconsider BYE if members >= 50 */
- result = time + calculate_rtcp_interval (sess, FALSE, TRUE);;
+ result = time + calculate_rtcp_interval (sess, FALSE, TRUE);
} else {
if (sess->first_rtcp)
/* we are called for the first time */
@@ -1597,10 +1599,14 @@ session_report_blocks (const gchar * key, RTPSource * source, ReportData * data)
extended_max, stats->jitter >> 4);
if (rtp_source_get_last_sr (source, &ntptime, NULL, NULL, NULL, &time)) {
+ GstClockTime diff;
+
/* LSR is middle bits of the last ntptime */
LSR = (ntptime >> 16) & 0xffffffff;
+ diff = data->time - time;
+ GST_DEBUG ("last SR time diff %" GST_TIME_FORMAT, GST_TIME_ARGS (diff));
/* DLSR, delay since last SR is expressed in 1/65536 second units */
- DLSR = gst_util_uint64_scale_int (data->time - time, 65536, GST_SECOND);
+ DLSR = gst_util_uint64_scale_int (diff, 65536, GST_SECOND);
} else {
/* No valid SR received, LSR/DLSR are set to 0 then */
LSR = 0;
diff --git a/gst/rtpmanager/rtpstats.c b/gst/rtpmanager/rtpstats.c
index 1e18f45e..55cf2e05 100644
--- a/gst/rtpmanager/rtpstats.c
+++ b/gst/rtpmanager/rtpstats.c
@@ -56,7 +56,6 @@ rtp_stats_calculate_rtcp_interval (RTPSessionStats * stats, gboolean we_send,
gdouble interval;
gdouble rtcp_min_time;
-
/* Very first call at application start-up uses half the min
* delay for quicker notification while still allowing some time
* before reporting for randomization and to learn about other