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