CaptureRequest.java revision 97f1c854993a65b2c700426a1e3a83b23ea65337
1b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala/* 2b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * Copyright (C) 2013 The Android Open Source Project 3b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 4b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * Licensed under the Apache License, Version 2.0 (the "License"); 5b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * you may not use this file except in compliance with the License. 6b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * You may obtain a copy of the License at 7b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 8b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * http://www.apache.org/licenses/LICENSE-2.0 9b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 10b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * Unless required by applicable law or agreed to in writing, software 11b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * distributed under the License is distributed on an "AS IS" BASIS, 12b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * See the License for the specific language governing permissions and 14b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * limitations under the License. 15b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala */ 16b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 172f1a2e423e0fbb64467d6fcfa4e82c6384f31210Eino-Ville Talvalapackage android.hardware.camera2; 18b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 19d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkinimport android.hardware.camera2.CameraCharacteristics.Key; 2070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvalaimport android.hardware.camera2.impl.CameraMetadataNative; 21d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkinimport android.hardware.camera2.utils.TypeReference; 2270725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkinimport android.os.Parcel; 2370725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkinimport android.os.Parcelable; 2472f9f0a96e4476ef231d5001cb30521ad4ce5b1eIgor Murashkinimport android.util.Rational; 25b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvalaimport android.view.Surface; 26b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 27feb50af361e4305a25758966b6b5df2738c00259Ruben Brunkimport java.util.Collection; 28feb50af361e4305a25758966b6b5df2738c00259Ruben Brunkimport java.util.Collections; 2970725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkinimport java.util.HashSet; 30d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkinimport java.util.List; 316bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkinimport java.util.Objects; 32b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 33b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 34b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala/** 3570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>An immutable package of settings and outputs needed to capture a single 3670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * image from the camera device.</p> 37b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 38b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * <p>Contains the configuration for the capture hardware (sensor, lens, flash), 3970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * the processing pipeline, the control algorithms, and the output buffers. Also 4070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * contains the list of target Surfaces to send image data to for this 4170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * capture.</p> 42b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 4370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>CaptureRequests can be created by using a {@link Builder} instance, 4470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * obtained by calling {@link CameraDevice#createCaptureRequest}</p> 45b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 46b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * <p>CaptureRequests are given to {@link CameraDevice#capture} or 47b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * {@link CameraDevice#setRepeatingRequest} to capture images from a camera.</p> 48b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 49b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * <p>Each request can specify a different subset of target Surfaces for the 50b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * camera to send the captured data to. All the surfaces used in a request must 51b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * be part of the surface list given to the last call to 5270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * {@link CameraDevice#configureOutputs}, when the request is submitted to the 5370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * camera device.</p> 54b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 55b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * <p>For example, a request meant for repeating preview might only include the 56b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * Surface for the preview SurfaceView or SurfaceTexture, while a 57b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * high-resolution still capture would also include a Surface from a ImageReader 58b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * configured for high-resolution JPEG images.</p> 59b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 60b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * @see CameraDevice#capture 61b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * @see CameraDevice#setRepeatingRequest 6270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @see CameraDevice#createCaptureRequest 63b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala */ 64d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkinpublic final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>> 65d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin implements Parcelable { 66d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 67d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 68d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * A {@code Key} is used to do capture request field lookups with 69d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@link CaptureResult#get} or to set fields with 70d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@link CaptureRequest.Builder#set(Key, Object)}. 71d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 72d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * <p>For example, to set the crop rectangle for the next capture: 73d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * <code><pre> 74d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * Rect cropRectangle = new Rect(0, 0, 640, 480); 75d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * captureRequestBuilder.set(SCALER_CROP_REGION, cropRectangle); 76d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * </pre></code> 77d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * </p> 78d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 79d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * <p>To enumerate over all possible keys for {@link CaptureResult}, see 80d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@link CameraCharacteristics#getAvailableCaptureResultKeys}.</p> 81d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 82d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @see CaptureResult#get 83d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @see CameraCharacteristics#getAvailableCaptureResultKeys 84d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 85d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public final static class Key<T> { 86d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin private final CameraMetadataNative.Key<T> mKey; 87d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 88d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 89d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * Visible for testing and vendor extensions only. 90d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 91d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @hide 92d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 93d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public Key(String name, Class<T> type) { 94d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin mKey = new CameraMetadataNative.Key<T>(name, type); 95d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 96d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 97d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 98d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * Visible for testing and vendor extensions only. 99d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 100d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @hide 101d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 102d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public Key(String name, TypeReference<T> typeReference) { 103d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin mKey = new CameraMetadataNative.Key<T>(name, typeReference); 104d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 105d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 106d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 107d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * Return a camelCase, period separated name formatted like: 108d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@code "root.section[.subsections].name"}. 109d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 110d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * <p>Built-in keys exposed by the Android SDK are always prefixed with {@code "android."}; 111d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * keys that are device/platform-specific are prefixed with {@code "com."}.</p> 112d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 113d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * <p>For example, {@code CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP} would 114d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * have a name of {@code "android.scaler.streamConfigurationMap"}; whereas a device 115d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * specific key might look like {@code "com.google.nexus.data.private"}.</p> 116d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 117d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @return String representation of the key name 118d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 119d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public String getName() { 120d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin return mKey.getName(); 121d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 122d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 123d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 124d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@inheritDoc} 125d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 126d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @Override 127d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public final int hashCode() { 128d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin return mKey.hashCode(); 129d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 130d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 131d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 132d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@inheritDoc} 133d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 134d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @SuppressWarnings("unchecked") 135d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @Override 136d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public final boolean equals(Object o) { 137d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin return o instanceof Key && ((Key<T>)o).mKey.equals(mKey); 138d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 139d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 140d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 141d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * Visible for CameraMetadataNative implementation only; do not use. 142d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 143d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * TODO: Make this private or remove it altogether. 144d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 145d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @hide 146d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 147d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public CameraMetadataNative.Key<T> getNativeKey() { 148d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin return mKey; 149d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 150d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 151d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @SuppressWarnings({ "unchecked" }) 152d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /*package*/ Key(CameraMetadataNative.Key<?> nativeKey) { 153d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin mKey = (CameraMetadataNative.Key<T>) nativeKey; 154d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 155d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 15670725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 15770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala private final HashSet<Surface> mSurfaceSet; 15870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala private final CameraMetadataNative mSettings; 15970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 1604068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala private Object mUserTag; 161b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 162b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala /** 1636bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * Construct empty request. 1646bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * 1656bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * Used by Binder to unparcel this object only. 16670725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin */ 1676bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin private CaptureRequest() { 16870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSettings = new CameraMetadataNative(); 16970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSurfaceSet = new HashSet<Surface>(); 170b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala } 171b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 172b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala /** 1736bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * Clone from source capture request. 1746bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * 1756bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * Used by the Builder to create an immutable copy. 176b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala */ 1776bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin @SuppressWarnings("unchecked") 17870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala private CaptureRequest(CaptureRequest source) { 17970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSettings = new CameraMetadataNative(source.mSettings); 18070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSurfaceSet = (HashSet<Surface>) source.mSurfaceSet.clone(); 1817b01c5c4d27ebbd739d9e5e0de7eaafbffd8e084Eino-Ville Talvala mUserTag = source.mUserTag; 182b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala } 183b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 184b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala /** 1856bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * Take ownership of passed-in settings. 1866bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * 1876bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * Used by the Builder to create a mutable CaptureRequest. 188b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala */ 18970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala private CaptureRequest(CameraMetadataNative settings) { 190d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin mSettings = CameraMetadataNative.move(settings); 19170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSurfaceSet = new HashSet<Surface>(); 19270725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin } 19370725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 194d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 195d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * Get a capture request field value. 196d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 197d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * <p>The field definitions can be found in {@link CaptureRequest}.</p> 198d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 199d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * <p>Querying the value for the same key more than once will return a value 200d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * which is equal to the previous queried value.</p> 201d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 202d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @throws IllegalArgumentException if the key was not valid 203d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 204d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @param key The result field to read. 205d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @return The value of that key, or {@code null} if the field is not set. 206d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 20770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public <T> T get(Key<T> key) { 20870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala return mSettings.get(key); 2094068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala } 2104068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala 2114068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala /** 212d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@inheritDoc} 213d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @hide 214d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 215d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @SuppressWarnings("unchecked") 216d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @Override 217d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin protected <T> T getProtected(Key<?> key) { 218d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin return (T) mSettings.get(key); 219d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 220d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 221d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 222d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@inheritDoc} 223d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @hide 224d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 225d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @SuppressWarnings("unchecked") 226d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @Override 227d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin protected Class<Key<?>> getKeyClass() { 228d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin Object thisClass = Key.class; 229d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin return (Class<Key<?>>)thisClass; 230d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 231d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 232d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 233d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@inheritDoc} 234d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 235d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @Override 236d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public List<Key<?>> getKeys() { 237d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin // Force the javadoc for this function to show up on the CaptureRequest page 238d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin return super.getKeys(); 239d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 240d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 241d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 2424068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * Retrieve the tag for this request, if any. 2434068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * 2444068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * <p>This tag is not used for anything by the camera device, but can be 2454068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * used by an application to easily identify a CaptureRequest when it is 2464068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * returned by 2474af73c2153747d0624ccc75dfa001cb91982957fEino-Ville Talvala * {@link CameraDevice.CaptureListener#onCaptureCompleted CaptureListener.onCaptureCompleted} 2484068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * </p> 2494068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * 2504068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * @return the last tag Object set on this request, or {@code null} if 2514068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * no tag has been set. 25270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @see Builder#setTag 2534068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala */ 2544068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala public Object getTag() { 25570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala return mUserTag; 2564068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala } 2574068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala 2586bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin /** 2596bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * Determine whether this CaptureRequest is equal to another CaptureRequest. 2606bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * 2616bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * <p>A request is considered equal to another is if it's set of key/values is equal, it's 2626bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * list of output surfaces is equal, and the user tag is equal.</p> 2636bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * 2646bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * @param other Another instance of CaptureRequest. 2656bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * 2666bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * @return True if the requests are the same, false otherwise. 2676bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin */ 2686bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin @Override 2696bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin public boolean equals(Object other) { 2706bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin return other instanceof CaptureRequest 2716bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin && equals((CaptureRequest)other); 2726bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin } 2736bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin 2746bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin private boolean equals(CaptureRequest other) { 2756bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin return other != null 2766bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin && Objects.equals(mUserTag, other.mUserTag) 2776bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin && mSurfaceSet.equals(other.mSurfaceSet) 2786bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin && mSettings.equals(other.mSettings); 2796bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin } 2806bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin 2816bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin @Override 2826bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin public int hashCode() { 2836bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin return mSettings.hashCode(); 2846bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin } 2856bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin 28670725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin public static final Parcelable.Creator<CaptureRequest> CREATOR = 28770725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin new Parcelable.Creator<CaptureRequest>() { 28870725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin @Override 28970725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin public CaptureRequest createFromParcel(Parcel in) { 29070725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin CaptureRequest request = new CaptureRequest(); 29170725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin request.readFromParcel(in); 29270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 29370725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin return request; 29470725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin } 29570725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 29670725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin @Override 29770725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin public CaptureRequest[] newArray(int size) { 29870725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin return new CaptureRequest[size]; 29970725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin } 30070725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin }; 30170725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 30270725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin /** 30370725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin * Expand this object from a Parcel. 30470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * Hidden since this breaks the immutability of CaptureRequest, but is 30570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * needed to receive CaptureRequests with aidl. 30670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 30770725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin * @param in The parcel from which the object should be read 30870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @hide 30970725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin */ 31072f9f0a96e4476ef231d5001cb30521ad4ce5b1eIgor Murashkin private void readFromParcel(Parcel in) { 31170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSettings.readFromParcel(in); 31270725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 31370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSurfaceSet.clear(); 31470725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 31570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala Parcelable[] parcelableArray = in.readParcelableArray(Surface.class.getClassLoader()); 31670725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 31770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala if (parcelableArray == null) { 31870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala return; 31970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 32070725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 32170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala for (Parcelable p : parcelableArray) { 32270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala Surface s = (Surface) p; 32370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSurfaceSet.add(s); 32470725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin } 32570725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin } 32670725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 32770725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin @Override 32870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public int describeContents() { 32970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala return 0; 33070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 33170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 33270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala @Override 33370725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin public void writeToParcel(Parcel dest, int flags) { 33470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSettings.writeToParcel(dest, flags); 33570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala dest.writeParcelableArray(mSurfaceSet.toArray(new Surface[mSurfaceSet.size()]), flags); 33670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 33770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 33870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 339feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk * @hide 340feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk */ 341feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk public boolean containsTarget(Surface surface) { 342feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk return mSurfaceSet.contains(surface); 343feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk } 344feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk 345feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk /** 346feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk * @hide 347feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk */ 348feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk public Collection<Surface> getTargets() { 349feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk return Collections.unmodifiableCollection(mSurfaceSet); 350feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk } 351feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk 352feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk /** 35370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * A builder for capture requests. 35470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 35570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>To obtain a builder instance, use the 35670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * {@link CameraDevice#createCaptureRequest} method, which initializes the 35770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * request fields to one of the templates defined in {@link CameraDevice}. 35870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 35970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @see CameraDevice#createCaptureRequest 36070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @see #TEMPLATE_PREVIEW 36170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @see #TEMPLATE_RECORD 36270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @see #TEMPLATE_STILL_CAPTURE 36370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @see #TEMPLATE_VIDEO_SNAPSHOT 36470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @see #TEMPLATE_MANUAL 36570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 36670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public final static class Builder { 36770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 3687a36a0fbb0a5f14047a3680668da954beca05dcbIgor Murashkin private final CaptureRequest mRequest; 36970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 37070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 37170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * Initialize the builder using the template; the request takes 37270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * ownership of the template. 37370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 37470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @hide 37570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 37670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public Builder(CameraMetadataNative template) { 37770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mRequest = new CaptureRequest(template); 37870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 37970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 38070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 38170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>Add a surface to the list of targets for this request</p> 38270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 38370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>The Surface added must be one of the surfaces included in the most 38470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * recent call to {@link CameraDevice#configureOutputs}, when the 38570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * request is given to the camera device.</p> 38670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 38770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>Adding a target more than once has no effect.</p> 38870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 38970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @param outputTarget Surface to use as an output target for this request 39070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 39170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public void addTarget(Surface outputTarget) { 39270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mRequest.mSurfaceSet.add(outputTarget); 39370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 39470725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 39570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 39670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>Remove a surface from the list of targets for this request.</p> 39770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 39870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>Removing a target that is not currently added has no effect.</p> 39970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 40070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @param outputTarget Surface to use as an output target for this request 40170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 40270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public void removeTarget(Surface outputTarget) { 40370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mRequest.mSurfaceSet.remove(outputTarget); 40470725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin } 40570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 40670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 40770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * Set a capture request field to a value. The field definitions can be 40870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * found in {@link CaptureRequest}. 40970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 41070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @param key The metadata field to write. 41170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @param value The value to set the field to, which must be of a matching 41270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * type to the key. 41370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 41470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public <T> void set(Key<T> key, T value) { 41570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mRequest.mSettings.set(key, value); 41670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 41770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 41870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 41970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * Get a capture request field value. The field definitions can be 42070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * found in {@link CaptureRequest}. 42170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 42270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @throws IllegalArgumentException if the key was not valid 42370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 42470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @param key The metadata field to read. 42570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @return The value of that key, or {@code null} if the field is not set. 42670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 42770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public <T> T get(Key<T> key) { 42870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala return mRequest.mSettings.get(key); 42970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 43070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 43170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 43270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * Set a tag for this request. 43370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 43470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>This tag is not used for anything by the camera device, but can be 43570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * used by an application to easily identify a CaptureRequest when it is 43670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * returned by 43770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * {@link CameraDevice.CaptureListener#onCaptureCompleted CaptureListener.onCaptureCompleted} 43870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 43970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @param tag an arbitrary Object to store with this request 44070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @see CaptureRequest#getTag 44170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 44270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public void setTag(Object tag) { 44370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mRequest.mUserTag = tag; 44470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 44570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 44670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 44770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * Build a request using the current target Surfaces and settings. 44870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 44970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @return A new capture request instance, ready for submission to the 45070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * camera device. 45170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 45270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public CaptureRequest build() { 45370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala return new CaptureRequest(mRequest); 45470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 45570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 45670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 45770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 45870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @hide 45970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 46070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public boolean isEmpty() { 46170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala return mRequest.mSettings.isEmpty(); 46270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 46370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 464b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala } 465b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 4665a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 4675a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * The key entries below this point are generated from metadata 4685a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * definitions in /system/media/camera/docs. Do not modify by hand or 4695a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * modify the comment blocks at the start or end. 4705a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/ 4715a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 4720da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala 4735a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 4747d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>The mode control selects how the image data is converted from the 4757d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * sensor's native color into linear sRGB color.</p> 4767d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>When auto-white balance is enabled with {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, this 4777d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * control is overridden by the AWB routine. When AWB is disabled, the 4787d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * application controls how the color mapping is performed.</p> 4797d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>We define the expected processing pipeline below. For consistency 4807d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * across devices, this is always the case with TRANSFORM_MATRIX.</p> 4817d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>When either FULL or HIGH_QUALITY is used, the camera device may 4827d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * do additional processing but {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and 4837d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} will still be provided by the 4847d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * camera device (in the results) and be roughly correct.</p> 4857d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>Switching to TRANSFORM_MATRIX and using the data provided from 4867d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * FAST or HIGH_QUALITY will yield a picture with the same white point 4877d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * as what was produced by the camera device in the earlier frame.</p> 4887d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>The expected processing pipeline is as follows:</p> 4897d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p><img alt="White balance processing pipeline" src="../../../../images/camera2/metadata/android.colorCorrection.mode/processing_pipeline.png" /></p> 4907d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>The white balance is encoded by two values, a 4-channel white-balance 4917d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * gain vector (applied in the Bayer domain), and a 3x3 color transform 4927d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * matrix (applied after demosaic).</p> 4937d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>The 4-channel white-balance gains are defined as:</p> 4947d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <pre><code>{@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} = [ R G_even G_odd B ] 4957d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * </code></pre> 4967d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>where <code>G_even</code> is the gain for green pixels on even rows of the 4977d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * output, and <code>G_odd</code> is the gain for green pixels on the odd rows. 4987d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * These may be identical for a given camera device implementation; if 4997d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * the camera device does not support a separate gain for even/odd green 5007d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * channels, it will use the <code>G_even</code> value, and write <code>G_odd</code> equal to 5017d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <code>G_even</code> in the output result metadata.</p> 5027d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>The matrices for color transforms are defined as a 9-entry vector:</p> 5037d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <pre><code>{@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} = [ I0 I1 I2 I3 I4 I5 I6 I7 I8 ] 5047d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * </code></pre> 5057d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>which define a transform from input sensor colors, <code>P_in = [ r g b ]</code>, 5067d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * to output linear sRGB, <code>P_out = [ r' g' b' ]</code>,</p> 5077d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>with colors as follows:</p> 5087d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <pre><code>r' = I0r + I1g + I2b 5097d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * g' = I3r + I4g + I5b 5107d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * b' = I6r + I7g + I8b 5117d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * </code></pre> 5127d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>Both the input and output value ranges must match. Overflow/underflow 5137d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * values are clipped to fit within the range.</p> 5140da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 5157d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * @see CaptureRequest#COLOR_CORRECTION_GAINS 5167d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 5170da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#CONTROL_AWB_MODE 5185a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #COLOR_CORRECTION_MODE_TRANSFORM_MATRIX 5195a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #COLOR_CORRECTION_MODE_FAST 5205a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #COLOR_CORRECTION_MODE_HIGH_QUALITY 5215a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 5225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> COLOR_CORRECTION_MODE = 5235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.colorCorrection.mode", int.class); 5245a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 5255a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 526ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>A color transform matrix to use to transform 527ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * from sensor RGB color space to output linear sRGB color space</p> 52849a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * <p>This matrix is either set by the camera device when the request 5290da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not TRANSFORM_MATRIX, or 5305a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * directly by the application in the request when the 5310da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is TRANSFORM_MATRIX.</p> 53249a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * <p>In the latter case, the camera device may round the matrix to account 53349a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * for precision issues; the final rounded matrix should be reported back 53449a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * in this matrix result metadata. The transform should keep the magnitude 53549a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * of the output color values within <code>[0, 1.0]</code> (assuming input color 53649a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * values is within the normalized range <code>[0, 1.0]</code>), or clipping may occur.</p> 5370da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 5380da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#COLOR_CORRECTION_MODE 5395a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 5402bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala public static final Key<android.hardware.camera2.params.ColorSpaceTransform> COLOR_CORRECTION_TRANSFORM = 5412bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.colorCorrection.transform", android.hardware.camera2.params.ColorSpaceTransform.class); 5425a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 5435a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 5447d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>Gains applying to Bayer raw color channels for 545cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * white-balance.</p> 5462bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala * <p>These per-channel gains are either set by the camera device 5472bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala * when the request {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not 5482bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala * TRANSFORM_MATRIX, or directly by the application in the 5492bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala * request when the {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is 5502bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala * TRANSFORM_MATRIX.</p> 5512bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala * <p>The gains in the result metadata are the gains actually 5522bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala * applied by the camera device to the current frame.</p> 5530da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 5540da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#COLOR_CORRECTION_MODE 5555a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 5562bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala public static final Key<android.hardware.camera2.params.RggbChannelVector> COLOR_CORRECTION_GAINS = 5572bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala new Key<android.hardware.camera2.params.RggbChannelVector>("android.colorCorrection.gains", android.hardware.camera2.params.RggbChannelVector.class); 5585a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 5595a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 5600da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>The desired setting for the camera device's auto-exposure 5610da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * algorithm's antibanding compensation.</p> 5620da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>Some kinds of lighting fixtures, such as some fluorescent 5630da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * lights, flicker at the rate of the power supply frequency 5640da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * (60Hz or 50Hz, depending on country). While this is 5650da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * typically not noticeable to a person, it can be visible to 5660da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * a camera device. If a camera sets its exposure time to the 5670da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * wrong value, the flicker may become visible in the 5680da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * viewfinder as flicker or in a final captured image, as a 5690da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * set of variable-brightness bands across the image.</p> 5700da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>Therefore, the auto-exposure routines of camera devices 5710da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * include antibanding routines that ensure that the chosen 5720da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * exposure value will not cause such banding. The choice of 5730da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * exposure time depends on the rate of flicker, which the 5740da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * camera device can detect automatically, or the expected 5750da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * rate can be selected by the application using this 5760da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * control.</p> 5770da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>A given camera device may not support all of the possible 5780da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * options for the antibanding mode. The 5790da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES android.control.aeAvailableAntibandingModes} key contains 5800da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * the available modes for a given camera device.</p> 5810da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>The default mode is AUTO, which must be supported by all 5820da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * camera devices.</p> 5830da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>If manual exposure control is enabled (by setting 5840da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} to OFF), 5850da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * then this setting has no effect, and the application must 5860da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * ensure it selects exposure times that do not cause banding 5870da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * issues. The {@link CaptureResult#STATISTICS_SCENE_FLICKER android.statistics.sceneFlicker} key can assist 5880da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * the application in this.</p> 5890da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 5905f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES 591399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * @see CaptureRequest#CONTROL_AE_MODE 592265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CaptureRequest#CONTROL_MODE 593265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CaptureResult#STATISTICS_SCENE_FLICKER 5945a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_ANTIBANDING_MODE_OFF 5955a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_ANTIBANDING_MODE_50HZ 5965a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_ANTIBANDING_MODE_60HZ 5975a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_ANTIBANDING_MODE_AUTO 5985a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 5995a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_AE_ANTIBANDING_MODE = 6005a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.aeAntibandingMode", int.class); 6015a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 6025a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 603ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Adjustment to AE target image 604ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * brightness</p> 605ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>For example, if EV step is 0.333, '6' will mean an 6065a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * exposure compensation of +2 EV; -3 will mean an exposure 607a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * compensation of -1 EV. Note that this control will only be effective 608a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * if {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} <code>!=</code> OFF. This control will take effect even when 609a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} <code>== true</code>.</p> 610a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * <p>In the event of exposure compensation value being changed, camera device 611a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * may take several frames to reach the newly requested exposure target. 612a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * During that time, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} field will be in the SEARCHING 613a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * state. Once the new exposure target is reached, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} will 614a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * change from SEARCHING to either CONVERGED, LOCKED (if AE lock is enabled), or 615a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * FLASH_REQUIRED (if the scene is too dark for still capture).</p> 616a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * 617a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * @see CaptureRequest#CONTROL_AE_LOCK 618a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * @see CaptureRequest#CONTROL_AE_MODE 619a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * @see CaptureResult#CONTROL_AE_STATE 6205a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 6215a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_AE_EXPOSURE_COMPENSATION = 6225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.aeExposureCompensation", int.class); 6235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 6245a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 625ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Whether AE is currently locked to its latest 62649a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * calculated values.</p> 627ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Note that even when AE is locked, the flash may be 62849a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * fired if the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_AUTO_FLASH / ON_ALWAYS_FLASH / 629ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * ON_AUTO_FLASH_REDEYE.</p> 630a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * <p>When {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation} is changed, even if the AE lock 631a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * is ON, the camera device will still adjust its exposure value.</p> 63249a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * <p>If AE precapture is triggered (see {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) 63349a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * when AE is already locked, the camera device will not change the exposure time 63449a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}) and sensitivity ({@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}) 635d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * parameters. The flash may be fired if the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} 63649a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the 63749a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_ALWAYS_FLASH, the scene may become overexposed.</p> 63849a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * <p>See {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE lock related state transition details.</p> 63949a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * 640a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION 64149a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * @see CaptureRequest#CONTROL_AE_MODE 64249a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 64349a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * @see CaptureResult#CONTROL_AE_STATE 64449a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * @see CaptureRequest#SENSOR_EXPOSURE_TIME 64549a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * @see CaptureRequest#SENSOR_SENSITIVITY 6465a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 6475a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Boolean> CONTROL_AE_LOCK = 6485a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Boolean>("android.control.aeLock", boolean.class); 6495a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 6505a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 6510da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>The desired mode for the camera device's 6520da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * auto-exposure routine.</p> 6530da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is 6540da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * AUTO.</p> 6550da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>When set to any of the ON modes, the camera device's 6560da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * auto-exposure routine is enabled, overriding the 6570da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * application's selected exposure time, sensor sensitivity, 6580da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * and frame duration ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, 6590da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and 6600da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}). If one of the FLASH modes 6610da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * is selected, the camera device's flash unit controls are 6620da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * also overridden.</p> 6630da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>The FLASH modes are only available if the camera device 6640da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * has a flash unit ({@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} is <code>true</code>).</p> 6650da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>If flash TORCH mode is desired, this field must be set to 6660da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * ON or OFF, and {@link CaptureRequest#FLASH_MODE android.flash.mode} set to TORCH.</p> 6670da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>When set to any of the ON modes, the values chosen by the 6680da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * camera device auto-exposure routine for the overridden 6690da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * fields for a given capture will be available in its 6700da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * CaptureResult.</p> 6710da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 6725f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * @see CaptureRequest#CONTROL_MODE 673265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CameraCharacteristics#FLASH_INFO_AVAILABLE 674265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CaptureRequest#FLASH_MODE 675aef3b7ed9f2a27aed9aecef030432d1100a60406Igor Murashkin * @see CaptureRequest#SENSOR_EXPOSURE_TIME 676aef3b7ed9f2a27aed9aecef030432d1100a60406Igor Murashkin * @see CaptureRequest#SENSOR_FRAME_DURATION 677399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * @see CaptureRequest#SENSOR_SENSITIVITY 6785a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_MODE_OFF 6795a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_MODE_ON 6805a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_MODE_ON_AUTO_FLASH 6815a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_MODE_ON_ALWAYS_FLASH 6825a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE 6835a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 6845a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_AE_MODE = 6855a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.aeMode", int.class); 6865a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 6875a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 688ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>List of areas to use for 689f59521d3b182de217b12e6d4ea31bd32e2418564Ruben Brunk * metering.</p> 690ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>The coordinate system is based on the active pixel array, 6912629f27362f1a35521501f3a28279ab05b9beb32Timothy Knight * with (0,0) being the top-left pixel in the active pixel array, and 6920da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1, 6930da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the 69497f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * bottom-right pixel in the active pixel array.</p> 69597f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * <p>The weight must range from 0 to 1000, and represents a weight 69697f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * for every pixel in the area. This means that a large metering area 69797f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * with the same weight as a smaller area will have more effect in 69897f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * the metering result. Metering areas can partially overlap and the 69997f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * camera device will add the weights in the overlap region.</p> 700ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>If all regions have 0 weight, then no specific metering area 701cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * needs to be used by the camera device. If the metering region is 7021498615d56851664c96e51d530e445ed73be7a22Zhijun He * outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in capture result metadata, 7031498615d56851664c96e51d530e445ed73be7a22Zhijun He * the camera device will ignore the sections outside the region and output the 7041498615d56851664c96e51d530e445ed73be7a22Zhijun He * used sections in the result metadata.</p> 7050da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 7060da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#SCALER_CROP_REGION 707265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 7085a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 709817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh public static final Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AE_REGIONS = 710817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.aeRegions", android.hardware.camera2.params.MeteringRectangle[].class); 7115a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 7125a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 713ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Range over which fps can be adjusted to 714ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * maintain exposure</p> 715ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Only constrains AE algorithm, not manual control 7160da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * of {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</p> 7170da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 7180da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#SENSOR_EXPOSURE_TIME 7195a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 72078712a8bd7275542013ba099f33536eead0167fbIgor Murashkin public static final Key<android.util.Range<Integer>> CONTROL_AE_TARGET_FPS_RANGE = 72178712a8bd7275542013ba099f33536eead0167fbIgor Murashkin new Key<android.util.Range<Integer>>("android.control.aeTargetFpsRange", new TypeReference<android.util.Range<Integer>>() {{ }}); 7225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 7235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 724228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * <p>Whether the camera device will trigger a precapture 725228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * metering sequence when it processes this request.</p> 726ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>This entry is normally set to IDLE, or is not 7275a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * included at all in the request settings. When included and 728228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * set to START, the camera device will trigger the autoexposure 729ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * precapture metering sequence.</p> 730ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>The effect of AE precapture trigger depends on the current 731228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * AE mode and state; see {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE precapture 732228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * state transition details.</p> 733228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * 734228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * @see CaptureResult#CONTROL_AE_STATE 7355a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_PRECAPTURE_TRIGGER_IDLE 7365a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_PRECAPTURE_TRIGGER_START 7375a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 7385a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_AE_PRECAPTURE_TRIGGER = 7395a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.aePrecaptureTrigger", int.class); 7405a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 7415a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 742ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Whether AF is currently enabled, and what 743ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * mode it is set to</p> 744cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * <p>Only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} = AUTO and the lens is not fixed focus 745cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * (i.e. <code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} > 0</code>).</p> 74678146ecb24871302a4c4dc0a7341044a06d29ee8Zhijun He * <p>If the lens is controlled by the camera device auto-focus algorithm, 747d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * the camera device will report the current AF status in {@link CaptureResult#CONTROL_AF_STATE android.control.afState} 74878146ecb24871302a4c4dc0a7341044a06d29ee8Zhijun He * in result metadata.</p> 7490da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 750d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * @see CaptureResult#CONTROL_AF_STATE 7510da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#CONTROL_MODE 752cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 7535a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_MODE_OFF 7545a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_MODE_AUTO 7555a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_MODE_MACRO 7565a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_MODE_CONTINUOUS_VIDEO 7575a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_MODE_CONTINUOUS_PICTURE 7585a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_MODE_EDOF 7595a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 7605a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_AF_MODE = 7615a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.afMode", int.class); 7625a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 7635a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 764ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>List of areas to use for focus 765f59521d3b182de217b12e6d4ea31bd32e2418564Ruben Brunk * estimation.</p> 766ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>The coordinate system is based on the active pixel array, 7672629f27362f1a35521501f3a28279ab05b9beb32Timothy Knight * with (0,0) being the top-left pixel in the active pixel array, and 7680da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1, 7690da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the 77097f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * bottom-right pixel in the active pixel array.</p> 77197f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * <p>The weight must range from 0 to 1000, and represents a weight 77297f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * for every pixel in the area. This means that a large metering area 77397f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * with the same weight as a smaller area will have more effect in 77497f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * the metering result. Metering areas can partially overlap and the 77597f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * camera device will add the weights in the overlap region.</p> 776817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh * <p>If all regions have 0 weight, then no specific metering area 777817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh * needs to be used by the camera device. If the metering region is 778817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh * outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in capture result metadata, 779817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh * the camera device will ignore the sections outside the region and output the 780817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh * used sections in the result metadata.</p> 7810da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 7820da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#SCALER_CROP_REGION 783265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 7845a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 785817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh public static final Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AF_REGIONS = 786817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.afRegions", android.hardware.camera2.params.MeteringRectangle[].class); 7875a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 7885a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 789228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * <p>Whether the camera device will trigger autofocus for this request.</p> 790ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>This entry is normally set to IDLE, or is not 791ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * included at all in the request settings.</p> 792228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * <p>When included and set to START, the camera device will trigger the 793228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * autofocus algorithm. If autofocus is disabled, this trigger has no effect.</p> 794228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * <p>When set to CANCEL, the camera device will cancel any active trigger, 795228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * and return to its initial AF state.</p> 796228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * <p>See {@link CaptureResult#CONTROL_AF_STATE android.control.afState} for what that means for each AF mode.</p> 797228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * 798228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * @see CaptureResult#CONTROL_AF_STATE 7995a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_TRIGGER_IDLE 8005a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_TRIGGER_START 8015a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_TRIGGER_CANCEL 8025a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 8035a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_AF_TRIGGER = 8045a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.afTrigger", int.class); 8055a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 8065a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 807ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Whether AWB is currently locked to its 8082d5e89778e955b4ff209a93e738761356349d48cZhijun He * latest calculated values.</p> 809ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Note that AWB lock is only meaningful for AUTO 8105a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * mode; in other modes, AWB is already fixed to a specific 8112d5e89778e955b4ff209a93e738761356349d48cZhijun He * setting.</p> 8125a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 8135a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Boolean> CONTROL_AWB_LOCK = 8145a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Boolean>("android.control.awbLock", boolean.class); 8155a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 8165a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 817ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Whether AWB is currently setting the color 8185a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * transform fields, and what its illumination target 819cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * is.</p> 820399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is AUTO.</p> 821399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * <p>When set to the ON mode, the camera device's auto white balance 822399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * routine is enabled, overriding the application's selected 823399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}, {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and 824399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}.</p> 825399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * <p>When set to the OFF mode, the camera device's auto white balance 826cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * routine is disabled. The application manually controls the white 827d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * balance by {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}, {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} 828399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * and {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}.</p> 829399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * <p>When set to any other modes, the camera device's auto white balance 830399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * routine is disabled. The camera device uses each particular illumination 831399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * target for white balance adjustment.</p> 8320da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 833265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CaptureRequest#COLOR_CORRECTION_GAINS 8345f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * @see CaptureRequest#COLOR_CORRECTION_MODE 8355f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 836265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CaptureRequest#CONTROL_MODE 8375a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_OFF 8385a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_AUTO 8395a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_INCANDESCENT 8405a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_FLUORESCENT 8415a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_WARM_FLUORESCENT 8425a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_DAYLIGHT 8435a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_CLOUDY_DAYLIGHT 8445a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_TWILIGHT 8455a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_SHADE 8465a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 8475a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_AWB_MODE = 8485a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.awbMode", int.class); 8495a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 8505a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 851ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>List of areas to use for illuminant 852f59521d3b182de217b12e6d4ea31bd32e2418564Ruben Brunk * estimation.</p> 853ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>The coordinate system is based on the active pixel array, 8542629f27362f1a35521501f3a28279ab05b9beb32Timothy Knight * with (0,0) being the top-left pixel in the active pixel array, and 8550da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1, 8560da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the 85797f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * bottom-right pixel in the active pixel array.</p> 85897f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * <p>The weight must range from 0 to 1000, and represents a weight 85997f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * for every pixel in the area. This means that a large metering area 86097f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * with the same weight as a smaller area will have more effect in 86197f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * the metering result. Metering areas can partially overlap and the 86297f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * camera device will add the weights in the overlap region.</p> 863817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh * <p>If all regions have 0 weight, then no specific metering area 864817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh * needs to be used by the camera device. If the metering region is 865817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh * outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in capture result metadata, 8661498615d56851664c96e51d530e445ed73be7a22Zhijun He * the camera device will ignore the sections outside the region and output the 8671498615d56851664c96e51d530e445ed73be7a22Zhijun He * used sections in the result metadata.</p> 8680da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 8690da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#SCALER_CROP_REGION 870265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 8715a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 872817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh public static final Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AWB_REGIONS = 873817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.awbRegions", android.hardware.camera2.params.MeteringRectangle[].class); 8745a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 8755a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 87666d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * <p>Information to the camera device 3A (auto-exposure, 87766d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * auto-focus, auto-white balance) routines about the purpose 87866d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * of this capture, to help the camera device to decide optimal 3A 87966d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * strategy.</p> 880e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0Zhijun He * <p>This control (except for MANUAL) is only effective if 881e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0Zhijun He * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF</code> and any 3A routine is active.</p> 882e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0Zhijun He * <p>ZERO_SHUTTER_LAG must be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} 883e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0Zhijun He * contains ZSL. MANUAL must be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} 884e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0Zhijun He * contains MANUAL_SENSOR.</p> 8850da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 8860da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#CONTROL_MODE 887e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0Zhijun He * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 8885a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_CAPTURE_INTENT_CUSTOM 8895a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_CAPTURE_INTENT_PREVIEW 8905a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_CAPTURE_INTENT_STILL_CAPTURE 8915a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_CAPTURE_INTENT_VIDEO_RECORD 8925a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT 8935a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG 894e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0Zhijun He * @see #CONTROL_CAPTURE_INTENT_MANUAL 8955a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 8965a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_CAPTURE_INTENT = 8975a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.captureIntent", int.class); 8985a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 8995a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 9005f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * <p>A special color effect to apply.</p> 9015f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * <p>When this mode is set, a color effect will be applied 9025f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * to images produced by the camera device. The interpretation 9035f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * and implementation of these color effects is left to the 9045f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * implementor of the camera device, and should not be 9055f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * depended on to be consistent (or present) across all 9065f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * devices.</p> 9075f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * <p>A color effect will only be applied if 9085f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF.</p> 9090da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 9100da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#CONTROL_MODE 9115a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_OFF 9125a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_MONO 9135a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_NEGATIVE 9145a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_SOLARIZE 9155a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_SEPIA 9165a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_POSTERIZE 9175a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_WHITEBOARD 9185a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_BLACKBOARD 9195a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_AQUA 9205a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 9215a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_EFFECT_MODE = 9225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.effectMode", int.class); 9235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 9245a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 925ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Overall mode of 3A control 926cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * routines.</p> 927f353742124af698098884b4172644af0851b30caZhijun He * <p>High-level 3A control. When set to OFF, all 3A control 9285f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * by the camera device is disabled. The application must set the fields for 929f353742124af698098884b4172644af0851b30caZhijun He * capture parameters itself.</p> 930f353742124af698098884b4172644af0851b30caZhijun He * <p>When set to AUTO, the individual algorithm controls in 9310da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * android.control.* are in effect, such as {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}.</p> 932f353742124af698098884b4172644af0851b30caZhijun He * <p>When set to USE_SCENE_MODE, the individual controls in 9335f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * android.control.* are mostly disabled, and the camera device implements 934f353742124af698098884b4172644af0851b30caZhijun He * one of the scene mode settings (such as ACTION, SUNSET, or PARTY) 9355f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * as it wishes. The camera device scene mode 3A settings are provided by 936f353742124af698098884b4172644af0851b30caZhijun He * android.control.sceneModeOverrides.</p> 9372d5e89778e955b4ff209a93e738761356349d48cZhijun He * <p>When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference 9382d5e89778e955b4ff209a93e738761356349d48cZhijun He * is that this frame will not be used by camera device background 3A statistics 9392d5e89778e955b4ff209a93e738761356349d48cZhijun He * update, as if this frame is never captured. This mode can be used in the scenario 9402d5e89778e955b4ff209a93e738761356349d48cZhijun He * where the application doesn't want a 3A manual control capture to affect 9412d5e89778e955b4ff209a93e738761356349d48cZhijun He * the subsequent auto 3A capture results.</p> 9420da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 9430da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#CONTROL_AF_MODE 9445a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_MODE_OFF 9455a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_MODE_AUTO 9465a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_MODE_USE_SCENE_MODE 9472d5e89778e955b4ff209a93e738761356349d48cZhijun He * @see #CONTROL_MODE_OFF_KEEP_STATE 9485a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 9495a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_MODE = 9505a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.mode", int.class); 9515a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 9525a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 953e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * <p>A camera mode optimized for conditions typical in a particular 954e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * capture setting.</p> 955e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * <p>This is the mode that that is active when 956e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code>. Aside from FACE_PRIORITY, 957e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * these modes will disable {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}, 958e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} while in use.</p> 959e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * <p>The interpretation and implementation of these scene modes is left 960e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * to the implementor of the camera device. Their behavior will not be 961e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * consistent across all devices, and any given device may only implement 962e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * a subset of these modes.</p> 9630da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 964e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * @see CaptureRequest#CONTROL_AE_MODE 965e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * @see CaptureRequest#CONTROL_AF_MODE 966e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * @see CaptureRequest#CONTROL_AWB_MODE 9670da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#CONTROL_MODE 968e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * @see #CONTROL_SCENE_MODE_DISABLED 9695a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_FACE_PRIORITY 9705a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_ACTION 9715a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_PORTRAIT 9725a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_LANDSCAPE 9735a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_NIGHT 9745a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_NIGHT_PORTRAIT 9755a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_THEATRE 9765a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_BEACH 9775a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_SNOW 9785a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_SUNSET 9795a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_STEADYPHOTO 9805a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_FIREWORKS 9815a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_SPORTS 9825a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_PARTY 9835a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_CANDLELIGHT 9845a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_BARCODE 9855a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 9865a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_SCENE_MODE = 9875a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.sceneMode", int.class); 9885a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 9895a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 990ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Whether video stabilization is 991ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * active</p> 992ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>If enabled, video stabilization can modify the 9930da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to keep the video stream 994ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * stabilized</p> 9950da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 9960da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#SCALER_CROP_REGION 9974793af5e3577c51858719a8977d300c3aafdf881Zhijun He * @see #CONTROL_VIDEO_STABILIZATION_MODE_OFF 9984793af5e3577c51858719a8977d300c3aafdf881Zhijun He * @see #CONTROL_VIDEO_STABILIZATION_MODE_ON 9995a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 10004793af5e3577c51858719a8977d300c3aafdf881Zhijun He public static final Key<Integer> CONTROL_VIDEO_STABILIZATION_MODE = 10014793af5e3577c51858719a8977d300c3aafdf881Zhijun He new Key<Integer>("android.control.videoStabilizationMode", int.class); 10025a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 10035a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1004ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Operation mode for edge 1005cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * enhancement.</p> 10062807936f5dfdeff25e9ace3482100511a69dcf13Zhijun He * <p>Edge/sharpness/detail enhancement. OFF means no 1007cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * enhancement will be applied by the camera device.</p> 10086dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk * <p>This must be set to one of the modes listed in {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes}.</p> 10095f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * <p>FAST/HIGH_QUALITY both mean camera device determined enhancement 10102807936f5dfdeff25e9ace3482100511a69dcf13Zhijun He * will be applied. HIGH_QUALITY mode indicates that the 10115f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * camera device will use the highest-quality enhancement algorithms, 10125f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * even if it slows down capture rate. FAST means the camera device will 10132807936f5dfdeff25e9ace3482100511a69dcf13Zhijun He * not slow down capture rate when applying edge enhancement.</p> 10146dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk * 10156dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES 10165a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #EDGE_MODE_OFF 10175a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #EDGE_MODE_FAST 10185a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #EDGE_MODE_HIGH_QUALITY 10195a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 10205a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> EDGE_MODE = 10215a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.edge.mode", int.class); 10225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 10235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 102466d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * <p>The desired mode for for the camera device's flash control.</p> 102566d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * <p>This control is only effective when flash unit is available 1026153ac102d36df66853b523ab01763dc457972517Zhijun He * (<code>{@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} == true</code>).</p> 102766d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * <p>When this control is used, the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} must be set to ON or OFF. 102866d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * Otherwise, the camera device auto-exposure related flash control (ON_AUTO_FLASH, 102966d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * ON_ALWAYS_FLASH, or ON_AUTO_FLASH_REDEYE) will override this control.</p> 103066d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * <p>When set to OFF, the camera device will not fire flash for this capture.</p> 103166d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * <p>When set to SINGLE, the camera device will fire flash regardless of the camera 103266d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * device's auto-exposure routine's result. When used in still capture case, this 103366d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * control should be used along with AE precapture metering sequence 103466d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * ({@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}), otherwise, the image may be incorrectly exposed.</p> 103566d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * <p>When set to TORCH, the flash will be on continuously. This mode can be used 103666d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * for use cases such as preview, auto-focus assist, still capture, or video recording.</p> 1037ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * <p>The flash status will be reported by {@link CaptureResult#FLASH_STATE android.flash.state} in the capture result metadata.</p> 103866d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * 103966d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * @see CaptureRequest#CONTROL_AE_MODE 104066d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 104166d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * @see CameraCharacteristics#FLASH_INFO_AVAILABLE 1042ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * @see CaptureResult#FLASH_STATE 10435a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #FLASH_MODE_OFF 10445a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #FLASH_MODE_SINGLE 10455a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #FLASH_MODE_TORCH 10465a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 10475a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> FLASH_MODE = 10485a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.flash.mode", int.class); 10495a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 10505a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1051eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk * <p>Set operational mode for hot pixel correction.</p> 10529d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk * <p>Valid modes for this camera device are listed in 10539d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk * {@link CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES android.hotPixel.availableHotPixelModes}.</p> 1054eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk * <p>Hotpixel correction interpolates out, or otherwise removes, pixels 1055eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk * that do not accurately encode the incoming light (i.e. pixels that 1056eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk * are stuck at an arbitrary value).</p> 10579d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk * 10589d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk * @see CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES 1059eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk * @see #HOT_PIXEL_MODE_OFF 1060eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk * @see #HOT_PIXEL_MODE_FAST 1061eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk * @see #HOT_PIXEL_MODE_HIGH_QUALITY 1062eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk */ 1063eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk public static final Key<Integer> HOT_PIXEL_MODE = 1064eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk new Key<Integer>("android.hotPixel.mode", int.class); 1065eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk 1066eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk /** 1067574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk * <p>A location object to use when generating image GPS metadata.</p> 1068574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk */ 1069574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk public static final Key<android.location.Location> JPEG_GPS_LOCATION = 1070574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk new Key<android.location.Location>("android.jpeg.gpsLocation", android.location.Location.class); 1071574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk 1072574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk /** 1073ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>GPS coordinates to include in output JPEG 1074ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * EXIF</p> 1075574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk * @hide 10765a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 10775a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<double[]> JPEG_GPS_COORDINATES = 10785a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<double[]>("android.jpeg.gpsCoordinates", double[].class); 10795a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 10805a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1081ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>32 characters describing GPS algorithm to 1082ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * include in EXIF</p> 1083574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk * @hide 10845a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 10855a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<String> JPEG_GPS_PROCESSING_METHOD = 10865a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<String>("android.jpeg.gpsProcessingMethod", String.class); 10875a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 10885a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1089ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Time GPS fix was made to include in 1090ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * EXIF</p> 1091574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk * @hide 10925a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 10935a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Long> JPEG_GPS_TIMESTAMP = 10945a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Long>("android.jpeg.gpsTimestamp", long.class); 10955a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 10965a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1097ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Orientation of JPEG image to 1098ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * write</p> 10995a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 11005a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> JPEG_ORIENTATION = 11015a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.jpeg.orientation", int.class); 11025a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 11035a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1104ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Compression quality of the final JPEG 1105ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * image</p> 1106ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>85-95 is typical usage range</p> 11075a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 11085a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Byte> JPEG_QUALITY = 11095a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Byte>("android.jpeg.quality", byte.class); 11105a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 11115a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1112ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Compression quality of JPEG 1113ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * thumbnail</p> 11145a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 11155a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Byte> JPEG_THUMBNAIL_QUALITY = 11165a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Byte>("android.jpeg.thumbnailQuality", byte.class); 11175a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 11185a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 11195a9ff379233025bc85ebc41ac5979def09d3ebfaZhijun He * <p>Resolution of embedded JPEG thumbnail</p> 11205f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * <p>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail, 11215f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * but the captured JPEG will still be a valid image.</p> 11225a9ff379233025bc85ebc41ac5979def09d3ebfaZhijun He * <p>When a jpeg image capture is issued, the thumbnail size selected should have 11235a9ff379233025bc85ebc41ac5979def09d3ebfaZhijun He * the same aspect ratio as the jpeg image.</p> 112450f7243ca068c793c8b5aca37a9e983b630c477fZhijun He * <p>If the thumbnail image aspect ratio differs from the JPEG primary image aspect 112550f7243ca068c793c8b5aca37a9e983b630c477fZhijun He * ratio, the camera device creates the thumbnail by cropping it from the primary image. 112650f7243ca068c793c8b5aca37a9e983b630c477fZhijun He * For example, if the primary image has 4:3 aspect ratio, the thumbnail image has 112750f7243ca068c793c8b5aca37a9e983b630c477fZhijun He * 16:9 aspect ratio, the primary image will be cropped vertically (letterbox) to 112850f7243ca068c793c8b5aca37a9e983b630c477fZhijun He * generate the thumbnail image. The thumbnail image will always have a smaller Field 112950f7243ca068c793c8b5aca37a9e983b630c477fZhijun He * Of View (FOV) than the primary image when aspect ratios differ.</p> 11305a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 113172f9f0a96e4476ef231d5001cb30521ad4ce5b1eIgor Murashkin public static final Key<android.util.Size> JPEG_THUMBNAIL_SIZE = 113272f9f0a96e4476ef231d5001cb30521ad4ce5b1eIgor Murashkin new Key<android.util.Size>("android.jpeg.thumbnailSize", android.util.Size.class); 11335a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 11345a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1135fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * <p>The ratio of lens focal length to the effective 1136fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * aperture diameter.</p> 1137fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * <p>This will only be supported on the camera devices that 1138fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * have variable aperture lens. The aperture value can only be 1139fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * one of the values listed in {@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures}.</p> 1140fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is OFF, 1141fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * this can be set along with {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, 1142d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} 1143fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * to achieve manual exposure control.</p> 1144fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * <p>The requested aperture value may take several frames to reach the 1145fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * requested value; the camera device will report the current (intermediate) 1146ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * aperture size in capture result metadata while the aperture is changing. 1147ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * While the aperture is still changing, {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p> 1148fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is one of 1149fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * the ON modes, this will be overridden by the camera device 1150fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * auto-exposure algorithm, the overridden values are then provided 1151fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * back to the user in the corresponding result.</p> 1152fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * 1153399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * @see CaptureRequest#CONTROL_AE_MODE 1154265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES 1155ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * @see CaptureResult#LENS_STATE 1156265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CaptureRequest#SENSOR_EXPOSURE_TIME 1157d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * @see CaptureRequest#SENSOR_FRAME_DURATION 1158265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CaptureRequest#SENSOR_SENSITIVITY 11595a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 11605a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Float> LENS_APERTURE = 11615a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Float>("android.lens.aperture", float.class); 11625a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 11635a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1164855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * <p>State of lens neutral density filter(s).</p> 1165855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * <p>This will not be supported on most camera devices. On devices 1166855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * where this is supported, this may only be set to one of the 1167855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * values included in {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities}.</p> 1168855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * <p>Lens filters are typically used to lower the amount of light the 1169855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * sensor is exposed to (measured in steps of EV). As used here, an EV 1170855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * step is the standard logarithmic representation, which are 1171855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * non-negative, and inversely proportional to the amount of light 1172855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * hitting the sensor. For example, setting this to 0 would result 1173855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * in no reduction of the incoming light, and setting this to 2 would 1174855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * mean that the filter is set to reduce incoming light by two stops 1175855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * (allowing 1/4 of the prior amount of light to the sensor).</p> 1176ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * <p>It may take several frames before the lens filter density changes 1177ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * to the requested value. While the filter density is still changing, 1178ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p> 1179855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * 1180855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES 1181ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * @see CaptureResult#LENS_STATE 11825a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 11835a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Float> LENS_FILTER_DENSITY = 11845a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Float>("android.lens.filterDensity", float.class); 11855a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 11865a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1187a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * <p>The current lens focal length; used for optical zoom.</p> 1188a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * <p>This setting controls the physical focal length of the camera 1189a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * device's lens. Changing the focal length changes the field of 1190a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * view of the camera device, and is usually used for optical zoom.</p> 1191a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * <p>Like {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}, this 1192a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * setting won't be applied instantaneously, and it may take several 1193ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * frames before the lens can change to the requested focal length. 1194a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * While the focal length is still changing, {@link CaptureResult#LENS_STATE android.lens.state} will 1195a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * be set to MOVING.</p> 1196a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * <p>This is expected not to be supported on most devices.</p> 1197a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * 1198a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * @see CaptureRequest#LENS_APERTURE 1199a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * @see CaptureRequest#LENS_FOCUS_DISTANCE 1200a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * @see CaptureResult#LENS_STATE 12015a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 12025a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Float> LENS_FOCAL_LENGTH = 12035a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Float>("android.lens.focalLength", float.class); 12045a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 12055a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1206ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Distance to plane of sharpest focus, 1207ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * measured from frontmost surface of the lens</p> 1208ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * <p>0 means infinity focus. Used value will be clamped 1209ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * to [0, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}].</p> 1210ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * <p>Like {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, this setting won't be applied 1211ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * instantaneously, and it may take several frames before the lens 1212ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * can move to the requested focus distance. While the lens is still moving, 1213ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p> 1214ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * 1215ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * @see CaptureRequest#LENS_FOCAL_LENGTH 1216ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 1217ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * @see CaptureResult#LENS_STATE 12185a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 12195a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Float> LENS_FOCUS_DISTANCE = 12205a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Float>("android.lens.focusDistance", float.class); 12215a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 12225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 122300849b3a430ce164af2db94eeacfd46131de4be8Ruben Brunk * <p>Sets whether the camera device uses optical image stabilization (OIS) 122400849b3a430ce164af2db94eeacfd46131de4be8Ruben Brunk * when capturing images.</p> 122500849b3a430ce164af2db94eeacfd46131de4be8Ruben Brunk * <p>OIS is used to compensate for motion blur due to small movements of 122600849b3a430ce164af2db94eeacfd46131de4be8Ruben Brunk * the camera during capture. Unlike digital image stabilization, OIS makes 122700849b3a430ce164af2db94eeacfd46131de4be8Ruben Brunk * use of mechanical elements to stabilize the camera sensor, and thus 122800849b3a430ce164af2db94eeacfd46131de4be8Ruben Brunk * allows for longer exposure times before camera shake becomes 122900849b3a430ce164af2db94eeacfd46131de4be8Ruben Brunk * apparent.</p> 123000849b3a430ce164af2db94eeacfd46131de4be8Ruben Brunk * <p>This is not expected to be supported on most devices.</p> 12315a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #LENS_OPTICAL_STABILIZATION_MODE_OFF 12325a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #LENS_OPTICAL_STABILIZATION_MODE_ON 12335a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 12345a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> LENS_OPTICAL_STABILIZATION_MODE = 12355a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.lens.opticalStabilizationMode", int.class); 12365a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 12375a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1238ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Mode of operation for the noise reduction 1239ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * algorithm</p> 12402807936f5dfdeff25e9ace3482100511a69dcf13Zhijun He * <p>Noise filtering control. OFF means no noise reduction 1241cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * will be applied by the camera device.</p> 12426dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk * <p>This must be set to a valid mode in 12436dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk * {@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes}.</p> 12445f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * <p>FAST/HIGH_QUALITY both mean camera device determined noise filtering 12455f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * will be applied. HIGH_QUALITY mode indicates that the camera device 12465f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * will use the highest-quality noise filtering algorithms, 12475f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * even if it slows down capture rate. FAST means the camera device should not 12482807936f5dfdeff25e9ace3482100511a69dcf13Zhijun He * slow down capture rate when applying noise filtering.</p> 12496dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk * 12506dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES 12515a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #NOISE_REDUCTION_MODE_OFF 12525a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #NOISE_REDUCTION_MODE_FAST 12535a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #NOISE_REDUCTION_MODE_HIGH_QUALITY 12545a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 12555a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> NOISE_REDUCTION_MODE = 12565a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.noiseReduction.mode", int.class); 12575a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 12585a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1259ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>An application-specified ID for the current 12605a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * request. Must be maintained unchanged in output 1261ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * frame</p> 12625a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @hide 12635a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 12645a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> REQUEST_ID = 12655a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.request.id", int.class); 12665a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 12675a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1268ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>(x, y, width, height).</p> 1269ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>A rectangle with the top-level corner of (x,y) and size 12705a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * (width, height). The region of the sensor that is used for 12715a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * output. Each stream must use this rectangle to produce its 12725a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * output, cropping to a smaller region if necessary to 1273ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * maintain the stream's aspect ratio.</p> 1274ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>HAL2.x uses only (x, y, width)</p> 12759e6d1880c288d7d0ddcb651dda88d069f058ecedZhijun He * <p>The crop region is applied after the RAW to other color space (e.g. YUV) 12769e6d1880c288d7d0ddcb651dda88d069f058ecedZhijun He * conversion. Since raw streams (e.g. RAW16) don't have the conversion stage, 12779e6d1880c288d7d0ddcb651dda88d069f058ecedZhijun He * it is not croppable. The crop region will be ignored by raw streams.</p> 12789e6d1880c288d7d0ddcb651dda88d069f058ecedZhijun He * <p>For non-raw streams, any additional per-stream cropping will 12799e6d1880c288d7d0ddcb651dda88d069f058ecedZhijun He * be done to maximize the final pixel area of the stream.</p> 1280ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>For example, if the crop region is set to a 4:3 aspect 12815a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * ratio, then 4:3 streams should use the exact crop 12825a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * region. 16:9 streams should further crop vertically 1283ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * (letterbox).</p> 1284ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Conversely, if the crop region is set to a 16:9, then 4:3 12855a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * outputs should crop horizontally (pillarbox), and 16:9 12865a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * streams should match exactly. These additional crops must 1287ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * be centered within the crop region.</p> 1288ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>The output streams must maintain square pixels at all 12895a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * times, no matter what the relative aspect ratios of the 12905a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * crop region and the stream are. Negative values for 12915a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * corner are allowed for raw output if full pixel array is 12925a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * larger than active pixel array. Width and height may be 12935a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * rounded to nearest larger supportable width, especially 12945a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * for raw output, where only a few fixed scales may be 12955a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * possible. The width and height of the crop region cannot 12965a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * be set to be smaller than floor( activeArraySize.width / 1297d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} ) and floor( 1298d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * activeArraySize.height / 1299d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom}), respectively.</p> 1300d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * 1301d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * @see CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM 13025a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 13035a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<android.graphics.Rect> SCALER_CROP_REGION = 13045a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<android.graphics.Rect>("android.scaler.cropRegion", android.graphics.Rect.class); 13055a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 13065a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1307ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Duration each pixel is exposed to 1308ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * light.</p> 1309ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>If the sensor can't expose this exact duration, it should shorten the 1310ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * duration exposed to the nearest possible value (rather than expose longer).</p> 13115a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 13125a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Long> SENSOR_EXPOSURE_TIME = 13135a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Long>("android.sensor.exposureTime", long.class); 13145a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 13155a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1316ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Duration from start of frame exposure to 1317143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * start of next frame exposure.</p> 1318143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <p>The maximum frame rate that can be supported by a camera subsystem is 1319143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * a function of many factors:</p> 1320143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <ul> 1321143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <li>Requested resolutions of output image streams</li> 1322143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <li>Availability of binning / skipping modes on the imager</li> 1323143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <li>The bandwidth of the imager interface</li> 1324143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <li>The bandwidth of the various ISP processing blocks</li> 1325143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * </ul> 1326143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <p>Since these factors can vary greatly between different ISPs and 1327143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * sensors, the camera abstraction tries to represent the bandwidth 1328143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * restrictions with as simple a model as possible.</p> 1329143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <p>The model presented has the following characteristics:</p> 1330143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <ul> 1331143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <li>The image sensor is always configured to output the smallest 1332143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * resolution possible given the application's requested output stream 1333143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * sizes. The smallest resolution is defined as being at least as large 1334143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * as the largest requested output stream size; the camera pipeline must 1335143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * never digitally upsample sensor data when the crop region covers the 1336143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * whole sensor. In general, this means that if only small output stream 1337143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * resolutions are configured, the sensor can provide a higher frame 1338143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * rate.</li> 1339143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <li>Since any request may use any or all the currently configured 1340143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * output streams, the sensor and ISP must be configured to support 1341143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * scaling a single capture to all the streams at the same time. This 1342143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * means the camera pipeline must be ready to produce the largest 1343143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * requested output size without any delay. Therefore, the overall 1344143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * frame rate of a given configured stream set is governed only by the 1345143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * largest requested stream resolution.</li> 1346143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <li>Using more than one output stream in a request does not affect the 1347143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * frame duration.</li> 1348a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * <li>Certain format-streams may need to do additional background processing 1349a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * before data is consumed/produced by that stream. These processors 1350a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * can run concurrently to the rest of the camera pipeline, but 1351a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * cannot process more than 1 capture at a time.</li> 1352143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * </ul> 1353143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <p>The necessary information for the application, given the model above, 13549c595174ccaaf3d36315c4a100e47ee4369073f6Igor Murashkin * is provided via the {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} field 13559c595174ccaaf3d36315c4a100e47ee4369073f6Igor Murashkin * using StreamConfigurationMap#getOutputMinFrameDuration(int, Size). 1356143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * These are used to determine the maximum frame rate / minimum frame 1357143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * duration that is possible for a given stream configuration.</p> 1358143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <p>Specifically, the application can use the following rules to 1359a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * determine the minimum frame duration it can request from the camera 1360143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * device:</p> 1361143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <ol> 1362a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * <li>Let the set of currently configured input/output streams 1363a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * be called <code>S</code>.</li> 1364a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * <li>Find the minimum frame durations for each stream in <code>S</code>, by 13659c595174ccaaf3d36315c4a100e47ee4369073f6Igor Murashkin * looking it up in {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} using 13669c595174ccaaf3d36315c4a100e47ee4369073f6Igor Murashkin * StreamConfigurationMap#getOutputMinFrameDuration(int, Size) (with 1367a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * its respective size/format). Let this set of frame durations be called 1368a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * <code>F</code>.</li> 1369a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * <li>For any given request <code>R</code>, the minimum frame duration allowed 1370a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * for <code>R</code> is the maximum out of all values in <code>F</code>. Let the streams 1371a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * used in <code>R</code> be called <code>S_r</code>.</li> 1372143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * </ol> 1373a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * <p>If none of the streams in <code>S_r</code> have a stall time (listed in 13749c595174ccaaf3d36315c4a100e47ee4369073f6Igor Murashkin * StreamConfigurationMap#getOutputStallDuration(int,Size) using its 13759c595174ccaaf3d36315c4a100e47ee4369073f6Igor Murashkin * respective size/format), then the frame duration in 1376a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * <code>F</code> determines the steady state frame rate that the application will 1377a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * get if it uses <code>R</code> as a repeating request. Let this special kind 1378a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * of request be called <code>Rsimple</code>.</p> 1379a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * <p>A repeating request <code>Rsimple</code> can be <em>occasionally</em> interleaved 1380a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * by a single capture of a new request <code>Rstall</code> (which has at least 1381a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * one in-use stream with a non-0 stall time) and if <code>Rstall</code> has the 1382a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * same minimum frame duration this will not cause a frame rate loss 1383a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * if all buffers from the previous <code>Rstall</code> have already been 1384a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * delivered.</p> 1385a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * <p>For more details about stalling, see 13869c595174ccaaf3d36315c4a100e47ee4369073f6Igor Murashkin * StreamConfigurationMap#getOutputStallDuration(int,Size).</p> 1387143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * 13889c595174ccaaf3d36315c4a100e47ee4369073f6Igor Murashkin * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP 13895a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 13905a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Long> SENSOR_FRAME_DURATION = 13915a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Long>("android.sensor.frameDuration", long.class); 13925a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 13935a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1394ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Gain applied to image data. Must be 13955a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * implemented through analog gain only if set to values 1396ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * below 'maximum analog sensitivity'.</p> 1397ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>If the sensor can't apply this exact gain, it should lessen the 1398ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * gain to the nearest possible value (rather than gain more).</p> 1399ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>ISO 12232:2006 REI method</p> 14005a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 14015a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> SENSOR_SENSITIVITY = 14025a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.sensor.sensitivity", int.class); 14035a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 14045a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1405c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p>A pixel <code>[R, G_even, G_odd, B]</code> that supplies the test pattern 1406c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * when {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode} is SOLID_COLOR.</p> 1407c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p>Each color channel is treated as an unsigned 32-bit integer. 1408c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * The camera device then uses the most significant X bits 1409c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * that correspond to how many bits are in its Bayer raw sensor 1410c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * output.</p> 1411c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p>For example, a sensor with RAW10 Bayer output would use the 1412c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * 10 most significant bits from each color channel.</p> 1413c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1414c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * 1415c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 1416c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin */ 1417c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin public static final Key<int[]> SENSOR_TEST_PATTERN_DATA = 1418c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin new Key<int[]>("android.sensor.testPatternData", int[].class); 1419c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin 1420c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin /** 1421c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p>When enabled, the sensor sends a test pattern instead of 1422c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * doing a real exposure from the camera.</p> 1423c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p>When a test pattern is enabled, all manual sensor controls specified 1424c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * by android.sensor.* should be ignored. All other controls should 1425c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * work as normal.</p> 1426c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p>For example, if manual flash is enabled, flash firing should still 1427c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * occur (and that the test pattern remain unmodified, since the flash 1428c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * would not actually affect it).</p> 1429c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1430c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * @see #SENSOR_TEST_PATTERN_MODE_OFF 1431c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * @see #SENSOR_TEST_PATTERN_MODE_SOLID_COLOR 1432c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS 1433c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY 1434c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * @see #SENSOR_TEST_PATTERN_MODE_PN9 1435c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * @see #SENSOR_TEST_PATTERN_MODE_CUSTOM1 1436c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin */ 1437c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin public static final Key<Integer> SENSOR_TEST_PATTERN_MODE = 1438c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin new Key<Integer>("android.sensor.testPatternMode", int.class); 1439c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin 1440c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin /** 1441ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * <p>Quality of lens shading correction applied 1442ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * to the image data.</p> 1443ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * <p>When set to OFF mode, no lens shading correction will be applied by the 1444ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * camera device, and an identity lens shading map data will be provided 1445ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * if <code>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON</code>. For example, for lens 1446574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk * shading map with size specified as <code>android.lens.info.shadingMapSize = [ 4, 3 ]</code>, 1447574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk * the output android.statistics.lensShadingMap for this case will be an identity map 1448ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * shown below:</p> 1449ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * <pre><code>[ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1450ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1451ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1452ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1453ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1454ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] 1455ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * </code></pre> 1456ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * <p>When set to other modes, lens shading correction will be applied by the 1457ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * camera device. Applications can request lens shading map data by setting 1458ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} to ON, and then the camera device will provide 1459574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk * lens shading map data in android.statistics.lensShadingMap, with size specified 1460574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk * by android.lens.info.shadingMapSize; the returned shading map data will be the one 1461fa7c755a920dc0209efa15a65bfdd2881cb42141Zhijun He * applied by the camera device for this capture request.</p> 1462fa7c755a920dc0209efa15a65bfdd2881cb42141Zhijun He * <p>The shading map data may depend on the AE and AWB statistics, therefore the reliability 1463fa7c755a920dc0209efa15a65bfdd2881cb42141Zhijun He * of the map data may be affected by the AE and AWB algorithms. When AE and AWB are in 1464fa7c755a920dc0209efa15a65bfdd2881cb42141Zhijun He * AUTO modes({@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} <code>!=</code> OFF and {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} <code>!=</code> OFF), 1465fa7c755a920dc0209efa15a65bfdd2881cb42141Zhijun He * to get best results, it is recommended that the applications wait for the AE and AWB to 1466fa7c755a920dc0209efa15a65bfdd2881cb42141Zhijun He * be converged before using the returned shading map data.</p> 1467ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * 1468fa7c755a920dc0209efa15a65bfdd2881cb42141Zhijun He * @see CaptureRequest#CONTROL_AE_MODE 1469fa7c755a920dc0209efa15a65bfdd2881cb42141Zhijun He * @see CaptureRequest#CONTROL_AWB_MODE 1470ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 1471ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * @see #SHADING_MODE_OFF 1472ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * @see #SHADING_MODE_FAST 1473ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * @see #SHADING_MODE_HIGH_QUALITY 1474ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He */ 1475ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He public static final Key<Integer> SHADING_MODE = 1476ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He new Key<Integer>("android.shading.mode", int.class); 1477ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He 1478ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He /** 1479ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>State of the face detector 1480ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * unit</p> 1481ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Whether face detection is enabled, and whether it 14825a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * should output just the basic fields or the full set of 14835a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * fields. Value must be one of the 14840da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes}.</p> 14850da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 14860da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES 14875a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #STATISTICS_FACE_DETECT_MODE_OFF 14885a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #STATISTICS_FACE_DETECT_MODE_SIMPLE 14895a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #STATISTICS_FACE_DETECT_MODE_FULL 14905a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 14915a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> STATISTICS_FACE_DETECT_MODE = 14925a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.statistics.faceDetectMode", int.class); 14935a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 14945a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 14959d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk * <p>Operating mode for hotpixel map generation.</p> 14969d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk * <p>If set to ON, a hotpixel map is returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}. 14979d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk * If set to OFF, no hotpixel map should be returned.</p> 14989d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk * <p>This must be set to a valid mode from {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES android.statistics.info.availableHotPixelMapModes}.</p> 14999d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk * 15009d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP 15019d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES 15029d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk */ 15039d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk public static final Key<Boolean> STATISTICS_HOT_PIXEL_MAP_MODE = 15049d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk new Key<Boolean>("android.statistics.hotPixelMapMode", boolean.class); 15059d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk 15069d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk /** 1507cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * <p>Whether the camera device will output the lens 1508cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * shading map in output result metadata.</p> 1509ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>When set to ON, 1510574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk * android.statistics.lensShadingMap must be provided in 15117a9b30e9e3e45d387d2fc0cb2bd2eb79da7dd268Igor Murashkin * the output result metadata.</p> 1512d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala * @see #STATISTICS_LENS_SHADING_MAP_MODE_OFF 1513d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala * @see #STATISTICS_LENS_SHADING_MAP_MODE_ON 1514d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala */ 1515d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala public static final Key<Integer> STATISTICS_LENS_SHADING_MAP_MODE = 1516d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala new Key<Integer>("android.statistics.lensShadingMapMode", int.class); 1517d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala 1518d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala /** 1519ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Tonemapping / contrast / gamma curve for the blue 1520e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 1521e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * CONTRAST_CURVE.</p> 15228490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>See android.tonemap.curveRed for more details.</p> 15230da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 15245f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * @see CaptureRequest#TONEMAP_MODE 15258490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * @hide 15265a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 15273ffd70554f85bd1ee54354f2d5c44e1bc0878227Zhijun He public static final Key<float[]> TONEMAP_CURVE_BLUE = 15283ffd70554f85bd1ee54354f2d5c44e1bc0878227Zhijun He new Key<float[]>("android.tonemap.curveBlue", float[].class); 15295a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 15305a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1531ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Tonemapping / contrast / gamma curve for the green 1532e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 1533e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * CONTRAST_CURVE.</p> 15348490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>See android.tonemap.curveRed for more details.</p> 15350da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 15365f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * @see CaptureRequest#TONEMAP_MODE 15378490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * @hide 15385a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 15393ffd70554f85bd1ee54354f2d5c44e1bc0878227Zhijun He public static final Key<float[]> TONEMAP_CURVE_GREEN = 15403ffd70554f85bd1ee54354f2d5c44e1bc0878227Zhijun He new Key<float[]>("android.tonemap.curveGreen", float[].class); 15415a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 15425a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1543ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Tonemapping / contrast / gamma curve for the red 1544e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 1545e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * CONTRAST_CURVE.</p> 1546e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>Each channel's curve is defined by an array of control points:</p> 15478490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>android.tonemap.curveRed = 1548e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ] 1549870922be2399766078d0a4e42a0158ecb9eb1f86Zhijun He * 2 <= N <= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre> 1550e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>These are sorted in order of increasing <code>Pin</code>; it is always 1551e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * guaranteed that input values 0.0 and 1.0 are included in the list to 1552e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * define a complete mapping. For input values between control points, 1553e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * the camera device must linearly interpolate between the control 1554e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * points.</p> 1555e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>Each curve can have an independent number of points, and the number 1556e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * of points can be less than max (that is, the request doesn't have to 1557e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * always provide a curve with number of points equivalent to 1558e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}).</p> 1559e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>A few examples, and their corresponding graphical mappings; these 1560e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * only specify the red channel and the precision is limited to 4 1561e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * digits, for conciseness.</p> 1562e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>Linear mapping:</p> 15638490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>android.tonemap.curveRed = [ 0, 0, 1.0, 1.0 ] 1564e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * </code></pre> 1565e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p><img alt="Linear mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png" /></p> 1566e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>Invert mapping:</p> 15678490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>android.tonemap.curveRed = [ 0, 1.0, 1.0, 0 ] 1568e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * </code></pre> 1569e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p><img alt="Inverting mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p> 1570e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>Gamma 1/2.2 mapping, with 16 control points:</p> 15718490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>android.tonemap.curveRed = [ 1572e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * 0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812, 1573e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * 0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072, 1574e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * 0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685, 1575e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * 0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ] 1576e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * </code></pre> 1577e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p> 1578e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p> 15798490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>android.tonemap.curveRed = [ 1580e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * 0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845, 1581e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * 0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130, 1582e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * 0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721, 1583e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * 0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ] 1584e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * </code></pre> 1585e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p><img alt="sRGB tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p> 15860da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 1587e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS 15880da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#TONEMAP_MODE 15898490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * @hide 15905a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 15915a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<float[]> TONEMAP_CURVE_RED = 15925a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<float[]>("android.tonemap.curveRed", float[].class); 15935a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 15945a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 15958490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>Tonemapping / contrast / gamma curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} 15968490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * is CONTRAST_CURVE.</p> 15978490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>The tonemapCurve consist of three curves for each of red, green, and blue 15988490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * channels respectively. The following example uses the red channel as an 15998490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * example. The same logic applies to green and blue channel. 16008490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * Each channel's curve is defined by an array of control points:</p> 16018490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>curveRed = 16028490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * [ P0(in, out), P1(in, out), P2(in, out), P3(in, out), ..., PN(in, out) ] 16038490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * 2 <= N <= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre> 16048490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>These are sorted in order of increasing <code>Pin</code>; it is always 16058490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * guaranteed that input values 0.0 and 1.0 are included in the list to 16068490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * define a complete mapping. For input values between control points, 16078490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * the camera device must linearly interpolate between the control 16088490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * points.</p> 16098490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>Each curve can have an independent number of points, and the number 16108490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * of points can be less than max (that is, the request doesn't have to 16118490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * always provide a curve with number of points equivalent to 16128490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}).</p> 16138490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>A few examples, and their corresponding graphical mappings; these 16148490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * only specify the red channel and the precision is limited to 4 16158490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * digits, for conciseness.</p> 16168490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>Linear mapping:</p> 16178490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>curveRed = [ (0, 0), (1.0, 1.0) ] 16188490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * </code></pre> 16198490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p><img alt="Linear mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png" /></p> 16208490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>Invert mapping:</p> 16218490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>curveRed = [ (0, 1.0), (1.0, 0) ] 16228490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * </code></pre> 16238490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p><img alt="Inverting mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p> 16248490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>Gamma 1/2.2 mapping, with 16 control points:</p> 16258490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>curveRed = [ 16268490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * (0.0000, 0.0000), (0.0667, 0.2920), (0.1333, 0.4002), (0.2000, 0.4812), 16278490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * (0.2667, 0.5484), (0.3333, 0.6069), (0.4000, 0.6594), (0.4667, 0.7072), 16288490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * (0.5333, 0.7515), (0.6000, 0.7928), (0.6667, 0.8317), (0.7333, 0.8685), 16298490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * (0.8000, 0.9035), (0.8667, 0.9370), (0.9333, 0.9691), (1.0000, 1.0000) ] 16308490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * </code></pre> 16318490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p> 16328490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p> 16338490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>curveRed = [ 16348490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * (0.0000, 0.0000), (0.0667, 0.2864), (0.1333, 0.4007), (0.2000, 0.4845), 16358490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * (0.2667, 0.5532), (0.3333, 0.6125), (0.4000, 0.6652), (0.4667, 0.7130), 16368490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * (0.5333, 0.7569), (0.6000, 0.7977), (0.6667, 0.8360), (0.7333, 0.8721), 16378490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * (0.8000, 0.9063), (0.8667, 0.9389), (0.9333, 0.9701), (1.0000, 1.0000) ] 16388490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * </code></pre> 16398490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p><img alt="sRGB tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p> 16408490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * 16418490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS 16428490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * @see CaptureRequest#TONEMAP_MODE 16438490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh */ 16448490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh public static final Key<android.hardware.camera2.params.TonemapCurve> TONEMAP_CURVE = 16458490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh new Key<android.hardware.camera2.params.TonemapCurve>("android.tonemap.curve", android.hardware.camera2.params.TonemapCurve.class); 16468490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh 16478490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh /** 1648e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>High-level global contrast/gamma/tonemapping control.</p> 1649e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>When switching to an application-defined contrast curve by setting 1650e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} to CONTRAST_CURVE, the curve is defined 1651e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * per-channel with a set of <code>(in, out)</code> points that specify the 1652e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * mapping from input high-bit-depth pixel value to the output 1653e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * low-bit-depth value. Since the actual pixel ranges of both input 1654e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * and output may change depending on the camera pipeline, the values 1655e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * are specified by normalized floating-point numbers.</p> 1656e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>More-complex color mapping operations such as 3D color look-up 1657e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * tables, selective chroma enhancement, or other non-linear color 1658e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * transforms will be disabled when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 1659e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * CONTRAST_CURVE.</p> 16606dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk * <p>This must be set to a valid mode in 16616dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk * {@link CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES android.tonemap.availableToneMapModes}.</p> 1662e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>When using either FAST or HIGH_QUALITY, the camera device will 16638490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * emit its own tonemap curve in {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}. 1664e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * These values are always available, and as close as possible to the 1665e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * actually used nonlinear/nonglobal transforms.</p> 1666fa7c755a920dc0209efa15a65bfdd2881cb42141Zhijun He * <p>If a request is sent with CONTRAST_CURVE with the camera device's 1667e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * provided curve in FAST or HIGH_QUALITY, the image's tonemap will be 1668e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * roughly the same.</p> 16693242f4fb19b77bcd2435cbe710188d012d08b005Igor Murashkin * 16706dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk * @see CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES 16718490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * @see CaptureRequest#TONEMAP_CURVE 1672e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * @see CaptureRequest#TONEMAP_MODE 16735a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #TONEMAP_MODE_CONTRAST_CURVE 16745a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #TONEMAP_MODE_FAST 16755a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #TONEMAP_MODE_HIGH_QUALITY 16765a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 16775a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> TONEMAP_MODE = 16785a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.tonemap.mode", int.class); 16795a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 16805a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1681ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>This LED is nominally used to indicate to the user 16825a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * that the camera is powered on and may be streaming images back to the 16835a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * Application Processor. In certain rare circumstances, the OS may 16845a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * disable this when video is processed locally and not transmitted to 1685ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * any untrusted applications.</p> 1686ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>In particular, the LED <em>must</em> always be on when the data could be 1687ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * transmitted off the device. The LED <em>should</em> always be on whenever 1688ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * data is stored locally on the device.</p> 1689ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>The LED <em>may</em> be off if a trusted application is using the data that 1690ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * doesn't violate the above rules.</p> 16915a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @hide 16925a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 16935a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Boolean> LED_TRANSMIT = 16945a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Boolean>("android.led.transmit", boolean.class); 16955a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 16965a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1697ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Whether black-level compensation is locked 16980956af56a294397325f2695604229ab7550364caEino-Ville Talvala * to its current values, or is free to vary.</p> 1699ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>When set to ON, the values used for black-level 17000956af56a294397325f2695604229ab7550364caEino-Ville Talvala * compensation will not change until the lock is set to 17010956af56a294397325f2695604229ab7550364caEino-Ville Talvala * OFF.</p> 1702ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Since changes to certain capture parameters (such as 17035a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * exposure time) may require resetting of black level 17040956af56a294397325f2695604229ab7550364caEino-Ville Talvala * compensation, the camera device must report whether setting 17050956af56a294397325f2695604229ab7550364caEino-Ville Talvala * the black level lock was successful in the output result 1706ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * metadata.</p> 1707ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>For example, if a sequence of requests is as follows:</p> 1708ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <ul> 1709ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Request 1: Exposure = 10ms, Black level lock = OFF</li> 1710ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Request 2: Exposure = 10ms, Black level lock = ON</li> 1711ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Request 3: Exposure = 10ms, Black level lock = ON</li> 1712ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Request 4: Exposure = 20ms, Black level lock = ON</li> 1713ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Request 5: Exposure = 20ms, Black level lock = ON</li> 1714ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Request 6: Exposure = 20ms, Black level lock = ON</li> 1715ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * </ul> 17160956af56a294397325f2695604229ab7550364caEino-Ville Talvala * <p>And the exposure change in Request 4 requires the camera 17170956af56a294397325f2695604229ab7550364caEino-Ville Talvala * device to reset the black level offsets, then the output 17180956af56a294397325f2695604229ab7550364caEino-Ville Talvala * result metadata is expected to be:</p> 1719ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <ul> 1720ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Result 1: Exposure = 10ms, Black level lock = OFF</li> 1721ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Result 2: Exposure = 10ms, Black level lock = ON</li> 1722ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Result 3: Exposure = 10ms, Black level lock = ON</li> 1723ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Result 4: Exposure = 20ms, Black level lock = OFF</li> 1724ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Result 5: Exposure = 20ms, Black level lock = ON</li> 1725ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Result 6: Exposure = 20ms, Black level lock = ON</li> 1726ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * </ul> 17270956af56a294397325f2695604229ab7550364caEino-Ville Talvala * <p>This indicates to the application that on frame 4, black 17280956af56a294397325f2695604229ab7550364caEino-Ville Talvala * levels were reset due to exposure value changes, and pixel 17290956af56a294397325f2695604229ab7550364caEino-Ville Talvala * values may not be consistent across captures.</p> 17300956af56a294397325f2695604229ab7550364caEino-Ville Talvala * <p>The camera device will maintain the lock to the extent 17310956af56a294397325f2695604229ab7550364caEino-Ville Talvala * possible, only overriding the lock to OFF when changes to 17320956af56a294397325f2695604229ab7550364caEino-Ville Talvala * other request parameters require a black level recalculation 17330956af56a294397325f2695604229ab7550364caEino-Ville Talvala * or reset.</p> 17345a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 17355a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Boolean> BLACK_LEVEL_LOCK = 17365a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Boolean>("android.blackLevel.lock", boolean.class); 17375a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 17385a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 17395a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * End generated code 17405a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/ 17415a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala} 1742