[Sumover-dev] [svn commit] r4249 - vic/branches/cc/rtp

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Thu Aug 7 17:45:03 BST 2008


Author: soohyunc
Date: Thu Aug  7 17:45:02 2008
New Revision: 4249

Modified:
   vic/branches/cc/rtp/session.cpp
   vic/branches/cc/rtp/session.h

Log:
(on-going) parse_xr_records()


Modified: vic/branches/cc/rtp/session.cpp
==============================================================================
--- vic/branches/cc/rtp/session.cpp	(original)
+++ vic/branches/cc/rtp/session.cpp	Thu Aug  7 17:45:02 2008
@@ -645,7 +645,7 @@
 	if (is_cc_on()) {
 		flags |= RTCP_PT_XR;		// setting flags to XR
 		xrh = (rtcp_xr_hdr*)(rh + 1);	// XR header
-		int xrlen = xrh->xr_flags << 16 >> 16;	// XR length
+		int xrlen = (xrh->xr_flags << 16) >> 16; // XR length
 		xrb = (rtcp_xr_blk*)(xrh + xrlen + 1);	// XR block
 		xrb->begin_seq = lastseq_;// this will be used for ackofack
 		xrb->end_seq = seqno_ + 1;// as defined in RFC3611 section 4.1
@@ -1080,16 +1080,29 @@
 	UNUSED(ep);
 	UNUSED(addr);
 
-	rtcp_xr_blk* xrb;
-	int xrlen = xrh->xr_flags << 16 >> 16;
-	xrb = (rtcp_xr_blk*)(xrh + xrlen + 1);
+	int xrlen = (xrh->xr_flags << 16) >> 16;
+	rtcp_xr_blk* xrb = (rtcp_xr_blk*)(xrh + xrlen + 1);
 	/*
 	 * if AoA is received, trim ackvec and send a new ackvec
 	 * if AckVec is received, then parse it to TfwcSndr
 	 */
-	ackvec_ = xrb->chunk;
-	ackofack_ = xrb->begin_seq;
-	tfwc_sndr_recv(ackvec_);	// parse AckVec
+	if (xrb->begin_seq == xrb->end_seq) {
+		// we just received ackofack, so do receiver stuffs here
+		
+		//trim_vec(xrb->chunk);	// chunk in xrb is ackvec
+		ch_[0].send(build_ackvpkt(xrh), xrlen);
+	} else {
+		ackvec_ = xrb->chunk;
+		ackofack_ = xrb->begin_seq;
+		// time stamp update comes to here
+		tfwc_sndr_recv(ackvec_);	// parse AckVec
+	}
+}
+
+u_char* SessionManager::build_ackvpkt(rtcp_xr_hdr* xrh) 
+{
+	u_char* p = (u_char*) xrh;
+	return (p);
 }
 
 int SessionManager::sdesbody(u_int32_t* p, u_char* ep, Source* ps,

Modified: vic/branches/cc/rtp/session.h
==============================================================================
--- vic/branches/cc/rtp/session.h	(original)
+++ vic/branches/cc/rtp/session.h	Thu Aug  7 17:45:02 2008
@@ -155,6 +155,7 @@
 	void parse_sdes(rtcphdr* rh, int flags, u_char* ep, Source* ps,
 			Address & addr, u_int32_t ssrc, int layer);
 	void parse_bye(rtcphdr* rh, int flags, u_char* ep, Source* ps);
+	u_char* build_ackvpkt(rtcp_xr_hdr* xrh);
 
 	int parseopts(const u_char* bp, int cc, Address & addr) const;
 	int ckid(const char*, int len);



More information about the Sumover-dev mailing list