Re: [rtcweb] Low Level Javascript API Proposal avail on the webrtc list

Colin Perkins <csp@csperkins.org> Thu, 06 October 2011 22:08 UTC

Return-Path: <csp@csperkins.org>
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 0E4F11F0C6D for <rtcweb@ietfa.amsl.com>; Thu, 6 Oct 2011 15:08:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.556
X-Spam-Level:
X-Spam-Status: No, score=-103.556 tagged_above=-999 required=5 tests=[AWL=0.042, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 FO6I2pzo0LBQ for <rtcweb@ietfa.amsl.com>; Thu, 6 Oct 2011 15:08:12 -0700 (PDT)
Received: from anchor-msapost-1.mail.demon.net (anchor-msapost-1.mail.demon.net [195.173.77.164]) by ietfa.amsl.com (Postfix) with ESMTP id CE5891F0C3B for <rtcweb@ietf.org>; Thu, 6 Oct 2011 15:08:11 -0700 (PDT)
Received: from starkperkins.demon.co.uk ([80.176.158.71] helo=[192.168.0.30]) by anchor-post-1.mail.demon.net with esmtpsa (AUTH csperkins-dwh) (TLSv1:AES128-SHA:128) (Exim 4.69) id 1RBw9y-0002Hc-i5; Thu, 06 Oct 2011 22:11:22 +0000
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: multipart/alternative; boundary=Apple-Mail-1047-329465388
From: Colin Perkins <csp@csperkins.org>
In-Reply-To: <CAD5OKxv6m+fud_whMBQNt9wWC6kYGi31rFY0uB=iUuC_ymVXcQ@mail.gmail.com>
Date: Thu, 6 Oct 2011 23:11:21 +0100
Message-Id: <7F79D20D-42DF-49D0-8D2F-A11ACE3A87C8@csperkins.org>
References: <545388B3-3189-4291-BD1D-52898B888F3E@phonefromhere.com> <CAD5OKxt_3bnODVCWxrrrKVWO3R3Or1FjhMOHwgUzq3-h6dW0LA@mail.gmail.com> <4E8BC0ED.2020001@skype.net> <CAD5OKxv_xO0y+71X6ag-2te6TTey4Z77ezvBuYwS89022rL1hQ@mail.gmail.com> <4E8BDC3B.7000501@skype.net> <CAD5OKxtoePfjm3_-0UxFVh3zgP498M74JCDHp7eok1yqdZy=XQ@mail.gmail.com> <CABRok6=A+b4Q-Gm6BMUF_VOy9i5WUO9BXR+V_2vFu_GqimuDRQ@mail.gmail.com> <CAD5OKxv6m+fud_whMBQNt9wWC6kYGi31rFY0uB=iUuC_ymVXcQ@mail.gmail.com>
To: Roman Shpount <roman@telurix.com>
X-Mailer: Apple Mail (2.1084)
Cc: rtcweb@ietf.org
Subject: Re: [rtcweb] Low Level Javascript API Proposal avail on the webrtc list
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.12
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: <http://www.ietf.org/mail-archive/web/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, 06 Oct 2011 22:08:13 -0000

On 5 Oct 2011, at 18:20, Roman Shpount wrote:
> On Wed, Oct 5, 2011 at 7:00 AM, Neil Stratford <neils@belltower.co.uk>; wrote:
> I'm not sure I understand why this is such a problem. XMPP/Jingle defines it's own mapping, which is a common VoIP protocol that is widely supported. I'd much rather that the JS API is as expressive as possible in codec specific matters - for example even to the point of providing callbacks to the JS on certain codec level events, such as decoding a DTMF digit.
>  
> What we need is some way to expose all possible codec parameter combinations to JavaScript API. MMUSIC/PAYLOAD specifications for codec typically define CODEC parameters and how they are encoded in SDP/MIME content type, but they fall short of defining a way to list all the capabilities.

I'm not convinced that exposing all possible codec parameter combinations is an appropriate goal. There is simply too much flexibility present with many of the codecs, especially in combination, for the signalling to be reasonable if all the flexibility is exposed. Better, I think, for the browser to expose a set of known-reasonable combinations, and parameter ranges, from which the most appropriate choice is picked.

> For instance, there is no way for SILK codec to specify valid bit rates range for a given sampling rate. This means JavaScript would need intimate knowledge of each codec implementation in the browser in order to implement codec negotiation. If a different codec implementation is provided by the browser (for instance SILK codec that supports more restricted bit rates for the same sampling rate), JavaScript will not be able to produce valid negotiation results. As far as I can see, there are two possible solutions: better uniform description of codec capabilities to JavaScript API or delegating at least some portion of codec negotiation to actual codec implementation.
> 
> Again, if it's required I don't see why we can't support asymmetric codecs in the low level API. In my view a lot of this codec manipulation is much better controlled by the JS which has application specific knowledge about how to adapt to given situations than the browser itself. How would you signal to the browser to dynamically lower framerate rather than image size, or colour depth depending on the application use case? Giving the application direct control over codec parameters seems a better option.
> 
> I believe in current API we provide one codec with one set of parameters to the API. We should at least be able to provide two codec groups -- one for transmit/another to receive, with two sets of parameters. Even if we handle all the negotiations in JavaScript, we should be able to provide the result for both directions to the stream (may be with default value for the second codec group to be the same as first since this is a much more common).
> ______________
> Roman Shpount
> _______________________________________________
> rtcweb mailing list
> rtcweb@ietf.org
> https://www.ietf.org/mailman/listinfo/rtcweb



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