New issue
Advanced search Search tips

Issue 910061 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Chrome
Pri: 3
Type: Bug



Sign in to add a comment

No drop-down menu in camera settings

Project Member Reported by shik@chromium.org, Nov 29

Issue description

Chrome Version: 70.0.3538.110 / 72.0.3626.0
OS: Linux / Chrome OS

What steps will reproduce the problem?
(1) Plug a USB camera if there is no camera on the machine
(2) Close all chrome tabs
(3) Reboot
(4) Open Chrome
(5) Open chrome://settings/content/camera

What is the expected result?
There is a drop-down menu to select the default camera device.

What happens instead?
There is no drop-down menu. The drop-down menu appears if I open a webpage that uses camera or replug the camera when the setting page is open.


 
Owner: guidou@chromium.org
Status: Assigned (was: Untriaged)
I'll take a look.
Labels: Needs-Feedback
I tried on Linux ToT and I get the dropdown.
Can you provide the output you get from
https://guidou.github.io/enumdemo.html

and
https://guidou.github.io/enumdemo4.html

I don't have physical access to the devices in #1. Here is the output of enumdemo4.html (enumdemo.html is basically the same but without groupId) on another Chromebook with Chrome 69.0.3497.95, and is simply using Linux VCD iirc.

Devices:
1 - audioinput - default - "Default - Internal Mic" - c271017b382ced808caa41aa89a75c8916130c15675ccc8094f352517e9a7d2d
2 - audioinput - 5bbf63a511b49504bddc008d7adabf75f9d6683cba211113eb50f1a9b4652158 - "Internal Mic" - c271017b382ced808caa41aa89a75c8916130c15675ccc8094f352517e9a7d2d
3 - videoinput - 8c44ffdd2d1da884e78d353b6a6c272c498f44510500f56339fa3c8d7b83f20f - "HP Truevision HD (0408:5060)" - 33c505074ee15ee623885f7313455b84706970d6ccc8fff0a7a47dffc5bdca9a
4 - audiooutput - default - "Default - HDMI/DP, pcm=4 Jack" - 12f81f81f26e733053145cdb67abbe5a35a120195329dfd6d830503eddb46d04
5 - audiooutput - 4321d7470d565729ee16e2cf69aeecb2b42861427d0fdcc4cf21578cea3c234d - "Speaker" - 37089db83199027c5ed1886b21675bfdf52955150c5c7e3a78da40e4f570f37e
6 - audiooutput - bb27297170b73643b5fdf022099dfa1bc2bd19699655ec62433b88c3f70c18d6 - "HDMI/DP, pcm=4 Jack" - 12f81f81f26e733053145cdb67abbe5a35a120195329dfd6d830503eddb46d04


Some conjecture based on a quick glance of codesearch:
It just uses last cached result without enumerating.

* The JS part of settings: https://cs.chromium.org/chromium/src/chrome/browser/resources/settings/site_settings/media_picker.js?l=32&rcl=fb181327ccbc75581d8ce46148c45ec7746f14a6

* The C++ part of updateDevicesMenu: https://cs.chromium.org/chromium/src/chrome/browser/ui/webui/settings/settings_media_devices_selection_handler.cc?l=108&rcl=f6e075c54c8bc6130d49c09ad3df6944376ccba4

* The cached result is fired in updateDevicesMenu like this:

+ MediaDevicesSelectionHandler::GetDefaultCaptureDevices
++ MediaDevicesSelectionHandler::UpdateDevicesMenuForType(VIDEO)
++ devices = ...->GetVideoCaptureDevices(); 
+++ MediaCaptureDevicesDispatcher::GetVideoCaptureDevices
++++ MediaCaptureDevicesImpl::GetVideoCaptureDevices
++++ return video_devices_;
++ UpdateDevicesMenu(type, devices);

I don't see the code that will enumerate devices, and the comment of |video_devices_| is "A list of cached video capture devices". So maybe it's the reason that there is no drop-down menu if no body enumerated the devices?
https://cs.chromium.org/chromium/src/content/browser/renderer_host/media/media_capture_devices_impl.h?l=46&rcl=26ba53732616bdbbe82851b1b175d554ebb9b37c
The cached |video_devices_| are updated from a path that starts in MediaDevicesManager here:
https://cs.chromium.org/chromium/src/content/browser/renderer_host/media/media_devices_manager.cc?gsn=MediaDevicesManager&g=0&l=848

We have plans to remove the cache on the UI side (see bug 843948), but so far we had not seen bugs due to it. Maybe it is caused by recent changes in the video capture service.

shik@: since you seem to have 100% reproducibility, do you think you can try a bisect (see https://www.chromium.org/developers/bisect-builds-py)

Sign in to add a comment