[asterisk-commits] oej: branch oej/chocolate-video-congestion-11 r433326 - in /team/oej/chocolat...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Mar 24 10:40:24 CDT 2015


Author: oej
Date: Tue Mar 24 10:40:22 2015
New Revision: 433326

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=433326
Log:
Delete this mail and look at the next one. It's much more interesting. Maybe it has a cool offer.
Two Asterisk servers for the price of one! A cookie from Duffet's desk for every Asterisk core dump this week!

This code patch is not what I want you to look at. Move on. Get a life. Look at the next cool sexy patch from File.
Do NOT look at this.

Modified:
    team/oej/chocolate-video-congestion-11/README.chocolate
    team/oej/chocolate-video-congestion-11/channels/chan_sip.c
    team/oej/chocolate-video-congestion-11/include/asterisk/rtp_engine.h
    team/oej/chocolate-video-congestion-11/res/res_rtp_asterisk.c

Modified: team/oej/chocolate-video-congestion-11/README.chocolate
URL: http://svnview.digium.com/svn/asterisk/team/oej/chocolate-video-congestion-11/README.chocolate?view=diff&rev=433326&r1=433325&r2=433326
==============================================================================
--- team/oej/chocolate-video-congestion-11/README.chocolate (original)
+++ team/oej/chocolate-video-congestion-11/README.chocolate Tue Mar 24 10:40:22 2015
@@ -29,6 +29,10 @@
 * Send feedback based on RTCP
 * Forward incoming feedback across bridge and send out on other side
   for optimal video pass through
+
+Questions
+---------
+* How do we handle video offers with different settings per codec?
 
 Settings
 --------

Modified: team/oej/chocolate-video-congestion-11/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/chocolate-video-congestion-11/channels/chan_sip.c?view=diff&rev=433326&r1=433325&r2=433326
==============================================================================
--- team/oej/chocolate-video-congestion-11/channels/chan_sip.c (original)
+++ team/oej/chocolate-video-congestion-11/channels/chan_sip.c Tue Mar 24 10:40:22 2015
@@ -11095,7 +11095,7 @@
 				ast_rtp_codecs_payloads_unset(newvideortp, NULL, codec);
 			}
 		}
-	} else if (sscanf(a, "rctp-fb: %3u %255[^\t\n]", &codec, rtcpfb_string) == 2) {
+	} else if (sscanf(a, "rtcp-fb: %3u %255[^\t\n]", &codec, rtcpfb_string) == 2) {
 		/*  AVPF RTCP feedback. We need to check if we really have AVPF, if not ignore these options.
 		Examples:
  		 	a=rtcp-fb:100 ccm fir
@@ -11109,6 +11109,7 @@
 			trr-int
 			app
 			ccm (RFC 5104)
+			goog-remb	(draft)
 
 		Nack can have one of the the following parameters
 			sli, pli, rpsi, app, rai, tllei, pslei, ecn
@@ -11117,8 +11118,18 @@
 			rpsi, app
 		*/
 		ast_debug(2, " Got RTCP-FB parameter for codec %d : %s \n", codec, rtcpfb_string);
-		/* Do something clever with this information */
-		/* FInd out if there's a parameter */
+		if (!strncasecmp(rtcpfb_string, "goog-remb", 9)) {
+			/* Do something clever with this information */
+			/* Yes, this is an ugly hack, but for now it will have to do. This property
+			   is really a per-codec thing, not per-stream */
+			if (p->vrtp) {
+				ast_rtp_instance_set_prop(p->vrtp, AST_RTP_PROPERTY_RTCPFB_REMB, 1);
+				found = TRUE;
+			}
+		} else {
+			/* We have no clue what this is */
+			ast_debug(3, "%s : not implemented RTCP AVPF feedback property. \n", rtcpfb_string);
+		};
 	}
 
 	return found;

Modified: team/oej/chocolate-video-congestion-11/include/asterisk/rtp_engine.h
URL: http://svnview.digium.com/svn/asterisk/team/oej/chocolate-video-congestion-11/include/asterisk/rtp_engine.h?view=diff&rev=433326&r1=433325&r2=433326
==============================================================================
--- team/oej/chocolate-video-congestion-11/include/asterisk/rtp_engine.h (original)
+++ team/oej/chocolate-video-congestion-11/include/asterisk/rtp_engine.h Tue Mar 24 10:40:22 2015
@@ -100,6 +100,8 @@
 	AST_RTP_PROPERTY_STUN,
 	/*! Enable RTCP support */
 	AST_RTP_PROPERTY_RTCP,
+	/*! Enable RTCP feedback REMB (requires AST_RTP_PROPERTY_RTCP)  */
+	AST_RTP_PROPERTY_RTCPFB_REMB,
 
 	/*!
 	 * \brief Maximum number of RTP properties supported

Modified: team/oej/chocolate-video-congestion-11/res/res_rtp_asterisk.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/chocolate-video-congestion-11/res/res_rtp_asterisk.c?view=diff&rev=433326&r1=433325&r2=433326
==============================================================================
--- team/oej/chocolate-video-congestion-11/res/res_rtp_asterisk.c (original)
+++ team/oej/chocolate-video-congestion-11/res/res_rtp_asterisk.c Tue Mar 24 10:40:22 2015
@@ -213,6 +213,18 @@
 #define FLAG_NAT_INACTIVE_NOWARN        (1 << 1)
 #define FLAG_NEED_MARKER_BIT            (1 << 3)
 #define FLAG_DTMF_COMPENSATE            (1 << 4)
+
+/* Ugly hack warning: The RTCP Feedback is per codec and stream. We can't have it in the codec/format settings,
+   since it would affect comparisions. We currently have no object per codec in a stream. The right way (TM)
+   would be to create a list of properties per codec used in the stream. In theory, one codec could have
+   the need of one AVPF/RTCPFB feature, but not another in the same stream. Like in an audio stream if we
+   change to DTMF and then back to a codec. The DTMF has separate properties.
+   These flags should not be set per RTP stream, but in a separate list that doesn't exist right now. 
+   I am doing this just to be able to start sending the feedback messages quickly while figuring out
+   if this will work at all or not.
+ */
+
+#define FLAG_RTCPFB_REMB_ENABLED	(1 << 5)
 
 #define TRANSPORT_SOCKET_RTP 0
 #define TRANSPORT_SOCKET_RTCP 1




More information about the asterisk-commits mailing list