Closed Bug 1637319 Opened 4 years ago Closed 4 years ago

all webcams are listed twice on Linux

Categories

(Core :: WebRTC: Audio/Video, defect, P3)

75 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox-esr68 --- wontfix
firefox76 --- wontfix
firefox77 --- wontfix
firefox78 --- fixed

People

(Reporter: robert, Assigned: dminor)

References

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0

Steps to reproduce:

  1. Go to https://mozilla.github.io/webrtc-landing/gum_test.html
  2. Click on Camera
  3. Notice that all webcams are shown twice (double) on Linux

Actual results:

All webcams are shown twice (see screenshot attached).

Expected results:

Every webcam should be listed only once.

Firefox must filter the list of webcam devices according to the device capabilities. This topic has been discussed in the Kernel Bugzilla. See this comment:

https://bugzilla.kernel.org/show_bug.cgi?id=199575#c2

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → WebRTC: Audio/Video
Product: Firefox → Core

Thank you for the bug report!

As far as I can tell, this bug is also present in the upstream libwebrtc video capture code. Chrome does not seem to be affected, I'm guessing they're using the video capture implementation here [1] rather than the one in libwebrtc. We should probably fix upstream libwebrtc and then backport to Firefox.

[1] https://source.chromium.org/chromium/chromium/src/+/master:media/capture/video/linux/video_capture_device_factory_linux.cc;l=259

Assignee: nobody → dminor
Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3

I found that Google Chrome 81.0.4044.138 on Linux is also affected.

(In reply to robert from comment #3)

I found that Google Chrome 81.0.4044.138 on Linux is also affected.

Not true. I mixed up bug report numbers. Sorry for the noise.

The side effect of not filtering on V4L2_CAP_VIDEO_CAPTURE is that every device
is enumerated twice. Because we look up devices by name, and the device that
supports V4L2_CAP_VIDEO_CAPTURE seems to always appear first in /dev/video,
this does not seem to end up with us ever choosing an inappropriate device. We
might get away with just filtering device names from the list, but if the order
of devices ever changed in /dev/video there could be problems.

Try job here: https://treeherder.mozilla.org/#/jobs?repo=try&author=dminor%40mozilla.com I meant to only run linux builds, but messed up the try fuzzy syntax.

Pushed by dminor@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/33facf191f23 Only enumerate capture devices on Linux that support V4L2_CAP_VIDEO_CAPTURE; r=ng
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
No longer depends on: 1646904
Regressions: 1650572
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: