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

Side by Side Diff: media/capture/video/android/video_capture_device_android.cc

Issue 2806743003: Image Capture: split {white_balance,exposure,focus}_modes into current_ and supported_ (Closed)
Patch Set: reillyg@ comment and fix in v4l2_capture_delegate.cc 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/android/video_capture_device_android.h" 5 #include "media/capture/video/android/video_capture_device_android.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 JNIEnv* env = AttachCurrentThread(); 497 JNIEnv* env = AttachCurrentThread();
498 498
499 PhotoCapabilities caps( 499 PhotoCapabilities caps(
500 Java_VideoCapture_getPhotoCapabilities(env, j_capture_)); 500 Java_VideoCapture_getPhotoCapabilities(env, j_capture_));
501 501
502 // TODO(mcasas): Manual member copying sucks, consider adding typemapping from 502 // TODO(mcasas): Manual member copying sucks, consider adding typemapping from
503 // PhotoCapabilities to mojom::PhotoCapabilitiesPtr, https://crbug.com/622002. 503 // PhotoCapabilities to mojom::PhotoCapabilitiesPtr, https://crbug.com/622002.
504 mojom::PhotoCapabilitiesPtr photo_capabilities = 504 mojom::PhotoCapabilitiesPtr photo_capabilities =
505 mojom::PhotoCapabilities::New(); 505 mojom::PhotoCapabilities::New();
506 506
507 photo_capabilities->white_balance_mode = 507 // TODO(mcasas): Update |supported_{white_balance,exposure,focus}_modes| as
508 // well, https://crbug.com/700607.
509 photo_capabilities->current_white_balance_mode =
508 ToMojomMeteringMode(caps.getWhiteBalanceMode()); 510 ToMojomMeteringMode(caps.getWhiteBalanceMode());
509 photo_capabilities->exposure_mode = 511 photo_capabilities->current_exposure_mode =
510 ToMojomMeteringMode(caps.getExposureMode()); 512 ToMojomMeteringMode(caps.getExposureMode());
511 photo_capabilities->focus_mode = ToMojomMeteringMode(caps.getFocusMode()); 513 photo_capabilities->current_focus_mode =
514 ToMojomMeteringMode(caps.getFocusMode());
512 515
513 photo_capabilities->exposure_compensation = mojom::Range::New(); 516 photo_capabilities->exposure_compensation = mojom::Range::New();
514 photo_capabilities->exposure_compensation->current = 517 photo_capabilities->exposure_compensation->current =
515 caps.getCurrentExposureCompensation(); 518 caps.getCurrentExposureCompensation();
516 photo_capabilities->exposure_compensation->max = 519 photo_capabilities->exposure_compensation->max =
517 caps.getMaxExposureCompensation(); 520 caps.getMaxExposureCompensation();
518 photo_capabilities->exposure_compensation->min = 521 photo_capabilities->exposure_compensation->min =
519 caps.getMinExposureCompensation(); 522 caps.getMinExposureCompensation();
520 photo_capabilities->exposure_compensation->step = 523 photo_capabilities->exposure_compensation->step =
521 caps.getStepExposureCompensation(); 524 caps.getStepExposureCompensation();
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 settings->has_exposure_compensation, exposure_compensation, 631 settings->has_exposure_compensation, exposure_compensation,
629 static_cast<int>(white_balance_mode), iso, 632 static_cast<int>(white_balance_mode), iso,
630 settings->has_red_eye_reduction, settings->red_eye_reduction, 633 settings->has_red_eye_reduction, settings->red_eye_reduction,
631 static_cast<int>(fill_light_mode), settings->has_torch, settings->torch, 634 static_cast<int>(fill_light_mode), settings->has_torch, settings->torch,
632 color_temperature); 635 color_temperature);
633 636
634 callback.Run(true); 637 callback.Run(true);
635 } 638 }
636 639
637 } // namespace media 640 } // namespace media
OLDNEW
« no previous file with comments | « media/capture/mojo/image_capture.mojom ('k') | media/capture/video/fake_video_capture_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698