blob: cb11d0f54a7b79d1671726ff0bbfe22edf20786d [file] [log] [blame]
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001/*
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 Talvala2f1a2e42013-07-25 17:12:05 -070017package android.hardware.camera2;
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080018
Eino-Ville Talvala8b905572015-05-14 15:43:01 -070019import android.annotation.NonNull;
Igor Murashkincc542a42014-06-25 11:52:23 -070020import android.hardware.camera2.impl.CameraMetadataNative;
Igor Murashkin6c76f582014-07-15 17:19:49 -070021import android.hardware.camera2.impl.PublicKey;
22import android.hardware.camera2.impl.SyntheticKey;
Igor Murashkind6d65152014-05-19 16:31:02 -070023import android.util.Log;
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080024
Igor Murashkin7a36a0f2013-09-10 18:13:09 -070025import java.lang.reflect.Field;
Igor Murashkin03fdb142013-09-30 12:14:58 -070026import java.lang.reflect.Modifier;
Igor Murashkin7a36a0f2013-09-10 18:13:09 -070027import java.util.ArrayList;
Igor Murashkincc542a42014-06-25 11:52:23 -070028import java.util.Arrays;
Igor Murashkin7a36a0f2013-09-10 18:13:09 -070029import java.util.Collections;
30import java.util.List;
31
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080032/**
33 * The base class for camera controls and information.
34 *
Igor Murashkin7a36a0f2013-09-10 18:13:09 -070035 * <p>
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080036 * 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 Murashkin7a36a0f2013-09-10 18:13:09 -070039 * </p>
40 *
41 * <p>
42 * All instances of CameraMetadata are immutable. The list of keys with {@link #getKeys()}
Igor Murashkind6d65152014-05-19 16:31:02 -070043 * never changes, nor do the values returned by any key with {@code #get} throughout
Igor Murashkin7a36a0f2013-09-10 18:13:09 -070044 * the lifetime of the object.
45 * </p>
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080046 *
47 * @see CameraDevice
48 * @see CameraManager
Igor Murashkin68f40062013-09-10 12:15:54 -070049 * @see CameraCharacteristics
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080050 **/
Igor Murashkind6d65152014-05-19 16:31:02 -070051public abstract class CameraMetadata<TKey> {
52
53 private static final String TAG = "CameraMetadataAb";
Eino-Ville Talvalaa78791f2015-06-01 12:39:54 -070054 private static final boolean DEBUG = false;
Emilian Peevde62d842017-03-23 19:20:40 +000055 private CameraMetadataNative mNativeInstance = null;
Igor Murashkin70725502013-06-25 20:27:06 +000056
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080057 /**
Igor Murashkin68f40062013-09-10 12:15:54 -070058 * 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 Talvala70c22072013-08-27 12:09:04 -070066 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080067 */
Eino-Ville Talvala70c22072013-08-27 12:09:04 -070068 protected CameraMetadata() {
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080069 }
70
71 /**
Igor Murashkin7a36a0f2013-09-10 18:13:09 -070072 * Get a camera metadata field value.
73 *
74 * <p>The field definitions can be
Igor Murashkin68f40062013-09-10 12:15:54 -070075 * found in {@link CameraCharacteristics}, {@link CaptureResult}, and
Igor Murashkin7a36a0f2013-09-10 18:13:09 -070076 * {@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 Talvalab2675542012-12-12 13:29:45 -080080 *
Igor Murashkinb519cc52013-07-02 11:23:44 -070081 * @throws IllegalArgumentException if the key was not valid
82 *
Benjamin Hendricks24eb8a32013-08-15 12:46:22 -070083 * @param key The metadata field to read.
84 * @return The value of that key, or {@code null} if the field is not set.
Igor Murashkind6d65152014-05-19 16:31:02 -070085 *
86 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080087 */
Igor Murashkind6d65152014-05-19 16:31:02 -070088 protected abstract <T> T getProtected(TKey key);
89
90 /**
91 * @hide
92 */
Emilian Peevde62d842017-03-23 19:20:40 +000093 protected void setNativeInstance(CameraMetadataNative nativeInstance) {
94 mNativeInstance = nativeInstance;
95 }
96
97 /**
98 * @hide
99 */
Igor Murashkind6d65152014-05-19 16:31:02 -0700100 protected abstract Class<TKey> getKeyClass();
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800101
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700102 /**
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 Murashkind6d65152014-05-19 16:31:02 -0700108 * <p>All values retrieved by a key from this list with {@code #get} are guaranteed to be
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700109 * 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 Murashkind6d65152014-05-19 16:31:02 -0700114 @SuppressWarnings("unchecked")
Eino-Ville Talvala8b905572015-05-14 15:43:01 -0700115 @NonNull
Igor Murashkind6d65152014-05-19 16:31:02 -0700116 public List<TKey> getKeys() {
117 Class<CameraMetadata<TKey>> thisClass = (Class<CameraMetadata<TKey>>) getClass();
Igor Murashkincc542a42014-06-25 11:52:23 -0700118 return Collections.unmodifiableList(
Emilian Peevde62d842017-03-23 19:20:40 +0000119 getKeys(thisClass, getKeyClass(), this, /*filterTags*/null));
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700120 }
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 Murashkincc542a42014-06-25 11:52:23 -0700129 *
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 Murashkin7a36a0f2013-09-10 18:13:09 -0700135 */
Igor Murashkind6d65152014-05-19 16:31:02 -0700136 /*package*/ @SuppressWarnings("unchecked")
Emilian Peevde62d842017-03-23 19:20:40 +0000137 <TKey> ArrayList<TKey> getKeys(
Igor Murashkind6d65152014-05-19 16:31:02 -0700138 Class<?> type, Class<TKey> keyClass,
Igor Murashkincc542a42014-06-25 11:52:23 -0700139 CameraMetadata<TKey> instance,
140 int[] filterTags) {
Igor Murashkind6d65152014-05-19 16:31:02 -0700141
Eino-Ville Talvalaa78791f2015-06-01 12:39:54 -0700142 if (DEBUG) Log.v(TAG, "getKeysStatic for " + type);
Igor Murashkind6d65152014-05-19 16:31:02 -0700143
Igor Murashkin696bbee2014-08-07 18:02:51 -0700144 // 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 Murashkincc542a42014-06-25 11:52:23 -0700149 if (filterTags != null) {
150 Arrays.sort(filterTags);
151 }
152
Igor Murashkind6d65152014-05-19 16:31:02 -0700153 ArrayList<TKey> keyList = new ArrayList<TKey>();
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700154
155 Field[] fields = type.getDeclaredFields();
156 for (Field field : fields) {
Igor Murashkin03fdb142013-09-30 12:14:58 -0700157 // Filter for Keys that are public
Igor Murashkind6d65152014-05-19 16:31:02 -0700158 if (field.getType().isAssignableFrom(keyClass) &&
Igor Murashkin03fdb142013-09-30 12:14:58 -0700159 (field.getModifiers() & Modifier.PUBLIC) != 0) {
Igor Murashkind6d65152014-05-19 16:31:02 -0700160
161 TKey key;
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700162 try {
Igor Murashkind6d65152014-05-19 16:31:02 -0700163 key = (TKey) field.get(instance);
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700164 } 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 Murashkind6d65152014-05-19 16:31:02 -0700169
170 if (instance == null || instance.getProtected(key) != null) {
Igor Murashkin6c76f582014-07-15 17:19:49 -0700171 if (shouldKeyBeAdded(key, field, filterTags)) {
Igor Murashkincc542a42014-06-25 11:52:23 -0700172 keyList.add(key);
173
Eino-Ville Talvalaa78791f2015-06-01 12:39:54 -0700174 if (DEBUG) {
Igor Murashkincc542a42014-06-25 11:52:23 -0700175 Log.v(TAG, "getKeysStatic - key was added - " + key);
176 }
Eino-Ville Talvalaa78791f2015-06-01 12:39:54 -0700177 } else if (DEBUG) {
Igor Murashkincc542a42014-06-25 11:52:23 -0700178 Log.v(TAG, "getKeysStatic - key was filtered - " + key);
179 }
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700180 }
181 }
182 }
183
Emilian Peevde62d842017-03-23 19:20:40 +0000184 if (null == mNativeInstance) {
185 return keyList;
186 }
187
188 ArrayList<TKey> vendorKeys = mNativeInstance.getAllVendorKeys(keyClass);
Ruben Brunkc620eb72015-07-29 18:19:11 -0700189
190 if (vendorKeys != null) {
191 for (TKey k : vendorKeys) {
192 String keyName;
Emilian Peevde62d842017-03-23 19:20:40 +0000193 long vendorId;
Ruben Brunkc620eb72015-07-29 18:19:11 -0700194 if (k instanceof CaptureRequest.Key<?>) {
195 keyName = ((CaptureRequest.Key<?>) k).getName();
Emilian Peevde62d842017-03-23 19:20:40 +0000196 vendorId = ((CaptureRequest.Key<?>) k).getVendorId();
Ruben Brunkc620eb72015-07-29 18:19:11 -0700197 } else if (k instanceof CaptureResult.Key<?>) {
198 keyName = ((CaptureResult.Key<?>) k).getName();
Emilian Peevde62d842017-03-23 19:20:40 +0000199 vendorId = ((CaptureResult.Key<?>) k).getVendorId();
Ruben Brunkc620eb72015-07-29 18:19:11 -0700200 } else if (k instanceof CameraCharacteristics.Key<?>) {
201 keyName = ((CameraCharacteristics.Key<?>) k).getName();
Emilian Peevde62d842017-03-23 19:20:40 +0000202 vendorId = ((CameraCharacteristics.Key<?>) k).getVendorId();
Ruben Brunkc620eb72015-07-29 18:19:11 -0700203 } else {
204 continue;
205 }
206
207 if (filterTags == null || Arrays.binarySearch(filterTags,
Emilian Peevde62d842017-03-23 19:20:40 +0000208 CameraMetadataNative.getTag(keyName, vendorId)) >= 0) {
Ruben Brunkc620eb72015-07-29 18:19:11 -0700209 keyList.add(k);
210 }
211 }
212 }
213
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700214 return keyList;
215 }
216
Igor Murashkincc542a42014-06-25 11:52:23 -0700217 @SuppressWarnings("rawtypes")
Igor Murashkin6c76f582014-07-15 17:19:49 -0700218 private static <TKey> boolean shouldKeyBeAdded(TKey key, Field field, int[] filterTags) {
Igor Murashkincc542a42014-06-25 11:52:23 -0700219 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 Murashkin6c76f582014-07-15 17:19:49 -0700239 if (field.getAnnotation(PublicKey.class) == null) {
240 // Never expose @hide keys up to the API user
241 return false;
242 }
243
Igor Murashkincc542a42014-06-25 11:52:23 -0700244 // No filtering necessary
245 if (filterTags == null) {
246 return true;
247 }
248
Igor Murashkin6c76f582014-07-15 17:19:49 -0700249 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 Murashkincc542a42014-06-25 11:52:23 -0700260 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 Talvala5a32b20c2013-08-08 12:38:36 -0700266 /*@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 Heff413932014-02-07 15:44:30 -0800273 // 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 Talvalae600d6a2014-06-09 14:25:50 -0700278 * {@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 Heff413932014-02-07 15:44:30 -0800280 * 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 Talvalae600d6a2014-06-09 14:25:50 -0700293 * <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 Heff413932014-02-07 15:44:30 -0800299 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
300 */
301 public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE = 1;
302
303 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700304 * <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 Heff413932014-02-07 15:44:30 -0800311 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
312 */
313 public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED = 2;
314
315 //
Igor Murashkin68f40062013-09-10 12:15:54 -0700316 // Enumeration values for CameraCharacteristics#LENS_FACING
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700317 //
318
319 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700320 * <p>The camera device faces the same direction as the device's screen.</p>
Igor Murashkin68f40062013-09-10 12:15:54 -0700321 * @see CameraCharacteristics#LENS_FACING
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700322 */
323 public static final int LENS_FACING_FRONT = 0;
324
325 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700326 * <p>The camera device faces the opposite direction as the device's screen.</p>
Igor Murashkin68f40062013-09-10 12:15:54 -0700327 * @see CameraCharacteristics#LENS_FACING
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700328 */
329 public static final int LENS_FACING_BACK = 1;
330
Zhijun He503e8152015-01-12 15:16:56 -0800331 /**
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 Talvala5a32b20c2013-08-08 12:38:36 -0700338 //
Igor Murashkine46c0da2014-02-07 18:34:37 -0800339 // Enumeration values for CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
340 //
341
342 /**
343 * <p>The minimal set of capabilities that every camera
344 * device (regardless of {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel})
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700345 * supports.</p>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700346 * <p>This capability is listed by all normal devices, and
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700347 * indicates that the camera device has a feature set
348 * that's comparable to the baseline requirements for the
349 * older android.hardware.Camera API.</p>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700350 * <p>Devices with the DEPTH_OUTPUT capability might not list this
351 * capability, indicating that they support only depth measurement,
352 * not standard color output.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800353 *
354 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
355 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
356 */
357 public static final int REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE = 0;
358
359 /**
Igor Murashkine46c0da2014-02-07 18:34:37 -0800360 * <p>The camera device can be manually controlled (3A algorithms such
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700361 * as auto-exposure, and auto-focus can be bypassed).
Zhijun He50f72432014-05-28 13:52:04 -0700362 * The camera device supports basic manual control of the sensor image
363 * acquisition related stages. This means the following controls are
364 * guaranteed to be supported:</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800365 * <ul>
Zhijun He50f72432014-05-28 13:52:04 -0700366 * <li>Manual frame duration control<ul>
367 * <li>{@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}</li>
368 * <li>{@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li>
Zhijun He50f72432014-05-28 13:52:04 -0700369 * </ul>
370 * </li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800371 * <li>Manual exposure control<ul>
372 * <li>{@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</li>
373 * <li>{@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
374 * </ul>
375 * </li>
376 * <li>Manual sensitivity control<ul>
377 * <li>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</li>
378 * <li>{@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800379 * </ul>
380 * </li>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700381 * <li>Manual lens control (if the lens is adjustable)<ul>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800382 * <li>android.lens.*</li>
383 * </ul>
384 * </li>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700385 * <li>Manual flash control (if a flash unit is present)<ul>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800386 * <li>android.flash.*</li>
387 * </ul>
388 * </li>
389 * <li>Manual black level locking<ul>
390 * <li>{@link CaptureRequest#BLACK_LEVEL_LOCK android.blackLevel.lock}</li>
391 * </ul>
392 * </li>
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700393 * <li>Auto exposure lock<ul>
394 * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li>
395 * </ul>
396 * </li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800397 * </ul>
398 * <p>If any of the above 3A algorithms are enabled, then the camera
399 * device will accurately report the values applied by 3A in the
400 * result.</p>
Zhijun He50f72432014-05-28 13:52:04 -0700401 * <p>A given camera device may also support additional manual sensor controls,
402 * but this capability only covers the above list of controls.</p>
Ruben Brunk3e4fed22014-06-18 17:08:42 -0700403 * <p>If this is supported, {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} will
404 * additionally return a min frame duration that is greater than
405 * zero for each supported size-format combination.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800406 *
407 * @see CaptureRequest#BLACK_LEVEL_LOCK
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700408 * @see CaptureRequest#CONTROL_AE_LOCK
Zhijun He50f72432014-05-28 13:52:04 -0700409 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
Igor Murashkine46c0da2014-02-07 18:34:37 -0800410 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Zhijun He50f72432014-05-28 13:52:04 -0700411 * @see CaptureRequest#SENSOR_FRAME_DURATION
Igor Murashkine46c0da2014-02-07 18:34:37 -0800412 * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
Zhijun He50f72432014-05-28 13:52:04 -0700413 * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
Igor Murashkine46c0da2014-02-07 18:34:37 -0800414 * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
415 * @see CaptureRequest#SENSOR_SENSITIVITY
416 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
417 */
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700418 public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR = 1;
Igor Murashkine46c0da2014-02-07 18:34:37 -0800419
420 /**
Zhijun He50f72432014-05-28 13:52:04 -0700421 * <p>The camera device post-processing stages can be manually controlled.
422 * The camera device supports basic manual control of the image post-processing
423 * stages. This means the following controls are guaranteed to be supported:</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800424 * <ul>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -0800425 * <li>
426 * <p>Manual tonemap control</p>
427 * <ul>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -0700428 * <li>{@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800429 * <li>{@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</li>
430 * <li>{@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</li>
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -0700431 * <li>{@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma}</li>
432 * <li>{@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve}</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800433 * </ul>
434 * </li>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -0800435 * <li>
436 * <p>Manual white balance control</p>
437 * <ul>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800438 * <li>{@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}</li>
439 * <li>{@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}</li>
440 * </ul>
441 * </li>
Zhijun He28288ca2014-06-25 15:49:13 -0700442 * <li>Manual lens shading map control<ul>
443 * <li>{@link CaptureRequest#SHADING_MODE android.shading.mode}</li>
444 * <li>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode}</li>
Ruben Brunk57493682014-05-27 18:58:08 -0700445 * <li>android.statistics.lensShadingMap</li>
446 * <li>android.lens.info.shadingMapSize</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800447 * </ul>
448 * </li>
Zhijun Hea05e59d2014-07-08 18:27:47 -0700449 * <li>Manual aberration correction control (if aberration correction is supported)<ul>
Zhijun He9e4e4392014-08-18 11:12:32 -0700450 * <li>{@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}</li>
451 * <li>{@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES android.colorCorrection.availableAberrationModes}</li>
Zhijun Hea05e59d2014-07-08 18:27:47 -0700452 * </ul>
453 * </li>
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700454 * <li>Auto white balance lock<ul>
455 * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li>
456 * </ul>
457 * </li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800458 * </ul>
459 * <p>If auto white balance is enabled, then the camera device
460 * will accurately report the values applied by AWB in the result.</p>
Zhijun He50f72432014-05-28 13:52:04 -0700461 * <p>A given camera device may also support additional post-processing
462 * controls, but this capability only covers the above list of controls.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800463 *
Zhijun He9e4e4392014-08-18 11:12:32 -0700464 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
465 * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
Igor Murashkine46c0da2014-02-07 18:34:37 -0800466 * @see CaptureRequest#COLOR_CORRECTION_GAINS
467 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700468 * @see CaptureRequest#CONTROL_AWB_LOCK
Zhijun He28288ca2014-06-25 15:49:13 -0700469 * @see CaptureRequest#SHADING_MODE
470 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -0700471 * @see CaptureRequest#TONEMAP_CURVE
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -0700472 * @see CaptureRequest#TONEMAP_GAMMA
Igor Murashkine46c0da2014-02-07 18:34:37 -0800473 * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
474 * @see CaptureRequest#TONEMAP_MODE
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -0700475 * @see CaptureRequest#TONEMAP_PRESET_CURVE
Igor Murashkine46c0da2014-02-07 18:34:37 -0800476 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
477 */
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700478 public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING = 2;
479
480 /**
Eino-Ville Talvala611fece2014-07-10 17:29:38 -0700481 * <p>The camera device supports outputting RAW buffers and
482 * metadata for interpreting them.</p>
483 * <p>Devices supporting the RAW capability allow both for
484 * saving DNG files, and for direct application processing of
485 * raw sensor images.</p>
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700486 * <ul>
487 * <li>RAW_SENSOR is supported as an output format.</li>
488 * <li>The maximum available resolution for RAW_SENSOR streams
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700489 * will match either the value in
490 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize} or
Eino-Ville Talvalad8407272015-11-08 18:27:20 -0800491 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.</li>
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700492 * <li>All DNG-related optional metadata entries are provided
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700493 * by the camera device.</li>
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700494 * </ul>
495 *
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700496 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
Eino-Ville Talvalad8407272015-11-08 18:27:20 -0800497 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700498 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
499 */
Eino-Ville Talvala611fece2014-07-10 17:29:38 -0700500 public static final int REQUEST_AVAILABLE_CAPABILITIES_RAW = 3;
Igor Murashkine46c0da2014-02-07 18:34:37 -0800501
502 /**
Zhijun He0e99c222015-01-29 15:26:05 -0800503 * <p>The camera device supports the Zero Shutter Lag reprocessing use case.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800504 * <ul>
Zhijun He0e99c222015-01-29 15:26:05 -0800505 * <li>One input stream is supported, that is, <code>{@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} == 1</code>.</li>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700506 * <li>{@link android.graphics.ImageFormat#PRIVATE } is supported as an output/input format,
507 * that is, {@link android.graphics.ImageFormat#PRIVATE } is included in the lists of
508 * formats returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats } and {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats }.</li>
509 * <li>{@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput }
510 * returns non empty int[] for each supported input format returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }.</li>
511 * <li>Each size returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputSizes getInputSizes(ImageFormat.PRIVATE)} is also included in {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes getOutputSizes(ImageFormat.PRIVATE)}</li>
512 * <li>Using {@link android.graphics.ImageFormat#PRIVATE } does not cause a frame rate drop
513 * relative to the sensor's maximum capture rate (at that resolution).</li>
514 * <li>{@link android.graphics.ImageFormat#PRIVATE } will be reprocessable into both
515 * {@link android.graphics.ImageFormat#YUV_420_888 } and
516 * {@link android.graphics.ImageFormat#JPEG } formats.</li>
Chien-Yu Chen8062d312015-05-12 14:24:10 -0700517 * <li>The maximum available resolution for PRIVATE streams
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700518 * (both input/output) will match the maximum available
519 * resolution of JPEG streams.</li>
Zhijun He513f7c32015-04-24 18:23:54 -0700520 * <li>Static metadata {@link CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL android.reprocess.maxCaptureStall}.</li>
Zhijun He0e99c222015-01-29 15:26:05 -0800521 * <li>Only below controls are effective for reprocessing requests and
522 * will be present in capture results, other controls in reprocess
523 * requests will be ignored by the camera device.<ul>
524 * <li>android.jpeg.*</li>
525 * <li>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</li>
526 * <li>{@link CaptureRequest#EDGE_MODE android.edge.mode}</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800527 * </ul>
Zhijun He0e99c222015-01-29 15:26:05 -0800528 * </li>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700529 * <li>{@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes} and
530 * {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes} will both list ZERO_SHUTTER_LAG as a supported mode.</li>
Zhijun He0e99c222015-01-29 15:26:05 -0800531 * </ul>
532 *
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700533 * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES
Zhijun He0e99c222015-01-29 15:26:05 -0800534 * @see CaptureRequest#EDGE_MODE
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700535 * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
Zhijun He0e99c222015-01-29 15:26:05 -0800536 * @see CaptureRequest#NOISE_REDUCTION_MODE
Zhijun He513f7c32015-04-24 18:23:54 -0700537 * @see CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL
Zhijun He0e99c222015-01-29 15:26:05 -0800538 * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
Igor Murashkine46c0da2014-02-07 18:34:37 -0800539 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
540 */
Chien-Yu Chen8062d312015-05-12 14:24:10 -0700541 public static final int REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING = 4;
Igor Murashkine46c0da2014-02-07 18:34:37 -0800542
Ruben Brunk0c22e692014-11-11 12:00:34 -0800543 /**
544 * <p>The camera device supports accurately reporting the sensor settings for many of
545 * the sensor controls while the built-in 3A algorithm is running. This allows
546 * reporting of sensor settings even when these settings cannot be manually changed.</p>
547 * <p>The values reported for the following controls are guaranteed to be available
548 * in the CaptureResult, including when 3A is enabled:</p>
549 * <ul>
550 * <li>Exposure control<ul>
551 * <li>{@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</li>
552 * </ul>
553 * </li>
554 * <li>Sensitivity control<ul>
555 * <li>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</li>
556 * </ul>
557 * </li>
558 * <li>Lens controls (if the lens is adjustable)<ul>
559 * <li>{@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}</li>
560 * <li>{@link CaptureRequest#LENS_APERTURE android.lens.aperture}</li>
561 * </ul>
562 * </li>
563 * </ul>
564 * <p>This capability is a subset of the MANUAL_SENSOR control capability, and will
565 * always be included if the MANUAL_SENSOR capability is available.</p>
566 *
567 * @see CaptureRequest#LENS_APERTURE
568 * @see CaptureRequest#LENS_FOCUS_DISTANCE
569 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
570 * @see CaptureRequest#SENSOR_SENSITIVITY
571 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
572 */
573 public static final int REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS = 5;
574
Eino-Ville Talvala126a7462014-11-04 16:31:01 -0800575 /**
Eino-Ville Talvala0819c752015-06-17 11:34:41 -0700576 * <p>The camera device supports capturing high-resolution images at &gt;= 20 frames per
577 * second, in at least the uncompressed YUV format, when post-processing settings are set
578 * to FAST. Additionally, maximum-resolution images can be captured at &gt;= 10 frames
579 * per second. Here, 'high resolution' means at least 8 megapixels, or the maximum
580 * resolution of the device, whichever is smaller.</p>
581 * <p>More specifically, this means that a size matching the camera device's active array
582 * size is listed as a supported size for the {@link android.graphics.ImageFormat#YUV_420_888 } format in either {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } or {@link android.hardware.camera2.params.StreamConfigurationMap#getHighResolutionOutputSizes },
583 * with a minimum frame duration for that format and size of either &lt;= 1/20 s, or
584 * &lt;= 1/10 s, respectively; and the {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges} entry
585 * lists at least one FPS range where the minimum FPS is &gt;= 1 / minimumFrameDuration
586 * for the maximum-size YUV_420_888 format. If that maximum size is listed in {@link android.hardware.camera2.params.StreamConfigurationMap#getHighResolutionOutputSizes },
587 * then the list of resolutions for YUV_420_888 from {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } contains at
588 * least one resolution &gt;= 8 megapixels, with a minimum frame duration of &lt;= 1/20
589 * s.</p>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800590 * <p>If the device supports the {@link android.graphics.ImageFormat#RAW10 }, {@link android.graphics.ImageFormat#RAW12 }, then those can also be
591 * captured at the same rate as the maximum-size YUV_420_888 resolution is.</p>
Eino-Ville Talvala0819c752015-06-17 11:34:41 -0700592 * <p>If the device supports the PRIVATE_REPROCESSING capability, then the same guarantees
593 * as for the YUV_420_888 format also apply to the {@link android.graphics.ImageFormat#PRIVATE } format.</p>
594 * <p>In addition, the {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} field is guaranted to have a value between 0
595 * and 4, inclusive. {@link CameraCharacteristics#CONTROL_AE_LOCK_AVAILABLE android.control.aeLockAvailable} and {@link CameraCharacteristics#CONTROL_AWB_LOCK_AVAILABLE android.control.awbLockAvailable}
596 * are also guaranteed to be <code>true</code> so burst capture with these two locks ON yields
597 * consistent image output.</p>
Eino-Ville Talvala126a7462014-11-04 16:31:01 -0800598 *
Eino-Ville Talvala8d709f32014-11-17 11:28:38 -0800599 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700600 * @see CameraCharacteristics#CONTROL_AE_LOCK_AVAILABLE
601 * @see CameraCharacteristics#CONTROL_AWB_LOCK_AVAILABLE
Eino-Ville Talvala126a7462014-11-04 16:31:01 -0800602 * @see CameraCharacteristics#SYNC_MAX_LATENCY
603 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
604 */
605 public static final int REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE = 6;
606
Zhijun He0e99c222015-01-29 15:26:05 -0800607 /**
Chien-Yu Chen0a551f12015-04-03 17:57:35 -0700608 * <p>The camera device supports the YUV_420_888 reprocessing use case, similar as
Chien-Yu Chen8062d312015-05-12 14:24:10 -0700609 * PRIVATE_REPROCESSING, This capability requires the camera device to support the
Zhijun He0e99c222015-01-29 15:26:05 -0800610 * following:</p>
611 * <ul>
612 * <li>One input stream is supported, that is, <code>{@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} == 1</code>.</li>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800613 * <li>{@link android.graphics.ImageFormat#YUV_420_888 } is supported as an output/input
614 * format, that is, YUV_420_888 is included in the lists of formats returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats } and {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats }.</li>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700615 * <li>{@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput }
616 * returns non-empty int[] for each supported input format returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }.</li>
617 * <li>Each size returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputSizes getInputSizes(YUV_420_888)} is also included in {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes getOutputSizes(YUV_420_888)}</li>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800618 * <li>Using {@link android.graphics.ImageFormat#YUV_420_888 } does not cause a frame rate
619 * drop relative to the sensor's maximum capture rate (at that resolution).</li>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700620 * <li>{@link android.graphics.ImageFormat#YUV_420_888 } will be reprocessable into both
621 * {@link android.graphics.ImageFormat#YUV_420_888 } and {@link android.graphics.ImageFormat#JPEG } formats.</li>
622 * <li>The maximum available resolution for {@link android.graphics.ImageFormat#YUV_420_888 } streams (both input/output) will match the
623 * maximum available resolution of {@link android.graphics.ImageFormat#JPEG } streams.</li>
Zhijun He513f7c32015-04-24 18:23:54 -0700624 * <li>Static metadata {@link CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL android.reprocess.maxCaptureStall}.</li>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700625 * <li>Only the below controls are effective for reprocessing requests and will be present
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800626 * in capture results. The reprocess requests are from the original capture results
627 * that are associated with the intermediate {@link android.graphics.ImageFormat#YUV_420_888 } output buffers. All other controls in the
628 * reprocess requests will be ignored by the camera device.<ul>
Zhijun He0e99c222015-01-29 15:26:05 -0800629 * <li>android.jpeg.*</li>
630 * <li>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</li>
631 * <li>{@link CaptureRequest#EDGE_MODE android.edge.mode}</li>
632 * <li>{@link CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR android.reprocess.effectiveExposureFactor}</li>
633 * </ul>
634 * </li>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700635 * <li>{@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes} and
636 * {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes} will both list ZERO_SHUTTER_LAG as a supported mode.</li>
Zhijun He0e99c222015-01-29 15:26:05 -0800637 * </ul>
638 *
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700639 * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES
Zhijun He0e99c222015-01-29 15:26:05 -0800640 * @see CaptureRequest#EDGE_MODE
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700641 * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
Zhijun He0e99c222015-01-29 15:26:05 -0800642 * @see CaptureRequest#NOISE_REDUCTION_MODE
643 * @see CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR
Zhijun He513f7c32015-04-24 18:23:54 -0700644 * @see CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL
Zhijun He0e99c222015-01-29 15:26:05 -0800645 * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
646 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
647 */
648 public static final int REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING = 7;
649
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700650 /**
651 * <p>The camera device can produce depth measurements from its field of view.</p>
652 * <p>This capability requires the camera device to support the following:</p>
653 * <ul>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800654 * <li>{@link android.graphics.ImageFormat#DEPTH16 } is supported as
655 * an output format.</li>
656 * <li>{@link android.graphics.ImageFormat#DEPTH_POINT_CLOUD } is
657 * optionally supported as an output format.</li>
658 * <li>This camera device, and all camera devices with the same {@link CameraCharacteristics#LENS_FACING android.lens.facing}, will
659 * list the following calibration metadata entries in both {@link android.hardware.camera2.CameraCharacteristics }
660 * and {@link android.hardware.camera2.CaptureResult }:<ul>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700661 * <li>{@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}</li>
662 * <li>{@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}</li>
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -0700663 * <li>{@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}</li>
664 * <li>{@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion}</li>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700665 * </ul>
666 * </li>
667 * <li>The {@link CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE android.depth.depthIsExclusive} entry is listed by this device.</li>
668 * <li>A LIMITED camera with only the DEPTH_OUTPUT capability does not have to support
669 * normal YUV_420_888, JPEG, and PRIV-format outputs. It only has to support the DEPTH16
670 * format.</li>
671 * </ul>
672 * <p>Generally, depth output operates at a slower frame rate than standard color capture,
673 * so the DEPTH16 and DEPTH_POINT_CLOUD formats will commonly have a stall duration that
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800674 * should be accounted for (see {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration }).
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700675 * On a device that supports both depth and color-based output, to enable smooth preview,
676 * using a repeating burst is recommended, where a depth-output target is only included
677 * once every N frames, where N is the ratio between preview output rate and depth output
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700678 * rate, including depth stall time.</p>
679 *
680 * @see CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700681 * @see CameraCharacteristics#LENS_FACING
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -0700682 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700683 * @see CameraCharacteristics#LENS_POSE_ROTATION
684 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -0700685 * @see CameraCharacteristics#LENS_RADIAL_DISTORTION
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700686 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
687 */
688 public static final int REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT = 8;
689
Zhijun Hefab663e2015-05-26 19:46:31 -0700690 /**
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800691 * <p>The device supports constrained high speed video recording (frame rate &gt;=120fps) use
692 * case. The camera device will support high speed capture session created by {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }, which
693 * only accepts high speed request lists created by {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList }.</p>
694 * <p>A camera device can still support high speed video streaming by advertising the high
695 * speed FPS ranges in {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges}. For this case, all
696 * normal capture request per frame control and synchronization requirements will apply
697 * to the high speed fps ranges, the same as all other fps ranges. This capability
698 * describes the capability of a specialized operating mode with many limitations (see
699 * below), which is only targeted at high speed video recording.</p>
700 * <p>The supported high speed video sizes and fps ranges are specified in {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges }.
701 * To get desired output frame rates, the application is only allowed to select video
702 * size and FPS range combinations provided by {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes }. The
703 * fps range can be controlled via {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}.</p>
Zhijun Hefab663e2015-05-26 19:46:31 -0700704 * <p>In this capability, the camera device will override aeMode, awbMode, and afMode to
Zhijun Heee2ebde2015-06-16 19:58:11 -0700705 * ON, AUTO, and CONTINUOUS_VIDEO, respectively. All post-processing block mode
Zhijun Hefab663e2015-05-26 19:46:31 -0700706 * controls will be overridden to be FAST. Therefore, no manual control of capture
707 * and post-processing parameters is possible. All other controls operate the
708 * same as when {@link CaptureRequest#CONTROL_MODE android.control.mode} == AUTO. This means that all other
709 * android.control.* fields continue to work, such as</p>
710 * <ul>
711 * <li>{@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}</li>
712 * <li>{@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}</li>
713 * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li>
714 * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li>
715 * <li>{@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</li>
716 * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li>
717 * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li>
718 * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li>
719 * <li>{@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}</li>
720 * <li>{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}</li>
721 * </ul>
722 * <p>Outside of android.control.*, the following controls will work:</p>
723 * <ul>
724 * <li>{@link CaptureRequest#FLASH_MODE android.flash.mode} (TORCH mode only, automatic flash for still capture will not
725 * work since aeMode is ON)</li>
726 * <li>{@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} (if it is supported)</li>
727 * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li>
728 * <li>{@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} (if it is supported)</li>
729 * </ul>
730 * <p>For high speed recording use case, the actual maximum supported frame rate may
731 * be lower than what camera can output, depending on the destination Surfaces for
732 * the image data. For example, if the destination surface is from video encoder,
733 * the application need check if the video encoder is capable of supporting the
734 * high frame rate for a given video size, or it will end up with lower recording
735 * frame rate. If the destination surface is from preview window, the actual preview frame
736 * rate will be bounded by the screen refresh rate.</p>
737 * <p>The camera device will only support up to 2 high speed simultaneous output surfaces
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800738 * (preview and recording surfaces) in this mode. Above controls will be effective only
739 * if all of below conditions are true:</p>
Zhijun Hefab663e2015-05-26 19:46:31 -0700740 * <ul>
741 * <li>The application creates a camera capture session with no more than 2 surfaces via
742 * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }. The
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800743 * targeted surfaces must be preview surface (either from {@link android.view.SurfaceView } or {@link android.graphics.SurfaceTexture }) or recording
744 * surface(either from {@link android.media.MediaRecorder#getSurface } or {@link android.media.MediaCodec#createInputSurface }).</li>
Zhijun Hefab663e2015-05-26 19:46:31 -0700745 * <li>The stream sizes are selected from the sizes reported by
746 * {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes }.</li>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800747 * <li>The FPS ranges are selected from {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges }.</li>
Zhijun Hefab663e2015-05-26 19:46:31 -0700748 * </ul>
Eino-Ville Talvala639fffe2015-06-30 10:34:48 -0700749 * <p>When above conditions are NOT satistied,
Zhijun Hefab663e2015-05-26 19:46:31 -0700750 * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }
Eino-Ville Talvala639fffe2015-06-30 10:34:48 -0700751 * will fail.</p>
Zhijun Hefab663e2015-05-26 19:46:31 -0700752 * <p>Switching to a FPS range that has different maximum FPS may trigger some camera device
753 * reconfigurations, which may introduce extra latency. It is recommended that
754 * the application avoids unnecessary maximum target FPS changes as much as possible
755 * during high speed streaming.</p>
756 *
757 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
758 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
759 * @see CaptureRequest#CONTROL_AE_LOCK
760 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
761 * @see CaptureRequest#CONTROL_AE_REGIONS
762 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
763 * @see CaptureRequest#CONTROL_AF_REGIONS
764 * @see CaptureRequest#CONTROL_AF_TRIGGER
765 * @see CaptureRequest#CONTROL_AWB_LOCK
766 * @see CaptureRequest#CONTROL_AWB_REGIONS
767 * @see CaptureRequest#CONTROL_EFFECT_MODE
768 * @see CaptureRequest#CONTROL_MODE
769 * @see CaptureRequest#FLASH_MODE
770 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
771 * @see CaptureRequest#SCALER_CROP_REGION
772 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
773 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
774 */
775 public static final int REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO = 9;
776
Igor Murashkine46c0da2014-02-07 18:34:37 -0800777 //
Zhijun He14986152014-05-22 21:17:37 -0700778 // Enumeration values for CameraCharacteristics#SCALER_CROPPING_TYPE
779 //
780
781 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700782 * <p>The camera device only supports centered crop regions.</p>
Zhijun He14986152014-05-22 21:17:37 -0700783 * @see CameraCharacteristics#SCALER_CROPPING_TYPE
784 */
785 public static final int SCALER_CROPPING_TYPE_CENTER_ONLY = 0;
786
787 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700788 * <p>The camera device supports arbitrarily chosen crop regions.</p>
Zhijun He14986152014-05-22 21:17:37 -0700789 * @see CameraCharacteristics#SCALER_CROPPING_TYPE
790 */
791 public static final int SCALER_CROPPING_TYPE_FREEFORM = 1;
792
793 //
Zhijun Hed1784962014-04-08 17:41:46 -0700794 // Enumeration values for CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
795 //
796
797 /**
798 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
799 */
800 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB = 0;
801
802 /**
803 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
804 */
805 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG = 1;
806
807 /**
808 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
809 */
810 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG = 2;
811
812 /**
813 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
814 */
815 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR = 3;
816
817 /**
818 * <p>Sensor is not Bayer; output has 3 16-bit
819 * values for each pixel, instead of just 1 16-bit value
820 * per pixel.</p>
821 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
822 */
823 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB = 4;
824
825 //
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -0700826 // Enumeration values for CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
Zhijun He45fa43a12014-06-13 18:29:37 -0700827 //
828
829 /**
830 * <p>Timestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in nanoseconds and monotonic,
831 * but can not be compared to timestamps from other subsystems
832 * (e.g. accelerometer, gyro etc.), or other instances of the same or different
833 * camera devices in the same system. Timestamps between streams and results for
834 * a single camera instance are comparable, and the timestamps for all buffers
835 * and the result metadata generated by a single capture are identical.</p>
836 *
837 * @see CaptureResult#SENSOR_TIMESTAMP
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -0700838 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
Zhijun He45fa43a12014-06-13 18:29:37 -0700839 */
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -0700840 public static final int SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN = 0;
Zhijun He45fa43a12014-06-13 18:29:37 -0700841
842 /**
843 * <p>Timestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in the same timebase as
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700844 * {@link android.os.SystemClock#elapsedRealtimeNanos },
Zhijun He45fa43a12014-06-13 18:29:37 -0700845 * and they can be compared to other timestamps using that base.</p>
846 *
847 * @see CaptureResult#SENSOR_TIMESTAMP
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -0700848 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
Zhijun He45fa43a12014-06-13 18:29:37 -0700849 */
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -0700850 public static final int SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME = 1;
Zhijun He45fa43a12014-06-13 18:29:37 -0700851
852 //
Ruben Brunk7c062362014-04-15 23:53:53 -0700853 // Enumeration values for CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
854 //
855
856 /**
857 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
858 */
859 public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT = 1;
860
861 /**
862 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
863 */
864 public static final int SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT = 2;
865
866 /**
867 * <p>Incandescent light</p>
868 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
869 */
870 public static final int SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN = 3;
871
872 /**
873 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
874 */
875 public static final int SENSOR_REFERENCE_ILLUMINANT1_FLASH = 4;
876
877 /**
878 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
879 */
880 public static final int SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER = 9;
881
882 /**
883 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
884 */
885 public static final int SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER = 10;
886
887 /**
888 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
889 */
890 public static final int SENSOR_REFERENCE_ILLUMINANT1_SHADE = 11;
891
892 /**
893 * <p>D 5700 - 7100K</p>
894 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
895 */
896 public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT = 12;
897
898 /**
899 * <p>N 4600 - 5400K</p>
900 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
901 */
902 public static final int SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT = 13;
903
904 /**
905 * <p>W 3900 - 4500K</p>
906 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
907 */
908 public static final int SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT = 14;
909
910 /**
911 * <p>WW 3200 - 3700K</p>
912 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
913 */
914 public static final int SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT = 15;
915
916 /**
917 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
918 */
919 public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A = 17;
920
921 /**
922 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
923 */
924 public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B = 18;
925
926 /**
927 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
928 */
929 public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C = 19;
930
931 /**
932 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
933 */
934 public static final int SENSOR_REFERENCE_ILLUMINANT1_D55 = 20;
935
936 /**
937 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
938 */
939 public static final int SENSOR_REFERENCE_ILLUMINANT1_D65 = 21;
940
941 /**
942 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
943 */
944 public static final int SENSOR_REFERENCE_ILLUMINANT1_D75 = 22;
945
946 /**
947 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
948 */
949 public static final int SENSOR_REFERENCE_ILLUMINANT1_D50 = 23;
950
951 /**
952 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
953 */
954 public static final int SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN = 24;
955
956 //
Igor Murashkin68f40062013-09-10 12:15:54 -0700957 // Enumeration values for CameraCharacteristics#LED_AVAILABLE_LEDS
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700958 //
959
960 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700961 * <p>android.led.transmit control is used.</p>
Igor Murashkin68f40062013-09-10 12:15:54 -0700962 * @see CameraCharacteristics#LED_AVAILABLE_LEDS
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700963 * @hide
964 */
965 public static final int LED_AVAILABLE_LEDS_TRANSMIT = 0;
966
967 //
Igor Murashkin68f40062013-09-10 12:15:54 -0700968 // Enumeration values for CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700969 //
970
971 /**
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -0800972 * <p>This camera device does not have enough capabilities to qualify as a <code>FULL</code> device or
973 * better.</p>
974 * <p>Only the stream configurations listed in the <code>LEGACY</code> and <code>LIMITED</code> tables in the
975 * {@link android.hardware.camera2.CameraDevice#createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p>
976 * <p>All <code>LIMITED</code> devices support the <code>BACKWARDS_COMPATIBLE</code> capability, indicating basic
977 * support for color image capture. The only exception is that the device may
978 * alternatively support only the <code>DEPTH_OUTPUT</code> capability, if it can only output depth
979 * measurements and not color images.</p>
980 * <p><code>LIMITED</code> devices and above require the use of {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}
981 * to lock exposure metering (and calculate flash power, for cameras with flash) before
982 * capturing a high-quality still image.</p>
983 * <p>A <code>LIMITED</code> device that only lists the <code>BACKWARDS_COMPATIBLE</code> capability is only
984 * required to support full-automatic operation and post-processing (<code>OFF</code> is not
985 * supported for {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}, {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}, or
986 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode})</p>
987 * <p>Additional capabilities may optionally be supported by a <code>LIMITED</code>-level device, and
988 * can be checked for in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
989 *
990 * @see CaptureRequest#CONTROL_AE_MODE
991 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
992 * @see CaptureRequest#CONTROL_AF_MODE
993 * @see CaptureRequest#CONTROL_AWB_MODE
994 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Igor Murashkin68f40062013-09-10 12:15:54 -0700995 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700996 */
997 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0;
998
999 /**
Ruben Brunk4a61a862014-07-01 16:00:26 -07001000 * <p>This camera device is capable of supporting advanced imaging applications.</p>
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08001001 * <p>The stream configurations listed in the <code>FULL</code>, <code>LEGACY</code> and <code>LIMITED</code> tables in the
1002 * {@link android.hardware.camera2.CameraDevice#createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p>
1003 * <p>A <code>FULL</code> device will support below capabilities:</p>
1004 * <ul>
1005 * <li><code>BURST_CAPTURE</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1006 * <code>BURST_CAPTURE</code>)</li>
1007 * <li>Per frame control ({@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} <code>==</code> PER_FRAME_CONTROL)</li>
1008 * <li>Manual sensor control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains <code>MANUAL_SENSOR</code>)</li>
1009 * <li>Manual post-processing control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1010 * <code>MANUAL_POST_PROCESSING</code>)</li>
1011 * <li>The required exposure time range defined in {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
1012 * <li>The required maxFrameDuration defined in {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li>
1013 * </ul>
1014 * <p>Note:
1015 * Pre-API level 23, FULL devices also supported arbitrary cropping region
1016 * ({@link CameraCharacteristics#SCALER_CROPPING_TYPE android.scaler.croppingType} <code>== FREEFORM</code>); this requirement was relaxed in API level
1017 * 23, and <code>FULL</code> devices may only support <code>CENTERED</code> cropping.</p>
1018 *
1019 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1020 * @see CameraCharacteristics#SCALER_CROPPING_TYPE
1021 * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
1022 * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
1023 * @see CameraCharacteristics#SYNC_MAX_LATENCY
Igor Murashkin68f40062013-09-10 12:15:54 -07001024 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001025 */
1026 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1;
1027
Ruben Brunk4a61a862014-07-01 16:00:26 -07001028 /**
1029 * <p>This camera device is running in backward compatibility mode.</p>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08001030 * <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 Talvala7c6d73f2016-01-21 13:55:11 -08001031 * <p>A <code>LEGACY</code> device does not support per-frame control, manual sensor control, manual
1032 * post-processing, arbitrary cropping regions, and has relaxed performance constraints.
1033 * No additional capabilities beyond <code>BACKWARD_COMPATIBLE</code> will ever be listed by a
1034 * <code>LEGACY</code> device in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
1035 * <p>In addition, the {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is not functional on <code>LEGACY</code>
1036 * devices. Instead, every request that includes a JPEG-format output target is treated
1037 * as triggering a still capture, internally executing a precapture trigger. This may
1038 * fire the flash for flash power metering during precapture, and then fire the flash
1039 * for the final capture, if a flash is available on the device and the AE mode is set to
1040 * enable the flash.</p>
1041 *
1042 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1043 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Ruben Brunk4a61a862014-07-01 16:00:26 -07001044 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1045 */
1046 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY = 2;
1047
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08001048 /**
1049 * <p>This camera device is capable of YUV reprocessing and RAW data capture, in addition to
1050 * FULL-level capabilities.</p>
1051 * <p>The stream configurations listed in the <code>LEVEL_3</code>, <code>RAW</code>, <code>FULL</code>, <code>LEGACY</code> and
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08001052 * <code>LIMITED</code> tables in the {@link android.hardware.camera2.CameraDevice#createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p>
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08001053 * <p>The following additional capabilities are guaranteed to be supported:</p>
1054 * <ul>
1055 * <li><code>YUV_REPROCESSING</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1056 * <code>YUV_REPROCESSING</code>)</li>
1057 * <li><code>RAW</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1058 * <code>RAW</code>)</li>
1059 * </ul>
1060 *
1061 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1062 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1063 */
1064 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_3 = 3;
1065
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001066 //
Igor Murashkin3865a842014-01-17 18:18:39 -08001067 // Enumeration values for CameraCharacteristics#SYNC_MAX_LATENCY
1068 //
1069
1070 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001071 * <p>Every frame has the requests immediately applied.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08001072 * <p>Changing controls over multiple requests one after another will
1073 * produce results that have those controls applied atomically
1074 * each frame.</p>
1075 * <p>All FULL capability devices will have this as their maxLatency.</p>
1076 * @see CameraCharacteristics#SYNC_MAX_LATENCY
1077 */
1078 public static final int SYNC_MAX_LATENCY_PER_FRAME_CONTROL = 0;
1079
1080 /**
1081 * <p>Each new frame has some subset (potentially the entire set)
1082 * of the past requests applied to the camera settings.</p>
1083 * <p>By submitting a series of identical requests, the camera device
1084 * will eventually have the camera settings applied, but it is
1085 * unknown when that exact point will be.</p>
Igor Murashkinbdf366c2014-07-25 16:54:20 -07001086 * <p>All LEGACY capability devices will have this as their maxLatency.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08001087 * @see CameraCharacteristics#SYNC_MAX_LATENCY
1088 */
1089 public static final int SYNC_MAX_LATENCY_UNKNOWN = -1;
1090
1091 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001092 // Enumeration values for CaptureRequest#COLOR_CORRECTION_MODE
1093 //
1094
1095 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001096 * <p>Use the {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} matrix
Igor Murashkin7d2a5c52014-01-17 15:07:52 -08001097 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} to do color conversion.</p>
1098 * <p>All advanced white balance adjustments (not specified
1099 * by our white balance pipeline) must be disabled.</p>
1100 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
1101 * TRANSFORM_MATRIX is ignored. The camera device will override
1102 * this value to either FAST or HIGH_QUALITY.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001103 *
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001104 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001105 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Igor Murashkin7d2a5c52014-01-17 15:07:52 -08001106 * @see CaptureRequest#CONTROL_AWB_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001107 * @see CaptureRequest#COLOR_CORRECTION_MODE
1108 */
1109 public static final int COLOR_CORRECTION_MODE_TRANSFORM_MATRIX = 0;
1110
1111 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001112 * <p>Color correction processing must not slow down
1113 * capture rate relative to sensor raw output.</p>
Igor Murashkin7d2a5c52014-01-17 15:07:52 -08001114 * <p>Advanced white balance adjustments above and beyond
1115 * the specified white balance pipeline may be applied.</p>
1116 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
1117 * the camera device uses the last frame's AWB values
1118 * (or defaults if AWB has never been run).</p>
1119 *
1120 * @see CaptureRequest#CONTROL_AWB_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001121 * @see CaptureRequest#COLOR_CORRECTION_MODE
1122 */
1123 public static final int COLOR_CORRECTION_MODE_FAST = 1;
1124
1125 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001126 * <p>Color correction processing operates at improved
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07001127 * quality but the capture rate might be reduced (relative to sensor
1128 * raw output rate)</p>
Igor Murashkin7d2a5c52014-01-17 15:07:52 -08001129 * <p>Advanced white balance adjustments above and beyond
1130 * the specified white balance pipeline may be applied.</p>
1131 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
1132 * the camera device uses the last frame's AWB values
1133 * (or defaults if AWB has never been run).</p>
1134 *
1135 * @see CaptureRequest#CONTROL_AWB_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001136 * @see CaptureRequest#COLOR_CORRECTION_MODE
1137 */
1138 public static final int COLOR_CORRECTION_MODE_HIGH_QUALITY = 2;
1139
1140 //
Zhijun He9e4e4392014-08-18 11:12:32 -07001141 // Enumeration values for CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
Zhijun Hea05e59d2014-07-08 18:27:47 -07001142 //
1143
1144 /**
1145 * <p>No aberration correction is applied.</p>
Zhijun He9e4e4392014-08-18 11:12:32 -07001146 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
Zhijun Hea05e59d2014-07-08 18:27:47 -07001147 */
Zhijun He9e4e4392014-08-18 11:12:32 -07001148 public static final int COLOR_CORRECTION_ABERRATION_MODE_OFF = 0;
Zhijun Hea05e59d2014-07-08 18:27:47 -07001149
1150 /**
1151 * <p>Aberration correction will not slow down capture rate
1152 * relative to sensor raw output.</p>
Zhijun He9e4e4392014-08-18 11:12:32 -07001153 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
Zhijun Hea05e59d2014-07-08 18:27:47 -07001154 */
Zhijun He9e4e4392014-08-18 11:12:32 -07001155 public static final int COLOR_CORRECTION_ABERRATION_MODE_FAST = 1;
Zhijun Hea05e59d2014-07-08 18:27:47 -07001156
1157 /**
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07001158 * <p>Aberration correction operates at improved quality but the capture rate might be
1159 * reduced (relative to sensor raw output rate)</p>
Zhijun He9e4e4392014-08-18 11:12:32 -07001160 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
Zhijun Hea05e59d2014-07-08 18:27:47 -07001161 */
Zhijun He9e4e4392014-08-18 11:12:32 -07001162 public static final int COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY = 2;
Zhijun Hea05e59d2014-07-08 18:27:47 -07001163
1164 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001165 // Enumeration values for CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1166 //
1167
1168 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001169 * <p>The camera device will not adjust exposure duration to
1170 * avoid banding problems.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001171 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1172 */
1173 public static final int CONTROL_AE_ANTIBANDING_MODE_OFF = 0;
1174
1175 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001176 * <p>The camera device will adjust exposure duration to
1177 * avoid banding problems with 50Hz illumination sources.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001178 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1179 */
1180 public static final int CONTROL_AE_ANTIBANDING_MODE_50HZ = 1;
1181
1182 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001183 * <p>The camera device will adjust exposure duration to
1184 * avoid banding problems with 60Hz illumination
1185 * sources.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001186 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1187 */
1188 public static final int CONTROL_AE_ANTIBANDING_MODE_60HZ = 2;
1189
1190 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001191 * <p>The camera device will automatically adapt its
1192 * antibanding routine to the current illumination
Yin-Chia Yeh7b2cae62014-11-25 11:54:18 -08001193 * condition. This is the default mode if AUTO is
1194 * available on given camera device.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001195 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1196 */
1197 public static final int CONTROL_AE_ANTIBANDING_MODE_AUTO = 3;
1198
1199 //
1200 // Enumeration values for CaptureRequest#CONTROL_AE_MODE
1201 //
1202
1203 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001204 * <p>The camera device's autoexposure routine is disabled.</p>
1205 * <p>The application-selected {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001206 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} and
1207 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are used by the camera
1208 * device, along with android.flash.* fields, if there's
1209 * a flash unit for this camera device.</p>
Yin-Chia Yeh7144b5d2014-11-12 11:42:49 -08001210 * <p>Note that auto-white balance (AWB) and auto-focus (AF)
1211 * behavior is device dependent when AE is in OFF mode.
1212 * To have consistent behavior across different devices,
1213 * it is recommended to either set AWB and AF to OFF mode
1214 * or lock AWB and AF before setting AE to OFF.
1215 * See {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode},
1216 * {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}, and {@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}
1217 * for more details.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001218 * <p>LEGACY devices do not support the OFF mode and will
1219 * override attempts to use this value to ON.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001220 *
Yin-Chia Yeh7144b5d2014-11-12 11:42:49 -08001221 * @see CaptureRequest#CONTROL_AF_MODE
1222 * @see CaptureRequest#CONTROL_AF_TRIGGER
1223 * @see CaptureRequest#CONTROL_AWB_LOCK
1224 * @see CaptureRequest#CONTROL_AWB_MODE
Zhijun He5f2a47f2014-01-16 15:44:41 -08001225 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001226 * @see CaptureRequest#SENSOR_FRAME_DURATION
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001227 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001228 * @see CaptureRequest#CONTROL_AE_MODE
1229 */
1230 public static final int CONTROL_AE_MODE_OFF = 0;
1231
1232 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001233 * <p>The camera device's autoexposure routine is active,
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001234 * with no flash control.</p>
1235 * <p>The application's values for
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001236 * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
1237 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and
1238 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are ignored. The
1239 * application has control over the various
1240 * android.flash.* fields.</p>
1241 *
Zhijun He5f2a47f2014-01-16 15:44:41 -08001242 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001243 * @see CaptureRequest#SENSOR_FRAME_DURATION
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001244 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001245 * @see CaptureRequest#CONTROL_AE_MODE
1246 */
1247 public static final int CONTROL_AE_MODE_ON = 1;
1248
1249 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001250 * <p>Like ON, except that the camera device also controls
1251 * the camera's flash unit, firing it in low-light
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001252 * conditions.</p>
1253 * <p>The flash may be fired during a precapture sequence
1254 * (triggered by {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and
1255 * may be fired for captures for which the
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001256 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to
1257 * STILL_CAPTURE</p>
1258 *
Igor Murashkin3242f4f2014-01-15 12:27:41 -08001259 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
Zhijun He5f2a47f2014-01-16 15:44:41 -08001260 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001261 * @see CaptureRequest#CONTROL_AE_MODE
1262 */
1263 public static final int CONTROL_AE_MODE_ON_AUTO_FLASH = 2;
1264
1265 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001266 * <p>Like ON, except that the camera device also controls
1267 * the camera's flash unit, always firing it for still
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001268 * captures.</p>
1269 * <p>The flash may be fired during a precapture sequence
1270 * (triggered by {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and
1271 * will always be fired for captures for which the
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001272 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to
1273 * STILL_CAPTURE</p>
1274 *
Igor Murashkin3242f4f2014-01-15 12:27:41 -08001275 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
Zhijun He5f2a47f2014-01-16 15:44:41 -08001276 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001277 * @see CaptureRequest#CONTROL_AE_MODE
1278 */
1279 public static final int CONTROL_AE_MODE_ON_ALWAYS_FLASH = 3;
1280
1281 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001282 * <p>Like ON_AUTO_FLASH, but with automatic red eye
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001283 * reduction.</p>
1284 * <p>If deemed necessary by the camera device, a red eye
1285 * reduction flash will fire during the precapture
1286 * sequence.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001287 * @see CaptureRequest#CONTROL_AE_MODE
1288 */
1289 public static final int CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE = 4;
1290
1291 //
1292 // Enumeration values for CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1293 //
1294
1295 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001296 * <p>The trigger is idle.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001297 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1298 */
1299 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_IDLE = 0;
1300
1301 /**
Zhijun He228f4f92014-01-16 17:22:05 -08001302 * <p>The precapture metering sequence will be started
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001303 * by the camera device.</p>
1304 * <p>The exact effect of the precapture trigger depends on
1305 * the current AE mode and state.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001306 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1307 */
1308 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_START = 1;
1309
Zhijun Hefa95b042015-02-09 10:40:49 -08001310 /**
1311 * <p>The camera device will cancel any currently active or completed
1312 * precapture metering sequence, the auto-exposure routine will return to its
1313 * initial state.</p>
1314 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1315 */
1316 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL = 2;
1317
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001318 //
1319 // Enumeration values for CaptureRequest#CONTROL_AF_MODE
1320 //
1321
1322 /**
Zhijun Hef3537422013-12-16 16:56:35 -08001323 * <p>The auto-focus routine does not control the lens;
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001324 * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} is controlled by the
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001325 * application.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001326 *
1327 * @see CaptureRequest#LENS_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001328 * @see CaptureRequest#CONTROL_AF_MODE
1329 */
1330 public static final int CONTROL_AF_MODE_OFF = 0;
1331
1332 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001333 * <p>Basic automatic focus mode.</p>
1334 * <p>In this mode, the lens does not move unless
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001335 * the autofocus trigger action is called. When that trigger
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001336 * is activated, AF will transition to ACTIVE_SCAN, then to
Zhijun Hef3537422013-12-16 16:56:35 -08001337 * the outcome of the scan (FOCUSED or NOT_FOCUSED).</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001338 * <p>Always supported if lens is not fixed focus.</p>
1339 * <p>Use {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} to determine if lens
1340 * is fixed-focus.</p>
Zhijun Hef3537422013-12-16 16:56:35 -08001341 * <p>Triggering AF_CANCEL resets the lens position to default,
Igor Murashkinace5bf02013-12-10 17:36:40 -08001342 * and sets the AF state to INACTIVE.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001343 *
1344 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001345 * @see CaptureRequest#CONTROL_AF_MODE
1346 */
1347 public static final int CONTROL_AF_MODE_AUTO = 1;
1348
1349 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001350 * <p>Close-up focusing mode.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08001351 * <p>In this mode, the lens does not move unless the
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001352 * autofocus trigger action is called. When that trigger is
1353 * activated, AF will transition to ACTIVE_SCAN, then to
1354 * the outcome of the scan (FOCUSED or NOT_FOCUSED). This
1355 * mode is optimized for focusing on objects very close to
1356 * the camera.</p>
1357 * <p>When that trigger is activated, AF will transition to
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001358 * ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001359 * NOT_FOCUSED). Triggering cancel AF resets the lens
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001360 * position to default, and sets the AF state to
Igor Murashkinace5bf02013-12-10 17:36:40 -08001361 * INACTIVE.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001362 * @see CaptureRequest#CONTROL_AF_MODE
1363 */
1364 public static final int CONTROL_AF_MODE_MACRO = 2;
1365
1366 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001367 * <p>In this mode, the AF algorithm modifies the lens
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001368 * position continually to attempt to provide a
Igor Murashkinace5bf02013-12-10 17:36:40 -08001369 * constantly-in-focus image stream.</p>
1370 * <p>The focusing behavior should be suitable for good quality
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001371 * video recording; typically this means slower focus
1372 * movement and no overshoots. When the AF trigger is not
1373 * involved, the AF algorithm should start in INACTIVE state,
1374 * and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED
1375 * states as appropriate. When the AF trigger is activated,
1376 * the algorithm should immediately transition into
1377 * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
Igor Murashkinace5bf02013-12-10 17:36:40 -08001378 * lens position until a cancel AF trigger is received.</p>
1379 * <p>Once cancel is received, the algorithm should transition
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001380 * back to INACTIVE and resume passive scan. Note that this
1381 * behavior is not identical to CONTINUOUS_PICTURE, since an
1382 * ongoing PASSIVE_SCAN must immediately be
Igor Murashkinace5bf02013-12-10 17:36:40 -08001383 * canceled.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001384 * @see CaptureRequest#CONTROL_AF_MODE
1385 */
1386 public static final int CONTROL_AF_MODE_CONTINUOUS_VIDEO = 3;
1387
1388 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001389 * <p>In this mode, the AF algorithm modifies the lens
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001390 * position continually to attempt to provide a
Igor Murashkinace5bf02013-12-10 17:36:40 -08001391 * constantly-in-focus image stream.</p>
1392 * <p>The focusing behavior should be suitable for still image
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001393 * capture; typically this means focusing as fast as
1394 * possible. When the AF trigger is not involved, the AF
1395 * algorithm should start in INACTIVE state, and then
1396 * transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as
1397 * appropriate as it attempts to maintain focus. When the AF
1398 * trigger is activated, the algorithm should finish its
1399 * PASSIVE_SCAN if active, and then transition into
1400 * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
Igor Murashkinace5bf02013-12-10 17:36:40 -08001401 * lens position until a cancel AF trigger is received.</p>
1402 * <p>When the AF cancel trigger is activated, the algorithm
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001403 * should transition back to INACTIVE and then act as if it
Igor Murashkinace5bf02013-12-10 17:36:40 -08001404 * has just been started.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001405 * @see CaptureRequest#CONTROL_AF_MODE
1406 */
1407 public static final int CONTROL_AF_MODE_CONTINUOUS_PICTURE = 4;
1408
1409 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001410 * <p>Extended depth of field (digital focus) mode.</p>
1411 * <p>The camera device will produce images with an extended
1412 * depth of field automatically; no special focusing
1413 * operations need to be done before taking a picture.</p>
1414 * <p>AF triggers are ignored, and the AF state will always be
Igor Murashkinace5bf02013-12-10 17:36:40 -08001415 * INACTIVE.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001416 * @see CaptureRequest#CONTROL_AF_MODE
1417 */
1418 public static final int CONTROL_AF_MODE_EDOF = 5;
1419
1420 //
1421 // Enumeration values for CaptureRequest#CONTROL_AF_TRIGGER
1422 //
1423
1424 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001425 * <p>The trigger is idle.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001426 * @see CaptureRequest#CONTROL_AF_TRIGGER
1427 */
1428 public static final int CONTROL_AF_TRIGGER_IDLE = 0;
1429
1430 /**
Zhijun He228f4f92014-01-16 17:22:05 -08001431 * <p>Autofocus will trigger now.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001432 * @see CaptureRequest#CONTROL_AF_TRIGGER
1433 */
1434 public static final int CONTROL_AF_TRIGGER_START = 1;
1435
1436 /**
Zhijun He228f4f92014-01-16 17:22:05 -08001437 * <p>Autofocus will return to its initial
1438 * state, and cancel any currently active trigger.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001439 * @see CaptureRequest#CONTROL_AF_TRIGGER
1440 */
1441 public static final int CONTROL_AF_TRIGGER_CANCEL = 2;
1442
1443 //
1444 // Enumeration values for CaptureRequest#CONTROL_AWB_MODE
1445 //
1446
1447 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001448 * <p>The camera device's auto-white balance routine is disabled.</p>
1449 * <p>The application-selected color transform matrix
Zhijun He399f05d2014-01-15 11:31:30 -08001450 * ({@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}) and gains
1451 * ({@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}) are used by the camera
1452 * device for manual white balance control.</p>
1453 *
Zhijun He399f05d2014-01-15 11:31:30 -08001454 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001455 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001456 * @see CaptureRequest#CONTROL_AWB_MODE
1457 */
1458 public static final int CONTROL_AWB_MODE_OFF = 0;
1459
1460 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001461 * <p>The camera device's auto-white balance routine is active.</p>
1462 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1463 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1464 * For devices that support the MANUAL_POST_PROCESSING capability, the
1465 * values used by the camera device for the transform and gains
1466 * will be available in the capture result for this request.</p>
Zhijun He399f05d2014-01-15 11:31:30 -08001467 *
1468 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001469 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001470 * @see CaptureRequest#CONTROL_AWB_MODE
1471 */
1472 public static final int CONTROL_AWB_MODE_AUTO = 1;
1473
1474 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001475 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001476 * the camera device uses incandescent light as the assumed scene
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001477 * illumination for white balance.</p>
1478 * <p>While the exact white balance transforms are up to the
1479 * camera device, they will approximately match the CIE
1480 * standard illuminant A.</p>
1481 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1482 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1483 * For devices that support the MANUAL_POST_PROCESSING capability, the
1484 * values used by the camera device for the transform and gains
1485 * will be available in the capture result for this request.</p>
1486 *
1487 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1488 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001489 * @see CaptureRequest#CONTROL_AWB_MODE
1490 */
1491 public static final int CONTROL_AWB_MODE_INCANDESCENT = 2;
1492
1493 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001494 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001495 * the camera device uses fluorescent light as the assumed scene
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001496 * illumination for white balance.</p>
1497 * <p>While the exact white balance transforms are up to the
1498 * camera device, they will approximately match the CIE
1499 * standard illuminant F2.</p>
1500 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1501 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1502 * For devices that support the MANUAL_POST_PROCESSING capability, the
1503 * values used by the camera device for the transform and gains
1504 * will be available in the capture result for this request.</p>
1505 *
1506 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1507 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001508 * @see CaptureRequest#CONTROL_AWB_MODE
1509 */
1510 public static final int CONTROL_AWB_MODE_FLUORESCENT = 3;
1511
1512 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001513 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001514 * the camera device uses warm fluorescent light as the assumed scene
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001515 * illumination for white balance.</p>
1516 * <p>While the exact white balance transforms are up to the
1517 * camera device, they will approximately match the CIE
1518 * standard illuminant F4.</p>
1519 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1520 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1521 * For devices that support the MANUAL_POST_PROCESSING capability, the
1522 * values used by the camera device for the transform and gains
1523 * will be available in the capture result for this request.</p>
1524 *
1525 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1526 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001527 * @see CaptureRequest#CONTROL_AWB_MODE
1528 */
1529 public static final int CONTROL_AWB_MODE_WARM_FLUORESCENT = 4;
1530
1531 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001532 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001533 * the camera device uses daylight light as the assumed scene
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001534 * illumination for white balance.</p>
1535 * <p>While the exact white balance transforms are up to the
1536 * camera device, they will approximately match the CIE
1537 * standard illuminant D65.</p>
1538 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1539 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1540 * For devices that support the MANUAL_POST_PROCESSING capability, the
1541 * values used by the camera device for the transform and gains
1542 * will be available in the capture result for this request.</p>
1543 *
1544 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1545 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001546 * @see CaptureRequest#CONTROL_AWB_MODE
1547 */
1548 public static final int CONTROL_AWB_MODE_DAYLIGHT = 5;
1549
1550 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001551 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001552 * the camera device uses cloudy daylight light as the assumed scene
1553 * illumination for white balance.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001554 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1555 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1556 * For devices that support the MANUAL_POST_PROCESSING capability, the
1557 * values used by the camera device for the transform and gains
1558 * will be available in the capture result for this request.</p>
1559 *
1560 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1561 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001562 * @see CaptureRequest#CONTROL_AWB_MODE
1563 */
1564 public static final int CONTROL_AWB_MODE_CLOUDY_DAYLIGHT = 6;
1565
1566 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001567 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001568 * the camera device uses twilight light as the assumed scene
1569 * illumination for white balance.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001570 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1571 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1572 * For devices that support the MANUAL_POST_PROCESSING capability, the
1573 * values used by the camera device for the transform and gains
1574 * will be available in the capture result for this request.</p>
1575 *
1576 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1577 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001578 * @see CaptureRequest#CONTROL_AWB_MODE
1579 */
1580 public static final int CONTROL_AWB_MODE_TWILIGHT = 7;
1581
1582 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001583 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001584 * the camera device uses shade light as the assumed scene
1585 * illumination for white balance.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001586 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1587 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1588 * For devices that support the MANUAL_POST_PROCESSING capability, the
1589 * values used by the camera device for the transform and gains
1590 * will be available in the capture result for this request.</p>
1591 *
1592 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1593 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001594 * @see CaptureRequest#CONTROL_AWB_MODE
1595 */
1596 public static final int CONTROL_AWB_MODE_SHADE = 8;
1597
1598 //
1599 // Enumeration values for CaptureRequest#CONTROL_CAPTURE_INTENT
1600 //
1601
1602 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001603 * <p>The goal of this request doesn't fall into the other
1604 * categories. The camera device will default to preview-like
Igor Murashkinace5bf02013-12-10 17:36:40 -08001605 * behavior.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001606 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1607 */
1608 public static final int CONTROL_CAPTURE_INTENT_CUSTOM = 0;
1609
1610 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001611 * <p>This request is for a preview-like use case.</p>
1612 * <p>The precapture trigger may be used to start off a metering
1613 * w/flash sequence.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001614 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1615 */
1616 public static final int CONTROL_CAPTURE_INTENT_PREVIEW = 1;
1617
1618 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001619 * <p>This request is for a still capture-type
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001620 * use case.</p>
1621 * <p>If the flash unit is under automatic control, it may fire as needed.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001622 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1623 */
1624 public static final int CONTROL_CAPTURE_INTENT_STILL_CAPTURE = 2;
1625
1626 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001627 * <p>This request is for a video recording
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001628 * use case.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001629 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1630 */
1631 public static final int CONTROL_CAPTURE_INTENT_VIDEO_RECORD = 3;
1632
1633 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001634 * <p>This request is for a video snapshot (still
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001635 * image while recording video) use case.</p>
1636 * <p>The camera device should take the highest-quality image
1637 * possible (given the other settings) without disrupting the
Eino-Ville Talvala126a7462014-11-04 16:31:01 -08001638 * frame rate of video recording. </p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001639 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1640 */
1641 public static final int CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT = 4;
1642
1643 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001644 * <p>This request is for a ZSL usecase; the
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001645 * application will stream full-resolution images and
1646 * reprocess one or several later for a final
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001647 * capture.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001648 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1649 */
1650 public static final int CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG = 5;
1651
Zhijun Hee30adb72014-04-09 19:04:31 -07001652 /**
1653 * <p>This request is for manual capture use case where
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001654 * the applications want to directly control the capture parameters.</p>
1655 * <p>For example, the application may wish to manually control
1656 * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, etc.</p>
Zhijun Hee30adb72014-04-09 19:04:31 -07001657 *
1658 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
1659 * @see CaptureRequest#SENSOR_SENSITIVITY
1660 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1661 */
1662 public static final int CONTROL_CAPTURE_INTENT_MANUAL = 6;
1663
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001664 //
1665 // Enumeration values for CaptureRequest#CONTROL_EFFECT_MODE
1666 //
1667
1668 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001669 * <p>No color effect will be applied.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001670 * @see CaptureRequest#CONTROL_EFFECT_MODE
1671 */
1672 public static final int CONTROL_EFFECT_MODE_OFF = 0;
1673
1674 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001675 * <p>A "monocolor" effect where the image is mapped into
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001676 * a single color.</p>
1677 * <p>This will typically be grayscale.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001678 * @see CaptureRequest#CONTROL_EFFECT_MODE
1679 */
1680 public static final int CONTROL_EFFECT_MODE_MONO = 1;
1681
1682 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001683 * <p>A "photo-negative" effect where the image's colors
1684 * are inverted.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001685 * @see CaptureRequest#CONTROL_EFFECT_MODE
1686 */
1687 public static final int CONTROL_EFFECT_MODE_NEGATIVE = 2;
1688
1689 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001690 * <p>A "solarisation" effect (Sabattier effect) where the
1691 * image is wholly or partially reversed in
1692 * tone.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001693 * @see CaptureRequest#CONTROL_EFFECT_MODE
1694 */
1695 public static final int CONTROL_EFFECT_MODE_SOLARIZE = 3;
1696
1697 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001698 * <p>A "sepia" effect where the image is mapped into warm
1699 * gray, red, and brown tones.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001700 * @see CaptureRequest#CONTROL_EFFECT_MODE
1701 */
1702 public static final int CONTROL_EFFECT_MODE_SEPIA = 4;
1703
1704 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001705 * <p>A "posterization" effect where the image uses
1706 * discrete regions of tone rather than a continuous
1707 * gradient of tones.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001708 * @see CaptureRequest#CONTROL_EFFECT_MODE
1709 */
1710 public static final int CONTROL_EFFECT_MODE_POSTERIZE = 5;
1711
1712 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001713 * <p>A "whiteboard" effect where the image is typically displayed
1714 * as regions of white, with black or grey details.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001715 * @see CaptureRequest#CONTROL_EFFECT_MODE
1716 */
1717 public static final int CONTROL_EFFECT_MODE_WHITEBOARD = 6;
1718
1719 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001720 * <p>A "blackboard" effect where the image is typically displayed
1721 * as regions of black, with white or grey details.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001722 * @see CaptureRequest#CONTROL_EFFECT_MODE
1723 */
1724 public static final int CONTROL_EFFECT_MODE_BLACKBOARD = 7;
1725
1726 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001727 * <p>An "aqua" effect where a blue hue is added to the image.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001728 * @see CaptureRequest#CONTROL_EFFECT_MODE
1729 */
1730 public static final int CONTROL_EFFECT_MODE_AQUA = 8;
1731
1732 //
1733 // Enumeration values for CaptureRequest#CONTROL_MODE
1734 //
1735
1736 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001737 * <p>Full application control of pipeline.</p>
1738 * <p>All control by the device's metering and focusing (3A)
1739 * routines is disabled, and no other settings in
1740 * android.control.* have any effect, except that
1741 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} may be used by the camera
1742 * device to select post-processing values for processing
1743 * blocks that do not allow for manual control, or are not
1744 * exposed by the camera API.</p>
1745 * <p>However, the camera device's 3A routines may continue to
1746 * collect statistics and update their internal state so that
1747 * when control is switched to AUTO mode, good control values
1748 * can be immediately applied.</p>
1749 *
1750 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001751 * @see CaptureRequest#CONTROL_MODE
1752 */
1753 public static final int CONTROL_MODE_OFF = 0;
1754
1755 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001756 * <p>Use settings for each individual 3A routine.</p>
1757 * <p>Manual control of capture parameters is disabled. All
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001758 * controls in android.control.* besides sceneMode take
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001759 * effect.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001760 * @see CaptureRequest#CONTROL_MODE
1761 */
1762 public static final int CONTROL_MODE_AUTO = 1;
1763
1764 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001765 * <p>Use a specific scene mode.</p>
1766 * <p>Enabling this disables control.aeMode, control.awbMode and
1767 * control.afMode controls; the camera device will ignore
1768 * those settings while USE_SCENE_MODE is active (except for
Zhijun Heee2ebde2015-06-16 19:58:11 -07001769 * FACE_PRIORITY scene mode). Other control entries are still active.
1770 * This setting can only be used if scene mode is supported (i.e.
1771 * {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001772 * contain some modes other than DISABLED).</p>
Zhijun Hea4866242014-03-27 23:51:34 -07001773 *
1774 * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001775 * @see CaptureRequest#CONTROL_MODE
1776 */
1777 public static final int CONTROL_MODE_USE_SCENE_MODE = 2;
1778
Zhijun He2d5e8972014-02-07 16:13:46 -08001779 /**
1780 * <p>Same as OFF mode, except that this capture will not be
1781 * used by camera device background auto-exposure, auto-white balance and
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001782 * auto-focus algorithms (3A) to update their statistics.</p>
1783 * <p>Specifically, the 3A routines are locked to the last
1784 * values set from a request with AUTO, OFF, or
1785 * USE_SCENE_MODE, and any statistics or state updates
1786 * collected from manual captures with OFF_KEEP_STATE will be
1787 * discarded by the camera device.</p>
Zhijun He2d5e8972014-02-07 16:13:46 -08001788 * @see CaptureRequest#CONTROL_MODE
1789 */
1790 public static final int CONTROL_MODE_OFF_KEEP_STATE = 3;
1791
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001792 //
1793 // Enumeration values for CaptureRequest#CONTROL_SCENE_MODE
1794 //
1795
1796 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001797 * <p>Indicates that no scene modes are set for a given capture request.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001798 * @see CaptureRequest#CONTROL_SCENE_MODE
1799 */
Ruben Brunke6679362014-01-17 17:05:54 -08001800 public static final int CONTROL_SCENE_MODE_DISABLED = 0;
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001801
1802 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001803 * <p>If face detection support exists, use face
1804 * detection data for auto-focus, auto-white balance, and
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001805 * auto-exposure routines.</p>
1806 * <p>If face detection statistics are disabled
1807 * (i.e. {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} is set to OFF),
Ruben Brunke6679362014-01-17 17:05:54 -08001808 * this should still operate correctly (but will not return
1809 * face detection statistics to the framework).</p>
1810 * <p>Unlike the other scene modes, {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode},
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001811 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}
Ruben Brunke6679362014-01-17 17:05:54 -08001812 * remain active when FACE_PRIORITY is set.</p>
1813 *
1814 * @see CaptureRequest#CONTROL_AE_MODE
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001815 * @see CaptureRequest#CONTROL_AF_MODE
Ruben Brunke6679362014-01-17 17:05:54 -08001816 * @see CaptureRequest#CONTROL_AWB_MODE
1817 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001818 * @see CaptureRequest#CONTROL_SCENE_MODE
1819 */
1820 public static final int CONTROL_SCENE_MODE_FACE_PRIORITY = 1;
1821
1822 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001823 * <p>Optimized for photos of quickly moving objects.</p>
1824 * <p>Similar to SPORTS.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001825 * @see CaptureRequest#CONTROL_SCENE_MODE
1826 */
1827 public static final int CONTROL_SCENE_MODE_ACTION = 2;
1828
1829 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001830 * <p>Optimized for still photos of people.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001831 * @see CaptureRequest#CONTROL_SCENE_MODE
1832 */
1833 public static final int CONTROL_SCENE_MODE_PORTRAIT = 3;
1834
1835 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001836 * <p>Optimized for photos of distant macroscopic objects.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001837 * @see CaptureRequest#CONTROL_SCENE_MODE
1838 */
1839 public static final int CONTROL_SCENE_MODE_LANDSCAPE = 4;
1840
1841 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001842 * <p>Optimized for low-light settings.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001843 * @see CaptureRequest#CONTROL_SCENE_MODE
1844 */
1845 public static final int CONTROL_SCENE_MODE_NIGHT = 5;
1846
1847 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001848 * <p>Optimized for still photos of people in low-light
1849 * settings.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001850 * @see CaptureRequest#CONTROL_SCENE_MODE
1851 */
1852 public static final int CONTROL_SCENE_MODE_NIGHT_PORTRAIT = 6;
1853
1854 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001855 * <p>Optimized for dim, indoor settings where flash must
1856 * remain off.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001857 * @see CaptureRequest#CONTROL_SCENE_MODE
1858 */
1859 public static final int CONTROL_SCENE_MODE_THEATRE = 7;
1860
1861 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001862 * <p>Optimized for bright, outdoor beach settings.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001863 * @see CaptureRequest#CONTROL_SCENE_MODE
1864 */
1865 public static final int CONTROL_SCENE_MODE_BEACH = 8;
1866
1867 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001868 * <p>Optimized for bright, outdoor settings containing snow.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001869 * @see CaptureRequest#CONTROL_SCENE_MODE
1870 */
1871 public static final int CONTROL_SCENE_MODE_SNOW = 9;
1872
1873 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001874 * <p>Optimized for scenes of the setting sun.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001875 * @see CaptureRequest#CONTROL_SCENE_MODE
1876 */
1877 public static final int CONTROL_SCENE_MODE_SUNSET = 10;
1878
1879 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001880 * <p>Optimized to avoid blurry photos due to small amounts of
1881 * device motion (for example: due to hand shake).</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001882 * @see CaptureRequest#CONTROL_SCENE_MODE
1883 */
1884 public static final int CONTROL_SCENE_MODE_STEADYPHOTO = 11;
1885
1886 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001887 * <p>Optimized for nighttime photos of fireworks.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001888 * @see CaptureRequest#CONTROL_SCENE_MODE
1889 */
1890 public static final int CONTROL_SCENE_MODE_FIREWORKS = 12;
1891
1892 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001893 * <p>Optimized for photos of quickly moving people.</p>
1894 * <p>Similar to ACTION.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001895 * @see CaptureRequest#CONTROL_SCENE_MODE
1896 */
1897 public static final int CONTROL_SCENE_MODE_SPORTS = 13;
1898
1899 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001900 * <p>Optimized for dim, indoor settings with multiple moving
1901 * people.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001902 * @see CaptureRequest#CONTROL_SCENE_MODE
1903 */
1904 public static final int CONTROL_SCENE_MODE_PARTY = 14;
1905
1906 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001907 * <p>Optimized for dim settings where the main light source
1908 * is a flame.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001909 * @see CaptureRequest#CONTROL_SCENE_MODE
1910 */
1911 public static final int CONTROL_SCENE_MODE_CANDLELIGHT = 15;
1912
1913 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001914 * <p>Optimized for accurately capturing a photo of barcode
1915 * for use by camera applications that wish to read the
1916 * barcode value.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001917 * @see CaptureRequest#CONTROL_SCENE_MODE
1918 */
1919 public static final int CONTROL_SCENE_MODE_BARCODE = 16;
1920
Zhijun Hee0404182014-06-26 13:17:09 -07001921 /**
Eino-Ville Talvala639fffe2015-06-30 10:34:48 -07001922 * <p>This is deprecated, please use {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }
1923 * and {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList }
Zhijun Hefab663e2015-05-26 19:46:31 -07001924 * for high speed video recording.</p>
Zhijun Hee0404182014-06-26 13:17:09 -07001925 * <p>Optimized for high speed video recording (frame rate &gt;=60fps) use case.</p>
1926 * <p>The supported high speed video sizes and fps ranges are specified in
1927 * android.control.availableHighSpeedVideoConfigurations. To get desired
1928 * output frame rates, the application is only allowed to select video size
1929 * and fps range combinations listed in this static metadata. The fps range
1930 * can be control via {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}.</p>
1931 * <p>In this mode, the camera device will override aeMode, awbMode, and afMode to
1932 * ON, ON, and CONTINUOUS_VIDEO, respectively. All post-processing block mode
1933 * controls will be overridden to be FAST. Therefore, no manual control of capture
1934 * and post-processing parameters is possible. All other controls operate the
1935 * same as when {@link CaptureRequest#CONTROL_MODE android.control.mode} == AUTO. This means that all other
1936 * android.control.* fields continue to work, such as</p>
1937 * <ul>
1938 * <li>{@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}</li>
1939 * <li>{@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}</li>
1940 * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li>
1941 * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li>
1942 * <li>{@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</li>
1943 * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li>
1944 * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li>
1945 * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li>
1946 * <li>{@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}</li>
1947 * <li>{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}</li>
1948 * </ul>
1949 * <p>Outside of android.control.*, the following controls will work:</p>
1950 * <ul>
1951 * <li>{@link CaptureRequest#FLASH_MODE android.flash.mode} (automatic flash for still capture will not work since aeMode is ON)</li>
1952 * <li>{@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} (if it is supported)</li>
1953 * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li>
1954 * <li>{@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}</li>
1955 * </ul>
1956 * <p>For high speed recording use case, the actual maximum supported frame rate may
1957 * be lower than what camera can output, depending on the destination Surfaces for
1958 * the image data. For example, if the destination surface is from video encoder,
1959 * the application need check if the video encoder is capable of supporting the
1960 * high frame rate for a given video size, or it will end up with lower recording
1961 * frame rate. If the destination surface is from preview window, the preview frame
1962 * rate will be bounded by the screen refresh rate.</p>
1963 * <p>The camera device will only support up to 2 output high speed streams
1964 * (processed non-stalling format defined in android.request.maxNumOutputStreams)
1965 * in this mode. This control will be effective only if all of below conditions are true:</p>
1966 * <ul>
1967 * <li>The application created no more than maxNumHighSpeedStreams processed non-stalling
1968 * format output streams, where maxNumHighSpeedStreams is calculated as
1969 * min(2, android.request.maxNumOutputStreams[Processed (but not-stalling)]).</li>
1970 * <li>The stream sizes are selected from the sizes reported by
1971 * android.control.availableHighSpeedVideoConfigurations.</li>
1972 * <li>No processed non-stalling or raw streams are configured.</li>
1973 * </ul>
1974 * <p>When above conditions are NOT satistied, the controls of this mode and
1975 * {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} will be ignored by the camera device,
1976 * the camera device will fall back to {@link CaptureRequest#CONTROL_MODE android.control.mode} <code>==</code> AUTO,
1977 * and the returned capture result metadata will give the fps range choosen
1978 * by the camera device.</p>
1979 * <p>Switching into or out of this mode may trigger some camera ISP/sensor
1980 * reconfigurations, which may introduce extra latency. It is recommended that
1981 * the application avoids unnecessary scene mode switch as much as possible.</p>
1982 *
1983 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
1984 * @see CaptureRequest#CONTROL_AE_LOCK
1985 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1986 * @see CaptureRequest#CONTROL_AE_REGIONS
1987 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
1988 * @see CaptureRequest#CONTROL_AF_REGIONS
1989 * @see CaptureRequest#CONTROL_AF_TRIGGER
1990 * @see CaptureRequest#CONTROL_AWB_LOCK
1991 * @see CaptureRequest#CONTROL_AWB_REGIONS
1992 * @see CaptureRequest#CONTROL_EFFECT_MODE
1993 * @see CaptureRequest#CONTROL_MODE
1994 * @see CaptureRequest#FLASH_MODE
1995 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
1996 * @see CaptureRequest#SCALER_CROP_REGION
1997 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
1998 * @see CaptureRequest#CONTROL_SCENE_MODE
Zhijun Hefab663e2015-05-26 19:46:31 -07001999 * @deprecated Please refer to this API documentation to find the alternatives
Zhijun Hee0404182014-06-26 13:17:09 -07002000 */
Aurimas Liutikas514c5ef2016-05-24 15:22:55 -07002001 @Deprecated
Zhijun Hee0404182014-06-26 13:17:09 -07002002 public static final int CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO = 17;
2003
Ruben Brunkff99a0a2014-08-28 18:42:35 -07002004 /**
Eino-Ville Talvalaf4eac122014-12-05 11:10:15 -08002005 * <p>Turn on a device-specific high dynamic range (HDR) mode.</p>
2006 * <p>In this scene mode, the camera device captures images
2007 * that keep a larger range of scene illumination levels
2008 * visible in the final image. For example, when taking a
2009 * picture of a object in front of a bright window, both
2010 * the object and the scene through the window may be
2011 * visible when using HDR mode, while in normal AUTO mode,
2012 * one or the other may be poorly exposed. As a tradeoff,
2013 * HDR mode generally takes much longer to capture a single
2014 * image, has no user control, and may have other artifacts
2015 * depending on the HDR method used.</p>
2016 * <p>Therefore, HDR captures operate at a much slower rate
2017 * than regular captures.</p>
2018 * <p>In this mode, on LIMITED or FULL devices, when a request
2019 * is made with a {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} of
2020 * STILL_CAPTURE, the camera device will capture an image
2021 * using a high dynamic range capture technique. On LEGACY
2022 * devices, captures that target a JPEG-format output will
2023 * be captured with HDR, and the capture intent is not
2024 * relevant.</p>
2025 * <p>The HDR capture may involve the device capturing a burst
2026 * of images internally and combining them into one, or it
2027 * may involve the device using specialized high dynamic
2028 * range capture hardware. In all cases, a single image is
2029 * produced in response to a capture request submitted
2030 * while in HDR mode.</p>
2031 * <p>Since substantial post-processing is generally needed to
Eino-Ville Talvalac7c569d2016-04-04 10:48:38 -07002032 * produce an HDR image, only YUV, PRIVATE, and JPEG
2033 * outputs are supported for LIMITED/FULL device HDR
2034 * captures, and only JPEG outputs are supported for LEGACY
2035 * HDR captures. Using a RAW output for HDR capture is not
Eino-Ville Talvalaf4eac122014-12-05 11:10:15 -08002036 * supported.</p>
Eino-Ville Talvalac7c569d2016-04-04 10:48:38 -07002037 * <p>Some devices may also support always-on HDR, which
2038 * applies HDR processing at full frame rate. For these
2039 * devices, intents other than STILL_CAPTURE will also
2040 * produce an HDR output with no frame rate impact compared
2041 * to normal operation, though the quality may be lower
2042 * than for STILL_CAPTURE intents.</p>
2043 * <p>If SCENE_MODE_HDR is used with unsupported output types
2044 * or capture intents, the images captured will be as if
2045 * the SCENE_MODE was not enabled at all.</p>
Eino-Ville Talvalaf4eac122014-12-05 11:10:15 -08002046 *
2047 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
Ruben Brunkff99a0a2014-08-28 18:42:35 -07002048 * @see CaptureRequest#CONTROL_SCENE_MODE
Ruben Brunkff99a0a2014-08-28 18:42:35 -07002049 */
2050 public static final int CONTROL_SCENE_MODE_HDR = 18;
2051
Zhijun Heee2ebde2015-06-16 19:58:11 -07002052 /**
2053 * <p>Same as FACE_PRIORITY scene mode, except that the camera
Zhijun He4fb81252015-07-11 20:02:30 -07002054 * device will choose higher sensitivity values ({@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity})
Zhijun Heee2ebde2015-06-16 19:58:11 -07002055 * under low light conditions.</p>
2056 * <p>The camera device may be tuned to expose the images in a reduced
2057 * sensitivity range to produce the best quality images. For example,
2058 * if the {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange} gives range of [100, 1600],
2059 * the camera device auto-exposure routine tuning process may limit the actual
Zhijun He4fb81252015-07-11 20:02:30 -07002060 * exposure sensitivity range to [100, 1200] to ensure that the noise level isn't
2061 * exessive in order to preserve the image quality. Under this situation, the image under
Zhijun Heee2ebde2015-06-16 19:58:11 -07002062 * low light may be under-exposed when the sensor max exposure time (bounded by the
2063 * {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} when {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is one of the
Zhijun He4fb81252015-07-11 20:02:30 -07002064 * ON_* modes) and effective max sensitivity are reached. This scene mode allows the
Zhijun Heee2ebde2015-06-16 19:58:11 -07002065 * camera device auto-exposure routine to increase the sensitivity up to the max
2066 * sensitivity specified by {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange} when the scene is too
2067 * dark and the max exposure time is reached. The captured images may be noisier
Zhijun He4fb81252015-07-11 20:02:30 -07002068 * compared with the images captured in normal FACE_PRIORITY mode; therefore, it is
Zhijun Heee2ebde2015-06-16 19:58:11 -07002069 * recommended that the application only use this scene mode when it is capable of
2070 * reducing the noise level of the captured images.</p>
2071 * <p>Unlike the other scene modes, {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode},
2072 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}
2073 * remain active when FACE_PRIORITY_LOW_LIGHT is set.</p>
2074 *
2075 * @see CaptureRequest#CONTROL_AE_MODE
2076 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
2077 * @see CaptureRequest#CONTROL_AF_MODE
2078 * @see CaptureRequest#CONTROL_AWB_MODE
2079 * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
2080 * @see CaptureRequest#SENSOR_SENSITIVITY
2081 * @see CaptureRequest#CONTROL_SCENE_MODE
2082 * @hide
2083 */
2084 public static final int CONTROL_SCENE_MODE_FACE_PRIORITY_LOW_LIGHT = 19;
2085
Yin-Chia Yeh37348202016-03-09 14:44:49 -08002086 /**
2087 * <p>Scene mode values within the range of
2088 * <code>[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]</code> are reserved for device specific
2089 * customized scene modes.</p>
2090 * @see CaptureRequest#CONTROL_SCENE_MODE
2091 * @hide
2092 */
2093 public static final int CONTROL_SCENE_MODE_DEVICE_CUSTOM_START = 100;
2094
2095 /**
2096 * <p>Scene mode values within the range of
2097 * <code>[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]</code> are reserved for device specific
2098 * customized scene modes.</p>
2099 * @see CaptureRequest#CONTROL_SCENE_MODE
2100 * @hide
2101 */
2102 public static final int CONTROL_SCENE_MODE_DEVICE_CUSTOM_END = 127;
2103
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002104 //
Zhijun He4793af52014-05-05 10:39:12 -07002105 // Enumeration values for CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
2106 //
2107
2108 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002109 * <p>Video stabilization is disabled.</p>
Zhijun He4793af52014-05-05 10:39:12 -07002110 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
2111 */
2112 public static final int CONTROL_VIDEO_STABILIZATION_MODE_OFF = 0;
2113
2114 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002115 * <p>Video stabilization is enabled.</p>
Zhijun He4793af52014-05-05 10:39:12 -07002116 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
2117 */
2118 public static final int CONTROL_VIDEO_STABILIZATION_MODE_ON = 1;
2119
2120 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002121 // Enumeration values for CaptureRequest#EDGE_MODE
2122 //
2123
2124 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002125 * <p>No edge enhancement is applied.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002126 * @see CaptureRequest#EDGE_MODE
2127 */
2128 public static final int EDGE_MODE_OFF = 0;
2129
2130 /**
Chien-Yu Chen9c9167e2015-07-14 16:38:25 -07002131 * <p>Apply edge enhancement at a quality level that does not slow down frame rate
2132 * relative to sensor output. It may be the same as OFF if edge enhancement will
2133 * slow down frame rate relative to sensor.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002134 * @see CaptureRequest#EDGE_MODE
2135 */
2136 public static final int EDGE_MODE_FAST = 1;
2137
2138 /**
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07002139 * <p>Apply high-quality edge enhancement, at a cost of possibly reduced output frame rate.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002140 * @see CaptureRequest#EDGE_MODE
2141 */
2142 public static final int EDGE_MODE_HIGH_QUALITY = 2;
2143
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002144 /**
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08002145 * <p>Edge enhancement is applied at different
2146 * levels for different output streams, based on resolution. Streams at maximum recording
2147 * resolution (see {@link android.hardware.camera2.CameraDevice#createCaptureSession })
2148 * or below have edge enhancement applied, while higher-resolution streams have no edge
2149 * enhancement applied. The level of edge enhancement for low-resolution streams is tuned
2150 * so that frame rate is not impacted, and the quality is equal to or better than FAST
2151 * (since it is only applied to lower-resolution outputs, quality may improve from FAST).</p>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002152 * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode
2153 * with YUV or PRIVATE reprocessing, where the application continuously captures
2154 * high-resolution intermediate buffers into a circular buffer, from which a final image is
2155 * produced via reprocessing when a user takes a picture. For such a use case, the
2156 * high-resolution buffers must not have edge enhancement applied to maximize efficiency of
2157 * preview and to avoid double-applying enhancement when reprocessed, while low-resolution
2158 * buffers (used for recording or preview, generally) need edge enhancement applied for
2159 * reasonable preview quality.</p>
2160 * <p>This mode is guaranteed to be supported by devices that support either the
2161 * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
Chien-Yu Chen72333912015-07-08 11:55:19 -07002162 * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} lists either of those capabilities) and it will
2163 * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002164 *
2165 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2166 * @see CaptureRequest#EDGE_MODE
2167 */
2168 public static final int EDGE_MODE_ZERO_SHUTTER_LAG = 3;
2169
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002170 //
2171 // Enumeration values for CaptureRequest#FLASH_MODE
2172 //
2173
2174 /**
Zhijun He66d065a2014-01-16 18:18:50 -08002175 * <p>Do not fire the flash for this capture.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002176 * @see CaptureRequest#FLASH_MODE
2177 */
2178 public static final int FLASH_MODE_OFF = 0;
2179
2180 /**
Zhijun He66d065a2014-01-16 18:18:50 -08002181 * <p>If the flash is available and charged, fire flash
Zhijun He89492252014-05-23 13:49:59 -07002182 * for this capture.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002183 * @see CaptureRequest#FLASH_MODE
2184 */
2185 public static final int FLASH_MODE_SINGLE = 1;
2186
2187 /**
Zhijun He66d065a2014-01-16 18:18:50 -08002188 * <p>Transition flash to continuously on.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002189 * @see CaptureRequest#FLASH_MODE
2190 */
2191 public static final int FLASH_MODE_TORCH = 2;
2192
2193 //
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002194 // Enumeration values for CaptureRequest#HOT_PIXEL_MODE
2195 //
2196
2197 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002198 * <p>No hot pixel correction is applied.</p>
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002199 * <p>The frame rate must not be reduced relative to sensor raw output
2200 * for this option.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002201 * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08002202 *
2203 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002204 * @see CaptureRequest#HOT_PIXEL_MODE
2205 */
2206 public static final int HOT_PIXEL_MODE_OFF = 0;
2207
2208 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002209 * <p>Hot pixel correction is applied, without reducing frame
2210 * rate relative to sensor raw output.</p>
2211 * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08002212 *
2213 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002214 * @see CaptureRequest#HOT_PIXEL_MODE
2215 */
2216 public static final int HOT_PIXEL_MODE_FAST = 1;
2217
2218 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002219 * <p>High-quality hot pixel correction is applied, at a cost
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07002220 * of possibly reduced frame rate relative to sensor raw output.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002221 * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08002222 *
2223 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002224 * @see CaptureRequest#HOT_PIXEL_MODE
2225 */
2226 public static final int HOT_PIXEL_MODE_HIGH_QUALITY = 2;
2227
2228 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002229 // Enumeration values for CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
2230 //
2231
2232 /**
Ruben Brunk00849b32014-01-17 18:30:23 -08002233 * <p>Optical stabilization is unavailable.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002234 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
2235 */
2236 public static final int LENS_OPTICAL_STABILIZATION_MODE_OFF = 0;
2237
2238 /**
Ruben Brunk00849b32014-01-17 18:30:23 -08002239 * <p>Optical stabilization is enabled.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002240 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
2241 */
2242 public static final int LENS_OPTICAL_STABILIZATION_MODE_ON = 1;
2243
2244 //
2245 // Enumeration values for CaptureRequest#NOISE_REDUCTION_MODE
2246 //
2247
2248 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002249 * <p>No noise reduction is applied.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002250 * @see CaptureRequest#NOISE_REDUCTION_MODE
2251 */
2252 public static final int NOISE_REDUCTION_MODE_OFF = 0;
2253
2254 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002255 * <p>Noise reduction is applied without reducing frame rate relative to sensor
Chien-Yu Chen9c9167e2015-07-14 16:38:25 -07002256 * output. It may be the same as OFF if noise reduction will reduce frame rate
2257 * relative to sensor.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002258 * @see CaptureRequest#NOISE_REDUCTION_MODE
2259 */
2260 public static final int NOISE_REDUCTION_MODE_FAST = 1;
2261
2262 /**
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07002263 * <p>High-quality noise reduction is applied, at the cost of possibly reduced frame
2264 * rate relative to sensor output.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002265 * @see CaptureRequest#NOISE_REDUCTION_MODE
2266 */
2267 public static final int NOISE_REDUCTION_MODE_HIGH_QUALITY = 2;
2268
Zhijun He0e99c222015-01-29 15:26:05 -08002269 /**
2270 * <p>MINIMAL noise reduction is applied without reducing frame rate relative to
2271 * sensor output. </p>
2272 * @see CaptureRequest#NOISE_REDUCTION_MODE
2273 */
2274 public static final int NOISE_REDUCTION_MODE_MINIMAL = 3;
2275
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002276 /**
2277 * <p>Noise reduction is applied at different levels for different output streams,
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08002278 * based on resolution. Streams at maximum recording resolution (see {@link android.hardware.camera2.CameraDevice#createCaptureSession })
2279 * or below have noise reduction applied, while higher-resolution streams have MINIMAL (if
2280 * supported) or no noise reduction applied (if MINIMAL is not supported.) The degree of
2281 * noise reduction for low-resolution streams is tuned so that frame rate is not impacted,
2282 * and the quality is equal to or better than FAST (since it is only applied to
2283 * lower-resolution outputs, quality may improve from FAST).</p>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002284 * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode
2285 * with YUV or PRIVATE reprocessing, where the application continuously captures
2286 * high-resolution intermediate buffers into a circular buffer, from which a final image is
2287 * produced via reprocessing when a user takes a picture. For such a use case, the
2288 * high-resolution buffers must not have noise reduction applied to maximize efficiency of
2289 * preview and to avoid over-applying noise filtering when reprocessing, while
2290 * low-resolution buffers (used for recording or preview, generally) need noise reduction
2291 * applied for reasonable preview quality.</p>
2292 * <p>This mode is guaranteed to be supported by devices that support either the
2293 * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
Chien-Yu Chen72333912015-07-08 11:55:19 -07002294 * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} lists either of those capabilities) and it will
2295 * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002296 *
2297 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2298 * @see CaptureRequest#NOISE_REDUCTION_MODE
2299 */
2300 public static final int NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG = 4;
2301
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002302 //
Igor Murashkinc127f052014-01-17 18:06:02 -08002303 // Enumeration values for CaptureRequest#SENSOR_TEST_PATTERN_MODE
2304 //
2305
2306 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002307 * <p>No test pattern mode is used, and the camera
Igor Murashkinc127f052014-01-17 18:06:02 -08002308 * device returns captures from the image sensor.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002309 * <p>This is the default if the key is not set.</p>
Igor Murashkinc127f052014-01-17 18:06:02 -08002310 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2311 */
2312 public static final int SENSOR_TEST_PATTERN_MODE_OFF = 0;
2313
2314 /**
2315 * <p>Each pixel in <code>[R, G_even, G_odd, B]</code> is replaced by its
2316 * respective color channel provided in
2317 * {@link CaptureRequest#SENSOR_TEST_PATTERN_DATA android.sensor.testPatternData}.</p>
2318 * <p>For example:</p>
2319 * <pre><code>android.testPatternData = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0]
2320 * </code></pre>
2321 * <p>All green pixels are 100% green. All red/blue pixels are black.</p>
2322 * <pre><code>android.testPatternData = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0]
2323 * </code></pre>
2324 * <p>All red pixels are 100% red. Only the odd green pixels
2325 * are 100% green. All blue pixels are 100% black.</p>
2326 *
2327 * @see CaptureRequest#SENSOR_TEST_PATTERN_DATA
2328 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2329 */
2330 public static final int SENSOR_TEST_PATTERN_MODE_SOLID_COLOR = 1;
2331
2332 /**
2333 * <p>All pixel data is replaced with an 8-bar color pattern.</p>
2334 * <p>The vertical bars (left-to-right) are as follows:</p>
2335 * <ul>
2336 * <li>100% white</li>
2337 * <li>yellow</li>
2338 * <li>cyan</li>
2339 * <li>green</li>
2340 * <li>magenta</li>
2341 * <li>red</li>
2342 * <li>blue</li>
2343 * <li>black</li>
2344 * </ul>
2345 * <p>In general the image would look like the following:</p>
2346 * <pre><code>W Y C G M R B K
2347 * W Y C G M R B K
2348 * W Y C G M R B K
2349 * W Y C G M R B K
2350 * W Y C G M R B K
2351 * . . . . . . . .
2352 * . . . . . . . .
2353 * . . . . . . . .
2354 *
2355 * (B = Blue, K = Black)
2356 * </code></pre>
2357 * <p>Each bar should take up 1/8 of the sensor pixel array width.
2358 * When this is not possible, the bar size should be rounded
2359 * down to the nearest integer and the pattern can repeat
2360 * on the right side.</p>
2361 * <p>Each bar's height must always take up the full sensor
2362 * pixel array height.</p>
2363 * <p>Each pixel in this test pattern must be set to either
2364 * 0% intensity or 100% intensity.</p>
2365 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2366 */
2367 public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS = 2;
2368
2369 /**
2370 * <p>The test pattern is similar to COLOR_BARS, except that
2371 * each bar should start at its specified color at the top,
2372 * and fade to gray at the bottom.</p>
2373 * <p>Furthermore each bar is further subdivided into a left and
2374 * right half. The left half should have a smooth gradient,
2375 * and the right half should have a quantized gradient.</p>
2376 * <p>In particular, the right half's should consist of blocks of the
2377 * same color for 1/16th active sensor pixel array width.</p>
2378 * <p>The least significant bits in the quantized gradient should
2379 * be copied from the most significant bits of the smooth gradient.</p>
2380 * <p>The height of each bar should always be a multiple of 128.
2381 * When this is not the case, the pattern should repeat at the bottom
2382 * of the image.</p>
2383 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2384 */
2385 public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY = 3;
2386
2387 /**
2388 * <p>All pixel data is replaced by a pseudo-random sequence
2389 * generated from a PN9 512-bit sequence (typically implemented
2390 * in hardware with a linear feedback shift register).</p>
2391 * <p>The generator should be reset at the beginning of each frame,
2392 * and thus each subsequent raw frame with this test pattern should
2393 * be exactly the same as the last.</p>
2394 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2395 */
2396 public static final int SENSOR_TEST_PATTERN_MODE_PN9 = 4;
2397
2398 /**
2399 * <p>The first custom test pattern. All custom patterns that are
2400 * available only on this camera device are at least this numeric
2401 * value.</p>
2402 * <p>All of the custom test patterns will be static
2403 * (that is the raw image must not vary from frame to frame).</p>
2404 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2405 */
2406 public static final int SENSOR_TEST_PATTERN_MODE_CUSTOM1 = 256;
2407
2408 //
Zhijun Heba93fe62014-01-17 16:43:05 -08002409 // Enumeration values for CaptureRequest#SHADING_MODE
2410 //
2411
2412 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002413 * <p>No lens shading correction is applied.</p>
Zhijun Heba93fe62014-01-17 16:43:05 -08002414 * @see CaptureRequest#SHADING_MODE
Zhijun Heba93fe62014-01-17 16:43:05 -08002415 */
2416 public static final int SHADING_MODE_OFF = 0;
2417
2418 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002419 * <p>Apply lens shading corrections, without slowing
2420 * frame rate relative to sensor raw output</p>
Zhijun Heba93fe62014-01-17 16:43:05 -08002421 * @see CaptureRequest#SHADING_MODE
Zhijun Heba93fe62014-01-17 16:43:05 -08002422 */
2423 public static final int SHADING_MODE_FAST = 1;
2424
2425 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002426 * <p>Apply high-quality lens shading correction, at the
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07002427 * cost of possibly reduced frame rate.</p>
Zhijun Heba93fe62014-01-17 16:43:05 -08002428 * @see CaptureRequest#SHADING_MODE
Zhijun Heba93fe62014-01-17 16:43:05 -08002429 */
2430 public static final int SHADING_MODE_HIGH_QUALITY = 2;
2431
2432 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002433 // Enumeration values for CaptureRequest#STATISTICS_FACE_DETECT_MODE
2434 //
2435
2436 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002437 * <p>Do not include face detection statistics in capture
2438 * results.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002439 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
2440 */
2441 public static final int STATISTICS_FACE_DETECT_MODE_OFF = 0;
2442
2443 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002444 * <p>Return face rectangle and confidence values only.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002445 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
2446 */
2447 public static final int STATISTICS_FACE_DETECT_MODE_SIMPLE = 1;
2448
2449 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002450 * <p>Return all face
2451 * metadata.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002452 * <p>In this mode, face rectangles, scores, landmarks, and face IDs are all valid.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002453 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
2454 */
2455 public static final int STATISTICS_FACE_DETECT_MODE_FULL = 2;
2456
2457 //
Eino-Ville Talvalad96748b2013-09-12 11:11:27 -07002458 // Enumeration values for CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
2459 //
2460
2461 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002462 * <p>Do not include a lens shading map in the capture result.</p>
Eino-Ville Talvalad96748b2013-09-12 11:11:27 -07002463 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
2464 */
2465 public static final int STATISTICS_LENS_SHADING_MAP_MODE_OFF = 0;
2466
2467 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002468 * <p>Include a lens shading map in the capture result.</p>
Eino-Ville Talvalad96748b2013-09-12 11:11:27 -07002469 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
2470 */
2471 public static final int STATISTICS_LENS_SHADING_MAP_MODE_ON = 1;
2472
2473 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002474 // Enumeration values for CaptureRequest#TONEMAP_MODE
2475 //
2476
2477 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002478 * <p>Use the tone mapping curve specified in
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07002479 * the {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}* entries.</p>
Igor Murashkine0060932014-01-17 17:24:11 -08002480 * <p>All color enhancement and tonemapping must be disabled, except
2481 * for applying the tonemapping curve specified by
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07002482 * {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p>
Igor Murashkine0060932014-01-17 17:24:11 -08002483 * <p>Must not slow down frame rate relative to raw
2484 * sensor output.</p>
2485 *
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07002486 * @see CaptureRequest#TONEMAP_CURVE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002487 * @see CaptureRequest#TONEMAP_MODE
2488 */
2489 public static final int TONEMAP_MODE_CONTRAST_CURVE = 0;
2490
2491 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002492 * <p>Advanced gamma mapping and color enhancement may be applied, without
2493 * reducing frame rate compared to raw sensor output.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002494 * @see CaptureRequest#TONEMAP_MODE
2495 */
2496 public static final int TONEMAP_MODE_FAST = 1;
2497
2498 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002499 * <p>High-quality gamma mapping and color enhancement will be applied, at
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07002500 * the cost of possibly reduced frame rate compared to raw sensor output.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002501 * @see CaptureRequest#TONEMAP_MODE
2502 */
2503 public static final int TONEMAP_MODE_HIGH_QUALITY = 2;
2504
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002505 /**
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002506 * <p>Use the gamma value specified in {@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma} to peform
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002507 * tonemapping.</p>
2508 * <p>All color enhancement and tonemapping must be disabled, except
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002509 * for applying the tonemapping curve specified by {@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma}.</p>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002510 * <p>Must not slow down frame rate relative to raw sensor output.</p>
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002511 *
2512 * @see CaptureRequest#TONEMAP_GAMMA
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002513 * @see CaptureRequest#TONEMAP_MODE
2514 */
2515 public static final int TONEMAP_MODE_GAMMA_VALUE = 3;
2516
2517 /**
2518 * <p>Use the preset tonemapping curve specified in
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002519 * {@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve} to peform tonemapping.</p>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002520 * <p>All color enhancement and tonemapping must be disabled, except
2521 * for applying the tonemapping curve specified by
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002522 * {@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve}.</p>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002523 * <p>Must not slow down frame rate relative to raw sensor output.</p>
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002524 *
2525 * @see CaptureRequest#TONEMAP_PRESET_CURVE
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002526 * @see CaptureRequest#TONEMAP_MODE
2527 */
2528 public static final int TONEMAP_MODE_PRESET_CURVE = 4;
2529
2530 //
2531 // Enumeration values for CaptureRequest#TONEMAP_PRESET_CURVE
2532 //
2533
2534 /**
2535 * <p>Tonemapping curve is defined by sRGB</p>
2536 * @see CaptureRequest#TONEMAP_PRESET_CURVE
2537 */
2538 public static final int TONEMAP_PRESET_CURVE_SRGB = 0;
2539
2540 /**
2541 * <p>Tonemapping curve is defined by ITU-R BT.709</p>
2542 * @see CaptureRequest#TONEMAP_PRESET_CURVE
2543 */
2544 public static final int TONEMAP_PRESET_CURVE_REC709 = 1;
2545
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002546 //
2547 // Enumeration values for CaptureResult#CONTROL_AE_STATE
2548 //
2549
2550 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002551 * <p>AE is off or recently reset.</p>
2552 * <p>When a camera device is opened, it starts in
Zhijun He60b19dc2014-02-24 10:19:20 -08002553 * this state. This is a transient state, the camera device may skip reporting
2554 * this state in capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002555 * @see CaptureResult#CONTROL_AE_STATE
2556 */
2557 public static final int CONTROL_AE_STATE_INACTIVE = 0;
2558
2559 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002560 * <p>AE doesn't yet have a good set of control values
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002561 * for the current scene.</p>
2562 * <p>This is a transient state, the camera device may skip
Zhijun He60b19dc2014-02-24 10:19:20 -08002563 * reporting this state in capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002564 * @see CaptureResult#CONTROL_AE_STATE
2565 */
2566 public static final int CONTROL_AE_STATE_SEARCHING = 1;
2567
2568 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002569 * <p>AE has a good set of control values for the
Zhijun He228f4f92014-01-16 17:22:05 -08002570 * current scene.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002571 * @see CaptureResult#CONTROL_AE_STATE
2572 */
2573 public static final int CONTROL_AE_STATE_CONVERGED = 2;
2574
2575 /**
Zhijun He228f4f92014-01-16 17:22:05 -08002576 * <p>AE has been locked.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002577 * @see CaptureResult#CONTROL_AE_STATE
2578 */
2579 public static final int CONTROL_AE_STATE_LOCKED = 3;
2580
2581 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002582 * <p>AE has a good set of control values, but flash
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002583 * needs to be fired for good quality still
Zhijun He228f4f92014-01-16 17:22:05 -08002584 * capture.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002585 * @see CaptureResult#CONTROL_AE_STATE
2586 */
2587 public static final int CONTROL_AE_STATE_FLASH_REQUIRED = 4;
2588
2589 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002590 * <p>AE has been asked to do a precapture sequence
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002591 * and is currently executing it.</p>
2592 * <p>Precapture can be triggered through setting
Zhijun Hefa95b042015-02-09 10:40:49 -08002593 * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} to START. Currently
2594 * active and completed (if it causes camera device internal AE lock) precapture
2595 * metering sequence can be canceled through setting
2596 * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} to CANCEL.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002597 * <p>Once PRECAPTURE completes, AE will transition to CONVERGED
2598 * or FLASH_REQUIRED as appropriate. This is a transient
2599 * state, the camera device may skip reporting this state in
2600 * capture result.</p>
Zhijun He228f4f92014-01-16 17:22:05 -08002601 *
2602 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002603 * @see CaptureResult#CONTROL_AE_STATE
2604 */
2605 public static final int CONTROL_AE_STATE_PRECAPTURE = 5;
2606
2607 //
2608 // Enumeration values for CaptureResult#CONTROL_AF_STATE
2609 //
2610
2611 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002612 * <p>AF is off or has not yet tried to scan/been asked
2613 * to scan.</p>
2614 * <p>When a camera device is opened, it starts in this
2615 * state. This is a transient state, the camera device may
2616 * skip reporting this state in capture
2617 * result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002618 * @see CaptureResult#CONTROL_AF_STATE
2619 */
2620 public static final int CONTROL_AF_STATE_INACTIVE = 0;
2621
2622 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002623 * <p>AF is currently performing an AF scan initiated the
2624 * camera device in a continuous autofocus mode.</p>
2625 * <p>Only used by CONTINUOUS_* AF modes. This is a transient
2626 * state, the camera device may skip reporting this state in
2627 * capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002628 * @see CaptureResult#CONTROL_AF_STATE
2629 */
2630 public static final int CONTROL_AF_STATE_PASSIVE_SCAN = 1;
2631
2632 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002633 * <p>AF currently believes it is in focus, but may
2634 * restart scanning at any time.</p>
2635 * <p>Only used by CONTINUOUS_* AF modes. This is a transient
2636 * state, the camera device may skip reporting this state in
2637 * capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002638 * @see CaptureResult#CONTROL_AF_STATE
2639 */
2640 public static final int CONTROL_AF_STATE_PASSIVE_FOCUSED = 2;
2641
2642 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002643 * <p>AF is performing an AF scan because it was
2644 * triggered by AF trigger.</p>
2645 * <p>Only used by AUTO or MACRO AF modes. This is a transient
2646 * state, the camera device may skip reporting this state in
2647 * capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002648 * @see CaptureResult#CONTROL_AF_STATE
2649 */
2650 public static final int CONTROL_AF_STATE_ACTIVE_SCAN = 3;
2651
2652 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002653 * <p>AF believes it is focused correctly and has locked
2654 * focus.</p>
2655 * <p>This state is reached only after an explicit START AF trigger has been
2656 * sent ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}), when good focus has been obtained.</p>
2657 * <p>The lens will remain stationary until the AF mode ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) is changed or
2658 * a new AF trigger is sent to the camera device ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}).</p>
2659 *
2660 * @see CaptureRequest#CONTROL_AF_MODE
2661 * @see CaptureRequest#CONTROL_AF_TRIGGER
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002662 * @see CaptureResult#CONTROL_AF_STATE
2663 */
2664 public static final int CONTROL_AF_STATE_FOCUSED_LOCKED = 4;
2665
2666 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002667 * <p>AF has failed to focus successfully and has locked
2668 * focus.</p>
2669 * <p>This state is reached only after an explicit START AF trigger has been
2670 * sent ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}), when good focus cannot be obtained.</p>
2671 * <p>The lens will remain stationary until the AF mode ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) is changed or
2672 * a new AF trigger is sent to the camera device ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}).</p>
2673 *
2674 * @see CaptureRequest#CONTROL_AF_MODE
2675 * @see CaptureRequest#CONTROL_AF_TRIGGER
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002676 * @see CaptureResult#CONTROL_AF_STATE
2677 */
2678 public static final int CONTROL_AF_STATE_NOT_FOCUSED_LOCKED = 5;
2679
Eino-Ville Talvala9f880f72013-09-20 17:50:41 -07002680 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002681 * <p>AF finished a passive scan without finding focus,
2682 * and may restart scanning at any time.</p>
2683 * <p>Only used by CONTINUOUS_* AF modes. This is a transient state, the camera
Zhijun He60b19dc2014-02-24 10:19:20 -08002684 * device may skip reporting this state in capture result.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002685 * <p>LEGACY camera devices do not support this state. When a passive
2686 * scan has finished, it will always go to PASSIVE_FOCUSED.</p>
Eino-Ville Talvala9f880f72013-09-20 17:50:41 -07002687 * @see CaptureResult#CONTROL_AF_STATE
2688 */
2689 public static final int CONTROL_AF_STATE_PASSIVE_UNFOCUSED = 6;
2690
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002691 //
2692 // Enumeration values for CaptureResult#CONTROL_AWB_STATE
2693 //
2694
2695 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002696 * <p>AWB is not in auto mode, or has not yet started metering.</p>
2697 * <p>When a camera device is opened, it starts in this
2698 * state. This is a transient state, the camera device may
2699 * skip reporting this state in capture
2700 * result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002701 * @see CaptureResult#CONTROL_AWB_STATE
2702 */
2703 public static final int CONTROL_AWB_STATE_INACTIVE = 0;
2704
2705 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002706 * <p>AWB doesn't yet have a good set of control
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002707 * values for the current scene.</p>
2708 * <p>This is a transient state, the camera device
Zhijun He60b19dc2014-02-24 10:19:20 -08002709 * may skip reporting this state in capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002710 * @see CaptureResult#CONTROL_AWB_STATE
2711 */
2712 public static final int CONTROL_AWB_STATE_SEARCHING = 1;
2713
2714 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002715 * <p>AWB has a good set of control values for the
Zhijun He228f4f92014-01-16 17:22:05 -08002716 * current scene.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002717 * @see CaptureResult#CONTROL_AWB_STATE
2718 */
2719 public static final int CONTROL_AWB_STATE_CONVERGED = 2;
2720
2721 /**
Zhijun He228f4f92014-01-16 17:22:05 -08002722 * <p>AWB has been locked.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002723 * @see CaptureResult#CONTROL_AWB_STATE
2724 */
2725 public static final int CONTROL_AWB_STATE_LOCKED = 3;
2726
2727 //
Chien-Yu Chene8d86eb2017-11-27 15:42:44 -08002728 // Enumeration values for CaptureResult#CONTROL_AF_SCENE_CHANGE
2729 //
2730
2731 /**
Chien-Yu Chen2adc8ec2017-12-07 14:45:50 -08002732 * <p>Scene change is not detected within the AF region(s).</p>
Chien-Yu Chene8d86eb2017-11-27 15:42:44 -08002733 * @see CaptureResult#CONTROL_AF_SCENE_CHANGE
2734 */
2735 public static final int CONTROL_AF_SCENE_CHANGE_NOT_DETECTED = 0;
2736
2737 /**
Chien-Yu Chen2adc8ec2017-12-07 14:45:50 -08002738 * <p>Scene change is detected within the AF region(s).</p>
Chien-Yu Chene8d86eb2017-11-27 15:42:44 -08002739 * @see CaptureResult#CONTROL_AF_SCENE_CHANGE
2740 */
2741 public static final int CONTROL_AF_SCENE_CHANGE_DETECTED = 1;
2742
2743 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002744 // Enumeration values for CaptureResult#FLASH_STATE
2745 //
2746
2747 /**
Zhijun He8dda7272014-03-25 13:49:30 -07002748 * <p>No flash on camera.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002749 * @see CaptureResult#FLASH_STATE
2750 */
2751 public static final int FLASH_STATE_UNAVAILABLE = 0;
2752
2753 /**
Zhijun He8dda7272014-03-25 13:49:30 -07002754 * <p>Flash is charging and cannot be fired.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002755 * @see CaptureResult#FLASH_STATE
2756 */
2757 public static final int FLASH_STATE_CHARGING = 1;
2758
2759 /**
Zhijun He8dda7272014-03-25 13:49:30 -07002760 * <p>Flash is ready to fire.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002761 * @see CaptureResult#FLASH_STATE
2762 */
2763 public static final int FLASH_STATE_READY = 2;
2764
2765 /**
Zhijun He8dda7272014-03-25 13:49:30 -07002766 * <p>Flash fired for this capture.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002767 * @see CaptureResult#FLASH_STATE
2768 */
2769 public static final int FLASH_STATE_FIRED = 3;
2770
Zhijun He8dda7272014-03-25 13:49:30 -07002771 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002772 * <p>Flash partially illuminated this frame.</p>
2773 * <p>This is usually due to the next or previous frame having
2774 * the flash fire, and the flash spilling into this capture
Zhijun He8dda7272014-03-25 13:49:30 -07002775 * due to hardware limitations.</p>
2776 * @see CaptureResult#FLASH_STATE
2777 */
2778 public static final int FLASH_STATE_PARTIAL = 4;
2779
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002780 //
2781 // Enumeration values for CaptureResult#LENS_STATE
2782 //
2783
2784 /**
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002785 * <p>The lens parameters ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
2786 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}) are not changing.</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08002787 *
2788 * @see CaptureRequest#LENS_APERTURE
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002789 * @see CaptureRequest#LENS_FILTER_DENSITY
Zhijun Heca1b73a2014-02-03 12:39:53 -08002790 * @see CaptureRequest#LENS_FOCAL_LENGTH
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002791 * @see CaptureRequest#LENS_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002792 * @see CaptureResult#LENS_STATE
2793 */
2794 public static final int LENS_STATE_STATIONARY = 0;
2795
Igor Murashkin9ea4ae62013-09-11 21:40:11 -07002796 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002797 * <p>One or several of the lens parameters
2798 * ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
2799 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} or {@link CaptureRequest#LENS_APERTURE android.lens.aperture}) is
2800 * currently changing.</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08002801 *
2802 * @see CaptureRequest#LENS_APERTURE
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002803 * @see CaptureRequest#LENS_FILTER_DENSITY
Zhijun Heca1b73a2014-02-03 12:39:53 -08002804 * @see CaptureRequest#LENS_FOCAL_LENGTH
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002805 * @see CaptureRequest#LENS_FOCUS_DISTANCE
Igor Murashkin9ea4ae62013-09-11 21:40:11 -07002806 * @see CaptureResult#LENS_STATE
2807 */
2808 public static final int LENS_STATE_MOVING = 1;
2809
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002810 //
2811 // Enumeration values for CaptureResult#STATISTICS_SCENE_FLICKER
2812 //
2813
2814 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002815 * <p>The camera device does not detect any flickering illumination
2816 * in the current scene.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002817 * @see CaptureResult#STATISTICS_SCENE_FLICKER
2818 */
2819 public static final int STATISTICS_SCENE_FLICKER_NONE = 0;
2820
2821 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002822 * <p>The camera device detects illumination flickering at 50Hz
2823 * in the current scene.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002824 * @see CaptureResult#STATISTICS_SCENE_FLICKER
2825 */
2826 public static final int STATISTICS_SCENE_FLICKER_50HZ = 1;
2827
2828 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002829 * <p>The camera device detects illumination flickering at 60Hz
2830 * in the current scene.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002831 * @see CaptureResult#STATISTICS_SCENE_FLICKER
2832 */
2833 public static final int STATISTICS_SCENE_FLICKER_60HZ = 2;
2834
Igor Murashkin3865a842014-01-17 18:18:39 -08002835 //
2836 // Enumeration values for CaptureResult#SYNC_FRAME_NUMBER
2837 //
2838
2839 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002840 * <p>The current result is not yet fully synchronized to any request.</p>
2841 * <p>Synchronization is in progress, and reading metadata from this
Igor Murashkin3865a842014-01-17 18:18:39 -08002842 * result may include a mix of data that have taken effect since the
2843 * last synchronization time.</p>
2844 * <p>In some future result, within {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} frames,
2845 * this value will update to the actual frame number frame number
2846 * the result is guaranteed to be synchronized to (as long as the
2847 * request settings remain constant).</p>
2848 *
2849 * @see CameraCharacteristics#SYNC_MAX_LATENCY
2850 * @see CaptureResult#SYNC_FRAME_NUMBER
2851 * @hide
2852 */
2853 public static final int SYNC_FRAME_NUMBER_CONVERGING = -1;
2854
2855 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002856 * <p>The current result's synchronization status is unknown.</p>
2857 * <p>The result may have already converged, or it may be in
2858 * progress. Reading from this result may include some mix
2859 * of settings from past requests.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08002860 * <p>After a settings change, the new settings will eventually all
2861 * take effect for the output buffers and results. However, this
2862 * value will not change when that happens. Altering settings
2863 * rapidly may provide outcomes using mixes of settings from recent
2864 * requests.</p>
2865 * <p>This value is intended primarily for backwards compatibility with
2866 * the older camera implementations (for android.hardware.Camera).</p>
2867 * @see CaptureResult#SYNC_FRAME_NUMBER
2868 * @hide
2869 */
2870 public static final int SYNC_FRAME_NUMBER_UNKNOWN = -2;
2871
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002872 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
2873 * End generated code
2874 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
2875
Igor Murashkinb519cc52013-07-02 11:23:44 -07002876}