Re: [rtcweb] JSEP: codecs in answer: ordering (was codecs in answer: MUST vs. MAY)

Harald Alvestrand <harald@alvestrand.no> Tue, 31 October 2017 07:16 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 E6B5911F81 for <rtcweb@ietfa.amsl.com>; Tue, 31 Oct 2017 00:16:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] 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 IskZj8O-Ykla for <rtcweb@ietfa.amsl.com>; Tue, 31 Oct 2017 00:16:30 -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 004C9126B6 for <rtcweb@ietf.org>; Tue, 31 Oct 2017 00:16:29 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by mork.alvestrand.no (Postfix) with ESMTP id 50CC87C07E1; Tue, 31 Oct 2017 08:16:28 +0100 (CET)
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 NBaXqZ0EQDx6; Tue, 31 Oct 2017 08:16:27 +0100 (CET)
Received: from [IPv6:2001:470:de0a:1::5ea] (unknown [IPv6:2001:470:de0a:1::5ea]) by mork.alvestrand.no (Postfix) with ESMTPSA id 19D327C03A2; Tue, 31 Oct 2017 08:16:27 +0100 (CET)
To: Jonathan Lennox <jonathan@vidyo.com>, Justin Uberti <juberti@google.com>
Cc: "rtcweb@ietf.org" <rtcweb@ietf.org>
References: <4CB5EF91-8CB2-433F-85E9-A86140CECC62@vidyo.com> <CA+9kkMDJEggHar5JbBb9GaNMBsZjgvO0F2VN5UVObv-3VTzE4w@mail.gmail.com> <CAOJ7v-2FEpidRsFf3Km5XjW5Jj7gXC2h9Pcy_GWOqb_P7jTHQw@mail.gmail.com> <2CFCA859-B941-4AFF-B80A-792509EED6F5@vidyo.com> <7CA6CF4C-6A92-4198-B2E6-10FB5EC6EA5D@vidyo.com>
From: Harald Alvestrand <harald@alvestrand.no>
Message-ID: <4bf1b168-0830-f317-be74-f1cab95c8b47@alvestrand.no>
Date: Tue, 31 Oct 2017 08:16:26 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0
MIME-Version: 1.0
In-Reply-To: <7CA6CF4C-6A92-4198-B2E6-10FB5EC6EA5D@vidyo.com>
Content-Type: text/plain; charset="utf-8"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/rtcweb/yw_4NAu4Sk6iyfQpH6Mswr1C4cA>
Subject: Re: [rtcweb] JSEP: codecs in answer: ordering (was codecs in answer: MUST vs. MAY)
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.22
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: Tue, 31 Oct 2017 07:16:33 -0000

Den 27. okt. 2017 22:05, skrev Jonathan Lennox:
> Another question about JSEP’s codec answer rules.
> 
> The spec currently says:
>>>
>>>            o  Otherwise, the media formats on the m= line MUST be generated in
>>>               the same order as those offered in the current remote description,
>>>               excluding any currently unsupported formats.  Any currently
>>>               available media formats that are not present in the current remote
>>>               description MUST be added after all existing formats.
>>>
>>>
>>>     This is what you do if codec preferences are not set (keep the
>>>     order, add any new ones to the end)
> 
> Why are remotely-unsupported codecs added at the end of the list, rather
> than just listing all locally-supported codecs in the browser’s
> preference order?

I don't read it like that.

The answer consists of:

- The offer's listed codecs that are also supported by the answerer,
possibly rearranged according to codec preference
- The answerer's supported codecs that were not listed in the offer.

These aren't "remotely-unsupported", they are unlisted by the offerer.

If they're really not supported by the offerer, adding them will have no
effect.

If they're supported by the offerer but the offerer chose not to list
them (might happen for instance if one is an inferior mode of a
supported codec, which the offerer did not think was worth mentioning),
listing them before listed codecs would be overriding a strongly stated
preference by the offerer.

I like the current logic.


> 
> My concern is in an SFU conferencing scenario.  Consider the following:
> 
> * Participant 1 joins a conference.  It supports only codec A.
> * Participant 2 joins the conference.  It supports codecs A and B, but
> prefers B.  Since the conference can only do A, if the offer/answer
> exchange goes SFU->Participant, the participant’s answer must list its
> codecs as A, B.
> * Participant 3 joins the conference.  It is the same as Participant 2,
> preferring B to A.
> 
> If participant 1 leaves, the SFU can re-offer to participants 2 and 3;
> but as far as it knows, everyone prefers A to B, so the conference can
> end up in a scenario where everyone’s using a less-preferred codec.

If the SFU offers A, B to participants 2 and 3, and both 2 and 3 prefer
B, they will answer B, A based on local codec preference.

It will have to ask, but is that a big deal?

> 
> I would suggest that instead, the browser’s codec preference order
> always be sent as-is in an answer (unless overridden by the app with
> setCodecPreferences).  This also has the benefit of aligning the
> behavior with and without app codec preferences, rather than having two
> separate behaviors (where the order is fixed if the app has set codec
> preferences, and mirrored otherwise).

I don't have a strong preference here, but do have a strong preference
against holding up the spec if this is the biggest issue left.

> 
> 
> _______________________________________________
> rtcweb mailing list
> rtcweb@ietf.org
> https://www.ietf.org/mailman/listinfo/rtcweb
>