[Sumover-dev] [svn commit] r4239 - vic/branches/cc/rtp
sumover-dev at cs.ucl.ac.uk
sumover-dev at cs.ucl.ac.uk
Wed Aug 6 11:46:55 BST 2008
Author: soohyunc
Date: Wed Aug 6 11:46:54 2008
New Revision: 4239
Modified:
vic/branches/cc/rtp/session.cpp
vic/branches/cc/rtp/transmitter.h
Log:
(continue XR report)
added a mechanisms if CC is turned on or not
Modified: vic/branches/cc/rtp/session.cpp
==============================================================================
--- vic/branches/cc/rtp/session.cpp (original)
+++ vic/branches/cc/rtp/session.cpp Wed Aug 6 11:46:54 2008
@@ -663,12 +663,19 @@
sr->sr_np = htonl(sl.np());
sr->sr_nb = htonl(sl.nb());
rr = (rtcp_rr*)(sr + 1);
- xr = (rtcp_xr*)(rr + 1); // extended report
+ //xr = (rtcp_xr*)(rr + 1); // extended report
} else {
flags |= RTCP_PT_RR;
rr = (rtcp_rr*)(rh + 1);
- xr = (rtcp_xr*)(rr + 1); // extended report
+ //xr = (rtcp_xr*)(rr + 1); // extended report
}
+
+ // if CC is turned on, we need XR report
+ if (is_cc_on()) {
+ flags |= RTCP_PT_XR;
+ xr = (rtcp_xr*)(rh + 1); // extended report
+ }
+
int nrr = 0;
int nsrc = 0;
/*
Modified: vic/branches/cc/rtp/transmitter.h
==============================================================================
--- vic/branches/cc/rtp/transmitter.h (original)
+++ vic/branches/cc/rtp/transmitter.h Wed Aug 6 11:46:54 2008
@@ -83,6 +83,7 @@
inline int mtu() { return (mtu_); }
void flush();
void send(pktbuf*);
+ inline bool is_cc_on() { return is_cc_active_; }
/*
* Buffer allocation hooks.
*/
@@ -118,14 +119,15 @@
int loopback_; /* true to loopback data packets */
static int dumpfd_; /* fd to dump packet stream to */
static u_int16_t seqno_;
+
+ /* Cc related variables */
+ bool is_cc_active_; /* is Cc module activated? */
+
private:
static pktbuf* freehdrs_;
static buffer* freebufs_;
static int nbufs_;
static int nhdrs_;
-
- /* Cc related variables */
- bool is_cc_active_; /* is Cc module activated? */
};
#endif
More information about the Sumover-dev
mailing list