blob: 5ac13d8a067d16bfdfbd3b325e689768eac71344 [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 Peeva7fea4c2018-09-03 16:37:06 +0100119 getKeys(thisClass, getKeyClass(), this, /*filterTags*/null,
120 /*includeSynthetic*/ true));
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700121 }
122
123 /**
124 * Return a list of all the Key<?> that are declared as a field inside of the class
125 * {@code type}.
126 *
127 * <p>
128 * Optionally, if {@code instance} is not null, then filter out any keys with null values.
129 * </p>
Igor Murashkincc542a42014-06-25 11:52:23 -0700130 *
131 * <p>
132 * Optionally, if {@code filterTags} is not {@code null}, then filter out any keys
133 * whose native {@code tag} is not in {@code filterTags}. The {@code filterTags} array will be
134 * sorted as a side effect.
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100135 * {@code includeSynthetic} Includes public syntenthic fields by default.
Igor Murashkincc542a42014-06-25 11:52:23 -0700136 * </p>
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700137 */
Igor Murashkind6d65152014-05-19 16:31:02 -0700138 /*package*/ @SuppressWarnings("unchecked")
Emilian Peevde62d842017-03-23 19:20:40 +0000139 <TKey> ArrayList<TKey> getKeys(
Igor Murashkind6d65152014-05-19 16:31:02 -0700140 Class<?> type, Class<TKey> keyClass,
Igor Murashkincc542a42014-06-25 11:52:23 -0700141 CameraMetadata<TKey> instance,
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100142 int[] filterTags, boolean includeSynthetic) {
Igor Murashkind6d65152014-05-19 16:31:02 -0700143
Eino-Ville Talvalaa78791f2015-06-01 12:39:54 -0700144 if (DEBUG) Log.v(TAG, "getKeysStatic for " + type);
Igor Murashkind6d65152014-05-19 16:31:02 -0700145
Igor Murashkin696bbee2014-08-07 18:02:51 -0700146 // TotalCaptureResult does not have any of the keys on it, use CaptureResult instead
147 if (type.equals(TotalCaptureResult.class)) {
148 type = CaptureResult.class;
149 }
150
Igor Murashkincc542a42014-06-25 11:52:23 -0700151 if (filterTags != null) {
152 Arrays.sort(filterTags);
153 }
154
Igor Murashkind6d65152014-05-19 16:31:02 -0700155 ArrayList<TKey> keyList = new ArrayList<TKey>();
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700156
157 Field[] fields = type.getDeclaredFields();
158 for (Field field : fields) {
Igor Murashkin03fdb142013-09-30 12:14:58 -0700159 // Filter for Keys that are public
Igor Murashkind6d65152014-05-19 16:31:02 -0700160 if (field.getType().isAssignableFrom(keyClass) &&
Igor Murashkin03fdb142013-09-30 12:14:58 -0700161 (field.getModifiers() & Modifier.PUBLIC) != 0) {
Igor Murashkind6d65152014-05-19 16:31:02 -0700162
163 TKey key;
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700164 try {
Igor Murashkind6d65152014-05-19 16:31:02 -0700165 key = (TKey) field.get(instance);
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700166 } catch (IllegalAccessException e) {
167 throw new AssertionError("Can't get IllegalAccessException", e);
168 } catch (IllegalArgumentException e) {
169 throw new AssertionError("Can't get IllegalArgumentException", e);
170 }
Igor Murashkind6d65152014-05-19 16:31:02 -0700171
172 if (instance == null || instance.getProtected(key) != null) {
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100173 if (shouldKeyBeAdded(key, field, filterTags, includeSynthetic)) {
Igor Murashkincc542a42014-06-25 11:52:23 -0700174 keyList.add(key);
175
Eino-Ville Talvalaa78791f2015-06-01 12:39:54 -0700176 if (DEBUG) {
Igor Murashkincc542a42014-06-25 11:52:23 -0700177 Log.v(TAG, "getKeysStatic - key was added - " + key);
178 }
Eino-Ville Talvalaa78791f2015-06-01 12:39:54 -0700179 } else if (DEBUG) {
Igor Murashkincc542a42014-06-25 11:52:23 -0700180 Log.v(TAG, "getKeysStatic - key was filtered - " + key);
181 }
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700182 }
183 }
184 }
185
Emilian Peevde62d842017-03-23 19:20:40 +0000186 if (null == mNativeInstance) {
187 return keyList;
188 }
189
190 ArrayList<TKey> vendorKeys = mNativeInstance.getAllVendorKeys(keyClass);
Ruben Brunkc620eb72015-07-29 18:19:11 -0700191
192 if (vendorKeys != null) {
193 for (TKey k : vendorKeys) {
194 String keyName;
Emilian Peevde62d842017-03-23 19:20:40 +0000195 long vendorId;
Ruben Brunkc620eb72015-07-29 18:19:11 -0700196 if (k instanceof CaptureRequest.Key<?>) {
197 keyName = ((CaptureRequest.Key<?>) k).getName();
Emilian Peevde62d842017-03-23 19:20:40 +0000198 vendorId = ((CaptureRequest.Key<?>) k).getVendorId();
Ruben Brunkc620eb72015-07-29 18:19:11 -0700199 } else if (k instanceof CaptureResult.Key<?>) {
200 keyName = ((CaptureResult.Key<?>) k).getName();
Emilian Peevde62d842017-03-23 19:20:40 +0000201 vendorId = ((CaptureResult.Key<?>) k).getVendorId();
Ruben Brunkc620eb72015-07-29 18:19:11 -0700202 } else if (k instanceof CameraCharacteristics.Key<?>) {
203 keyName = ((CameraCharacteristics.Key<?>) k).getName();
Emilian Peevde62d842017-03-23 19:20:40 +0000204 vendorId = ((CameraCharacteristics.Key<?>) k).getVendorId();
Ruben Brunkc620eb72015-07-29 18:19:11 -0700205 } else {
206 continue;
207 }
208
209 if (filterTags == null || Arrays.binarySearch(filterTags,
Emilian Peevde62d842017-03-23 19:20:40 +0000210 CameraMetadataNative.getTag(keyName, vendorId)) >= 0) {
Ruben Brunkc620eb72015-07-29 18:19:11 -0700211 keyList.add(k);
212 }
213 }
214 }
215
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700216 return keyList;
217 }
218
Igor Murashkincc542a42014-06-25 11:52:23 -0700219 @SuppressWarnings("rawtypes")
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100220 private static <TKey> boolean shouldKeyBeAdded(TKey key, Field field, int[] filterTags,
221 boolean includeSynthetic) {
Igor Murashkincc542a42014-06-25 11:52:23 -0700222 if (key == null) {
223 throw new NullPointerException("key must not be null");
224 }
225
226 CameraMetadataNative.Key nativeKey;
227
228 /*
229 * Get the native key from the public api key
230 */
231 if (key instanceof CameraCharacteristics.Key) {
232 nativeKey = ((CameraCharacteristics.Key)key).getNativeKey();
233 } else if (key instanceof CaptureResult.Key) {
234 nativeKey = ((CaptureResult.Key)key).getNativeKey();
235 } else if (key instanceof CaptureRequest.Key) {
236 nativeKey = ((CaptureRequest.Key)key).getNativeKey();
237 } else {
238 // Reject fields that aren't a key
239 throw new IllegalArgumentException("key type must be that of a metadata key");
240 }
241
Igor Murashkin6c76f582014-07-15 17:19:49 -0700242 if (field.getAnnotation(PublicKey.class) == null) {
243 // Never expose @hide keys up to the API user
244 return false;
245 }
246
Igor Murashkincc542a42014-06-25 11:52:23 -0700247 // No filtering necessary
248 if (filterTags == null) {
249 return true;
250 }
251
Igor Murashkin6c76f582014-07-15 17:19:49 -0700252 if (field.getAnnotation(SyntheticKey.class) != null) {
253 // This key is synthetic, so calling #getTag will throw IAE
254
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100255 return includeSynthetic;
Igor Murashkin6c76f582014-07-15 17:19:49 -0700256 }
257
258 /*
259 * Regular key: look up it's native tag and see if it's in filterTags
260 */
261
Igor Murashkincc542a42014-06-25 11:52:23 -0700262 int keyTag = nativeKey.getTag();
263
264 // non-negative result is returned iff the value is in the array
265 return Arrays.binarySearch(filterTags, keyTag) >= 0;
266 }
267
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700268 /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
269 * The enum values below this point are generated from metadata
270 * definitions in /system/media/camera/docs. Do not modify by hand or
271 * modify the comment blocks at the start or end.
272 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
273
274 //
Zhijun Heff413932014-02-07 15:44:30 -0800275 // Enumeration values for CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
276 //
277
278 /**
279 * <p>The lens focus distance is not accurate, and the units used for
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700280 * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} do not correspond to any physical units.</p>
281 * <p>Setting the lens to the same focus distance on separate occasions may
Zhijun Heff413932014-02-07 15:44:30 -0800282 * result in a different real focus distance, depending on factors such
283 * as the orientation of the device, the age of the focusing mechanism,
284 * and the device temperature. The focus distance value will still be
285 * in the range of <code>[0, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code>, where 0
286 * represents the farthest focus.</p>
287 *
288 * @see CaptureRequest#LENS_FOCUS_DISTANCE
289 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
290 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
291 */
292 public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED = 0;
293
294 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700295 * <p>The lens focus distance is measured in diopters.</p>
296 * <p>However, setting the lens to the same focus distance
297 * on separate occasions may result in a different real
298 * focus distance, depending on factors such as the
299 * orientation of the device, the age of the focusing
300 * mechanism, and the device temperature.</p>
Zhijun Heff413932014-02-07 15:44:30 -0800301 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
302 */
303 public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE = 1;
304
305 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700306 * <p>The lens focus distance is measured in diopters, and
307 * is calibrated.</p>
308 * <p>The lens mechanism is calibrated so that setting the
309 * same focus distance is repeatable on multiple
310 * occasions with good accuracy, and the focus distance
311 * corresponds to the real physical distance to the plane
312 * of best focus.</p>
Zhijun Heff413932014-02-07 15:44:30 -0800313 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
314 */
315 public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED = 2;
316
317 //
Igor Murashkin68f40062013-09-10 12:15:54 -0700318 // Enumeration values for CameraCharacteristics#LENS_FACING
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700319 //
320
321 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700322 * <p>The camera device faces the same direction as the device's screen.</p>
Igor Murashkin68f40062013-09-10 12:15:54 -0700323 * @see CameraCharacteristics#LENS_FACING
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700324 */
325 public static final int LENS_FACING_FRONT = 0;
326
327 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700328 * <p>The camera device faces the opposite direction as the device's screen.</p>
Igor Murashkin68f40062013-09-10 12:15:54 -0700329 * @see CameraCharacteristics#LENS_FACING
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700330 */
331 public static final int LENS_FACING_BACK = 1;
332
Zhijun He503e8152015-01-12 15:16:56 -0800333 /**
334 * <p>The camera device is an external camera, and has no fixed facing relative to the
335 * device's screen.</p>
336 * @see CameraCharacteristics#LENS_FACING
337 */
338 public static final int LENS_FACING_EXTERNAL = 2;
339
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700340 //
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -0800341 // Enumeration values for CameraCharacteristics#LENS_POSE_REFERENCE
342 //
343
344 /**
345 * <p>The value of {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation} is relative to the optical center of
346 * the largest camera device facing the same direction as this camera.</p>
Eino-Ville Talvala601e0f62018-02-05 16:25:40 -0800347 * <p>This is the default value for API levels before Android P.</p>
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -0800348 *
349 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
350 * @see CameraCharacteristics#LENS_POSE_REFERENCE
351 */
352 public static final int LENS_POSE_REFERENCE_PRIMARY_CAMERA = 0;
353
354 /**
355 * <p>The value of {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation} is relative to the position of the
356 * primary gyroscope of this Android device.</p>
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -0800357 *
358 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
359 * @see CameraCharacteristics#LENS_POSE_REFERENCE
360 */
361 public static final int LENS_POSE_REFERENCE_GYROSCOPE = 1;
362
363 //
Igor Murashkine46c0da2014-02-07 18:34:37 -0800364 // Enumeration values for CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
365 //
366
367 /**
368 * <p>The minimal set of capabilities that every camera
369 * device (regardless of {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel})
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700370 * supports.</p>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700371 * <p>This capability is listed by all normal devices, and
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700372 * indicates that the camera device has a feature set
373 * that's comparable to the baseline requirements for the
374 * older android.hardware.Camera API.</p>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700375 * <p>Devices with the DEPTH_OUTPUT capability might not list this
376 * capability, indicating that they support only depth measurement,
377 * not standard color output.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800378 *
379 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
380 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
381 */
382 public static final int REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE = 0;
383
384 /**
Igor Murashkine46c0da2014-02-07 18:34:37 -0800385 * <p>The camera device can be manually controlled (3A algorithms such
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700386 * as auto-exposure, and auto-focus can be bypassed).
Zhijun He50f72432014-05-28 13:52:04 -0700387 * The camera device supports basic manual control of the sensor image
388 * acquisition related stages. This means the following controls are
389 * guaranteed to be supported:</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800390 * <ul>
Zhijun He50f72432014-05-28 13:52:04 -0700391 * <li>Manual frame duration control<ul>
392 * <li>{@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}</li>
393 * <li>{@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li>
Zhijun He50f72432014-05-28 13:52:04 -0700394 * </ul>
395 * </li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800396 * <li>Manual exposure control<ul>
397 * <li>{@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</li>
398 * <li>{@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
399 * </ul>
400 * </li>
401 * <li>Manual sensitivity control<ul>
402 * <li>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</li>
403 * <li>{@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800404 * </ul>
405 * </li>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700406 * <li>Manual lens control (if the lens is adjustable)<ul>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800407 * <li>android.lens.*</li>
408 * </ul>
409 * </li>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700410 * <li>Manual flash control (if a flash unit is present)<ul>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800411 * <li>android.flash.*</li>
412 * </ul>
413 * </li>
414 * <li>Manual black level locking<ul>
415 * <li>{@link CaptureRequest#BLACK_LEVEL_LOCK android.blackLevel.lock}</li>
416 * </ul>
417 * </li>
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700418 * <li>Auto exposure lock<ul>
419 * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li>
420 * </ul>
421 * </li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800422 * </ul>
423 * <p>If any of the above 3A algorithms are enabled, then the camera
424 * device will accurately report the values applied by 3A in the
425 * result.</p>
Zhijun He50f72432014-05-28 13:52:04 -0700426 * <p>A given camera device may also support additional manual sensor controls,
427 * but this capability only covers the above list of controls.</p>
Ruben Brunk3e4fed22014-06-18 17:08:42 -0700428 * <p>If this is supported, {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} will
429 * additionally return a min frame duration that is greater than
430 * zero for each supported size-format combination.</p>
Shuzhen Wang61aaa322018-11-19 16:04:57 -0800431 * <p>For camera devices with LOGICAL_MULTI_CAMERA capability, when the underlying active
432 * physical camera switches, exposureTime, sensitivity, and lens properties may change
433 * even if AE/AF is locked. However, the overall auto exposure and auto focus experience
434 * for users will be consistent. Refer to LOGICAL_MULTI_CAMERA capability for details.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800435 *
436 * @see CaptureRequest#BLACK_LEVEL_LOCK
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700437 * @see CaptureRequest#CONTROL_AE_LOCK
Zhijun He50f72432014-05-28 13:52:04 -0700438 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
Igor Murashkine46c0da2014-02-07 18:34:37 -0800439 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Zhijun He50f72432014-05-28 13:52:04 -0700440 * @see CaptureRequest#SENSOR_FRAME_DURATION
Igor Murashkine46c0da2014-02-07 18:34:37 -0800441 * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
Zhijun He50f72432014-05-28 13:52:04 -0700442 * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
Igor Murashkine46c0da2014-02-07 18:34:37 -0800443 * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
444 * @see CaptureRequest#SENSOR_SENSITIVITY
445 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
446 */
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700447 public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR = 1;
Igor Murashkine46c0da2014-02-07 18:34:37 -0800448
449 /**
Zhijun He50f72432014-05-28 13:52:04 -0700450 * <p>The camera device post-processing stages can be manually controlled.
451 * The camera device supports basic manual control of the image post-processing
452 * stages. This means the following controls are guaranteed to be supported:</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800453 * <ul>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -0800454 * <li>
455 * <p>Manual tonemap control</p>
456 * <ul>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -0700457 * <li>{@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800458 * <li>{@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</li>
459 * <li>{@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</li>
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -0700460 * <li>{@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma}</li>
461 * <li>{@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve}</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800462 * </ul>
463 * </li>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -0800464 * <li>
465 * <p>Manual white balance control</p>
466 * <ul>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800467 * <li>{@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}</li>
468 * <li>{@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}</li>
469 * </ul>
470 * </li>
Zhijun He28288ca2014-06-25 15:49:13 -0700471 * <li>Manual lens shading map control<ul>
472 * <li>{@link CaptureRequest#SHADING_MODE android.shading.mode}</li>
473 * <li>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode}</li>
Ruben Brunk57493682014-05-27 18:58:08 -0700474 * <li>android.statistics.lensShadingMap</li>
475 * <li>android.lens.info.shadingMapSize</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800476 * </ul>
477 * </li>
Zhijun Hea05e59d2014-07-08 18:27:47 -0700478 * <li>Manual aberration correction control (if aberration correction is supported)<ul>
Zhijun He9e4e4392014-08-18 11:12:32 -0700479 * <li>{@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}</li>
480 * <li>{@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES android.colorCorrection.availableAberrationModes}</li>
Zhijun Hea05e59d2014-07-08 18:27:47 -0700481 * </ul>
482 * </li>
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700483 * <li>Auto white balance lock<ul>
484 * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li>
485 * </ul>
486 * </li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800487 * </ul>
488 * <p>If auto white balance is enabled, then the camera device
489 * will accurately report the values applied by AWB in the result.</p>
Zhijun He50f72432014-05-28 13:52:04 -0700490 * <p>A given camera device may also support additional post-processing
491 * controls, but this capability only covers the above list of controls.</p>
Shuzhen Wang61aaa322018-11-19 16:04:57 -0800492 * <p>For camera devices with LOGICAL_MULTI_CAMERA capability, when underlying active
493 * physical camera switches, tonemap, white balance, and shading map may change even if
494 * awb is locked. However, the overall post-processing experience for users will be
495 * consistent. Refer to LOGICAL_MULTI_CAMERA capability for details.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800496 *
Zhijun He9e4e4392014-08-18 11:12:32 -0700497 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
498 * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
Igor Murashkine46c0da2014-02-07 18:34:37 -0800499 * @see CaptureRequest#COLOR_CORRECTION_GAINS
500 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700501 * @see CaptureRequest#CONTROL_AWB_LOCK
Zhijun He28288ca2014-06-25 15:49:13 -0700502 * @see CaptureRequest#SHADING_MODE
503 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -0700504 * @see CaptureRequest#TONEMAP_CURVE
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -0700505 * @see CaptureRequest#TONEMAP_GAMMA
Igor Murashkine46c0da2014-02-07 18:34:37 -0800506 * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
507 * @see CaptureRequest#TONEMAP_MODE
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -0700508 * @see CaptureRequest#TONEMAP_PRESET_CURVE
Igor Murashkine46c0da2014-02-07 18:34:37 -0800509 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
510 */
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700511 public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING = 2;
512
513 /**
Eino-Ville Talvala611fece2014-07-10 17:29:38 -0700514 * <p>The camera device supports outputting RAW buffers and
515 * metadata for interpreting them.</p>
516 * <p>Devices supporting the RAW capability allow both for
517 * saving DNG files, and for direct application processing of
518 * raw sensor images.</p>
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700519 * <ul>
520 * <li>RAW_SENSOR is supported as an output format.</li>
521 * <li>The maximum available resolution for RAW_SENSOR streams
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700522 * will match either the value in
523 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize} or
Eino-Ville Talvalad8407272015-11-08 18:27:20 -0800524 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.</li>
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700525 * <li>All DNG-related optional metadata entries are provided
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700526 * by the camera device.</li>
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700527 * </ul>
528 *
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700529 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
Eino-Ville Talvalad8407272015-11-08 18:27:20 -0800530 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700531 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
532 */
Eino-Ville Talvala611fece2014-07-10 17:29:38 -0700533 public static final int REQUEST_AVAILABLE_CAPABILITIES_RAW = 3;
Igor Murashkine46c0da2014-02-07 18:34:37 -0800534
535 /**
Zhijun He0e99c222015-01-29 15:26:05 -0800536 * <p>The camera device supports the Zero Shutter Lag reprocessing use case.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800537 * <ul>
Zhijun He0e99c222015-01-29 15:26:05 -0800538 * <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 -0700539 * <li>{@link android.graphics.ImageFormat#PRIVATE } is supported as an output/input format,
540 * that is, {@link android.graphics.ImageFormat#PRIVATE } is included in the lists of
541 * formats returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats } and {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats }.</li>
542 * <li>{@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput }
543 * returns non empty int[] for each supported input format returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }.</li>
544 * <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>
545 * <li>Using {@link android.graphics.ImageFormat#PRIVATE } does not cause a frame rate drop
546 * relative to the sensor's maximum capture rate (at that resolution).</li>
547 * <li>{@link android.graphics.ImageFormat#PRIVATE } will be reprocessable into both
548 * {@link android.graphics.ImageFormat#YUV_420_888 } and
549 * {@link android.graphics.ImageFormat#JPEG } formats.</li>
Shuzhen Wangec5e8d22018-09-28 09:28:48 -0700550 * <li>For a MONOCHROME camera supporting Y8 format, {@link android.graphics.ImageFormat#PRIVATE } will be reprocessable into
551 * {@link android.graphics.ImageFormat#Y8 }.</li>
Chien-Yu Chen8062d312015-05-12 14:24:10 -0700552 * <li>The maximum available resolution for PRIVATE streams
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700553 * (both input/output) will match the maximum available
554 * resolution of JPEG streams.</li>
Zhijun He513f7c32015-04-24 18:23:54 -0700555 * <li>Static metadata {@link CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL android.reprocess.maxCaptureStall}.</li>
Zhijun He0e99c222015-01-29 15:26:05 -0800556 * <li>Only below controls are effective for reprocessing requests and
557 * will be present in capture results, other controls in reprocess
558 * requests will be ignored by the camera device.<ul>
559 * <li>android.jpeg.*</li>
560 * <li>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</li>
561 * <li>{@link CaptureRequest#EDGE_MODE android.edge.mode}</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800562 * </ul>
Zhijun He0e99c222015-01-29 15:26:05 -0800563 * </li>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700564 * <li>{@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes} and
565 * {@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 -0800566 * </ul>
567 *
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700568 * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES
Zhijun He0e99c222015-01-29 15:26:05 -0800569 * @see CaptureRequest#EDGE_MODE
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700570 * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
Zhijun He0e99c222015-01-29 15:26:05 -0800571 * @see CaptureRequest#NOISE_REDUCTION_MODE
Zhijun He513f7c32015-04-24 18:23:54 -0700572 * @see CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL
Zhijun He0e99c222015-01-29 15:26:05 -0800573 * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
Igor Murashkine46c0da2014-02-07 18:34:37 -0800574 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
575 */
Chien-Yu Chen8062d312015-05-12 14:24:10 -0700576 public static final int REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING = 4;
Igor Murashkine46c0da2014-02-07 18:34:37 -0800577
Ruben Brunk0c22e692014-11-11 12:00:34 -0800578 /**
579 * <p>The camera device supports accurately reporting the sensor settings for many of
580 * the sensor controls while the built-in 3A algorithm is running. This allows
581 * reporting of sensor settings even when these settings cannot be manually changed.</p>
582 * <p>The values reported for the following controls are guaranteed to be available
583 * in the CaptureResult, including when 3A is enabled:</p>
584 * <ul>
585 * <li>Exposure control<ul>
586 * <li>{@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</li>
587 * </ul>
588 * </li>
589 * <li>Sensitivity control<ul>
590 * <li>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</li>
591 * </ul>
592 * </li>
593 * <li>Lens controls (if the lens is adjustable)<ul>
594 * <li>{@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}</li>
595 * <li>{@link CaptureRequest#LENS_APERTURE android.lens.aperture}</li>
596 * </ul>
597 * </li>
598 * </ul>
599 * <p>This capability is a subset of the MANUAL_SENSOR control capability, and will
600 * always be included if the MANUAL_SENSOR capability is available.</p>
601 *
602 * @see CaptureRequest#LENS_APERTURE
603 * @see CaptureRequest#LENS_FOCUS_DISTANCE
604 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
605 * @see CaptureRequest#SENSOR_SENSITIVITY
606 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
607 */
608 public static final int REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS = 5;
609
Eino-Ville Talvala126a7462014-11-04 16:31:01 -0800610 /**
Eino-Ville Talvala0819c752015-06-17 11:34:41 -0700611 * <p>The camera device supports capturing high-resolution images at &gt;= 20 frames per
Shuzhen Wang062c22b2019-04-09 23:05:23 -0700612 * second, in at least the uncompressed YUV format, when post-processing settings are
613 * set to FAST. Additionally, all image resolutions less than 24 megapixels can be
614 * captured at &gt;= 10 frames per second. Here, 'high resolution' means at least 8
615 * megapixels, or the maximum resolution of the device, whichever is smaller.</p>
Eino-Ville Talvala0819c752015-06-17 11:34:41 -0700616 * <p>More specifically, this means that a size matching the camera device's active array
617 * 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 },
618 * with a minimum frame duration for that format and size of either &lt;= 1/20 s, or
Shuzhen Wang062c22b2019-04-09 23:05:23 -0700619 * &lt;= 1/10 s if the image size is less than 24 megapixels, respectively; and
620 * the {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges} entry lists at least one FPS range
621 * where the minimum FPS is &gt;= 1 / minimumFrameDuration for the maximum-size
622 * YUV_420_888 format. If that maximum size is listed in {@link android.hardware.camera2.params.StreamConfigurationMap#getHighResolutionOutputSizes },
Eino-Ville Talvala0819c752015-06-17 11:34:41 -0700623 * then the list of resolutions for YUV_420_888 from {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } contains at
624 * least one resolution &gt;= 8 megapixels, with a minimum frame duration of &lt;= 1/20
625 * s.</p>
Shuzhen Wangec5e8d22018-09-28 09:28:48 -0700626 * <p>If the device supports the {@link android.graphics.ImageFormat#RAW10 }, {@link android.graphics.ImageFormat#RAW12 }, {@link android.graphics.ImageFormat#Y8 }, then those can also be
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800627 * captured at the same rate as the maximum-size YUV_420_888 resolution is.</p>
Eino-Ville Talvala0819c752015-06-17 11:34:41 -0700628 * <p>If the device supports the PRIVATE_REPROCESSING capability, then the same guarantees
629 * as for the YUV_420_888 format also apply to the {@link android.graphics.ImageFormat#PRIVATE } format.</p>
630 * <p>In addition, the {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} field is guaranted to have a value between 0
631 * and 4, inclusive. {@link CameraCharacteristics#CONTROL_AE_LOCK_AVAILABLE android.control.aeLockAvailable} and {@link CameraCharacteristics#CONTROL_AWB_LOCK_AVAILABLE android.control.awbLockAvailable}
632 * are also guaranteed to be <code>true</code> so burst capture with these two locks ON yields
633 * consistent image output.</p>
Eino-Ville Talvala126a7462014-11-04 16:31:01 -0800634 *
Eino-Ville Talvala8d709f32014-11-17 11:28:38 -0800635 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700636 * @see CameraCharacteristics#CONTROL_AE_LOCK_AVAILABLE
637 * @see CameraCharacteristics#CONTROL_AWB_LOCK_AVAILABLE
Eino-Ville Talvala126a7462014-11-04 16:31:01 -0800638 * @see CameraCharacteristics#SYNC_MAX_LATENCY
639 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
640 */
641 public static final int REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE = 6;
642
Zhijun He0e99c222015-01-29 15:26:05 -0800643 /**
Chien-Yu Chen0a551f12015-04-03 17:57:35 -0700644 * <p>The camera device supports the YUV_420_888 reprocessing use case, similar as
Chien-Yu Chen8062d312015-05-12 14:24:10 -0700645 * PRIVATE_REPROCESSING, This capability requires the camera device to support the
Zhijun He0e99c222015-01-29 15:26:05 -0800646 * following:</p>
647 * <ul>
648 * <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 -0800649 * <li>{@link android.graphics.ImageFormat#YUV_420_888 } is supported as an output/input
650 * 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 -0700651 * <li>{@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput }
652 * returns non-empty int[] for each supported input format returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }.</li>
653 * <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 -0800654 * <li>Using {@link android.graphics.ImageFormat#YUV_420_888 } does not cause a frame rate
655 * drop relative to the sensor's maximum capture rate (at that resolution).</li>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700656 * <li>{@link android.graphics.ImageFormat#YUV_420_888 } will be reprocessable into both
657 * {@link android.graphics.ImageFormat#YUV_420_888 } and {@link android.graphics.ImageFormat#JPEG } formats.</li>
658 * <li>The maximum available resolution for {@link android.graphics.ImageFormat#YUV_420_888 } streams (both input/output) will match the
659 * maximum available resolution of {@link android.graphics.ImageFormat#JPEG } streams.</li>
Shuzhen Wangec5e8d22018-09-28 09:28:48 -0700660 * <li>For a MONOCHROME camera with Y8 format support, all the requirements mentioned
661 * above for YUV_420_888 apply for Y8 format as well.</li>
Zhijun He513f7c32015-04-24 18:23:54 -0700662 * <li>Static metadata {@link CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL android.reprocess.maxCaptureStall}.</li>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700663 * <li>Only the below controls are effective for reprocessing requests and will be present
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800664 * in capture results. The reprocess requests are from the original capture results
665 * that are associated with the intermediate {@link android.graphics.ImageFormat#YUV_420_888 } output buffers. All other controls in the
666 * reprocess requests will be ignored by the camera device.<ul>
Zhijun He0e99c222015-01-29 15:26:05 -0800667 * <li>android.jpeg.*</li>
668 * <li>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</li>
669 * <li>{@link CaptureRequest#EDGE_MODE android.edge.mode}</li>
670 * <li>{@link CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR android.reprocess.effectiveExposureFactor}</li>
671 * </ul>
672 * </li>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700673 * <li>{@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes} and
674 * {@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 -0800675 * </ul>
676 *
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700677 * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES
Zhijun He0e99c222015-01-29 15:26:05 -0800678 * @see CaptureRequest#EDGE_MODE
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700679 * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
Zhijun He0e99c222015-01-29 15:26:05 -0800680 * @see CaptureRequest#NOISE_REDUCTION_MODE
681 * @see CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR
Zhijun He513f7c32015-04-24 18:23:54 -0700682 * @see CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL
Zhijun He0e99c222015-01-29 15:26:05 -0800683 * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
684 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
685 */
686 public static final int REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING = 7;
687
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700688 /**
689 * <p>The camera device can produce depth measurements from its field of view.</p>
690 * <p>This capability requires the camera device to support the following:</p>
691 * <ul>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800692 * <li>{@link android.graphics.ImageFormat#DEPTH16 } is supported as
693 * an output format.</li>
694 * <li>{@link android.graphics.ImageFormat#DEPTH_POINT_CLOUD } is
695 * optionally supported as an output format.</li>
696 * <li>This camera device, and all camera devices with the same {@link CameraCharacteristics#LENS_FACING android.lens.facing}, will
697 * list the following calibration metadata entries in both {@link android.hardware.camera2.CameraCharacteristics }
698 * and {@link android.hardware.camera2.CaptureResult }:<ul>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700699 * <li>{@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}</li>
700 * <li>{@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}</li>
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -0700701 * <li>{@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}</li>
Eino-Ville Talvala915f5042018-03-13 19:08:01 -0700702 * <li>{@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}</li>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700703 * </ul>
704 * </li>
705 * <li>The {@link CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE android.depth.depthIsExclusive} entry is listed by this device.</li>
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -0800706 * <li>As of Android P, the {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} entry is listed by this device.</li>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700707 * <li>A LIMITED camera with only the DEPTH_OUTPUT capability does not have to support
Shuzhen Wangec5e8d22018-09-28 09:28:48 -0700708 * normal YUV_420_888, Y8, JPEG, and PRIV-format outputs. It only has to support the
709 * DEPTH16 format.</li>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700710 * </ul>
711 * <p>Generally, depth output operates at a slower frame rate than standard color capture,
712 * so the DEPTH16 and DEPTH_POINT_CLOUD formats will commonly have a stall duration that
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800713 * should be accounted for (see {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration }).
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700714 * On a device that supports both depth and color-based output, to enable smooth preview,
715 * using a repeating burst is recommended, where a depth-output target is only included
716 * once every N frames, where N is the ratio between preview output rate and depth output
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700717 * rate, including depth stall time.</p>
718 *
719 * @see CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE
Eino-Ville Talvala915f5042018-03-13 19:08:01 -0700720 * @see CameraCharacteristics#LENS_DISTORTION
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700721 * @see CameraCharacteristics#LENS_FACING
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -0700722 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -0800723 * @see CameraCharacteristics#LENS_POSE_REFERENCE
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700724 * @see CameraCharacteristics#LENS_POSE_ROTATION
725 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
726 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
727 */
728 public static final int REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT = 8;
729
Zhijun Hefab663e2015-05-26 19:46:31 -0700730 /**
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800731 * <p>The device supports constrained high speed video recording (frame rate &gt;=120fps) use
732 * case. The camera device will support high speed capture session created by {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }, which
733 * only accepts high speed request lists created by {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList }.</p>
734 * <p>A camera device can still support high speed video streaming by advertising the high
735 * speed FPS ranges in {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges}. For this case, all
736 * normal capture request per frame control and synchronization requirements will apply
737 * to the high speed fps ranges, the same as all other fps ranges. This capability
738 * describes the capability of a specialized operating mode with many limitations (see
739 * below), which is only targeted at high speed video recording.</p>
740 * <p>The supported high speed video sizes and fps ranges are specified in {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges }.
741 * To get desired output frame rates, the application is only allowed to select video
742 * size and FPS range combinations provided by {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes }. The
743 * fps range can be controlled via {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}.</p>
Zhijun Hefab663e2015-05-26 19:46:31 -0700744 * <p>In this capability, the camera device will override aeMode, awbMode, and afMode to
Zhijun Heee2ebde2015-06-16 19:58:11 -0700745 * ON, AUTO, and CONTINUOUS_VIDEO, respectively. All post-processing block mode
Zhijun Hefab663e2015-05-26 19:46:31 -0700746 * controls will be overridden to be FAST. Therefore, no manual control of capture
747 * and post-processing parameters is possible. All other controls operate the
748 * same as when {@link CaptureRequest#CONTROL_MODE android.control.mode} == AUTO. This means that all other
749 * android.control.* fields continue to work, such as</p>
750 * <ul>
751 * <li>{@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}</li>
752 * <li>{@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}</li>
753 * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li>
754 * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li>
755 * <li>{@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</li>
756 * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li>
757 * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li>
758 * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li>
759 * <li>{@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}</li>
760 * <li>{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}</li>
761 * </ul>
762 * <p>Outside of android.control.*, the following controls will work:</p>
763 * <ul>
764 * <li>{@link CaptureRequest#FLASH_MODE android.flash.mode} (TORCH mode only, automatic flash for still capture will not
765 * work since aeMode is ON)</li>
766 * <li>{@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} (if it is supported)</li>
767 * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li>
768 * <li>{@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} (if it is supported)</li>
769 * </ul>
770 * <p>For high speed recording use case, the actual maximum supported frame rate may
771 * be lower than what camera can output, depending on the destination Surfaces for
772 * the image data. For example, if the destination surface is from video encoder,
773 * the application need check if the video encoder is capable of supporting the
774 * high frame rate for a given video size, or it will end up with lower recording
775 * frame rate. If the destination surface is from preview window, the actual preview frame
776 * rate will be bounded by the screen refresh rate.</p>
777 * <p>The camera device will only support up to 2 high speed simultaneous output surfaces
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800778 * (preview and recording surfaces) in this mode. Above controls will be effective only
779 * if all of below conditions are true:</p>
Zhijun Hefab663e2015-05-26 19:46:31 -0700780 * <ul>
781 * <li>The application creates a camera capture session with no more than 2 surfaces via
782 * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }. The
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800783 * targeted surfaces must be preview surface (either from {@link android.view.SurfaceView } or {@link android.graphics.SurfaceTexture }) or recording
784 * surface(either from {@link android.media.MediaRecorder#getSurface } or {@link android.media.MediaCodec#createInputSurface }).</li>
Zhijun Hefab663e2015-05-26 19:46:31 -0700785 * <li>The stream sizes are selected from the sizes reported by
786 * {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes }.</li>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800787 * <li>The FPS ranges are selected from {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges }.</li>
Zhijun Hefab663e2015-05-26 19:46:31 -0700788 * </ul>
Eino-Ville Talvala639fffe2015-06-30 10:34:48 -0700789 * <p>When above conditions are NOT satistied,
Zhijun Hefab663e2015-05-26 19:46:31 -0700790 * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }
Eino-Ville Talvala639fffe2015-06-30 10:34:48 -0700791 * will fail.</p>
Zhijun Hefab663e2015-05-26 19:46:31 -0700792 * <p>Switching to a FPS range that has different maximum FPS may trigger some camera device
793 * reconfigurations, which may introduce extra latency. It is recommended that
794 * the application avoids unnecessary maximum target FPS changes as much as possible
795 * during high speed streaming.</p>
796 *
797 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
798 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
799 * @see CaptureRequest#CONTROL_AE_LOCK
800 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
801 * @see CaptureRequest#CONTROL_AE_REGIONS
802 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
803 * @see CaptureRequest#CONTROL_AF_REGIONS
804 * @see CaptureRequest#CONTROL_AF_TRIGGER
805 * @see CaptureRequest#CONTROL_AWB_LOCK
806 * @see CaptureRequest#CONTROL_AWB_REGIONS
807 * @see CaptureRequest#CONTROL_EFFECT_MODE
808 * @see CaptureRequest#CONTROL_MODE
809 * @see CaptureRequest#FLASH_MODE
810 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
811 * @see CaptureRequest#SCALER_CROP_REGION
812 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
813 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
814 */
815 public static final int REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO = 9;
816
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -0800817 /**
Eino-Ville Talvala601e0f62018-02-05 16:25:40 -0800818 * <p>The camera device supports the MOTION_TRACKING value for
819 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent}, which limits maximum exposure time to 20 ms.</p>
820 * <p>This limits the motion blur of capture images, resulting in better image tracking
821 * results for use cases such as image stabilization or augmented reality.</p>
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -0800822 *
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -0800823 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -0800824 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
825 */
826 public static final int REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING = 10;
827
Shuzhen Wang23d29382017-11-26 17:24:56 -0800828 /**
Shuzhen Wang2da73f42019-03-12 15:16:06 -0700829 * <p>The camera device is a logical camera backed by two or more physical cameras.</p>
830 * <p>In API level 28, the physical cameras must also be exposed to the application via
831 * {@link android.hardware.camera2.CameraManager#getCameraIdList }.</p>
832 * <p>Starting from API level 29, some or all physical cameras may not be independently
833 * exposed to the application, in which case the physical camera IDs will not be
834 * available in {@link android.hardware.camera2.CameraManager#getCameraIdList }. But the
835 * application can still query the physical cameras' characteristics by calling
836 * {@link android.hardware.camera2.CameraManager#getCameraCharacteristics }. Additionally,
837 * if a physical camera is hidden from camera ID list, the mandatory stream combinations
838 * for that physical camera must be supported through the logical camera using physical
839 * streams.</p>
840 * <p>Combinations of logical and physical streams, or physical streams from different
841 * physical cameras are not guaranteed. However, if the camera device supports
842 * {@link CameraDevice#isSessionConfigurationSupported },
843 * application must be able to query whether a stream combination involving physical
844 * streams is supported by calling
845 * {@link CameraDevice#isSessionConfigurationSupported }.</p>
Shuzhen Wanga57c2742018-05-23 11:19:59 -0700846 * <p>Camera application shouldn't assume that there are at most 1 rear camera and 1 front
847 * camera in the system. For an application that switches between front and back cameras,
848 * the recommendation is to switch between the first rear camera and the first front
849 * camera in the list of supported camera devices.</p>
Shuzhen Wang23d29382017-11-26 17:24:56 -0800850 * <p>This capability requires the camera device to support the following:</p>
851 * <ul>
Shuzhen Wangde23d282018-08-15 14:01:45 -0700852 * <li>The IDs of underlying physical cameras are returned via
853 * {@link android.hardware.camera2.CameraCharacteristics#getPhysicalCameraIds }.</li>
854 * <li>This camera device must list static metadata
855 * {@link CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE android.logicalMultiCamera.sensorSyncType} in
856 * {@link android.hardware.camera2.CameraCharacteristics }.</li>
Shuzhen Wang23d29382017-11-26 17:24:56 -0800857 * <li>The underlying physical cameras' static metadata must list the following entries,
858 * so that the application can correlate pixels from the physical streams:<ul>
859 * <li>{@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference}</li>
860 * <li>{@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}</li>
861 * <li>{@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}</li>
862 * <li>{@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}</li>
Eino-Ville Talvala915f5042018-03-13 19:08:01 -0700863 * <li>{@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}</li>
Shuzhen Wang23d29382017-11-26 17:24:56 -0800864 * </ul>
865 * </li>
Shuzhen Wang03d36e22018-02-13 17:34:59 -0800866 * <li>The SENSOR_INFO_TIMESTAMP_SOURCE of the logical device and physical devices must be
867 * the same.</li>
Shuzhen Wang61aaa322018-11-19 16:04:57 -0800868 * <li>The logical camera must be LIMITED or higher device.</li>
Shuzhen Wang23d29382017-11-26 17:24:56 -0800869 * </ul>
Shuzhen Wang61aaa322018-11-19 16:04:57 -0800870 * <p>A logical camera device's dynamic metadata may contain
871 * {@link CaptureResult#LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID android.logicalMultiCamera.activePhysicalId} to notify the application of the current
872 * active physical camera Id. An active physical camera is the physical camera from which
873 * the logical camera's main image data outputs (YUV or RAW) and metadata come from.
874 * In addition, this serves as an indication which physical camera is used to output to
875 * a RAW stream, or in case only physical cameras support RAW, which physical RAW stream
876 * the application should request.</p>
877 * <p>Logical camera's static metadata tags below describe the default active physical
878 * camera. An active physical camera is default if it's used when application directly
879 * uses requests built from a template. All templates will default to the same active
880 * physical camera.</p>
881 * <ul>
882 * <li>{@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</li>
883 * <li>{@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}</li>
884 * <li>{@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
885 * <li>{@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li>
886 * <li>{@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize}</li>
887 * <li>{@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}</li>
888 * <li>{@link CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED android.sensor.info.lensShadingApplied}</li>
889 * <li>{@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}</li>
890 * <li>{@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}</li>
891 * <li>{@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}</li>
892 * <li>{@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}</li>
893 * <li>{@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1}</li>
894 * <li>{@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2}</li>
895 * <li>{@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1}</li>
896 * <li>{@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2}</li>
897 * <li>{@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern}</li>
898 * <li>{@link CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY android.sensor.maxAnalogSensitivity}</li>
899 * <li>{@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions}</li>
900 * <li>{@link CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES android.sensor.availableTestPatternModes}</li>
901 * <li>{@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}</li>
902 * <li>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}</li>
903 * <li>{@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration}</li>
904 * <li>{@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}</li>
905 * <li>{@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}</li>
906 * <li>{@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}</li>
907 * <li>{@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference}</li>
908 * <li>{@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}</li>
909 * </ul>
Shuzhen Wang0fdc9352019-03-29 10:43:55 -0700910 * <p>The field of view of all non-RAW physical streams must be the same or as close as
911 * possible to that of non-RAW logical streams. If the requested FOV is outside of the
912 * range supported by the physical camera, the physical stream for that physical camera
913 * will use either the maximum or minimum scaler crop region, depending on which one is
914 * closer to the requested FOV. For example, for a logical camera with wide-tele lens
915 * configuration where the wide lens is the default, if the logical camera's crop region
916 * is set to maximum, the physical stream for the tele lens will be configured to its
917 * maximum crop region. On the other hand, if the logical camera has a normal-wide lens
918 * configuration where the normal lens is the default, when the logical camera's crop
919 * region is set to maximum, the FOV of the logical streams will be that of the normal
920 * lens. The FOV of the physical streams for the wide lens will be the same as the
921 * logical stream, by making the crop region smaller than its active array size to
922 * compensate for the smaller focal length.</p>
923 * <p>Even if the underlying physical cameras have different RAW characteristics (such as
924 * size or CFA pattern), a logical camera can still advertise RAW capability. In this
925 * case, when the application configures a RAW stream, the camera device will make sure
926 * the active physical camera will remain active to ensure consistent RAW output
927 * behavior, and not switch to other physical cameras.</p>
Shuzhen Wangda189bd2019-06-26 14:48:36 -0700928 * <p>The capture request and result metadata tags required for backward compatible camera
929 * functionalities will be solely based on the logical camera capabiltity. On the other
930 * hand, the use of manual capture controls (sensor or post-processing) with a
931 * logical camera may result in unexpected behavior when the HAL decides to switch
932 * between physical cameras with different characteristics under the hood. For example,
933 * when the application manually sets exposure time and sensitivity while zooming in,
934 * the brightness of the camera images may suddenly change because HAL switches from one
935 * physical camera to the other.</p>
Shuzhen Wang23d29382017-11-26 17:24:56 -0800936 *
Eino-Ville Talvala915f5042018-03-13 19:08:01 -0700937 * @see CameraCharacteristics#LENS_DISTORTION
Shuzhen Wang61aaa322018-11-19 16:04:57 -0800938 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
939 * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE
940 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
Shuzhen Wang23d29382017-11-26 17:24:56 -0800941 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
942 * @see CameraCharacteristics#LENS_POSE_REFERENCE
943 * @see CameraCharacteristics#LENS_POSE_ROTATION
944 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
Shuzhen Wang61aaa322018-11-19 16:04:57 -0800945 * @see CaptureResult#LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID
Shuzhen Wang23d29382017-11-26 17:24:56 -0800946 * @see CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
Shuzhen Wang61aaa322018-11-19 16:04:57 -0800947 * @see CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES
948 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
949 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1
950 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2
951 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM1
952 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM2
953 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX1
954 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX2
955 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
956 * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
957 * @see CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED
958 * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
959 * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE
960 * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
961 * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL
962 * @see CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY
963 * @see CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS
964 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
965 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
Shuzhen Wang23d29382017-11-26 17:24:56 -0800966 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
967 */
968 public static final int REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA = 11;
969
Shuzhen Wang51248bf2018-03-22 00:04:45 -0700970 /**
971 * <p>The camera device is a monochrome camera that doesn't contain a color filter array,
Shuzhen Wanga8d36032018-10-15 12:01:53 -0700972 * and for YUV_420_888 stream, the pixel values on U and V planes are all 128.</p>
Shuzhen Wangec5e8d22018-09-28 09:28:48 -0700973 * <p>A MONOCHROME camera must support the guaranteed stream combinations required for
974 * its device level and capabilities. Additionally, if the monochrome camera device
975 * supports Y8 format, all mandatory stream combination requirements related to {@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888} apply
Shuzhen Wanga8d36032018-10-15 12:01:53 -0700976 * to {@link android.graphics.ImageFormat#Y8 Y8} as well. There are no
977 * mandatory stream combination requirements with regard to
978 * {@link android.graphics.ImageFormat#Y8 Y8} for Bayer camera devices.</p>
979 * <p>Starting from Android Q, the SENSOR_INFO_COLOR_FILTER_ARRANGEMENT of a MONOCHROME
980 * camera will be either MONO or NIR.</p>
Shuzhen Wang51248bf2018-03-22 00:04:45 -0700981 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
982 */
983 public static final int REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME = 12;
984
Jayant Chowdharyd88b4832019-01-24 18:11:09 -0800985 /**
986 * <p>The camera device is capable of writing image data into a region of memory
987 * inaccessible to Android userspace or the Android kernel, and only accessible to
988 * trusted execution environments (TEE).</p>
989 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
990 */
991 public static final int REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA = 13;
992
Igor Murashkine46c0da2014-02-07 18:34:37 -0800993 //
Zhijun He14986152014-05-22 21:17:37 -0700994 // Enumeration values for CameraCharacteristics#SCALER_CROPPING_TYPE
995 //
996
997 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700998 * <p>The camera device only supports centered crop regions.</p>
Zhijun He14986152014-05-22 21:17:37 -0700999 * @see CameraCharacteristics#SCALER_CROPPING_TYPE
1000 */
1001 public static final int SCALER_CROPPING_TYPE_CENTER_ONLY = 0;
1002
1003 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001004 * <p>The camera device supports arbitrarily chosen crop regions.</p>
Zhijun He14986152014-05-22 21:17:37 -07001005 * @see CameraCharacteristics#SCALER_CROPPING_TYPE
1006 */
1007 public static final int SCALER_CROPPING_TYPE_FREEFORM = 1;
1008
1009 //
Zhijun Hed1784962014-04-08 17:41:46 -07001010 // Enumeration values for CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1011 //
1012
1013 /**
1014 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1015 */
1016 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB = 0;
1017
1018 /**
1019 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1020 */
1021 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG = 1;
1022
1023 /**
1024 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1025 */
1026 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG = 2;
1027
1028 /**
1029 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1030 */
1031 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR = 3;
1032
1033 /**
1034 * <p>Sensor is not Bayer; output has 3 16-bit
1035 * values for each pixel, instead of just 1 16-bit value
1036 * per pixel.</p>
1037 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1038 */
1039 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB = 4;
1040
Shuzhen Wanga8d36032018-10-15 12:01:53 -07001041 /**
1042 * <p>Sensor doesn't have any Bayer color filter.
1043 * Such sensor captures visible light in monochrome. The exact weighting and
1044 * wavelengths captured is not specified, but generally only includes the visible
1045 * frequencies. This value implies a MONOCHROME camera.</p>
1046 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1047 */
1048 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_MONO = 5;
1049
1050 /**
1051 * <p>Sensor has a near infrared filter capturing light with wavelength between
1052 * roughly 750nm and 1400nm, and the same filter covers the whole sensor array. This
1053 * value implies a MONOCHROME camera.</p>
1054 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1055 */
1056 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR = 6;
1057
Zhijun Hed1784962014-04-08 17:41:46 -07001058 //
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07001059 // Enumeration values for CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
Zhijun He45fa43a12014-06-13 18:29:37 -07001060 //
1061
1062 /**
1063 * <p>Timestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in nanoseconds and monotonic,
1064 * but can not be compared to timestamps from other subsystems
1065 * (e.g. accelerometer, gyro etc.), or other instances of the same or different
1066 * camera devices in the same system. Timestamps between streams and results for
1067 * a single camera instance are comparable, and the timestamps for all buffers
1068 * and the result metadata generated by a single capture are identical.</p>
1069 *
1070 * @see CaptureResult#SENSOR_TIMESTAMP
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07001071 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
Zhijun He45fa43a12014-06-13 18:29:37 -07001072 */
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07001073 public static final int SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN = 0;
Zhijun He45fa43a12014-06-13 18:29:37 -07001074
1075 /**
1076 * <p>Timestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in the same timebase as
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07001077 * {@link android.os.SystemClock#elapsedRealtimeNanos },
Zhijun He45fa43a12014-06-13 18:29:37 -07001078 * and they can be compared to other timestamps using that base.</p>
1079 *
1080 * @see CaptureResult#SENSOR_TIMESTAMP
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07001081 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
Zhijun He45fa43a12014-06-13 18:29:37 -07001082 */
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07001083 public static final int SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME = 1;
Zhijun He45fa43a12014-06-13 18:29:37 -07001084
1085 //
Ruben Brunk7c062362014-04-15 23:53:53 -07001086 // Enumeration values for CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1087 //
1088
1089 /**
1090 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1091 */
1092 public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT = 1;
1093
1094 /**
1095 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1096 */
1097 public static final int SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT = 2;
1098
1099 /**
1100 * <p>Incandescent light</p>
1101 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1102 */
1103 public static final int SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN = 3;
1104
1105 /**
1106 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1107 */
1108 public static final int SENSOR_REFERENCE_ILLUMINANT1_FLASH = 4;
1109
1110 /**
1111 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1112 */
1113 public static final int SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER = 9;
1114
1115 /**
1116 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1117 */
1118 public static final int SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER = 10;
1119
1120 /**
1121 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1122 */
1123 public static final int SENSOR_REFERENCE_ILLUMINANT1_SHADE = 11;
1124
1125 /**
1126 * <p>D 5700 - 7100K</p>
1127 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1128 */
1129 public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT = 12;
1130
1131 /**
1132 * <p>N 4600 - 5400K</p>
1133 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1134 */
1135 public static final int SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT = 13;
1136
1137 /**
1138 * <p>W 3900 - 4500K</p>
1139 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1140 */
1141 public static final int SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT = 14;
1142
1143 /**
1144 * <p>WW 3200 - 3700K</p>
1145 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1146 */
1147 public static final int SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT = 15;
1148
1149 /**
1150 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1151 */
1152 public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A = 17;
1153
1154 /**
1155 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1156 */
1157 public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B = 18;
1158
1159 /**
1160 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1161 */
1162 public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C = 19;
1163
1164 /**
1165 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1166 */
1167 public static final int SENSOR_REFERENCE_ILLUMINANT1_D55 = 20;
1168
1169 /**
1170 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1171 */
1172 public static final int SENSOR_REFERENCE_ILLUMINANT1_D65 = 21;
1173
1174 /**
1175 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1176 */
1177 public static final int SENSOR_REFERENCE_ILLUMINANT1_D75 = 22;
1178
1179 /**
1180 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1181 */
1182 public static final int SENSOR_REFERENCE_ILLUMINANT1_D50 = 23;
1183
1184 /**
1185 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1186 */
1187 public static final int SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN = 24;
1188
1189 //
Igor Murashkin68f40062013-09-10 12:15:54 -07001190 // Enumeration values for CameraCharacteristics#LED_AVAILABLE_LEDS
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001191 //
1192
1193 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001194 * <p>android.led.transmit control is used.</p>
Igor Murashkin68f40062013-09-10 12:15:54 -07001195 * @see CameraCharacteristics#LED_AVAILABLE_LEDS
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001196 * @hide
1197 */
1198 public static final int LED_AVAILABLE_LEDS_TRANSMIT = 0;
1199
1200 //
Igor Murashkin68f40062013-09-10 12:15:54 -07001201 // Enumeration values for CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001202 //
1203
1204 /**
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08001205 * <p>This camera device does not have enough capabilities to qualify as a <code>FULL</code> device or
1206 * better.</p>
1207 * <p>Only the stream configurations listed in the <code>LEGACY</code> and <code>LIMITED</code> tables in the
1208 * {@link android.hardware.camera2.CameraDevice#createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p>
1209 * <p>All <code>LIMITED</code> devices support the <code>BACKWARDS_COMPATIBLE</code> capability, indicating basic
1210 * support for color image capture. The only exception is that the device may
1211 * alternatively support only the <code>DEPTH_OUTPUT</code> capability, if it can only output depth
1212 * measurements and not color images.</p>
1213 * <p><code>LIMITED</code> devices and above require the use of {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}
1214 * to lock exposure metering (and calculate flash power, for cameras with flash) before
1215 * capturing a high-quality still image.</p>
1216 * <p>A <code>LIMITED</code> device that only lists the <code>BACKWARDS_COMPATIBLE</code> capability is only
1217 * required to support full-automatic operation and post-processing (<code>OFF</code> is not
1218 * supported for {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}, {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}, or
1219 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode})</p>
1220 * <p>Additional capabilities may optionally be supported by a <code>LIMITED</code>-level device, and
1221 * can be checked for in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
1222 *
1223 * @see CaptureRequest#CONTROL_AE_MODE
1224 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1225 * @see CaptureRequest#CONTROL_AF_MODE
1226 * @see CaptureRequest#CONTROL_AWB_MODE
1227 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Igor Murashkin68f40062013-09-10 12:15:54 -07001228 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001229 */
1230 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0;
1231
1232 /**
Ruben Brunk4a61a862014-07-01 16:00:26 -07001233 * <p>This camera device is capable of supporting advanced imaging applications.</p>
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08001234 * <p>The stream configurations listed in the <code>FULL</code>, <code>LEGACY</code> and <code>LIMITED</code> tables in the
1235 * {@link android.hardware.camera2.CameraDevice#createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p>
1236 * <p>A <code>FULL</code> device will support below capabilities:</p>
1237 * <ul>
1238 * <li><code>BURST_CAPTURE</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1239 * <code>BURST_CAPTURE</code>)</li>
1240 * <li>Per frame control ({@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} <code>==</code> PER_FRAME_CONTROL)</li>
1241 * <li>Manual sensor control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains <code>MANUAL_SENSOR</code>)</li>
1242 * <li>Manual post-processing control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1243 * <code>MANUAL_POST_PROCESSING</code>)</li>
1244 * <li>The required exposure time range defined in {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
1245 * <li>The required maxFrameDuration defined in {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li>
1246 * </ul>
1247 * <p>Note:
1248 * Pre-API level 23, FULL devices also supported arbitrary cropping region
1249 * ({@link CameraCharacteristics#SCALER_CROPPING_TYPE android.scaler.croppingType} <code>== FREEFORM</code>); this requirement was relaxed in API level
1250 * 23, and <code>FULL</code> devices may only support <code>CENTERED</code> cropping.</p>
1251 *
1252 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1253 * @see CameraCharacteristics#SCALER_CROPPING_TYPE
1254 * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
1255 * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
1256 * @see CameraCharacteristics#SYNC_MAX_LATENCY
Igor Murashkin68f40062013-09-10 12:15:54 -07001257 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001258 */
1259 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1;
1260
Ruben Brunk4a61a862014-07-01 16:00:26 -07001261 /**
1262 * <p>This camera device is running in backward compatibility mode.</p>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08001263 * <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 -08001264 * <p>A <code>LEGACY</code> device does not support per-frame control, manual sensor control, manual
1265 * post-processing, arbitrary cropping regions, and has relaxed performance constraints.
1266 * No additional capabilities beyond <code>BACKWARD_COMPATIBLE</code> will ever be listed by a
1267 * <code>LEGACY</code> device in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
1268 * <p>In addition, the {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is not functional on <code>LEGACY</code>
1269 * devices. Instead, every request that includes a JPEG-format output target is treated
1270 * as triggering a still capture, internally executing a precapture trigger. This may
1271 * fire the flash for flash power metering during precapture, and then fire the flash
1272 * for the final capture, if a flash is available on the device and the AE mode is set to
1273 * enable the flash.</p>
Eino-Ville Talvala2a303a42019-04-10 17:29:09 -07001274 * <p>Devices that initially shipped with Android version {@link android.os.Build.VERSION_CODES#Q Q} or newer will not include any LEGACY-level devices.</p>
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08001275 *
1276 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1277 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Ruben Brunk4a61a862014-07-01 16:00:26 -07001278 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1279 */
1280 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY = 2;
1281
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08001282 /**
1283 * <p>This camera device is capable of YUV reprocessing and RAW data capture, in addition to
1284 * FULL-level capabilities.</p>
1285 * <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 -08001286 * <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 -08001287 * <p>The following additional capabilities are guaranteed to be supported:</p>
1288 * <ul>
1289 * <li><code>YUV_REPROCESSING</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1290 * <code>YUV_REPROCESSING</code>)</li>
1291 * <li><code>RAW</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1292 * <code>RAW</code>)</li>
1293 * </ul>
1294 *
1295 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1296 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1297 */
1298 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_3 = 3;
1299
Yin-Chia Yeh43cea5a2018-01-19 11:38:12 -08001300 /**
1301 * <p>This camera device is backed by an external camera connected to this Android device.</p>
1302 * <p>The device has capability identical to a LIMITED level device, with the following
1303 * exceptions:</p>
1304 * <ul>
1305 * <li>The device may not report lens/sensor related information such as<ul>
1306 * <li>{@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}</li>
1307 * <li>{@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}</li>
1308 * <li>{@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize}</li>
1309 * <li>{@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}</li>
1310 * <li>{@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern}</li>
1311 * <li>{@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}</li>
1312 * <li>{@link CaptureResult#SENSOR_ROLLING_SHUTTER_SKEW android.sensor.rollingShutterSkew}</li>
1313 * </ul>
1314 * </li>
1315 * <li>The device will report 0 for {@link CameraCharacteristics#SENSOR_ORIENTATION android.sensor.orientation}</li>
1316 * <li>The device has less guarantee on stable framerate, as the framerate partly depends
1317 * on the external camera being used.</li>
1318 * </ul>
1319 *
1320 * @see CaptureRequest#LENS_FOCAL_LENGTH
1321 * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE
1322 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
1323 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1324 * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE
1325 * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL
1326 * @see CameraCharacteristics#SENSOR_ORIENTATION
1327 * @see CaptureResult#SENSOR_ROLLING_SHUTTER_SKEW
1328 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1329 */
1330 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL = 4;
1331
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001332 //
Igor Murashkin3865a842014-01-17 18:18:39 -08001333 // Enumeration values for CameraCharacteristics#SYNC_MAX_LATENCY
1334 //
1335
1336 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001337 * <p>Every frame has the requests immediately applied.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08001338 * <p>Changing controls over multiple requests one after another will
1339 * produce results that have those controls applied atomically
1340 * each frame.</p>
1341 * <p>All FULL capability devices will have this as their maxLatency.</p>
1342 * @see CameraCharacteristics#SYNC_MAX_LATENCY
1343 */
1344 public static final int SYNC_MAX_LATENCY_PER_FRAME_CONTROL = 0;
1345
1346 /**
1347 * <p>Each new frame has some subset (potentially the entire set)
1348 * of the past requests applied to the camera settings.</p>
1349 * <p>By submitting a series of identical requests, the camera device
1350 * will eventually have the camera settings applied, but it is
1351 * unknown when that exact point will be.</p>
Igor Murashkinbdf366c2014-07-25 16:54:20 -07001352 * <p>All LEGACY capability devices will have this as their maxLatency.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08001353 * @see CameraCharacteristics#SYNC_MAX_LATENCY
1354 */
1355 public static final int SYNC_MAX_LATENCY_UNKNOWN = -1;
1356
1357 //
Shuzhen Wang23d29382017-11-26 17:24:56 -08001358 // Enumeration values for CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
1359 //
1360
1361 /**
1362 * <p>A software mechanism is used to synchronize between the physical cameras. As a result,
1363 * the timestamp of an image from a physical stream is only an approximation of the
1364 * image sensor start-of-exposure time.</p>
1365 * @see CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
1366 */
1367 public static final int LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE = 0;
1368
1369 /**
1370 * <p>The camera device supports frame timestamp synchronization at the hardware level,
1371 * and the timestamp of a physical stream image accurately reflects its
1372 * start-of-exposure time.</p>
1373 * @see CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
1374 */
1375 public static final int LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED = 1;
1376
1377 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001378 // Enumeration values for CaptureRequest#COLOR_CORRECTION_MODE
1379 //
1380
1381 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001382 * <p>Use the {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} matrix
Igor Murashkin7d2a5c52014-01-17 15:07:52 -08001383 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} to do color conversion.</p>
1384 * <p>All advanced white balance adjustments (not specified
1385 * by our white balance pipeline) must be disabled.</p>
1386 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
1387 * TRANSFORM_MATRIX is ignored. The camera device will override
1388 * this value to either FAST or HIGH_QUALITY.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001389 *
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001390 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001391 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Igor Murashkin7d2a5c52014-01-17 15:07:52 -08001392 * @see CaptureRequest#CONTROL_AWB_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001393 * @see CaptureRequest#COLOR_CORRECTION_MODE
1394 */
1395 public static final int COLOR_CORRECTION_MODE_TRANSFORM_MATRIX = 0;
1396
1397 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001398 * <p>Color correction processing must not slow down
1399 * capture rate relative to sensor raw output.</p>
Igor Murashkin7d2a5c52014-01-17 15:07:52 -08001400 * <p>Advanced white balance adjustments above and beyond
1401 * the specified white balance pipeline may be applied.</p>
1402 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
1403 * the camera device uses the last frame's AWB values
1404 * (or defaults if AWB has never been run).</p>
1405 *
1406 * @see CaptureRequest#CONTROL_AWB_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001407 * @see CaptureRequest#COLOR_CORRECTION_MODE
1408 */
1409 public static final int COLOR_CORRECTION_MODE_FAST = 1;
1410
1411 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001412 * <p>Color correction processing operates at improved
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07001413 * quality but the capture rate might be reduced (relative to sensor
1414 * raw output rate)</p>
Igor Murashkin7d2a5c52014-01-17 15:07:52 -08001415 * <p>Advanced white balance adjustments above and beyond
1416 * the specified white balance pipeline may be applied.</p>
1417 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
1418 * the camera device uses the last frame's AWB values
1419 * (or defaults if AWB has never been run).</p>
1420 *
1421 * @see CaptureRequest#CONTROL_AWB_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001422 * @see CaptureRequest#COLOR_CORRECTION_MODE
1423 */
1424 public static final int COLOR_CORRECTION_MODE_HIGH_QUALITY = 2;
1425
1426 //
Zhijun He9e4e4392014-08-18 11:12:32 -07001427 // Enumeration values for CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
Zhijun Hea05e59d2014-07-08 18:27:47 -07001428 //
1429
1430 /**
1431 * <p>No aberration correction is applied.</p>
Zhijun He9e4e4392014-08-18 11:12:32 -07001432 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
Zhijun Hea05e59d2014-07-08 18:27:47 -07001433 */
Zhijun He9e4e4392014-08-18 11:12:32 -07001434 public static final int COLOR_CORRECTION_ABERRATION_MODE_OFF = 0;
Zhijun Hea05e59d2014-07-08 18:27:47 -07001435
1436 /**
1437 * <p>Aberration correction will not slow down capture rate
1438 * relative to sensor raw output.</p>
Zhijun He9e4e4392014-08-18 11:12:32 -07001439 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
Zhijun Hea05e59d2014-07-08 18:27:47 -07001440 */
Zhijun He9e4e4392014-08-18 11:12:32 -07001441 public static final int COLOR_CORRECTION_ABERRATION_MODE_FAST = 1;
Zhijun Hea05e59d2014-07-08 18:27:47 -07001442
1443 /**
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07001444 * <p>Aberration correction operates at improved quality but the capture rate might be
1445 * reduced (relative to sensor raw output rate)</p>
Zhijun He9e4e4392014-08-18 11:12:32 -07001446 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
Zhijun Hea05e59d2014-07-08 18:27:47 -07001447 */
Zhijun He9e4e4392014-08-18 11:12:32 -07001448 public static final int COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY = 2;
Zhijun Hea05e59d2014-07-08 18:27:47 -07001449
1450 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001451 // Enumeration values for CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1452 //
1453
1454 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001455 * <p>The camera device will not adjust exposure duration to
1456 * avoid banding problems.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001457 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1458 */
1459 public static final int CONTROL_AE_ANTIBANDING_MODE_OFF = 0;
1460
1461 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001462 * <p>The camera device will adjust exposure duration to
1463 * avoid banding problems with 50Hz illumination sources.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001464 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1465 */
1466 public static final int CONTROL_AE_ANTIBANDING_MODE_50HZ = 1;
1467
1468 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001469 * <p>The camera device will adjust exposure duration to
1470 * avoid banding problems with 60Hz illumination
1471 * sources.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001472 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1473 */
1474 public static final int CONTROL_AE_ANTIBANDING_MODE_60HZ = 2;
1475
1476 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001477 * <p>The camera device will automatically adapt its
1478 * antibanding routine to the current illumination
Yin-Chia Yeh7b2cae62014-11-25 11:54:18 -08001479 * condition. This is the default mode if AUTO is
1480 * available on given camera device.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001481 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1482 */
1483 public static final int CONTROL_AE_ANTIBANDING_MODE_AUTO = 3;
1484
1485 //
1486 // Enumeration values for CaptureRequest#CONTROL_AE_MODE
1487 //
1488
1489 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001490 * <p>The camera device's autoexposure routine is disabled.</p>
1491 * <p>The application-selected {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001492 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} and
1493 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are used by the camera
1494 * device, along with android.flash.* fields, if there's
1495 * a flash unit for this camera device.</p>
Yin-Chia Yeh7144b5d2014-11-12 11:42:49 -08001496 * <p>Note that auto-white balance (AWB) and auto-focus (AF)
1497 * behavior is device dependent when AE is in OFF mode.
1498 * To have consistent behavior across different devices,
1499 * it is recommended to either set AWB and AF to OFF mode
1500 * or lock AWB and AF before setting AE to OFF.
1501 * See {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode},
1502 * {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}, and {@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}
1503 * for more details.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001504 * <p>LEGACY devices do not support the OFF mode and will
1505 * override attempts to use this value to ON.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001506 *
Yin-Chia Yeh7144b5d2014-11-12 11:42:49 -08001507 * @see CaptureRequest#CONTROL_AF_MODE
1508 * @see CaptureRequest#CONTROL_AF_TRIGGER
1509 * @see CaptureRequest#CONTROL_AWB_LOCK
1510 * @see CaptureRequest#CONTROL_AWB_MODE
Zhijun He5f2a47f2014-01-16 15:44:41 -08001511 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001512 * @see CaptureRequest#SENSOR_FRAME_DURATION
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001513 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001514 * @see CaptureRequest#CONTROL_AE_MODE
1515 */
1516 public static final int CONTROL_AE_MODE_OFF = 0;
1517
1518 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001519 * <p>The camera device's autoexposure routine is active,
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001520 * with no flash control.</p>
1521 * <p>The application's values for
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001522 * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
1523 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and
1524 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are ignored. The
1525 * application has control over the various
1526 * android.flash.* fields.</p>
1527 *
Zhijun He5f2a47f2014-01-16 15:44:41 -08001528 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001529 * @see CaptureRequest#SENSOR_FRAME_DURATION
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001530 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001531 * @see CaptureRequest#CONTROL_AE_MODE
1532 */
1533 public static final int CONTROL_AE_MODE_ON = 1;
1534
1535 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001536 * <p>Like ON, except that the camera device also controls
1537 * the camera's flash unit, firing it in low-light
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001538 * conditions.</p>
1539 * <p>The flash may be fired during a precapture sequence
1540 * (triggered by {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and
1541 * may be fired for captures for which the
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001542 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to
1543 * STILL_CAPTURE</p>
1544 *
Igor Murashkin3242f4f2014-01-15 12:27:41 -08001545 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
Zhijun He5f2a47f2014-01-16 15:44:41 -08001546 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001547 * @see CaptureRequest#CONTROL_AE_MODE
1548 */
1549 public static final int CONTROL_AE_MODE_ON_AUTO_FLASH = 2;
1550
1551 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001552 * <p>Like ON, except that the camera device also controls
1553 * the camera's flash unit, always firing it for still
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001554 * captures.</p>
1555 * <p>The flash may be fired during a precapture sequence
1556 * (triggered by {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and
1557 * will always be fired for captures for which the
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001558 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to
1559 * STILL_CAPTURE</p>
1560 *
Igor Murashkin3242f4f2014-01-15 12:27:41 -08001561 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
Zhijun He5f2a47f2014-01-16 15:44:41 -08001562 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001563 * @see CaptureRequest#CONTROL_AE_MODE
1564 */
1565 public static final int CONTROL_AE_MODE_ON_ALWAYS_FLASH = 3;
1566
1567 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001568 * <p>Like ON_AUTO_FLASH, but with automatic red eye
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001569 * reduction.</p>
1570 * <p>If deemed necessary by the camera device, a red eye
1571 * reduction flash will fire during the precapture
1572 * sequence.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001573 * @see CaptureRequest#CONTROL_AE_MODE
1574 */
1575 public static final int CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE = 4;
1576
Chien-Yu Chen2cf33572018-01-11 11:35:41 -08001577 /**
1578 * <p>An external flash has been turned on.</p>
1579 * <p>It informs the camera device that an external flash has been turned on, and that
1580 * metering (and continuous focus if active) should be quickly recaculated to account
1581 * for the external flash. Otherwise, this mode acts like ON.</p>
1582 * <p>When the external flash is turned off, AE mode should be changed to one of the
1583 * other available AE modes.</p>
Chien-Yu Chenc9ca7222018-03-15 11:14:29 -07001584 * <p>If the camera device supports AE external flash mode, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} must
1585 * be FLASH_REQUIRED after the camera device finishes AE scan and it's too dark without
Chien-Yu Chen2cf33572018-01-11 11:35:41 -08001586 * flash.</p>
Chien-Yu Chenc9ca7222018-03-15 11:14:29 -07001587 *
1588 * @see CaptureResult#CONTROL_AE_STATE
Chien-Yu Chen2cf33572018-01-11 11:35:41 -08001589 * @see CaptureRequest#CONTROL_AE_MODE
1590 */
1591 public static final int CONTROL_AE_MODE_ON_EXTERNAL_FLASH = 5;
1592
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001593 //
1594 // Enumeration values for CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1595 //
1596
1597 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001598 * <p>The trigger is idle.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001599 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1600 */
1601 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_IDLE = 0;
1602
1603 /**
Zhijun He228f4f92014-01-16 17:22:05 -08001604 * <p>The precapture metering sequence will be started
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001605 * by the camera device.</p>
1606 * <p>The exact effect of the precapture trigger depends on
1607 * the current AE mode and state.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001608 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1609 */
1610 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_START = 1;
1611
Zhijun Hefa95b042015-02-09 10:40:49 -08001612 /**
1613 * <p>The camera device will cancel any currently active or completed
1614 * precapture metering sequence, the auto-exposure routine will return to its
1615 * initial state.</p>
1616 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1617 */
1618 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL = 2;
1619
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001620 //
1621 // Enumeration values for CaptureRequest#CONTROL_AF_MODE
1622 //
1623
1624 /**
Zhijun Hef3537422013-12-16 16:56:35 -08001625 * <p>The auto-focus routine does not control the lens;
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001626 * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} is controlled by the
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001627 * application.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001628 *
1629 * @see CaptureRequest#LENS_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001630 * @see CaptureRequest#CONTROL_AF_MODE
1631 */
1632 public static final int CONTROL_AF_MODE_OFF = 0;
1633
1634 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001635 * <p>Basic automatic focus mode.</p>
1636 * <p>In this mode, the lens does not move unless
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001637 * the autofocus trigger action is called. When that trigger
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001638 * is activated, AF will transition to ACTIVE_SCAN, then to
Zhijun Hef3537422013-12-16 16:56:35 -08001639 * the outcome of the scan (FOCUSED or NOT_FOCUSED).</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001640 * <p>Always supported if lens is not fixed focus.</p>
1641 * <p>Use {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} to determine if lens
1642 * is fixed-focus.</p>
Zhijun Hef3537422013-12-16 16:56:35 -08001643 * <p>Triggering AF_CANCEL resets the lens position to default,
Igor Murashkinace5bf02013-12-10 17:36:40 -08001644 * and sets the AF state to INACTIVE.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001645 *
1646 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001647 * @see CaptureRequest#CONTROL_AF_MODE
1648 */
1649 public static final int CONTROL_AF_MODE_AUTO = 1;
1650
1651 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001652 * <p>Close-up focusing mode.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08001653 * <p>In this mode, the lens does not move unless the
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001654 * autofocus trigger action is called. When that trigger is
1655 * activated, AF will transition to ACTIVE_SCAN, then to
1656 * the outcome of the scan (FOCUSED or NOT_FOCUSED). This
1657 * mode is optimized for focusing on objects very close to
1658 * the camera.</p>
1659 * <p>When that trigger is activated, AF will transition to
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001660 * ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001661 * NOT_FOCUSED). Triggering cancel AF resets the lens
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001662 * position to default, and sets the AF state to
Igor Murashkinace5bf02013-12-10 17:36:40 -08001663 * INACTIVE.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001664 * @see CaptureRequest#CONTROL_AF_MODE
1665 */
1666 public static final int CONTROL_AF_MODE_MACRO = 2;
1667
1668 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001669 * <p>In this mode, the AF algorithm modifies the lens
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001670 * position continually to attempt to provide a
Igor Murashkinace5bf02013-12-10 17:36:40 -08001671 * constantly-in-focus image stream.</p>
1672 * <p>The focusing behavior should be suitable for good quality
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001673 * video recording; typically this means slower focus
1674 * movement and no overshoots. When the AF trigger is not
1675 * involved, the AF algorithm should start in INACTIVE state,
1676 * and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED
1677 * states as appropriate. When the AF trigger is activated,
1678 * the algorithm should immediately transition into
1679 * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
Igor Murashkinace5bf02013-12-10 17:36:40 -08001680 * lens position until a cancel AF trigger is received.</p>
1681 * <p>Once cancel is received, the algorithm should transition
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001682 * back to INACTIVE and resume passive scan. Note that this
1683 * behavior is not identical to CONTINUOUS_PICTURE, since an
1684 * ongoing PASSIVE_SCAN must immediately be
Igor Murashkinace5bf02013-12-10 17:36:40 -08001685 * canceled.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001686 * @see CaptureRequest#CONTROL_AF_MODE
1687 */
1688 public static final int CONTROL_AF_MODE_CONTINUOUS_VIDEO = 3;
1689
1690 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001691 * <p>In this mode, the AF algorithm modifies the lens
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001692 * position continually to attempt to provide a
Igor Murashkinace5bf02013-12-10 17:36:40 -08001693 * constantly-in-focus image stream.</p>
1694 * <p>The focusing behavior should be suitable for still image
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001695 * capture; typically this means focusing as fast as
1696 * possible. When the AF trigger is not involved, the AF
1697 * algorithm should start in INACTIVE state, and then
1698 * transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as
1699 * appropriate as it attempts to maintain focus. When the AF
1700 * trigger is activated, the algorithm should finish its
1701 * PASSIVE_SCAN if active, and then transition into
1702 * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
Igor Murashkinace5bf02013-12-10 17:36:40 -08001703 * lens position until a cancel AF trigger is received.</p>
1704 * <p>When the AF cancel trigger is activated, the algorithm
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001705 * should transition back to INACTIVE and then act as if it
Igor Murashkinace5bf02013-12-10 17:36:40 -08001706 * has just been started.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001707 * @see CaptureRequest#CONTROL_AF_MODE
1708 */
1709 public static final int CONTROL_AF_MODE_CONTINUOUS_PICTURE = 4;
1710
1711 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001712 * <p>Extended depth of field (digital focus) mode.</p>
1713 * <p>The camera device will produce images with an extended
1714 * depth of field automatically; no special focusing
1715 * operations need to be done before taking a picture.</p>
1716 * <p>AF triggers are ignored, and the AF state will always be
Igor Murashkinace5bf02013-12-10 17:36:40 -08001717 * INACTIVE.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001718 * @see CaptureRequest#CONTROL_AF_MODE
1719 */
1720 public static final int CONTROL_AF_MODE_EDOF = 5;
1721
1722 //
1723 // Enumeration values for CaptureRequest#CONTROL_AF_TRIGGER
1724 //
1725
1726 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001727 * <p>The trigger is idle.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001728 * @see CaptureRequest#CONTROL_AF_TRIGGER
1729 */
1730 public static final int CONTROL_AF_TRIGGER_IDLE = 0;
1731
1732 /**
Zhijun He228f4f92014-01-16 17:22:05 -08001733 * <p>Autofocus will trigger now.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001734 * @see CaptureRequest#CONTROL_AF_TRIGGER
1735 */
1736 public static final int CONTROL_AF_TRIGGER_START = 1;
1737
1738 /**
Zhijun He228f4f92014-01-16 17:22:05 -08001739 * <p>Autofocus will return to its initial
1740 * state, and cancel any currently active trigger.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001741 * @see CaptureRequest#CONTROL_AF_TRIGGER
1742 */
1743 public static final int CONTROL_AF_TRIGGER_CANCEL = 2;
1744
1745 //
1746 // Enumeration values for CaptureRequest#CONTROL_AWB_MODE
1747 //
1748
1749 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001750 * <p>The camera device's auto-white balance routine is disabled.</p>
1751 * <p>The application-selected color transform matrix
Zhijun He399f05d2014-01-15 11:31:30 -08001752 * ({@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}) and gains
1753 * ({@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}) are used by the camera
1754 * device for manual white balance control.</p>
1755 *
Zhijun He399f05d2014-01-15 11:31:30 -08001756 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001757 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001758 * @see CaptureRequest#CONTROL_AWB_MODE
1759 */
1760 public static final int CONTROL_AWB_MODE_OFF = 0;
1761
1762 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001763 * <p>The camera device's auto-white balance routine is active.</p>
1764 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1765 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1766 * For devices that support the MANUAL_POST_PROCESSING capability, the
1767 * values used by the camera device for the transform and gains
1768 * will be available in the capture result for this request.</p>
Zhijun He399f05d2014-01-15 11:31:30 -08001769 *
1770 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001771 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001772 * @see CaptureRequest#CONTROL_AWB_MODE
1773 */
1774 public static final int CONTROL_AWB_MODE_AUTO = 1;
1775
1776 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001777 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001778 * the camera device uses incandescent light as the assumed scene
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001779 * illumination for white balance.</p>
1780 * <p>While the exact white balance transforms are up to the
1781 * camera device, they will approximately match the CIE
1782 * standard illuminant A.</p>
1783 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1784 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1785 * For devices that support the MANUAL_POST_PROCESSING capability, the
1786 * values used by the camera device for the transform and gains
1787 * will be available in the capture result for this request.</p>
1788 *
1789 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1790 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001791 * @see CaptureRequest#CONTROL_AWB_MODE
1792 */
1793 public static final int CONTROL_AWB_MODE_INCANDESCENT = 2;
1794
1795 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001796 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001797 * the camera device uses fluorescent light as the assumed scene
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001798 * illumination for white balance.</p>
1799 * <p>While the exact white balance transforms are up to the
1800 * camera device, they will approximately match the CIE
1801 * standard illuminant F2.</p>
1802 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1803 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1804 * For devices that support the MANUAL_POST_PROCESSING capability, the
1805 * values used by the camera device for the transform and gains
1806 * will be available in the capture result for this request.</p>
1807 *
1808 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1809 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001810 * @see CaptureRequest#CONTROL_AWB_MODE
1811 */
1812 public static final int CONTROL_AWB_MODE_FLUORESCENT = 3;
1813
1814 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001815 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001816 * the camera device uses warm fluorescent light as the assumed scene
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001817 * illumination for white balance.</p>
1818 * <p>While the exact white balance transforms are up to the
1819 * camera device, they will approximately match the CIE
1820 * standard illuminant F4.</p>
1821 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1822 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1823 * For devices that support the MANUAL_POST_PROCESSING capability, the
1824 * values used by the camera device for the transform and gains
1825 * will be available in the capture result for this request.</p>
1826 *
1827 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1828 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001829 * @see CaptureRequest#CONTROL_AWB_MODE
1830 */
1831 public static final int CONTROL_AWB_MODE_WARM_FLUORESCENT = 4;
1832
1833 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001834 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001835 * the camera device uses daylight light as the assumed scene
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001836 * illumination for white balance.</p>
1837 * <p>While the exact white balance transforms are up to the
1838 * camera device, they will approximately match the CIE
1839 * standard illuminant D65.</p>
1840 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1841 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1842 * For devices that support the MANUAL_POST_PROCESSING capability, the
1843 * values used by the camera device for the transform and gains
1844 * will be available in the capture result for this request.</p>
1845 *
1846 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1847 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001848 * @see CaptureRequest#CONTROL_AWB_MODE
1849 */
1850 public static final int CONTROL_AWB_MODE_DAYLIGHT = 5;
1851
1852 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001853 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001854 * the camera device uses cloudy daylight light as the assumed scene
1855 * illumination for white balance.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001856 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1857 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1858 * For devices that support the MANUAL_POST_PROCESSING capability, the
1859 * values used by the camera device for the transform and gains
1860 * will be available in the capture result for this request.</p>
1861 *
1862 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1863 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001864 * @see CaptureRequest#CONTROL_AWB_MODE
1865 */
1866 public static final int CONTROL_AWB_MODE_CLOUDY_DAYLIGHT = 6;
1867
1868 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001869 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001870 * the camera device uses twilight light as the assumed scene
1871 * illumination for white balance.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001872 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1873 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1874 * For devices that support the MANUAL_POST_PROCESSING capability, the
1875 * values used by the camera device for the transform and gains
1876 * will be available in the capture result for this request.</p>
1877 *
1878 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1879 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001880 * @see CaptureRequest#CONTROL_AWB_MODE
1881 */
1882 public static final int CONTROL_AWB_MODE_TWILIGHT = 7;
1883
1884 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001885 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001886 * the camera device uses shade light as the assumed scene
1887 * illumination for white balance.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001888 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1889 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1890 * For devices that support the MANUAL_POST_PROCESSING capability, the
1891 * values used by the camera device for the transform and gains
1892 * will be available in the capture result for this request.</p>
1893 *
1894 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1895 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001896 * @see CaptureRequest#CONTROL_AWB_MODE
1897 */
1898 public static final int CONTROL_AWB_MODE_SHADE = 8;
1899
1900 //
1901 // Enumeration values for CaptureRequest#CONTROL_CAPTURE_INTENT
1902 //
1903
1904 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001905 * <p>The goal of this request doesn't fall into the other
1906 * categories. The camera device will default to preview-like
Igor Murashkinace5bf02013-12-10 17:36:40 -08001907 * behavior.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001908 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1909 */
1910 public static final int CONTROL_CAPTURE_INTENT_CUSTOM = 0;
1911
1912 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001913 * <p>This request is for a preview-like use case.</p>
1914 * <p>The precapture trigger may be used to start off a metering
1915 * w/flash sequence.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001916 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1917 */
1918 public static final int CONTROL_CAPTURE_INTENT_PREVIEW = 1;
1919
1920 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001921 * <p>This request is for a still capture-type
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001922 * use case.</p>
1923 * <p>If the flash unit is under automatic control, it may fire as needed.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001924 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1925 */
1926 public static final int CONTROL_CAPTURE_INTENT_STILL_CAPTURE = 2;
1927
1928 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001929 * <p>This request is for a video recording
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001930 * use case.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001931 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1932 */
1933 public static final int CONTROL_CAPTURE_INTENT_VIDEO_RECORD = 3;
1934
1935 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001936 * <p>This request is for a video snapshot (still
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001937 * image while recording video) use case.</p>
1938 * <p>The camera device should take the highest-quality image
1939 * possible (given the other settings) without disrupting the
Eino-Ville Talvala126a7462014-11-04 16:31:01 -08001940 * frame rate of video recording. </p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001941 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1942 */
1943 public static final int CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT = 4;
1944
1945 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001946 * <p>This request is for a ZSL usecase; the
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001947 * application will stream full-resolution images and
1948 * reprocess one or several later for a final
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001949 * capture.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001950 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1951 */
1952 public static final int CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG = 5;
1953
Zhijun Hee30adb72014-04-09 19:04:31 -07001954 /**
1955 * <p>This request is for manual capture use case where
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001956 * the applications want to directly control the capture parameters.</p>
1957 * <p>For example, the application may wish to manually control
1958 * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, etc.</p>
Zhijun Hee30adb72014-04-09 19:04:31 -07001959 *
1960 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
1961 * @see CaptureRequest#SENSOR_SENSITIVITY
1962 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1963 */
1964 public static final int CONTROL_CAPTURE_INTENT_MANUAL = 6;
1965
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001966 /**
1967 * <p>This request is for a motion tracking use case, where
1968 * the application will use camera and inertial sensor data to
1969 * locate and track objects in the world.</p>
1970 * <p>The camera device auto-exposure routine will limit the exposure time
1971 * of the camera to no more than 20 milliseconds, to minimize motion blur.</p>
1972 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1973 */
1974 public static final int CONTROL_CAPTURE_INTENT_MOTION_TRACKING = 7;
1975
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001976 //
1977 // Enumeration values for CaptureRequest#CONTROL_EFFECT_MODE
1978 //
1979
1980 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001981 * <p>No color effect will be applied.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001982 * @see CaptureRequest#CONTROL_EFFECT_MODE
1983 */
1984 public static final int CONTROL_EFFECT_MODE_OFF = 0;
1985
1986 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001987 * <p>A "monocolor" effect where the image is mapped into
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001988 * a single color.</p>
1989 * <p>This will typically be grayscale.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001990 * @see CaptureRequest#CONTROL_EFFECT_MODE
1991 */
1992 public static final int CONTROL_EFFECT_MODE_MONO = 1;
1993
1994 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001995 * <p>A "photo-negative" effect where the image's colors
1996 * are inverted.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001997 * @see CaptureRequest#CONTROL_EFFECT_MODE
1998 */
1999 public static final int CONTROL_EFFECT_MODE_NEGATIVE = 2;
2000
2001 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08002002 * <p>A "solarisation" effect (Sabattier effect) where the
2003 * image is wholly or partially reversed in
2004 * tone.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002005 * @see CaptureRequest#CONTROL_EFFECT_MODE
2006 */
2007 public static final int CONTROL_EFFECT_MODE_SOLARIZE = 3;
2008
2009 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08002010 * <p>A "sepia" effect where the image is mapped into warm
2011 * gray, red, and brown tones.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002012 * @see CaptureRequest#CONTROL_EFFECT_MODE
2013 */
2014 public static final int CONTROL_EFFECT_MODE_SEPIA = 4;
2015
2016 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08002017 * <p>A "posterization" effect where the image uses
2018 * discrete regions of tone rather than a continuous
2019 * gradient of tones.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002020 * @see CaptureRequest#CONTROL_EFFECT_MODE
2021 */
2022 public static final int CONTROL_EFFECT_MODE_POSTERIZE = 5;
2023
2024 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08002025 * <p>A "whiteboard" effect where the image is typically displayed
2026 * as regions of white, with black or grey details.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002027 * @see CaptureRequest#CONTROL_EFFECT_MODE
2028 */
2029 public static final int CONTROL_EFFECT_MODE_WHITEBOARD = 6;
2030
2031 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08002032 * <p>A "blackboard" effect where the image is typically displayed
2033 * as regions of black, with white or grey details.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002034 * @see CaptureRequest#CONTROL_EFFECT_MODE
2035 */
2036 public static final int CONTROL_EFFECT_MODE_BLACKBOARD = 7;
2037
2038 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08002039 * <p>An "aqua" effect where a blue hue is added to the image.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002040 * @see CaptureRequest#CONTROL_EFFECT_MODE
2041 */
2042 public static final int CONTROL_EFFECT_MODE_AQUA = 8;
2043
2044 //
2045 // Enumeration values for CaptureRequest#CONTROL_MODE
2046 //
2047
2048 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002049 * <p>Full application control of pipeline.</p>
2050 * <p>All control by the device's metering and focusing (3A)
2051 * routines is disabled, and no other settings in
2052 * android.control.* have any effect, except that
2053 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} may be used by the camera
2054 * device to select post-processing values for processing
2055 * blocks that do not allow for manual control, or are not
2056 * exposed by the camera API.</p>
2057 * <p>However, the camera device's 3A routines may continue to
2058 * collect statistics and update their internal state so that
2059 * when control is switched to AUTO mode, good control values
2060 * can be immediately applied.</p>
2061 *
2062 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002063 * @see CaptureRequest#CONTROL_MODE
2064 */
2065 public static final int CONTROL_MODE_OFF = 0;
2066
2067 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002068 * <p>Use settings for each individual 3A routine.</p>
2069 * <p>Manual control of capture parameters is disabled. All
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002070 * controls in android.control.* besides sceneMode take
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002071 * effect.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002072 * @see CaptureRequest#CONTROL_MODE
2073 */
2074 public static final int CONTROL_MODE_AUTO = 1;
2075
2076 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002077 * <p>Use a specific scene mode.</p>
2078 * <p>Enabling this disables control.aeMode, control.awbMode and
2079 * control.afMode controls; the camera device will ignore
2080 * those settings while USE_SCENE_MODE is active (except for
Zhijun Heee2ebde2015-06-16 19:58:11 -07002081 * FACE_PRIORITY scene mode). Other control entries are still active.
2082 * This setting can only be used if scene mode is supported (i.e.
2083 * {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002084 * contain some modes other than DISABLED).</p>
Zhijun Hea4866242014-03-27 23:51:34 -07002085 *
2086 * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002087 * @see CaptureRequest#CONTROL_MODE
2088 */
2089 public static final int CONTROL_MODE_USE_SCENE_MODE = 2;
2090
Zhijun He2d5e8972014-02-07 16:13:46 -08002091 /**
2092 * <p>Same as OFF mode, except that this capture will not be
2093 * used by camera device background auto-exposure, auto-white balance and
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002094 * auto-focus algorithms (3A) to update their statistics.</p>
2095 * <p>Specifically, the 3A routines are locked to the last
2096 * values set from a request with AUTO, OFF, or
2097 * USE_SCENE_MODE, and any statistics or state updates
2098 * collected from manual captures with OFF_KEEP_STATE will be
2099 * discarded by the camera device.</p>
Zhijun He2d5e8972014-02-07 16:13:46 -08002100 * @see CaptureRequest#CONTROL_MODE
2101 */
2102 public static final int CONTROL_MODE_OFF_KEEP_STATE = 3;
2103
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002104 //
2105 // Enumeration values for CaptureRequest#CONTROL_SCENE_MODE
2106 //
2107
2108 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002109 * <p>Indicates that no scene modes are set for a given capture request.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002110 * @see CaptureRequest#CONTROL_SCENE_MODE
2111 */
Ruben Brunke6679362014-01-17 17:05:54 -08002112 public static final int CONTROL_SCENE_MODE_DISABLED = 0;
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002113
2114 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002115 * <p>If face detection support exists, use face
2116 * detection data for auto-focus, auto-white balance, and
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002117 * auto-exposure routines.</p>
2118 * <p>If face detection statistics are disabled
2119 * (i.e. {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} is set to OFF),
Ruben Brunke6679362014-01-17 17:05:54 -08002120 * this should still operate correctly (but will not return
2121 * face detection statistics to the framework).</p>
2122 * <p>Unlike the other scene modes, {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode},
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002123 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}
Ruben Brunke6679362014-01-17 17:05:54 -08002124 * remain active when FACE_PRIORITY is set.</p>
2125 *
2126 * @see CaptureRequest#CONTROL_AE_MODE
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002127 * @see CaptureRequest#CONTROL_AF_MODE
Ruben Brunke6679362014-01-17 17:05:54 -08002128 * @see CaptureRequest#CONTROL_AWB_MODE
2129 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002130 * @see CaptureRequest#CONTROL_SCENE_MODE
2131 */
2132 public static final int CONTROL_SCENE_MODE_FACE_PRIORITY = 1;
2133
2134 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002135 * <p>Optimized for photos of quickly moving objects.</p>
2136 * <p>Similar to SPORTS.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002137 * @see CaptureRequest#CONTROL_SCENE_MODE
2138 */
2139 public static final int CONTROL_SCENE_MODE_ACTION = 2;
2140
2141 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002142 * <p>Optimized for still photos of people.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002143 * @see CaptureRequest#CONTROL_SCENE_MODE
2144 */
2145 public static final int CONTROL_SCENE_MODE_PORTRAIT = 3;
2146
2147 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002148 * <p>Optimized for photos of distant macroscopic objects.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002149 * @see CaptureRequest#CONTROL_SCENE_MODE
2150 */
2151 public static final int CONTROL_SCENE_MODE_LANDSCAPE = 4;
2152
2153 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002154 * <p>Optimized for low-light settings.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002155 * @see CaptureRequest#CONTROL_SCENE_MODE
2156 */
2157 public static final int CONTROL_SCENE_MODE_NIGHT = 5;
2158
2159 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002160 * <p>Optimized for still photos of people in low-light
2161 * settings.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002162 * @see CaptureRequest#CONTROL_SCENE_MODE
2163 */
2164 public static final int CONTROL_SCENE_MODE_NIGHT_PORTRAIT = 6;
2165
2166 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002167 * <p>Optimized for dim, indoor settings where flash must
2168 * remain off.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002169 * @see CaptureRequest#CONTROL_SCENE_MODE
2170 */
2171 public static final int CONTROL_SCENE_MODE_THEATRE = 7;
2172
2173 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002174 * <p>Optimized for bright, outdoor beach settings.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002175 * @see CaptureRequest#CONTROL_SCENE_MODE
2176 */
2177 public static final int CONTROL_SCENE_MODE_BEACH = 8;
2178
2179 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002180 * <p>Optimized for bright, outdoor settings containing snow.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002181 * @see CaptureRequest#CONTROL_SCENE_MODE
2182 */
2183 public static final int CONTROL_SCENE_MODE_SNOW = 9;
2184
2185 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002186 * <p>Optimized for scenes of the setting sun.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002187 * @see CaptureRequest#CONTROL_SCENE_MODE
2188 */
2189 public static final int CONTROL_SCENE_MODE_SUNSET = 10;
2190
2191 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002192 * <p>Optimized to avoid blurry photos due to small amounts of
2193 * device motion (for example: due to hand shake).</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002194 * @see CaptureRequest#CONTROL_SCENE_MODE
2195 */
2196 public static final int CONTROL_SCENE_MODE_STEADYPHOTO = 11;
2197
2198 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002199 * <p>Optimized for nighttime photos of fireworks.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002200 * @see CaptureRequest#CONTROL_SCENE_MODE
2201 */
2202 public static final int CONTROL_SCENE_MODE_FIREWORKS = 12;
2203
2204 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002205 * <p>Optimized for photos of quickly moving people.</p>
2206 * <p>Similar to ACTION.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002207 * @see CaptureRequest#CONTROL_SCENE_MODE
2208 */
2209 public static final int CONTROL_SCENE_MODE_SPORTS = 13;
2210
2211 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002212 * <p>Optimized for dim, indoor settings with multiple moving
2213 * people.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002214 * @see CaptureRequest#CONTROL_SCENE_MODE
2215 */
2216 public static final int CONTROL_SCENE_MODE_PARTY = 14;
2217
2218 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002219 * <p>Optimized for dim settings where the main light source
Shuzhen Wang2b11fdd2018-10-11 09:17:08 -07002220 * is a candle.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002221 * @see CaptureRequest#CONTROL_SCENE_MODE
2222 */
2223 public static final int CONTROL_SCENE_MODE_CANDLELIGHT = 15;
2224
2225 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002226 * <p>Optimized for accurately capturing a photo of barcode
2227 * for use by camera applications that wish to read the
2228 * barcode value.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002229 * @see CaptureRequest#CONTROL_SCENE_MODE
2230 */
2231 public static final int CONTROL_SCENE_MODE_BARCODE = 16;
2232
Zhijun Hee0404182014-06-26 13:17:09 -07002233 /**
Eino-Ville Talvala639fffe2015-06-30 10:34:48 -07002234 * <p>This is deprecated, please use {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }
2235 * and {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList }
Zhijun Hefab663e2015-05-26 19:46:31 -07002236 * for high speed video recording.</p>
Zhijun Hee0404182014-06-26 13:17:09 -07002237 * <p>Optimized for high speed video recording (frame rate &gt;=60fps) use case.</p>
2238 * <p>The supported high speed video sizes and fps ranges are specified in
2239 * android.control.availableHighSpeedVideoConfigurations. To get desired
2240 * output frame rates, the application is only allowed to select video size
2241 * and fps range combinations listed in this static metadata. The fps range
2242 * can be control via {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}.</p>
2243 * <p>In this mode, the camera device will override aeMode, awbMode, and afMode to
2244 * ON, ON, and CONTINUOUS_VIDEO, respectively. All post-processing block mode
2245 * controls will be overridden to be FAST. Therefore, no manual control of capture
2246 * and post-processing parameters is possible. All other controls operate the
2247 * same as when {@link CaptureRequest#CONTROL_MODE android.control.mode} == AUTO. This means that all other
2248 * android.control.* fields continue to work, such as</p>
2249 * <ul>
2250 * <li>{@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}</li>
2251 * <li>{@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}</li>
2252 * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li>
2253 * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li>
2254 * <li>{@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</li>
2255 * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li>
2256 * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li>
2257 * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li>
2258 * <li>{@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}</li>
2259 * <li>{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}</li>
2260 * </ul>
2261 * <p>Outside of android.control.*, the following controls will work:</p>
2262 * <ul>
2263 * <li>{@link CaptureRequest#FLASH_MODE android.flash.mode} (automatic flash for still capture will not work since aeMode is ON)</li>
2264 * <li>{@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} (if it is supported)</li>
2265 * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li>
2266 * <li>{@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}</li>
2267 * </ul>
2268 * <p>For high speed recording use case, the actual maximum supported frame rate may
2269 * be lower than what camera can output, depending on the destination Surfaces for
2270 * the image data. For example, if the destination surface is from video encoder,
2271 * the application need check if the video encoder is capable of supporting the
2272 * high frame rate for a given video size, or it will end up with lower recording
2273 * frame rate. If the destination surface is from preview window, the preview frame
2274 * rate will be bounded by the screen refresh rate.</p>
2275 * <p>The camera device will only support up to 2 output high speed streams
2276 * (processed non-stalling format defined in android.request.maxNumOutputStreams)
2277 * in this mode. This control will be effective only if all of below conditions are true:</p>
2278 * <ul>
2279 * <li>The application created no more than maxNumHighSpeedStreams processed non-stalling
2280 * format output streams, where maxNumHighSpeedStreams is calculated as
2281 * min(2, android.request.maxNumOutputStreams[Processed (but not-stalling)]).</li>
2282 * <li>The stream sizes are selected from the sizes reported by
2283 * android.control.availableHighSpeedVideoConfigurations.</li>
2284 * <li>No processed non-stalling or raw streams are configured.</li>
2285 * </ul>
2286 * <p>When above conditions are NOT satistied, the controls of this mode and
2287 * {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} will be ignored by the camera device,
2288 * the camera device will fall back to {@link CaptureRequest#CONTROL_MODE android.control.mode} <code>==</code> AUTO,
2289 * and the returned capture result metadata will give the fps range choosen
2290 * by the camera device.</p>
2291 * <p>Switching into or out of this mode may trigger some camera ISP/sensor
2292 * reconfigurations, which may introduce extra latency. It is recommended that
2293 * the application avoids unnecessary scene mode switch as much as possible.</p>
2294 *
2295 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
2296 * @see CaptureRequest#CONTROL_AE_LOCK
2297 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
2298 * @see CaptureRequest#CONTROL_AE_REGIONS
2299 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
2300 * @see CaptureRequest#CONTROL_AF_REGIONS
2301 * @see CaptureRequest#CONTROL_AF_TRIGGER
2302 * @see CaptureRequest#CONTROL_AWB_LOCK
2303 * @see CaptureRequest#CONTROL_AWB_REGIONS
2304 * @see CaptureRequest#CONTROL_EFFECT_MODE
2305 * @see CaptureRequest#CONTROL_MODE
2306 * @see CaptureRequest#FLASH_MODE
2307 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
2308 * @see CaptureRequest#SCALER_CROP_REGION
2309 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
2310 * @see CaptureRequest#CONTROL_SCENE_MODE
Zhijun Hefab663e2015-05-26 19:46:31 -07002311 * @deprecated Please refer to this API documentation to find the alternatives
Zhijun Hee0404182014-06-26 13:17:09 -07002312 */
Aurimas Liutikas514c5ef2016-05-24 15:22:55 -07002313 @Deprecated
Zhijun Hee0404182014-06-26 13:17:09 -07002314 public static final int CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO = 17;
2315
Ruben Brunkff99a0a2014-08-28 18:42:35 -07002316 /**
Eino-Ville Talvalaf4eac122014-12-05 11:10:15 -08002317 * <p>Turn on a device-specific high dynamic range (HDR) mode.</p>
2318 * <p>In this scene mode, the camera device captures images
2319 * that keep a larger range of scene illumination levels
2320 * visible in the final image. For example, when taking a
2321 * picture of a object in front of a bright window, both
2322 * the object and the scene through the window may be
2323 * visible when using HDR mode, while in normal AUTO mode,
2324 * one or the other may be poorly exposed. As a tradeoff,
2325 * HDR mode generally takes much longer to capture a single
2326 * image, has no user control, and may have other artifacts
2327 * depending on the HDR method used.</p>
2328 * <p>Therefore, HDR captures operate at a much slower rate
2329 * than regular captures.</p>
2330 * <p>In this mode, on LIMITED or FULL devices, when a request
2331 * is made with a {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} of
2332 * STILL_CAPTURE, the camera device will capture an image
2333 * using a high dynamic range capture technique. On LEGACY
2334 * devices, captures that target a JPEG-format output will
2335 * be captured with HDR, and the capture intent is not
2336 * relevant.</p>
2337 * <p>The HDR capture may involve the device capturing a burst
2338 * of images internally and combining them into one, or it
2339 * may involve the device using specialized high dynamic
2340 * range capture hardware. In all cases, a single image is
2341 * produced in response to a capture request submitted
2342 * while in HDR mode.</p>
2343 * <p>Since substantial post-processing is generally needed to
Eino-Ville Talvalac7c569d2016-04-04 10:48:38 -07002344 * produce an HDR image, only YUV, PRIVATE, and JPEG
2345 * outputs are supported for LIMITED/FULL device HDR
2346 * captures, and only JPEG outputs are supported for LEGACY
2347 * HDR captures. Using a RAW output for HDR capture is not
Eino-Ville Talvalaf4eac122014-12-05 11:10:15 -08002348 * supported.</p>
Eino-Ville Talvalac7c569d2016-04-04 10:48:38 -07002349 * <p>Some devices may also support always-on HDR, which
2350 * applies HDR processing at full frame rate. For these
2351 * devices, intents other than STILL_CAPTURE will also
2352 * produce an HDR output with no frame rate impact compared
2353 * to normal operation, though the quality may be lower
2354 * than for STILL_CAPTURE intents.</p>
2355 * <p>If SCENE_MODE_HDR is used with unsupported output types
2356 * or capture intents, the images captured will be as if
2357 * the SCENE_MODE was not enabled at all.</p>
Eino-Ville Talvalaf4eac122014-12-05 11:10:15 -08002358 *
2359 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
Ruben Brunkff99a0a2014-08-28 18:42:35 -07002360 * @see CaptureRequest#CONTROL_SCENE_MODE
Ruben Brunkff99a0a2014-08-28 18:42:35 -07002361 */
2362 public static final int CONTROL_SCENE_MODE_HDR = 18;
2363
Zhijun Heee2ebde2015-06-16 19:58:11 -07002364 /**
2365 * <p>Same as FACE_PRIORITY scene mode, except that the camera
Zhijun He4fb81252015-07-11 20:02:30 -07002366 * device will choose higher sensitivity values ({@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity})
Zhijun Heee2ebde2015-06-16 19:58:11 -07002367 * under low light conditions.</p>
2368 * <p>The camera device may be tuned to expose the images in a reduced
2369 * sensitivity range to produce the best quality images. For example,
2370 * if the {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange} gives range of [100, 1600],
2371 * the camera device auto-exposure routine tuning process may limit the actual
Zhijun He4fb81252015-07-11 20:02:30 -07002372 * exposure sensitivity range to [100, 1200] to ensure that the noise level isn't
2373 * exessive in order to preserve the image quality. Under this situation, the image under
Zhijun Heee2ebde2015-06-16 19:58:11 -07002374 * low light may be under-exposed when the sensor max exposure time (bounded by the
2375 * {@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 -07002376 * ON_* modes) and effective max sensitivity are reached. This scene mode allows the
Zhijun Heee2ebde2015-06-16 19:58:11 -07002377 * camera device auto-exposure routine to increase the sensitivity up to the max
2378 * sensitivity specified by {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange} when the scene is too
2379 * dark and the max exposure time is reached. The captured images may be noisier
Zhijun He4fb81252015-07-11 20:02:30 -07002380 * compared with the images captured in normal FACE_PRIORITY mode; therefore, it is
Zhijun Heee2ebde2015-06-16 19:58:11 -07002381 * recommended that the application only use this scene mode when it is capable of
2382 * reducing the noise level of the captured images.</p>
2383 * <p>Unlike the other scene modes, {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode},
2384 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}
2385 * remain active when FACE_PRIORITY_LOW_LIGHT is set.</p>
2386 *
2387 * @see CaptureRequest#CONTROL_AE_MODE
2388 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
2389 * @see CaptureRequest#CONTROL_AF_MODE
2390 * @see CaptureRequest#CONTROL_AWB_MODE
2391 * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
2392 * @see CaptureRequest#SENSOR_SENSITIVITY
2393 * @see CaptureRequest#CONTROL_SCENE_MODE
2394 * @hide
2395 */
2396 public static final int CONTROL_SCENE_MODE_FACE_PRIORITY_LOW_LIGHT = 19;
2397
Yin-Chia Yeh37348202016-03-09 14:44:49 -08002398 /**
2399 * <p>Scene mode values within the range of
2400 * <code>[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]</code> are reserved for device specific
2401 * customized scene modes.</p>
2402 * @see CaptureRequest#CONTROL_SCENE_MODE
2403 * @hide
2404 */
2405 public static final int CONTROL_SCENE_MODE_DEVICE_CUSTOM_START = 100;
2406
2407 /**
2408 * <p>Scene mode values within the range of
2409 * <code>[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]</code> are reserved for device specific
2410 * customized scene modes.</p>
2411 * @see CaptureRequest#CONTROL_SCENE_MODE
2412 * @hide
2413 */
2414 public static final int CONTROL_SCENE_MODE_DEVICE_CUSTOM_END = 127;
2415
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002416 //
Zhijun He4793af52014-05-05 10:39:12 -07002417 // Enumeration values for CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
2418 //
2419
2420 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002421 * <p>Video stabilization is disabled.</p>
Zhijun He4793af52014-05-05 10:39:12 -07002422 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
2423 */
2424 public static final int CONTROL_VIDEO_STABILIZATION_MODE_OFF = 0;
2425
2426 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002427 * <p>Video stabilization is enabled.</p>
Zhijun He4793af52014-05-05 10:39:12 -07002428 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
2429 */
2430 public static final int CONTROL_VIDEO_STABILIZATION_MODE_ON = 1;
2431
2432 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002433 // Enumeration values for CaptureRequest#EDGE_MODE
2434 //
2435
2436 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002437 * <p>No edge enhancement is applied.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002438 * @see CaptureRequest#EDGE_MODE
2439 */
2440 public static final int EDGE_MODE_OFF = 0;
2441
2442 /**
Chien-Yu Chen9c9167e2015-07-14 16:38:25 -07002443 * <p>Apply edge enhancement at a quality level that does not slow down frame rate
2444 * relative to sensor output. It may be the same as OFF if edge enhancement will
2445 * slow down frame rate relative to sensor.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002446 * @see CaptureRequest#EDGE_MODE
2447 */
2448 public static final int EDGE_MODE_FAST = 1;
2449
2450 /**
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07002451 * <p>Apply high-quality edge enhancement, at a cost of possibly reduced output frame rate.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002452 * @see CaptureRequest#EDGE_MODE
2453 */
2454 public static final int EDGE_MODE_HIGH_QUALITY = 2;
2455
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002456 /**
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08002457 * <p>Edge enhancement is applied at different
2458 * levels for different output streams, based on resolution. Streams at maximum recording
2459 * resolution (see {@link android.hardware.camera2.CameraDevice#createCaptureSession })
2460 * or below have edge enhancement applied, while higher-resolution streams have no edge
2461 * enhancement applied. The level of edge enhancement for low-resolution streams is tuned
2462 * so that frame rate is not impacted, and the quality is equal to or better than FAST
2463 * (since it is only applied to lower-resolution outputs, quality may improve from FAST).</p>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002464 * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode
2465 * with YUV or PRIVATE reprocessing, where the application continuously captures
2466 * high-resolution intermediate buffers into a circular buffer, from which a final image is
2467 * produced via reprocessing when a user takes a picture. For such a use case, the
2468 * high-resolution buffers must not have edge enhancement applied to maximize efficiency of
2469 * preview and to avoid double-applying enhancement when reprocessed, while low-resolution
2470 * buffers (used for recording or preview, generally) need edge enhancement applied for
2471 * reasonable preview quality.</p>
2472 * <p>This mode is guaranteed to be supported by devices that support either the
2473 * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
Chien-Yu Chen72333912015-07-08 11:55:19 -07002474 * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} lists either of those capabilities) and it will
2475 * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002476 *
2477 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2478 * @see CaptureRequest#EDGE_MODE
2479 */
2480 public static final int EDGE_MODE_ZERO_SHUTTER_LAG = 3;
2481
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002482 //
2483 // Enumeration values for CaptureRequest#FLASH_MODE
2484 //
2485
2486 /**
Zhijun He66d065a2014-01-16 18:18:50 -08002487 * <p>Do not fire the flash for this capture.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002488 * @see CaptureRequest#FLASH_MODE
2489 */
2490 public static final int FLASH_MODE_OFF = 0;
2491
2492 /**
Zhijun He66d065a2014-01-16 18:18:50 -08002493 * <p>If the flash is available and charged, fire flash
Zhijun He89492252014-05-23 13:49:59 -07002494 * for this capture.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002495 * @see CaptureRequest#FLASH_MODE
2496 */
2497 public static final int FLASH_MODE_SINGLE = 1;
2498
2499 /**
Zhijun He66d065a2014-01-16 18:18:50 -08002500 * <p>Transition flash to continuously on.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002501 * @see CaptureRequest#FLASH_MODE
2502 */
2503 public static final int FLASH_MODE_TORCH = 2;
2504
2505 //
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002506 // Enumeration values for CaptureRequest#HOT_PIXEL_MODE
2507 //
2508
2509 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002510 * <p>No hot pixel correction is applied.</p>
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002511 * <p>The frame rate must not be reduced relative to sensor raw output
2512 * for this option.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002513 * <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 -08002514 *
2515 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002516 * @see CaptureRequest#HOT_PIXEL_MODE
2517 */
2518 public static final int HOT_PIXEL_MODE_OFF = 0;
2519
2520 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002521 * <p>Hot pixel correction is applied, without reducing frame
2522 * rate relative to sensor raw output.</p>
2523 * <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 -08002524 *
2525 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002526 * @see CaptureRequest#HOT_PIXEL_MODE
2527 */
2528 public static final int HOT_PIXEL_MODE_FAST = 1;
2529
2530 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002531 * <p>High-quality hot pixel correction is applied, at a cost
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07002532 * of possibly reduced frame rate relative to sensor raw output.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002533 * <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 -08002534 *
2535 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002536 * @see CaptureRequest#HOT_PIXEL_MODE
2537 */
2538 public static final int HOT_PIXEL_MODE_HIGH_QUALITY = 2;
2539
2540 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002541 // Enumeration values for CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
2542 //
2543
2544 /**
Ruben Brunk00849b32014-01-17 18:30:23 -08002545 * <p>Optical stabilization is unavailable.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002546 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
2547 */
2548 public static final int LENS_OPTICAL_STABILIZATION_MODE_OFF = 0;
2549
2550 /**
Ruben Brunk00849b32014-01-17 18:30:23 -08002551 * <p>Optical stabilization is enabled.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002552 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
2553 */
2554 public static final int LENS_OPTICAL_STABILIZATION_MODE_ON = 1;
2555
2556 //
2557 // Enumeration values for CaptureRequest#NOISE_REDUCTION_MODE
2558 //
2559
2560 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002561 * <p>No noise reduction is applied.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002562 * @see CaptureRequest#NOISE_REDUCTION_MODE
2563 */
2564 public static final int NOISE_REDUCTION_MODE_OFF = 0;
2565
2566 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002567 * <p>Noise reduction is applied without reducing frame rate relative to sensor
Chien-Yu Chen9c9167e2015-07-14 16:38:25 -07002568 * output. It may be the same as OFF if noise reduction will reduce frame rate
2569 * relative to sensor.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002570 * @see CaptureRequest#NOISE_REDUCTION_MODE
2571 */
2572 public static final int NOISE_REDUCTION_MODE_FAST = 1;
2573
2574 /**
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07002575 * <p>High-quality noise reduction is applied, at the cost of possibly reduced frame
2576 * rate relative to sensor output.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002577 * @see CaptureRequest#NOISE_REDUCTION_MODE
2578 */
2579 public static final int NOISE_REDUCTION_MODE_HIGH_QUALITY = 2;
2580
Zhijun He0e99c222015-01-29 15:26:05 -08002581 /**
2582 * <p>MINIMAL noise reduction is applied without reducing frame rate relative to
2583 * sensor output. </p>
2584 * @see CaptureRequest#NOISE_REDUCTION_MODE
2585 */
2586 public static final int NOISE_REDUCTION_MODE_MINIMAL = 3;
2587
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002588 /**
2589 * <p>Noise reduction is applied at different levels for different output streams,
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08002590 * based on resolution. Streams at maximum recording resolution (see {@link android.hardware.camera2.CameraDevice#createCaptureSession })
2591 * or below have noise reduction applied, while higher-resolution streams have MINIMAL (if
2592 * supported) or no noise reduction applied (if MINIMAL is not supported.) The degree of
2593 * noise reduction for low-resolution streams is tuned so that frame rate is not impacted,
2594 * and the quality is equal to or better than FAST (since it is only applied to
2595 * lower-resolution outputs, quality may improve from FAST).</p>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002596 * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode
2597 * with YUV or PRIVATE reprocessing, where the application continuously captures
2598 * high-resolution intermediate buffers into a circular buffer, from which a final image is
2599 * produced via reprocessing when a user takes a picture. For such a use case, the
2600 * high-resolution buffers must not have noise reduction applied to maximize efficiency of
2601 * preview and to avoid over-applying noise filtering when reprocessing, while
2602 * low-resolution buffers (used for recording or preview, generally) need noise reduction
2603 * applied for reasonable preview quality.</p>
2604 * <p>This mode is guaranteed to be supported by devices that support either the
2605 * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
Chien-Yu Chen72333912015-07-08 11:55:19 -07002606 * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} lists either of those capabilities) and it will
2607 * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002608 *
2609 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2610 * @see CaptureRequest#NOISE_REDUCTION_MODE
2611 */
2612 public static final int NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG = 4;
2613
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002614 //
Igor Murashkinc127f052014-01-17 18:06:02 -08002615 // Enumeration values for CaptureRequest#SENSOR_TEST_PATTERN_MODE
2616 //
2617
2618 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002619 * <p>No test pattern mode is used, and the camera
Igor Murashkinc127f052014-01-17 18:06:02 -08002620 * device returns captures from the image sensor.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002621 * <p>This is the default if the key is not set.</p>
Igor Murashkinc127f052014-01-17 18:06:02 -08002622 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2623 */
2624 public static final int SENSOR_TEST_PATTERN_MODE_OFF = 0;
2625
2626 /**
2627 * <p>Each pixel in <code>[R, G_even, G_odd, B]</code> is replaced by its
2628 * respective color channel provided in
2629 * {@link CaptureRequest#SENSOR_TEST_PATTERN_DATA android.sensor.testPatternData}.</p>
2630 * <p>For example:</p>
2631 * <pre><code>android.testPatternData = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0]
2632 * </code></pre>
2633 * <p>All green pixels are 100% green. All red/blue pixels are black.</p>
2634 * <pre><code>android.testPatternData = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0]
2635 * </code></pre>
2636 * <p>All red pixels are 100% red. Only the odd green pixels
2637 * are 100% green. All blue pixels are 100% black.</p>
2638 *
2639 * @see CaptureRequest#SENSOR_TEST_PATTERN_DATA
2640 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2641 */
2642 public static final int SENSOR_TEST_PATTERN_MODE_SOLID_COLOR = 1;
2643
2644 /**
2645 * <p>All pixel data is replaced with an 8-bar color pattern.</p>
2646 * <p>The vertical bars (left-to-right) are as follows:</p>
2647 * <ul>
2648 * <li>100% white</li>
2649 * <li>yellow</li>
2650 * <li>cyan</li>
2651 * <li>green</li>
2652 * <li>magenta</li>
2653 * <li>red</li>
2654 * <li>blue</li>
2655 * <li>black</li>
2656 * </ul>
2657 * <p>In general the image would look like the following:</p>
2658 * <pre><code>W Y C G M R B K
2659 * W Y C G M R B K
2660 * W Y C G M R B K
2661 * W Y C G M R B K
2662 * W Y C G M R B K
2663 * . . . . . . . .
2664 * . . . . . . . .
2665 * . . . . . . . .
2666 *
2667 * (B = Blue, K = Black)
2668 * </code></pre>
2669 * <p>Each bar should take up 1/8 of the sensor pixel array width.
2670 * When this is not possible, the bar size should be rounded
2671 * down to the nearest integer and the pattern can repeat
2672 * on the right side.</p>
2673 * <p>Each bar's height must always take up the full sensor
2674 * pixel array height.</p>
2675 * <p>Each pixel in this test pattern must be set to either
2676 * 0% intensity or 100% intensity.</p>
2677 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2678 */
2679 public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS = 2;
2680
2681 /**
2682 * <p>The test pattern is similar to COLOR_BARS, except that
2683 * each bar should start at its specified color at the top,
2684 * and fade to gray at the bottom.</p>
2685 * <p>Furthermore each bar is further subdivided into a left and
2686 * right half. The left half should have a smooth gradient,
2687 * and the right half should have a quantized gradient.</p>
2688 * <p>In particular, the right half's should consist of blocks of the
2689 * same color for 1/16th active sensor pixel array width.</p>
2690 * <p>The least significant bits in the quantized gradient should
2691 * be copied from the most significant bits of the smooth gradient.</p>
2692 * <p>The height of each bar should always be a multiple of 128.
2693 * When this is not the case, the pattern should repeat at the bottom
2694 * of the image.</p>
2695 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2696 */
2697 public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY = 3;
2698
2699 /**
2700 * <p>All pixel data is replaced by a pseudo-random sequence
2701 * generated from a PN9 512-bit sequence (typically implemented
2702 * in hardware with a linear feedback shift register).</p>
2703 * <p>The generator should be reset at the beginning of each frame,
2704 * and thus each subsequent raw frame with this test pattern should
2705 * be exactly the same as the last.</p>
2706 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2707 */
2708 public static final int SENSOR_TEST_PATTERN_MODE_PN9 = 4;
2709
2710 /**
2711 * <p>The first custom test pattern. All custom patterns that are
2712 * available only on this camera device are at least this numeric
2713 * value.</p>
2714 * <p>All of the custom test patterns will be static
2715 * (that is the raw image must not vary from frame to frame).</p>
2716 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2717 */
2718 public static final int SENSOR_TEST_PATTERN_MODE_CUSTOM1 = 256;
2719
2720 //
Zhijun Heba93fe62014-01-17 16:43:05 -08002721 // Enumeration values for CaptureRequest#SHADING_MODE
2722 //
2723
2724 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002725 * <p>No lens shading correction is applied.</p>
Zhijun Heba93fe62014-01-17 16:43:05 -08002726 * @see CaptureRequest#SHADING_MODE
Zhijun Heba93fe62014-01-17 16:43:05 -08002727 */
2728 public static final int SHADING_MODE_OFF = 0;
2729
2730 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002731 * <p>Apply lens shading corrections, without slowing
2732 * frame rate relative to sensor raw output</p>
Zhijun Heba93fe62014-01-17 16:43:05 -08002733 * @see CaptureRequest#SHADING_MODE
Zhijun Heba93fe62014-01-17 16:43:05 -08002734 */
2735 public static final int SHADING_MODE_FAST = 1;
2736
2737 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002738 * <p>Apply high-quality lens shading correction, at the
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07002739 * cost of possibly reduced frame rate.</p>
Zhijun Heba93fe62014-01-17 16:43:05 -08002740 * @see CaptureRequest#SHADING_MODE
Zhijun Heba93fe62014-01-17 16:43:05 -08002741 */
2742 public static final int SHADING_MODE_HIGH_QUALITY = 2;
2743
2744 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002745 // Enumeration values for CaptureRequest#STATISTICS_FACE_DETECT_MODE
2746 //
2747
2748 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002749 * <p>Do not include face detection statistics in capture
2750 * results.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002751 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
2752 */
2753 public static final int STATISTICS_FACE_DETECT_MODE_OFF = 0;
2754
2755 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002756 * <p>Return face rectangle and confidence values only.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002757 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
2758 */
2759 public static final int STATISTICS_FACE_DETECT_MODE_SIMPLE = 1;
2760
2761 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002762 * <p>Return all face
2763 * metadata.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002764 * <p>In this mode, face rectangles, scores, landmarks, and face IDs are all valid.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002765 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
2766 */
2767 public static final int STATISTICS_FACE_DETECT_MODE_FULL = 2;
2768
2769 //
Eino-Ville Talvalad96748b2013-09-12 11:11:27 -07002770 // Enumeration values for CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
2771 //
2772
2773 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002774 * <p>Do not include a lens shading map in the capture result.</p>
Eino-Ville Talvalad96748b2013-09-12 11:11:27 -07002775 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
2776 */
2777 public static final int STATISTICS_LENS_SHADING_MAP_MODE_OFF = 0;
2778
2779 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002780 * <p>Include a lens shading map in the capture result.</p>
Eino-Ville Talvalad96748b2013-09-12 11:11:27 -07002781 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
2782 */
2783 public static final int STATISTICS_LENS_SHADING_MAP_MODE_ON = 1;
2784
2785 //
Chien-Yu Chenc9cf5b92018-01-18 12:24:40 -08002786 // Enumeration values for CaptureRequest#STATISTICS_OIS_DATA_MODE
2787 //
2788
2789 /**
2790 * <p>Do not include OIS data in the capture result.</p>
2791 * @see CaptureRequest#STATISTICS_OIS_DATA_MODE
2792 */
2793 public static final int STATISTICS_OIS_DATA_MODE_OFF = 0;
2794
2795 /**
2796 * <p>Include OIS data in the capture result.</p>
Chien-Yu Chenc804d1c2018-02-15 12:44:19 -08002797 * <p>{@link CaptureResult#STATISTICS_OIS_SAMPLES android.statistics.oisSamples} provides OIS sample data in the
2798 * output result metadata.</p>
2799 *
2800 * @see CaptureResult#STATISTICS_OIS_SAMPLES
Chien-Yu Chenc9cf5b92018-01-18 12:24:40 -08002801 * @see CaptureRequest#STATISTICS_OIS_DATA_MODE
2802 */
2803 public static final int STATISTICS_OIS_DATA_MODE_ON = 1;
2804
2805 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002806 // Enumeration values for CaptureRequest#TONEMAP_MODE
2807 //
2808
2809 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002810 * <p>Use the tone mapping curve specified in
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07002811 * the {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}* entries.</p>
Igor Murashkine0060932014-01-17 17:24:11 -08002812 * <p>All color enhancement and tonemapping must be disabled, except
2813 * for applying the tonemapping curve specified by
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07002814 * {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p>
Igor Murashkine0060932014-01-17 17:24:11 -08002815 * <p>Must not slow down frame rate relative to raw
2816 * sensor output.</p>
2817 *
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07002818 * @see CaptureRequest#TONEMAP_CURVE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002819 * @see CaptureRequest#TONEMAP_MODE
2820 */
2821 public static final int TONEMAP_MODE_CONTRAST_CURVE = 0;
2822
2823 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002824 * <p>Advanced gamma mapping and color enhancement may be applied, without
2825 * reducing frame rate compared to raw sensor output.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002826 * @see CaptureRequest#TONEMAP_MODE
2827 */
2828 public static final int TONEMAP_MODE_FAST = 1;
2829
2830 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002831 * <p>High-quality gamma mapping and color enhancement will be applied, at
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07002832 * the cost of possibly reduced frame rate compared to raw sensor output.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002833 * @see CaptureRequest#TONEMAP_MODE
2834 */
2835 public static final int TONEMAP_MODE_HIGH_QUALITY = 2;
2836
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002837 /**
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002838 * <p>Use the gamma value specified in {@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma} to peform
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002839 * tonemapping.</p>
2840 * <p>All color enhancement and tonemapping must be disabled, except
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002841 * for applying the tonemapping curve specified by {@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma}.</p>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002842 * <p>Must not slow down frame rate relative to raw sensor output.</p>
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002843 *
2844 * @see CaptureRequest#TONEMAP_GAMMA
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002845 * @see CaptureRequest#TONEMAP_MODE
2846 */
2847 public static final int TONEMAP_MODE_GAMMA_VALUE = 3;
2848
2849 /**
2850 * <p>Use the preset tonemapping curve specified in
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002851 * {@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve} to peform tonemapping.</p>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002852 * <p>All color enhancement and tonemapping must be disabled, except
2853 * for applying the tonemapping curve specified by
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002854 * {@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve}.</p>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002855 * <p>Must not slow down frame rate relative to raw sensor output.</p>
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002856 *
2857 * @see CaptureRequest#TONEMAP_PRESET_CURVE
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002858 * @see CaptureRequest#TONEMAP_MODE
2859 */
2860 public static final int TONEMAP_MODE_PRESET_CURVE = 4;
2861
2862 //
2863 // Enumeration values for CaptureRequest#TONEMAP_PRESET_CURVE
2864 //
2865
2866 /**
2867 * <p>Tonemapping curve is defined by sRGB</p>
2868 * @see CaptureRequest#TONEMAP_PRESET_CURVE
2869 */
2870 public static final int TONEMAP_PRESET_CURVE_SRGB = 0;
2871
2872 /**
2873 * <p>Tonemapping curve is defined by ITU-R BT.709</p>
2874 * @see CaptureRequest#TONEMAP_PRESET_CURVE
2875 */
2876 public static final int TONEMAP_PRESET_CURVE_REC709 = 1;
2877
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002878 //
Eino-Ville Talvala41670722018-03-13 19:43:07 -07002879 // Enumeration values for CaptureRequest#DISTORTION_CORRECTION_MODE
2880 //
2881
2882 /**
2883 * <p>No distortion correction is applied.</p>
2884 * @see CaptureRequest#DISTORTION_CORRECTION_MODE
2885 */
2886 public static final int DISTORTION_CORRECTION_MODE_OFF = 0;
2887
2888 /**
2889 * <p>Lens distortion correction is applied without reducing frame rate
2890 * relative to sensor output. It may be the same as OFF if distortion correction would
2891 * reduce frame rate relative to sensor.</p>
2892 * @see CaptureRequest#DISTORTION_CORRECTION_MODE
2893 */
2894 public static final int DISTORTION_CORRECTION_MODE_FAST = 1;
2895
2896 /**
2897 * <p>High-quality distortion correction is applied, at the cost of
2898 * possibly reduced frame rate relative to sensor output.</p>
2899 * @see CaptureRequest#DISTORTION_CORRECTION_MODE
2900 */
2901 public static final int DISTORTION_CORRECTION_MODE_HIGH_QUALITY = 2;
2902
2903 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002904 // Enumeration values for CaptureResult#CONTROL_AE_STATE
2905 //
2906
2907 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002908 * <p>AE is off or recently reset.</p>
2909 * <p>When a camera device is opened, it starts in
Zhijun He60b19dc2014-02-24 10:19:20 -08002910 * this state. This is a transient state, the camera device may skip reporting
2911 * this state in capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002912 * @see CaptureResult#CONTROL_AE_STATE
2913 */
2914 public static final int CONTROL_AE_STATE_INACTIVE = 0;
2915
2916 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002917 * <p>AE doesn't yet have a good set of control values
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002918 * for the current scene.</p>
2919 * <p>This is a transient state, the camera device may skip
Zhijun He60b19dc2014-02-24 10:19:20 -08002920 * reporting this state in capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002921 * @see CaptureResult#CONTROL_AE_STATE
2922 */
2923 public static final int CONTROL_AE_STATE_SEARCHING = 1;
2924
2925 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002926 * <p>AE has a good set of control values for the
Zhijun He228f4f92014-01-16 17:22:05 -08002927 * current scene.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002928 * @see CaptureResult#CONTROL_AE_STATE
2929 */
2930 public static final int CONTROL_AE_STATE_CONVERGED = 2;
2931
2932 /**
Zhijun He228f4f92014-01-16 17:22:05 -08002933 * <p>AE has been locked.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002934 * @see CaptureResult#CONTROL_AE_STATE
2935 */
2936 public static final int CONTROL_AE_STATE_LOCKED = 3;
2937
2938 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002939 * <p>AE has a good set of control values, but flash
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002940 * needs to be fired for good quality still
Zhijun He228f4f92014-01-16 17:22:05 -08002941 * capture.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002942 * @see CaptureResult#CONTROL_AE_STATE
2943 */
2944 public static final int CONTROL_AE_STATE_FLASH_REQUIRED = 4;
2945
2946 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002947 * <p>AE has been asked to do a precapture sequence
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002948 * and is currently executing it.</p>
2949 * <p>Precapture can be triggered through setting
Zhijun Hefa95b042015-02-09 10:40:49 -08002950 * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} to START. Currently
2951 * active and completed (if it causes camera device internal AE lock) precapture
2952 * metering sequence can be canceled through setting
2953 * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} to CANCEL.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002954 * <p>Once PRECAPTURE completes, AE will transition to CONVERGED
2955 * or FLASH_REQUIRED as appropriate. This is a transient
2956 * state, the camera device may skip reporting this state in
2957 * capture result.</p>
Zhijun He228f4f92014-01-16 17:22:05 -08002958 *
2959 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002960 * @see CaptureResult#CONTROL_AE_STATE
2961 */
2962 public static final int CONTROL_AE_STATE_PRECAPTURE = 5;
2963
2964 //
2965 // Enumeration values for CaptureResult#CONTROL_AF_STATE
2966 //
2967
2968 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002969 * <p>AF is off or has not yet tried to scan/been asked
2970 * to scan.</p>
2971 * <p>When a camera device is opened, it starts in this
2972 * state. This is a transient state, the camera device may
2973 * skip reporting this state in capture
2974 * result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002975 * @see CaptureResult#CONTROL_AF_STATE
2976 */
2977 public static final int CONTROL_AF_STATE_INACTIVE = 0;
2978
2979 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002980 * <p>AF is currently performing an AF scan initiated the
2981 * camera device in a continuous autofocus mode.</p>
2982 * <p>Only used by CONTINUOUS_* AF modes. This is a transient
2983 * state, the camera device may skip reporting this state in
2984 * capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002985 * @see CaptureResult#CONTROL_AF_STATE
2986 */
2987 public static final int CONTROL_AF_STATE_PASSIVE_SCAN = 1;
2988
2989 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002990 * <p>AF currently believes it is in focus, but may
2991 * restart scanning at any time.</p>
2992 * <p>Only used by CONTINUOUS_* AF modes. This is a transient
2993 * state, the camera device may skip reporting this state in
2994 * capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002995 * @see CaptureResult#CONTROL_AF_STATE
2996 */
2997 public static final int CONTROL_AF_STATE_PASSIVE_FOCUSED = 2;
2998
2999 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003000 * <p>AF is performing an AF scan because it was
3001 * triggered by AF trigger.</p>
3002 * <p>Only used by AUTO or MACRO AF modes. This is a transient
3003 * state, the camera device may skip reporting this state in
3004 * capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003005 * @see CaptureResult#CONTROL_AF_STATE
3006 */
3007 public static final int CONTROL_AF_STATE_ACTIVE_SCAN = 3;
3008
3009 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003010 * <p>AF believes it is focused correctly and has locked
3011 * focus.</p>
3012 * <p>This state is reached only after an explicit START AF trigger has been
3013 * sent ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}), when good focus has been obtained.</p>
3014 * <p>The lens will remain stationary until the AF mode ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) is changed or
3015 * a new AF trigger is sent to the camera device ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}).</p>
3016 *
3017 * @see CaptureRequest#CONTROL_AF_MODE
3018 * @see CaptureRequest#CONTROL_AF_TRIGGER
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003019 * @see CaptureResult#CONTROL_AF_STATE
3020 */
3021 public static final int CONTROL_AF_STATE_FOCUSED_LOCKED = 4;
3022
3023 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003024 * <p>AF has failed to focus successfully and has locked
3025 * focus.</p>
3026 * <p>This state is reached only after an explicit START AF trigger has been
3027 * sent ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}), when good focus cannot be obtained.</p>
3028 * <p>The lens will remain stationary until the AF mode ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) is changed or
3029 * a new AF trigger is sent to the camera device ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}).</p>
3030 *
3031 * @see CaptureRequest#CONTROL_AF_MODE
3032 * @see CaptureRequest#CONTROL_AF_TRIGGER
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003033 * @see CaptureResult#CONTROL_AF_STATE
3034 */
3035 public static final int CONTROL_AF_STATE_NOT_FOCUSED_LOCKED = 5;
3036
Eino-Ville Talvala9f880f72013-09-20 17:50:41 -07003037 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003038 * <p>AF finished a passive scan without finding focus,
3039 * and may restart scanning at any time.</p>
3040 * <p>Only used by CONTINUOUS_* AF modes. This is a transient state, the camera
Zhijun He60b19dc2014-02-24 10:19:20 -08003041 * device may skip reporting this state in capture result.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003042 * <p>LEGACY camera devices do not support this state. When a passive
3043 * scan has finished, it will always go to PASSIVE_FOCUSED.</p>
Eino-Ville Talvala9f880f72013-09-20 17:50:41 -07003044 * @see CaptureResult#CONTROL_AF_STATE
3045 */
3046 public static final int CONTROL_AF_STATE_PASSIVE_UNFOCUSED = 6;
3047
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003048 //
3049 // Enumeration values for CaptureResult#CONTROL_AWB_STATE
3050 //
3051
3052 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003053 * <p>AWB is not in auto mode, or has not yet started metering.</p>
3054 * <p>When a camera device is opened, it starts in this
3055 * state. This is a transient state, the camera device may
3056 * skip reporting this state in capture
3057 * result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003058 * @see CaptureResult#CONTROL_AWB_STATE
3059 */
3060 public static final int CONTROL_AWB_STATE_INACTIVE = 0;
3061
3062 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003063 * <p>AWB doesn't yet have a good set of control
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003064 * values for the current scene.</p>
3065 * <p>This is a transient state, the camera device
Zhijun He60b19dc2014-02-24 10:19:20 -08003066 * may skip reporting this state in capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003067 * @see CaptureResult#CONTROL_AWB_STATE
3068 */
3069 public static final int CONTROL_AWB_STATE_SEARCHING = 1;
3070
3071 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003072 * <p>AWB has a good set of control values for the
Zhijun He228f4f92014-01-16 17:22:05 -08003073 * current scene.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003074 * @see CaptureResult#CONTROL_AWB_STATE
3075 */
3076 public static final int CONTROL_AWB_STATE_CONVERGED = 2;
3077
3078 /**
Zhijun He228f4f92014-01-16 17:22:05 -08003079 * <p>AWB has been locked.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003080 * @see CaptureResult#CONTROL_AWB_STATE
3081 */
3082 public static final int CONTROL_AWB_STATE_LOCKED = 3;
3083
3084 //
Chien-Yu Chene8d86eb2017-11-27 15:42:44 -08003085 // Enumeration values for CaptureResult#CONTROL_AF_SCENE_CHANGE
3086 //
3087
3088 /**
Chien-Yu Chen2adc8ec2017-12-07 14:45:50 -08003089 * <p>Scene change is not detected within the AF region(s).</p>
Chien-Yu Chene8d86eb2017-11-27 15:42:44 -08003090 * @see CaptureResult#CONTROL_AF_SCENE_CHANGE
3091 */
3092 public static final int CONTROL_AF_SCENE_CHANGE_NOT_DETECTED = 0;
3093
3094 /**
Chien-Yu Chen2adc8ec2017-12-07 14:45:50 -08003095 * <p>Scene change is detected within the AF region(s).</p>
Chien-Yu Chene8d86eb2017-11-27 15:42:44 -08003096 * @see CaptureResult#CONTROL_AF_SCENE_CHANGE
3097 */
3098 public static final int CONTROL_AF_SCENE_CHANGE_DETECTED = 1;
3099
3100 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003101 // Enumeration values for CaptureResult#FLASH_STATE
3102 //
3103
3104 /**
Zhijun He8dda7272014-03-25 13:49:30 -07003105 * <p>No flash on camera.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003106 * @see CaptureResult#FLASH_STATE
3107 */
3108 public static final int FLASH_STATE_UNAVAILABLE = 0;
3109
3110 /**
Zhijun He8dda7272014-03-25 13:49:30 -07003111 * <p>Flash is charging and cannot be fired.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003112 * @see CaptureResult#FLASH_STATE
3113 */
3114 public static final int FLASH_STATE_CHARGING = 1;
3115
3116 /**
Zhijun He8dda7272014-03-25 13:49:30 -07003117 * <p>Flash is ready to fire.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003118 * @see CaptureResult#FLASH_STATE
3119 */
3120 public static final int FLASH_STATE_READY = 2;
3121
3122 /**
Zhijun He8dda7272014-03-25 13:49:30 -07003123 * <p>Flash fired for this capture.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003124 * @see CaptureResult#FLASH_STATE
3125 */
3126 public static final int FLASH_STATE_FIRED = 3;
3127
Zhijun He8dda7272014-03-25 13:49:30 -07003128 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003129 * <p>Flash partially illuminated this frame.</p>
3130 * <p>This is usually due to the next or previous frame having
3131 * the flash fire, and the flash spilling into this capture
Zhijun He8dda7272014-03-25 13:49:30 -07003132 * due to hardware limitations.</p>
3133 * @see CaptureResult#FLASH_STATE
3134 */
3135 public static final int FLASH_STATE_PARTIAL = 4;
3136
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003137 //
3138 // Enumeration values for CaptureResult#LENS_STATE
3139 //
3140
3141 /**
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08003142 * <p>The lens parameters ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
3143 * {@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 -08003144 *
3145 * @see CaptureRequest#LENS_APERTURE
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08003146 * @see CaptureRequest#LENS_FILTER_DENSITY
Zhijun Heca1b73a2014-02-03 12:39:53 -08003147 * @see CaptureRequest#LENS_FOCAL_LENGTH
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08003148 * @see CaptureRequest#LENS_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003149 * @see CaptureResult#LENS_STATE
3150 */
3151 public static final int LENS_STATE_STATIONARY = 0;
3152
Igor Murashkin9ea4ae62013-09-11 21:40:11 -07003153 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003154 * <p>One or several of the lens parameters
3155 * ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
3156 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} or {@link CaptureRequest#LENS_APERTURE android.lens.aperture}) is
3157 * currently changing.</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08003158 *
3159 * @see CaptureRequest#LENS_APERTURE
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08003160 * @see CaptureRequest#LENS_FILTER_DENSITY
Zhijun Heca1b73a2014-02-03 12:39:53 -08003161 * @see CaptureRequest#LENS_FOCAL_LENGTH
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08003162 * @see CaptureRequest#LENS_FOCUS_DISTANCE
Igor Murashkin9ea4ae62013-09-11 21:40:11 -07003163 * @see CaptureResult#LENS_STATE
3164 */
3165 public static final int LENS_STATE_MOVING = 1;
3166
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003167 //
3168 // Enumeration values for CaptureResult#STATISTICS_SCENE_FLICKER
3169 //
3170
3171 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003172 * <p>The camera device does not detect any flickering illumination
3173 * in the current scene.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003174 * @see CaptureResult#STATISTICS_SCENE_FLICKER
3175 */
3176 public static final int STATISTICS_SCENE_FLICKER_NONE = 0;
3177
3178 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003179 * <p>The camera device detects illumination flickering at 50Hz
3180 * in the current scene.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003181 * @see CaptureResult#STATISTICS_SCENE_FLICKER
3182 */
3183 public static final int STATISTICS_SCENE_FLICKER_50HZ = 1;
3184
3185 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003186 * <p>The camera device detects illumination flickering at 60Hz
3187 * in the current scene.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003188 * @see CaptureResult#STATISTICS_SCENE_FLICKER
3189 */
3190 public static final int STATISTICS_SCENE_FLICKER_60HZ = 2;
3191
Igor Murashkin3865a842014-01-17 18:18:39 -08003192 //
3193 // Enumeration values for CaptureResult#SYNC_FRAME_NUMBER
3194 //
3195
3196 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003197 * <p>The current result is not yet fully synchronized to any request.</p>
3198 * <p>Synchronization is in progress, and reading metadata from this
Igor Murashkin3865a842014-01-17 18:18:39 -08003199 * result may include a mix of data that have taken effect since the
3200 * last synchronization time.</p>
3201 * <p>In some future result, within {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} frames,
3202 * this value will update to the actual frame number frame number
3203 * the result is guaranteed to be synchronized to (as long as the
3204 * request settings remain constant).</p>
3205 *
3206 * @see CameraCharacteristics#SYNC_MAX_LATENCY
3207 * @see CaptureResult#SYNC_FRAME_NUMBER
3208 * @hide
3209 */
3210 public static final int SYNC_FRAME_NUMBER_CONVERGING = -1;
3211
3212 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003213 * <p>The current result's synchronization status is unknown.</p>
3214 * <p>The result may have already converged, or it may be in
3215 * progress. Reading from this result may include some mix
3216 * of settings from past requests.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08003217 * <p>After a settings change, the new settings will eventually all
3218 * take effect for the output buffers and results. However, this
3219 * value will not change when that happens. Altering settings
3220 * rapidly may provide outcomes using mixes of settings from recent
3221 * requests.</p>
3222 * <p>This value is intended primarily for backwards compatibility with
3223 * the older camera implementations (for android.hardware.Camera).</p>
3224 * @see CaptureResult#SYNC_FRAME_NUMBER
3225 * @hide
3226 */
3227 public static final int SYNC_FRAME_NUMBER_UNKNOWN = -2;
3228
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003229 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
3230 * End generated code
3231 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
3232
Igor Murashkinb519cc52013-07-02 11:23:44 -07003233}