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