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

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Sat Feb 27 02:48:51 GMT 2010


Author: soohyunc
Date: Sat Feb 27 02:48:50 2010
New Revision: 4654

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

Log:
capture XR timestamp at CtrlHandler::recv()
  -- it could save around 0.5 msec time lag between SessionManager and TfwcSndr
     (for the better RTT measurement in the TFWC module)

SO_TIMESTAMP is not yet enabled; it is currently commented out.



Modified: vic/branches/cc/rtp/session.cpp
==============================================================================
--- vic/branches/cc/rtp/session.cpp	(original)
+++ vic/branches/cc/rtp/session.cpp	Sat Feb 27 02:48:50 2010
@@ -1306,6 +1306,9 @@
 	// XR repport block
 	rtcp_xr_BT_1_hdr *xr1;
 
+	// so_timestamp
+	double so_rtime;
+
 	if ( xr->BT == XR_BT_1 && xr->xr_flag == 0 ) {
 		// XR block type 1
 		xr1 = (rtcp_xr_BT_1_hdr *) xr;
@@ -1327,10 +1330,15 @@
 			
 			switch (cc_type_) {
 			case WBCC:
-				fprintf(stderr, 
-				"\tincomingXR\tnow: %f\n",tx_now()-tx_now_offset_);
+				fprintf(stderr, "\tincomingXR\tnow: %f\n", recv_ts_);
+				// SO_TIMESTAMP
+				//so_rtime = ch_[0].net()->recv_so_time();
+				//fprintf(stderr, "*** recv_ts: %f so_rtime: %f diff: %f\n",
+				//		recv_ts_, so_rtime, recv_ts_-so_rtime);
+
 				// TFWC sender (getting AckVec)
-				tfwc_sndr_recv(xr->BT, begin, end, chunk);
+				tfwc_sndr_recv(xr->BT, begin, end, chunk, recv_ts_);
+
 				// we need to call Transmitter::output(pb) to make Ack driven
 				cc_tfwc_output();
 				break;
@@ -1496,6 +1504,9 @@
  */
 void SessionManager::recv(CtrlHandler* ch)
 {
+	// timestamp for XR reception 
+	recv_ts_ = tx_now() - tx_now_offset_;
+
 	Address * srcp;
 	int cc = ch->recv(pktbuf_, 2 * RTP_MTU, srcp);
 	if (cc <= 0)

Modified: vic/branches/cc/rtp/session.h
==============================================================================
--- vic/branches/cc/rtp/session.h	(original)
+++ vic/branches/cc/rtp/session.h	Sat Feb 27 02:48:50 2010
@@ -231,8 +231,8 @@
 
 	// AckVector
 	u_int16_t ackvec_;	// this is a bit vector
-	u_int32_t ts_;		// timestamp
-	u_int32_t ts_echo_;	// timestamp echo
+	// timestamp
+	double recv_ts_;	// receive timestamp
 };
 
 class AudioSessionManager : public SessionManager {



More information about the Sumover-dev mailing list