[asterisk-commits] oej: trunk r61677 - in /trunk: ./ main/rtp.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Apr 18 13:48:14 MST 2007
Author: oej
Date: Wed Apr 18 15:48:13 2007
New Revision: 61677
URL: http://svn.digium.com/view/asterisk?view=rev&rev=61677
Log:
Merged revisions 61676 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r61676 | oej | 2007-04-18 22:46:23 +0200 (Wed, 18 Apr 2007) | 2 lines
Clean upp formatting, add some doxygen stuff while we're in cleaning mode... Thanks Kevin!
........
Modified:
trunk/ (props changed)
trunk/main/rtp.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/main/rtp.c
URL: http://svn.digium.com/view/asterisk/trunk/main/rtp.c?view=diff&rev=61677&r1=61676&r2=61677
==============================================================================
--- trunk/main/rtp.c (original)
+++ trunk/main/rtp.c Wed Apr 18 15:48:13 2007
@@ -145,8 +145,8 @@
unsigned int dtmfsamples;
/* DTMF Transmission Variables */
unsigned int lastdigitts;
- char sending_digit; /* boolean - are we sending digits */
- char send_digit; /* digit we are sending */
+ char sending_digit; /*!< boolean - are we sending digits */
+ char send_digit; /*!< digit we are sending */
int send_payload;
int send_duration;
int nat;
@@ -995,27 +995,27 @@
lsr = (double)((ntohl(rtcpheader[i + 4]) & 0xffff0000) >> 16) + (double)((double)(ntohl(rtcpheader[i + 4]) & 0xffff) / 1000000.);
dlsr = (double)(ntohl(rtcpheader[i + 5])/65536.);
rtt = a - dlsr - lsr;
- if (rtt>=0) {
- rtp->rtcp->accumulated_transit += rtt;
- rtp->rtcp->rtt = rtt;
- if (rtp->rtcp->maxrtt<rtt)
- rtp->rtcp->maxrtt = rtt;
- if (rtp->rtcp->minrtt>rtt)
- rtp->rtcp->minrtt = rtt;
- }
+ if (rtt >= 0) {
+ rtp->rtcp->accumulated_transit += rtt;
+ rtp->rtcp->rtt = rtt;
+ if (rtp->rtcp->maxrtt < rtt)
+ rtp->rtcp->maxrtt = rtt;
+ if (rtp->rtcp->minrtt > rtt)
+ rtp->rtcp->minrtt = rtt;
+ }
}
rtp->rtcp->reported_jitter = ntohl(rtcpheader[i + 3]);
rtp->rtcp->reported_lost = ntohl(rtcpheader[i + 1]) & 0xffffff;
if (rtcp_debug_test_addr(&sin)) {
- ast_verbose("Fraction lost: %ld\n", (((long) ntohl(rtcpheader[i + 1]) & 0xff000000) >> 24));
- ast_verbose("Packets lost so far: %d\n", rtp->rtcp->reported_lost);
- ast_verbose("Highest sequence number: %ld\n", (long) (ntohl(rtcpheader[i + 2]) & 0xffff));
- ast_verbose("Sequence number cycles: %ld\n", (long) (ntohl(rtcpheader[i + 2]) & 0xffff) >> 16);
- ast_verbose("Interarrival jitter: %u\n", rtp->rtcp->reported_jitter);
- ast_verbose("Last SR(our NTP): %lu.%010lu\n",(unsigned long) ntohl(rtcpheader[i + 4]) >> 16,((unsigned long) ntohl(rtcpheader[i + 4]) << 16) * 4096);
- ast_verbose("DLSR: %4.4f (sec)\n",ntohl(rtcpheader[i + 5])/65536.0);
+ ast_verbose(" Fraction lost: %ld\n", (((long) ntohl(rtcpheader[i + 1]) & 0xff000000) >> 24));
+ ast_verbose(" Packets lost so far: %d\n", rtp->rtcp->reported_lost);
+ ast_verbose(" Highest sequence number: %ld\n", (long) (ntohl(rtcpheader[i + 2]) & 0xffff));
+ ast_verbose(" Sequence number cycles: %ld\n", (long) (ntohl(rtcpheader[i + 2]) & 0xffff) >> 16);
+ ast_verbose(" Interarrival jitter: %u\n", rtp->rtcp->reported_jitter);
+ ast_verbose(" Last SR(our NTP): %lu.%010lu\n",(unsigned long) ntohl(rtcpheader[i + 4]) >> 16,((unsigned long) ntohl(rtcpheader[i + 4]) << 16) * 4096);
+ ast_verbose(" DLSR: %4.4f (sec)\n",ntohl(rtcpheader[i + 5])/65536.0);
if (rtt)
- ast_verbose("RTT: %f(sec)\n", rtt);
+ ast_verbose(" RTT: %f(sec)\n", rtt);
}
break;
case RTCP_PT_FUR:
More information about the asterisk-commits
mailing list