Chromebook camera settings don't revert to default ones when closing it. |
||||||
Issue description
Copied from [1]
>I play with a web app that lets me update my camera settings (saturation, brightness, zoom, etc.)
> I close this app
> I lose internet connection / I don't remember website / Web app is down (pick your favorite)
> I can't change back my camera settings!
> Restarting my Chromebook doesn't even work... I'm stuck with these settings ;(
I think the problem is that the settings persist after the WebCam
has been closed.
VideoCaptureDeviceLinux {c,sh}ould restore the default values when
closing it, hence restoring the standard value for other Apps.
[1] https://github.com/w3c/mediacapture-image/issues/104#issuecomment-256912439
,
Nov 23 2016
,
Dec 9 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9b3a179c91492c28c2eaf53daf52d6caebff77a0 commit 9b3a179c91492c28c2eaf53daf52d6caebff77a0 Author: mcasas <mcasas@chromium.org> Date: Fri Dec 09 23:38:01 2016 Image Capture v4l2: reset all user controls to default values when closing device fd This CL adds logic for resetting all User Controls to its default value upon closing the device file descriptor; otherwise, as the bug proves, they persist across camera uses, e.g. the zoom level is unchanged. This would be relatively simple except for the fact that controls come in two types: user controls and camera controls, and that some controls need another one to be set or cleared beforehand (e.g. white_balance_auto must be set to off before white_balance can be set, etc). See [1] for Spec [1] https://www.linuxtv.org/downloads/legacy/video4linux/API/V4L2_API/spec-single/v4l2.html#control BUG= 662616 Review-Url: https://codereview.chromium.org/2479413002 Cr-Commit-Position: refs/heads/master@{#437695} [modify] https://crrev.com/9b3a179c91492c28c2eaf53daf52d6caebff77a0/media/capture/BUILD.gn [modify] https://crrev.com/9b3a179c91492c28c2eaf53daf52d6caebff77a0/media/capture/video/linux/v4l2_capture_delegate.cc [modify] https://crrev.com/9b3a179c91492c28c2eaf53daf52d6caebff77a0/media/capture/video/linux/v4l2_capture_delegate.h [add] https://crrev.com/9b3a179c91492c28c2eaf53daf52d6caebff77a0/media/capture/video/linux/v4l2_capture_delegate_unittest.cc
,
Dec 12 2016
,
Dec 13 2016
This is sadly still not workin for me in Chrome OS 57.2948.0. Steps to reproduce: 1. Go to https://beaufortfrancois.github.io/sandbox/image-capture/playground.html 2. Change camera controls such as brightness, contrast, saturation and sharpness. 3. Close lid. Wait a bit... 4. Open lid. Video is still using my custom camera controls ;( I'm not able to detect some helpful logs. Which file would you need?
,
Dec 13 2016
Good news is that zoom is actually reset ;) Yeah!
,
Dec 13 2016
#5: ouch, the code in #3 resets controls upon closing of the VideoCaptureDevice; I believe we just go away when Chrome crashes and/or the user closes the lid. I'll move the logic to the ctor/AllocateAndStart() method to guarantee that the first camera opening gets the correct values. Alternatively, would it make sense to have in the Spec: - a resetSettings() method to return all controls to default - a |default| value in the MediaSettingsRange [1] so that the WebApp can default values on its own terms and timing? [1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/imagecapture/MediaSettingsRange.idl?q=MediaSettingsRange.idl&sq=package:chromium&dr
,
Dec 14 2016
Follow up CL under review: https://crrev.com/2568883005/
,
Dec 14 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7c87eca4bdc531431eafa66c37e9468b1ccb5ca6 commit 7c87eca4bdc531431eafa66c37e9468b1ccb5ca6 Author: mcasas <mcasas@chromium.org> Date: Wed Dec 14 02:05:14 2016 ImageCapture v4l2: reset user controls when opening the device ToT resets the control values to their default upon StopAndDeallocate() of the device, but, as the bug says, sometimes Chrome is shut down unexpectedly or -shivers- crashes. This CL moves the resetting to AllocateAndStart() method. BUG= 662616 Review-Url: https://codereview.chromium.org/2568883005 Cr-Commit-Position: refs/heads/master@{#438389} [modify] https://crrev.com/7c87eca4bdc531431eafa66c37e9468b1ccb5ca6/media/capture/video/linux/v4l2_capture_delegate.cc
,
Dec 14 2016
fbeaufort@ can you try verifying again? Thanks!
,
Dec 14 2016
,
Dec 23 2016
Verified in Chrome Canary 57.0.2958.0. Thank you! QQ: How is that going to work for Chrome OS devices with no lid such as Chromebox and Chromebit?
,
Jan 4 2017
#12: controls are resetted every time the underlying device is (re)opened, so if you, e.g. close a tab with an active capture on it and reopen it afterwards, that should find the values back to their defaults as well. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by mcasas@chromium.org
, Nov 7 2016