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

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Thu Feb 18 19:56:49 GMT 2010


Author: soohyunc
Date: Thu Feb 18 19:56:49 2010
New Revision: 4622

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

Log:
We don't need to send AoA (Ack of Ack) on every data packet. Specially, the data
packets are triggered within the encoding loop, we do not want to send AoA
because it will increase the whole Tx time, which will eventually dealy the
whole encoding process.

Therefore, if the data packets are triggered within the encoding loop, we only
send AoA in the first data packet transmission, omitting to send AoA for the 
rest of the data packets (in the encoding loop).



Modified: vic/branches/cc/rtp/session.cpp
==============================================================================
--- vic/branches/cc/rtp/session.cpp	(original)
+++ vic/branches/cc/rtp/session.cpp	Thu Feb 18 19:56:49 2010
@@ -475,6 +475,15 @@
 	}
 }
 
+void SessionManager::tx_data_only(pktbuf* pb) 
+{
+	if (pb->layer < loop_layer_) {
+		Network* n = dh_[pb->layer].net();
+		if (n != 0)
+			n->send(pb);
+	}
+}
+
 // sending ack of ack packet (RTCP XR report packet)
 void CtrlHandler::send_aoa()
 {

Modified: vic/branches/cc/rtp/session.h
==============================================================================
--- vic/branches/cc/rtp/session.h	(original)
+++ vic/branches/cc/rtp/session.h	Thu Feb 18 19:56:49 2010
@@ -160,6 +160,7 @@
 	void demux(pktbuf* pb, Address & addr);
 	virtual int check_format(int fmt) const = 0;
 	virtual void transmit(pktbuf* pb);
+	virtual void tx_data_only(pktbuf* pb);
 	void send_report(int bye);
 	void send_ECNXreport(CtrlHandler* ch, u_int8_t tos, u_int16_t begin_seq);
 	int build_bye(rtcphdr* rh, Source& local);

Modified: vic/branches/cc/rtp/transmitter.cpp
==============================================================================
--- vic/branches/cc/rtp/transmitter.cpp	(original)
+++ vic/branches/cc/rtp/transmitter.cpp	Thu Feb 18 19:56:49 2010
@@ -320,8 +320,8 @@
 		// move head pointer
 		head_ = pb->next;
 
-		// call Transmitter::output(pb)
-		output(pb);
+		// call Transmitter::output_data_only(pb)
+		output_data_only(pb);
 	}
 //	fprintf(stderr,"\t^                                          ^\n");
 //	fprintf(stderr,"\t|                                          |\n");
@@ -451,6 +451,12 @@
 //	pb->release() is called by decoder in loopback;
 }
 
+void Transmitter::output_data_only(pktbuf* pb) 
+{
+	tx_data_only(pb);
+	loopback(pb);
+}
+
 /*void Transmitter::release(pktbuf* pb)
 {
 	pb->next = freehdrs_;

Modified: vic/branches/cc/rtp/transmitter.h
==============================================================================
--- vic/branches/cc/rtp/transmitter.h	(original)
+++ vic/branches/cc/rtp/transmitter.h	Thu Feb 18 19:56:49 2010
@@ -113,7 +113,9 @@
 	void dump(int fd, iovec*, int iovel) const;
 	void loopback(pktbuf*);
 	void output(pktbuf* pb);
+	void output_data_only(pktbuf* pb);
 	virtual void transmit(pktbuf* pb) = 0;
+	virtual void tx_data_only(pktbuf* pb) = 0;
 	double gettimeofday_secs() const;
 	double txtime(pktbuf* pb);
 



More information about the Sumover-dev mailing list