| OLD | NEW |
| 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 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 caps.getCurrentExposureCompensation(); | 528 caps.getCurrentExposureCompensation(); |
| 529 photo_capabilities->exposure_compensation->max = | 529 photo_capabilities->exposure_compensation->max = |
| 530 caps.getMaxExposureCompensation(); | 530 caps.getMaxExposureCompensation(); |
| 531 photo_capabilities->exposure_compensation->min = | 531 photo_capabilities->exposure_compensation->min = |
| 532 caps.getMinExposureCompensation(); | 532 caps.getMinExposureCompensation(); |
| 533 photo_capabilities->white_balance_mode = | 533 photo_capabilities->white_balance_mode = |
| 534 ToMojomMeteringMode(caps.getWhiteBalanceMode()); | 534 ToMojomMeteringMode(caps.getWhiteBalanceMode()); |
| 535 photo_capabilities->fill_light_mode = | 535 photo_capabilities->fill_light_mode = |
| 536 ToMojomFillLightMode(caps.getFillLightMode()); | 536 ToMojomFillLightMode(caps.getFillLightMode()); |
| 537 photo_capabilities->red_eye_reduction = caps.getRedEyeReduction(); | 537 photo_capabilities->red_eye_reduction = caps.getRedEyeReduction(); |
| 538 | 538 photo_capabilities->color_temperature = mojom::Range::New(); |
| 539 photo_capabilities->color_temperature->current = |
| 540 caps.getCurrentColorTemperature(); |
| 541 photo_capabilities->color_temperature->max = caps.getMaxColorTemperature(); |
| 542 photo_capabilities->color_temperature->min = caps.getMinColorTemperature(); |
| 539 callback.Run(std::move(photo_capabilities)); | 543 callback.Run(std::move(photo_capabilities)); |
| 540 } | 544 } |
| 541 | 545 |
| 542 void VideoCaptureDeviceAndroid::DoSetPhotoOptions( | 546 void VideoCaptureDeviceAndroid::DoSetPhotoOptions( |
| 543 mojom::PhotoSettingsPtr settings, | 547 mojom::PhotoSettingsPtr settings, |
| 544 SetPhotoOptionsCallback callback) { | 548 SetPhotoOptionsCallback callback) { |
| 545 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 549 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 546 #if DCHECK_IS_ON() | 550 #if DCHECK_IS_ON() |
| 547 { | 551 { |
| 548 base::AutoLock lock(lock_); | 552 base::AutoLock lock(lock_); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 settings->has_fill_light_mode | 592 settings->has_fill_light_mode |
| 589 ? ToAndroidFillLightMode(settings->fill_light_mode) | 593 ? ToAndroidFillLightMode(settings->fill_light_mode) |
| 590 : PhotoCapabilities::AndroidFillLightMode::NOT_SET; | 594 : PhotoCapabilities::AndroidFillLightMode::NOT_SET; |
| 591 | 595 |
| 592 Java_VideoCapture_setPhotoOptions( | 596 Java_VideoCapture_setPhotoOptions( |
| 593 env, j_capture_, zoom, static_cast<int>(focus_mode), | 597 env, j_capture_, zoom, static_cast<int>(focus_mode), |
| 594 static_cast<int>(exposure_mode), width, height, points_of_interest, | 598 static_cast<int>(exposure_mode), width, height, points_of_interest, |
| 595 settings->has_exposure_compensation, exposure_compensation, | 599 settings->has_exposure_compensation, exposure_compensation, |
| 596 static_cast<int>(white_balance_mode), iso, | 600 static_cast<int>(white_balance_mode), iso, |
| 597 settings->has_red_eye_reduction, settings->red_eye_reduction, | 601 settings->has_red_eye_reduction, settings->red_eye_reduction, |
| 598 static_cast<int>(fill_light_mode)); | 602 static_cast<int>(fill_light_mode), |
| 603 settings->has_color_temperature ? settings->color_temperature : 0); |
| 599 | 604 |
| 600 callback.Run(true); | 605 callback.Run(true); |
| 601 } | 606 } |
| 602 | 607 |
| 603 } // namespace media | 608 } // namespace media |
| OLD | NEW |