Re: [rtcweb] JSEP: RTP demux algorithms

Cullen Jennings <fluffy@iii.ca> Thu, 15 September 2016 22:18 UTC

Return-Path: <fluffy@iii.ca>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B1C7512B098 for <rtcweb@ietfa.amsl.com>; Thu, 15 Sep 2016 15:18:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sbMKRXp-XPo5 for <rtcweb@ietfa.amsl.com>; Thu, 15 Sep 2016 15:18:21 -0700 (PDT)
Received: from smtp121.iad3a.emailsrvr.com (smtp121.iad3a.emailsrvr.com [173.203.187.121]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 12AE312B075 for <rtcweb@ietf.org>; Thu, 15 Sep 2016 15:18:20 -0700 (PDT)
Received: from smtp8.relay.iad3a.emailsrvr.com (localhost [127.0.0.1]) by smtp8.relay.iad3a.emailsrvr.com (SMTP Server) with ESMTP id 4FFDCC028E; Thu, 15 Sep 2016 18:18:15 -0400 (EDT)
X-Auth-ID: fluffy@iii.ca
Received: by smtp8.relay.iad3a.emailsrvr.com (Authenticated sender: fluffy-AT-iii.ca) with ESMTPSA id B6C4BC01B6; Thu, 15 Sep 2016 18:18:14 -0400 (EDT)
X-Sender-Id: fluffy@iii.ca
Received: from [10.92.108.80] (184-23-135-130.dedicated.static.sonic.net [184.23.135.130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:587 (trex/5.7.7); Thu, 15 Sep 2016 18:18:15 -0400
Content-Type: multipart/alternative; boundary="Apple-Mail=_4DCE91DB-1CF8-4A67-8B23-E1393AC8B764"
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
From: Cullen Jennings <fluffy@iii.ca>
In-Reply-To: <CAOW+2dtN-tfmnsep8FjOFD2R2uZbUwZxHfDGBwx3N13Ue9Nb2w@mail.gmail.com>
Date: Thu, 15 Sep 2016 15:18:13 -0700
Message-Id: <E1B53795-4B14-408B-BFF1-A305EE45AD20@iii.ca>
References: <CAOW+2dtN-tfmnsep8FjOFD2R2uZbUwZxHfDGBwx3N13Ue9Nb2w@mail.gmail.com>
To: Bernard Aboba <bernard.aboba@gmail.com>
X-Mailer: Apple Mail (2.3124)
Archived-At: <https://mailarchive.ietf.org/arch/msg/rtcweb/0owL5Zk9oJ6FlukhfzVGUbIM0AA>
Cc: RTCWeb IETF <rtcweb@ietf.org>, Robin Raymond <robin@myjoe.com>
Subject: Re: [rtcweb] JSEP: RTP demux algorithms
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <rtcweb.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/rtcweb/>
List-Post: <mailto:rtcweb@ietf.org>
List-Help: <mailto:rtcweb-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 15 Sep 2016 22:18:24 -0000

To propose a few use case….

“Whiskey & Soda Example”
The PT are all the same. Early packets, and any packets after a SSRC change, contain a MID. If the packet has  MID, it goes to the place that matches that MID *and* it latches that SSRC so any future SSRC that don’t have a MID go the to the same place. 

“Coke Classic Example” 
The PT are all unique. The SSRC change. There is no RID, MID, FEC, or RTX. The packets get delivered to the thing with the matching PT. 

“Bloddy Mary Example” 
The PT are the same. The SSRC do not changed and are signalled in SDP. There is no MID, RID, etc in the RTP.  The packets go to the thing the SSRC signalling would have indicated. 

“Diet Coke Example”
The PT are all unique. The packet has a MID. The MID corresponds to a an m-line that does not have PT associated with it that match the PT. (the PT is from a different m-line). The packets gets dropped (or cause event in ORTC). [ Note I think of this that the MID sends it to the right m-line aka Receiver, but then that does not have a codec for that PT so it gets dropped. ]

“Diet Pepsi Example”
The PT are all unique. The packet has a SSRC. The SSRC does not correspond to any SSRC that were signalled for the m-line that the PT is on. The packet goes to the thing associated with that PT ignoring any SSRC. 

“Red Bull Example”
The packet has a MID that does not match any MID in the signalling. The packets gets dropped (or event in ORTC).






> On Sep 14, 2016, at 10:49 AM, Bernard Aboba <bernard.aboba@gmail.com> wrote:
> 
> There is now a JSEP PR relating to RTP demux algorithms: 
> https://github.com/rtcweb-wg/jsep/pull/320 <https://github.com/rtcweb-wg/jsep/pull/320>
> 
> Rather than commenting in detail on that PR in this post, I would like to prove some thoughts on how we evaluate proposed RTP demux algorithms. 
> 
> The goal of an RTP demux algorithm is to determine whether an incoming RTP packet received on a DtlsTransport can be forwarded to one of the RtpReceivers attached to that DtlsTransport.  If none of the RtpReceivers qualify, then the packet is either dropped (WebRTC 1.0) or generates an RTP unhandled event (ORTC). 
> 
> In principle, RTP demux algorithms do not seem complicated, since they often can be expressed in less than half a dozen steps, typically with less than a page of text. 
> 
> However, in practice the difficulty has turned out to be not in stating an algorithm, but in evaluating whether it is correct. This challenges include: 
> 
> 1. Agreement on a set of use cases and desired outcomes that a proposed algorithm must satisfy.  Think of this as a set of regression tests that insure that a proposed algorithm behaves as we expect, as well as ensuring that changes to that algorithm do not result in unintended consequences. 
> 
> 2. Agreement on all the inputs that the algorithm takes into account.  This includes fields within the RTP packet (e.g. SSRC, PT, RID, MID, etc.) as well as methods within the API (e.g. setLocalDescription, setRemoteDescription, setParameters, etc.). 
> 
> With respect to Issue #1, some of the trickiest use cases involve both PT and SSRC signaling, SSRC "latching" and handling FEC and RTX.  Examples include: 
>     a. Change of SSRCs (e.g. due to conflict). 
>     b. Codec switching (e.g. changing PT but same SSRC, or changing both PT and SSRC).
>     c. Use of both FEC and RTX (and perhaps RTX of FEC).
> 
> IMHO it would be useful to come up a few (less than half a dozen) use cases with agreed-upon outcomes.
> 
> With respect to Issue #2, the proposed algorithms so far look at the SSRC & PT fields in the RTP header as well as the MID RTP extension.  However, I have not seen algorithms which take into account the role of the RID RTP extension.  So agreement on whether the RID needs to be considered or not would be helpful. 
> 
> Also, for WebRTC 1.0 it would appear to me that the algorithm will depend on the inputs to the setLocalDescription/setRemoteDescription methods, so that there is a potential dependency on the signaling state of the PeerConnection.
> 
> Overall, I believe that the discussion of RTP demux algorithms is likely to go more smoothly (and conclude more quickly) if we get agreement on these meta-issues upfront. 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> rtcweb mailing list
> rtcweb@ietf.org
> https://www.ietf.org/mailman/listinfo/rtcweb