Re: [rtcweb] JSEP: RTP demux algorithms

Harald Alvestrand <harald@alvestrand.no> Mon, 26 September 2016 08:48 UTC

Return-Path: <harald@alvestrand.no>
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 65E9312B0BF for <rtcweb@ietfa.amsl.com>; Mon, 26 Sep 2016 01:48:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.216
X-Spam-Level:
X-Spam-Status: No, score=-4.216 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RP_MATCHES_RCVD=-2.316] 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 GOqverEb3Qy1 for <rtcweb@ietfa.amsl.com>; Mon, 26 Sep 2016 01:48:40 -0700 (PDT)
Received: from mork.alvestrand.no (mork.alvestrand.no [IPv6:2001:700:1:2::117]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5B71912B0B8 for <rtcweb@ietf.org>; Mon, 26 Sep 2016 01:48:40 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by mork.alvestrand.no (Postfix) with ESMTP id 335A87CABFE for <rtcweb@ietf.org>; Mon, 26 Sep 2016 10:48:38 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at alvestrand.no
Received: from mork.alvestrand.no ([127.0.0.1]) by localhost (mork.alvestrand.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8PQc2iqnVXud for <rtcweb@ietf.org>; Mon, 26 Sep 2016 10:48:36 +0200 (CEST)
Received: from [IPv6:2001:470:de0a:1:41d2:e07c:b0d5:11f3] (unknown [IPv6:2001:470:de0a:1:41d2:e07c:b0d5:11f3]) by mork.alvestrand.no (Postfix) with ESMTPSA id 40D157CABFC for <rtcweb@ietf.org>; Mon, 26 Sep 2016 10:48:36 +0200 (CEST)
To: rtcweb@ietf.org
References: <CAOW+2dtN-tfmnsep8FjOFD2R2uZbUwZxHfDGBwx3N13Ue9Nb2w@mail.gmail.com> <E1B53795-4B14-408B-BFF1-A305EE45AD20@iii.ca> <66CB8C7B-56D1-4AC9-B0F8-4F1689E2CA89@vidyo.com> <E7C35776-C554-47C5-A522-F1C02629041F@iii.ca> <A52D1EFE-6A7D-418F-A77B-176E184EBAB9@vidyo.com> <07afeaa4-06fb-b6a9-b2d7-f944b471fde1@ericsson.com>
From: Harald Alvestrand <harald@alvestrand.no>
Message-ID: <949bdcde-b24d-f2d4-e855-91424b2be30a@alvestrand.no>
Date: Mon, 26 Sep 2016 10:48:35 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0
MIME-Version: 1.0
In-Reply-To: <07afeaa4-06fb-b6a9-b2d7-f944b471fde1@ericsson.com>
Content-Type: text/plain; charset="windows-1252"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/rtcweb/yzJHGDNYKTrWvnoGYgEtu-r9Lf8>
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: Mon, 26 Sep 2016 08:48:43 -0000

Den 23. sep. 2016 10:56, skrev Magnus Westerlund:
> Hi,
> 
> I think the use cases looks fairly covering.
> 
> I want to add an alternative way of thinking on how the SDES item (MID,
> RID) related demultiplexing part is handled. So the RID and MID in RTP
> header extensions or in RTSP SDES packets results in these values being
> bound to the SSRC until further notice. So packets arriving without
> actual RTP header extensions can still be handled according to the SSRCs
> associated SDES items. From my perspective all the cases with MID and
> RID can be handled on a per packet basis rules without latching the SSRC
> to a specific receiver. Instead what is "latched" is the SDES values to
> the SSRC. Still at the point of change there needs to take the
> combination of SSRC and Seq into account to avoid miss routing packets.
> 
> So my general handling algorithm would be this sequence:
> 
> 1. Check if RTP header extensions update any SDES item for the SSRC.
>    a. If they do, mark the Sequence number and keep the old SDES item as
> valid prior to this extended sequence number.
> 
> 2. Determine the set of relevant SDES items that applies for this
> packet, i.e. use SSRC + RTP seq to look up the SDES items, e.g. MID and
> RID.
> 
> 3. Perform the demuxing algorithm

I don't understand this as written.
When an RTP packet arrives before the RTCP packet containing SDES, we
can't latch to the content of the RTCP packet; we haven't seen it yet.

You can, in theory, latch RID and MID for the SSRC to the values in the
SDES packet you haven't seen yet, but that seems somewhat backwards.

The problematic sequence is:

1) RTP packet(s) with header extensions
2) RTP packet(s) without header extensions
3) SDES RTCP packet

(I'm assuming that we require consistency between SDES and RTP header
extensions.
What do we do if they're inconsistent?)

> On another part, I find Jonathan's use case for setting the MID or RID
> using RTCP an interesting one. This put some light on the question that
> in a session where MID and RIDs are configured, if one receive packets
> with an SSRC that lacks these SDES items, what do you do, buffer or
> discard?
> 
> Cheers
> 
> Magnus
> 
> Den 2016-09-16 kl. 21:33, skrev Jonathan Lennox:
>> Just that RTCP counts for latching, and that SSRCs’ MIDs can change.
>>
>>> Agree with both of these.  I think they are both the same as “Whiskey
>>> & Soda Example” - or am I missing something about theses?
>>>
>>>> On Sep 16, 2016, at 11:59 AM, Jonathan Lennox <jonathan@vidyo.com
>>>> <mailto:jonathan@vidyo.com>> wrote:
>>>>
>>>> I’m not going to come up with beverage names for my examples, but
>>>> feel free to make up your own.
>>>>
>>>> 1. The PT are all the same.  An RTCP source description for an SSRC
>>>> contains a MID.  This latches the MID.  Later, RTP packets with this
>>>> SSRC arrive without a MID. They go to the place matching the MID that
>>>> was in RTCP.
>>>>
>>>> 2. The PT are all the same.  A packet contains MID1.  It goes to the
>>>> place that matches MID1, latching the SSRC to MID1.  Later, a packet
>>>> with the same SSRC contains MID2. This moves the latching, so the
>>>> SSRC is now latched to MID2.
>>>>
>>>>
>>>>> On Sep 15, 2016, at 6:18 PM, Cullen Jennings <fluffy@iii.ca
>>>>> <mailto:fluffy@iii.ca>> wrote:
>>>>>
>>>>>
>>>>> 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.
>>>
>>
>>
>>
>> _______________________________________________
>> rtcweb mailing list
>> rtcweb@ietf.org
>> https://www.ietf.org/mailman/listinfo/rtcweb
>>
> 
>