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

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Sat Aug 9 12:20:12 BST 2008


Author: soohyunc
Date: Sat Aug  9 12:20:09 2008
New Revision: 4256

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

Log:
time stamp correctly added (rtp sender side's time stamp using gettimeofday)


Modified: vic/branches/cc/rtp/session.cpp
==============================================================================
--- vic/branches/cc/rtp/session.cpp	(original)
+++ vic/branches/cc/rtp/session.cpp	Sat Aug  9 12:20:09 2008
@@ -682,12 +682,17 @@
 	xrb->begin_seq = htonl(lastseq_);
 	xrb->end_seq = htonl(seqno_ + 1);
 
+	// this chunk is used for ackvec
 	if(xrh->xr_flags & (bt << 28) == XR_BT_1) {
-		// this chunk is ackvec
 		xrb->chunk = (u_int32_t *) htonl(tfwc_rcvr_getvec());
-	} else if(xrh->xr_flags & (bt << 28) == XR_BT_3) {
-		// this chunk is timestamp echo
-		//xrb->chunk = (u_int32_t *) gettimeofday_usecs();
+	} 
+	
+	// this chunk is used for timestamp
+	if(xrh->xr_flags & (bt << 28) == XR_BT_3) {
+		timeval tv;
+		::gettimeofday(&tv, 0);
+		u_int32_t time = (u_int32_t) (tv.tv_sec + tv.tv_usec);
+		xrb->chunk = (u_int32_t *) time;
 	}
 
 	int nrr = 0;



More information about the Sumover-dev mailing list