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

Side by Side Diff: media/capture/video/linux/v4l2_capture_delegate_unittest.cc

Issue 2904503002: V4L2: avoid resetting zoom controls (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <sys/fcntl.h> 5 #include <sys/fcntl.h>
6 #include <sys/ioctl.h> 6 #include <sys/ioctl.h>
7 7
8 #include "base/files/file_enumerator.h" 8 #include "base/files/file_enumerator.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/test/scoped_task_environment.h" 10 #include "base/test/scoped_task_environment.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 case V4L2_CID_AUTO_WHITE_BALANCE: 50 case V4L2_CID_AUTO_WHITE_BALANCE:
51 case V4L2_CID_EXPOSURE_AUTO: 51 case V4L2_CID_EXPOSURE_AUTO:
52 case V4L2_CID_EXPOSURE_AUTO_PRIORITY: 52 case V4L2_CID_EXPOSURE_AUTO_PRIORITY:
53 case V4L2_CID_FOCUS_AUTO: 53 case V4L2_CID_FOCUS_AUTO:
54 case V4L2_CID_PAN_RELATIVE: 54 case V4L2_CID_PAN_RELATIVE:
55 case V4L2_CID_TILT_RELATIVE: 55 case V4L2_CID_TILT_RELATIVE:
56 case V4L2_CID_PAN_RESET: 56 case V4L2_CID_PAN_RESET:
57 case V4L2_CID_TILT_RESET: 57 case V4L2_CID_TILT_RESET:
58 case V4L2_CID_PAN_ABSOLUTE: 58 case V4L2_CID_PAN_ABSOLUTE:
59 case V4L2_CID_TILT_ABSOLUTE: 59 case V4L2_CID_TILT_ABSOLUTE:
60 case V4L2_CID_ZOOM_ABSOLUTE:
61 case V4L2_CID_ZOOM_RELATIVE:
62 case V4L2_CID_ZOOM_CONTINUOUS:
60 case V4L2_CID_PAN_SPEED: 63 case V4L2_CID_PAN_SPEED:
61 case V4L2_CID_TILT_SPEED: 64 case V4L2_CID_TILT_SPEED:
62 case V4L2_CID_PANTILT_CMD: 65 case V4L2_CID_PANTILT_CMD:
63 return true; 66 return true;
64 } 67 }
65 return false; 68 return false;
66 } 69 }
67 70
68 static void SetControlsToMaxValues(int device_fd) { 71 static void SetControlsToMaxValues(int device_fd) {
69 // Set V4L2_CID_AUTO_WHITE_BALANCE to false first. 72 // Set V4L2_CID_AUTO_WHITE_BALANCE to false first.
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 // their |default_value|s. 276 // their |default_value|s.
274 { 277 {
275 base::ScopedFD device_fd( 278 base::ScopedFD device_fd(
276 HANDLE_EINTR(open(device_descriptor_.device_id.c_str(), O_RDWR))); 279 HANDLE_EINTR(open(device_descriptor_.device_id.c_str(), O_RDWR)));
277 ASSERT_TRUE(device_fd.is_valid()); 280 ASSERT_TRUE(device_fd.is_valid());
278 VerifyUserControlsAreSetToDefaultValues(device_fd.get()); 281 VerifyUserControlsAreSetToDefaultValues(device_fd.get());
279 } 282 }
280 } 283 }
281 284
282 }; // namespace media 285 }; // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698