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

Question about sync / async for createOffer and createAnswer

From: Cullen Jennings <fluffy@cisco.com>
Date: Wed, 9 May 2012 09:07:06 -0600
Message-Id: <B70D7DBA-777B-45E8-AE72-B2838F6D5B2E@cisco.com>
Cc: Justin Uberti <juberti@google.com>, Adam Bergkvist <adam.bergkvist@ericsson.com>
To: public-webrtc@w3.org

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 Wednesday, 9 May 2012 15:07:38 UTC

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