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