Re: [MMUSIC] Proposal for what bundle should say about demux

Paul Kyzivat <pkyzivat@alum.mit.edu> Mon, 27 May 2013 19:08 UTC

Return-Path: <pkyzivat@alum.mit.edu>
X-Original-To: mmusic@ietfa.amsl.com
Delivered-To: mmusic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6960221F96C8 for <mmusic@ietfa.amsl.com>; Mon, 27 May 2013 12:08:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.077
X-Spam-Level:
X-Spam-Status: No, score=-0.077 tagged_above=-999 required=5 tests=[AWL=0.360, BAYES_00=-2.599, FH_RELAY_NODNS=1.451, HELO_MISMATCH_NET=0.611, RDNS_NONE=0.1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VbwkaRtW3Rcz for <mmusic@ietfa.amsl.com>; Mon, 27 May 2013 12:08:31 -0700 (PDT)
Received: from qmta03.westchester.pa.mail.comcast.net (qmta03.westchester.pa.mail.comcast.net [IPv6:2001:558:fe14:43:76:96:62:32]) by ietfa.amsl.com (Postfix) with ESMTP id 8543B21F96C6 for <mmusic@ietf.org>; Mon, 27 May 2013 12:08:31 -0700 (PDT)
Received: from omta06.westchester.pa.mail.comcast.net ([76.96.62.51]) by qmta03.westchester.pa.mail.comcast.net with comcast id gzTq1l00316LCl05378W5N; Mon, 27 May 2013 19:08:30 +0000
Received: from Paul-Kyzivats-MacBook-Pro.local ([50.138.229.164]) by omta06.westchester.pa.mail.comcast.net with comcast id h78W1l00R3ZTu2S3S78W4V; Mon, 27 May 2013 19:08:30 +0000
Message-ID: <51A3AF2A.6030302@alum.mit.edu>
Date: Mon, 27 May 2013 15:08:26 -0400
From: Paul Kyzivat <pkyzivat@alum.mit.edu>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130509 Thunderbird/17.0.6
MIME-Version: 1.0
To: Colin Perkins <csp@csperkins.org>
References: <C5E08FE080ACFD4DAE31E4BDBF944EB11350F3C8@xmb-aln-x02.cisco.com> <71E1CC64-09A0-41D3-81D0-CFE8C30277B1@csperkins.org> <C5E08FE080ACFD4DAE31E4BDBF944EB1135183E7@xmb-aln-x02.cisco.com> <A7E47BAA-5289-4C34-A9B9-6E8A1147D20F@csperkins.org> <51A39870.7040708@alum.mit.edu> <6E11F505-6808-4E09-9359-8494B795BEDD@csperkins.org>
In-Reply-To: <6E11F505-6808-4E09-9359-8494B795BEDD@csperkins.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1369681710; bh=BApAtsGn0VXs5i3ayWCLbAjObdInRtghHXywQ3+o4dQ=; h=Received:Received:Message-ID:Date:From:MIME-Version:To:Subject: Content-Type; b=kf7XfaK2PIQxJQ/clwLM+cowREazgUaKAVmPdEjmXZ03hzwSKyp4ldyhRhouumUsT 4JZetDALC5mKXjAQ3oa/9uwLLdI9fEKBizX+w1PwoA0UCq5CB54BEeeLSCdh8b949b 4Dr7vwnSJyUfO8n3gwjcYgIviC2wqGJ/NSNuQmuwUcF2VzUYhh2R9erVvfnCM4Rb9k uYQ75b9wkGYt+xhSMiVXO245ZijFMQmZfBd6o41U6AaFwZ0kySc6Xe/x0C7rzvzbU1 5jcnwoVh8zWMyk8f41k/6GRa7LgxW9WW/sC5HIsS4J6cCkZ4GIo8Ym6fznULow+9pt 0JF+jxrTpMoAg==
Cc: mmusic@ietf.org
Subject: Re: [MMUSIC] Proposal for what bundle should say about demux
X-BeenThere: mmusic@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Multiparty Multimedia Session Control Working Group <mmusic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/mmusic>, <mailto:mmusic-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/mmusic>
List-Post: <mailto:mmusic@ietf.org>
List-Help: <mailto:mmusic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/mmusic>, <mailto:mmusic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 27 May 2013 19:08:48 -0000

On 5/27/13 2:08 PM, Colin Perkins wrote:
> Paul,
>
> On 27 May 2013, at 18:31, Paul Kyzivat wrote:
>> Colin,
>>
>> (I guess you know I am naive about RTP, so take this with a grain of salt.)
>>
>> In the below, you first split by SSRC. Then later you map to codec. That seems to suggest that each SSRC might have a unique mapping from PT to codec. Did you intend that?
>
> That's not how RTP has worked historically. The mapping from payload type to payload format has always been done on a per-RTP session basis, with a static mapping for some types, and a dynamic binding via SDP for others.

Sure, I understand that. There was no way to describe that in SDP, so of 
course it wasn't done that way.

The introduction of bundling makes it possible to describe more 
possibilities. So that it becomes necessary to decide which ones will 
now be valid and which will not.

I asked because it wasn't clear. I think things can be made to work 
either way. If this is to be illegal, then the rules for forming bundles 
should say so.

>> I also don't understand below how you expect unknown SSRCs to be handled. ISTM that the flow you show could result in establishing a bunch of state for each received SSRC, whether that SSRC is of interest or not.
>
> If you receive RTP and/or RTCP packets you need to keep some state for that SSRC. At least, you need to record the SSRC as in-use so you can avoid collisions, and you need to send RTCP reports for that SSRC. The state requirements for this are small (tens of bytes per SSRC). If you care about decoding and rendering the source there is more state, of course, but you only need that if you're rendering their media.
>
> You also need to be slightly smart to prevent DoS attacks if the other side decides to send you a stream of packets with a different, random, SSRC in each, but that's just basic robustness, and there are plenty of other ways to DoS a poorly engineered receiver at the RTP layer without playing tricks with SSRCs.
>
>> In some cases it may be that specific SSRCs are expected, and others can be ignored (or whatever). In other cases the recipient may not know what SSRCs to expect, but may have some other way of deciding which it wants to process.
>
> Sure - if you know what SSRCs you're expecting, you can pre-populate some of the state at the RTP level, and tell that layer that unknown SSRCs can be discarded. None of that changes the basic approach to de-multiplexing.
>
>> That was the point of my thread about associating packets to m-lines. If you can at least associate a packet with one of the bundled m-lines, even if it is by a means other than SSRC, then it becomes easier to decide what to do with it. For instance, I think Cullen intends that in plan A you could associate packets with m-lines via the PT, and then for each m-line process only packets for the most recently seen SSRC. (So when a new SSRC is received, drop all state for the prior SSRC and establish a new state for the new one.)
>
> I would suggest instead: de-multiplex into sources based on the SSRC and keep state for those according to the RTP timing rules. If you want to associate sources with m= lines via the PT, and determine what to render based on most recently active, that works fine, and works with all the various RTP and RTCP extensions (unlike de-multiplexing sources based on the PT), and gives you many more possible sources since the SSRC space is larger than the PT space.
>
>> The same approach can work using a header extension identifying a clue capture encoding to map to an m-line. When doing that, it won't be necessary for the PT to be unique across m-lines.
>
> The combination of an RTP Header Extension and/or RTCP SDES packet to identify an m= line would also work, and associates with the stream based on the SSRC. You don't need to use the PT to demultiplex for this.

One of my points is that if SSRC and/or header extension value is known 
in advance, then putting that in the SDP and using it to associate to an 
m-line can relax the requirement that PTs be unique per-m-line. That 
makes it possible to support more m-lines in a bundle. This could be 
advantageous for plan A.

	Thanks,
	Paul

> Colin
>
>
>
>> 	Thanks,
>> 	Paul
>>
>> On 5/27/13 9:57 AM, Colin Perkins wrote:
>>> I don't agree with the phrasing about "packet processing pipelines", but can't tell if this is a terminology disagreement or a more fundamental disconnect. The way I see the demultiplexing logically working is:
>>>
>>>                      |
>>>                      | packets
>>>      +--             v
>>>      |           +----------+
>>>      |           |UDP socket|
>>>   A  |           +----------+
>>>      |        RTP ||  |  |
>>>      |   and RTCP ||  |  +------> SCTP
>>>      |            ||  +---------> STUN/ICE
>>>      +--          ||
>>>      +--          ||
>>>      |       split by SSRC
>>>      |       ||   ||   ||
>>>      |       ||   ||   ||
>>>   B  |      +--+ +--+ +--+
>>>      |      |PB| |PB| |PB| Playout buffer, process RTCP, FEC, etc.
>>>      |      +--+ +--+ +--+
>>>      +--      |   |     |
>>>      +--      |  /      |
>>>      |        +---+     |
>>>      |         /  |     |
>>>   C  |      +--+ +--+ +--+
>>>      |      |CR| |CR| |CR| Codecs and rendering
>>>      |      +--+ +--+ +--+
>>>      +--
>>>
>>> If your algorithm is for demultiplexing at layer C, i.e., to figure out what codec and rendering pipeline to use, then I think we're in agreement apart from terminology.
>>>
>>> For layer B, I believe the SSRC is the right thing to use to demultiplex, and fits with RTP and RTCP. This is where RTCP is processed, playout de-jitter buffering happens, FEC is processed, NACKs are sent, etc. It's logically independent of the decoding and rendering process since you can start filling your de-jitter buffer for an SSRC before you figure out if/how/where you're going to render that SSRC.
>>>
>>> For layer A, there was a clear-cut way of doing this with RTP, RTCP, and STUN. I haven't looked at SCTP enough to know how that affects things. I do think it's a logically separate issue, and should be documented separately to BUNDLE though, since it the same issues arise with non-bundled sessions.
>>>
>>> An implementation might merge these together, of course, but to avoid confusion the standards should be clear what level they're considering.
>>>
>>> Colin
>>>
>>>
>>>
>>> On 27 May 2013, at 14:15, Cullen Jennings (fluffy) wrote:
>>>> Great - sounds like we agree this algorithm will work.
>>>>
>>>> On May 27, 2013, at 6:41 AM, Colin Perkins <csp@csperkins.org> wrote:
>>>>
>>>>> I'm not sure I agree.
>>>>>
>>>>> As I said in my previous message to the list, if we are agreed that the m= lines in a BUNDLE group form a single RTP session, then I believe we need unique payload types across all m= lines. In this case, BUNDLE can simply say that regular RTP source demultiplexing based on the SSRC has to be performed, then the payload type can be used to match sources to m= lines for those applications that care about doing so.
>>>>>
>>>>> If we're not agreed that the m= lines in a BUNDLE group form a single RTP session, then we have a lot more to discuss...
>>>>>
>>>>> Colin
>>>>>
>>>>>
>>>>>
>>>>> On 23 May 2013, at 19:02, Cullen Jennings (fluffy) wrote:
>>>>>> Here's is my proposal for roughly what the bundle draft should say about this demux topic
>>>>>>
>>>>>> Application will decide which packet processing pipeline to pass an given RTP/RTCP packet to based on what the application knows:
>>>>>>
>>>>>> 1) If future RFCs define new things (like RTP header extension), that explicitly specify the mapping, check if that future RFC is in use and if so then use that to form the mapping
>>>>>>
>>>>>> 2) If the PT type is uniquely identifies a mapping, use that to form the mapping
>>>>>>
>>>>>> 3) If application knows the SSRC the other side will use, use that to form the mapping
>>>>>>
>>>>>> 4) if there is no way to know which pipeline to pass it too, the packet MAY be discarded or the application MAY decide to buffer it until the mapping is known
>>>>>>
>>>>>> This is trivial to implement. It meets the requirements for Plan A, Plan B, UCIF, CLUE, and so on.
>>>>>>
>>>>>> We could swap the order of step 2 and 3, My thinking for this order was the only time it made any difference the order was if the PT were unique and indicated a different mapping than the SSRC. The only way this could happen is with a SSRC collision so the PT is the one that would be correct not the SSRC. If someone feels strongly the order of steps 2 and 3 should be the opposite way around, I can live with that.
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> mmusic mailing list
>>>>>> mmusic@ietf.org
>>>>>> https://www.ietf.org/mailman/listinfo/mmusic
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Colin Perkins
>>>>> http://csperkins.org/
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> mmusic mailing list
>>>>> mmusic@ietf.org
>>>>> https://www.ietf.org/mailman/listinfo/mmusic
>>>>
>>>> _______________________________________________
>>>> mmusic mailing list
>>>> mmusic@ietf.org
>>>> https://www.ietf.org/mailman/listinfo/mmusic
>>>
>>>
>>>
>>
>> _______________________________________________
>> mmusic mailing list
>> mmusic@ietf.org
>> https://www.ietf.org/mailman/listinfo/mmusic
>
>
>