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