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

Colin Perkins <csp@csperkins.org> Mon, 27 May 2013 19:16 UTC

Return-Path: <csp@csperkins.org>
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 6B3A721F8EA4 for <mmusic@ietfa.amsl.com>; Mon, 27 May 2013 12:16:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.205
X-Spam-Level:
X-Spam-Status: No, score=-106.205 tagged_above=-999 required=5 tests=[AWL=0.394, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
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 nyHJXQHTpmFq for <mmusic@ietfa.amsl.com>; Mon, 27 May 2013 12:16:11 -0700 (PDT)
Received: from balrog.mythic-beasts.com (balrog.mythic-beasts.com [93.93.130.6]) by ietfa.amsl.com (Postfix) with ESMTP id 8821821F8EAE for <mmusic@ietf.org>; Mon, 27 May 2013 12:16:10 -0700 (PDT)
Received: from [81.187.2.149] (port=39507 helo=[192.168.0.11]) by balrog.mythic-beasts.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from <csp@csperkins.org>) id 1Uh2ts-0005Tu-0c; Mon, 27 May 2013 20:16:09 +0100
Mime-Version: 1.0 (Apple Message framework v1283)
Content-Type: text/plain; charset="us-ascii"
From: Colin Perkins <csp@csperkins.org>
In-Reply-To: <51A3AF2A.6030302@alum.mit.edu>
Date: Mon, 27 May 2013 20:16:07 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <ACC62A7F-0CDC-4E55-8082-E8D5C3E6A7E4@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> <51A3AF2A.6030302@alum.mit.edu>
To: Paul Kyzivat <pkyzivat@alum.mit.edu>
X-Mailer: Apple Mail (2.1283)
X-BlackCat-Spam-Score: -28
X-Mythic-Debug: Threshold = On =
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:16:16 -0000

On 27 May 2013, at 20:08, Paul Kyzivat wrote:
> 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.

Without a wholesale revision to RTP and the signalling, I believe this should be illegal (i.e., you MUST NOT map the same payload type to two different payload formats in a single bundle group). 

>>> 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.

I don't see any problem using the a=ssrc: or RTP header extension based methods to determine what m= line an RTP source maps to. I don't think you need to relax the requirement that PTs be unique per m= line to do this. 

As I said in the other thread, how you decide how to render an RTP source is separate to how you demultiplex RTP sources. Most of this confusion is coming from trying to combine the two operations.

-- 
Colin Perkins
http://csperkins.org/