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

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

Issue 2787933002: ImageCapture: separate fillLightMode, redEyeReduction and Torch (Closed)
Patch Set: Created 3 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "media/capture/video/linux/v4l2_capture_delegate.h" 5 #include "media/capture/video/linux/v4l2_capture_delegate.h"
6 6
7 #include <linux/version.h> 7 #include <linux/version.h>
8 #include <linux/videodev2.h> 8 #include <linux/videodev2.h>
9 #include <poll.h> 9 #include <poll.h>
10 #include <sys/fcntl.h> 10 #include <sys/fcntl.h>
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 : mojom::MeteringMode::MANUAL; 581 : mojom::MeteringMode::MANUAL;
582 } 582 }
583 583
584 photo_capabilities->color_temperature = RetrieveUserControlRange( 584 photo_capabilities->color_temperature = RetrieveUserControlRange(
585 device_fd_.get(), V4L2_CID_WHITE_BALANCE_TEMPERATURE); 585 device_fd_.get(), V4L2_CID_WHITE_BALANCE_TEMPERATURE);
586 586
587 photo_capabilities->iso = mojom::Range::New(); 587 photo_capabilities->iso = mojom::Range::New();
588 photo_capabilities->height = mojom::Range::New(); 588 photo_capabilities->height = mojom::Range::New();
589 photo_capabilities->width = mojom::Range::New(); 589 photo_capabilities->width = mojom::Range::New();
590 photo_capabilities->exposure_compensation = mojom::Range::New(); 590 photo_capabilities->exposure_compensation = mojom::Range::New();
591 photo_capabilities->fill_light_mode = mojom::FillLightMode::NONE; 591 photo_capabilities->red_eye_reduction = mojom::RedEyeReduction::NEVER;
592 photo_capabilities->red_eye_reduction = false; 592 photo_capabilities->torch = false;
593 593
594 photo_capabilities->brightness = 594 photo_capabilities->brightness =
595 RetrieveUserControlRange(device_fd_.get(), V4L2_CID_BRIGHTNESS); 595 RetrieveUserControlRange(device_fd_.get(), V4L2_CID_BRIGHTNESS);
596 photo_capabilities->contrast = 596 photo_capabilities->contrast =
597 RetrieveUserControlRange(device_fd_.get(), V4L2_CID_CONTRAST); 597 RetrieveUserControlRange(device_fd_.get(), V4L2_CID_CONTRAST);
598 photo_capabilities->saturation = 598 photo_capabilities->saturation =
599 RetrieveUserControlRange(device_fd_.get(), V4L2_CID_SATURATION); 599 RetrieveUserControlRange(device_fd_.get(), V4L2_CID_SATURATION);
600 photo_capabilities->sharpness = 600 photo_capabilities->sharpness =
601 RetrieveUserControlRange(device_fd_.get(), V4L2_CID_SHARPNESS); 601 RetrieveUserControlRange(device_fd_.get(), V4L2_CID_SHARPNESS);
602 602
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 DLOG(ERROR) << "Error mmap()ing a V4L2 buffer into userspace"; 816 DLOG(ERROR) << "Error mmap()ing a V4L2 buffer into userspace";
817 return false; 817 return false;
818 } 818 }
819 start_ = static_cast<uint8_t*>(start); 819 start_ = static_cast<uint8_t*>(start);
820 length_ = buffer.length; 820 length_ = buffer.length;
821 payload_size_ = 0; 821 payload_size_ = 0;
822 return true; 822 return true;
823 } 823 }
824 824
825 } // namespace media 825 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698