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

Side by Side Diff: media/capture/video/fake_video_capture_device.cc

Issue 2301043006: Image Capture: wire RedEyeReduction getter (Closed)
Patch Set: Removed superfluous builder.setRedEyeReduction(false); Created 4 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/fake_video_capture_device.h" 5 #include "media/capture/video/fake_video_capture_device.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 photo_capabilities->zoom->max = kMaxZoom; 199 photo_capabilities->zoom->max = kMaxZoom;
200 photo_capabilities->zoom->min = kMinZoom; 200 photo_capabilities->zoom->min = kMinZoom;
201 photo_capabilities->focus_mode = mojom::MeteringMode::NONE; 201 photo_capabilities->focus_mode = mojom::MeteringMode::NONE;
202 photo_capabilities->exposure_mode = mojom::MeteringMode::NONE; 202 photo_capabilities->exposure_mode = mojom::MeteringMode::NONE;
203 photo_capabilities->exposure_compensation = mojom::Range::New(); 203 photo_capabilities->exposure_compensation = mojom::Range::New();
204 photo_capabilities->exposure_compensation->current = 0; 204 photo_capabilities->exposure_compensation->current = 0;
205 photo_capabilities->exposure_compensation->max = 0; 205 photo_capabilities->exposure_compensation->max = 0;
206 photo_capabilities->exposure_compensation->min = 0; 206 photo_capabilities->exposure_compensation->min = 0;
207 photo_capabilities->white_balance_mode = mojom::MeteringMode::NONE; 207 photo_capabilities->white_balance_mode = mojom::MeteringMode::NONE;
208 photo_capabilities->fill_light_mode = mojom::FillLightMode::NONE; 208 photo_capabilities->fill_light_mode = mojom::FillLightMode::NONE;
209 photo_capabilities->red_eye_reduction = false;
209 callback.Run(std::move(photo_capabilities)); 210 callback.Run(std::move(photo_capabilities));
210 } 211 }
211 212
212 void FakeVideoCaptureDevice::SetPhotoOptions(mojom::PhotoSettingsPtr settings, 213 void FakeVideoCaptureDevice::SetPhotoOptions(mojom::PhotoSettingsPtr settings,
213 SetPhotoOptionsCallback callback) { 214 SetPhotoOptionsCallback callback) {
214 if (settings->has_zoom) 215 if (settings->has_zoom)
215 current_zoom_ = std::max(kMinZoom, std::min(settings->zoom, kMaxZoom)); 216 current_zoom_ = std::max(kMinZoom, std::min(settings->zoom, kMaxZoom));
216 callback.Run(true); 217 callback.Run(true);
217 } 218 }
218 219
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 // Don't accumulate any debt if we are lagging behind - just post the next 318 // Don't accumulate any debt if we are lagging behind - just post the next
318 // frame immediately and continue as normal. 319 // frame immediately and continue as normal.
319 const base::TimeTicks next_execution_time = 320 const base::TimeTicks next_execution_time =
320 std::max(current_time, expected_execution_time + frame_interval); 321 std::max(current_time, expected_execution_time + frame_interval);
321 const base::TimeDelta delay = next_execution_time - current_time; 322 const base::TimeDelta delay = next_execution_time - current_time;
322 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( 323 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
323 FROM_HERE, base::Bind(next_capture, next_execution_time), delay); 324 FROM_HERE, base::Bind(next_capture, next_execution_time), delay);
324 } 325 }
325 326
326 } // namespace media 327 } // namespace media
OLDNEW
« no previous file with comments | « media/capture/video/android/video_capture_device_android.cc ('k') | media/capture/video/fake_video_capture_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698