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

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Wed Aug 6 11:34:11 BST 2008


Author: soohyunc
Date: Wed Aug  6 11:34:08 2008
New Revision: 4238

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

Log:
(temporary commit)
building a separate RTP extended send method
- the original send_report() only specifies RR and SR


Modified: vic/branches/cc/rtp/session.cpp
==============================================================================
--- vic/branches/cc/rtp/session.cpp	(original)
+++ vic/branches/cc/rtp/session.cpp	Wed Aug  6 11:34:08 2008
@@ -591,8 +591,35 @@
 void SessionManager::announce(CtrlHandler* ch)
 {
 	send_report(ch, 0);
+	send_xreport(ch, 0);
 }
 
+/*
+ * send RTP extended report.
+ */
+void SessionManager::send_xreport(CtrlHandler* ch, int bye, int app)
+{
+	UNUSED(app);
+
+	SourceManager& sm = SourceManager::instance();
+	Source& s = *sm.localsrc();	// local source
+	rtcphdr* rh = (rtcphdr*)pktbuf_;
+	rh->rh_ssrc = s.srcid();
+
+	int flags = RTP_VERSION << 14;
+	int layer = ch- ch_;
+	Source:: Layer& sl = s.layer(layer);
+	timeval now = unixtime();
+	sl.lts_ctrl(now);
+
+	rtcp_xr* xr;	// extended report
+
+	flags |= RTCP_PT_XR;
+	xr = (rtcp_xr*)(rh + 1);
+}
+
+
+
 /*XXX check for buffer overflow*/
 /*
 * Send an RTPv2 report packet.

Modified: vic/branches/cc/rtp/session.h
==============================================================================
--- vic/branches/cc/rtp/session.h	(original)
+++ vic/branches/cc/rtp/session.h	Wed Aug  6 11:34:08 2008
@@ -127,6 +127,7 @@
 	virtual inline void send_bye() { send_report(&ch_[0], 1); }
 //	virtual void send_report();
 	virtual void send_report(CtrlHandler*, int bye, int app = 0);
+	virtual void send_xreport(CtrlHandler*, int bye, int app = 0);
 
 protected:
 //	void demux(rtphdr* rh, u_char* bp, int cc, Address & addr, int layer);



More information about the Sumover-dev mailing list