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

Side by Side Diff: media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera.java

Issue 2842103002: Image Capture: two small nits (Closed)
Patch Set: reworded comment on supported exposure modes Created 3 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 package org.chromium.media; 5 package org.chromium.media;
6 6
7 import android.annotation.TargetApi; 7 import android.annotation.TargetApi;
8 import android.content.Context; 8 import android.content.Context;
9 import android.graphics.ImageFormat; 9 import android.graphics.ImageFormat;
10 import android.graphics.Rect; 10 import android.graphics.Rect;
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 jniFocusMode = AndroidMeteringMode.CONTINUOUS; 526 jniFocusMode = AndroidMeteringMode.CONTINUOUS;
527 } else if (focusMode.equals(android.hardware.Camera.Parameters.FOCUS_MOD E_AUTO) 527 } else if (focusMode.equals(android.hardware.Camera.Parameters.FOCUS_MOD E_AUTO)
528 || focusMode.equals(android.hardware.Camera.Parameters.FOCUS_MOD E_MACRO)) { 528 || focusMode.equals(android.hardware.Camera.Parameters.FOCUS_MOD E_MACRO)) {
529 jniFocusMode = AndroidMeteringMode.SINGLE_SHOT; 529 jniFocusMode = AndroidMeteringMode.SINGLE_SHOT;
530 } else if (focusMode.equals(android.hardware.Camera.Parameters.FOCUS_MOD E_INFINITY) 530 } else if (focusMode.equals(android.hardware.Camera.Parameters.FOCUS_MOD E_INFINITY)
531 || focusMode.equals(android.hardware.Camera.Parameters.FOCUS_MOD E_FIXED)) { 531 || focusMode.equals(android.hardware.Camera.Parameters.FOCUS_MOD E_FIXED)) {
532 jniFocusMode = AndroidMeteringMode.FIXED; 532 jniFocusMode = AndroidMeteringMode.FIXED;
533 } 533 }
534 builder.setFocusMode(jniFocusMode); 534 builder.setFocusMode(jniFocusMode);
535 535
536 // Auto Exposure is the usual capability and state, unless AE is not ava ilable at all, which 536 // Auto Exposure is understood to be supported always; besides that, onl y "locked"
537 // is signalled by the absence of Metering Areas. Exposure Compensation can also support or 537 // (equivalent to AndroidMeteringMode.FIXED) may be supported and/or con figured.
538 // be locked, this is equivalent to AndroidMeteringMode.FIXED.
539 ArrayList<Integer> jniExposureModes = new ArrayList<Integer>(2); 538 ArrayList<Integer> jniExposureModes = new ArrayList<Integer>(2);
540 if (parameters.getMaxNumMeteringAreas() > 0) { 539 jniExposureModes.add(AndroidMeteringMode.CONTINUOUS);
541 jniExposureModes.add(AndroidMeteringMode.CONTINUOUS);
542 }
543 if (parameters.isAutoExposureLockSupported()) { 540 if (parameters.isAutoExposureLockSupported()) {
544 jniExposureModes.add(AndroidMeteringMode.FIXED); 541 jniExposureModes.add(AndroidMeteringMode.FIXED);
545 } 542 }
546 builder.setExposureModes(integerArrayListToArray(jniExposureModes)); 543 builder.setExposureModes(integerArrayListToArray(jniExposureModes));
547 544
548 int jniExposureMode = AndroidMeteringMode.CONTINUOUS; 545 int jniExposureMode = AndroidMeteringMode.CONTINUOUS;
549 if (parameters.isAutoExposureLockSupported() && parameters.getAutoExposu reLock()) { 546 if (parameters.isAutoExposureLockSupported() && parameters.getAutoExposu reLock()) {
550 jniExposureMode = AndroidMeteringMode.FIXED; 547 jniExposureMode = AndroidMeteringMode.FIXED;
551 } 548 }
552 builder.setExposureMode(jniExposureMode); 549 builder.setExposureMode(jniExposureMode);
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 getCameraRotation()); 827 getCameraRotation());
831 } 828 }
832 } finally { 829 } finally {
833 mPreviewBufferLock.unlock(); 830 mPreviewBufferLock.unlock();
834 if (camera != null) { 831 if (camera != null) {
835 camera.addCallbackBuffer(data); 832 camera.addCallbackBuffer(data);
836 } 833 }
837 } 834 }
838 } 835 }
839 } 836 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698