[Sumover-dev] [svn commit] r4264 - vic/branches/cc/rtp
sumover-dev at cs.ucl.ac.uk
sumover-dev at cs.ucl.ac.uk
Tue Aug 12 16:20:33 BST 2008
Author: soohyunc
Date: Tue Aug 12 16:20:33 2008
New Revision: 4264
Modified:
vic/branches/cc/rtp/rtp.h
vic/branches/cc/rtp/session.cpp
Log:
o now, RTCP XR packet exchages are working correctly (giving a correct sequence
number and giving a correct timestamps)
o corrected RTCP header length comments
(i.e., it is not the number of bytes, but it is the number of 32-bit words
minus one)
To-do: main TFWC stuffs
Modified: vic/branches/cc/rtp/rtp.h
==============================================================================
--- vic/branches/cc/rtp/rtp.h (original)
+++ vic/branches/cc/rtp/rtp.h Tue Aug 12 16:20:33 2008
@@ -96,7 +96,10 @@
struct rtcphdr {
u_int16_t rh_flags; /* T:2 P:1 CNT:5 PT:8 */
- u_int16_t rh_len; /* length of message (in bytes) */
+ u_int16_t rh_len; /* length of the message is the number of
+ 32-bit words in the extension, excluding the
+ four-octet extension header, therefore zero
+ is a valid length*/
u_int32_t rh_ssrc; /* synchronization src id */
};
@@ -145,7 +148,7 @@
u_int32_t ssrc; /* ssrc of the RTP data pkt being reported upon by this */
u_int16_t begin_seq; /* first seqno that this block report */
u_int16_t end_seq; /* last seqno that this block report plus 1 */
- u_int32_t *chunk; /* extended report chunks */
+ u_int32_t chunk; /* extended report chunks */
};
#define RTCP_PT_SR 200 /* sender report */
Modified: vic/branches/cc/rtp/session.cpp
==============================================================================
--- vic/branches/cc/rtp/session.cpp (original)
+++ vic/branches/cc/rtp/session.cpp Tue Aug 12 16:20:33 2008
@@ -674,11 +674,13 @@
xr->xr_flags = htons(XR_BT_3 << 8);
// get timestamp from TfwcSndr
- xr->chunk = (u_int32_t *) htonl(tfwc_sndr_get_ts());
+ xr->chunk = htonl(tfwc_sndr_get_ts());
debug_msg(" TS: %d\n", tfwc_sndr_get_ts());
}
+ ++xr;
+
// XR report block length
int xrlen = (u_char*)xr - pktbuf_;
xr->xr_len = htons((xrlen >> 2) - 1);
@@ -1159,11 +1161,9 @@
UNUSED(ep);
UNUSED(addr);
- //int xrlen = ntohs(xr->xr_len) << 2;
- u_int16_t flags = ntohs(xr->xr_flags >> 8);
+ u_int16_t flags = xr->xr_flags;
u_int16_t ackofack = ntohs(xr->begin_seq);
u_int16_t seqno = ntohs(xr->end_seq);
- debug_msg("AoA: %d, SEQNO: %d\n", ackofack, seqno);
// we received seqno/ackofack, so do receiver stuffs here
if (seqno != ackofack) {
@@ -1251,7 +1251,7 @@
xr->begin_seq = htons(xr->end_seq);
// get ackvec from TfwcRcvr
- xr->chunk = (u_int32_t *) htonl(tfwc_rcvr_getvec());
+ xr->chunk = htonl(tfwc_rcvr_getvec());
}
// this block is used for giving timiestamp echo
else if (bt == XR_BT_3) {
@@ -1259,9 +1259,11 @@
xr->xr_flags = htons(XR_BT_3 << 8);
// get timestamp echo from TfwcRcvr
- xr->chunk = (u_int32_t *) htonl(tfwc_rcvr_ts_echo());
+ xr->chunk = htonl(tfwc_rcvr_ts_echo());
}
+ ++xr;
+
// XR report block length
int xrlen = (u_char *)xr - pktbuf_;
xr->xr_len = htons((xrlen >> 2) - 1);
More information about the Sumover-dev
mailing list