New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 12 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Aug 2017
Cc:
Components:
NextAction: ----
OS: ----
Pri: 2
Type: Enhancement



Sign in to add a comment

Using indexes to identify RecordingDevices/etc is error-prone

Reported by randell....@gmail.com, Nov 15 2012

Issue description

(See also  Issue 296 )

Right now a bunch of interfaces use an index to key what device to use, instead of a uniqueId.  (Note  issue 296 , which shows that uniqueId often isn't unique, but that's a separate problem that would block fixing this.)

If a device is added or removed between when the application enumerates the devices and when it calls SetRecordingDevice(index) (as an example), you may end up recording from the wrong device.

 
Project Member

Comment 1 by kjellander@webrtc.org, Nov 20 2012

Labels: webrtc-feedback
Project Member

Comment 2 by kjellander@webrtc.org, Nov 20 2012

Labels: -webrtc-feedback
Owner: niklas.enbom@webrtc.org
Project Member

Comment 3 by niklas.enbom@webrtc.org, Nov 20 2012

Labels: -Type-Bug Type-Enhancement
Owner: xians@webrtc.org
Shijing, can you comment on whether this is a problem for Chrome, and if not how we solve it?

Comment 4 by xians@webrtc.org, Nov 20 2012

This is indeed a problem for webrtc but not for chrome since chrome is using its own low level IO. (In Chrome, we learnt from the mistake that we use the unique id string to select the device)

I am not sure if we can fix this webrtc problem since the API is used by multiple products, and any modification to that API will be very sensitive. 
Isn't there a problem using UniqueId to select a device, the "Unique IDs" returned often aren't unique?  (For example on Mac/Linux, the webrtc.org code doesn't even try to provide a UniqueId for audio devices.)  Or is that code bypassed too?

Can you provide link to the code in Chromium that's bypassing the indexes and UniqueIds?  I was looking over the code and while I see some alternate implementations to webrtc.org in parts, I think I missed that.  Thanks.

In any case, this API is fundamentally broken (witness  Issue 296 ).  If you can't change it, you should extend or replace it and deprecate this one.  (Guarantee UniqueIds, then have an alternate set of APIs that take those instead of indexes - one way to do it; not the only way.)
Project Member

Comment 6 by kjellander@webrtc.org, Aug 27 2013

Labels: Dev-QAReview-NA

Comment 7 by vrk@webrtc.org, Dec 17 2014

Labels: Area-Audio
Project Member

Comment 8 by tina.legrand@webrtc.org, Dec 18 2014

Labels: -Area-Audio Area-GetUserMedia
Project Member

Comment 9 by kjellander@webrtc.org, Dec 1 2016

Owner: ----
Still a valid bug? Should it be moved to crbug.com?
Project Member

Comment 10 by guidou@webrtc.org, Aug 25 2017

Status: WontFix (was: Unconfirmed)
CLosing as obsolete.

Sign in to add a comment