Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2013 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Eino-Ville Talvala | 2f1a2e4 | 2013-07-25 17:12:05 -0700 | [diff] [blame] | 17 | package android.hardware.camera2; |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 18 | |
Eino-Ville Talvala | 8b90557 | 2015-05-14 15:43:01 -0700 | [diff] [blame] | 19 | import android.annotation.NonNull; |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 20 | import android.hardware.camera2.impl.CameraMetadataNative; |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 21 | import android.hardware.camera2.impl.PublicKey; |
| 22 | import android.hardware.camera2.impl.SyntheticKey; |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 23 | import android.util.Log; |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 24 | |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 25 | import java.lang.reflect.Field; |
Igor Murashkin | 03fdb14 | 2013-09-30 12:14:58 -0700 | [diff] [blame] | 26 | import java.lang.reflect.Modifier; |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 27 | import java.util.ArrayList; |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 28 | import java.util.Arrays; |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 29 | import java.util.Collections; |
| 30 | import java.util.List; |
| 31 | |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 32 | /** |
| 33 | * The base class for camera controls and information. |
| 34 | * |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 35 | * <p> |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 36 | * This class defines the basic key/value map used for querying for camera |
| 37 | * characteristics or capture results, and for setting camera request |
| 38 | * parameters. |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 39 | * </p> |
| 40 | * |
| 41 | * <p> |
| 42 | * All instances of CameraMetadata are immutable. The list of keys with {@link #getKeys()} |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 43 | * never changes, nor do the values returned by any key with {@code #get} throughout |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 44 | * the lifetime of the object. |
| 45 | * </p> |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 46 | * |
| 47 | * @see CameraDevice |
| 48 | * @see CameraManager |
Igor Murashkin | 68f4006 | 2013-09-10 12:15:54 -0700 | [diff] [blame] | 49 | * @see CameraCharacteristics |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 50 | **/ |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 51 | public abstract class CameraMetadata<TKey> { |
| 52 | |
| 53 | private static final String TAG = "CameraMetadataAb"; |
Eino-Ville Talvala | a78791f | 2015-06-01 12:39:54 -0700 | [diff] [blame] | 54 | private static final boolean DEBUG = false; |
Emilian Peev | de62d84 | 2017-03-23 19:20:40 +0000 | [diff] [blame] | 55 | private CameraMetadataNative mNativeInstance = null; |
Igor Murashkin | 7072550 | 2013-06-25 20:27:06 +0000 | [diff] [blame] | 56 | |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 57 | /** |
Igor Murashkin | 68f4006 | 2013-09-10 12:15:54 -0700 | [diff] [blame] | 58 | * Set a camera metadata field to a value. The field definitions can be |
| 59 | * found in {@link CameraCharacteristics}, {@link CaptureResult}, and |
| 60 | * {@link CaptureRequest}. |
| 61 | * |
| 62 | * @param key The metadata field to write. |
| 63 | * @param value The value to set the field to, which must be of a matching |
| 64 | * type to the key. |
| 65 | * |
Eino-Ville Talvala | 70c2207 | 2013-08-27 12:09:04 -0700 | [diff] [blame] | 66 | * @hide |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 67 | */ |
Eino-Ville Talvala | 70c2207 | 2013-08-27 12:09:04 -0700 | [diff] [blame] | 68 | protected CameraMetadata() { |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 69 | } |
| 70 | |
| 71 | /** |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 72 | * Get a camera metadata field value. |
| 73 | * |
| 74 | * <p>The field definitions can be |
Igor Murashkin | 68f4006 | 2013-09-10 12:15:54 -0700 | [diff] [blame] | 75 | * found in {@link CameraCharacteristics}, {@link CaptureResult}, and |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 76 | * {@link CaptureRequest}.</p> |
| 77 | * |
| 78 | * <p>Querying the value for the same key more than once will return a value |
| 79 | * which is equal to the previous queried value.</p> |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 80 | * |
Igor Murashkin | b519cc5 | 2013-07-02 11:23:44 -0700 | [diff] [blame] | 81 | * @throws IllegalArgumentException if the key was not valid |
| 82 | * |
Benjamin Hendricks | 24eb8a3 | 2013-08-15 12:46:22 -0700 | [diff] [blame] | 83 | * @param key The metadata field to read. |
| 84 | * @return The value of that key, or {@code null} if the field is not set. |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 85 | * |
| 86 | * @hide |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 87 | */ |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 88 | protected abstract <T> T getProtected(TKey key); |
| 89 | |
| 90 | /** |
| 91 | * @hide |
| 92 | */ |
Emilian Peev | de62d84 | 2017-03-23 19:20:40 +0000 | [diff] [blame] | 93 | protected void setNativeInstance(CameraMetadataNative nativeInstance) { |
| 94 | mNativeInstance = nativeInstance; |
| 95 | } |
| 96 | |
| 97 | /** |
| 98 | * @hide |
| 99 | */ |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 100 | protected abstract Class<TKey> getKeyClass(); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 101 | |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 102 | /** |
| 103 | * Returns a list of the keys contained in this map. |
| 104 | * |
| 105 | * <p>The list returned is not modifiable, so any attempts to modify it will throw |
| 106 | * a {@code UnsupportedOperationException}.</p> |
| 107 | * |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 108 | * <p>All values retrieved by a key from this list with {@code #get} are guaranteed to be |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 109 | * non-{@code null}. Each key is only listed once in the list. The order of the keys |
| 110 | * is undefined.</p> |
| 111 | * |
| 112 | * @return List of the keys contained in this map. |
| 113 | */ |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 114 | @SuppressWarnings("unchecked") |
Eino-Ville Talvala | 8b90557 | 2015-05-14 15:43:01 -0700 | [diff] [blame] | 115 | @NonNull |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 116 | public List<TKey> getKeys() { |
| 117 | Class<CameraMetadata<TKey>> thisClass = (Class<CameraMetadata<TKey>>) getClass(); |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 118 | return Collections.unmodifiableList( |
Emilian Peev | de62d84 | 2017-03-23 19:20:40 +0000 | [diff] [blame] | 119 | getKeys(thisClass, getKeyClass(), this, /*filterTags*/null)); |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 120 | } |
| 121 | |
| 122 | /** |
| 123 | * Return a list of all the Key<?> that are declared as a field inside of the class |
| 124 | * {@code type}. |
| 125 | * |
| 126 | * <p> |
| 127 | * Optionally, if {@code instance} is not null, then filter out any keys with null values. |
| 128 | * </p> |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 129 | * |
| 130 | * <p> |
| 131 | * Optionally, if {@code filterTags} is not {@code null}, then filter out any keys |
| 132 | * whose native {@code tag} is not in {@code filterTags}. The {@code filterTags} array will be |
| 133 | * sorted as a side effect. |
| 134 | * </p> |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 135 | */ |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 136 | /*package*/ @SuppressWarnings("unchecked") |
Emilian Peev | de62d84 | 2017-03-23 19:20:40 +0000 | [diff] [blame] | 137 | <TKey> ArrayList<TKey> getKeys( |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 138 | Class<?> type, Class<TKey> keyClass, |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 139 | CameraMetadata<TKey> instance, |
| 140 | int[] filterTags) { |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 141 | |
Eino-Ville Talvala | a78791f | 2015-06-01 12:39:54 -0700 | [diff] [blame] | 142 | if (DEBUG) Log.v(TAG, "getKeysStatic for " + type); |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 143 | |
Igor Murashkin | 696bbee | 2014-08-07 18:02:51 -0700 | [diff] [blame] | 144 | // TotalCaptureResult does not have any of the keys on it, use CaptureResult instead |
| 145 | if (type.equals(TotalCaptureResult.class)) { |
| 146 | type = CaptureResult.class; |
| 147 | } |
| 148 | |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 149 | if (filterTags != null) { |
| 150 | Arrays.sort(filterTags); |
| 151 | } |
| 152 | |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 153 | ArrayList<TKey> keyList = new ArrayList<TKey>(); |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 154 | |
| 155 | Field[] fields = type.getDeclaredFields(); |
| 156 | for (Field field : fields) { |
Igor Murashkin | 03fdb14 | 2013-09-30 12:14:58 -0700 | [diff] [blame] | 157 | // Filter for Keys that are public |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 158 | if (field.getType().isAssignableFrom(keyClass) && |
Igor Murashkin | 03fdb14 | 2013-09-30 12:14:58 -0700 | [diff] [blame] | 159 | (field.getModifiers() & Modifier.PUBLIC) != 0) { |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 160 | |
| 161 | TKey key; |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 162 | try { |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 163 | key = (TKey) field.get(instance); |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 164 | } catch (IllegalAccessException e) { |
| 165 | throw new AssertionError("Can't get IllegalAccessException", e); |
| 166 | } catch (IllegalArgumentException e) { |
| 167 | throw new AssertionError("Can't get IllegalArgumentException", e); |
| 168 | } |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 169 | |
| 170 | if (instance == null || instance.getProtected(key) != null) { |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 171 | if (shouldKeyBeAdded(key, field, filterTags)) { |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 172 | keyList.add(key); |
| 173 | |
Eino-Ville Talvala | a78791f | 2015-06-01 12:39:54 -0700 | [diff] [blame] | 174 | if (DEBUG) { |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 175 | Log.v(TAG, "getKeysStatic - key was added - " + key); |
| 176 | } |
Eino-Ville Talvala | a78791f | 2015-06-01 12:39:54 -0700 | [diff] [blame] | 177 | } else if (DEBUG) { |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 178 | Log.v(TAG, "getKeysStatic - key was filtered - " + key); |
| 179 | } |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 180 | } |
| 181 | } |
| 182 | } |
| 183 | |
Emilian Peev | de62d84 | 2017-03-23 19:20:40 +0000 | [diff] [blame] | 184 | if (null == mNativeInstance) { |
| 185 | return keyList; |
| 186 | } |
| 187 | |
| 188 | ArrayList<TKey> vendorKeys = mNativeInstance.getAllVendorKeys(keyClass); |
Ruben Brunk | c620eb7 | 2015-07-29 18:19:11 -0700 | [diff] [blame] | 189 | |
| 190 | if (vendorKeys != null) { |
| 191 | for (TKey k : vendorKeys) { |
| 192 | String keyName; |
Emilian Peev | de62d84 | 2017-03-23 19:20:40 +0000 | [diff] [blame] | 193 | long vendorId; |
Ruben Brunk | c620eb7 | 2015-07-29 18:19:11 -0700 | [diff] [blame] | 194 | if (k instanceof CaptureRequest.Key<?>) { |
| 195 | keyName = ((CaptureRequest.Key<?>) k).getName(); |
Emilian Peev | de62d84 | 2017-03-23 19:20:40 +0000 | [diff] [blame] | 196 | vendorId = ((CaptureRequest.Key<?>) k).getVendorId(); |
Ruben Brunk | c620eb7 | 2015-07-29 18:19:11 -0700 | [diff] [blame] | 197 | } else if (k instanceof CaptureResult.Key<?>) { |
| 198 | keyName = ((CaptureResult.Key<?>) k).getName(); |
Emilian Peev | de62d84 | 2017-03-23 19:20:40 +0000 | [diff] [blame] | 199 | vendorId = ((CaptureResult.Key<?>) k).getVendorId(); |
Ruben Brunk | c620eb7 | 2015-07-29 18:19:11 -0700 | [diff] [blame] | 200 | } else if (k instanceof CameraCharacteristics.Key<?>) { |
| 201 | keyName = ((CameraCharacteristics.Key<?>) k).getName(); |
Emilian Peev | de62d84 | 2017-03-23 19:20:40 +0000 | [diff] [blame] | 202 | vendorId = ((CameraCharacteristics.Key<?>) k).getVendorId(); |
Ruben Brunk | c620eb7 | 2015-07-29 18:19:11 -0700 | [diff] [blame] | 203 | } else { |
| 204 | continue; |
| 205 | } |
| 206 | |
| 207 | if (filterTags == null || Arrays.binarySearch(filterTags, |
Emilian Peev | de62d84 | 2017-03-23 19:20:40 +0000 | [diff] [blame] | 208 | CameraMetadataNative.getTag(keyName, vendorId)) >= 0) { |
Ruben Brunk | c620eb7 | 2015-07-29 18:19:11 -0700 | [diff] [blame] | 209 | keyList.add(k); |
| 210 | } |
| 211 | } |
| 212 | } |
| 213 | |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 214 | return keyList; |
| 215 | } |
| 216 | |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 217 | @SuppressWarnings("rawtypes") |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 218 | private static <TKey> boolean shouldKeyBeAdded(TKey key, Field field, int[] filterTags) { |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 219 | if (key == null) { |
| 220 | throw new NullPointerException("key must not be null"); |
| 221 | } |
| 222 | |
| 223 | CameraMetadataNative.Key nativeKey; |
| 224 | |
| 225 | /* |
| 226 | * Get the native key from the public api key |
| 227 | */ |
| 228 | if (key instanceof CameraCharacteristics.Key) { |
| 229 | nativeKey = ((CameraCharacteristics.Key)key).getNativeKey(); |
| 230 | } else if (key instanceof CaptureResult.Key) { |
| 231 | nativeKey = ((CaptureResult.Key)key).getNativeKey(); |
| 232 | } else if (key instanceof CaptureRequest.Key) { |
| 233 | nativeKey = ((CaptureRequest.Key)key).getNativeKey(); |
| 234 | } else { |
| 235 | // Reject fields that aren't a key |
| 236 | throw new IllegalArgumentException("key type must be that of a metadata key"); |
| 237 | } |
| 238 | |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 239 | if (field.getAnnotation(PublicKey.class) == null) { |
| 240 | // Never expose @hide keys up to the API user |
| 241 | return false; |
| 242 | } |
| 243 | |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 244 | // No filtering necessary |
| 245 | if (filterTags == null) { |
| 246 | return true; |
| 247 | } |
| 248 | |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 249 | if (field.getAnnotation(SyntheticKey.class) != null) { |
| 250 | // This key is synthetic, so calling #getTag will throw IAE |
| 251 | |
| 252 | // TODO: don't just assume all public+synthetic keys are always available |
| 253 | return true; |
| 254 | } |
| 255 | |
| 256 | /* |
| 257 | * Regular key: look up it's native tag and see if it's in filterTags |
| 258 | */ |
| 259 | |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 260 | int keyTag = nativeKey.getTag(); |
| 261 | |
| 262 | // non-negative result is returned iff the value is in the array |
| 263 | return Arrays.binarySearch(filterTags, keyTag) >= 0; |
| 264 | } |
| 265 | |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 266 | /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ |
| 267 | * The enum values below this point are generated from metadata |
| 268 | * definitions in /system/media/camera/docs. Do not modify by hand or |
| 269 | * modify the comment blocks at the start or end. |
| 270 | *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/ |
| 271 | |
| 272 | // |
Zhijun He | ff41393 | 2014-02-07 15:44:30 -0800 | [diff] [blame] | 273 | // Enumeration values for CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION |
| 274 | // |
| 275 | |
| 276 | /** |
| 277 | * <p>The lens focus distance is not accurate, and the units used for |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 278 | * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} do not correspond to any physical units.</p> |
| 279 | * <p>Setting the lens to the same focus distance on separate occasions may |
Zhijun He | ff41393 | 2014-02-07 15:44:30 -0800 | [diff] [blame] | 280 | * result in a different real focus distance, depending on factors such |
| 281 | * as the orientation of the device, the age of the focusing mechanism, |
| 282 | * and the device temperature. The focus distance value will still be |
| 283 | * in the range of <code>[0, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code>, where 0 |
| 284 | * represents the farthest focus.</p> |
| 285 | * |
| 286 | * @see CaptureRequest#LENS_FOCUS_DISTANCE |
| 287 | * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE |
| 288 | * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION |
| 289 | */ |
| 290 | public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED = 0; |
| 291 | |
| 292 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 293 | * <p>The lens focus distance is measured in diopters.</p> |
| 294 | * <p>However, setting the lens to the same focus distance |
| 295 | * on separate occasions may result in a different real |
| 296 | * focus distance, depending on factors such as the |
| 297 | * orientation of the device, the age of the focusing |
| 298 | * mechanism, and the device temperature.</p> |
Zhijun He | ff41393 | 2014-02-07 15:44:30 -0800 | [diff] [blame] | 299 | * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION |
| 300 | */ |
| 301 | public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE = 1; |
| 302 | |
| 303 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 304 | * <p>The lens focus distance is measured in diopters, and |
| 305 | * is calibrated.</p> |
| 306 | * <p>The lens mechanism is calibrated so that setting the |
| 307 | * same focus distance is repeatable on multiple |
| 308 | * occasions with good accuracy, and the focus distance |
| 309 | * corresponds to the real physical distance to the plane |
| 310 | * of best focus.</p> |
Zhijun He | ff41393 | 2014-02-07 15:44:30 -0800 | [diff] [blame] | 311 | * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION |
| 312 | */ |
| 313 | public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED = 2; |
| 314 | |
| 315 | // |
Igor Murashkin | 68f4006 | 2013-09-10 12:15:54 -0700 | [diff] [blame] | 316 | // Enumeration values for CameraCharacteristics#LENS_FACING |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 317 | // |
| 318 | |
| 319 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 320 | * <p>The camera device faces the same direction as the device's screen.</p> |
Igor Murashkin | 68f4006 | 2013-09-10 12:15:54 -0700 | [diff] [blame] | 321 | * @see CameraCharacteristics#LENS_FACING |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 322 | */ |
| 323 | public static final int LENS_FACING_FRONT = 0; |
| 324 | |
| 325 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 326 | * <p>The camera device faces the opposite direction as the device's screen.</p> |
Igor Murashkin | 68f4006 | 2013-09-10 12:15:54 -0700 | [diff] [blame] | 327 | * @see CameraCharacteristics#LENS_FACING |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 328 | */ |
| 329 | public static final int LENS_FACING_BACK = 1; |
| 330 | |
Zhijun He | 503e815 | 2015-01-12 15:16:56 -0800 | [diff] [blame] | 331 | /** |
| 332 | * <p>The camera device is an external camera, and has no fixed facing relative to the |
| 333 | * device's screen.</p> |
| 334 | * @see CameraCharacteristics#LENS_FACING |
| 335 | */ |
| 336 | public static final int LENS_FACING_EXTERNAL = 2; |
| 337 | |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 338 | // |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 339 | // Enumeration values for CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 340 | // |
| 341 | |
| 342 | /** |
| 343 | * <p>The minimal set of capabilities that every camera |
| 344 | * device (regardless of {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}) |
Eino-Ville Talvala | 08bc3b0 | 2014-07-09 10:07:36 -0700 | [diff] [blame] | 345 | * supports.</p> |
Eino-Ville Talvala | 0b7b03b | 2015-04-13 17:29:52 -0700 | [diff] [blame] | 346 | * <p>This capability is listed by all normal devices, and |
Eino-Ville Talvala | 08bc3b0 | 2014-07-09 10:07:36 -0700 | [diff] [blame] | 347 | * indicates that the camera device has a feature set |
| 348 | * that's comparable to the baseline requirements for the |
| 349 | * older android.hardware.Camera API.</p> |
Eino-Ville Talvala | 0b7b03b | 2015-04-13 17:29:52 -0700 | [diff] [blame] | 350 | * <p>Devices with the DEPTH_OUTPUT capability might not list this |
| 351 | * capability, indicating that they support only depth measurement, |
| 352 | * not standard color output.</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 353 | * |
| 354 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
| 355 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 356 | */ |
| 357 | public static final int REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE = 0; |
| 358 | |
| 359 | /** |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 360 | * <p>The camera device can be manually controlled (3A algorithms such |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 361 | * as auto-exposure, and auto-focus can be bypassed). |
Zhijun He | 50f7243 | 2014-05-28 13:52:04 -0700 | [diff] [blame] | 362 | * The camera device supports basic manual control of the sensor image |
| 363 | * acquisition related stages. This means the following controls are |
| 364 | * guaranteed to be supported:</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 365 | * <ul> |
Zhijun He | 50f7243 | 2014-05-28 13:52:04 -0700 | [diff] [blame] | 366 | * <li>Manual frame duration control<ul> |
| 367 | * <li>{@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}</li> |
| 368 | * <li>{@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li> |
Zhijun He | 50f7243 | 2014-05-28 13:52:04 -0700 | [diff] [blame] | 369 | * </ul> |
| 370 | * </li> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 371 | * <li>Manual exposure control<ul> |
| 372 | * <li>{@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</li> |
| 373 | * <li>{@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li> |
| 374 | * </ul> |
| 375 | * </li> |
| 376 | * <li>Manual sensitivity control<ul> |
| 377 | * <li>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</li> |
| 378 | * <li>{@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</li> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 379 | * </ul> |
| 380 | * </li> |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 381 | * <li>Manual lens control (if the lens is adjustable)<ul> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 382 | * <li>android.lens.*</li> |
| 383 | * </ul> |
| 384 | * </li> |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 385 | * <li>Manual flash control (if a flash unit is present)<ul> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 386 | * <li>android.flash.*</li> |
| 387 | * </ul> |
| 388 | * </li> |
| 389 | * <li>Manual black level locking<ul> |
| 390 | * <li>{@link CaptureRequest#BLACK_LEVEL_LOCK android.blackLevel.lock}</li> |
| 391 | * </ul> |
| 392 | * </li> |
Yin-Chia Yeh | 7e3e431 | 2015-04-02 14:34:30 -0700 | [diff] [blame] | 393 | * <li>Auto exposure lock<ul> |
| 394 | * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li> |
| 395 | * </ul> |
| 396 | * </li> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 397 | * </ul> |
| 398 | * <p>If any of the above 3A algorithms are enabled, then the camera |
| 399 | * device will accurately report the values applied by 3A in the |
| 400 | * result.</p> |
Zhijun He | 50f7243 | 2014-05-28 13:52:04 -0700 | [diff] [blame] | 401 | * <p>A given camera device may also support additional manual sensor controls, |
| 402 | * but this capability only covers the above list of controls.</p> |
Ruben Brunk | 3e4fed2 | 2014-06-18 17:08:42 -0700 | [diff] [blame] | 403 | * <p>If this is supported, {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} will |
| 404 | * additionally return a min frame duration that is greater than |
| 405 | * zero for each supported size-format combination.</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 406 | * |
| 407 | * @see CaptureRequest#BLACK_LEVEL_LOCK |
Yin-Chia Yeh | 7e3e431 | 2015-04-02 14:34:30 -0700 | [diff] [blame] | 408 | * @see CaptureRequest#CONTROL_AE_LOCK |
Zhijun He | 50f7243 | 2014-05-28 13:52:04 -0700 | [diff] [blame] | 409 | * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 410 | * @see CaptureRequest#SENSOR_EXPOSURE_TIME |
Zhijun He | 50f7243 | 2014-05-28 13:52:04 -0700 | [diff] [blame] | 411 | * @see CaptureRequest#SENSOR_FRAME_DURATION |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 412 | * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE |
Zhijun He | 50f7243 | 2014-05-28 13:52:04 -0700 | [diff] [blame] | 413 | * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 414 | * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE |
| 415 | * @see CaptureRequest#SENSOR_SENSITIVITY |
| 416 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 417 | */ |
Eino-Ville Talvala | 08bc3b0 | 2014-07-09 10:07:36 -0700 | [diff] [blame] | 418 | public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR = 1; |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 419 | |
| 420 | /** |
Zhijun He | 50f7243 | 2014-05-28 13:52:04 -0700 | [diff] [blame] | 421 | * <p>The camera device post-processing stages can be manually controlled. |
| 422 | * The camera device supports basic manual control of the image post-processing |
| 423 | * stages. This means the following controls are guaranteed to be supported:</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 424 | * <ul> |
Yin-Chia Yeh | 956c52b | 2015-02-06 11:23:25 -0800 | [diff] [blame] | 425 | * <li> |
| 426 | * <p>Manual tonemap control</p> |
| 427 | * <ul> |
Yin-Chia Yeh | 8490ace | 2014-05-27 10:04:54 -0700 | [diff] [blame] | 428 | * <li>{@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}</li> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 429 | * <li>{@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</li> |
| 430 | * <li>{@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</li> |
Yin-Chia Yeh | 03d50da | 2015-05-06 00:10:11 -0700 | [diff] [blame] | 431 | * <li>{@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma}</li> |
| 432 | * <li>{@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve}</li> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 433 | * </ul> |
| 434 | * </li> |
Yin-Chia Yeh | 956c52b | 2015-02-06 11:23:25 -0800 | [diff] [blame] | 435 | * <li> |
| 436 | * <p>Manual white balance control</p> |
| 437 | * <ul> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 438 | * <li>{@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}</li> |
| 439 | * <li>{@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}</li> |
| 440 | * </ul> |
| 441 | * </li> |
Zhijun He | 28288ca | 2014-06-25 15:49:13 -0700 | [diff] [blame] | 442 | * <li>Manual lens shading map control<ul> |
| 443 | * <li>{@link CaptureRequest#SHADING_MODE android.shading.mode}</li> |
| 444 | * <li>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode}</li> |
Ruben Brunk | 5749368 | 2014-05-27 18:58:08 -0700 | [diff] [blame] | 445 | * <li>android.statistics.lensShadingMap</li> |
| 446 | * <li>android.lens.info.shadingMapSize</li> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 447 | * </ul> |
| 448 | * </li> |
Zhijun He | a05e59d | 2014-07-08 18:27:47 -0700 | [diff] [blame] | 449 | * <li>Manual aberration correction control (if aberration correction is supported)<ul> |
Zhijun He | 9e4e439 | 2014-08-18 11:12:32 -0700 | [diff] [blame] | 450 | * <li>{@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}</li> |
| 451 | * <li>{@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES android.colorCorrection.availableAberrationModes}</li> |
Zhijun He | a05e59d | 2014-07-08 18:27:47 -0700 | [diff] [blame] | 452 | * </ul> |
| 453 | * </li> |
Yin-Chia Yeh | 7e3e431 | 2015-04-02 14:34:30 -0700 | [diff] [blame] | 454 | * <li>Auto white balance lock<ul> |
| 455 | * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li> |
| 456 | * </ul> |
| 457 | * </li> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 458 | * </ul> |
| 459 | * <p>If auto white balance is enabled, then the camera device |
| 460 | * will accurately report the values applied by AWB in the result.</p> |
Zhijun He | 50f7243 | 2014-05-28 13:52:04 -0700 | [diff] [blame] | 461 | * <p>A given camera device may also support additional post-processing |
| 462 | * controls, but this capability only covers the above list of controls.</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 463 | * |
Zhijun He | 9e4e439 | 2014-08-18 11:12:32 -0700 | [diff] [blame] | 464 | * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE |
| 465 | * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 466 | * @see CaptureRequest#COLOR_CORRECTION_GAINS |
| 467 | * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM |
Yin-Chia Yeh | 7e3e431 | 2015-04-02 14:34:30 -0700 | [diff] [blame] | 468 | * @see CaptureRequest#CONTROL_AWB_LOCK |
Zhijun He | 28288ca | 2014-06-25 15:49:13 -0700 | [diff] [blame] | 469 | * @see CaptureRequest#SHADING_MODE |
| 470 | * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE |
Yin-Chia Yeh | 8490ace | 2014-05-27 10:04:54 -0700 | [diff] [blame] | 471 | * @see CaptureRequest#TONEMAP_CURVE |
Yin-Chia Yeh | 03d50da | 2015-05-06 00:10:11 -0700 | [diff] [blame] | 472 | * @see CaptureRequest#TONEMAP_GAMMA |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 473 | * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS |
| 474 | * @see CaptureRequest#TONEMAP_MODE |
Yin-Chia Yeh | 03d50da | 2015-05-06 00:10:11 -0700 | [diff] [blame] | 475 | * @see CaptureRequest#TONEMAP_PRESET_CURVE |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 476 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 477 | */ |
Eino-Ville Talvala | 08bc3b0 | 2014-07-09 10:07:36 -0700 | [diff] [blame] | 478 | public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING = 2; |
| 479 | |
| 480 | /** |
Eino-Ville Talvala | 611fece | 2014-07-10 17:29:38 -0700 | [diff] [blame] | 481 | * <p>The camera device supports outputting RAW buffers and |
| 482 | * metadata for interpreting them.</p> |
| 483 | * <p>Devices supporting the RAW capability allow both for |
| 484 | * saving DNG files, and for direct application processing of |
| 485 | * raw sensor images.</p> |
Eino-Ville Talvala | 08bc3b0 | 2014-07-09 10:07:36 -0700 | [diff] [blame] | 486 | * <ul> |
| 487 | * <li>RAW_SENSOR is supported as an output format.</li> |
| 488 | * <li>The maximum available resolution for RAW_SENSOR streams |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 489 | * will match either the value in |
| 490 | * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize} or |
Eino-Ville Talvala | d840727 | 2015-11-08 18:27:20 -0800 | [diff] [blame] | 491 | * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.</li> |
Eino-Ville Talvala | 08bc3b0 | 2014-07-09 10:07:36 -0700 | [diff] [blame] | 492 | * <li>All DNG-related optional metadata entries are provided |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 493 | * by the camera device.</li> |
Eino-Ville Talvala | 08bc3b0 | 2014-07-09 10:07:36 -0700 | [diff] [blame] | 494 | * </ul> |
| 495 | * |
Eino-Ville Talvala | 08bc3b0 | 2014-07-09 10:07:36 -0700 | [diff] [blame] | 496 | * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE |
Eino-Ville Talvala | d840727 | 2015-11-08 18:27:20 -0800 | [diff] [blame] | 497 | * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE |
Eino-Ville Talvala | 08bc3b0 | 2014-07-09 10:07:36 -0700 | [diff] [blame] | 498 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 499 | */ |
Eino-Ville Talvala | 611fece | 2014-07-10 17:29:38 -0700 | [diff] [blame] | 500 | public static final int REQUEST_AVAILABLE_CAPABILITIES_RAW = 3; |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 501 | |
| 502 | /** |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 503 | * <p>The camera device supports the Zero Shutter Lag reprocessing use case.</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 504 | * <ul> |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 505 | * <li>One input stream is supported, that is, <code>{@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} == 1</code>.</li> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 506 | * <li>{@link android.graphics.ImageFormat#PRIVATE } is supported as an output/input format, |
| 507 | * that is, {@link android.graphics.ImageFormat#PRIVATE } is included in the lists of |
| 508 | * formats returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats } and {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats }.</li> |
| 509 | * <li>{@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput } |
| 510 | * returns non empty int[] for each supported input format returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }.</li> |
| 511 | * <li>Each size returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputSizes getInputSizes(ImageFormat.PRIVATE)} is also included in {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes getOutputSizes(ImageFormat.PRIVATE)}</li> |
| 512 | * <li>Using {@link android.graphics.ImageFormat#PRIVATE } does not cause a frame rate drop |
| 513 | * relative to the sensor's maximum capture rate (at that resolution).</li> |
| 514 | * <li>{@link android.graphics.ImageFormat#PRIVATE } will be reprocessable into both |
| 515 | * {@link android.graphics.ImageFormat#YUV_420_888 } and |
| 516 | * {@link android.graphics.ImageFormat#JPEG } formats.</li> |
Chien-Yu Chen | 8062d31 | 2015-05-12 14:24:10 -0700 | [diff] [blame] | 517 | * <li>The maximum available resolution for PRIVATE streams |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 518 | * (both input/output) will match the maximum available |
| 519 | * resolution of JPEG streams.</li> |
Zhijun He | 513f7c3 | 2015-04-24 18:23:54 -0700 | [diff] [blame] | 520 | * <li>Static metadata {@link CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL android.reprocess.maxCaptureStall}.</li> |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 521 | * <li>Only below controls are effective for reprocessing requests and |
| 522 | * will be present in capture results, other controls in reprocess |
| 523 | * requests will be ignored by the camera device.<ul> |
| 524 | * <li>android.jpeg.*</li> |
| 525 | * <li>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</li> |
| 526 | * <li>{@link CaptureRequest#EDGE_MODE android.edge.mode}</li> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 527 | * </ul> |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 528 | * </li> |
Eino-Ville Talvala | 0dd1750 | 2015-07-07 10:43:07 -0700 | [diff] [blame] | 529 | * <li>{@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes} and |
| 530 | * {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes} will both list ZERO_SHUTTER_LAG as a supported mode.</li> |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 531 | * </ul> |
| 532 | * |
Eino-Ville Talvala | 0dd1750 | 2015-07-07 10:43:07 -0700 | [diff] [blame] | 533 | * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 534 | * @see CaptureRequest#EDGE_MODE |
Eino-Ville Talvala | 0dd1750 | 2015-07-07 10:43:07 -0700 | [diff] [blame] | 535 | * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 536 | * @see CaptureRequest#NOISE_REDUCTION_MODE |
Zhijun He | 513f7c3 | 2015-04-24 18:23:54 -0700 | [diff] [blame] | 537 | * @see CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 538 | * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 539 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 540 | */ |
Chien-Yu Chen | 8062d31 | 2015-05-12 14:24:10 -0700 | [diff] [blame] | 541 | public static final int REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING = 4; |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 542 | |
Ruben Brunk | 0c22e69 | 2014-11-11 12:00:34 -0800 | [diff] [blame] | 543 | /** |
| 544 | * <p>The camera device supports accurately reporting the sensor settings for many of |
| 545 | * the sensor controls while the built-in 3A algorithm is running. This allows |
| 546 | * reporting of sensor settings even when these settings cannot be manually changed.</p> |
| 547 | * <p>The values reported for the following controls are guaranteed to be available |
| 548 | * in the CaptureResult, including when 3A is enabled:</p> |
| 549 | * <ul> |
| 550 | * <li>Exposure control<ul> |
| 551 | * <li>{@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</li> |
| 552 | * </ul> |
| 553 | * </li> |
| 554 | * <li>Sensitivity control<ul> |
| 555 | * <li>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</li> |
| 556 | * </ul> |
| 557 | * </li> |
| 558 | * <li>Lens controls (if the lens is adjustable)<ul> |
| 559 | * <li>{@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}</li> |
| 560 | * <li>{@link CaptureRequest#LENS_APERTURE android.lens.aperture}</li> |
| 561 | * </ul> |
| 562 | * </li> |
| 563 | * </ul> |
| 564 | * <p>This capability is a subset of the MANUAL_SENSOR control capability, and will |
| 565 | * always be included if the MANUAL_SENSOR capability is available.</p> |
| 566 | * |
| 567 | * @see CaptureRequest#LENS_APERTURE |
| 568 | * @see CaptureRequest#LENS_FOCUS_DISTANCE |
| 569 | * @see CaptureRequest#SENSOR_EXPOSURE_TIME |
| 570 | * @see CaptureRequest#SENSOR_SENSITIVITY |
| 571 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 572 | */ |
| 573 | public static final int REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS = 5; |
| 574 | |
Eino-Ville Talvala | 126a746 | 2014-11-04 16:31:01 -0800 | [diff] [blame] | 575 | /** |
Eino-Ville Talvala | 0819c75 | 2015-06-17 11:34:41 -0700 | [diff] [blame] | 576 | * <p>The camera device supports capturing high-resolution images at >= 20 frames per |
| 577 | * second, in at least the uncompressed YUV format, when post-processing settings are set |
| 578 | * to FAST. Additionally, maximum-resolution images can be captured at >= 10 frames |
| 579 | * per second. Here, 'high resolution' means at least 8 megapixels, or the maximum |
| 580 | * resolution of the device, whichever is smaller.</p> |
| 581 | * <p>More specifically, this means that a size matching the camera device's active array |
| 582 | * size is listed as a supported size for the {@link android.graphics.ImageFormat#YUV_420_888 } format in either {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } or {@link android.hardware.camera2.params.StreamConfigurationMap#getHighResolutionOutputSizes }, |
| 583 | * with a minimum frame duration for that format and size of either <= 1/20 s, or |
| 584 | * <= 1/10 s, respectively; and the {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges} entry |
| 585 | * lists at least one FPS range where the minimum FPS is >= 1 / minimumFrameDuration |
| 586 | * for the maximum-size YUV_420_888 format. If that maximum size is listed in {@link android.hardware.camera2.params.StreamConfigurationMap#getHighResolutionOutputSizes }, |
| 587 | * then the list of resolutions for YUV_420_888 from {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } contains at |
| 588 | * least one resolution >= 8 megapixels, with a minimum frame duration of <= 1/20 |
| 589 | * s.</p> |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 590 | * <p>If the device supports the {@link android.graphics.ImageFormat#RAW10 }, {@link android.graphics.ImageFormat#RAW12 }, then those can also be |
| 591 | * captured at the same rate as the maximum-size YUV_420_888 resolution is.</p> |
Eino-Ville Talvala | 0819c75 | 2015-06-17 11:34:41 -0700 | [diff] [blame] | 592 | * <p>If the device supports the PRIVATE_REPROCESSING capability, then the same guarantees |
| 593 | * as for the YUV_420_888 format also apply to the {@link android.graphics.ImageFormat#PRIVATE } format.</p> |
| 594 | * <p>In addition, the {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} field is guaranted to have a value between 0 |
| 595 | * and 4, inclusive. {@link CameraCharacteristics#CONTROL_AE_LOCK_AVAILABLE android.control.aeLockAvailable} and {@link CameraCharacteristics#CONTROL_AWB_LOCK_AVAILABLE android.control.awbLockAvailable} |
| 596 | * are also guaranteed to be <code>true</code> so burst capture with these two locks ON yields |
| 597 | * consistent image output.</p> |
Eino-Ville Talvala | 126a746 | 2014-11-04 16:31:01 -0800 | [diff] [blame] | 598 | * |
Eino-Ville Talvala | 8d709f3 | 2014-11-17 11:28:38 -0800 | [diff] [blame] | 599 | * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES |
Yin-Chia Yeh | 7e3e431 | 2015-04-02 14:34:30 -0700 | [diff] [blame] | 600 | * @see CameraCharacteristics#CONTROL_AE_LOCK_AVAILABLE |
| 601 | * @see CameraCharacteristics#CONTROL_AWB_LOCK_AVAILABLE |
Eino-Ville Talvala | 126a746 | 2014-11-04 16:31:01 -0800 | [diff] [blame] | 602 | * @see CameraCharacteristics#SYNC_MAX_LATENCY |
| 603 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 604 | */ |
| 605 | public static final int REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE = 6; |
| 606 | |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 607 | /** |
Chien-Yu Chen | 0a551f1 | 2015-04-03 17:57:35 -0700 | [diff] [blame] | 608 | * <p>The camera device supports the YUV_420_888 reprocessing use case, similar as |
Chien-Yu Chen | 8062d31 | 2015-05-12 14:24:10 -0700 | [diff] [blame] | 609 | * PRIVATE_REPROCESSING, This capability requires the camera device to support the |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 610 | * following:</p> |
| 611 | * <ul> |
| 612 | * <li>One input stream is supported, that is, <code>{@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} == 1</code>.</li> |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 613 | * <li>{@link android.graphics.ImageFormat#YUV_420_888 } is supported as an output/input |
| 614 | * format, that is, YUV_420_888 is included in the lists of formats returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats } and {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats }.</li> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 615 | * <li>{@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput } |
| 616 | * returns non-empty int[] for each supported input format returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }.</li> |
| 617 | * <li>Each size returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputSizes getInputSizes(YUV_420_888)} is also included in {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes getOutputSizes(YUV_420_888)}</li> |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 618 | * <li>Using {@link android.graphics.ImageFormat#YUV_420_888 } does not cause a frame rate |
| 619 | * drop relative to the sensor's maximum capture rate (at that resolution).</li> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 620 | * <li>{@link android.graphics.ImageFormat#YUV_420_888 } will be reprocessable into both |
| 621 | * {@link android.graphics.ImageFormat#YUV_420_888 } and {@link android.graphics.ImageFormat#JPEG } formats.</li> |
| 622 | * <li>The maximum available resolution for {@link android.graphics.ImageFormat#YUV_420_888 } streams (both input/output) will match the |
| 623 | * maximum available resolution of {@link android.graphics.ImageFormat#JPEG } streams.</li> |
Zhijun He | 513f7c3 | 2015-04-24 18:23:54 -0700 | [diff] [blame] | 624 | * <li>Static metadata {@link CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL android.reprocess.maxCaptureStall}.</li> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 625 | * <li>Only the below controls are effective for reprocessing requests and will be present |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 626 | * in capture results. The reprocess requests are from the original capture results |
| 627 | * that are associated with the intermediate {@link android.graphics.ImageFormat#YUV_420_888 } output buffers. All other controls in the |
| 628 | * reprocess requests will be ignored by the camera device.<ul> |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 629 | * <li>android.jpeg.*</li> |
| 630 | * <li>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</li> |
| 631 | * <li>{@link CaptureRequest#EDGE_MODE android.edge.mode}</li> |
| 632 | * <li>{@link CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR android.reprocess.effectiveExposureFactor}</li> |
| 633 | * </ul> |
| 634 | * </li> |
Eino-Ville Talvala | 0dd1750 | 2015-07-07 10:43:07 -0700 | [diff] [blame] | 635 | * <li>{@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes} and |
| 636 | * {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes} will both list ZERO_SHUTTER_LAG as a supported mode.</li> |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 637 | * </ul> |
| 638 | * |
Eino-Ville Talvala | 0dd1750 | 2015-07-07 10:43:07 -0700 | [diff] [blame] | 639 | * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 640 | * @see CaptureRequest#EDGE_MODE |
Eino-Ville Talvala | 0dd1750 | 2015-07-07 10:43:07 -0700 | [diff] [blame] | 641 | * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 642 | * @see CaptureRequest#NOISE_REDUCTION_MODE |
| 643 | * @see CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR |
Zhijun He | 513f7c3 | 2015-04-24 18:23:54 -0700 | [diff] [blame] | 644 | * @see CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 645 | * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS |
| 646 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 647 | */ |
| 648 | public static final int REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING = 7; |
| 649 | |
Eino-Ville Talvala | 0b7b03b | 2015-04-13 17:29:52 -0700 | [diff] [blame] | 650 | /** |
| 651 | * <p>The camera device can produce depth measurements from its field of view.</p> |
| 652 | * <p>This capability requires the camera device to support the following:</p> |
| 653 | * <ul> |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 654 | * <li>{@link android.graphics.ImageFormat#DEPTH16 } is supported as |
| 655 | * an output format.</li> |
| 656 | * <li>{@link android.graphics.ImageFormat#DEPTH_POINT_CLOUD } is |
| 657 | * optionally supported as an output format.</li> |
| 658 | * <li>This camera device, and all camera devices with the same {@link CameraCharacteristics#LENS_FACING android.lens.facing}, will |
| 659 | * list the following calibration metadata entries in both {@link android.hardware.camera2.CameraCharacteristics } |
| 660 | * and {@link android.hardware.camera2.CaptureResult }:<ul> |
Eino-Ville Talvala | 0b7b03b | 2015-04-13 17:29:52 -0700 | [diff] [blame] | 661 | * <li>{@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}</li> |
| 662 | * <li>{@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}</li> |
Eino-Ville Talvala | abf0b8b | 2015-08-19 16:21:15 -0700 | [diff] [blame] | 663 | * <li>{@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}</li> |
| 664 | * <li>{@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion}</li> |
Eino-Ville Talvala | 0b7b03b | 2015-04-13 17:29:52 -0700 | [diff] [blame] | 665 | * </ul> |
| 666 | * </li> |
| 667 | * <li>The {@link CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE android.depth.depthIsExclusive} entry is listed by this device.</li> |
| 668 | * <li>A LIMITED camera with only the DEPTH_OUTPUT capability does not have to support |
| 669 | * normal YUV_420_888, JPEG, and PRIV-format outputs. It only has to support the DEPTH16 |
| 670 | * format.</li> |
| 671 | * </ul> |
| 672 | * <p>Generally, depth output operates at a slower frame rate than standard color capture, |
| 673 | * so the DEPTH16 and DEPTH_POINT_CLOUD formats will commonly have a stall duration that |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 674 | * should be accounted for (see {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration }). |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 675 | * On a device that supports both depth and color-based output, to enable smooth preview, |
| 676 | * using a repeating burst is recommended, where a depth-output target is only included |
| 677 | * once every N frames, where N is the ratio between preview output rate and depth output |
Eino-Ville Talvala | 0b7b03b | 2015-04-13 17:29:52 -0700 | [diff] [blame] | 678 | * rate, including depth stall time.</p> |
| 679 | * |
| 680 | * @see CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 681 | * @see CameraCharacteristics#LENS_FACING |
Eino-Ville Talvala | abf0b8b | 2015-08-19 16:21:15 -0700 | [diff] [blame] | 682 | * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION |
Eino-Ville Talvala | 0b7b03b | 2015-04-13 17:29:52 -0700 | [diff] [blame] | 683 | * @see CameraCharacteristics#LENS_POSE_ROTATION |
| 684 | * @see CameraCharacteristics#LENS_POSE_TRANSLATION |
Eino-Ville Talvala | abf0b8b | 2015-08-19 16:21:15 -0700 | [diff] [blame] | 685 | * @see CameraCharacteristics#LENS_RADIAL_DISTORTION |
Eino-Ville Talvala | 0b7b03b | 2015-04-13 17:29:52 -0700 | [diff] [blame] | 686 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 687 | */ |
| 688 | public static final int REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT = 8; |
| 689 | |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 690 | /** |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 691 | * <p>The device supports constrained high speed video recording (frame rate >=120fps) use |
| 692 | * case. The camera device will support high speed capture session created by {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }, which |
| 693 | * only accepts high speed request lists created by {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList }.</p> |
| 694 | * <p>A camera device can still support high speed video streaming by advertising the high |
| 695 | * speed FPS ranges in {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges}. For this case, all |
| 696 | * normal capture request per frame control and synchronization requirements will apply |
| 697 | * to the high speed fps ranges, the same as all other fps ranges. This capability |
| 698 | * describes the capability of a specialized operating mode with many limitations (see |
| 699 | * below), which is only targeted at high speed video recording.</p> |
| 700 | * <p>The supported high speed video sizes and fps ranges are specified in {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges }. |
| 701 | * To get desired output frame rates, the application is only allowed to select video |
| 702 | * size and FPS range combinations provided by {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes }. The |
| 703 | * fps range can be controlled via {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}.</p> |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 704 | * <p>In this capability, the camera device will override aeMode, awbMode, and afMode to |
Zhijun He | ee2ebde | 2015-06-16 19:58:11 -0700 | [diff] [blame] | 705 | * ON, AUTO, and CONTINUOUS_VIDEO, respectively. All post-processing block mode |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 706 | * controls will be overridden to be FAST. Therefore, no manual control of capture |
| 707 | * and post-processing parameters is possible. All other controls operate the |
| 708 | * same as when {@link CaptureRequest#CONTROL_MODE android.control.mode} == AUTO. This means that all other |
| 709 | * android.control.* fields continue to work, such as</p> |
| 710 | * <ul> |
| 711 | * <li>{@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}</li> |
| 712 | * <li>{@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}</li> |
| 713 | * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li> |
| 714 | * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li> |
| 715 | * <li>{@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</li> |
| 716 | * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li> |
| 717 | * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li> |
| 718 | * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li> |
| 719 | * <li>{@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}</li> |
| 720 | * <li>{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}</li> |
| 721 | * </ul> |
| 722 | * <p>Outside of android.control.*, the following controls will work:</p> |
| 723 | * <ul> |
| 724 | * <li>{@link CaptureRequest#FLASH_MODE android.flash.mode} (TORCH mode only, automatic flash for still capture will not |
| 725 | * work since aeMode is ON)</li> |
| 726 | * <li>{@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} (if it is supported)</li> |
| 727 | * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li> |
| 728 | * <li>{@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} (if it is supported)</li> |
| 729 | * </ul> |
| 730 | * <p>For high speed recording use case, the actual maximum supported frame rate may |
| 731 | * be lower than what camera can output, depending on the destination Surfaces for |
| 732 | * the image data. For example, if the destination surface is from video encoder, |
| 733 | * the application need check if the video encoder is capable of supporting the |
| 734 | * high frame rate for a given video size, or it will end up with lower recording |
| 735 | * frame rate. If the destination surface is from preview window, the actual preview frame |
| 736 | * rate will be bounded by the screen refresh rate.</p> |
| 737 | * <p>The camera device will only support up to 2 high speed simultaneous output surfaces |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 738 | * (preview and recording surfaces) in this mode. Above controls will be effective only |
| 739 | * if all of below conditions are true:</p> |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 740 | * <ul> |
| 741 | * <li>The application creates a camera capture session with no more than 2 surfaces via |
| 742 | * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }. The |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 743 | * targeted surfaces must be preview surface (either from {@link android.view.SurfaceView } or {@link android.graphics.SurfaceTexture }) or recording |
| 744 | * surface(either from {@link android.media.MediaRecorder#getSurface } or {@link android.media.MediaCodec#createInputSurface }).</li> |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 745 | * <li>The stream sizes are selected from the sizes reported by |
| 746 | * {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes }.</li> |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 747 | * <li>The FPS ranges are selected from {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges }.</li> |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 748 | * </ul> |
Eino-Ville Talvala | 639fffe | 2015-06-30 10:34:48 -0700 | [diff] [blame] | 749 | * <p>When above conditions are NOT satistied, |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 750 | * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession } |
Eino-Ville Talvala | 639fffe | 2015-06-30 10:34:48 -0700 | [diff] [blame] | 751 | * will fail.</p> |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 752 | * <p>Switching to a FPS range that has different maximum FPS may trigger some camera device |
| 753 | * reconfigurations, which may introduce extra latency. It is recommended that |
| 754 | * the application avoids unnecessary maximum target FPS changes as much as possible |
| 755 | * during high speed streaming.</p> |
| 756 | * |
| 757 | * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES |
| 758 | * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION |
| 759 | * @see CaptureRequest#CONTROL_AE_LOCK |
| 760 | * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER |
| 761 | * @see CaptureRequest#CONTROL_AE_REGIONS |
| 762 | * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE |
| 763 | * @see CaptureRequest#CONTROL_AF_REGIONS |
| 764 | * @see CaptureRequest#CONTROL_AF_TRIGGER |
| 765 | * @see CaptureRequest#CONTROL_AWB_LOCK |
| 766 | * @see CaptureRequest#CONTROL_AWB_REGIONS |
| 767 | * @see CaptureRequest#CONTROL_EFFECT_MODE |
| 768 | * @see CaptureRequest#CONTROL_MODE |
| 769 | * @see CaptureRequest#FLASH_MODE |
| 770 | * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE |
| 771 | * @see CaptureRequest#SCALER_CROP_REGION |
| 772 | * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE |
| 773 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 774 | */ |
| 775 | public static final int REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO = 9; |
| 776 | |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 777 | // |
Zhijun He | 1498615 | 2014-05-22 21:17:37 -0700 | [diff] [blame] | 778 | // Enumeration values for CameraCharacteristics#SCALER_CROPPING_TYPE |
| 779 | // |
| 780 | |
| 781 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 782 | * <p>The camera device only supports centered crop regions.</p> |
Zhijun He | 1498615 | 2014-05-22 21:17:37 -0700 | [diff] [blame] | 783 | * @see CameraCharacteristics#SCALER_CROPPING_TYPE |
| 784 | */ |
| 785 | public static final int SCALER_CROPPING_TYPE_CENTER_ONLY = 0; |
| 786 | |
| 787 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 788 | * <p>The camera device supports arbitrarily chosen crop regions.</p> |
Zhijun He | 1498615 | 2014-05-22 21:17:37 -0700 | [diff] [blame] | 789 | * @see CameraCharacteristics#SCALER_CROPPING_TYPE |
| 790 | */ |
| 791 | public static final int SCALER_CROPPING_TYPE_FREEFORM = 1; |
| 792 | |
| 793 | // |
Zhijun He | d178496 | 2014-04-08 17:41:46 -0700 | [diff] [blame] | 794 | // Enumeration values for CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT |
| 795 | // |
| 796 | |
| 797 | /** |
| 798 | * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT |
| 799 | */ |
| 800 | public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB = 0; |
| 801 | |
| 802 | /** |
| 803 | * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT |
| 804 | */ |
| 805 | public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG = 1; |
| 806 | |
| 807 | /** |
| 808 | * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT |
| 809 | */ |
| 810 | public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG = 2; |
| 811 | |
| 812 | /** |
| 813 | * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT |
| 814 | */ |
| 815 | public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR = 3; |
| 816 | |
| 817 | /** |
| 818 | * <p>Sensor is not Bayer; output has 3 16-bit |
| 819 | * values for each pixel, instead of just 1 16-bit value |
| 820 | * per pixel.</p> |
| 821 | * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT |
| 822 | */ |
| 823 | public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB = 4; |
| 824 | |
| 825 | // |
Eino-Ville Talvala | abd9d3c | 2014-07-28 13:01:52 -0700 | [diff] [blame] | 826 | // Enumeration values for CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE |
Zhijun He | 45fa43a1 | 2014-06-13 18:29:37 -0700 | [diff] [blame] | 827 | // |
| 828 | |
| 829 | /** |
| 830 | * <p>Timestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in nanoseconds and monotonic, |
| 831 | * but can not be compared to timestamps from other subsystems |
| 832 | * (e.g. accelerometer, gyro etc.), or other instances of the same or different |
| 833 | * camera devices in the same system. Timestamps between streams and results for |
| 834 | * a single camera instance are comparable, and the timestamps for all buffers |
| 835 | * and the result metadata generated by a single capture are identical.</p> |
| 836 | * |
| 837 | * @see CaptureResult#SENSOR_TIMESTAMP |
Eino-Ville Talvala | abd9d3c | 2014-07-28 13:01:52 -0700 | [diff] [blame] | 838 | * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE |
Zhijun He | 45fa43a1 | 2014-06-13 18:29:37 -0700 | [diff] [blame] | 839 | */ |
Eino-Ville Talvala | abd9d3c | 2014-07-28 13:01:52 -0700 | [diff] [blame] | 840 | public static final int SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN = 0; |
Zhijun He | 45fa43a1 | 2014-06-13 18:29:37 -0700 | [diff] [blame] | 841 | |
| 842 | /** |
| 843 | * <p>Timestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in the same timebase as |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 844 | * {@link android.os.SystemClock#elapsedRealtimeNanos }, |
Zhijun He | 45fa43a1 | 2014-06-13 18:29:37 -0700 | [diff] [blame] | 845 | * and they can be compared to other timestamps using that base.</p> |
| 846 | * |
| 847 | * @see CaptureResult#SENSOR_TIMESTAMP |
Eino-Ville Talvala | abd9d3c | 2014-07-28 13:01:52 -0700 | [diff] [blame] | 848 | * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE |
Zhijun He | 45fa43a1 | 2014-06-13 18:29:37 -0700 | [diff] [blame] | 849 | */ |
Eino-Ville Talvala | abd9d3c | 2014-07-28 13:01:52 -0700 | [diff] [blame] | 850 | public static final int SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME = 1; |
Zhijun He | 45fa43a1 | 2014-06-13 18:29:37 -0700 | [diff] [blame] | 851 | |
| 852 | // |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 853 | // Enumeration values for CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 854 | // |
| 855 | |
| 856 | /** |
| 857 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 858 | */ |
| 859 | public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT = 1; |
| 860 | |
| 861 | /** |
| 862 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 863 | */ |
| 864 | public static final int SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT = 2; |
| 865 | |
| 866 | /** |
| 867 | * <p>Incandescent light</p> |
| 868 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 869 | */ |
| 870 | public static final int SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN = 3; |
| 871 | |
| 872 | /** |
| 873 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 874 | */ |
| 875 | public static final int SENSOR_REFERENCE_ILLUMINANT1_FLASH = 4; |
| 876 | |
| 877 | /** |
| 878 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 879 | */ |
| 880 | public static final int SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER = 9; |
| 881 | |
| 882 | /** |
| 883 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 884 | */ |
| 885 | public static final int SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER = 10; |
| 886 | |
| 887 | /** |
| 888 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 889 | */ |
| 890 | public static final int SENSOR_REFERENCE_ILLUMINANT1_SHADE = 11; |
| 891 | |
| 892 | /** |
| 893 | * <p>D 5700 - 7100K</p> |
| 894 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 895 | */ |
| 896 | public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT = 12; |
| 897 | |
| 898 | /** |
| 899 | * <p>N 4600 - 5400K</p> |
| 900 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 901 | */ |
| 902 | public static final int SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT = 13; |
| 903 | |
| 904 | /** |
| 905 | * <p>W 3900 - 4500K</p> |
| 906 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 907 | */ |
| 908 | public static final int SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT = 14; |
| 909 | |
| 910 | /** |
| 911 | * <p>WW 3200 - 3700K</p> |
| 912 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 913 | */ |
| 914 | public static final int SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT = 15; |
| 915 | |
| 916 | /** |
| 917 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 918 | */ |
| 919 | public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A = 17; |
| 920 | |
| 921 | /** |
| 922 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 923 | */ |
| 924 | public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B = 18; |
| 925 | |
| 926 | /** |
| 927 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 928 | */ |
| 929 | public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C = 19; |
| 930 | |
| 931 | /** |
| 932 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 933 | */ |
| 934 | public static final int SENSOR_REFERENCE_ILLUMINANT1_D55 = 20; |
| 935 | |
| 936 | /** |
| 937 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 938 | */ |
| 939 | public static final int SENSOR_REFERENCE_ILLUMINANT1_D65 = 21; |
| 940 | |
| 941 | /** |
| 942 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 943 | */ |
| 944 | public static final int SENSOR_REFERENCE_ILLUMINANT1_D75 = 22; |
| 945 | |
| 946 | /** |
| 947 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 948 | */ |
| 949 | public static final int SENSOR_REFERENCE_ILLUMINANT1_D50 = 23; |
| 950 | |
| 951 | /** |
| 952 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 953 | */ |
| 954 | public static final int SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN = 24; |
| 955 | |
| 956 | // |
Igor Murashkin | 68f4006 | 2013-09-10 12:15:54 -0700 | [diff] [blame] | 957 | // Enumeration values for CameraCharacteristics#LED_AVAILABLE_LEDS |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 958 | // |
| 959 | |
| 960 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 961 | * <p>android.led.transmit control is used.</p> |
Igor Murashkin | 68f4006 | 2013-09-10 12:15:54 -0700 | [diff] [blame] | 962 | * @see CameraCharacteristics#LED_AVAILABLE_LEDS |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 963 | * @hide |
| 964 | */ |
| 965 | public static final int LED_AVAILABLE_LEDS_TRANSMIT = 0; |
| 966 | |
| 967 | // |
Igor Murashkin | 68f4006 | 2013-09-10 12:15:54 -0700 | [diff] [blame] | 968 | // Enumeration values for CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 969 | // |
| 970 | |
| 971 | /** |
Eino-Ville Talvala | 7c6d73f | 2016-01-21 13:55:11 -0800 | [diff] [blame] | 972 | * <p>This camera device does not have enough capabilities to qualify as a <code>FULL</code> device or |
| 973 | * better.</p> |
| 974 | * <p>Only the stream configurations listed in the <code>LEGACY</code> and <code>LIMITED</code> tables in the |
| 975 | * {@link android.hardware.camera2.CameraDevice#createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p> |
| 976 | * <p>All <code>LIMITED</code> devices support the <code>BACKWARDS_COMPATIBLE</code> capability, indicating basic |
| 977 | * support for color image capture. The only exception is that the device may |
| 978 | * alternatively support only the <code>DEPTH_OUTPUT</code> capability, if it can only output depth |
| 979 | * measurements and not color images.</p> |
| 980 | * <p><code>LIMITED</code> devices and above require the use of {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} |
| 981 | * to lock exposure metering (and calculate flash power, for cameras with flash) before |
| 982 | * capturing a high-quality still image.</p> |
| 983 | * <p>A <code>LIMITED</code> device that only lists the <code>BACKWARDS_COMPATIBLE</code> capability is only |
| 984 | * required to support full-automatic operation and post-processing (<code>OFF</code> is not |
| 985 | * supported for {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}, {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}, or |
| 986 | * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode})</p> |
| 987 | * <p>Additional capabilities may optionally be supported by a <code>LIMITED</code>-level device, and |
| 988 | * can be checked for in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p> |
| 989 | * |
| 990 | * @see CaptureRequest#CONTROL_AE_MODE |
| 991 | * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER |
| 992 | * @see CaptureRequest#CONTROL_AF_MODE |
| 993 | * @see CaptureRequest#CONTROL_AWB_MODE |
| 994 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
Igor Murashkin | 68f4006 | 2013-09-10 12:15:54 -0700 | [diff] [blame] | 995 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 996 | */ |
| 997 | public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0; |
| 998 | |
| 999 | /** |
Ruben Brunk | 4a61a86 | 2014-07-01 16:00:26 -0700 | [diff] [blame] | 1000 | * <p>This camera device is capable of supporting advanced imaging applications.</p> |
Eino-Ville Talvala | 7c6d73f | 2016-01-21 13:55:11 -0800 | [diff] [blame] | 1001 | * <p>The stream configurations listed in the <code>FULL</code>, <code>LEGACY</code> and <code>LIMITED</code> tables in the |
| 1002 | * {@link android.hardware.camera2.CameraDevice#createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p> |
| 1003 | * <p>A <code>FULL</code> device will support below capabilities:</p> |
| 1004 | * <ul> |
| 1005 | * <li><code>BURST_CAPTURE</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains |
| 1006 | * <code>BURST_CAPTURE</code>)</li> |
| 1007 | * <li>Per frame control ({@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} <code>==</code> PER_FRAME_CONTROL)</li> |
| 1008 | * <li>Manual sensor control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains <code>MANUAL_SENSOR</code>)</li> |
| 1009 | * <li>Manual post-processing control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains |
| 1010 | * <code>MANUAL_POST_PROCESSING</code>)</li> |
| 1011 | * <li>The required exposure time range defined in {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li> |
| 1012 | * <li>The required maxFrameDuration defined in {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li> |
| 1013 | * </ul> |
| 1014 | * <p>Note: |
| 1015 | * Pre-API level 23, FULL devices also supported arbitrary cropping region |
| 1016 | * ({@link CameraCharacteristics#SCALER_CROPPING_TYPE android.scaler.croppingType} <code>== FREEFORM</code>); this requirement was relaxed in API level |
| 1017 | * 23, and <code>FULL</code> devices may only support <code>CENTERED</code> cropping.</p> |
| 1018 | * |
| 1019 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 1020 | * @see CameraCharacteristics#SCALER_CROPPING_TYPE |
| 1021 | * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE |
| 1022 | * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION |
| 1023 | * @see CameraCharacteristics#SYNC_MAX_LATENCY |
Igor Murashkin | 68f4006 | 2013-09-10 12:15:54 -0700 | [diff] [blame] | 1024 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1025 | */ |
| 1026 | public static final int INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1; |
| 1027 | |
Ruben Brunk | 4a61a86 | 2014-07-01 16:00:26 -0700 | [diff] [blame] | 1028 | /** |
| 1029 | * <p>This camera device is running in backward compatibility mode.</p> |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 1030 | * <p>Only the stream configurations listed in the <code>LEGACY</code> table in the {@link android.hardware.camera2.CameraDevice#createCaptureSession createCaptureSession} documentation are supported.</p> |
Eino-Ville Talvala | 7c6d73f | 2016-01-21 13:55:11 -0800 | [diff] [blame] | 1031 | * <p>A <code>LEGACY</code> device does not support per-frame control, manual sensor control, manual |
| 1032 | * post-processing, arbitrary cropping regions, and has relaxed performance constraints. |
| 1033 | * No additional capabilities beyond <code>BACKWARD_COMPATIBLE</code> will ever be listed by a |
| 1034 | * <code>LEGACY</code> device in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p> |
| 1035 | * <p>In addition, the {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is not functional on <code>LEGACY</code> |
| 1036 | * devices. Instead, every request that includes a JPEG-format output target is treated |
| 1037 | * as triggering a still capture, internally executing a precapture trigger. This may |
| 1038 | * fire the flash for flash power metering during precapture, and then fire the flash |
| 1039 | * for the final capture, if a flash is available on the device and the AE mode is set to |
| 1040 | * enable the flash.</p> |
| 1041 | * |
| 1042 | * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER |
| 1043 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
Ruben Brunk | 4a61a86 | 2014-07-01 16:00:26 -0700 | [diff] [blame] | 1044 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
| 1045 | */ |
| 1046 | public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY = 2; |
| 1047 | |
Eino-Ville Talvala | 7c6d73f | 2016-01-21 13:55:11 -0800 | [diff] [blame] | 1048 | /** |
| 1049 | * <p>This camera device is capable of YUV reprocessing and RAW data capture, in addition to |
| 1050 | * FULL-level capabilities.</p> |
| 1051 | * <p>The stream configurations listed in the <code>LEVEL_3</code>, <code>RAW</code>, <code>FULL</code>, <code>LEGACY</code> and |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 1052 | * <code>LIMITED</code> tables in the {@link android.hardware.camera2.CameraDevice#createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p> |
Eino-Ville Talvala | 7c6d73f | 2016-01-21 13:55:11 -0800 | [diff] [blame] | 1053 | * <p>The following additional capabilities are guaranteed to be supported:</p> |
| 1054 | * <ul> |
| 1055 | * <li><code>YUV_REPROCESSING</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains |
| 1056 | * <code>YUV_REPROCESSING</code>)</li> |
| 1057 | * <li><code>RAW</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains |
| 1058 | * <code>RAW</code>)</li> |
| 1059 | * </ul> |
| 1060 | * |
| 1061 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 1062 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
| 1063 | */ |
| 1064 | public static final int INFO_SUPPORTED_HARDWARE_LEVEL_3 = 3; |
| 1065 | |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1066 | // |
Igor Murashkin | 3865a84 | 2014-01-17 18:18:39 -0800 | [diff] [blame] | 1067 | // Enumeration values for CameraCharacteristics#SYNC_MAX_LATENCY |
| 1068 | // |
| 1069 | |
| 1070 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1071 | * <p>Every frame has the requests immediately applied.</p> |
Igor Murashkin | 3865a84 | 2014-01-17 18:18:39 -0800 | [diff] [blame] | 1072 | * <p>Changing controls over multiple requests one after another will |
| 1073 | * produce results that have those controls applied atomically |
| 1074 | * each frame.</p> |
| 1075 | * <p>All FULL capability devices will have this as their maxLatency.</p> |
| 1076 | * @see CameraCharacteristics#SYNC_MAX_LATENCY |
| 1077 | */ |
| 1078 | public static final int SYNC_MAX_LATENCY_PER_FRAME_CONTROL = 0; |
| 1079 | |
| 1080 | /** |
| 1081 | * <p>Each new frame has some subset (potentially the entire set) |
| 1082 | * of the past requests applied to the camera settings.</p> |
| 1083 | * <p>By submitting a series of identical requests, the camera device |
| 1084 | * will eventually have the camera settings applied, but it is |
| 1085 | * unknown when that exact point will be.</p> |
Igor Murashkin | bdf366c | 2014-07-25 16:54:20 -0700 | [diff] [blame] | 1086 | * <p>All LEGACY capability devices will have this as their maxLatency.</p> |
Igor Murashkin | 3865a84 | 2014-01-17 18:18:39 -0800 | [diff] [blame] | 1087 | * @see CameraCharacteristics#SYNC_MAX_LATENCY |
| 1088 | */ |
| 1089 | public static final int SYNC_MAX_LATENCY_UNKNOWN = -1; |
| 1090 | |
| 1091 | // |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1092 | // Enumeration values for CaptureRequest#COLOR_CORRECTION_MODE |
| 1093 | // |
| 1094 | |
| 1095 | /** |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 1096 | * <p>Use the {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} matrix |
Igor Murashkin | 7d2a5c5 | 2014-01-17 15:07:52 -0800 | [diff] [blame] | 1097 | * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} to do color conversion.</p> |
| 1098 | * <p>All advanced white balance adjustments (not specified |
| 1099 | * by our white balance pipeline) must be disabled.</p> |
| 1100 | * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then |
| 1101 | * TRANSFORM_MATRIX is ignored. The camera device will override |
| 1102 | * this value to either FAST or HIGH_QUALITY.</p> |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 1103 | * |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 1104 | * @see CaptureRequest#COLOR_CORRECTION_GAINS |
Eino-Ville Talvala | 265b34c | 2014-01-16 16:18:52 -0800 | [diff] [blame] | 1105 | * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM |
Igor Murashkin | 7d2a5c5 | 2014-01-17 15:07:52 -0800 | [diff] [blame] | 1106 | * @see CaptureRequest#CONTROL_AWB_MODE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1107 | * @see CaptureRequest#COLOR_CORRECTION_MODE |
| 1108 | */ |
| 1109 | public static final int COLOR_CORRECTION_MODE_TRANSFORM_MATRIX = 0; |
| 1110 | |
| 1111 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1112 | * <p>Color correction processing must not slow down |
| 1113 | * capture rate relative to sensor raw output.</p> |
Igor Murashkin | 7d2a5c5 | 2014-01-17 15:07:52 -0800 | [diff] [blame] | 1114 | * <p>Advanced white balance adjustments above and beyond |
| 1115 | * the specified white balance pipeline may be applied.</p> |
| 1116 | * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then |
| 1117 | * the camera device uses the last frame's AWB values |
| 1118 | * (or defaults if AWB has never been run).</p> |
| 1119 | * |
| 1120 | * @see CaptureRequest#CONTROL_AWB_MODE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1121 | * @see CaptureRequest#COLOR_CORRECTION_MODE |
| 1122 | */ |
| 1123 | public static final int COLOR_CORRECTION_MODE_FAST = 1; |
| 1124 | |
| 1125 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1126 | * <p>Color correction processing operates at improved |
Yin-Chia Yeh | fba08dd | 2015-04-02 14:05:14 -0700 | [diff] [blame] | 1127 | * quality but the capture rate might be reduced (relative to sensor |
| 1128 | * raw output rate)</p> |
Igor Murashkin | 7d2a5c5 | 2014-01-17 15:07:52 -0800 | [diff] [blame] | 1129 | * <p>Advanced white balance adjustments above and beyond |
| 1130 | * the specified white balance pipeline may be applied.</p> |
| 1131 | * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then |
| 1132 | * the camera device uses the last frame's AWB values |
| 1133 | * (or defaults if AWB has never been run).</p> |
| 1134 | * |
| 1135 | * @see CaptureRequest#CONTROL_AWB_MODE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1136 | * @see CaptureRequest#COLOR_CORRECTION_MODE |
| 1137 | */ |
| 1138 | public static final int COLOR_CORRECTION_MODE_HIGH_QUALITY = 2; |
| 1139 | |
| 1140 | // |
Zhijun He | 9e4e439 | 2014-08-18 11:12:32 -0700 | [diff] [blame] | 1141 | // Enumeration values for CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE |
Zhijun He | a05e59d | 2014-07-08 18:27:47 -0700 | [diff] [blame] | 1142 | // |
| 1143 | |
| 1144 | /** |
| 1145 | * <p>No aberration correction is applied.</p> |
Zhijun He | 9e4e439 | 2014-08-18 11:12:32 -0700 | [diff] [blame] | 1146 | * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE |
Zhijun He | a05e59d | 2014-07-08 18:27:47 -0700 | [diff] [blame] | 1147 | */ |
Zhijun He | 9e4e439 | 2014-08-18 11:12:32 -0700 | [diff] [blame] | 1148 | public static final int COLOR_CORRECTION_ABERRATION_MODE_OFF = 0; |
Zhijun He | a05e59d | 2014-07-08 18:27:47 -0700 | [diff] [blame] | 1149 | |
| 1150 | /** |
| 1151 | * <p>Aberration correction will not slow down capture rate |
| 1152 | * relative to sensor raw output.</p> |
Zhijun He | 9e4e439 | 2014-08-18 11:12:32 -0700 | [diff] [blame] | 1153 | * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE |
Zhijun He | a05e59d | 2014-07-08 18:27:47 -0700 | [diff] [blame] | 1154 | */ |
Zhijun He | 9e4e439 | 2014-08-18 11:12:32 -0700 | [diff] [blame] | 1155 | public static final int COLOR_CORRECTION_ABERRATION_MODE_FAST = 1; |
Zhijun He | a05e59d | 2014-07-08 18:27:47 -0700 | [diff] [blame] | 1156 | |
| 1157 | /** |
Yin-Chia Yeh | fba08dd | 2015-04-02 14:05:14 -0700 | [diff] [blame] | 1158 | * <p>Aberration correction operates at improved quality but the capture rate might be |
| 1159 | * reduced (relative to sensor raw output rate)</p> |
Zhijun He | 9e4e439 | 2014-08-18 11:12:32 -0700 | [diff] [blame] | 1160 | * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE |
Zhijun He | a05e59d | 2014-07-08 18:27:47 -0700 | [diff] [blame] | 1161 | */ |
Zhijun He | 9e4e439 | 2014-08-18 11:12:32 -0700 | [diff] [blame] | 1162 | public static final int COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY = 2; |
Zhijun He | a05e59d | 2014-07-08 18:27:47 -0700 | [diff] [blame] | 1163 | |
| 1164 | // |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1165 | // Enumeration values for CaptureRequest#CONTROL_AE_ANTIBANDING_MODE |
| 1166 | // |
| 1167 | |
| 1168 | /** |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 1169 | * <p>The camera device will not adjust exposure duration to |
| 1170 | * avoid banding problems.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1171 | * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE |
| 1172 | */ |
| 1173 | public static final int CONTROL_AE_ANTIBANDING_MODE_OFF = 0; |
| 1174 | |
| 1175 | /** |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 1176 | * <p>The camera device will adjust exposure duration to |
| 1177 | * avoid banding problems with 50Hz illumination sources.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1178 | * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE |
| 1179 | */ |
| 1180 | public static final int CONTROL_AE_ANTIBANDING_MODE_50HZ = 1; |
| 1181 | |
| 1182 | /** |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 1183 | * <p>The camera device will adjust exposure duration to |
| 1184 | * avoid banding problems with 60Hz illumination |
| 1185 | * sources.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1186 | * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE |
| 1187 | */ |
| 1188 | public static final int CONTROL_AE_ANTIBANDING_MODE_60HZ = 2; |
| 1189 | |
| 1190 | /** |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 1191 | * <p>The camera device will automatically adapt its |
| 1192 | * antibanding routine to the current illumination |
Yin-Chia Yeh | 7b2cae6 | 2014-11-25 11:54:18 -0800 | [diff] [blame] | 1193 | * condition. This is the default mode if AUTO is |
| 1194 | * available on given camera device.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1195 | * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE |
| 1196 | */ |
| 1197 | public static final int CONTROL_AE_ANTIBANDING_MODE_AUTO = 3; |
| 1198 | |
| 1199 | // |
| 1200 | // Enumeration values for CaptureRequest#CONTROL_AE_MODE |
| 1201 | // |
| 1202 | |
| 1203 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1204 | * <p>The camera device's autoexposure routine is disabled.</p> |
| 1205 | * <p>The application-selected {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 1206 | * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} and |
| 1207 | * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are used by the camera |
| 1208 | * device, along with android.flash.* fields, if there's |
| 1209 | * a flash unit for this camera device.</p> |
Yin-Chia Yeh | 7144b5d | 2014-11-12 11:42:49 -0800 | [diff] [blame] | 1210 | * <p>Note that auto-white balance (AWB) and auto-focus (AF) |
| 1211 | * behavior is device dependent when AE is in OFF mode. |
| 1212 | * To have consistent behavior across different devices, |
| 1213 | * it is recommended to either set AWB and AF to OFF mode |
| 1214 | * or lock AWB and AF before setting AE to OFF. |
| 1215 | * See {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}, |
| 1216 | * {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}, and {@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger} |
| 1217 | * for more details.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1218 | * <p>LEGACY devices do not support the OFF mode and will |
| 1219 | * override attempts to use this value to ON.</p> |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 1220 | * |
Yin-Chia Yeh | 7144b5d | 2014-11-12 11:42:49 -0800 | [diff] [blame] | 1221 | * @see CaptureRequest#CONTROL_AF_MODE |
| 1222 | * @see CaptureRequest#CONTROL_AF_TRIGGER |
| 1223 | * @see CaptureRequest#CONTROL_AWB_LOCK |
| 1224 | * @see CaptureRequest#CONTROL_AWB_MODE |
Zhijun He | 5f2a47f | 2014-01-16 15:44:41 -0800 | [diff] [blame] | 1225 | * @see CaptureRequest#SENSOR_EXPOSURE_TIME |
Eino-Ville Talvala | 265b34c | 2014-01-16 16:18:52 -0800 | [diff] [blame] | 1226 | * @see CaptureRequest#SENSOR_FRAME_DURATION |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 1227 | * @see CaptureRequest#SENSOR_SENSITIVITY |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1228 | * @see CaptureRequest#CONTROL_AE_MODE |
| 1229 | */ |
| 1230 | public static final int CONTROL_AE_MODE_OFF = 0; |
| 1231 | |
| 1232 | /** |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 1233 | * <p>The camera device's autoexposure routine is active, |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1234 | * with no flash control.</p> |
| 1235 | * <p>The application's values for |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 1236 | * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, |
| 1237 | * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and |
| 1238 | * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are ignored. The |
| 1239 | * application has control over the various |
| 1240 | * android.flash.* fields.</p> |
| 1241 | * |
Zhijun He | 5f2a47f | 2014-01-16 15:44:41 -0800 | [diff] [blame] | 1242 | * @see CaptureRequest#SENSOR_EXPOSURE_TIME |
Eino-Ville Talvala | 265b34c | 2014-01-16 16:18:52 -0800 | [diff] [blame] | 1243 | * @see CaptureRequest#SENSOR_FRAME_DURATION |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 1244 | * @see CaptureRequest#SENSOR_SENSITIVITY |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1245 | * @see CaptureRequest#CONTROL_AE_MODE |
| 1246 | */ |
| 1247 | public static final int CONTROL_AE_MODE_ON = 1; |
| 1248 | |
| 1249 | /** |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 1250 | * <p>Like ON, except that the camera device also controls |
| 1251 | * the camera's flash unit, firing it in low-light |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1252 | * conditions.</p> |
| 1253 | * <p>The flash may be fired during a precapture sequence |
| 1254 | * (triggered by {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and |
| 1255 | * may be fired for captures for which the |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 1256 | * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to |
| 1257 | * STILL_CAPTURE</p> |
| 1258 | * |
Igor Murashkin | 3242f4f | 2014-01-15 12:27:41 -0800 | [diff] [blame] | 1259 | * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER |
Zhijun He | 5f2a47f | 2014-01-16 15:44:41 -0800 | [diff] [blame] | 1260 | * @see CaptureRequest#CONTROL_CAPTURE_INTENT |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1261 | * @see CaptureRequest#CONTROL_AE_MODE |
| 1262 | */ |
| 1263 | public static final int CONTROL_AE_MODE_ON_AUTO_FLASH = 2; |
| 1264 | |
| 1265 | /** |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 1266 | * <p>Like ON, except that the camera device also controls |
| 1267 | * the camera's flash unit, always firing it for still |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1268 | * captures.</p> |
| 1269 | * <p>The flash may be fired during a precapture sequence |
| 1270 | * (triggered by {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and |
| 1271 | * will always be fired for captures for which the |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 1272 | * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to |
| 1273 | * STILL_CAPTURE</p> |
| 1274 | * |
Igor Murashkin | 3242f4f | 2014-01-15 12:27:41 -0800 | [diff] [blame] | 1275 | * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER |
Zhijun He | 5f2a47f | 2014-01-16 15:44:41 -0800 | [diff] [blame] | 1276 | * @see CaptureRequest#CONTROL_CAPTURE_INTENT |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1277 | * @see CaptureRequest#CONTROL_AE_MODE |
| 1278 | */ |
| 1279 | public static final int CONTROL_AE_MODE_ON_ALWAYS_FLASH = 3; |
| 1280 | |
| 1281 | /** |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 1282 | * <p>Like ON_AUTO_FLASH, but with automatic red eye |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1283 | * reduction.</p> |
| 1284 | * <p>If deemed necessary by the camera device, a red eye |
| 1285 | * reduction flash will fire during the precapture |
| 1286 | * sequence.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1287 | * @see CaptureRequest#CONTROL_AE_MODE |
| 1288 | */ |
| 1289 | public static final int CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE = 4; |
| 1290 | |
| 1291 | // |
| 1292 | // Enumeration values for CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER |
| 1293 | // |
| 1294 | |
| 1295 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1296 | * <p>The trigger is idle.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1297 | * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER |
| 1298 | */ |
| 1299 | public static final int CONTROL_AE_PRECAPTURE_TRIGGER_IDLE = 0; |
| 1300 | |
| 1301 | /** |
Zhijun He | 228f4f9 | 2014-01-16 17:22:05 -0800 | [diff] [blame] | 1302 | * <p>The precapture metering sequence will be started |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1303 | * by the camera device.</p> |
| 1304 | * <p>The exact effect of the precapture trigger depends on |
| 1305 | * the current AE mode and state.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1306 | * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER |
| 1307 | */ |
| 1308 | public static final int CONTROL_AE_PRECAPTURE_TRIGGER_START = 1; |
| 1309 | |
Zhijun He | fa95b04 | 2015-02-09 10:40:49 -0800 | [diff] [blame] | 1310 | /** |
| 1311 | * <p>The camera device will cancel any currently active or completed |
| 1312 | * precapture metering sequence, the auto-exposure routine will return to its |
| 1313 | * initial state.</p> |
| 1314 | * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER |
| 1315 | */ |
| 1316 | public static final int CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL = 2; |
| 1317 | |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1318 | // |
| 1319 | // Enumeration values for CaptureRequest#CONTROL_AF_MODE |
| 1320 | // |
| 1321 | |
| 1322 | /** |
Zhijun He | f353742 | 2013-12-16 16:56:35 -0800 | [diff] [blame] | 1323 | * <p>The auto-focus routine does not control the lens; |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 1324 | * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} is controlled by the |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1325 | * application.</p> |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 1326 | * |
| 1327 | * @see CaptureRequest#LENS_FOCUS_DISTANCE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1328 | * @see CaptureRequest#CONTROL_AF_MODE |
| 1329 | */ |
| 1330 | public static final int CONTROL_AF_MODE_OFF = 0; |
| 1331 | |
| 1332 | /** |
Eino-Ville Talvala | b67a3b3 | 2014-06-06 13:07:20 -0700 | [diff] [blame] | 1333 | * <p>Basic automatic focus mode.</p> |
| 1334 | * <p>In this mode, the lens does not move unless |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1335 | * the autofocus trigger action is called. When that trigger |
Eino-Ville Talvala | b67a3b3 | 2014-06-06 13:07:20 -0700 | [diff] [blame] | 1336 | * is activated, AF will transition to ACTIVE_SCAN, then to |
Zhijun He | f353742 | 2013-12-16 16:56:35 -0800 | [diff] [blame] | 1337 | * the outcome of the scan (FOCUSED or NOT_FOCUSED).</p> |
Eino-Ville Talvala | b67a3b3 | 2014-06-06 13:07:20 -0700 | [diff] [blame] | 1338 | * <p>Always supported if lens is not fixed focus.</p> |
| 1339 | * <p>Use {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} to determine if lens |
| 1340 | * is fixed-focus.</p> |
Zhijun He | f353742 | 2013-12-16 16:56:35 -0800 | [diff] [blame] | 1341 | * <p>Triggering AF_CANCEL resets the lens position to default, |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1342 | * and sets the AF state to INACTIVE.</p> |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 1343 | * |
| 1344 | * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1345 | * @see CaptureRequest#CONTROL_AF_MODE |
| 1346 | */ |
| 1347 | public static final int CONTROL_AF_MODE_AUTO = 1; |
| 1348 | |
| 1349 | /** |
Eino-Ville Talvala | b67a3b3 | 2014-06-06 13:07:20 -0700 | [diff] [blame] | 1350 | * <p>Close-up focusing mode.</p> |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1351 | * <p>In this mode, the lens does not move unless the |
Eino-Ville Talvala | b67a3b3 | 2014-06-06 13:07:20 -0700 | [diff] [blame] | 1352 | * autofocus trigger action is called. When that trigger is |
| 1353 | * activated, AF will transition to ACTIVE_SCAN, then to |
| 1354 | * the outcome of the scan (FOCUSED or NOT_FOCUSED). This |
| 1355 | * mode is optimized for focusing on objects very close to |
| 1356 | * the camera.</p> |
| 1357 | * <p>When that trigger is activated, AF will transition to |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1358 | * ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or |
Eino-Ville Talvala | b67a3b3 | 2014-06-06 13:07:20 -0700 | [diff] [blame] | 1359 | * NOT_FOCUSED). Triggering cancel AF resets the lens |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1360 | * position to default, and sets the AF state to |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1361 | * INACTIVE.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1362 | * @see CaptureRequest#CONTROL_AF_MODE |
| 1363 | */ |
| 1364 | public static final int CONTROL_AF_MODE_MACRO = 2; |
| 1365 | |
| 1366 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1367 | * <p>In this mode, the AF algorithm modifies the lens |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1368 | * position continually to attempt to provide a |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1369 | * constantly-in-focus image stream.</p> |
| 1370 | * <p>The focusing behavior should be suitable for good quality |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1371 | * video recording; typically this means slower focus |
| 1372 | * movement and no overshoots. When the AF trigger is not |
| 1373 | * involved, the AF algorithm should start in INACTIVE state, |
| 1374 | * and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED |
| 1375 | * states as appropriate. When the AF trigger is activated, |
| 1376 | * the algorithm should immediately transition into |
| 1377 | * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1378 | * lens position until a cancel AF trigger is received.</p> |
| 1379 | * <p>Once cancel is received, the algorithm should transition |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1380 | * back to INACTIVE and resume passive scan. Note that this |
| 1381 | * behavior is not identical to CONTINUOUS_PICTURE, since an |
| 1382 | * ongoing PASSIVE_SCAN must immediately be |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1383 | * canceled.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1384 | * @see CaptureRequest#CONTROL_AF_MODE |
| 1385 | */ |
| 1386 | public static final int CONTROL_AF_MODE_CONTINUOUS_VIDEO = 3; |
| 1387 | |
| 1388 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1389 | * <p>In this mode, the AF algorithm modifies the lens |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1390 | * position continually to attempt to provide a |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1391 | * constantly-in-focus image stream.</p> |
| 1392 | * <p>The focusing behavior should be suitable for still image |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1393 | * capture; typically this means focusing as fast as |
| 1394 | * possible. When the AF trigger is not involved, the AF |
| 1395 | * algorithm should start in INACTIVE state, and then |
| 1396 | * transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as |
| 1397 | * appropriate as it attempts to maintain focus. When the AF |
| 1398 | * trigger is activated, the algorithm should finish its |
| 1399 | * PASSIVE_SCAN if active, and then transition into |
| 1400 | * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1401 | * lens position until a cancel AF trigger is received.</p> |
| 1402 | * <p>When the AF cancel trigger is activated, the algorithm |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1403 | * should transition back to INACTIVE and then act as if it |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1404 | * has just been started.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1405 | * @see CaptureRequest#CONTROL_AF_MODE |
| 1406 | */ |
| 1407 | public static final int CONTROL_AF_MODE_CONTINUOUS_PICTURE = 4; |
| 1408 | |
| 1409 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1410 | * <p>Extended depth of field (digital focus) mode.</p> |
| 1411 | * <p>The camera device will produce images with an extended |
| 1412 | * depth of field automatically; no special focusing |
| 1413 | * operations need to be done before taking a picture.</p> |
| 1414 | * <p>AF triggers are ignored, and the AF state will always be |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1415 | * INACTIVE.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1416 | * @see CaptureRequest#CONTROL_AF_MODE |
| 1417 | */ |
| 1418 | public static final int CONTROL_AF_MODE_EDOF = 5; |
| 1419 | |
| 1420 | // |
| 1421 | // Enumeration values for CaptureRequest#CONTROL_AF_TRIGGER |
| 1422 | // |
| 1423 | |
| 1424 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1425 | * <p>The trigger is idle.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1426 | * @see CaptureRequest#CONTROL_AF_TRIGGER |
| 1427 | */ |
| 1428 | public static final int CONTROL_AF_TRIGGER_IDLE = 0; |
| 1429 | |
| 1430 | /** |
Zhijun He | 228f4f9 | 2014-01-16 17:22:05 -0800 | [diff] [blame] | 1431 | * <p>Autofocus will trigger now.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1432 | * @see CaptureRequest#CONTROL_AF_TRIGGER |
| 1433 | */ |
| 1434 | public static final int CONTROL_AF_TRIGGER_START = 1; |
| 1435 | |
| 1436 | /** |
Zhijun He | 228f4f9 | 2014-01-16 17:22:05 -0800 | [diff] [blame] | 1437 | * <p>Autofocus will return to its initial |
| 1438 | * state, and cancel any currently active trigger.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1439 | * @see CaptureRequest#CONTROL_AF_TRIGGER |
| 1440 | */ |
| 1441 | public static final int CONTROL_AF_TRIGGER_CANCEL = 2; |
| 1442 | |
| 1443 | // |
| 1444 | // Enumeration values for CaptureRequest#CONTROL_AWB_MODE |
| 1445 | // |
| 1446 | |
| 1447 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1448 | * <p>The camera device's auto-white balance routine is disabled.</p> |
| 1449 | * <p>The application-selected color transform matrix |
Zhijun He | 399f05d | 2014-01-15 11:31:30 -0800 | [diff] [blame] | 1450 | * ({@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}) and gains |
| 1451 | * ({@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}) are used by the camera |
| 1452 | * device for manual white balance control.</p> |
| 1453 | * |
Zhijun He | 399f05d | 2014-01-15 11:31:30 -0800 | [diff] [blame] | 1454 | * @see CaptureRequest#COLOR_CORRECTION_GAINS |
Eino-Ville Talvala | 265b34c | 2014-01-16 16:18:52 -0800 | [diff] [blame] | 1455 | * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1456 | * @see CaptureRequest#CONTROL_AWB_MODE |
| 1457 | */ |
| 1458 | public static final int CONTROL_AWB_MODE_OFF = 0; |
| 1459 | |
| 1460 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1461 | * <p>The camera device's auto-white balance routine is active.</p> |
| 1462 | * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} |
| 1463 | * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. |
| 1464 | * For devices that support the MANUAL_POST_PROCESSING capability, the |
| 1465 | * values used by the camera device for the transform and gains |
| 1466 | * will be available in the capture result for this request.</p> |
Zhijun He | 399f05d | 2014-01-15 11:31:30 -0800 | [diff] [blame] | 1467 | * |
| 1468 | * @see CaptureRequest#COLOR_CORRECTION_GAINS |
Eino-Ville Talvala | d8fd679 | 2014-02-10 12:41:04 -0800 | [diff] [blame] | 1469 | * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1470 | * @see CaptureRequest#CONTROL_AWB_MODE |
| 1471 | */ |
| 1472 | public static final int CONTROL_AWB_MODE_AUTO = 1; |
| 1473 | |
| 1474 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1475 | * <p>The camera device's auto-white balance routine is disabled; |
Zhijun He | 399f05d | 2014-01-15 11:31:30 -0800 | [diff] [blame] | 1476 | * the camera device uses incandescent light as the assumed scene |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1477 | * illumination for white balance.</p> |
| 1478 | * <p>While the exact white balance transforms are up to the |
| 1479 | * camera device, they will approximately match the CIE |
| 1480 | * standard illuminant A.</p> |
| 1481 | * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} |
| 1482 | * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. |
| 1483 | * For devices that support the MANUAL_POST_PROCESSING capability, the |
| 1484 | * values used by the camera device for the transform and gains |
| 1485 | * will be available in the capture result for this request.</p> |
| 1486 | * |
| 1487 | * @see CaptureRequest#COLOR_CORRECTION_GAINS |
| 1488 | * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1489 | * @see CaptureRequest#CONTROL_AWB_MODE |
| 1490 | */ |
| 1491 | public static final int CONTROL_AWB_MODE_INCANDESCENT = 2; |
| 1492 | |
| 1493 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1494 | * <p>The camera device's auto-white balance routine is disabled; |
Zhijun He | 399f05d | 2014-01-15 11:31:30 -0800 | [diff] [blame] | 1495 | * the camera device uses fluorescent light as the assumed scene |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1496 | * illumination for white balance.</p> |
| 1497 | * <p>While the exact white balance transforms are up to the |
| 1498 | * camera device, they will approximately match the CIE |
| 1499 | * standard illuminant F2.</p> |
| 1500 | * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} |
| 1501 | * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. |
| 1502 | * For devices that support the MANUAL_POST_PROCESSING capability, the |
| 1503 | * values used by the camera device for the transform and gains |
| 1504 | * will be available in the capture result for this request.</p> |
| 1505 | * |
| 1506 | * @see CaptureRequest#COLOR_CORRECTION_GAINS |
| 1507 | * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1508 | * @see CaptureRequest#CONTROL_AWB_MODE |
| 1509 | */ |
| 1510 | public static final int CONTROL_AWB_MODE_FLUORESCENT = 3; |
| 1511 | |
| 1512 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1513 | * <p>The camera device's auto-white balance routine is disabled; |
Zhijun He | 399f05d | 2014-01-15 11:31:30 -0800 | [diff] [blame] | 1514 | * the camera device uses warm fluorescent light as the assumed scene |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1515 | * illumination for white balance.</p> |
| 1516 | * <p>While the exact white balance transforms are up to the |
| 1517 | * camera device, they will approximately match the CIE |
| 1518 | * standard illuminant F4.</p> |
| 1519 | * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} |
| 1520 | * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. |
| 1521 | * For devices that support the MANUAL_POST_PROCESSING capability, the |
| 1522 | * values used by the camera device for the transform and gains |
| 1523 | * will be available in the capture result for this request.</p> |
| 1524 | * |
| 1525 | * @see CaptureRequest#COLOR_CORRECTION_GAINS |
| 1526 | * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1527 | * @see CaptureRequest#CONTROL_AWB_MODE |
| 1528 | */ |
| 1529 | public static final int CONTROL_AWB_MODE_WARM_FLUORESCENT = 4; |
| 1530 | |
| 1531 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1532 | * <p>The camera device's auto-white balance routine is disabled; |
Zhijun He | 399f05d | 2014-01-15 11:31:30 -0800 | [diff] [blame] | 1533 | * the camera device uses daylight light as the assumed scene |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1534 | * illumination for white balance.</p> |
| 1535 | * <p>While the exact white balance transforms are up to the |
| 1536 | * camera device, they will approximately match the CIE |
| 1537 | * standard illuminant D65.</p> |
| 1538 | * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} |
| 1539 | * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. |
| 1540 | * For devices that support the MANUAL_POST_PROCESSING capability, the |
| 1541 | * values used by the camera device for the transform and gains |
| 1542 | * will be available in the capture result for this request.</p> |
| 1543 | * |
| 1544 | * @see CaptureRequest#COLOR_CORRECTION_GAINS |
| 1545 | * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1546 | * @see CaptureRequest#CONTROL_AWB_MODE |
| 1547 | */ |
| 1548 | public static final int CONTROL_AWB_MODE_DAYLIGHT = 5; |
| 1549 | |
| 1550 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1551 | * <p>The camera device's auto-white balance routine is disabled; |
Zhijun He | 399f05d | 2014-01-15 11:31:30 -0800 | [diff] [blame] | 1552 | * the camera device uses cloudy daylight light as the assumed scene |
| 1553 | * illumination for white balance.</p> |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1554 | * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} |
| 1555 | * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. |
| 1556 | * For devices that support the MANUAL_POST_PROCESSING capability, the |
| 1557 | * values used by the camera device for the transform and gains |
| 1558 | * will be available in the capture result for this request.</p> |
| 1559 | * |
| 1560 | * @see CaptureRequest#COLOR_CORRECTION_GAINS |
| 1561 | * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1562 | * @see CaptureRequest#CONTROL_AWB_MODE |
| 1563 | */ |
| 1564 | public static final int CONTROL_AWB_MODE_CLOUDY_DAYLIGHT = 6; |
| 1565 | |
| 1566 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1567 | * <p>The camera device's auto-white balance routine is disabled; |
Zhijun He | 399f05d | 2014-01-15 11:31:30 -0800 | [diff] [blame] | 1568 | * the camera device uses twilight light as the assumed scene |
| 1569 | * illumination for white balance.</p> |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1570 | * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} |
| 1571 | * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. |
| 1572 | * For devices that support the MANUAL_POST_PROCESSING capability, the |
| 1573 | * values used by the camera device for the transform and gains |
| 1574 | * will be available in the capture result for this request.</p> |
| 1575 | * |
| 1576 | * @see CaptureRequest#COLOR_CORRECTION_GAINS |
| 1577 | * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1578 | * @see CaptureRequest#CONTROL_AWB_MODE |
| 1579 | */ |
| 1580 | public static final int CONTROL_AWB_MODE_TWILIGHT = 7; |
| 1581 | |
| 1582 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1583 | * <p>The camera device's auto-white balance routine is disabled; |
Zhijun He | 399f05d | 2014-01-15 11:31:30 -0800 | [diff] [blame] | 1584 | * the camera device uses shade light as the assumed scene |
| 1585 | * illumination for white balance.</p> |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1586 | * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} |
| 1587 | * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. |
| 1588 | * For devices that support the MANUAL_POST_PROCESSING capability, the |
| 1589 | * values used by the camera device for the transform and gains |
| 1590 | * will be available in the capture result for this request.</p> |
| 1591 | * |
| 1592 | * @see CaptureRequest#COLOR_CORRECTION_GAINS |
| 1593 | * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1594 | * @see CaptureRequest#CONTROL_AWB_MODE |
| 1595 | */ |
| 1596 | public static final int CONTROL_AWB_MODE_SHADE = 8; |
| 1597 | |
| 1598 | // |
| 1599 | // Enumeration values for CaptureRequest#CONTROL_CAPTURE_INTENT |
| 1600 | // |
| 1601 | |
| 1602 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1603 | * <p>The goal of this request doesn't fall into the other |
| 1604 | * categories. The camera device will default to preview-like |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1605 | * behavior.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1606 | * @see CaptureRequest#CONTROL_CAPTURE_INTENT |
| 1607 | */ |
| 1608 | public static final int CONTROL_CAPTURE_INTENT_CUSTOM = 0; |
| 1609 | |
| 1610 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1611 | * <p>This request is for a preview-like use case.</p> |
| 1612 | * <p>The precapture trigger may be used to start off a metering |
| 1613 | * w/flash sequence.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1614 | * @see CaptureRequest#CONTROL_CAPTURE_INTENT |
| 1615 | */ |
| 1616 | public static final int CONTROL_CAPTURE_INTENT_PREVIEW = 1; |
| 1617 | |
| 1618 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1619 | * <p>This request is for a still capture-type |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1620 | * use case.</p> |
| 1621 | * <p>If the flash unit is under automatic control, it may fire as needed.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1622 | * @see CaptureRequest#CONTROL_CAPTURE_INTENT |
| 1623 | */ |
| 1624 | public static final int CONTROL_CAPTURE_INTENT_STILL_CAPTURE = 2; |
| 1625 | |
| 1626 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1627 | * <p>This request is for a video recording |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1628 | * use case.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1629 | * @see CaptureRequest#CONTROL_CAPTURE_INTENT |
| 1630 | */ |
| 1631 | public static final int CONTROL_CAPTURE_INTENT_VIDEO_RECORD = 3; |
| 1632 | |
| 1633 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1634 | * <p>This request is for a video snapshot (still |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1635 | * image while recording video) use case.</p> |
| 1636 | * <p>The camera device should take the highest-quality image |
| 1637 | * possible (given the other settings) without disrupting the |
Eino-Ville Talvala | 126a746 | 2014-11-04 16:31:01 -0800 | [diff] [blame] | 1638 | * frame rate of video recording. </p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1639 | * @see CaptureRequest#CONTROL_CAPTURE_INTENT |
| 1640 | */ |
| 1641 | public static final int CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT = 4; |
| 1642 | |
| 1643 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1644 | * <p>This request is for a ZSL usecase; the |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1645 | * application will stream full-resolution images and |
| 1646 | * reprocess one or several later for a final |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1647 | * capture.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1648 | * @see CaptureRequest#CONTROL_CAPTURE_INTENT |
| 1649 | */ |
| 1650 | public static final int CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG = 5; |
| 1651 | |
Zhijun He | e30adb7 | 2014-04-09 19:04:31 -0700 | [diff] [blame] | 1652 | /** |
| 1653 | * <p>This request is for manual capture use case where |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1654 | * the applications want to directly control the capture parameters.</p> |
| 1655 | * <p>For example, the application may wish to manually control |
| 1656 | * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, etc.</p> |
Zhijun He | e30adb7 | 2014-04-09 19:04:31 -0700 | [diff] [blame] | 1657 | * |
| 1658 | * @see CaptureRequest#SENSOR_EXPOSURE_TIME |
| 1659 | * @see CaptureRequest#SENSOR_SENSITIVITY |
| 1660 | * @see CaptureRequest#CONTROL_CAPTURE_INTENT |
| 1661 | */ |
| 1662 | public static final int CONTROL_CAPTURE_INTENT_MANUAL = 6; |
| 1663 | |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1664 | // |
| 1665 | // Enumeration values for CaptureRequest#CONTROL_EFFECT_MODE |
| 1666 | // |
| 1667 | |
| 1668 | /** |
Ruben Brunk | 5f1dcfe | 2014-01-17 16:42:51 -0800 | [diff] [blame] | 1669 | * <p>No color effect will be applied.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1670 | * @see CaptureRequest#CONTROL_EFFECT_MODE |
| 1671 | */ |
| 1672 | public static final int CONTROL_EFFECT_MODE_OFF = 0; |
| 1673 | |
| 1674 | /** |
Ruben Brunk | 5f1dcfe | 2014-01-17 16:42:51 -0800 | [diff] [blame] | 1675 | * <p>A "monocolor" effect where the image is mapped into |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1676 | * a single color.</p> |
| 1677 | * <p>This will typically be grayscale.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1678 | * @see CaptureRequest#CONTROL_EFFECT_MODE |
| 1679 | */ |
| 1680 | public static final int CONTROL_EFFECT_MODE_MONO = 1; |
| 1681 | |
| 1682 | /** |
Ruben Brunk | 5f1dcfe | 2014-01-17 16:42:51 -0800 | [diff] [blame] | 1683 | * <p>A "photo-negative" effect where the image's colors |
| 1684 | * are inverted.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1685 | * @see CaptureRequest#CONTROL_EFFECT_MODE |
| 1686 | */ |
| 1687 | public static final int CONTROL_EFFECT_MODE_NEGATIVE = 2; |
| 1688 | |
| 1689 | /** |
Ruben Brunk | 5f1dcfe | 2014-01-17 16:42:51 -0800 | [diff] [blame] | 1690 | * <p>A "solarisation" effect (Sabattier effect) where the |
| 1691 | * image is wholly or partially reversed in |
| 1692 | * tone.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1693 | * @see CaptureRequest#CONTROL_EFFECT_MODE |
| 1694 | */ |
| 1695 | public static final int CONTROL_EFFECT_MODE_SOLARIZE = 3; |
| 1696 | |
| 1697 | /** |
Ruben Brunk | 5f1dcfe | 2014-01-17 16:42:51 -0800 | [diff] [blame] | 1698 | * <p>A "sepia" effect where the image is mapped into warm |
| 1699 | * gray, red, and brown tones.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1700 | * @see CaptureRequest#CONTROL_EFFECT_MODE |
| 1701 | */ |
| 1702 | public static final int CONTROL_EFFECT_MODE_SEPIA = 4; |
| 1703 | |
| 1704 | /** |
Ruben Brunk | 5f1dcfe | 2014-01-17 16:42:51 -0800 | [diff] [blame] | 1705 | * <p>A "posterization" effect where the image uses |
| 1706 | * discrete regions of tone rather than a continuous |
| 1707 | * gradient of tones.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1708 | * @see CaptureRequest#CONTROL_EFFECT_MODE |
| 1709 | */ |
| 1710 | public static final int CONTROL_EFFECT_MODE_POSTERIZE = 5; |
| 1711 | |
| 1712 | /** |
Ruben Brunk | 5f1dcfe | 2014-01-17 16:42:51 -0800 | [diff] [blame] | 1713 | * <p>A "whiteboard" effect where the image is typically displayed |
| 1714 | * as regions of white, with black or grey details.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1715 | * @see CaptureRequest#CONTROL_EFFECT_MODE |
| 1716 | */ |
| 1717 | public static final int CONTROL_EFFECT_MODE_WHITEBOARD = 6; |
| 1718 | |
| 1719 | /** |
Ruben Brunk | 5f1dcfe | 2014-01-17 16:42:51 -0800 | [diff] [blame] | 1720 | * <p>A "blackboard" effect where the image is typically displayed |
| 1721 | * as regions of black, with white or grey details.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1722 | * @see CaptureRequest#CONTROL_EFFECT_MODE |
| 1723 | */ |
| 1724 | public static final int CONTROL_EFFECT_MODE_BLACKBOARD = 7; |
| 1725 | |
| 1726 | /** |
Ruben Brunk | 5f1dcfe | 2014-01-17 16:42:51 -0800 | [diff] [blame] | 1727 | * <p>An "aqua" effect where a blue hue is added to the image.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1728 | * @see CaptureRequest#CONTROL_EFFECT_MODE |
| 1729 | */ |
| 1730 | public static final int CONTROL_EFFECT_MODE_AQUA = 8; |
| 1731 | |
| 1732 | // |
| 1733 | // Enumeration values for CaptureRequest#CONTROL_MODE |
| 1734 | // |
| 1735 | |
| 1736 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1737 | * <p>Full application control of pipeline.</p> |
| 1738 | * <p>All control by the device's metering and focusing (3A) |
| 1739 | * routines is disabled, and no other settings in |
| 1740 | * android.control.* have any effect, except that |
| 1741 | * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} may be used by the camera |
| 1742 | * device to select post-processing values for processing |
| 1743 | * blocks that do not allow for manual control, or are not |
| 1744 | * exposed by the camera API.</p> |
| 1745 | * <p>However, the camera device's 3A routines may continue to |
| 1746 | * collect statistics and update their internal state so that |
| 1747 | * when control is switched to AUTO mode, good control values |
| 1748 | * can be immediately applied.</p> |
| 1749 | * |
| 1750 | * @see CaptureRequest#CONTROL_CAPTURE_INTENT |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1751 | * @see CaptureRequest#CONTROL_MODE |
| 1752 | */ |
| 1753 | public static final int CONTROL_MODE_OFF = 0; |
| 1754 | |
| 1755 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1756 | * <p>Use settings for each individual 3A routine.</p> |
| 1757 | * <p>Manual control of capture parameters is disabled. All |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1758 | * controls in android.control.* besides sceneMode take |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1759 | * effect.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1760 | * @see CaptureRequest#CONTROL_MODE |
| 1761 | */ |
| 1762 | public static final int CONTROL_MODE_AUTO = 1; |
| 1763 | |
| 1764 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1765 | * <p>Use a specific scene mode.</p> |
| 1766 | * <p>Enabling this disables control.aeMode, control.awbMode and |
| 1767 | * control.afMode controls; the camera device will ignore |
| 1768 | * those settings while USE_SCENE_MODE is active (except for |
Zhijun He | ee2ebde | 2015-06-16 19:58:11 -0700 | [diff] [blame] | 1769 | * FACE_PRIORITY scene mode). Other control entries are still active. |
| 1770 | * This setting can only be used if scene mode is supported (i.e. |
| 1771 | * {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes} |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1772 | * contain some modes other than DISABLED).</p> |
Zhijun He | a486624 | 2014-03-27 23:51:34 -0700 | [diff] [blame] | 1773 | * |
| 1774 | * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1775 | * @see CaptureRequest#CONTROL_MODE |
| 1776 | */ |
| 1777 | public static final int CONTROL_MODE_USE_SCENE_MODE = 2; |
| 1778 | |
Zhijun He | 2d5e897 | 2014-02-07 16:13:46 -0800 | [diff] [blame] | 1779 | /** |
| 1780 | * <p>Same as OFF mode, except that this capture will not be |
| 1781 | * used by camera device background auto-exposure, auto-white balance and |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1782 | * auto-focus algorithms (3A) to update their statistics.</p> |
| 1783 | * <p>Specifically, the 3A routines are locked to the last |
| 1784 | * values set from a request with AUTO, OFF, or |
| 1785 | * USE_SCENE_MODE, and any statistics or state updates |
| 1786 | * collected from manual captures with OFF_KEEP_STATE will be |
| 1787 | * discarded by the camera device.</p> |
Zhijun He | 2d5e897 | 2014-02-07 16:13:46 -0800 | [diff] [blame] | 1788 | * @see CaptureRequest#CONTROL_MODE |
| 1789 | */ |
| 1790 | public static final int CONTROL_MODE_OFF_KEEP_STATE = 3; |
| 1791 | |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1792 | // |
| 1793 | // Enumeration values for CaptureRequest#CONTROL_SCENE_MODE |
| 1794 | // |
| 1795 | |
| 1796 | /** |
Ruben Brunk | e667936 | 2014-01-17 17:05:54 -0800 | [diff] [blame] | 1797 | * <p>Indicates that no scene modes are set for a given capture request.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1798 | * @see CaptureRequest#CONTROL_SCENE_MODE |
| 1799 | */ |
Ruben Brunk | e667936 | 2014-01-17 17:05:54 -0800 | [diff] [blame] | 1800 | public static final int CONTROL_SCENE_MODE_DISABLED = 0; |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1801 | |
| 1802 | /** |
Ruben Brunk | e667936 | 2014-01-17 17:05:54 -0800 | [diff] [blame] | 1803 | * <p>If face detection support exists, use face |
| 1804 | * detection data for auto-focus, auto-white balance, and |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1805 | * auto-exposure routines.</p> |
| 1806 | * <p>If face detection statistics are disabled |
| 1807 | * (i.e. {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} is set to OFF), |
Ruben Brunk | e667936 | 2014-01-17 17:05:54 -0800 | [diff] [blame] | 1808 | * this should still operate correctly (but will not return |
| 1809 | * face detection statistics to the framework).</p> |
| 1810 | * <p>Unlike the other scene modes, {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}, |
Eino-Ville Talvala | d8fd679 | 2014-02-10 12:41:04 -0800 | [diff] [blame] | 1811 | * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} |
Ruben Brunk | e667936 | 2014-01-17 17:05:54 -0800 | [diff] [blame] | 1812 | * remain active when FACE_PRIORITY is set.</p> |
| 1813 | * |
| 1814 | * @see CaptureRequest#CONTROL_AE_MODE |
Eino-Ville Talvala | d8fd679 | 2014-02-10 12:41:04 -0800 | [diff] [blame] | 1815 | * @see CaptureRequest#CONTROL_AF_MODE |
Ruben Brunk | e667936 | 2014-01-17 17:05:54 -0800 | [diff] [blame] | 1816 | * @see CaptureRequest#CONTROL_AWB_MODE |
| 1817 | * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1818 | * @see CaptureRequest#CONTROL_SCENE_MODE |
| 1819 | */ |
| 1820 | public static final int CONTROL_SCENE_MODE_FACE_PRIORITY = 1; |
| 1821 | |
| 1822 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1823 | * <p>Optimized for photos of quickly moving objects.</p> |
| 1824 | * <p>Similar to SPORTS.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1825 | * @see CaptureRequest#CONTROL_SCENE_MODE |
| 1826 | */ |
| 1827 | public static final int CONTROL_SCENE_MODE_ACTION = 2; |
| 1828 | |
| 1829 | /** |
Ruben Brunk | e667936 | 2014-01-17 17:05:54 -0800 | [diff] [blame] | 1830 | * <p>Optimized for still photos of people.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1831 | * @see CaptureRequest#CONTROL_SCENE_MODE |
| 1832 | */ |
| 1833 | public static final int CONTROL_SCENE_MODE_PORTRAIT = 3; |
| 1834 | |
| 1835 | /** |
Ruben Brunk | e667936 | 2014-01-17 17:05:54 -0800 | [diff] [blame] | 1836 | * <p>Optimized for photos of distant macroscopic objects.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1837 | * @see CaptureRequest#CONTROL_SCENE_MODE |
| 1838 | */ |
| 1839 | public static final int CONTROL_SCENE_MODE_LANDSCAPE = 4; |
| 1840 | |
| 1841 | /** |
Ruben Brunk | e667936 | 2014-01-17 17:05:54 -0800 | [diff] [blame] | 1842 | * <p>Optimized for low-light settings.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1843 | * @see CaptureRequest#CONTROL_SCENE_MODE |
| 1844 | */ |
| 1845 | public static final int CONTROL_SCENE_MODE_NIGHT = 5; |
| 1846 | |
| 1847 | /** |
Ruben Brunk | e667936 | 2014-01-17 17:05:54 -0800 | [diff] [blame] | 1848 | * <p>Optimized for still photos of people in low-light |
| 1849 | * settings.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1850 | * @see CaptureRequest#CONTROL_SCENE_MODE |
| 1851 | */ |
| 1852 | public static final int CONTROL_SCENE_MODE_NIGHT_PORTRAIT = 6; |
| 1853 | |
| 1854 | /** |
Ruben Brunk | e667936 | 2014-01-17 17:05:54 -0800 | [diff] [blame] | 1855 | * <p>Optimized for dim, indoor settings where flash must |
| 1856 | * remain off.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1857 | * @see CaptureRequest#CONTROL_SCENE_MODE |
| 1858 | */ |
| 1859 | public static final int CONTROL_SCENE_MODE_THEATRE = 7; |
| 1860 | |
| 1861 | /** |
Ruben Brunk | e667936 | 2014-01-17 17:05:54 -0800 | [diff] [blame] | 1862 | * <p>Optimized for bright, outdoor beach settings.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1863 | * @see CaptureRequest#CONTROL_SCENE_MODE |
| 1864 | */ |
| 1865 | public static final int CONTROL_SCENE_MODE_BEACH = 8; |
| 1866 | |
| 1867 | /** |
Ruben Brunk | e667936 | 2014-01-17 17:05:54 -0800 | [diff] [blame] | 1868 | * <p>Optimized for bright, outdoor settings containing snow.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1869 | * @see CaptureRequest#CONTROL_SCENE_MODE |
| 1870 | */ |
| 1871 | public static final int CONTROL_SCENE_MODE_SNOW = 9; |
| 1872 | |
| 1873 | /** |
Ruben Brunk | e667936 | 2014-01-17 17:05:54 -0800 | [diff] [blame] | 1874 | * <p>Optimized for scenes of the setting sun.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1875 | * @see CaptureRequest#CONTROL_SCENE_MODE |
| 1876 | */ |
| 1877 | public static final int CONTROL_SCENE_MODE_SUNSET = 10; |
| 1878 | |
| 1879 | /** |
Ruben Brunk | e667936 | 2014-01-17 17:05:54 -0800 | [diff] [blame] | 1880 | * <p>Optimized to avoid blurry photos due to small amounts of |
| 1881 | * device motion (for example: due to hand shake).</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1882 | * @see CaptureRequest#CONTROL_SCENE_MODE |
| 1883 | */ |
| 1884 | public static final int CONTROL_SCENE_MODE_STEADYPHOTO = 11; |
| 1885 | |
| 1886 | /** |
Ruben Brunk | e667936 | 2014-01-17 17:05:54 -0800 | [diff] [blame] | 1887 | * <p>Optimized for nighttime photos of fireworks.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1888 | * @see CaptureRequest#CONTROL_SCENE_MODE |
| 1889 | */ |
| 1890 | public static final int CONTROL_SCENE_MODE_FIREWORKS = 12; |
| 1891 | |
| 1892 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1893 | * <p>Optimized for photos of quickly moving people.</p> |
| 1894 | * <p>Similar to ACTION.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1895 | * @see CaptureRequest#CONTROL_SCENE_MODE |
| 1896 | */ |
| 1897 | public static final int CONTROL_SCENE_MODE_SPORTS = 13; |
| 1898 | |
| 1899 | /** |
Ruben Brunk | e667936 | 2014-01-17 17:05:54 -0800 | [diff] [blame] | 1900 | * <p>Optimized for dim, indoor settings with multiple moving |
| 1901 | * people.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1902 | * @see CaptureRequest#CONTROL_SCENE_MODE |
| 1903 | */ |
| 1904 | public static final int CONTROL_SCENE_MODE_PARTY = 14; |
| 1905 | |
| 1906 | /** |
Ruben Brunk | e667936 | 2014-01-17 17:05:54 -0800 | [diff] [blame] | 1907 | * <p>Optimized for dim settings where the main light source |
| 1908 | * is a flame.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1909 | * @see CaptureRequest#CONTROL_SCENE_MODE |
| 1910 | */ |
| 1911 | public static final int CONTROL_SCENE_MODE_CANDLELIGHT = 15; |
| 1912 | |
| 1913 | /** |
Ruben Brunk | e667936 | 2014-01-17 17:05:54 -0800 | [diff] [blame] | 1914 | * <p>Optimized for accurately capturing a photo of barcode |
| 1915 | * for use by camera applications that wish to read the |
| 1916 | * barcode value.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1917 | * @see CaptureRequest#CONTROL_SCENE_MODE |
| 1918 | */ |
| 1919 | public static final int CONTROL_SCENE_MODE_BARCODE = 16; |
| 1920 | |
Zhijun He | e040418 | 2014-06-26 13:17:09 -0700 | [diff] [blame] | 1921 | /** |
Eino-Ville Talvala | 639fffe | 2015-06-30 10:34:48 -0700 | [diff] [blame] | 1922 | * <p>This is deprecated, please use {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession } |
| 1923 | * and {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList } |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 1924 | * for high speed video recording.</p> |
Zhijun He | e040418 | 2014-06-26 13:17:09 -0700 | [diff] [blame] | 1925 | * <p>Optimized for high speed video recording (frame rate >=60fps) use case.</p> |
| 1926 | * <p>The supported high speed video sizes and fps ranges are specified in |
| 1927 | * android.control.availableHighSpeedVideoConfigurations. To get desired |
| 1928 | * output frame rates, the application is only allowed to select video size |
| 1929 | * and fps range combinations listed in this static metadata. The fps range |
| 1930 | * can be control via {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}.</p> |
| 1931 | * <p>In this mode, the camera device will override aeMode, awbMode, and afMode to |
| 1932 | * ON, ON, and CONTINUOUS_VIDEO, respectively. All post-processing block mode |
| 1933 | * controls will be overridden to be FAST. Therefore, no manual control of capture |
| 1934 | * and post-processing parameters is possible. All other controls operate the |
| 1935 | * same as when {@link CaptureRequest#CONTROL_MODE android.control.mode} == AUTO. This means that all other |
| 1936 | * android.control.* fields continue to work, such as</p> |
| 1937 | * <ul> |
| 1938 | * <li>{@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}</li> |
| 1939 | * <li>{@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}</li> |
| 1940 | * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li> |
| 1941 | * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li> |
| 1942 | * <li>{@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</li> |
| 1943 | * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li> |
| 1944 | * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li> |
| 1945 | * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li> |
| 1946 | * <li>{@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}</li> |
| 1947 | * <li>{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}</li> |
| 1948 | * </ul> |
| 1949 | * <p>Outside of android.control.*, the following controls will work:</p> |
| 1950 | * <ul> |
| 1951 | * <li>{@link CaptureRequest#FLASH_MODE android.flash.mode} (automatic flash for still capture will not work since aeMode is ON)</li> |
| 1952 | * <li>{@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} (if it is supported)</li> |
| 1953 | * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li> |
| 1954 | * <li>{@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}</li> |
| 1955 | * </ul> |
| 1956 | * <p>For high speed recording use case, the actual maximum supported frame rate may |
| 1957 | * be lower than what camera can output, depending on the destination Surfaces for |
| 1958 | * the image data. For example, if the destination surface is from video encoder, |
| 1959 | * the application need check if the video encoder is capable of supporting the |
| 1960 | * high frame rate for a given video size, or it will end up with lower recording |
| 1961 | * frame rate. If the destination surface is from preview window, the preview frame |
| 1962 | * rate will be bounded by the screen refresh rate.</p> |
| 1963 | * <p>The camera device will only support up to 2 output high speed streams |
| 1964 | * (processed non-stalling format defined in android.request.maxNumOutputStreams) |
| 1965 | * in this mode. This control will be effective only if all of below conditions are true:</p> |
| 1966 | * <ul> |
| 1967 | * <li>The application created no more than maxNumHighSpeedStreams processed non-stalling |
| 1968 | * format output streams, where maxNumHighSpeedStreams is calculated as |
| 1969 | * min(2, android.request.maxNumOutputStreams[Processed (but not-stalling)]).</li> |
| 1970 | * <li>The stream sizes are selected from the sizes reported by |
| 1971 | * android.control.availableHighSpeedVideoConfigurations.</li> |
| 1972 | * <li>No processed non-stalling or raw streams are configured.</li> |
| 1973 | * </ul> |
| 1974 | * <p>When above conditions are NOT satistied, the controls of this mode and |
| 1975 | * {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} will be ignored by the camera device, |
| 1976 | * the camera device will fall back to {@link CaptureRequest#CONTROL_MODE android.control.mode} <code>==</code> AUTO, |
| 1977 | * and the returned capture result metadata will give the fps range choosen |
| 1978 | * by the camera device.</p> |
| 1979 | * <p>Switching into or out of this mode may trigger some camera ISP/sensor |
| 1980 | * reconfigurations, which may introduce extra latency. It is recommended that |
| 1981 | * the application avoids unnecessary scene mode switch as much as possible.</p> |
| 1982 | * |
| 1983 | * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION |
| 1984 | * @see CaptureRequest#CONTROL_AE_LOCK |
| 1985 | * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER |
| 1986 | * @see CaptureRequest#CONTROL_AE_REGIONS |
| 1987 | * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE |
| 1988 | * @see CaptureRequest#CONTROL_AF_REGIONS |
| 1989 | * @see CaptureRequest#CONTROL_AF_TRIGGER |
| 1990 | * @see CaptureRequest#CONTROL_AWB_LOCK |
| 1991 | * @see CaptureRequest#CONTROL_AWB_REGIONS |
| 1992 | * @see CaptureRequest#CONTROL_EFFECT_MODE |
| 1993 | * @see CaptureRequest#CONTROL_MODE |
| 1994 | * @see CaptureRequest#FLASH_MODE |
| 1995 | * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE |
| 1996 | * @see CaptureRequest#SCALER_CROP_REGION |
| 1997 | * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE |
| 1998 | * @see CaptureRequest#CONTROL_SCENE_MODE |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 1999 | * @deprecated Please refer to this API documentation to find the alternatives |
Zhijun He | e040418 | 2014-06-26 13:17:09 -0700 | [diff] [blame] | 2000 | */ |
Aurimas Liutikas | 514c5ef | 2016-05-24 15:22:55 -0700 | [diff] [blame] | 2001 | @Deprecated |
Zhijun He | e040418 | 2014-06-26 13:17:09 -0700 | [diff] [blame] | 2002 | public static final int CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO = 17; |
| 2003 | |
Ruben Brunk | ff99a0a | 2014-08-28 18:42:35 -0700 | [diff] [blame] | 2004 | /** |
Eino-Ville Talvala | f4eac12 | 2014-12-05 11:10:15 -0800 | [diff] [blame] | 2005 | * <p>Turn on a device-specific high dynamic range (HDR) mode.</p> |
| 2006 | * <p>In this scene mode, the camera device captures images |
| 2007 | * that keep a larger range of scene illumination levels |
| 2008 | * visible in the final image. For example, when taking a |
| 2009 | * picture of a object in front of a bright window, both |
| 2010 | * the object and the scene through the window may be |
| 2011 | * visible when using HDR mode, while in normal AUTO mode, |
| 2012 | * one or the other may be poorly exposed. As a tradeoff, |
| 2013 | * HDR mode generally takes much longer to capture a single |
| 2014 | * image, has no user control, and may have other artifacts |
| 2015 | * depending on the HDR method used.</p> |
| 2016 | * <p>Therefore, HDR captures operate at a much slower rate |
| 2017 | * than regular captures.</p> |
| 2018 | * <p>In this mode, on LIMITED or FULL devices, when a request |
| 2019 | * is made with a {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} of |
| 2020 | * STILL_CAPTURE, the camera device will capture an image |
| 2021 | * using a high dynamic range capture technique. On LEGACY |
| 2022 | * devices, captures that target a JPEG-format output will |
| 2023 | * be captured with HDR, and the capture intent is not |
| 2024 | * relevant.</p> |
| 2025 | * <p>The HDR capture may involve the device capturing a burst |
| 2026 | * of images internally and combining them into one, or it |
| 2027 | * may involve the device using specialized high dynamic |
| 2028 | * range capture hardware. In all cases, a single image is |
| 2029 | * produced in response to a capture request submitted |
| 2030 | * while in HDR mode.</p> |
| 2031 | * <p>Since substantial post-processing is generally needed to |
Eino-Ville Talvala | c7c569d | 2016-04-04 10:48:38 -0700 | [diff] [blame] | 2032 | * produce an HDR image, only YUV, PRIVATE, and JPEG |
| 2033 | * outputs are supported for LIMITED/FULL device HDR |
| 2034 | * captures, and only JPEG outputs are supported for LEGACY |
| 2035 | * HDR captures. Using a RAW output for HDR capture is not |
Eino-Ville Talvala | f4eac12 | 2014-12-05 11:10:15 -0800 | [diff] [blame] | 2036 | * supported.</p> |
Eino-Ville Talvala | c7c569d | 2016-04-04 10:48:38 -0700 | [diff] [blame] | 2037 | * <p>Some devices may also support always-on HDR, which |
| 2038 | * applies HDR processing at full frame rate. For these |
| 2039 | * devices, intents other than STILL_CAPTURE will also |
| 2040 | * produce an HDR output with no frame rate impact compared |
| 2041 | * to normal operation, though the quality may be lower |
| 2042 | * than for STILL_CAPTURE intents.</p> |
| 2043 | * <p>If SCENE_MODE_HDR is used with unsupported output types |
| 2044 | * or capture intents, the images captured will be as if |
| 2045 | * the SCENE_MODE was not enabled at all.</p> |
Eino-Ville Talvala | f4eac12 | 2014-12-05 11:10:15 -0800 | [diff] [blame] | 2046 | * |
| 2047 | * @see CaptureRequest#CONTROL_CAPTURE_INTENT |
Ruben Brunk | ff99a0a | 2014-08-28 18:42:35 -0700 | [diff] [blame] | 2048 | * @see CaptureRequest#CONTROL_SCENE_MODE |
Ruben Brunk | ff99a0a | 2014-08-28 18:42:35 -0700 | [diff] [blame] | 2049 | */ |
| 2050 | public static final int CONTROL_SCENE_MODE_HDR = 18; |
| 2051 | |
Zhijun He | ee2ebde | 2015-06-16 19:58:11 -0700 | [diff] [blame] | 2052 | /** |
| 2053 | * <p>Same as FACE_PRIORITY scene mode, except that the camera |
Zhijun He | 4fb8125 | 2015-07-11 20:02:30 -0700 | [diff] [blame] | 2054 | * device will choose higher sensitivity values ({@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}) |
Zhijun He | ee2ebde | 2015-06-16 19:58:11 -0700 | [diff] [blame] | 2055 | * under low light conditions.</p> |
| 2056 | * <p>The camera device may be tuned to expose the images in a reduced |
| 2057 | * sensitivity range to produce the best quality images. For example, |
| 2058 | * if the {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange} gives range of [100, 1600], |
| 2059 | * the camera device auto-exposure routine tuning process may limit the actual |
Zhijun He | 4fb8125 | 2015-07-11 20:02:30 -0700 | [diff] [blame] | 2060 | * exposure sensitivity range to [100, 1200] to ensure that the noise level isn't |
| 2061 | * exessive in order to preserve the image quality. Under this situation, the image under |
Zhijun He | ee2ebde | 2015-06-16 19:58:11 -0700 | [diff] [blame] | 2062 | * low light may be under-exposed when the sensor max exposure time (bounded by the |
| 2063 | * {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} when {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is one of the |
Zhijun He | 4fb8125 | 2015-07-11 20:02:30 -0700 | [diff] [blame] | 2064 | * ON_* modes) and effective max sensitivity are reached. This scene mode allows the |
Zhijun He | ee2ebde | 2015-06-16 19:58:11 -0700 | [diff] [blame] | 2065 | * camera device auto-exposure routine to increase the sensitivity up to the max |
| 2066 | * sensitivity specified by {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange} when the scene is too |
| 2067 | * dark and the max exposure time is reached. The captured images may be noisier |
Zhijun He | 4fb8125 | 2015-07-11 20:02:30 -0700 | [diff] [blame] | 2068 | * compared with the images captured in normal FACE_PRIORITY mode; therefore, it is |
Zhijun He | ee2ebde | 2015-06-16 19:58:11 -0700 | [diff] [blame] | 2069 | * recommended that the application only use this scene mode when it is capable of |
| 2070 | * reducing the noise level of the captured images.</p> |
| 2071 | * <p>Unlike the other scene modes, {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}, |
| 2072 | * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} |
| 2073 | * remain active when FACE_PRIORITY_LOW_LIGHT is set.</p> |
| 2074 | * |
| 2075 | * @see CaptureRequest#CONTROL_AE_MODE |
| 2076 | * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE |
| 2077 | * @see CaptureRequest#CONTROL_AF_MODE |
| 2078 | * @see CaptureRequest#CONTROL_AWB_MODE |
| 2079 | * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE |
| 2080 | * @see CaptureRequest#SENSOR_SENSITIVITY |
| 2081 | * @see CaptureRequest#CONTROL_SCENE_MODE |
| 2082 | * @hide |
| 2083 | */ |
| 2084 | public static final int CONTROL_SCENE_MODE_FACE_PRIORITY_LOW_LIGHT = 19; |
| 2085 | |
Yin-Chia Yeh | 3734820 | 2016-03-09 14:44:49 -0800 | [diff] [blame] | 2086 | /** |
| 2087 | * <p>Scene mode values within the range of |
| 2088 | * <code>[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]</code> are reserved for device specific |
| 2089 | * customized scene modes.</p> |
| 2090 | * @see CaptureRequest#CONTROL_SCENE_MODE |
| 2091 | * @hide |
| 2092 | */ |
| 2093 | public static final int CONTROL_SCENE_MODE_DEVICE_CUSTOM_START = 100; |
| 2094 | |
| 2095 | /** |
| 2096 | * <p>Scene mode values within the range of |
| 2097 | * <code>[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]</code> are reserved for device specific |
| 2098 | * customized scene modes.</p> |
| 2099 | * @see CaptureRequest#CONTROL_SCENE_MODE |
| 2100 | * @hide |
| 2101 | */ |
| 2102 | public static final int CONTROL_SCENE_MODE_DEVICE_CUSTOM_END = 127; |
| 2103 | |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2104 | // |
Zhijun He | 4793af5 | 2014-05-05 10:39:12 -0700 | [diff] [blame] | 2105 | // Enumeration values for CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE |
| 2106 | // |
| 2107 | |
| 2108 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2109 | * <p>Video stabilization is disabled.</p> |
Zhijun He | 4793af5 | 2014-05-05 10:39:12 -0700 | [diff] [blame] | 2110 | * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE |
| 2111 | */ |
| 2112 | public static final int CONTROL_VIDEO_STABILIZATION_MODE_OFF = 0; |
| 2113 | |
| 2114 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2115 | * <p>Video stabilization is enabled.</p> |
Zhijun He | 4793af5 | 2014-05-05 10:39:12 -0700 | [diff] [blame] | 2116 | * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE |
| 2117 | */ |
| 2118 | public static final int CONTROL_VIDEO_STABILIZATION_MODE_ON = 1; |
| 2119 | |
| 2120 | // |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2121 | // Enumeration values for CaptureRequest#EDGE_MODE |
| 2122 | // |
| 2123 | |
| 2124 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2125 | * <p>No edge enhancement is applied.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2126 | * @see CaptureRequest#EDGE_MODE |
| 2127 | */ |
| 2128 | public static final int EDGE_MODE_OFF = 0; |
| 2129 | |
| 2130 | /** |
Chien-Yu Chen | 9c9167e | 2015-07-14 16:38:25 -0700 | [diff] [blame] | 2131 | * <p>Apply edge enhancement at a quality level that does not slow down frame rate |
| 2132 | * relative to sensor output. It may be the same as OFF if edge enhancement will |
| 2133 | * slow down frame rate relative to sensor.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2134 | * @see CaptureRequest#EDGE_MODE |
| 2135 | */ |
| 2136 | public static final int EDGE_MODE_FAST = 1; |
| 2137 | |
| 2138 | /** |
Yin-Chia Yeh | fba08dd | 2015-04-02 14:05:14 -0700 | [diff] [blame] | 2139 | * <p>Apply high-quality edge enhancement, at a cost of possibly reduced output frame rate.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2140 | * @see CaptureRequest#EDGE_MODE |
| 2141 | */ |
| 2142 | public static final int EDGE_MODE_HIGH_QUALITY = 2; |
| 2143 | |
Eino-Ville Talvala | 0dd1750 | 2015-07-07 10:43:07 -0700 | [diff] [blame] | 2144 | /** |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 2145 | * <p>Edge enhancement is applied at different |
| 2146 | * levels for different output streams, based on resolution. Streams at maximum recording |
| 2147 | * resolution (see {@link android.hardware.camera2.CameraDevice#createCaptureSession }) |
| 2148 | * or below have edge enhancement applied, while higher-resolution streams have no edge |
| 2149 | * enhancement applied. The level of edge enhancement for low-resolution streams is tuned |
| 2150 | * so that frame rate is not impacted, and the quality is equal to or better than FAST |
| 2151 | * (since it is only applied to lower-resolution outputs, quality may improve from FAST).</p> |
Eino-Ville Talvala | 0dd1750 | 2015-07-07 10:43:07 -0700 | [diff] [blame] | 2152 | * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode |
| 2153 | * with YUV or PRIVATE reprocessing, where the application continuously captures |
| 2154 | * high-resolution intermediate buffers into a circular buffer, from which a final image is |
| 2155 | * produced via reprocessing when a user takes a picture. For such a use case, the |
| 2156 | * high-resolution buffers must not have edge enhancement applied to maximize efficiency of |
| 2157 | * preview and to avoid double-applying enhancement when reprocessed, while low-resolution |
| 2158 | * buffers (used for recording or preview, generally) need edge enhancement applied for |
| 2159 | * reasonable preview quality.</p> |
| 2160 | * <p>This mode is guaranteed to be supported by devices that support either the |
| 2161 | * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities |
Chien-Yu Chen | 7233391 | 2015-07-08 11:55:19 -0700 | [diff] [blame] | 2162 | * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} lists either of those capabilities) and it will |
| 2163 | * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p> |
Eino-Ville Talvala | 0dd1750 | 2015-07-07 10:43:07 -0700 | [diff] [blame] | 2164 | * |
| 2165 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 2166 | * @see CaptureRequest#EDGE_MODE |
| 2167 | */ |
| 2168 | public static final int EDGE_MODE_ZERO_SHUTTER_LAG = 3; |
| 2169 | |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2170 | // |
| 2171 | // Enumeration values for CaptureRequest#FLASH_MODE |
| 2172 | // |
| 2173 | |
| 2174 | /** |
Zhijun He | 66d065a | 2014-01-16 18:18:50 -0800 | [diff] [blame] | 2175 | * <p>Do not fire the flash for this capture.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2176 | * @see CaptureRequest#FLASH_MODE |
| 2177 | */ |
| 2178 | public static final int FLASH_MODE_OFF = 0; |
| 2179 | |
| 2180 | /** |
Zhijun He | 66d065a | 2014-01-16 18:18:50 -0800 | [diff] [blame] | 2181 | * <p>If the flash is available and charged, fire flash |
Zhijun He | 8949225 | 2014-05-23 13:49:59 -0700 | [diff] [blame] | 2182 | * for this capture.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2183 | * @see CaptureRequest#FLASH_MODE |
| 2184 | */ |
| 2185 | public static final int FLASH_MODE_SINGLE = 1; |
| 2186 | |
| 2187 | /** |
Zhijun He | 66d065a | 2014-01-16 18:18:50 -0800 | [diff] [blame] | 2188 | * <p>Transition flash to continuously on.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2189 | * @see CaptureRequest#FLASH_MODE |
| 2190 | */ |
| 2191 | public static final int FLASH_MODE_TORCH = 2; |
| 2192 | |
| 2193 | // |
Ruben Brunk | eba1b3a | 2014-02-07 18:23:50 -0800 | [diff] [blame] | 2194 | // Enumeration values for CaptureRequest#HOT_PIXEL_MODE |
| 2195 | // |
| 2196 | |
| 2197 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2198 | * <p>No hot pixel correction is applied.</p> |
Ruben Brunk | eba1b3a | 2014-02-07 18:23:50 -0800 | [diff] [blame] | 2199 | * <p>The frame rate must not be reduced relative to sensor raw output |
| 2200 | * for this option.</p> |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2201 | * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p> |
Ruben Brunk | 9d454fd | 2014-03-04 14:11:52 -0800 | [diff] [blame] | 2202 | * |
| 2203 | * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP |
Ruben Brunk | eba1b3a | 2014-02-07 18:23:50 -0800 | [diff] [blame] | 2204 | * @see CaptureRequest#HOT_PIXEL_MODE |
| 2205 | */ |
| 2206 | public static final int HOT_PIXEL_MODE_OFF = 0; |
| 2207 | |
| 2208 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2209 | * <p>Hot pixel correction is applied, without reducing frame |
| 2210 | * rate relative to sensor raw output.</p> |
| 2211 | * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p> |
Ruben Brunk | 9d454fd | 2014-03-04 14:11:52 -0800 | [diff] [blame] | 2212 | * |
| 2213 | * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP |
Ruben Brunk | eba1b3a | 2014-02-07 18:23:50 -0800 | [diff] [blame] | 2214 | * @see CaptureRequest#HOT_PIXEL_MODE |
| 2215 | */ |
| 2216 | public static final int HOT_PIXEL_MODE_FAST = 1; |
| 2217 | |
| 2218 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2219 | * <p>High-quality hot pixel correction is applied, at a cost |
Yin-Chia Yeh | fba08dd | 2015-04-02 14:05:14 -0700 | [diff] [blame] | 2220 | * of possibly reduced frame rate relative to sensor raw output.</p> |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2221 | * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p> |
Ruben Brunk | 9d454fd | 2014-03-04 14:11:52 -0800 | [diff] [blame] | 2222 | * |
| 2223 | * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP |
Ruben Brunk | eba1b3a | 2014-02-07 18:23:50 -0800 | [diff] [blame] | 2224 | * @see CaptureRequest#HOT_PIXEL_MODE |
| 2225 | */ |
| 2226 | public static final int HOT_PIXEL_MODE_HIGH_QUALITY = 2; |
| 2227 | |
| 2228 | // |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2229 | // Enumeration values for CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE |
| 2230 | // |
| 2231 | |
| 2232 | /** |
Ruben Brunk | 00849b3 | 2014-01-17 18:30:23 -0800 | [diff] [blame] | 2233 | * <p>Optical stabilization is unavailable.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2234 | * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE |
| 2235 | */ |
| 2236 | public static final int LENS_OPTICAL_STABILIZATION_MODE_OFF = 0; |
| 2237 | |
| 2238 | /** |
Ruben Brunk | 00849b3 | 2014-01-17 18:30:23 -0800 | [diff] [blame] | 2239 | * <p>Optical stabilization is enabled.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2240 | * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE |
| 2241 | */ |
| 2242 | public static final int LENS_OPTICAL_STABILIZATION_MODE_ON = 1; |
| 2243 | |
| 2244 | // |
| 2245 | // Enumeration values for CaptureRequest#NOISE_REDUCTION_MODE |
| 2246 | // |
| 2247 | |
| 2248 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2249 | * <p>No noise reduction is applied.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2250 | * @see CaptureRequest#NOISE_REDUCTION_MODE |
| 2251 | */ |
| 2252 | public static final int NOISE_REDUCTION_MODE_OFF = 0; |
| 2253 | |
| 2254 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2255 | * <p>Noise reduction is applied without reducing frame rate relative to sensor |
Chien-Yu Chen | 9c9167e | 2015-07-14 16:38:25 -0700 | [diff] [blame] | 2256 | * output. It may be the same as OFF if noise reduction will reduce frame rate |
| 2257 | * relative to sensor.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2258 | * @see CaptureRequest#NOISE_REDUCTION_MODE |
| 2259 | */ |
| 2260 | public static final int NOISE_REDUCTION_MODE_FAST = 1; |
| 2261 | |
| 2262 | /** |
Yin-Chia Yeh | fba08dd | 2015-04-02 14:05:14 -0700 | [diff] [blame] | 2263 | * <p>High-quality noise reduction is applied, at the cost of possibly reduced frame |
| 2264 | * rate relative to sensor output.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2265 | * @see CaptureRequest#NOISE_REDUCTION_MODE |
| 2266 | */ |
| 2267 | public static final int NOISE_REDUCTION_MODE_HIGH_QUALITY = 2; |
| 2268 | |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 2269 | /** |
| 2270 | * <p>MINIMAL noise reduction is applied without reducing frame rate relative to |
| 2271 | * sensor output. </p> |
| 2272 | * @see CaptureRequest#NOISE_REDUCTION_MODE |
| 2273 | */ |
| 2274 | public static final int NOISE_REDUCTION_MODE_MINIMAL = 3; |
| 2275 | |
Eino-Ville Talvala | 0dd1750 | 2015-07-07 10:43:07 -0700 | [diff] [blame] | 2276 | /** |
| 2277 | * <p>Noise reduction is applied at different levels for different output streams, |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 2278 | * based on resolution. Streams at maximum recording resolution (see {@link android.hardware.camera2.CameraDevice#createCaptureSession }) |
| 2279 | * or below have noise reduction applied, while higher-resolution streams have MINIMAL (if |
| 2280 | * supported) or no noise reduction applied (if MINIMAL is not supported.) The degree of |
| 2281 | * noise reduction for low-resolution streams is tuned so that frame rate is not impacted, |
| 2282 | * and the quality is equal to or better than FAST (since it is only applied to |
| 2283 | * lower-resolution outputs, quality may improve from FAST).</p> |
Eino-Ville Talvala | 0dd1750 | 2015-07-07 10:43:07 -0700 | [diff] [blame] | 2284 | * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode |
| 2285 | * with YUV or PRIVATE reprocessing, where the application continuously captures |
| 2286 | * high-resolution intermediate buffers into a circular buffer, from which a final image is |
| 2287 | * produced via reprocessing when a user takes a picture. For such a use case, the |
| 2288 | * high-resolution buffers must not have noise reduction applied to maximize efficiency of |
| 2289 | * preview and to avoid over-applying noise filtering when reprocessing, while |
| 2290 | * low-resolution buffers (used for recording or preview, generally) need noise reduction |
| 2291 | * applied for reasonable preview quality.</p> |
| 2292 | * <p>This mode is guaranteed to be supported by devices that support either the |
| 2293 | * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities |
Chien-Yu Chen | 7233391 | 2015-07-08 11:55:19 -0700 | [diff] [blame] | 2294 | * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} lists either of those capabilities) and it will |
| 2295 | * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p> |
Eino-Ville Talvala | 0dd1750 | 2015-07-07 10:43:07 -0700 | [diff] [blame] | 2296 | * |
| 2297 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 2298 | * @see CaptureRequest#NOISE_REDUCTION_MODE |
| 2299 | */ |
| 2300 | public static final int NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG = 4; |
| 2301 | |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2302 | // |
Igor Murashkin | c127f05 | 2014-01-17 18:06:02 -0800 | [diff] [blame] | 2303 | // Enumeration values for CaptureRequest#SENSOR_TEST_PATTERN_MODE |
| 2304 | // |
| 2305 | |
| 2306 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2307 | * <p>No test pattern mode is used, and the camera |
Igor Murashkin | c127f05 | 2014-01-17 18:06:02 -0800 | [diff] [blame] | 2308 | * device returns captures from the image sensor.</p> |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2309 | * <p>This is the default if the key is not set.</p> |
Igor Murashkin | c127f05 | 2014-01-17 18:06:02 -0800 | [diff] [blame] | 2310 | * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE |
| 2311 | */ |
| 2312 | public static final int SENSOR_TEST_PATTERN_MODE_OFF = 0; |
| 2313 | |
| 2314 | /** |
| 2315 | * <p>Each pixel in <code>[R, G_even, G_odd, B]</code> is replaced by its |
| 2316 | * respective color channel provided in |
| 2317 | * {@link CaptureRequest#SENSOR_TEST_PATTERN_DATA android.sensor.testPatternData}.</p> |
| 2318 | * <p>For example:</p> |
| 2319 | * <pre><code>android.testPatternData = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0] |
| 2320 | * </code></pre> |
| 2321 | * <p>All green pixels are 100% green. All red/blue pixels are black.</p> |
| 2322 | * <pre><code>android.testPatternData = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0] |
| 2323 | * </code></pre> |
| 2324 | * <p>All red pixels are 100% red. Only the odd green pixels |
| 2325 | * are 100% green. All blue pixels are 100% black.</p> |
| 2326 | * |
| 2327 | * @see CaptureRequest#SENSOR_TEST_PATTERN_DATA |
| 2328 | * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE |
| 2329 | */ |
| 2330 | public static final int SENSOR_TEST_PATTERN_MODE_SOLID_COLOR = 1; |
| 2331 | |
| 2332 | /** |
| 2333 | * <p>All pixel data is replaced with an 8-bar color pattern.</p> |
| 2334 | * <p>The vertical bars (left-to-right) are as follows:</p> |
| 2335 | * <ul> |
| 2336 | * <li>100% white</li> |
| 2337 | * <li>yellow</li> |
| 2338 | * <li>cyan</li> |
| 2339 | * <li>green</li> |
| 2340 | * <li>magenta</li> |
| 2341 | * <li>red</li> |
| 2342 | * <li>blue</li> |
| 2343 | * <li>black</li> |
| 2344 | * </ul> |
| 2345 | * <p>In general the image would look like the following:</p> |
| 2346 | * <pre><code>W Y C G M R B K |
| 2347 | * W Y C G M R B K |
| 2348 | * W Y C G M R B K |
| 2349 | * W Y C G M R B K |
| 2350 | * W Y C G M R B K |
| 2351 | * . . . . . . . . |
| 2352 | * . . . . . . . . |
| 2353 | * . . . . . . . . |
| 2354 | * |
| 2355 | * (B = Blue, K = Black) |
| 2356 | * </code></pre> |
| 2357 | * <p>Each bar should take up 1/8 of the sensor pixel array width. |
| 2358 | * When this is not possible, the bar size should be rounded |
| 2359 | * down to the nearest integer and the pattern can repeat |
| 2360 | * on the right side.</p> |
| 2361 | * <p>Each bar's height must always take up the full sensor |
| 2362 | * pixel array height.</p> |
| 2363 | * <p>Each pixel in this test pattern must be set to either |
| 2364 | * 0% intensity or 100% intensity.</p> |
| 2365 | * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE |
| 2366 | */ |
| 2367 | public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS = 2; |
| 2368 | |
| 2369 | /** |
| 2370 | * <p>The test pattern is similar to COLOR_BARS, except that |
| 2371 | * each bar should start at its specified color at the top, |
| 2372 | * and fade to gray at the bottom.</p> |
| 2373 | * <p>Furthermore each bar is further subdivided into a left and |
| 2374 | * right half. The left half should have a smooth gradient, |
| 2375 | * and the right half should have a quantized gradient.</p> |
| 2376 | * <p>In particular, the right half's should consist of blocks of the |
| 2377 | * same color for 1/16th active sensor pixel array width.</p> |
| 2378 | * <p>The least significant bits in the quantized gradient should |
| 2379 | * be copied from the most significant bits of the smooth gradient.</p> |
| 2380 | * <p>The height of each bar should always be a multiple of 128. |
| 2381 | * When this is not the case, the pattern should repeat at the bottom |
| 2382 | * of the image.</p> |
| 2383 | * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE |
| 2384 | */ |
| 2385 | public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY = 3; |
| 2386 | |
| 2387 | /** |
| 2388 | * <p>All pixel data is replaced by a pseudo-random sequence |
| 2389 | * generated from a PN9 512-bit sequence (typically implemented |
| 2390 | * in hardware with a linear feedback shift register).</p> |
| 2391 | * <p>The generator should be reset at the beginning of each frame, |
| 2392 | * and thus each subsequent raw frame with this test pattern should |
| 2393 | * be exactly the same as the last.</p> |
| 2394 | * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE |
| 2395 | */ |
| 2396 | public static final int SENSOR_TEST_PATTERN_MODE_PN9 = 4; |
| 2397 | |
| 2398 | /** |
| 2399 | * <p>The first custom test pattern. All custom patterns that are |
| 2400 | * available only on this camera device are at least this numeric |
| 2401 | * value.</p> |
| 2402 | * <p>All of the custom test patterns will be static |
| 2403 | * (that is the raw image must not vary from frame to frame).</p> |
| 2404 | * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE |
| 2405 | */ |
| 2406 | public static final int SENSOR_TEST_PATTERN_MODE_CUSTOM1 = 256; |
| 2407 | |
| 2408 | // |
Zhijun He | ba93fe6 | 2014-01-17 16:43:05 -0800 | [diff] [blame] | 2409 | // Enumeration values for CaptureRequest#SHADING_MODE |
| 2410 | // |
| 2411 | |
| 2412 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2413 | * <p>No lens shading correction is applied.</p> |
Zhijun He | ba93fe6 | 2014-01-17 16:43:05 -0800 | [diff] [blame] | 2414 | * @see CaptureRequest#SHADING_MODE |
Zhijun He | ba93fe6 | 2014-01-17 16:43:05 -0800 | [diff] [blame] | 2415 | */ |
| 2416 | public static final int SHADING_MODE_OFF = 0; |
| 2417 | |
| 2418 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2419 | * <p>Apply lens shading corrections, without slowing |
| 2420 | * frame rate relative to sensor raw output</p> |
Zhijun He | ba93fe6 | 2014-01-17 16:43:05 -0800 | [diff] [blame] | 2421 | * @see CaptureRequest#SHADING_MODE |
Zhijun He | ba93fe6 | 2014-01-17 16:43:05 -0800 | [diff] [blame] | 2422 | */ |
| 2423 | public static final int SHADING_MODE_FAST = 1; |
| 2424 | |
| 2425 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2426 | * <p>Apply high-quality lens shading correction, at the |
Yin-Chia Yeh | fba08dd | 2015-04-02 14:05:14 -0700 | [diff] [blame] | 2427 | * cost of possibly reduced frame rate.</p> |
Zhijun He | ba93fe6 | 2014-01-17 16:43:05 -0800 | [diff] [blame] | 2428 | * @see CaptureRequest#SHADING_MODE |
Zhijun He | ba93fe6 | 2014-01-17 16:43:05 -0800 | [diff] [blame] | 2429 | */ |
| 2430 | public static final int SHADING_MODE_HIGH_QUALITY = 2; |
| 2431 | |
| 2432 | // |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2433 | // Enumeration values for CaptureRequest#STATISTICS_FACE_DETECT_MODE |
| 2434 | // |
| 2435 | |
| 2436 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2437 | * <p>Do not include face detection statistics in capture |
| 2438 | * results.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2439 | * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE |
| 2440 | */ |
| 2441 | public static final int STATISTICS_FACE_DETECT_MODE_OFF = 0; |
| 2442 | |
| 2443 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2444 | * <p>Return face rectangle and confidence values only.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2445 | * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE |
| 2446 | */ |
| 2447 | public static final int STATISTICS_FACE_DETECT_MODE_SIMPLE = 1; |
| 2448 | |
| 2449 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2450 | * <p>Return all face |
| 2451 | * metadata.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2452 | * <p>In this mode, face rectangles, scores, landmarks, and face IDs are all valid.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2453 | * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE |
| 2454 | */ |
| 2455 | public static final int STATISTICS_FACE_DETECT_MODE_FULL = 2; |
| 2456 | |
| 2457 | // |
Eino-Ville Talvala | d96748b | 2013-09-12 11:11:27 -0700 | [diff] [blame] | 2458 | // Enumeration values for CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE |
| 2459 | // |
| 2460 | |
| 2461 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2462 | * <p>Do not include a lens shading map in the capture result.</p> |
Eino-Ville Talvala | d96748b | 2013-09-12 11:11:27 -0700 | [diff] [blame] | 2463 | * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE |
| 2464 | */ |
| 2465 | public static final int STATISTICS_LENS_SHADING_MAP_MODE_OFF = 0; |
| 2466 | |
| 2467 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2468 | * <p>Include a lens shading map in the capture result.</p> |
Eino-Ville Talvala | d96748b | 2013-09-12 11:11:27 -0700 | [diff] [blame] | 2469 | * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE |
| 2470 | */ |
| 2471 | public static final int STATISTICS_LENS_SHADING_MAP_MODE_ON = 1; |
| 2472 | |
| 2473 | // |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2474 | // Enumeration values for CaptureRequest#TONEMAP_MODE |
| 2475 | // |
| 2476 | |
| 2477 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 2478 | * <p>Use the tone mapping curve specified in |
Yin-Chia Yeh | 8490ace | 2014-05-27 10:04:54 -0700 | [diff] [blame] | 2479 | * the {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}* entries.</p> |
Igor Murashkin | e006093 | 2014-01-17 17:24:11 -0800 | [diff] [blame] | 2480 | * <p>All color enhancement and tonemapping must be disabled, except |
| 2481 | * for applying the tonemapping curve specified by |
Yin-Chia Yeh | 8490ace | 2014-05-27 10:04:54 -0700 | [diff] [blame] | 2482 | * {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p> |
Igor Murashkin | e006093 | 2014-01-17 17:24:11 -0800 | [diff] [blame] | 2483 | * <p>Must not slow down frame rate relative to raw |
| 2484 | * sensor output.</p> |
| 2485 | * |
Yin-Chia Yeh | 8490ace | 2014-05-27 10:04:54 -0700 | [diff] [blame] | 2486 | * @see CaptureRequest#TONEMAP_CURVE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2487 | * @see CaptureRequest#TONEMAP_MODE |
| 2488 | */ |
| 2489 | public static final int TONEMAP_MODE_CONTRAST_CURVE = 0; |
| 2490 | |
| 2491 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2492 | * <p>Advanced gamma mapping and color enhancement may be applied, without |
| 2493 | * reducing frame rate compared to raw sensor output.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2494 | * @see CaptureRequest#TONEMAP_MODE |
| 2495 | */ |
| 2496 | public static final int TONEMAP_MODE_FAST = 1; |
| 2497 | |
| 2498 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2499 | * <p>High-quality gamma mapping and color enhancement will be applied, at |
Yin-Chia Yeh | fba08dd | 2015-04-02 14:05:14 -0700 | [diff] [blame] | 2500 | * the cost of possibly reduced frame rate compared to raw sensor output.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2501 | * @see CaptureRequest#TONEMAP_MODE |
| 2502 | */ |
| 2503 | public static final int TONEMAP_MODE_HIGH_QUALITY = 2; |
| 2504 | |
Yin-Chia Yeh | 956c52b | 2015-02-06 11:23:25 -0800 | [diff] [blame] | 2505 | /** |
Yin-Chia Yeh | 03d50da | 2015-05-06 00:10:11 -0700 | [diff] [blame] | 2506 | * <p>Use the gamma value specified in {@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma} to peform |
Yin-Chia Yeh | 956c52b | 2015-02-06 11:23:25 -0800 | [diff] [blame] | 2507 | * tonemapping.</p> |
| 2508 | * <p>All color enhancement and tonemapping must be disabled, except |
Yin-Chia Yeh | 03d50da | 2015-05-06 00:10:11 -0700 | [diff] [blame] | 2509 | * for applying the tonemapping curve specified by {@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma}.</p> |
Yin-Chia Yeh | 956c52b | 2015-02-06 11:23:25 -0800 | [diff] [blame] | 2510 | * <p>Must not slow down frame rate relative to raw sensor output.</p> |
Yin-Chia Yeh | 03d50da | 2015-05-06 00:10:11 -0700 | [diff] [blame] | 2511 | * |
| 2512 | * @see CaptureRequest#TONEMAP_GAMMA |
Yin-Chia Yeh | 956c52b | 2015-02-06 11:23:25 -0800 | [diff] [blame] | 2513 | * @see CaptureRequest#TONEMAP_MODE |
| 2514 | */ |
| 2515 | public static final int TONEMAP_MODE_GAMMA_VALUE = 3; |
| 2516 | |
| 2517 | /** |
| 2518 | * <p>Use the preset tonemapping curve specified in |
Yin-Chia Yeh | 03d50da | 2015-05-06 00:10:11 -0700 | [diff] [blame] | 2519 | * {@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve} to peform tonemapping.</p> |
Yin-Chia Yeh | 956c52b | 2015-02-06 11:23:25 -0800 | [diff] [blame] | 2520 | * <p>All color enhancement and tonemapping must be disabled, except |
| 2521 | * for applying the tonemapping curve specified by |
Yin-Chia Yeh | 03d50da | 2015-05-06 00:10:11 -0700 | [diff] [blame] | 2522 | * {@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve}.</p> |
Yin-Chia Yeh | 956c52b | 2015-02-06 11:23:25 -0800 | [diff] [blame] | 2523 | * <p>Must not slow down frame rate relative to raw sensor output.</p> |
Yin-Chia Yeh | 03d50da | 2015-05-06 00:10:11 -0700 | [diff] [blame] | 2524 | * |
| 2525 | * @see CaptureRequest#TONEMAP_PRESET_CURVE |
Yin-Chia Yeh | 956c52b | 2015-02-06 11:23:25 -0800 | [diff] [blame] | 2526 | * @see CaptureRequest#TONEMAP_MODE |
| 2527 | */ |
| 2528 | public static final int TONEMAP_MODE_PRESET_CURVE = 4; |
| 2529 | |
| 2530 | // |
| 2531 | // Enumeration values for CaptureRequest#TONEMAP_PRESET_CURVE |
| 2532 | // |
| 2533 | |
| 2534 | /** |
| 2535 | * <p>Tonemapping curve is defined by sRGB</p> |
| 2536 | * @see CaptureRequest#TONEMAP_PRESET_CURVE |
| 2537 | */ |
| 2538 | public static final int TONEMAP_PRESET_CURVE_SRGB = 0; |
| 2539 | |
| 2540 | /** |
| 2541 | * <p>Tonemapping curve is defined by ITU-R BT.709</p> |
| 2542 | * @see CaptureRequest#TONEMAP_PRESET_CURVE |
| 2543 | */ |
| 2544 | public static final int TONEMAP_PRESET_CURVE_REC709 = 1; |
| 2545 | |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2546 | // |
| 2547 | // Enumeration values for CaptureResult#CONTROL_AE_STATE |
| 2548 | // |
| 2549 | |
| 2550 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2551 | * <p>AE is off or recently reset.</p> |
| 2552 | * <p>When a camera device is opened, it starts in |
Zhijun He | 60b19dc | 2014-02-24 10:19:20 -0800 | [diff] [blame] | 2553 | * this state. This is a transient state, the camera device may skip reporting |
| 2554 | * this state in capture result.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2555 | * @see CaptureResult#CONTROL_AE_STATE |
| 2556 | */ |
| 2557 | public static final int CONTROL_AE_STATE_INACTIVE = 0; |
| 2558 | |
| 2559 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 2560 | * <p>AE doesn't yet have a good set of control values |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2561 | * for the current scene.</p> |
| 2562 | * <p>This is a transient state, the camera device may skip |
Zhijun He | 60b19dc | 2014-02-24 10:19:20 -0800 | [diff] [blame] | 2563 | * reporting this state in capture result.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2564 | * @see CaptureResult#CONTROL_AE_STATE |
| 2565 | */ |
| 2566 | public static final int CONTROL_AE_STATE_SEARCHING = 1; |
| 2567 | |
| 2568 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 2569 | * <p>AE has a good set of control values for the |
Zhijun He | 228f4f9 | 2014-01-16 17:22:05 -0800 | [diff] [blame] | 2570 | * current scene.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2571 | * @see CaptureResult#CONTROL_AE_STATE |
| 2572 | */ |
| 2573 | public static final int CONTROL_AE_STATE_CONVERGED = 2; |
| 2574 | |
| 2575 | /** |
Zhijun He | 228f4f9 | 2014-01-16 17:22:05 -0800 | [diff] [blame] | 2576 | * <p>AE has been locked.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2577 | * @see CaptureResult#CONTROL_AE_STATE |
| 2578 | */ |
| 2579 | public static final int CONTROL_AE_STATE_LOCKED = 3; |
| 2580 | |
| 2581 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 2582 | * <p>AE has a good set of control values, but flash |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2583 | * needs to be fired for good quality still |
Zhijun He | 228f4f9 | 2014-01-16 17:22:05 -0800 | [diff] [blame] | 2584 | * capture.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2585 | * @see CaptureResult#CONTROL_AE_STATE |
| 2586 | */ |
| 2587 | public static final int CONTROL_AE_STATE_FLASH_REQUIRED = 4; |
| 2588 | |
| 2589 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 2590 | * <p>AE has been asked to do a precapture sequence |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2591 | * and is currently executing it.</p> |
| 2592 | * <p>Precapture can be triggered through setting |
Zhijun He | fa95b04 | 2015-02-09 10:40:49 -0800 | [diff] [blame] | 2593 | * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} to START. Currently |
| 2594 | * active and completed (if it causes camera device internal AE lock) precapture |
| 2595 | * metering sequence can be canceled through setting |
| 2596 | * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} to CANCEL.</p> |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2597 | * <p>Once PRECAPTURE completes, AE will transition to CONVERGED |
| 2598 | * or FLASH_REQUIRED as appropriate. This is a transient |
| 2599 | * state, the camera device may skip reporting this state in |
| 2600 | * capture result.</p> |
Zhijun He | 228f4f9 | 2014-01-16 17:22:05 -0800 | [diff] [blame] | 2601 | * |
| 2602 | * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2603 | * @see CaptureResult#CONTROL_AE_STATE |
| 2604 | */ |
| 2605 | public static final int CONTROL_AE_STATE_PRECAPTURE = 5; |
| 2606 | |
| 2607 | // |
| 2608 | // Enumeration values for CaptureResult#CONTROL_AF_STATE |
| 2609 | // |
| 2610 | |
| 2611 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2612 | * <p>AF is off or has not yet tried to scan/been asked |
| 2613 | * to scan.</p> |
| 2614 | * <p>When a camera device is opened, it starts in this |
| 2615 | * state. This is a transient state, the camera device may |
| 2616 | * skip reporting this state in capture |
| 2617 | * result.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2618 | * @see CaptureResult#CONTROL_AF_STATE |
| 2619 | */ |
| 2620 | public static final int CONTROL_AF_STATE_INACTIVE = 0; |
| 2621 | |
| 2622 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2623 | * <p>AF is currently performing an AF scan initiated the |
| 2624 | * camera device in a continuous autofocus mode.</p> |
| 2625 | * <p>Only used by CONTINUOUS_* AF modes. This is a transient |
| 2626 | * state, the camera device may skip reporting this state in |
| 2627 | * capture result.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2628 | * @see CaptureResult#CONTROL_AF_STATE |
| 2629 | */ |
| 2630 | public static final int CONTROL_AF_STATE_PASSIVE_SCAN = 1; |
| 2631 | |
| 2632 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2633 | * <p>AF currently believes it is in focus, but may |
| 2634 | * restart scanning at any time.</p> |
| 2635 | * <p>Only used by CONTINUOUS_* AF modes. This is a transient |
| 2636 | * state, the camera device may skip reporting this state in |
| 2637 | * capture result.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2638 | * @see CaptureResult#CONTROL_AF_STATE |
| 2639 | */ |
| 2640 | public static final int CONTROL_AF_STATE_PASSIVE_FOCUSED = 2; |
| 2641 | |
| 2642 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2643 | * <p>AF is performing an AF scan because it was |
| 2644 | * triggered by AF trigger.</p> |
| 2645 | * <p>Only used by AUTO or MACRO AF modes. This is a transient |
| 2646 | * state, the camera device may skip reporting this state in |
| 2647 | * capture result.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2648 | * @see CaptureResult#CONTROL_AF_STATE |
| 2649 | */ |
| 2650 | public static final int CONTROL_AF_STATE_ACTIVE_SCAN = 3; |
| 2651 | |
| 2652 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2653 | * <p>AF believes it is focused correctly and has locked |
| 2654 | * focus.</p> |
| 2655 | * <p>This state is reached only after an explicit START AF trigger has been |
| 2656 | * sent ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}), when good focus has been obtained.</p> |
| 2657 | * <p>The lens will remain stationary until the AF mode ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) is changed or |
| 2658 | * a new AF trigger is sent to the camera device ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}).</p> |
| 2659 | * |
| 2660 | * @see CaptureRequest#CONTROL_AF_MODE |
| 2661 | * @see CaptureRequest#CONTROL_AF_TRIGGER |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2662 | * @see CaptureResult#CONTROL_AF_STATE |
| 2663 | */ |
| 2664 | public static final int CONTROL_AF_STATE_FOCUSED_LOCKED = 4; |
| 2665 | |
| 2666 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2667 | * <p>AF has failed to focus successfully and has locked |
| 2668 | * focus.</p> |
| 2669 | * <p>This state is reached only after an explicit START AF trigger has been |
| 2670 | * sent ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}), when good focus cannot be obtained.</p> |
| 2671 | * <p>The lens will remain stationary until the AF mode ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) is changed or |
| 2672 | * a new AF trigger is sent to the camera device ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}).</p> |
| 2673 | * |
| 2674 | * @see CaptureRequest#CONTROL_AF_MODE |
| 2675 | * @see CaptureRequest#CONTROL_AF_TRIGGER |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2676 | * @see CaptureResult#CONTROL_AF_STATE |
| 2677 | */ |
| 2678 | public static final int CONTROL_AF_STATE_NOT_FOCUSED_LOCKED = 5; |
| 2679 | |
Eino-Ville Talvala | 9f880f7 | 2013-09-20 17:50:41 -0700 | [diff] [blame] | 2680 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2681 | * <p>AF finished a passive scan without finding focus, |
| 2682 | * and may restart scanning at any time.</p> |
| 2683 | * <p>Only used by CONTINUOUS_* AF modes. This is a transient state, the camera |
Zhijun He | 60b19dc | 2014-02-24 10:19:20 -0800 | [diff] [blame] | 2684 | * device may skip reporting this state in capture result.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2685 | * <p>LEGACY camera devices do not support this state. When a passive |
| 2686 | * scan has finished, it will always go to PASSIVE_FOCUSED.</p> |
Eino-Ville Talvala | 9f880f7 | 2013-09-20 17:50:41 -0700 | [diff] [blame] | 2687 | * @see CaptureResult#CONTROL_AF_STATE |
| 2688 | */ |
| 2689 | public static final int CONTROL_AF_STATE_PASSIVE_UNFOCUSED = 6; |
| 2690 | |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2691 | // |
| 2692 | // Enumeration values for CaptureResult#CONTROL_AWB_STATE |
| 2693 | // |
| 2694 | |
| 2695 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2696 | * <p>AWB is not in auto mode, or has not yet started metering.</p> |
| 2697 | * <p>When a camera device is opened, it starts in this |
| 2698 | * state. This is a transient state, the camera device may |
| 2699 | * skip reporting this state in capture |
| 2700 | * result.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2701 | * @see CaptureResult#CONTROL_AWB_STATE |
| 2702 | */ |
| 2703 | public static final int CONTROL_AWB_STATE_INACTIVE = 0; |
| 2704 | |
| 2705 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 2706 | * <p>AWB doesn't yet have a good set of control |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2707 | * values for the current scene.</p> |
| 2708 | * <p>This is a transient state, the camera device |
Zhijun He | 60b19dc | 2014-02-24 10:19:20 -0800 | [diff] [blame] | 2709 | * may skip reporting this state in capture result.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2710 | * @see CaptureResult#CONTROL_AWB_STATE |
| 2711 | */ |
| 2712 | public static final int CONTROL_AWB_STATE_SEARCHING = 1; |
| 2713 | |
| 2714 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 2715 | * <p>AWB has a good set of control values for the |
Zhijun He | 228f4f9 | 2014-01-16 17:22:05 -0800 | [diff] [blame] | 2716 | * current scene.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2717 | * @see CaptureResult#CONTROL_AWB_STATE |
| 2718 | */ |
| 2719 | public static final int CONTROL_AWB_STATE_CONVERGED = 2; |
| 2720 | |
| 2721 | /** |
Zhijun He | 228f4f9 | 2014-01-16 17:22:05 -0800 | [diff] [blame] | 2722 | * <p>AWB has been locked.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2723 | * @see CaptureResult#CONTROL_AWB_STATE |
| 2724 | */ |
| 2725 | public static final int CONTROL_AWB_STATE_LOCKED = 3; |
| 2726 | |
| 2727 | // |
Chien-Yu Chen | e8d86eb | 2017-11-27 15:42:44 -0800 | [diff] [blame] | 2728 | // Enumeration values for CaptureResult#CONTROL_AF_SCENE_CHANGE |
| 2729 | // |
| 2730 | |
| 2731 | /** |
Chien-Yu Chen | 2adc8ec | 2017-12-07 14:45:50 -0800 | [diff] [blame] | 2732 | * <p>Scene change is not detected within the AF region(s).</p> |
Chien-Yu Chen | e8d86eb | 2017-11-27 15:42:44 -0800 | [diff] [blame] | 2733 | * @see CaptureResult#CONTROL_AF_SCENE_CHANGE |
| 2734 | */ |
| 2735 | public static final int CONTROL_AF_SCENE_CHANGE_NOT_DETECTED = 0; |
| 2736 | |
| 2737 | /** |
Chien-Yu Chen | 2adc8ec | 2017-12-07 14:45:50 -0800 | [diff] [blame] | 2738 | * <p>Scene change is detected within the AF region(s).</p> |
Chien-Yu Chen | e8d86eb | 2017-11-27 15:42:44 -0800 | [diff] [blame] | 2739 | * @see CaptureResult#CONTROL_AF_SCENE_CHANGE |
| 2740 | */ |
| 2741 | public static final int CONTROL_AF_SCENE_CHANGE_DETECTED = 1; |
| 2742 | |
| 2743 | // |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2744 | // Enumeration values for CaptureResult#FLASH_STATE |
| 2745 | // |
| 2746 | |
| 2747 | /** |
Zhijun He | 8dda727 | 2014-03-25 13:49:30 -0700 | [diff] [blame] | 2748 | * <p>No flash on camera.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2749 | * @see CaptureResult#FLASH_STATE |
| 2750 | */ |
| 2751 | public static final int FLASH_STATE_UNAVAILABLE = 0; |
| 2752 | |
| 2753 | /** |
Zhijun He | 8dda727 | 2014-03-25 13:49:30 -0700 | [diff] [blame] | 2754 | * <p>Flash is charging and cannot be fired.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2755 | * @see CaptureResult#FLASH_STATE |
| 2756 | */ |
| 2757 | public static final int FLASH_STATE_CHARGING = 1; |
| 2758 | |
| 2759 | /** |
Zhijun He | 8dda727 | 2014-03-25 13:49:30 -0700 | [diff] [blame] | 2760 | * <p>Flash is ready to fire.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2761 | * @see CaptureResult#FLASH_STATE |
| 2762 | */ |
| 2763 | public static final int FLASH_STATE_READY = 2; |
| 2764 | |
| 2765 | /** |
Zhijun He | 8dda727 | 2014-03-25 13:49:30 -0700 | [diff] [blame] | 2766 | * <p>Flash fired for this capture.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2767 | * @see CaptureResult#FLASH_STATE |
| 2768 | */ |
| 2769 | public static final int FLASH_STATE_FIRED = 3; |
| 2770 | |
Zhijun He | 8dda727 | 2014-03-25 13:49:30 -0700 | [diff] [blame] | 2771 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2772 | * <p>Flash partially illuminated this frame.</p> |
| 2773 | * <p>This is usually due to the next or previous frame having |
| 2774 | * the flash fire, and the flash spilling into this capture |
Zhijun He | 8dda727 | 2014-03-25 13:49:30 -0700 | [diff] [blame] | 2775 | * due to hardware limitations.</p> |
| 2776 | * @see CaptureResult#FLASH_STATE |
| 2777 | */ |
| 2778 | public static final int FLASH_STATE_PARTIAL = 4; |
| 2779 | |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2780 | // |
| 2781 | // Enumeration values for CaptureResult#LENS_STATE |
| 2782 | // |
| 2783 | |
| 2784 | /** |
Eino-Ville Talvala | d8fd679 | 2014-02-10 12:41:04 -0800 | [diff] [blame] | 2785 | * <p>The lens parameters ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}, |
| 2786 | * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}) are not changing.</p> |
Zhijun He | ca1b73a | 2014-02-03 12:39:53 -0800 | [diff] [blame] | 2787 | * |
| 2788 | * @see CaptureRequest#LENS_APERTURE |
Eino-Ville Talvala | d8fd679 | 2014-02-10 12:41:04 -0800 | [diff] [blame] | 2789 | * @see CaptureRequest#LENS_FILTER_DENSITY |
Zhijun He | ca1b73a | 2014-02-03 12:39:53 -0800 | [diff] [blame] | 2790 | * @see CaptureRequest#LENS_FOCAL_LENGTH |
Eino-Ville Talvala | d8fd679 | 2014-02-10 12:41:04 -0800 | [diff] [blame] | 2791 | * @see CaptureRequest#LENS_FOCUS_DISTANCE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2792 | * @see CaptureResult#LENS_STATE |
| 2793 | */ |
| 2794 | public static final int LENS_STATE_STATIONARY = 0; |
| 2795 | |
Igor Murashkin | 9ea4ae6 | 2013-09-11 21:40:11 -0700 | [diff] [blame] | 2796 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2797 | * <p>One or several of the lens parameters |
| 2798 | * ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}, |
| 2799 | * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} or {@link CaptureRequest#LENS_APERTURE android.lens.aperture}) is |
| 2800 | * currently changing.</p> |
Zhijun He | ca1b73a | 2014-02-03 12:39:53 -0800 | [diff] [blame] | 2801 | * |
| 2802 | * @see CaptureRequest#LENS_APERTURE |
Eino-Ville Talvala | d8fd679 | 2014-02-10 12:41:04 -0800 | [diff] [blame] | 2803 | * @see CaptureRequest#LENS_FILTER_DENSITY |
Zhijun He | ca1b73a | 2014-02-03 12:39:53 -0800 | [diff] [blame] | 2804 | * @see CaptureRequest#LENS_FOCAL_LENGTH |
Eino-Ville Talvala | d8fd679 | 2014-02-10 12:41:04 -0800 | [diff] [blame] | 2805 | * @see CaptureRequest#LENS_FOCUS_DISTANCE |
Igor Murashkin | 9ea4ae6 | 2013-09-11 21:40:11 -0700 | [diff] [blame] | 2806 | * @see CaptureResult#LENS_STATE |
| 2807 | */ |
| 2808 | public static final int LENS_STATE_MOVING = 1; |
| 2809 | |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2810 | // |
| 2811 | // Enumeration values for CaptureResult#STATISTICS_SCENE_FLICKER |
| 2812 | // |
| 2813 | |
| 2814 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2815 | * <p>The camera device does not detect any flickering illumination |
| 2816 | * in the current scene.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2817 | * @see CaptureResult#STATISTICS_SCENE_FLICKER |
| 2818 | */ |
| 2819 | public static final int STATISTICS_SCENE_FLICKER_NONE = 0; |
| 2820 | |
| 2821 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2822 | * <p>The camera device detects illumination flickering at 50Hz |
| 2823 | * in the current scene.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2824 | * @see CaptureResult#STATISTICS_SCENE_FLICKER |
| 2825 | */ |
| 2826 | public static final int STATISTICS_SCENE_FLICKER_50HZ = 1; |
| 2827 | |
| 2828 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2829 | * <p>The camera device detects illumination flickering at 60Hz |
| 2830 | * in the current scene.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2831 | * @see CaptureResult#STATISTICS_SCENE_FLICKER |
| 2832 | */ |
| 2833 | public static final int STATISTICS_SCENE_FLICKER_60HZ = 2; |
| 2834 | |
Igor Murashkin | 3865a84 | 2014-01-17 18:18:39 -0800 | [diff] [blame] | 2835 | // |
| 2836 | // Enumeration values for CaptureResult#SYNC_FRAME_NUMBER |
| 2837 | // |
| 2838 | |
| 2839 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2840 | * <p>The current result is not yet fully synchronized to any request.</p> |
| 2841 | * <p>Synchronization is in progress, and reading metadata from this |
Igor Murashkin | 3865a84 | 2014-01-17 18:18:39 -0800 | [diff] [blame] | 2842 | * result may include a mix of data that have taken effect since the |
| 2843 | * last synchronization time.</p> |
| 2844 | * <p>In some future result, within {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} frames, |
| 2845 | * this value will update to the actual frame number frame number |
| 2846 | * the result is guaranteed to be synchronized to (as long as the |
| 2847 | * request settings remain constant).</p> |
| 2848 | * |
| 2849 | * @see CameraCharacteristics#SYNC_MAX_LATENCY |
| 2850 | * @see CaptureResult#SYNC_FRAME_NUMBER |
| 2851 | * @hide |
| 2852 | */ |
| 2853 | public static final int SYNC_FRAME_NUMBER_CONVERGING = -1; |
| 2854 | |
| 2855 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2856 | * <p>The current result's synchronization status is unknown.</p> |
| 2857 | * <p>The result may have already converged, or it may be in |
| 2858 | * progress. Reading from this result may include some mix |
| 2859 | * of settings from past requests.</p> |
Igor Murashkin | 3865a84 | 2014-01-17 18:18:39 -0800 | [diff] [blame] | 2860 | * <p>After a settings change, the new settings will eventually all |
| 2861 | * take effect for the output buffers and results. However, this |
| 2862 | * value will not change when that happens. Altering settings |
| 2863 | * rapidly may provide outcomes using mixes of settings from recent |
| 2864 | * requests.</p> |
| 2865 | * <p>This value is intended primarily for backwards compatibility with |
| 2866 | * the older camera implementations (for android.hardware.Camera).</p> |
| 2867 | * @see CaptureResult#SYNC_FRAME_NUMBER |
| 2868 | * @hide |
| 2869 | */ |
| 2870 | public static final int SYNC_FRAME_NUMBER_UNKNOWN = -2; |
| 2871 | |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2872 | /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ |
| 2873 | * End generated code |
| 2874 | *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/ |
| 2875 | |
Igor Murashkin | b519cc5 | 2013-07-02 11:23:44 -0700 | [diff] [blame] | 2876 | } |