Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Issue 2479413002: Image Capture v4l2: reset all user controls to default values when closing device fd (Closed)

Created:
4 years, 1 month ago by mcasas
Modified:
4 years ago
Reviewers:
emircan
CC:
chromium-reviews, posciak+watch_chromium.org, feature-media-reviews_chromium.org, xjz+watch_chromium.org, mcasas+watch+vc_chromium.org, miu+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/9b3a179c91492c28c2eaf53daf52d6caebff77a0 Cr-Commit-Position: refs/heads/master@{#437695}

Patch Set 1 #

Total comments: 12

Patch Set 2 : emircan@ comments and using while-loops ISO for-loops #

Total comments: 2

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+395 lines, -1 line) Patch
M media/capture/BUILD.gn View 1 1 chunk +1 line, -0 lines 0 comments Download
M media/capture/video/linux/v4l2_capture_delegate.h View 2 chunks +3 lines, -1 line 0 comments Download
M media/capture/video/linux/v4l2_capture_delegate.cc View 1 2 4 chunks +134 lines, -0 lines 0 comments Download
A media/capture/video/linux/v4l2_capture_delegate_unittest.cc View 1 1 chunk +257 lines, -0 lines 0 comments Download

Messages

Total messages: 31 (23 generated)
mcasas
emircan@ can you PTAL?
4 years ago (2016-12-06 19:31:12 UTC) #8
emircan
Looking good, minor comments. https://codereview.chromium.org/2479413002/diff/100001/media/capture/video/linux/v4l2_capture_delegate.cc File media/capture/video/linux/v4l2_capture_delegate.cc (right): https://codereview.chromium.org/2479413002/diff/100001/media/capture/video/linux/v4l2_capture_delegate.cc#newcode56 media/capture/video/linux/v4l2_capture_delegate.cc:56: const int kMaxIOCtrlRetries = 5; ...
4 years ago (2016-12-07 21:45:31 UTC) #11
mcasas
emircan@ ptal (never mind the bots if red: waterfall closed) https://codereview.chromium.org/2479413002/diff/100001/media/capture/video/linux/v4l2_capture_delegate.cc File media/capture/video/linux/v4l2_capture_delegate.cc (right): https://codereview.chromium.org/2479413002/diff/100001/media/capture/video/linux/v4l2_capture_delegate.cc#newcode56 ...
4 years ago (2016-12-08 23:46:52 UTC) #15
emircan
lgtm % nit https://codereview.chromium.org/2479413002/diff/140001/media/capture/video/linux/v4l2_capture_delegate.cc File media/capture/video/linux/v4l2_capture_delegate.cc (right): https://codereview.chromium.org/2479413002/diff/140001/media/capture/video/linux/v4l2_capture_delegate.cc#newcode212 media/capture/video/linux/v4l2_capture_delegate.cc:212: while (0 == HANDLE_EINTR(ioctl(device_fd, VIDIOC_QUERYCTRL, &range))) ...
4 years ago (2016-12-09 19:19:37 UTC) #18
mcasas
https://codereview.chromium.org/2479413002/diff/140001/media/capture/video/linux/v4l2_capture_delegate.cc File media/capture/video/linux/v4l2_capture_delegate.cc (right): https://codereview.chromium.org/2479413002/diff/140001/media/capture/video/linux/v4l2_capture_delegate.cc#newcode212 media/capture/video/linux/v4l2_capture_delegate.cc:212: while (0 == HANDLE_EINTR(ioctl(device_fd, VIDIOC_QUERYCTRL, &range))) { On 2016/12/09 ...
4 years ago (2016-12-09 21:01:17 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2479413002/160001
4 years ago (2016-12-09 23:05:19 UTC) #26
commit-bot: I haz the power
Committed patchset #3 (id:160001)
4 years ago (2016-12-09 23:38:40 UTC) #29
commit-bot: I haz the power
4 years ago (2016-12-12 14:58:29 UTC) #31
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/9b3a179c91492c28c2eaf53daf52d6caebff77a0
Cr-Commit-Position: refs/heads/master@{#437695}

Powered by Google App Engine
This is Rietveld 408576698