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

Unified Diff: media/capture/video/linux/v4l2_capture_delegate.cc

Issue 2482983002: MediaSettingsRange: s/long/double/ in MediaSettingsRange.idl and PhotoCapabilities.idl (Closed)
Patch Set: s/float/double/ in fake_video_capture_device.* Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: media/capture/video/linux/v4l2_capture_delegate.cc
diff --git a/media/capture/video/linux/v4l2_capture_delegate.cc b/media/capture/video/linux/v4l2_capture_delegate.cc
index 987f5df3876c91f44c50929c6aad95b930bf2502..8b48b8a1f087cf44a44001c78d1b8a4969a17e9c 100644
--- a/media/capture/video/linux/v4l2_capture_delegate.cc
+++ b/media/capture/video/linux/v4l2_capture_delegate.cc
@@ -52,10 +52,6 @@ const int kMjpegHeight = 480;
// Typical framerate, in fps
const int kTypicalFramerate = 30;
-// Constant used to multiply zoom values to avoid using floating point. Used to
-// scale both the readings (min, max, current) and the value to set it to.
-const int kZoomMultiplier = 100;
-
// V4L2 color formats supported by V4L2CaptureDelegate derived classes.
// This list is ordered by precedence of use -- but see caveats for MJPEG.
static struct {
@@ -447,9 +443,9 @@ void V4L2CaptureDelegate::SetPhotoOptions(
if (settings->has_zoom) {
v4l2_control zoom_current = {};
zoom_current.id = V4L2_CID_ZOOM_ABSOLUTE;
- zoom_current.value = settings->zoom / kZoomMultiplier;
+ zoom_current.value = settings->zoom;
if (HANDLE_EINTR(ioctl(device_fd_.get(), VIDIOC_S_CTRL, &zoom_current)) < 0)
- DPLOG(ERROR) << "setting zoom to " << settings->zoom / kZoomMultiplier;
+ DPLOG(ERROR) << "setting zoom to " << settings->zoom;
}
if (settings->has_white_balance_mode &&
« no previous file with comments | « media/capture/video/fake_video_capture_device_unittest.cc ('k') | media/mojo/interfaces/image_capture.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698