W3C home > Mailing lists > Public > public-webrtc@w3.org > May 2012

RE: Question about sync / async for createOffer and createAnswer

From: Ravindran, Parthasarathi <pravindran@sonusnet.com>
Date: Thu, 10 May 2012 06:47:19 +0000
To: Cullen Jennings <fluffy@cisco.com>, "public-webrtc@w3.org" <public-webrtc@w3.org>
CC: Justin Uberti <juberti@google.com>, Adam Bergkvist <adam.bergkvist@ericsson.com>
Message-ID: <387F9047F55E8C42850AD6B3A7A03C6C16033C8F@inba-mail01.sonusnet.com>
Async proposal looks more appropriate as createOffer is equivalent to get capability of the browser and setLocalDescription is based on the policy of the WebRTC application. Based on my Customer Premises Equipment development understanding, it takes time to load the specific codec into DSP based devices and not possible to load all the codec at the same time.


From: Cullen Jennings [mailto:fluffy@cisco.com]
Sent: Wednesday, May 09, 2012 8:37 PM
To: public-webrtc@w3.org
Cc: Justin Uberti; Adam Bergkvist
Subject: Question about sync / async for createOffer and createAnswer

It is clear that in some cases it might take a bit of time to generate the offer in cases where operating system resources, particularly hardware codecs, needed to be acquired. However, if this can happen quickly, then there is no need for async call. The questions is how quickly can this happen and how quick is quick enough. We have two proposal sync, and async.

Sync proposal:

The proposal would be createOffer, and createAnswer, and synchronous and must return in less than 100 ms. Some poking around shows there are devices that would likely take around that amount of time to allocate resources. We have a few questions on this

1) is this long enough or do some devices needed more time?

We are particularly interested in information from mobile devices and devices where the DSP are separate from the main CPU.

2) is 100 ms too long for the JS execution to be blocked?

>From initial conversations with a few folks it seems like that might be the cased but we would like to get more feedback on this. If it is, too long, then we likely need to the async proposal.

Async Proposal

The create offer would take a function something like

pc.createOffer(function (offer) {
  offer = tweakOffer(offer);
  pc.setLocalDescription("offer", offer);
  // ...
}, hints);

The questions here is

3) does this look like an OK way to do the async version ?

Whatever we do to createOffer, we will do the corresponding thing to createAnswer.
Received on Thursday, 10 May 2012 17:40:29 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:28 UTC