blob: a0170dab9f04ddae169327758e942f7dc2560def [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
Yin-Chia Yeh1b1f14e2019-07-18 15:10:12 -0700209
210 if (filterTags != null && Arrays.binarySearch(filterTags,
211 CameraMetadataNative.getTag(keyName, vendorId)) < 0) {
212 // ignore vendor keys not in filterTags
213 continue;
214 }
215 if (instance == null || instance.getProtected(k) != null) {
Ruben Brunkc620eb72015-07-29 18:19:11 -0700216 keyList.add(k);
217 }
Yin-Chia Yeh1b1f14e2019-07-18 15:10:12 -0700218
Ruben Brunkc620eb72015-07-29 18:19:11 -0700219 }
220 }
221
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700222 return keyList;
223 }
224
Igor Murashkincc542a42014-06-25 11:52:23 -0700225 @SuppressWarnings("rawtypes")
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100226 private static <TKey> boolean shouldKeyBeAdded(TKey key, Field field, int[] filterTags,
227 boolean includeSynthetic) {
Igor Murashkincc542a42014-06-25 11:52:23 -0700228 if (key == null) {
229 throw new NullPointerException("key must not be null");
230 }
231
232 CameraMetadataNative.Key nativeKey;
233
234 /*
235 * Get the native key from the public api key
236 */
237 if (key instanceof CameraCharacteristics.Key) {
238 nativeKey = ((CameraCharacteristics.Key)key).getNativeKey();
239 } else if (key instanceof CaptureResult.Key) {
240 nativeKey = ((CaptureResult.Key)key).getNativeKey();
241 } else if (key instanceof CaptureRequest.Key) {
242 nativeKey = ((CaptureRequest.Key)key).getNativeKey();
243 } else {
244 // Reject fields that aren't a key
245 throw new IllegalArgumentException("key type must be that of a metadata key");
246 }
247
Igor Murashkin6c76f582014-07-15 17:19:49 -0700248 if (field.getAnnotation(PublicKey.class) == null) {
249 // Never expose @hide keys up to the API user
250 return false;
251 }
252
Igor Murashkincc542a42014-06-25 11:52:23 -0700253 // No filtering necessary
254 if (filterTags == null) {
255 return true;
256 }
257
Igor Murashkin6c76f582014-07-15 17:19:49 -0700258 if (field.getAnnotation(SyntheticKey.class) != null) {
259 // This key is synthetic, so calling #getTag will throw IAE
260
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100261 return includeSynthetic;
Igor Murashkin6c76f582014-07-15 17:19:49 -0700262 }
263
264 /*
265 * Regular key: look up it's native tag and see if it's in filterTags
266 */
267
Igor Murashkincc542a42014-06-25 11:52:23 -0700268 int keyTag = nativeKey.getTag();
269
270 // non-negative result is returned iff the value is in the array
271 return Arrays.binarySearch(filterTags, keyTag) >= 0;
272 }
273
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700274 /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
275 * The enum values below this point are generated from metadata
276 * definitions in /system/media/camera/docs. Do not modify by hand or
277 * modify the comment blocks at the start or end.
278 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
279
280 //
Zhijun Heff413932014-02-07 15:44:30 -0800281 // Enumeration values for CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
282 //
283
284 /**
285 * <p>The lens focus distance is not accurate, and the units used for
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700286 * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} do not correspond to any physical units.</p>
287 * <p>Setting the lens to the same focus distance on separate occasions may
Zhijun Heff413932014-02-07 15:44:30 -0800288 * result in a different real focus distance, depending on factors such
289 * as the orientation of the device, the age of the focusing mechanism,
290 * and the device temperature. The focus distance value will still be
291 * in the range of <code>[0, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code>, where 0
292 * represents the farthest focus.</p>
293 *
294 * @see CaptureRequest#LENS_FOCUS_DISTANCE
295 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
296 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
297 */
298 public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED = 0;
299
300 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700301 * <p>The lens focus distance is measured in diopters.</p>
302 * <p>However, setting the lens to the same focus distance
303 * on separate occasions may result in a different real
304 * focus distance, depending on factors such as the
305 * orientation of the device, the age of the focusing
306 * mechanism, and the device temperature.</p>
Zhijun Heff413932014-02-07 15:44:30 -0800307 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
308 */
309 public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE = 1;
310
311 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700312 * <p>The lens focus distance is measured in diopters, and
313 * is calibrated.</p>
314 * <p>The lens mechanism is calibrated so that setting the
315 * same focus distance is repeatable on multiple
316 * occasions with good accuracy, and the focus distance
317 * corresponds to the real physical distance to the plane
318 * of best focus.</p>
Zhijun Heff413932014-02-07 15:44:30 -0800319 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
320 */
321 public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED = 2;
322
323 //
Igor Murashkin68f40062013-09-10 12:15:54 -0700324 // Enumeration values for CameraCharacteristics#LENS_FACING
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700325 //
326
327 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700328 * <p>The camera device faces the same 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_FRONT = 0;
332
333 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700334 * <p>The camera device faces the opposite direction as the device's screen.</p>
Igor Murashkin68f40062013-09-10 12:15:54 -0700335 * @see CameraCharacteristics#LENS_FACING
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700336 */
337 public static final int LENS_FACING_BACK = 1;
338
Zhijun He503e8152015-01-12 15:16:56 -0800339 /**
340 * <p>The camera device is an external camera, and has no fixed facing relative to the
341 * device's screen.</p>
342 * @see CameraCharacteristics#LENS_FACING
343 */
344 public static final int LENS_FACING_EXTERNAL = 2;
345
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700346 //
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -0800347 // Enumeration values for CameraCharacteristics#LENS_POSE_REFERENCE
348 //
349
350 /**
351 * <p>The value of {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation} is relative to the optical center of
352 * the largest camera device facing the same direction as this camera.</p>
Eino-Ville Talvala601e0f62018-02-05 16:25:40 -0800353 * <p>This is the default value for API levels before Android P.</p>
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -0800354 *
355 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
356 * @see CameraCharacteristics#LENS_POSE_REFERENCE
357 */
358 public static final int LENS_POSE_REFERENCE_PRIMARY_CAMERA = 0;
359
360 /**
361 * <p>The value of {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation} is relative to the position of the
362 * primary gyroscope of this Android device.</p>
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -0800363 *
364 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
365 * @see CameraCharacteristics#LENS_POSE_REFERENCE
366 */
367 public static final int LENS_POSE_REFERENCE_GYROSCOPE = 1;
368
369 //
Igor Murashkine46c0da2014-02-07 18:34:37 -0800370 // Enumeration values for CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
371 //
372
373 /**
374 * <p>The minimal set of capabilities that every camera
375 * device (regardless of {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel})
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700376 * supports.</p>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700377 * <p>This capability is listed by all normal devices, and
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700378 * indicates that the camera device has a feature set
379 * that's comparable to the baseline requirements for the
380 * older android.hardware.Camera API.</p>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700381 * <p>Devices with the DEPTH_OUTPUT capability might not list this
382 * capability, indicating that they support only depth measurement,
383 * not standard color output.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800384 *
385 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
386 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
387 */
388 public static final int REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE = 0;
389
390 /**
Igor Murashkine46c0da2014-02-07 18:34:37 -0800391 * <p>The camera device can be manually controlled (3A algorithms such
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700392 * as auto-exposure, and auto-focus can be bypassed).
Zhijun He50f72432014-05-28 13:52:04 -0700393 * The camera device supports basic manual control of the sensor image
394 * acquisition related stages. This means the following controls are
395 * guaranteed to be supported:</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800396 * <ul>
Zhijun He50f72432014-05-28 13:52:04 -0700397 * <li>Manual frame duration control<ul>
398 * <li>{@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}</li>
399 * <li>{@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li>
Zhijun He50f72432014-05-28 13:52:04 -0700400 * </ul>
401 * </li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800402 * <li>Manual exposure control<ul>
403 * <li>{@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</li>
404 * <li>{@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
405 * </ul>
406 * </li>
407 * <li>Manual sensitivity control<ul>
408 * <li>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</li>
409 * <li>{@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800410 * </ul>
411 * </li>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700412 * <li>Manual lens control (if the lens is adjustable)<ul>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800413 * <li>android.lens.*</li>
414 * </ul>
415 * </li>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700416 * <li>Manual flash control (if a flash unit is present)<ul>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800417 * <li>android.flash.*</li>
418 * </ul>
419 * </li>
420 * <li>Manual black level locking<ul>
421 * <li>{@link CaptureRequest#BLACK_LEVEL_LOCK android.blackLevel.lock}</li>
422 * </ul>
423 * </li>
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700424 * <li>Auto exposure lock<ul>
425 * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li>
426 * </ul>
427 * </li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800428 * </ul>
429 * <p>If any of the above 3A algorithms are enabled, then the camera
430 * device will accurately report the values applied by 3A in the
431 * result.</p>
Zhijun He50f72432014-05-28 13:52:04 -0700432 * <p>A given camera device may also support additional manual sensor controls,
433 * but this capability only covers the above list of controls.</p>
Ruben Brunk3e4fed22014-06-18 17:08:42 -0700434 * <p>If this is supported, {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} will
435 * additionally return a min frame duration that is greater than
436 * zero for each supported size-format combination.</p>
Shuzhen Wang61aaa322018-11-19 16:04:57 -0800437 * <p>For camera devices with LOGICAL_MULTI_CAMERA capability, when the underlying active
438 * physical camera switches, exposureTime, sensitivity, and lens properties may change
439 * even if AE/AF is locked. However, the overall auto exposure and auto focus experience
440 * for users will be consistent. Refer to LOGICAL_MULTI_CAMERA capability for details.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800441 *
442 * @see CaptureRequest#BLACK_LEVEL_LOCK
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700443 * @see CaptureRequest#CONTROL_AE_LOCK
Zhijun He50f72432014-05-28 13:52:04 -0700444 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
Igor Murashkine46c0da2014-02-07 18:34:37 -0800445 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Zhijun He50f72432014-05-28 13:52:04 -0700446 * @see CaptureRequest#SENSOR_FRAME_DURATION
Igor Murashkine46c0da2014-02-07 18:34:37 -0800447 * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
Zhijun He50f72432014-05-28 13:52:04 -0700448 * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
Igor Murashkine46c0da2014-02-07 18:34:37 -0800449 * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
450 * @see CaptureRequest#SENSOR_SENSITIVITY
451 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
452 */
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700453 public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR = 1;
Igor Murashkine46c0da2014-02-07 18:34:37 -0800454
455 /**
Zhijun He50f72432014-05-28 13:52:04 -0700456 * <p>The camera device post-processing stages can be manually controlled.
457 * The camera device supports basic manual control of the image post-processing
458 * stages. This means the following controls are guaranteed to be supported:</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800459 * <ul>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -0800460 * <li>
461 * <p>Manual tonemap control</p>
462 * <ul>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -0700463 * <li>{@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800464 * <li>{@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</li>
465 * <li>{@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</li>
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -0700466 * <li>{@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma}</li>
467 * <li>{@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve}</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800468 * </ul>
469 * </li>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -0800470 * <li>
471 * <p>Manual white balance control</p>
472 * <ul>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800473 * <li>{@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}</li>
474 * <li>{@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}</li>
475 * </ul>
476 * </li>
Zhijun He28288ca2014-06-25 15:49:13 -0700477 * <li>Manual lens shading map control<ul>
478 * <li>{@link CaptureRequest#SHADING_MODE android.shading.mode}</li>
479 * <li>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode}</li>
Ruben Brunk57493682014-05-27 18:58:08 -0700480 * <li>android.statistics.lensShadingMap</li>
481 * <li>android.lens.info.shadingMapSize</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800482 * </ul>
483 * </li>
Zhijun Hea05e59d2014-07-08 18:27:47 -0700484 * <li>Manual aberration correction control (if aberration correction is supported)<ul>
Zhijun He9e4e4392014-08-18 11:12:32 -0700485 * <li>{@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}</li>
486 * <li>{@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES android.colorCorrection.availableAberrationModes}</li>
Zhijun Hea05e59d2014-07-08 18:27:47 -0700487 * </ul>
488 * </li>
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700489 * <li>Auto white balance lock<ul>
490 * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li>
491 * </ul>
492 * </li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800493 * </ul>
494 * <p>If auto white balance is enabled, then the camera device
495 * will accurately report the values applied by AWB in the result.</p>
Zhijun He50f72432014-05-28 13:52:04 -0700496 * <p>A given camera device may also support additional post-processing
497 * controls, but this capability only covers the above list of controls.</p>
Shuzhen Wang61aaa322018-11-19 16:04:57 -0800498 * <p>For camera devices with LOGICAL_MULTI_CAMERA capability, when underlying active
499 * physical camera switches, tonemap, white balance, and shading map may change even if
500 * awb is locked. However, the overall post-processing experience for users will be
501 * consistent. Refer to LOGICAL_MULTI_CAMERA capability for details.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800502 *
Zhijun He9e4e4392014-08-18 11:12:32 -0700503 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
504 * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
Igor Murashkine46c0da2014-02-07 18:34:37 -0800505 * @see CaptureRequest#COLOR_CORRECTION_GAINS
506 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700507 * @see CaptureRequest#CONTROL_AWB_LOCK
Zhijun He28288ca2014-06-25 15:49:13 -0700508 * @see CaptureRequest#SHADING_MODE
509 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -0700510 * @see CaptureRequest#TONEMAP_CURVE
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -0700511 * @see CaptureRequest#TONEMAP_GAMMA
Igor Murashkine46c0da2014-02-07 18:34:37 -0800512 * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
513 * @see CaptureRequest#TONEMAP_MODE
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -0700514 * @see CaptureRequest#TONEMAP_PRESET_CURVE
Igor Murashkine46c0da2014-02-07 18:34:37 -0800515 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
516 */
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700517 public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING = 2;
518
519 /**
Eino-Ville Talvala611fece2014-07-10 17:29:38 -0700520 * <p>The camera device supports outputting RAW buffers and
521 * metadata for interpreting them.</p>
522 * <p>Devices supporting the RAW capability allow both for
523 * saving DNG files, and for direct application processing of
524 * raw sensor images.</p>
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700525 * <ul>
526 * <li>RAW_SENSOR is supported as an output format.</li>
527 * <li>The maximum available resolution for RAW_SENSOR streams
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700528 * will match either the value in
529 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize} or
Eino-Ville Talvalad8407272015-11-08 18:27:20 -0800530 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.</li>
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700531 * <li>All DNG-related optional metadata entries are provided
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700532 * by the camera device.</li>
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700533 * </ul>
534 *
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700535 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
Eino-Ville Talvalad8407272015-11-08 18:27:20 -0800536 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700537 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
538 */
Eino-Ville Talvala611fece2014-07-10 17:29:38 -0700539 public static final int REQUEST_AVAILABLE_CAPABILITIES_RAW = 3;
Igor Murashkine46c0da2014-02-07 18:34:37 -0800540
541 /**
Zhijun He0e99c222015-01-29 15:26:05 -0800542 * <p>The camera device supports the Zero Shutter Lag reprocessing use case.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800543 * <ul>
Zhijun He0e99c222015-01-29 15:26:05 -0800544 * <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 -0700545 * <li>{@link android.graphics.ImageFormat#PRIVATE } is supported as an output/input format,
546 * that is, {@link android.graphics.ImageFormat#PRIVATE } is included in the lists of
547 * formats returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats } and {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats }.</li>
548 * <li>{@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput }
549 * returns non empty int[] for each supported input format returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }.</li>
550 * <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>
551 * <li>Using {@link android.graphics.ImageFormat#PRIVATE } does not cause a frame rate drop
552 * relative to the sensor's maximum capture rate (at that resolution).</li>
553 * <li>{@link android.graphics.ImageFormat#PRIVATE } will be reprocessable into both
554 * {@link android.graphics.ImageFormat#YUV_420_888 } and
555 * {@link android.graphics.ImageFormat#JPEG } formats.</li>
Shuzhen Wangec5e8d22018-09-28 09:28:48 -0700556 * <li>For a MONOCHROME camera supporting Y8 format, {@link android.graphics.ImageFormat#PRIVATE } will be reprocessable into
557 * {@link android.graphics.ImageFormat#Y8 }.</li>
Chien-Yu Chen8062d312015-05-12 14:24:10 -0700558 * <li>The maximum available resolution for PRIVATE streams
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700559 * (both input/output) will match the maximum available
560 * resolution of JPEG streams.</li>
Zhijun He513f7c32015-04-24 18:23:54 -0700561 * <li>Static metadata {@link CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL android.reprocess.maxCaptureStall}.</li>
Zhijun He0e99c222015-01-29 15:26:05 -0800562 * <li>Only below controls are effective for reprocessing requests and
563 * will be present in capture results, other controls in reprocess
564 * requests will be ignored by the camera device.<ul>
565 * <li>android.jpeg.*</li>
566 * <li>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</li>
567 * <li>{@link CaptureRequest#EDGE_MODE android.edge.mode}</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800568 * </ul>
Zhijun He0e99c222015-01-29 15:26:05 -0800569 * </li>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700570 * <li>{@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes} and
571 * {@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 -0800572 * </ul>
573 *
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700574 * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES
Zhijun He0e99c222015-01-29 15:26:05 -0800575 * @see CaptureRequest#EDGE_MODE
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700576 * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
Zhijun He0e99c222015-01-29 15:26:05 -0800577 * @see CaptureRequest#NOISE_REDUCTION_MODE
Zhijun He513f7c32015-04-24 18:23:54 -0700578 * @see CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL
Zhijun He0e99c222015-01-29 15:26:05 -0800579 * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
Igor Murashkine46c0da2014-02-07 18:34:37 -0800580 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
581 */
Chien-Yu Chen8062d312015-05-12 14:24:10 -0700582 public static final int REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING = 4;
Igor Murashkine46c0da2014-02-07 18:34:37 -0800583
Ruben Brunk0c22e692014-11-11 12:00:34 -0800584 /**
585 * <p>The camera device supports accurately reporting the sensor settings for many of
586 * the sensor controls while the built-in 3A algorithm is running. This allows
587 * reporting of sensor settings even when these settings cannot be manually changed.</p>
588 * <p>The values reported for the following controls are guaranteed to be available
589 * in the CaptureResult, including when 3A is enabled:</p>
590 * <ul>
591 * <li>Exposure control<ul>
592 * <li>{@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</li>
593 * </ul>
594 * </li>
595 * <li>Sensitivity control<ul>
596 * <li>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</li>
597 * </ul>
598 * </li>
599 * <li>Lens controls (if the lens is adjustable)<ul>
600 * <li>{@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}</li>
601 * <li>{@link CaptureRequest#LENS_APERTURE android.lens.aperture}</li>
602 * </ul>
603 * </li>
604 * </ul>
605 * <p>This capability is a subset of the MANUAL_SENSOR control capability, and will
606 * always be included if the MANUAL_SENSOR capability is available.</p>
607 *
608 * @see CaptureRequest#LENS_APERTURE
609 * @see CaptureRequest#LENS_FOCUS_DISTANCE
610 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
611 * @see CaptureRequest#SENSOR_SENSITIVITY
612 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
613 */
614 public static final int REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS = 5;
615
Eino-Ville Talvala126a7462014-11-04 16:31:01 -0800616 /**
Eino-Ville Talvala0819c752015-06-17 11:34:41 -0700617 * <p>The camera device supports capturing high-resolution images at &gt;= 20 frames per
Shuzhen Wang062c22b2019-04-09 23:05:23 -0700618 * second, in at least the uncompressed YUV format, when post-processing settings are
619 * set to FAST. Additionally, all image resolutions less than 24 megapixels can be
620 * captured at &gt;= 10 frames per second. Here, 'high resolution' means at least 8
621 * megapixels, or the maximum resolution of the device, whichever is smaller.</p>
Eino-Ville Talvala0819c752015-06-17 11:34:41 -0700622 * <p>More specifically, this means that a size matching the camera device's active array
623 * 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 },
624 * with a minimum frame duration for that format and size of either &lt;= 1/20 s, or
Shuzhen Wang062c22b2019-04-09 23:05:23 -0700625 * &lt;= 1/10 s if the image size is less than 24 megapixels, respectively; and
626 * the {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges} entry lists at least one FPS range
627 * where the minimum FPS is &gt;= 1 / minimumFrameDuration for the maximum-size
628 * 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 -0700629 * then the list of resolutions for YUV_420_888 from {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } contains at
630 * least one resolution &gt;= 8 megapixels, with a minimum frame duration of &lt;= 1/20
631 * s.</p>
Shuzhen Wangec5e8d22018-09-28 09:28:48 -0700632 * <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 -0800633 * captured at the same rate as the maximum-size YUV_420_888 resolution is.</p>
Eino-Ville Talvala0819c752015-06-17 11:34:41 -0700634 * <p>If the device supports the PRIVATE_REPROCESSING capability, then the same guarantees
635 * as for the YUV_420_888 format also apply to the {@link android.graphics.ImageFormat#PRIVATE } format.</p>
636 * <p>In addition, the {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} field is guaranted to have a value between 0
637 * and 4, inclusive. {@link CameraCharacteristics#CONTROL_AE_LOCK_AVAILABLE android.control.aeLockAvailable} and {@link CameraCharacteristics#CONTROL_AWB_LOCK_AVAILABLE android.control.awbLockAvailable}
638 * are also guaranteed to be <code>true</code> so burst capture with these two locks ON yields
639 * consistent image output.</p>
Eino-Ville Talvala126a7462014-11-04 16:31:01 -0800640 *
Eino-Ville Talvala8d709f32014-11-17 11:28:38 -0800641 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700642 * @see CameraCharacteristics#CONTROL_AE_LOCK_AVAILABLE
643 * @see CameraCharacteristics#CONTROL_AWB_LOCK_AVAILABLE
Eino-Ville Talvala126a7462014-11-04 16:31:01 -0800644 * @see CameraCharacteristics#SYNC_MAX_LATENCY
645 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
646 */
647 public static final int REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE = 6;
648
Zhijun He0e99c222015-01-29 15:26:05 -0800649 /**
Chien-Yu Chen0a551f12015-04-03 17:57:35 -0700650 * <p>The camera device supports the YUV_420_888 reprocessing use case, similar as
Chien-Yu Chen8062d312015-05-12 14:24:10 -0700651 * PRIVATE_REPROCESSING, This capability requires the camera device to support the
Zhijun He0e99c222015-01-29 15:26:05 -0800652 * following:</p>
653 * <ul>
654 * <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 -0800655 * <li>{@link android.graphics.ImageFormat#YUV_420_888 } is supported as an output/input
656 * 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 -0700657 * <li>{@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput }
658 * returns non-empty int[] for each supported input format returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }.</li>
659 * <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 -0800660 * <li>Using {@link android.graphics.ImageFormat#YUV_420_888 } does not cause a frame rate
661 * drop relative to the sensor's maximum capture rate (at that resolution).</li>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700662 * <li>{@link android.graphics.ImageFormat#YUV_420_888 } will be reprocessable into both
663 * {@link android.graphics.ImageFormat#YUV_420_888 } and {@link android.graphics.ImageFormat#JPEG } formats.</li>
664 * <li>The maximum available resolution for {@link android.graphics.ImageFormat#YUV_420_888 } streams (both input/output) will match the
665 * maximum available resolution of {@link android.graphics.ImageFormat#JPEG } streams.</li>
Shuzhen Wangec5e8d22018-09-28 09:28:48 -0700666 * <li>For a MONOCHROME camera with Y8 format support, all the requirements mentioned
667 * above for YUV_420_888 apply for Y8 format as well.</li>
Zhijun He513f7c32015-04-24 18:23:54 -0700668 * <li>Static metadata {@link CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL android.reprocess.maxCaptureStall}.</li>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700669 * <li>Only the below controls are effective for reprocessing requests and will be present
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800670 * in capture results. The reprocess requests are from the original capture results
671 * that are associated with the intermediate {@link android.graphics.ImageFormat#YUV_420_888 } output buffers. All other controls in the
672 * reprocess requests will be ignored by the camera device.<ul>
Zhijun He0e99c222015-01-29 15:26:05 -0800673 * <li>android.jpeg.*</li>
674 * <li>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</li>
675 * <li>{@link CaptureRequest#EDGE_MODE android.edge.mode}</li>
676 * <li>{@link CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR android.reprocess.effectiveExposureFactor}</li>
677 * </ul>
678 * </li>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700679 * <li>{@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes} and
680 * {@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 -0800681 * </ul>
682 *
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700683 * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES
Zhijun He0e99c222015-01-29 15:26:05 -0800684 * @see CaptureRequest#EDGE_MODE
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700685 * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
Zhijun He0e99c222015-01-29 15:26:05 -0800686 * @see CaptureRequest#NOISE_REDUCTION_MODE
687 * @see CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR
Zhijun He513f7c32015-04-24 18:23:54 -0700688 * @see CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL
Zhijun He0e99c222015-01-29 15:26:05 -0800689 * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
690 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
691 */
692 public static final int REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING = 7;
693
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700694 /**
695 * <p>The camera device can produce depth measurements from its field of view.</p>
696 * <p>This capability requires the camera device to support the following:</p>
697 * <ul>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800698 * <li>{@link android.graphics.ImageFormat#DEPTH16 } is supported as
699 * an output format.</li>
700 * <li>{@link android.graphics.ImageFormat#DEPTH_POINT_CLOUD } is
701 * optionally supported as an output format.</li>
702 * <li>This camera device, and all camera devices with the same {@link CameraCharacteristics#LENS_FACING android.lens.facing}, will
703 * list the following calibration metadata entries in both {@link android.hardware.camera2.CameraCharacteristics }
704 * and {@link android.hardware.camera2.CaptureResult }:<ul>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700705 * <li>{@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}</li>
706 * <li>{@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}</li>
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -0700707 * <li>{@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}</li>
Eino-Ville Talvala915f5042018-03-13 19:08:01 -0700708 * <li>{@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}</li>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700709 * </ul>
710 * </li>
711 * <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 -0800712 * <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 -0700713 * <li>A LIMITED camera with only the DEPTH_OUTPUT capability does not have to support
Shuzhen Wangec5e8d22018-09-28 09:28:48 -0700714 * normal YUV_420_888, Y8, JPEG, and PRIV-format outputs. It only has to support the
715 * DEPTH16 format.</li>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700716 * </ul>
717 * <p>Generally, depth output operates at a slower frame rate than standard color capture,
718 * so the DEPTH16 and DEPTH_POINT_CLOUD formats will commonly have a stall duration that
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800719 * should be accounted for (see {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration }).
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700720 * On a device that supports both depth and color-based output, to enable smooth preview,
721 * using a repeating burst is recommended, where a depth-output target is only included
722 * once every N frames, where N is the ratio between preview output rate and depth output
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700723 * rate, including depth stall time.</p>
724 *
725 * @see CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE
Eino-Ville Talvala915f5042018-03-13 19:08:01 -0700726 * @see CameraCharacteristics#LENS_DISTORTION
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700727 * @see CameraCharacteristics#LENS_FACING
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -0700728 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -0800729 * @see CameraCharacteristics#LENS_POSE_REFERENCE
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700730 * @see CameraCharacteristics#LENS_POSE_ROTATION
731 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
732 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
733 */
734 public static final int REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT = 8;
735
Zhijun Hefab663e2015-05-26 19:46:31 -0700736 /**
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800737 * <p>The device supports constrained high speed video recording (frame rate &gt;=120fps) use
738 * case. The camera device will support high speed capture session created by {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }, which
739 * only accepts high speed request lists created by {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList }.</p>
740 * <p>A camera device can still support high speed video streaming by advertising the high
741 * speed FPS ranges in {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges}. For this case, all
742 * normal capture request per frame control and synchronization requirements will apply
743 * to the high speed fps ranges, the same as all other fps ranges. This capability
744 * describes the capability of a specialized operating mode with many limitations (see
745 * below), which is only targeted at high speed video recording.</p>
746 * <p>The supported high speed video sizes and fps ranges are specified in {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges }.
747 * To get desired output frame rates, the application is only allowed to select video
748 * size and FPS range combinations provided by {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes }. The
749 * fps range can be controlled via {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}.</p>
Zhijun Hefab663e2015-05-26 19:46:31 -0700750 * <p>In this capability, the camera device will override aeMode, awbMode, and afMode to
Zhijun Heee2ebde2015-06-16 19:58:11 -0700751 * ON, AUTO, and CONTINUOUS_VIDEO, respectively. All post-processing block mode
Zhijun Hefab663e2015-05-26 19:46:31 -0700752 * controls will be overridden to be FAST. Therefore, no manual control of capture
753 * and post-processing parameters is possible. All other controls operate the
754 * same as when {@link CaptureRequest#CONTROL_MODE android.control.mode} == AUTO. This means that all other
755 * android.control.* fields continue to work, such as</p>
756 * <ul>
757 * <li>{@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}</li>
758 * <li>{@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}</li>
759 * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li>
760 * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li>
761 * <li>{@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</li>
762 * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li>
763 * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li>
764 * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li>
765 * <li>{@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}</li>
766 * <li>{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}</li>
767 * </ul>
768 * <p>Outside of android.control.*, the following controls will work:</p>
769 * <ul>
770 * <li>{@link CaptureRequest#FLASH_MODE android.flash.mode} (TORCH mode only, automatic flash for still capture will not
771 * work since aeMode is ON)</li>
772 * <li>{@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} (if it is supported)</li>
773 * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li>
774 * <li>{@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} (if it is supported)</li>
775 * </ul>
776 * <p>For high speed recording use case, the actual maximum supported frame rate may
777 * be lower than what camera can output, depending on the destination Surfaces for
778 * the image data. For example, if the destination surface is from video encoder,
779 * the application need check if the video encoder is capable of supporting the
780 * high frame rate for a given video size, or it will end up with lower recording
781 * frame rate. If the destination surface is from preview window, the actual preview frame
782 * rate will be bounded by the screen refresh rate.</p>
783 * <p>The camera device will only support up to 2 high speed simultaneous output surfaces
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800784 * (preview and recording surfaces) in this mode. Above controls will be effective only
785 * if all of below conditions are true:</p>
Zhijun Hefab663e2015-05-26 19:46:31 -0700786 * <ul>
787 * <li>The application creates a camera capture session with no more than 2 surfaces via
788 * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }. The
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800789 * targeted surfaces must be preview surface (either from {@link android.view.SurfaceView } or {@link android.graphics.SurfaceTexture }) or recording
790 * surface(either from {@link android.media.MediaRecorder#getSurface } or {@link android.media.MediaCodec#createInputSurface }).</li>
Zhijun Hefab663e2015-05-26 19:46:31 -0700791 * <li>The stream sizes are selected from the sizes reported by
792 * {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes }.</li>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800793 * <li>The FPS ranges are selected from {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges }.</li>
Zhijun Hefab663e2015-05-26 19:46:31 -0700794 * </ul>
Eino-Ville Talvala639fffe2015-06-30 10:34:48 -0700795 * <p>When above conditions are NOT satistied,
Zhijun Hefab663e2015-05-26 19:46:31 -0700796 * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }
Eino-Ville Talvala639fffe2015-06-30 10:34:48 -0700797 * will fail.</p>
Zhijun Hefab663e2015-05-26 19:46:31 -0700798 * <p>Switching to a FPS range that has different maximum FPS may trigger some camera device
799 * reconfigurations, which may introduce extra latency. It is recommended that
800 * the application avoids unnecessary maximum target FPS changes as much as possible
801 * during high speed streaming.</p>
802 *
803 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
804 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
805 * @see CaptureRequest#CONTROL_AE_LOCK
806 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
807 * @see CaptureRequest#CONTROL_AE_REGIONS
808 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
809 * @see CaptureRequest#CONTROL_AF_REGIONS
810 * @see CaptureRequest#CONTROL_AF_TRIGGER
811 * @see CaptureRequest#CONTROL_AWB_LOCK
812 * @see CaptureRequest#CONTROL_AWB_REGIONS
813 * @see CaptureRequest#CONTROL_EFFECT_MODE
814 * @see CaptureRequest#CONTROL_MODE
815 * @see CaptureRequest#FLASH_MODE
816 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
817 * @see CaptureRequest#SCALER_CROP_REGION
818 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
819 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
820 */
821 public static final int REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO = 9;
822
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -0800823 /**
Eino-Ville Talvala601e0f62018-02-05 16:25:40 -0800824 * <p>The camera device supports the MOTION_TRACKING value for
825 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent}, which limits maximum exposure time to 20 ms.</p>
826 * <p>This limits the motion blur of capture images, resulting in better image tracking
827 * results for use cases such as image stabilization or augmented reality.</p>
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -0800828 *
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -0800829 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -0800830 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
831 */
832 public static final int REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING = 10;
833
Shuzhen Wang23d29382017-11-26 17:24:56 -0800834 /**
Shuzhen Wang2da73f42019-03-12 15:16:06 -0700835 * <p>The camera device is a logical camera backed by two or more physical cameras.</p>
836 * <p>In API level 28, the physical cameras must also be exposed to the application via
837 * {@link android.hardware.camera2.CameraManager#getCameraIdList }.</p>
838 * <p>Starting from API level 29, some or all physical cameras may not be independently
839 * exposed to the application, in which case the physical camera IDs will not be
840 * available in {@link android.hardware.camera2.CameraManager#getCameraIdList }. But the
841 * application can still query the physical cameras' characteristics by calling
842 * {@link android.hardware.camera2.CameraManager#getCameraCharacteristics }. Additionally,
843 * if a physical camera is hidden from camera ID list, the mandatory stream combinations
844 * for that physical camera must be supported through the logical camera using physical
845 * streams.</p>
846 * <p>Combinations of logical and physical streams, or physical streams from different
847 * physical cameras are not guaranteed. However, if the camera device supports
848 * {@link CameraDevice#isSessionConfigurationSupported },
849 * application must be able to query whether a stream combination involving physical
850 * streams is supported by calling
851 * {@link CameraDevice#isSessionConfigurationSupported }.</p>
Shuzhen Wanga57c2742018-05-23 11:19:59 -0700852 * <p>Camera application shouldn't assume that there are at most 1 rear camera and 1 front
853 * camera in the system. For an application that switches between front and back cameras,
854 * the recommendation is to switch between the first rear camera and the first front
855 * camera in the list of supported camera devices.</p>
Shuzhen Wang23d29382017-11-26 17:24:56 -0800856 * <p>This capability requires the camera device to support the following:</p>
857 * <ul>
Shuzhen Wangde23d282018-08-15 14:01:45 -0700858 * <li>The IDs of underlying physical cameras are returned via
859 * {@link android.hardware.camera2.CameraCharacteristics#getPhysicalCameraIds }.</li>
860 * <li>This camera device must list static metadata
861 * {@link CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE android.logicalMultiCamera.sensorSyncType} in
862 * {@link android.hardware.camera2.CameraCharacteristics }.</li>
Shuzhen Wang23d29382017-11-26 17:24:56 -0800863 * <li>The underlying physical cameras' static metadata must list the following entries,
864 * so that the application can correlate pixels from the physical streams:<ul>
865 * <li>{@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference}</li>
866 * <li>{@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}</li>
867 * <li>{@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}</li>
868 * <li>{@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}</li>
Eino-Ville Talvala915f5042018-03-13 19:08:01 -0700869 * <li>{@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}</li>
Shuzhen Wang23d29382017-11-26 17:24:56 -0800870 * </ul>
871 * </li>
Shuzhen Wang03d36e22018-02-13 17:34:59 -0800872 * <li>The SENSOR_INFO_TIMESTAMP_SOURCE of the logical device and physical devices must be
873 * the same.</li>
Shuzhen Wang61aaa322018-11-19 16:04:57 -0800874 * <li>The logical camera must be LIMITED or higher device.</li>
Shuzhen Wang23d29382017-11-26 17:24:56 -0800875 * </ul>
Shuzhen Wang61aaa322018-11-19 16:04:57 -0800876 * <p>A logical camera device's dynamic metadata may contain
877 * {@link CaptureResult#LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID android.logicalMultiCamera.activePhysicalId} to notify the application of the current
878 * active physical camera Id. An active physical camera is the physical camera from which
879 * the logical camera's main image data outputs (YUV or RAW) and metadata come from.
880 * In addition, this serves as an indication which physical camera is used to output to
881 * a RAW stream, or in case only physical cameras support RAW, which physical RAW stream
882 * the application should request.</p>
883 * <p>Logical camera's static metadata tags below describe the default active physical
884 * camera. An active physical camera is default if it's used when application directly
885 * uses requests built from a template. All templates will default to the same active
886 * physical camera.</p>
887 * <ul>
888 * <li>{@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</li>
889 * <li>{@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}</li>
890 * <li>{@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
891 * <li>{@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li>
892 * <li>{@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize}</li>
893 * <li>{@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}</li>
894 * <li>{@link CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED android.sensor.info.lensShadingApplied}</li>
895 * <li>{@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}</li>
896 * <li>{@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}</li>
897 * <li>{@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}</li>
898 * <li>{@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}</li>
899 * <li>{@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1}</li>
900 * <li>{@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2}</li>
901 * <li>{@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1}</li>
902 * <li>{@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2}</li>
903 * <li>{@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern}</li>
904 * <li>{@link CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY android.sensor.maxAnalogSensitivity}</li>
905 * <li>{@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions}</li>
906 * <li>{@link CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES android.sensor.availableTestPatternModes}</li>
907 * <li>{@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}</li>
908 * <li>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}</li>
909 * <li>{@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration}</li>
910 * <li>{@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}</li>
911 * <li>{@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}</li>
912 * <li>{@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}</li>
913 * <li>{@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference}</li>
914 * <li>{@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}</li>
915 * </ul>
Shuzhen Wang0fdc9352019-03-29 10:43:55 -0700916 * <p>The field of view of all non-RAW physical streams must be the same or as close as
917 * possible to that of non-RAW logical streams. If the requested FOV is outside of the
918 * range supported by the physical camera, the physical stream for that physical camera
919 * will use either the maximum or minimum scaler crop region, depending on which one is
920 * closer to the requested FOV. For example, for a logical camera with wide-tele lens
921 * configuration where the wide lens is the default, if the logical camera's crop region
922 * is set to maximum, the physical stream for the tele lens will be configured to its
923 * maximum crop region. On the other hand, if the logical camera has a normal-wide lens
924 * configuration where the normal lens is the default, when the logical camera's crop
925 * region is set to maximum, the FOV of the logical streams will be that of the normal
926 * lens. The FOV of the physical streams for the wide lens will be the same as the
927 * logical stream, by making the crop region smaller than its active array size to
928 * compensate for the smaller focal length.</p>
929 * <p>Even if the underlying physical cameras have different RAW characteristics (such as
930 * size or CFA pattern), a logical camera can still advertise RAW capability. In this
931 * case, when the application configures a RAW stream, the camera device will make sure
932 * the active physical camera will remain active to ensure consistent RAW output
933 * behavior, and not switch to other physical cameras.</p>
Shuzhen Wangda189bd2019-06-26 14:48:36 -0700934 * <p>The capture request and result metadata tags required for backward compatible camera
935 * functionalities will be solely based on the logical camera capabiltity. On the other
936 * hand, the use of manual capture controls (sensor or post-processing) with a
937 * logical camera may result in unexpected behavior when the HAL decides to switch
938 * between physical cameras with different characteristics under the hood. For example,
939 * when the application manually sets exposure time and sensitivity while zooming in,
940 * the brightness of the camera images may suddenly change because HAL switches from one
941 * physical camera to the other.</p>
Shuzhen Wang23d29382017-11-26 17:24:56 -0800942 *
Eino-Ville Talvala915f5042018-03-13 19:08:01 -0700943 * @see CameraCharacteristics#LENS_DISTORTION
Shuzhen Wang61aaa322018-11-19 16:04:57 -0800944 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
945 * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE
946 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
Shuzhen Wang23d29382017-11-26 17:24:56 -0800947 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
948 * @see CameraCharacteristics#LENS_POSE_REFERENCE
949 * @see CameraCharacteristics#LENS_POSE_ROTATION
950 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
Shuzhen Wang61aaa322018-11-19 16:04:57 -0800951 * @see CaptureResult#LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID
Shuzhen Wang23d29382017-11-26 17:24:56 -0800952 * @see CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
Shuzhen Wang61aaa322018-11-19 16:04:57 -0800953 * @see CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES
954 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
955 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1
956 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2
957 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM1
958 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM2
959 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX1
960 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX2
961 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
962 * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
963 * @see CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED
964 * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
965 * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE
966 * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
967 * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL
968 * @see CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY
969 * @see CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS
970 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
971 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
Shuzhen Wang23d29382017-11-26 17:24:56 -0800972 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
973 */
974 public static final int REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA = 11;
975
Shuzhen Wang51248bf2018-03-22 00:04:45 -0700976 /**
977 * <p>The camera device is a monochrome camera that doesn't contain a color filter array,
Shuzhen Wanga8d36032018-10-15 12:01:53 -0700978 * 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 -0700979 * <p>A MONOCHROME camera must support the guaranteed stream combinations required for
980 * its device level and capabilities. Additionally, if the monochrome camera device
981 * 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 -0700982 * to {@link android.graphics.ImageFormat#Y8 Y8} as well. There are no
983 * mandatory stream combination requirements with regard to
984 * {@link android.graphics.ImageFormat#Y8 Y8} for Bayer camera devices.</p>
985 * <p>Starting from Android Q, the SENSOR_INFO_COLOR_FILTER_ARRANGEMENT of a MONOCHROME
986 * camera will be either MONO or NIR.</p>
Shuzhen Wang51248bf2018-03-22 00:04:45 -0700987 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
988 */
989 public static final int REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME = 12;
990
Jayant Chowdharyd88b4832019-01-24 18:11:09 -0800991 /**
992 * <p>The camera device is capable of writing image data into a region of memory
993 * inaccessible to Android userspace or the Android kernel, and only accessible to
994 * trusted execution environments (TEE).</p>
995 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
996 */
997 public static final int REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA = 13;
998
Igor Murashkine46c0da2014-02-07 18:34:37 -0800999 //
Zhijun He14986152014-05-22 21:17:37 -07001000 // Enumeration values for CameraCharacteristics#SCALER_CROPPING_TYPE
1001 //
1002
1003 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001004 * <p>The camera device only supports centered 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_CENTER_ONLY = 0;
1008
1009 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001010 * <p>The camera device supports arbitrarily chosen crop regions.</p>
Zhijun He14986152014-05-22 21:17:37 -07001011 * @see CameraCharacteristics#SCALER_CROPPING_TYPE
1012 */
1013 public static final int SCALER_CROPPING_TYPE_FREEFORM = 1;
1014
1015 //
Zhijun Hed1784962014-04-08 17:41:46 -07001016 // Enumeration values for CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1017 //
1018
1019 /**
1020 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1021 */
1022 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB = 0;
1023
1024 /**
1025 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1026 */
1027 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG = 1;
1028
1029 /**
1030 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1031 */
1032 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG = 2;
1033
1034 /**
1035 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1036 */
1037 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR = 3;
1038
1039 /**
1040 * <p>Sensor is not Bayer; output has 3 16-bit
1041 * values for each pixel, instead of just 1 16-bit value
1042 * per pixel.</p>
1043 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1044 */
1045 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB = 4;
1046
Shuzhen Wanga8d36032018-10-15 12:01:53 -07001047 /**
1048 * <p>Sensor doesn't have any Bayer color filter.
1049 * Such sensor captures visible light in monochrome. The exact weighting and
1050 * wavelengths captured is not specified, but generally only includes the visible
1051 * frequencies. This value implies a MONOCHROME camera.</p>
1052 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1053 */
1054 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_MONO = 5;
1055
1056 /**
1057 * <p>Sensor has a near infrared filter capturing light with wavelength between
1058 * roughly 750nm and 1400nm, and the same filter covers the whole sensor array. This
1059 * value implies a MONOCHROME camera.</p>
1060 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1061 */
1062 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR = 6;
1063
Zhijun Hed1784962014-04-08 17:41:46 -07001064 //
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07001065 // Enumeration values for CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
Zhijun He45fa43a12014-06-13 18:29:37 -07001066 //
1067
1068 /**
1069 * <p>Timestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in nanoseconds and monotonic,
1070 * but can not be compared to timestamps from other subsystems
1071 * (e.g. accelerometer, gyro etc.), or other instances of the same or different
1072 * camera devices in the same system. Timestamps between streams and results for
1073 * a single camera instance are comparable, and the timestamps for all buffers
1074 * and the result metadata generated by a single capture are identical.</p>
1075 *
1076 * @see CaptureResult#SENSOR_TIMESTAMP
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07001077 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
Zhijun He45fa43a12014-06-13 18:29:37 -07001078 */
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07001079 public static final int SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN = 0;
Zhijun He45fa43a12014-06-13 18:29:37 -07001080
1081 /**
1082 * <p>Timestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in the same timebase as
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07001083 * {@link android.os.SystemClock#elapsedRealtimeNanos },
Zhijun He45fa43a12014-06-13 18:29:37 -07001084 * and they can be compared to other timestamps using that base.</p>
1085 *
1086 * @see CaptureResult#SENSOR_TIMESTAMP
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07001087 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
Zhijun He45fa43a12014-06-13 18:29:37 -07001088 */
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07001089 public static final int SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME = 1;
Zhijun He45fa43a12014-06-13 18:29:37 -07001090
1091 //
Ruben Brunk7c062362014-04-15 23:53:53 -07001092 // Enumeration values for CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1093 //
1094
1095 /**
1096 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1097 */
1098 public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT = 1;
1099
1100 /**
1101 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1102 */
1103 public static final int SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT = 2;
1104
1105 /**
1106 * <p>Incandescent light</p>
1107 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1108 */
1109 public static final int SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN = 3;
1110
1111 /**
1112 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1113 */
1114 public static final int SENSOR_REFERENCE_ILLUMINANT1_FLASH = 4;
1115
1116 /**
1117 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1118 */
1119 public static final int SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER = 9;
1120
1121 /**
1122 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1123 */
1124 public static final int SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER = 10;
1125
1126 /**
1127 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1128 */
1129 public static final int SENSOR_REFERENCE_ILLUMINANT1_SHADE = 11;
1130
1131 /**
1132 * <p>D 5700 - 7100K</p>
1133 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1134 */
1135 public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT = 12;
1136
1137 /**
1138 * <p>N 4600 - 5400K</p>
1139 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1140 */
1141 public static final int SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT = 13;
1142
1143 /**
1144 * <p>W 3900 - 4500K</p>
1145 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1146 */
1147 public static final int SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT = 14;
1148
1149 /**
1150 * <p>WW 3200 - 3700K</p>
1151 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1152 */
1153 public static final int SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT = 15;
1154
1155 /**
1156 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1157 */
1158 public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A = 17;
1159
1160 /**
1161 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1162 */
1163 public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B = 18;
1164
1165 /**
1166 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1167 */
1168 public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C = 19;
1169
1170 /**
1171 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1172 */
1173 public static final int SENSOR_REFERENCE_ILLUMINANT1_D55 = 20;
1174
1175 /**
1176 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1177 */
1178 public static final int SENSOR_REFERENCE_ILLUMINANT1_D65 = 21;
1179
1180 /**
1181 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1182 */
1183 public static final int SENSOR_REFERENCE_ILLUMINANT1_D75 = 22;
1184
1185 /**
1186 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1187 */
1188 public static final int SENSOR_REFERENCE_ILLUMINANT1_D50 = 23;
1189
1190 /**
1191 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1192 */
1193 public static final int SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN = 24;
1194
1195 //
Igor Murashkin68f40062013-09-10 12:15:54 -07001196 // Enumeration values for CameraCharacteristics#LED_AVAILABLE_LEDS
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001197 //
1198
1199 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001200 * <p>android.led.transmit control is used.</p>
Igor Murashkin68f40062013-09-10 12:15:54 -07001201 * @see CameraCharacteristics#LED_AVAILABLE_LEDS
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001202 * @hide
1203 */
1204 public static final int LED_AVAILABLE_LEDS_TRANSMIT = 0;
1205
1206 //
Igor Murashkin68f40062013-09-10 12:15:54 -07001207 // Enumeration values for CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001208 //
1209
1210 /**
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08001211 * <p>This camera device does not have enough capabilities to qualify as a <code>FULL</code> device or
1212 * better.</p>
1213 * <p>Only the stream configurations listed in the <code>LEGACY</code> and <code>LIMITED</code> tables in the
1214 * {@link android.hardware.camera2.CameraDevice#createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p>
1215 * <p>All <code>LIMITED</code> devices support the <code>BACKWARDS_COMPATIBLE</code> capability, indicating basic
1216 * support for color image capture. The only exception is that the device may
1217 * alternatively support only the <code>DEPTH_OUTPUT</code> capability, if it can only output depth
1218 * measurements and not color images.</p>
1219 * <p><code>LIMITED</code> devices and above require the use of {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}
1220 * to lock exposure metering (and calculate flash power, for cameras with flash) before
1221 * capturing a high-quality still image.</p>
1222 * <p>A <code>LIMITED</code> device that only lists the <code>BACKWARDS_COMPATIBLE</code> capability is only
1223 * required to support full-automatic operation and post-processing (<code>OFF</code> is not
1224 * supported for {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}, {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}, or
1225 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode})</p>
1226 * <p>Additional capabilities may optionally be supported by a <code>LIMITED</code>-level device, and
1227 * can be checked for in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
1228 *
1229 * @see CaptureRequest#CONTROL_AE_MODE
1230 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1231 * @see CaptureRequest#CONTROL_AF_MODE
1232 * @see CaptureRequest#CONTROL_AWB_MODE
1233 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Igor Murashkin68f40062013-09-10 12:15:54 -07001234 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001235 */
1236 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0;
1237
1238 /**
Ruben Brunk4a61a862014-07-01 16:00:26 -07001239 * <p>This camera device is capable of supporting advanced imaging applications.</p>
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08001240 * <p>The stream configurations listed in the <code>FULL</code>, <code>LEGACY</code> and <code>LIMITED</code> tables in the
1241 * {@link android.hardware.camera2.CameraDevice#createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p>
1242 * <p>A <code>FULL</code> device will support below capabilities:</p>
1243 * <ul>
1244 * <li><code>BURST_CAPTURE</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1245 * <code>BURST_CAPTURE</code>)</li>
1246 * <li>Per frame control ({@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} <code>==</code> PER_FRAME_CONTROL)</li>
1247 * <li>Manual sensor control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains <code>MANUAL_SENSOR</code>)</li>
1248 * <li>Manual post-processing control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1249 * <code>MANUAL_POST_PROCESSING</code>)</li>
1250 * <li>The required exposure time range defined in {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
1251 * <li>The required maxFrameDuration defined in {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li>
1252 * </ul>
1253 * <p>Note:
1254 * Pre-API level 23, FULL devices also supported arbitrary cropping region
1255 * ({@link CameraCharacteristics#SCALER_CROPPING_TYPE android.scaler.croppingType} <code>== FREEFORM</code>); this requirement was relaxed in API level
1256 * 23, and <code>FULL</code> devices may only support <code>CENTERED</code> cropping.</p>
1257 *
1258 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1259 * @see CameraCharacteristics#SCALER_CROPPING_TYPE
1260 * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
1261 * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
1262 * @see CameraCharacteristics#SYNC_MAX_LATENCY
Igor Murashkin68f40062013-09-10 12:15:54 -07001263 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001264 */
1265 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1;
1266
Ruben Brunk4a61a862014-07-01 16:00:26 -07001267 /**
1268 * <p>This camera device is running in backward compatibility mode.</p>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08001269 * <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 -08001270 * <p>A <code>LEGACY</code> device does not support per-frame control, manual sensor control, manual
1271 * post-processing, arbitrary cropping regions, and has relaxed performance constraints.
1272 * No additional capabilities beyond <code>BACKWARD_COMPATIBLE</code> will ever be listed by a
1273 * <code>LEGACY</code> device in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
1274 * <p>In addition, the {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is not functional on <code>LEGACY</code>
1275 * devices. Instead, every request that includes a JPEG-format output target is treated
1276 * as triggering a still capture, internally executing a precapture trigger. This may
1277 * fire the flash for flash power metering during precapture, and then fire the flash
1278 * for the final capture, if a flash is available on the device and the AE mode is set to
1279 * enable the flash.</p>
Eino-Ville Talvala2a303a42019-04-10 17:29:09 -07001280 * <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 -08001281 *
1282 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1283 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Ruben Brunk4a61a862014-07-01 16:00:26 -07001284 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1285 */
1286 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY = 2;
1287
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08001288 /**
1289 * <p>This camera device is capable of YUV reprocessing and RAW data capture, in addition to
1290 * FULL-level capabilities.</p>
1291 * <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 -08001292 * <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 -08001293 * <p>The following additional capabilities are guaranteed to be supported:</p>
1294 * <ul>
1295 * <li><code>YUV_REPROCESSING</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1296 * <code>YUV_REPROCESSING</code>)</li>
1297 * <li><code>RAW</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1298 * <code>RAW</code>)</li>
1299 * </ul>
1300 *
1301 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1302 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1303 */
1304 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_3 = 3;
1305
Yin-Chia Yeh43cea5a2018-01-19 11:38:12 -08001306 /**
1307 * <p>This camera device is backed by an external camera connected to this Android device.</p>
1308 * <p>The device has capability identical to a LIMITED level device, with the following
1309 * exceptions:</p>
1310 * <ul>
1311 * <li>The device may not report lens/sensor related information such as<ul>
1312 * <li>{@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}</li>
1313 * <li>{@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}</li>
1314 * <li>{@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize}</li>
1315 * <li>{@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}</li>
1316 * <li>{@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern}</li>
1317 * <li>{@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}</li>
1318 * <li>{@link CaptureResult#SENSOR_ROLLING_SHUTTER_SKEW android.sensor.rollingShutterSkew}</li>
1319 * </ul>
1320 * </li>
1321 * <li>The device will report 0 for {@link CameraCharacteristics#SENSOR_ORIENTATION android.sensor.orientation}</li>
1322 * <li>The device has less guarantee on stable framerate, as the framerate partly depends
1323 * on the external camera being used.</li>
1324 * </ul>
1325 *
1326 * @see CaptureRequest#LENS_FOCAL_LENGTH
1327 * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE
1328 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
1329 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1330 * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE
1331 * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL
1332 * @see CameraCharacteristics#SENSOR_ORIENTATION
1333 * @see CaptureResult#SENSOR_ROLLING_SHUTTER_SKEW
1334 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1335 */
1336 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL = 4;
1337
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001338 //
Igor Murashkin3865a842014-01-17 18:18:39 -08001339 // Enumeration values for CameraCharacteristics#SYNC_MAX_LATENCY
1340 //
1341
1342 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001343 * <p>Every frame has the requests immediately applied.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08001344 * <p>Changing controls over multiple requests one after another will
1345 * produce results that have those controls applied atomically
1346 * each frame.</p>
1347 * <p>All FULL capability devices will have this as their maxLatency.</p>
1348 * @see CameraCharacteristics#SYNC_MAX_LATENCY
1349 */
1350 public static final int SYNC_MAX_LATENCY_PER_FRAME_CONTROL = 0;
1351
1352 /**
1353 * <p>Each new frame has some subset (potentially the entire set)
1354 * of the past requests applied to the camera settings.</p>
1355 * <p>By submitting a series of identical requests, the camera device
1356 * will eventually have the camera settings applied, but it is
1357 * unknown when that exact point will be.</p>
Igor Murashkinbdf366c2014-07-25 16:54:20 -07001358 * <p>All LEGACY capability devices will have this as their maxLatency.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08001359 * @see CameraCharacteristics#SYNC_MAX_LATENCY
1360 */
1361 public static final int SYNC_MAX_LATENCY_UNKNOWN = -1;
1362
1363 //
Shuzhen Wang23d29382017-11-26 17:24:56 -08001364 // Enumeration values for CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
1365 //
1366
1367 /**
1368 * <p>A software mechanism is used to synchronize between the physical cameras. As a result,
1369 * the timestamp of an image from a physical stream is only an approximation of the
1370 * image sensor start-of-exposure time.</p>
1371 * @see CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
1372 */
1373 public static final int LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE = 0;
1374
1375 /**
1376 * <p>The camera device supports frame timestamp synchronization at the hardware level,
1377 * and the timestamp of a physical stream image accurately reflects its
1378 * start-of-exposure time.</p>
1379 * @see CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
1380 */
1381 public static final int LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED = 1;
1382
1383 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001384 // Enumeration values for CaptureRequest#COLOR_CORRECTION_MODE
1385 //
1386
1387 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001388 * <p>Use the {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} matrix
Igor Murashkin7d2a5c52014-01-17 15:07:52 -08001389 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} to do color conversion.</p>
1390 * <p>All advanced white balance adjustments (not specified
1391 * by our white balance pipeline) must be disabled.</p>
1392 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
1393 * TRANSFORM_MATRIX is ignored. The camera device will override
1394 * this value to either FAST or HIGH_QUALITY.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001395 *
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001396 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001397 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Igor Murashkin7d2a5c52014-01-17 15:07:52 -08001398 * @see CaptureRequest#CONTROL_AWB_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001399 * @see CaptureRequest#COLOR_CORRECTION_MODE
1400 */
1401 public static final int COLOR_CORRECTION_MODE_TRANSFORM_MATRIX = 0;
1402
1403 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001404 * <p>Color correction processing must not slow down
1405 * capture rate relative to sensor raw output.</p>
Igor Murashkin7d2a5c52014-01-17 15:07:52 -08001406 * <p>Advanced white balance adjustments above and beyond
1407 * the specified white balance pipeline may be applied.</p>
1408 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
1409 * the camera device uses the last frame's AWB values
1410 * (or defaults if AWB has never been run).</p>
1411 *
1412 * @see CaptureRequest#CONTROL_AWB_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001413 * @see CaptureRequest#COLOR_CORRECTION_MODE
1414 */
1415 public static final int COLOR_CORRECTION_MODE_FAST = 1;
1416
1417 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001418 * <p>Color correction processing operates at improved
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07001419 * quality but the capture rate might be reduced (relative to sensor
1420 * raw output rate)</p>
Igor Murashkin7d2a5c52014-01-17 15:07:52 -08001421 * <p>Advanced white balance adjustments above and beyond
1422 * the specified white balance pipeline may be applied.</p>
1423 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
1424 * the camera device uses the last frame's AWB values
1425 * (or defaults if AWB has never been run).</p>
1426 *
1427 * @see CaptureRequest#CONTROL_AWB_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001428 * @see CaptureRequest#COLOR_CORRECTION_MODE
1429 */
1430 public static final int COLOR_CORRECTION_MODE_HIGH_QUALITY = 2;
1431
1432 //
Zhijun He9e4e4392014-08-18 11:12:32 -07001433 // Enumeration values for CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
Zhijun Hea05e59d2014-07-08 18:27:47 -07001434 //
1435
1436 /**
1437 * <p>No aberration correction is applied.</p>
Zhijun He9e4e4392014-08-18 11:12:32 -07001438 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
Zhijun Hea05e59d2014-07-08 18:27:47 -07001439 */
Zhijun He9e4e4392014-08-18 11:12:32 -07001440 public static final int COLOR_CORRECTION_ABERRATION_MODE_OFF = 0;
Zhijun Hea05e59d2014-07-08 18:27:47 -07001441
1442 /**
1443 * <p>Aberration correction will not slow down capture rate
1444 * relative to sensor raw output.</p>
Zhijun He9e4e4392014-08-18 11:12:32 -07001445 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
Zhijun Hea05e59d2014-07-08 18:27:47 -07001446 */
Zhijun He9e4e4392014-08-18 11:12:32 -07001447 public static final int COLOR_CORRECTION_ABERRATION_MODE_FAST = 1;
Zhijun Hea05e59d2014-07-08 18:27:47 -07001448
1449 /**
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07001450 * <p>Aberration correction operates at improved quality but the capture rate might be
1451 * reduced (relative to sensor raw output rate)</p>
Zhijun He9e4e4392014-08-18 11:12:32 -07001452 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
Zhijun Hea05e59d2014-07-08 18:27:47 -07001453 */
Zhijun He9e4e4392014-08-18 11:12:32 -07001454 public static final int COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY = 2;
Zhijun Hea05e59d2014-07-08 18:27:47 -07001455
1456 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001457 // Enumeration values for CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1458 //
1459
1460 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001461 * <p>The camera device will not adjust exposure duration to
1462 * avoid banding problems.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001463 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1464 */
1465 public static final int CONTROL_AE_ANTIBANDING_MODE_OFF = 0;
1466
1467 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001468 * <p>The camera device will adjust exposure duration to
1469 * avoid banding problems with 50Hz illumination sources.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001470 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1471 */
1472 public static final int CONTROL_AE_ANTIBANDING_MODE_50HZ = 1;
1473
1474 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001475 * <p>The camera device will adjust exposure duration to
1476 * avoid banding problems with 60Hz illumination
1477 * sources.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001478 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1479 */
1480 public static final int CONTROL_AE_ANTIBANDING_MODE_60HZ = 2;
1481
1482 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001483 * <p>The camera device will automatically adapt its
1484 * antibanding routine to the current illumination
Yin-Chia Yeh7b2cae62014-11-25 11:54:18 -08001485 * condition. This is the default mode if AUTO is
1486 * available on given camera device.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001487 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1488 */
1489 public static final int CONTROL_AE_ANTIBANDING_MODE_AUTO = 3;
1490
1491 //
1492 // Enumeration values for CaptureRequest#CONTROL_AE_MODE
1493 //
1494
1495 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001496 * <p>The camera device's autoexposure routine is disabled.</p>
1497 * <p>The application-selected {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001498 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} and
1499 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are used by the camera
1500 * device, along with android.flash.* fields, if there's
1501 * a flash unit for this camera device.</p>
Yin-Chia Yeh7144b5d2014-11-12 11:42:49 -08001502 * <p>Note that auto-white balance (AWB) and auto-focus (AF)
1503 * behavior is device dependent when AE is in OFF mode.
1504 * To have consistent behavior across different devices,
1505 * it is recommended to either set AWB and AF to OFF mode
1506 * or lock AWB and AF before setting AE to OFF.
1507 * See {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode},
1508 * {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}, and {@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}
1509 * for more details.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001510 * <p>LEGACY devices do not support the OFF mode and will
1511 * override attempts to use this value to ON.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001512 *
Yin-Chia Yeh7144b5d2014-11-12 11:42:49 -08001513 * @see CaptureRequest#CONTROL_AF_MODE
1514 * @see CaptureRequest#CONTROL_AF_TRIGGER
1515 * @see CaptureRequest#CONTROL_AWB_LOCK
1516 * @see CaptureRequest#CONTROL_AWB_MODE
Zhijun He5f2a47f2014-01-16 15:44:41 -08001517 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001518 * @see CaptureRequest#SENSOR_FRAME_DURATION
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001519 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001520 * @see CaptureRequest#CONTROL_AE_MODE
1521 */
1522 public static final int CONTROL_AE_MODE_OFF = 0;
1523
1524 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001525 * <p>The camera device's autoexposure routine is active,
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001526 * with no flash control.</p>
1527 * <p>The application's values for
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001528 * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
1529 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and
1530 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are ignored. The
1531 * application has control over the various
1532 * android.flash.* fields.</p>
1533 *
Zhijun He5f2a47f2014-01-16 15:44:41 -08001534 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001535 * @see CaptureRequest#SENSOR_FRAME_DURATION
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001536 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001537 * @see CaptureRequest#CONTROL_AE_MODE
1538 */
1539 public static final int CONTROL_AE_MODE_ON = 1;
1540
1541 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001542 * <p>Like ON, except that the camera device also controls
1543 * the camera's flash unit, firing it in low-light
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001544 * conditions.</p>
1545 * <p>The flash may be fired during a precapture sequence
1546 * (triggered by {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and
1547 * may be fired for captures for which the
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001548 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to
1549 * STILL_CAPTURE</p>
1550 *
Igor Murashkin3242f4f2014-01-15 12:27:41 -08001551 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
Zhijun He5f2a47f2014-01-16 15:44:41 -08001552 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001553 * @see CaptureRequest#CONTROL_AE_MODE
1554 */
1555 public static final int CONTROL_AE_MODE_ON_AUTO_FLASH = 2;
1556
1557 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001558 * <p>Like ON, except that the camera device also controls
1559 * the camera's flash unit, always firing it for still
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001560 * captures.</p>
1561 * <p>The flash may be fired during a precapture sequence
1562 * (triggered by {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and
1563 * will always be fired for captures for which the
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001564 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to
1565 * STILL_CAPTURE</p>
1566 *
Igor Murashkin3242f4f2014-01-15 12:27:41 -08001567 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
Zhijun He5f2a47f2014-01-16 15:44:41 -08001568 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001569 * @see CaptureRequest#CONTROL_AE_MODE
1570 */
1571 public static final int CONTROL_AE_MODE_ON_ALWAYS_FLASH = 3;
1572
1573 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001574 * <p>Like ON_AUTO_FLASH, but with automatic red eye
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001575 * reduction.</p>
1576 * <p>If deemed necessary by the camera device, a red eye
1577 * reduction flash will fire during the precapture
1578 * sequence.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001579 * @see CaptureRequest#CONTROL_AE_MODE
1580 */
1581 public static final int CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE = 4;
1582
Chien-Yu Chen2cf33572018-01-11 11:35:41 -08001583 /**
1584 * <p>An external flash has been turned on.</p>
1585 * <p>It informs the camera device that an external flash has been turned on, and that
1586 * metering (and continuous focus if active) should be quickly recaculated to account
1587 * for the external flash. Otherwise, this mode acts like ON.</p>
1588 * <p>When the external flash is turned off, AE mode should be changed to one of the
1589 * other available AE modes.</p>
Chien-Yu Chenc9ca7222018-03-15 11:14:29 -07001590 * <p>If the camera device supports AE external flash mode, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} must
1591 * be FLASH_REQUIRED after the camera device finishes AE scan and it's too dark without
Chien-Yu Chen2cf33572018-01-11 11:35:41 -08001592 * flash.</p>
Chien-Yu Chenc9ca7222018-03-15 11:14:29 -07001593 *
1594 * @see CaptureResult#CONTROL_AE_STATE
Chien-Yu Chen2cf33572018-01-11 11:35:41 -08001595 * @see CaptureRequest#CONTROL_AE_MODE
1596 */
1597 public static final int CONTROL_AE_MODE_ON_EXTERNAL_FLASH = 5;
1598
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001599 //
1600 // Enumeration values for CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1601 //
1602
1603 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001604 * <p>The trigger is idle.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001605 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1606 */
1607 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_IDLE = 0;
1608
1609 /**
Zhijun He228f4f92014-01-16 17:22:05 -08001610 * <p>The precapture metering sequence will be started
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001611 * by the camera device.</p>
1612 * <p>The exact effect of the precapture trigger depends on
1613 * the current AE mode and state.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001614 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1615 */
1616 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_START = 1;
1617
Zhijun Hefa95b042015-02-09 10:40:49 -08001618 /**
1619 * <p>The camera device will cancel any currently active or completed
1620 * precapture metering sequence, the auto-exposure routine will return to its
1621 * initial state.</p>
1622 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1623 */
1624 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL = 2;
1625
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001626 //
1627 // Enumeration values for CaptureRequest#CONTROL_AF_MODE
1628 //
1629
1630 /**
Zhijun Hef3537422013-12-16 16:56:35 -08001631 * <p>The auto-focus routine does not control the lens;
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001632 * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} is controlled by the
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001633 * application.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001634 *
1635 * @see CaptureRequest#LENS_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001636 * @see CaptureRequest#CONTROL_AF_MODE
1637 */
1638 public static final int CONTROL_AF_MODE_OFF = 0;
1639
1640 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001641 * <p>Basic automatic focus mode.</p>
1642 * <p>In this mode, the lens does not move unless
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001643 * the autofocus trigger action is called. When that trigger
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001644 * is activated, AF will transition to ACTIVE_SCAN, then to
Zhijun Hef3537422013-12-16 16:56:35 -08001645 * the outcome of the scan (FOCUSED or NOT_FOCUSED).</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001646 * <p>Always supported if lens is not fixed focus.</p>
1647 * <p>Use {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} to determine if lens
1648 * is fixed-focus.</p>
Zhijun Hef3537422013-12-16 16:56:35 -08001649 * <p>Triggering AF_CANCEL resets the lens position to default,
Igor Murashkinace5bf02013-12-10 17:36:40 -08001650 * and sets the AF state to INACTIVE.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001651 *
1652 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001653 * @see CaptureRequest#CONTROL_AF_MODE
1654 */
1655 public static final int CONTROL_AF_MODE_AUTO = 1;
1656
1657 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001658 * <p>Close-up focusing mode.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08001659 * <p>In this mode, the lens does not move unless the
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001660 * autofocus trigger action is called. When that trigger is
1661 * activated, AF will transition to ACTIVE_SCAN, then to
1662 * the outcome of the scan (FOCUSED or NOT_FOCUSED). This
1663 * mode is optimized for focusing on objects very close to
1664 * the camera.</p>
1665 * <p>When that trigger is activated, AF will transition to
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001666 * ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001667 * NOT_FOCUSED). Triggering cancel AF resets the lens
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001668 * position to default, and sets the AF state to
Igor Murashkinace5bf02013-12-10 17:36:40 -08001669 * INACTIVE.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001670 * @see CaptureRequest#CONTROL_AF_MODE
1671 */
1672 public static final int CONTROL_AF_MODE_MACRO = 2;
1673
1674 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001675 * <p>In this mode, the AF algorithm modifies the lens
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001676 * position continually to attempt to provide a
Igor Murashkinace5bf02013-12-10 17:36:40 -08001677 * constantly-in-focus image stream.</p>
1678 * <p>The focusing behavior should be suitable for good quality
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001679 * video recording; typically this means slower focus
1680 * movement and no overshoots. When the AF trigger is not
1681 * involved, the AF algorithm should start in INACTIVE state,
1682 * and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED
1683 * states as appropriate. When the AF trigger is activated,
1684 * the algorithm should immediately transition into
1685 * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
Igor Murashkinace5bf02013-12-10 17:36:40 -08001686 * lens position until a cancel AF trigger is received.</p>
1687 * <p>Once cancel is received, the algorithm should transition
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001688 * back to INACTIVE and resume passive scan. Note that this
1689 * behavior is not identical to CONTINUOUS_PICTURE, since an
1690 * ongoing PASSIVE_SCAN must immediately be
Igor Murashkinace5bf02013-12-10 17:36:40 -08001691 * canceled.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001692 * @see CaptureRequest#CONTROL_AF_MODE
1693 */
1694 public static final int CONTROL_AF_MODE_CONTINUOUS_VIDEO = 3;
1695
1696 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001697 * <p>In this mode, the AF algorithm modifies the lens
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001698 * position continually to attempt to provide a
Igor Murashkinace5bf02013-12-10 17:36:40 -08001699 * constantly-in-focus image stream.</p>
1700 * <p>The focusing behavior should be suitable for still image
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001701 * capture; typically this means focusing as fast as
1702 * possible. When the AF trigger is not involved, the AF
1703 * algorithm should start in INACTIVE state, and then
1704 * transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as
1705 * appropriate as it attempts to maintain focus. When the AF
1706 * trigger is activated, the algorithm should finish its
1707 * PASSIVE_SCAN if active, and then transition into
1708 * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
Igor Murashkinace5bf02013-12-10 17:36:40 -08001709 * lens position until a cancel AF trigger is received.</p>
1710 * <p>When the AF cancel trigger is activated, the algorithm
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001711 * should transition back to INACTIVE and then act as if it
Igor Murashkinace5bf02013-12-10 17:36:40 -08001712 * has just been started.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001713 * @see CaptureRequest#CONTROL_AF_MODE
1714 */
1715 public static final int CONTROL_AF_MODE_CONTINUOUS_PICTURE = 4;
1716
1717 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001718 * <p>Extended depth of field (digital focus) mode.</p>
1719 * <p>The camera device will produce images with an extended
1720 * depth of field automatically; no special focusing
1721 * operations need to be done before taking a picture.</p>
1722 * <p>AF triggers are ignored, and the AF state will always be
Igor Murashkinace5bf02013-12-10 17:36:40 -08001723 * INACTIVE.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001724 * @see CaptureRequest#CONTROL_AF_MODE
1725 */
1726 public static final int CONTROL_AF_MODE_EDOF = 5;
1727
1728 //
1729 // Enumeration values for CaptureRequest#CONTROL_AF_TRIGGER
1730 //
1731
1732 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001733 * <p>The trigger is idle.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001734 * @see CaptureRequest#CONTROL_AF_TRIGGER
1735 */
1736 public static final int CONTROL_AF_TRIGGER_IDLE = 0;
1737
1738 /**
Zhijun He228f4f92014-01-16 17:22:05 -08001739 * <p>Autofocus will trigger now.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001740 * @see CaptureRequest#CONTROL_AF_TRIGGER
1741 */
1742 public static final int CONTROL_AF_TRIGGER_START = 1;
1743
1744 /**
Zhijun He228f4f92014-01-16 17:22:05 -08001745 * <p>Autofocus will return to its initial
1746 * state, and cancel any currently active trigger.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001747 * @see CaptureRequest#CONTROL_AF_TRIGGER
1748 */
1749 public static final int CONTROL_AF_TRIGGER_CANCEL = 2;
1750
1751 //
1752 // Enumeration values for CaptureRequest#CONTROL_AWB_MODE
1753 //
1754
1755 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001756 * <p>The camera device's auto-white balance routine is disabled.</p>
1757 * <p>The application-selected color transform matrix
Zhijun He399f05d2014-01-15 11:31:30 -08001758 * ({@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}) and gains
1759 * ({@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}) are used by the camera
1760 * device for manual white balance control.</p>
1761 *
Zhijun He399f05d2014-01-15 11:31:30 -08001762 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001763 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001764 * @see CaptureRequest#CONTROL_AWB_MODE
1765 */
1766 public static final int CONTROL_AWB_MODE_OFF = 0;
1767
1768 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001769 * <p>The camera device's auto-white balance routine is active.</p>
1770 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1771 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1772 * For devices that support the MANUAL_POST_PROCESSING capability, the
1773 * values used by the camera device for the transform and gains
1774 * will be available in the capture result for this request.</p>
Zhijun He399f05d2014-01-15 11:31:30 -08001775 *
1776 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001777 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001778 * @see CaptureRequest#CONTROL_AWB_MODE
1779 */
1780 public static final int CONTROL_AWB_MODE_AUTO = 1;
1781
1782 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001783 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001784 * the camera device uses incandescent light as the assumed scene
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001785 * illumination for white balance.</p>
1786 * <p>While the exact white balance transforms are up to the
1787 * camera device, they will approximately match the CIE
1788 * standard illuminant A.</p>
1789 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1790 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1791 * For devices that support the MANUAL_POST_PROCESSING capability, the
1792 * values used by the camera device for the transform and gains
1793 * will be available in the capture result for this request.</p>
1794 *
1795 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1796 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001797 * @see CaptureRequest#CONTROL_AWB_MODE
1798 */
1799 public static final int CONTROL_AWB_MODE_INCANDESCENT = 2;
1800
1801 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001802 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001803 * the camera device uses fluorescent light as the assumed scene
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001804 * illumination for white balance.</p>
1805 * <p>While the exact white balance transforms are up to the
1806 * camera device, they will approximately match the CIE
1807 * standard illuminant F2.</p>
1808 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1809 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1810 * For devices that support the MANUAL_POST_PROCESSING capability, the
1811 * values used by the camera device for the transform and gains
1812 * will be available in the capture result for this request.</p>
1813 *
1814 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1815 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001816 * @see CaptureRequest#CONTROL_AWB_MODE
1817 */
1818 public static final int CONTROL_AWB_MODE_FLUORESCENT = 3;
1819
1820 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001821 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001822 * the camera device uses warm fluorescent light as the assumed scene
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001823 * illumination for white balance.</p>
1824 * <p>While the exact white balance transforms are up to the
1825 * camera device, they will approximately match the CIE
1826 * standard illuminant F4.</p>
1827 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1828 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1829 * For devices that support the MANUAL_POST_PROCESSING capability, the
1830 * values used by the camera device for the transform and gains
1831 * will be available in the capture result for this request.</p>
1832 *
1833 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1834 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001835 * @see CaptureRequest#CONTROL_AWB_MODE
1836 */
1837 public static final int CONTROL_AWB_MODE_WARM_FLUORESCENT = 4;
1838
1839 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001840 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001841 * the camera device uses daylight light as the assumed scene
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001842 * illumination for white balance.</p>
1843 * <p>While the exact white balance transforms are up to the
1844 * camera device, they will approximately match the CIE
1845 * standard illuminant D65.</p>
1846 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1847 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1848 * For devices that support the MANUAL_POST_PROCESSING capability, the
1849 * values used by the camera device for the transform and gains
1850 * will be available in the capture result for this request.</p>
1851 *
1852 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1853 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001854 * @see CaptureRequest#CONTROL_AWB_MODE
1855 */
1856 public static final int CONTROL_AWB_MODE_DAYLIGHT = 5;
1857
1858 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001859 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001860 * the camera device uses cloudy daylight light as the assumed scene
1861 * illumination for white balance.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001862 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1863 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1864 * For devices that support the MANUAL_POST_PROCESSING capability, the
1865 * values used by the camera device for the transform and gains
1866 * will be available in the capture result for this request.</p>
1867 *
1868 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1869 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001870 * @see CaptureRequest#CONTROL_AWB_MODE
1871 */
1872 public static final int CONTROL_AWB_MODE_CLOUDY_DAYLIGHT = 6;
1873
1874 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001875 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001876 * the camera device uses twilight light as the assumed scene
1877 * illumination for white balance.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001878 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1879 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1880 * For devices that support the MANUAL_POST_PROCESSING capability, the
1881 * values used by the camera device for the transform and gains
1882 * will be available in the capture result for this request.</p>
1883 *
1884 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1885 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001886 * @see CaptureRequest#CONTROL_AWB_MODE
1887 */
1888 public static final int CONTROL_AWB_MODE_TWILIGHT = 7;
1889
1890 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001891 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001892 * the camera device uses shade light as the assumed scene
1893 * illumination for white balance.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001894 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1895 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1896 * For devices that support the MANUAL_POST_PROCESSING capability, the
1897 * values used by the camera device for the transform and gains
1898 * will be available in the capture result for this request.</p>
1899 *
1900 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1901 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001902 * @see CaptureRequest#CONTROL_AWB_MODE
1903 */
1904 public static final int CONTROL_AWB_MODE_SHADE = 8;
1905
1906 //
1907 // Enumeration values for CaptureRequest#CONTROL_CAPTURE_INTENT
1908 //
1909
1910 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001911 * <p>The goal of this request doesn't fall into the other
1912 * categories. The camera device will default to preview-like
Igor Murashkinace5bf02013-12-10 17:36:40 -08001913 * behavior.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001914 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1915 */
1916 public static final int CONTROL_CAPTURE_INTENT_CUSTOM = 0;
1917
1918 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001919 * <p>This request is for a preview-like use case.</p>
1920 * <p>The precapture trigger may be used to start off a metering
1921 * w/flash sequence.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001922 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1923 */
1924 public static final int CONTROL_CAPTURE_INTENT_PREVIEW = 1;
1925
1926 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001927 * <p>This request is for a still capture-type
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001928 * use case.</p>
1929 * <p>If the flash unit is under automatic control, it may fire as needed.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001930 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1931 */
1932 public static final int CONTROL_CAPTURE_INTENT_STILL_CAPTURE = 2;
1933
1934 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001935 * <p>This request is for a video recording
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001936 * use case.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001937 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1938 */
1939 public static final int CONTROL_CAPTURE_INTENT_VIDEO_RECORD = 3;
1940
1941 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001942 * <p>This request is for a video snapshot (still
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001943 * image while recording video) use case.</p>
1944 * <p>The camera device should take the highest-quality image
1945 * possible (given the other settings) without disrupting the
Eino-Ville Talvala126a7462014-11-04 16:31:01 -08001946 * frame rate of video recording. </p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001947 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1948 */
1949 public static final int CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT = 4;
1950
1951 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001952 * <p>This request is for a ZSL usecase; the
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001953 * application will stream full-resolution images and
1954 * reprocess one or several later for a final
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001955 * capture.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001956 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1957 */
1958 public static final int CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG = 5;
1959
Zhijun Hee30adb72014-04-09 19:04:31 -07001960 /**
1961 * <p>This request is for manual capture use case where
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001962 * the applications want to directly control the capture parameters.</p>
1963 * <p>For example, the application may wish to manually control
1964 * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, etc.</p>
Zhijun Hee30adb72014-04-09 19:04:31 -07001965 *
1966 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
1967 * @see CaptureRequest#SENSOR_SENSITIVITY
1968 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1969 */
1970 public static final int CONTROL_CAPTURE_INTENT_MANUAL = 6;
1971
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001972 /**
1973 * <p>This request is for a motion tracking use case, where
1974 * the application will use camera and inertial sensor data to
1975 * locate and track objects in the world.</p>
1976 * <p>The camera device auto-exposure routine will limit the exposure time
1977 * of the camera to no more than 20 milliseconds, to minimize motion blur.</p>
1978 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1979 */
1980 public static final int CONTROL_CAPTURE_INTENT_MOTION_TRACKING = 7;
1981
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001982 //
1983 // Enumeration values for CaptureRequest#CONTROL_EFFECT_MODE
1984 //
1985
1986 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001987 * <p>No color effect will be applied.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001988 * @see CaptureRequest#CONTROL_EFFECT_MODE
1989 */
1990 public static final int CONTROL_EFFECT_MODE_OFF = 0;
1991
1992 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001993 * <p>A "monocolor" effect where the image is mapped into
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001994 * a single color.</p>
1995 * <p>This will typically be grayscale.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001996 * @see CaptureRequest#CONTROL_EFFECT_MODE
1997 */
1998 public static final int CONTROL_EFFECT_MODE_MONO = 1;
1999
2000 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08002001 * <p>A "photo-negative" effect where the image's colors
2002 * are inverted.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002003 * @see CaptureRequest#CONTROL_EFFECT_MODE
2004 */
2005 public static final int CONTROL_EFFECT_MODE_NEGATIVE = 2;
2006
2007 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08002008 * <p>A "solarisation" effect (Sabattier effect) where the
2009 * image is wholly or partially reversed in
2010 * tone.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002011 * @see CaptureRequest#CONTROL_EFFECT_MODE
2012 */
2013 public static final int CONTROL_EFFECT_MODE_SOLARIZE = 3;
2014
2015 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08002016 * <p>A "sepia" effect where the image is mapped into warm
2017 * gray, red, and brown tones.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002018 * @see CaptureRequest#CONTROL_EFFECT_MODE
2019 */
2020 public static final int CONTROL_EFFECT_MODE_SEPIA = 4;
2021
2022 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08002023 * <p>A "posterization" effect where the image uses
2024 * discrete regions of tone rather than a continuous
2025 * gradient of tones.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002026 * @see CaptureRequest#CONTROL_EFFECT_MODE
2027 */
2028 public static final int CONTROL_EFFECT_MODE_POSTERIZE = 5;
2029
2030 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08002031 * <p>A "whiteboard" effect where the image is typically displayed
2032 * as regions of white, with black or grey details.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002033 * @see CaptureRequest#CONTROL_EFFECT_MODE
2034 */
2035 public static final int CONTROL_EFFECT_MODE_WHITEBOARD = 6;
2036
2037 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08002038 * <p>A "blackboard" effect where the image is typically displayed
2039 * as regions of black, with white or grey details.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002040 * @see CaptureRequest#CONTROL_EFFECT_MODE
2041 */
2042 public static final int CONTROL_EFFECT_MODE_BLACKBOARD = 7;
2043
2044 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08002045 * <p>An "aqua" effect where a blue hue is added to the image.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002046 * @see CaptureRequest#CONTROL_EFFECT_MODE
2047 */
2048 public static final int CONTROL_EFFECT_MODE_AQUA = 8;
2049
2050 //
2051 // Enumeration values for CaptureRequest#CONTROL_MODE
2052 //
2053
2054 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002055 * <p>Full application control of pipeline.</p>
2056 * <p>All control by the device's metering and focusing (3A)
2057 * routines is disabled, and no other settings in
2058 * android.control.* have any effect, except that
2059 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} may be used by the camera
2060 * device to select post-processing values for processing
2061 * blocks that do not allow for manual control, or are not
2062 * exposed by the camera API.</p>
2063 * <p>However, the camera device's 3A routines may continue to
2064 * collect statistics and update their internal state so that
2065 * when control is switched to AUTO mode, good control values
2066 * can be immediately applied.</p>
2067 *
2068 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002069 * @see CaptureRequest#CONTROL_MODE
2070 */
2071 public static final int CONTROL_MODE_OFF = 0;
2072
2073 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002074 * <p>Use settings for each individual 3A routine.</p>
2075 * <p>Manual control of capture parameters is disabled. All
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002076 * controls in android.control.* besides sceneMode take
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002077 * effect.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002078 * @see CaptureRequest#CONTROL_MODE
2079 */
2080 public static final int CONTROL_MODE_AUTO = 1;
2081
2082 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002083 * <p>Use a specific scene mode.</p>
2084 * <p>Enabling this disables control.aeMode, control.awbMode and
2085 * control.afMode controls; the camera device will ignore
2086 * those settings while USE_SCENE_MODE is active (except for
Zhijun Heee2ebde2015-06-16 19:58:11 -07002087 * FACE_PRIORITY scene mode). Other control entries are still active.
2088 * This setting can only be used if scene mode is supported (i.e.
2089 * {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002090 * contain some modes other than DISABLED).</p>
Zhijun Hea4866242014-03-27 23:51:34 -07002091 *
2092 * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002093 * @see CaptureRequest#CONTROL_MODE
2094 */
2095 public static final int CONTROL_MODE_USE_SCENE_MODE = 2;
2096
Zhijun He2d5e8972014-02-07 16:13:46 -08002097 /**
2098 * <p>Same as OFF mode, except that this capture will not be
2099 * used by camera device background auto-exposure, auto-white balance and
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002100 * auto-focus algorithms (3A) to update their statistics.</p>
2101 * <p>Specifically, the 3A routines are locked to the last
2102 * values set from a request with AUTO, OFF, or
2103 * USE_SCENE_MODE, and any statistics or state updates
2104 * collected from manual captures with OFF_KEEP_STATE will be
2105 * discarded by the camera device.</p>
Zhijun He2d5e8972014-02-07 16:13:46 -08002106 * @see CaptureRequest#CONTROL_MODE
2107 */
2108 public static final int CONTROL_MODE_OFF_KEEP_STATE = 3;
2109
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002110 //
2111 // Enumeration values for CaptureRequest#CONTROL_SCENE_MODE
2112 //
2113
2114 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002115 * <p>Indicates that no scene modes are set for a given capture request.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002116 * @see CaptureRequest#CONTROL_SCENE_MODE
2117 */
Ruben Brunke6679362014-01-17 17:05:54 -08002118 public static final int CONTROL_SCENE_MODE_DISABLED = 0;
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002119
2120 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002121 * <p>If face detection support exists, use face
2122 * detection data for auto-focus, auto-white balance, and
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002123 * auto-exposure routines.</p>
2124 * <p>If face detection statistics are disabled
2125 * (i.e. {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} is set to OFF),
Ruben Brunke6679362014-01-17 17:05:54 -08002126 * this should still operate correctly (but will not return
2127 * face detection statistics to the framework).</p>
2128 * <p>Unlike the other scene modes, {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode},
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002129 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}
Ruben Brunke6679362014-01-17 17:05:54 -08002130 * remain active when FACE_PRIORITY is set.</p>
2131 *
2132 * @see CaptureRequest#CONTROL_AE_MODE
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002133 * @see CaptureRequest#CONTROL_AF_MODE
Ruben Brunke6679362014-01-17 17:05:54 -08002134 * @see CaptureRequest#CONTROL_AWB_MODE
2135 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002136 * @see CaptureRequest#CONTROL_SCENE_MODE
2137 */
2138 public static final int CONTROL_SCENE_MODE_FACE_PRIORITY = 1;
2139
2140 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002141 * <p>Optimized for photos of quickly moving objects.</p>
2142 * <p>Similar to SPORTS.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002143 * @see CaptureRequest#CONTROL_SCENE_MODE
2144 */
2145 public static final int CONTROL_SCENE_MODE_ACTION = 2;
2146
2147 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002148 * <p>Optimized for still photos of people.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002149 * @see CaptureRequest#CONTROL_SCENE_MODE
2150 */
2151 public static final int CONTROL_SCENE_MODE_PORTRAIT = 3;
2152
2153 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002154 * <p>Optimized for photos of distant macroscopic objects.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002155 * @see CaptureRequest#CONTROL_SCENE_MODE
2156 */
2157 public static final int CONTROL_SCENE_MODE_LANDSCAPE = 4;
2158
2159 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002160 * <p>Optimized for low-light settings.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002161 * @see CaptureRequest#CONTROL_SCENE_MODE
2162 */
2163 public static final int CONTROL_SCENE_MODE_NIGHT = 5;
2164
2165 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002166 * <p>Optimized for still photos of people in low-light
2167 * settings.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002168 * @see CaptureRequest#CONTROL_SCENE_MODE
2169 */
2170 public static final int CONTROL_SCENE_MODE_NIGHT_PORTRAIT = 6;
2171
2172 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002173 * <p>Optimized for dim, indoor settings where flash must
2174 * remain off.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002175 * @see CaptureRequest#CONTROL_SCENE_MODE
2176 */
2177 public static final int CONTROL_SCENE_MODE_THEATRE = 7;
2178
2179 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002180 * <p>Optimized for bright, outdoor beach settings.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002181 * @see CaptureRequest#CONTROL_SCENE_MODE
2182 */
2183 public static final int CONTROL_SCENE_MODE_BEACH = 8;
2184
2185 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002186 * <p>Optimized for bright, outdoor settings containing snow.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002187 * @see CaptureRequest#CONTROL_SCENE_MODE
2188 */
2189 public static final int CONTROL_SCENE_MODE_SNOW = 9;
2190
2191 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002192 * <p>Optimized for scenes of the setting sun.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002193 * @see CaptureRequest#CONTROL_SCENE_MODE
2194 */
2195 public static final int CONTROL_SCENE_MODE_SUNSET = 10;
2196
2197 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002198 * <p>Optimized to avoid blurry photos due to small amounts of
2199 * device motion (for example: due to hand shake).</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002200 * @see CaptureRequest#CONTROL_SCENE_MODE
2201 */
2202 public static final int CONTROL_SCENE_MODE_STEADYPHOTO = 11;
2203
2204 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002205 * <p>Optimized for nighttime photos of fireworks.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002206 * @see CaptureRequest#CONTROL_SCENE_MODE
2207 */
2208 public static final int CONTROL_SCENE_MODE_FIREWORKS = 12;
2209
2210 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002211 * <p>Optimized for photos of quickly moving people.</p>
2212 * <p>Similar to ACTION.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002213 * @see CaptureRequest#CONTROL_SCENE_MODE
2214 */
2215 public static final int CONTROL_SCENE_MODE_SPORTS = 13;
2216
2217 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002218 * <p>Optimized for dim, indoor settings with multiple moving
2219 * people.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002220 * @see CaptureRequest#CONTROL_SCENE_MODE
2221 */
2222 public static final int CONTROL_SCENE_MODE_PARTY = 14;
2223
2224 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002225 * <p>Optimized for dim settings where the main light source
Shuzhen Wang2b11fdd2018-10-11 09:17:08 -07002226 * is a candle.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002227 * @see CaptureRequest#CONTROL_SCENE_MODE
2228 */
2229 public static final int CONTROL_SCENE_MODE_CANDLELIGHT = 15;
2230
2231 /**
Ruben Brunke6679362014-01-17 17:05:54 -08002232 * <p>Optimized for accurately capturing a photo of barcode
2233 * for use by camera applications that wish to read the
2234 * barcode value.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002235 * @see CaptureRequest#CONTROL_SCENE_MODE
2236 */
2237 public static final int CONTROL_SCENE_MODE_BARCODE = 16;
2238
Zhijun Hee0404182014-06-26 13:17:09 -07002239 /**
Eino-Ville Talvala639fffe2015-06-30 10:34:48 -07002240 * <p>This is deprecated, please use {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }
2241 * and {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList }
Zhijun Hefab663e2015-05-26 19:46:31 -07002242 * for high speed video recording.</p>
Zhijun Hee0404182014-06-26 13:17:09 -07002243 * <p>Optimized for high speed video recording (frame rate &gt;=60fps) use case.</p>
2244 * <p>The supported high speed video sizes and fps ranges are specified in
2245 * android.control.availableHighSpeedVideoConfigurations. To get desired
2246 * output frame rates, the application is only allowed to select video size
2247 * and fps range combinations listed in this static metadata. The fps range
2248 * can be control via {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}.</p>
2249 * <p>In this mode, the camera device will override aeMode, awbMode, and afMode to
2250 * ON, ON, and CONTINUOUS_VIDEO, respectively. All post-processing block mode
2251 * controls will be overridden to be FAST. Therefore, no manual control of capture
2252 * and post-processing parameters is possible. All other controls operate the
2253 * same as when {@link CaptureRequest#CONTROL_MODE android.control.mode} == AUTO. This means that all other
2254 * android.control.* fields continue to work, such as</p>
2255 * <ul>
2256 * <li>{@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}</li>
2257 * <li>{@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}</li>
2258 * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li>
2259 * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li>
2260 * <li>{@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</li>
2261 * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li>
2262 * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li>
2263 * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li>
2264 * <li>{@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}</li>
2265 * <li>{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}</li>
2266 * </ul>
2267 * <p>Outside of android.control.*, the following controls will work:</p>
2268 * <ul>
2269 * <li>{@link CaptureRequest#FLASH_MODE android.flash.mode} (automatic flash for still capture will not work since aeMode is ON)</li>
2270 * <li>{@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} (if it is supported)</li>
2271 * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li>
2272 * <li>{@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}</li>
2273 * </ul>
2274 * <p>For high speed recording use case, the actual maximum supported frame rate may
2275 * be lower than what camera can output, depending on the destination Surfaces for
2276 * the image data. For example, if the destination surface is from video encoder,
2277 * the application need check if the video encoder is capable of supporting the
2278 * high frame rate for a given video size, or it will end up with lower recording
2279 * frame rate. If the destination surface is from preview window, the preview frame
2280 * rate will be bounded by the screen refresh rate.</p>
2281 * <p>The camera device will only support up to 2 output high speed streams
2282 * (processed non-stalling format defined in android.request.maxNumOutputStreams)
2283 * in this mode. This control will be effective only if all of below conditions are true:</p>
2284 * <ul>
2285 * <li>The application created no more than maxNumHighSpeedStreams processed non-stalling
2286 * format output streams, where maxNumHighSpeedStreams is calculated as
2287 * min(2, android.request.maxNumOutputStreams[Processed (but not-stalling)]).</li>
2288 * <li>The stream sizes are selected from the sizes reported by
2289 * android.control.availableHighSpeedVideoConfigurations.</li>
2290 * <li>No processed non-stalling or raw streams are configured.</li>
2291 * </ul>
2292 * <p>When above conditions are NOT satistied, the controls of this mode and
2293 * {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} will be ignored by the camera device,
2294 * the camera device will fall back to {@link CaptureRequest#CONTROL_MODE android.control.mode} <code>==</code> AUTO,
2295 * and the returned capture result metadata will give the fps range choosen
2296 * by the camera device.</p>
2297 * <p>Switching into or out of this mode may trigger some camera ISP/sensor
2298 * reconfigurations, which may introduce extra latency. It is recommended that
2299 * the application avoids unnecessary scene mode switch as much as possible.</p>
2300 *
2301 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
2302 * @see CaptureRequest#CONTROL_AE_LOCK
2303 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
2304 * @see CaptureRequest#CONTROL_AE_REGIONS
2305 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
2306 * @see CaptureRequest#CONTROL_AF_REGIONS
2307 * @see CaptureRequest#CONTROL_AF_TRIGGER
2308 * @see CaptureRequest#CONTROL_AWB_LOCK
2309 * @see CaptureRequest#CONTROL_AWB_REGIONS
2310 * @see CaptureRequest#CONTROL_EFFECT_MODE
2311 * @see CaptureRequest#CONTROL_MODE
2312 * @see CaptureRequest#FLASH_MODE
2313 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
2314 * @see CaptureRequest#SCALER_CROP_REGION
2315 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
2316 * @see CaptureRequest#CONTROL_SCENE_MODE
Zhijun Hefab663e2015-05-26 19:46:31 -07002317 * @deprecated Please refer to this API documentation to find the alternatives
Zhijun Hee0404182014-06-26 13:17:09 -07002318 */
Aurimas Liutikas514c5ef2016-05-24 15:22:55 -07002319 @Deprecated
Zhijun Hee0404182014-06-26 13:17:09 -07002320 public static final int CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO = 17;
2321
Ruben Brunkff99a0a2014-08-28 18:42:35 -07002322 /**
Eino-Ville Talvalaf4eac122014-12-05 11:10:15 -08002323 * <p>Turn on a device-specific high dynamic range (HDR) mode.</p>
2324 * <p>In this scene mode, the camera device captures images
2325 * that keep a larger range of scene illumination levels
2326 * visible in the final image. For example, when taking a
2327 * picture of a object in front of a bright window, both
2328 * the object and the scene through the window may be
2329 * visible when using HDR mode, while in normal AUTO mode,
2330 * one or the other may be poorly exposed. As a tradeoff,
2331 * HDR mode generally takes much longer to capture a single
2332 * image, has no user control, and may have other artifacts
2333 * depending on the HDR method used.</p>
2334 * <p>Therefore, HDR captures operate at a much slower rate
2335 * than regular captures.</p>
2336 * <p>In this mode, on LIMITED or FULL devices, when a request
2337 * is made with a {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} of
2338 * STILL_CAPTURE, the camera device will capture an image
2339 * using a high dynamic range capture technique. On LEGACY
2340 * devices, captures that target a JPEG-format output will
2341 * be captured with HDR, and the capture intent is not
2342 * relevant.</p>
2343 * <p>The HDR capture may involve the device capturing a burst
2344 * of images internally and combining them into one, or it
2345 * may involve the device using specialized high dynamic
2346 * range capture hardware. In all cases, a single image is
2347 * produced in response to a capture request submitted
2348 * while in HDR mode.</p>
2349 * <p>Since substantial post-processing is generally needed to
Eino-Ville Talvalac7c569d2016-04-04 10:48:38 -07002350 * produce an HDR image, only YUV, PRIVATE, and JPEG
2351 * outputs are supported for LIMITED/FULL device HDR
2352 * captures, and only JPEG outputs are supported for LEGACY
2353 * HDR captures. Using a RAW output for HDR capture is not
Eino-Ville Talvalaf4eac122014-12-05 11:10:15 -08002354 * supported.</p>
Eino-Ville Talvalac7c569d2016-04-04 10:48:38 -07002355 * <p>Some devices may also support always-on HDR, which
2356 * applies HDR processing at full frame rate. For these
2357 * devices, intents other than STILL_CAPTURE will also
2358 * produce an HDR output with no frame rate impact compared
2359 * to normal operation, though the quality may be lower
2360 * than for STILL_CAPTURE intents.</p>
2361 * <p>If SCENE_MODE_HDR is used with unsupported output types
2362 * or capture intents, the images captured will be as if
2363 * the SCENE_MODE was not enabled at all.</p>
Eino-Ville Talvalaf4eac122014-12-05 11:10:15 -08002364 *
2365 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
Ruben Brunkff99a0a2014-08-28 18:42:35 -07002366 * @see CaptureRequest#CONTROL_SCENE_MODE
Ruben Brunkff99a0a2014-08-28 18:42:35 -07002367 */
2368 public static final int CONTROL_SCENE_MODE_HDR = 18;
2369
Zhijun Heee2ebde2015-06-16 19:58:11 -07002370 /**
2371 * <p>Same as FACE_PRIORITY scene mode, except that the camera
Zhijun He4fb81252015-07-11 20:02:30 -07002372 * device will choose higher sensitivity values ({@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity})
Zhijun Heee2ebde2015-06-16 19:58:11 -07002373 * under low light conditions.</p>
2374 * <p>The camera device may be tuned to expose the images in a reduced
2375 * sensitivity range to produce the best quality images. For example,
2376 * if the {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange} gives range of [100, 1600],
2377 * the camera device auto-exposure routine tuning process may limit the actual
Zhijun He4fb81252015-07-11 20:02:30 -07002378 * exposure sensitivity range to [100, 1200] to ensure that the noise level isn't
2379 * exessive in order to preserve the image quality. Under this situation, the image under
Zhijun Heee2ebde2015-06-16 19:58:11 -07002380 * low light may be under-exposed when the sensor max exposure time (bounded by the
2381 * {@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 -07002382 * ON_* modes) and effective max sensitivity are reached. This scene mode allows the
Zhijun Heee2ebde2015-06-16 19:58:11 -07002383 * camera device auto-exposure routine to increase the sensitivity up to the max
2384 * sensitivity specified by {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange} when the scene is too
2385 * dark and the max exposure time is reached. The captured images may be noisier
Zhijun He4fb81252015-07-11 20:02:30 -07002386 * compared with the images captured in normal FACE_PRIORITY mode; therefore, it is
Zhijun Heee2ebde2015-06-16 19:58:11 -07002387 * recommended that the application only use this scene mode when it is capable of
2388 * reducing the noise level of the captured images.</p>
2389 * <p>Unlike the other scene modes, {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode},
2390 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}
2391 * remain active when FACE_PRIORITY_LOW_LIGHT is set.</p>
2392 *
2393 * @see CaptureRequest#CONTROL_AE_MODE
2394 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
2395 * @see CaptureRequest#CONTROL_AF_MODE
2396 * @see CaptureRequest#CONTROL_AWB_MODE
2397 * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
2398 * @see CaptureRequest#SENSOR_SENSITIVITY
2399 * @see CaptureRequest#CONTROL_SCENE_MODE
2400 * @hide
2401 */
2402 public static final int CONTROL_SCENE_MODE_FACE_PRIORITY_LOW_LIGHT = 19;
2403
Yin-Chia Yeh37348202016-03-09 14:44:49 -08002404 /**
2405 * <p>Scene mode values within the range of
2406 * <code>[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]</code> are reserved for device specific
2407 * customized scene modes.</p>
2408 * @see CaptureRequest#CONTROL_SCENE_MODE
2409 * @hide
2410 */
2411 public static final int CONTROL_SCENE_MODE_DEVICE_CUSTOM_START = 100;
2412
2413 /**
2414 * <p>Scene mode values within the range of
2415 * <code>[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]</code> are reserved for device specific
2416 * customized scene modes.</p>
2417 * @see CaptureRequest#CONTROL_SCENE_MODE
2418 * @hide
2419 */
2420 public static final int CONTROL_SCENE_MODE_DEVICE_CUSTOM_END = 127;
2421
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002422 //
Zhijun He4793af52014-05-05 10:39:12 -07002423 // Enumeration values for CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
2424 //
2425
2426 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002427 * <p>Video stabilization is disabled.</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_OFF = 0;
2431
2432 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002433 * <p>Video stabilization is enabled.</p>
Zhijun He4793af52014-05-05 10:39:12 -07002434 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
2435 */
2436 public static final int CONTROL_VIDEO_STABILIZATION_MODE_ON = 1;
2437
2438 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002439 // Enumeration values for CaptureRequest#EDGE_MODE
2440 //
2441
2442 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002443 * <p>No edge enhancement is applied.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002444 * @see CaptureRequest#EDGE_MODE
2445 */
2446 public static final int EDGE_MODE_OFF = 0;
2447
2448 /**
Chien-Yu Chen9c9167e2015-07-14 16:38:25 -07002449 * <p>Apply edge enhancement at a quality level that does not slow down frame rate
2450 * relative to sensor output. It may be the same as OFF if edge enhancement will
2451 * slow down frame rate relative to sensor.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002452 * @see CaptureRequest#EDGE_MODE
2453 */
2454 public static final int EDGE_MODE_FAST = 1;
2455
2456 /**
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07002457 * <p>Apply high-quality edge enhancement, at a cost of possibly reduced output frame rate.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002458 * @see CaptureRequest#EDGE_MODE
2459 */
2460 public static final int EDGE_MODE_HIGH_QUALITY = 2;
2461
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002462 /**
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08002463 * <p>Edge enhancement is applied at different
2464 * levels for different output streams, based on resolution. Streams at maximum recording
2465 * resolution (see {@link android.hardware.camera2.CameraDevice#createCaptureSession })
2466 * or below have edge enhancement applied, while higher-resolution streams have no edge
2467 * enhancement applied. The level of edge enhancement for low-resolution streams is tuned
2468 * so that frame rate is not impacted, and the quality is equal to or better than FAST
2469 * (since it is only applied to lower-resolution outputs, quality may improve from FAST).</p>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002470 * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode
2471 * with YUV or PRIVATE reprocessing, where the application continuously captures
2472 * high-resolution intermediate buffers into a circular buffer, from which a final image is
2473 * produced via reprocessing when a user takes a picture. For such a use case, the
2474 * high-resolution buffers must not have edge enhancement applied to maximize efficiency of
2475 * preview and to avoid double-applying enhancement when reprocessed, while low-resolution
2476 * buffers (used for recording or preview, generally) need edge enhancement applied for
2477 * reasonable preview quality.</p>
2478 * <p>This mode is guaranteed to be supported by devices that support either the
2479 * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
Chien-Yu Chen72333912015-07-08 11:55:19 -07002480 * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} lists either of those capabilities) and it will
2481 * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002482 *
2483 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2484 * @see CaptureRequest#EDGE_MODE
2485 */
2486 public static final int EDGE_MODE_ZERO_SHUTTER_LAG = 3;
2487
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002488 //
2489 // Enumeration values for CaptureRequest#FLASH_MODE
2490 //
2491
2492 /**
Zhijun He66d065a2014-01-16 18:18:50 -08002493 * <p>Do not fire the flash for this capture.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002494 * @see CaptureRequest#FLASH_MODE
2495 */
2496 public static final int FLASH_MODE_OFF = 0;
2497
2498 /**
Zhijun He66d065a2014-01-16 18:18:50 -08002499 * <p>If the flash is available and charged, fire flash
Zhijun He89492252014-05-23 13:49:59 -07002500 * for this capture.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002501 * @see CaptureRequest#FLASH_MODE
2502 */
2503 public static final int FLASH_MODE_SINGLE = 1;
2504
2505 /**
Zhijun He66d065a2014-01-16 18:18:50 -08002506 * <p>Transition flash to continuously on.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002507 * @see CaptureRequest#FLASH_MODE
2508 */
2509 public static final int FLASH_MODE_TORCH = 2;
2510
2511 //
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002512 // Enumeration values for CaptureRequest#HOT_PIXEL_MODE
2513 //
2514
2515 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002516 * <p>No hot pixel correction is applied.</p>
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002517 * <p>The frame rate must not be reduced relative to sensor raw output
2518 * for this option.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002519 * <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 -08002520 *
2521 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002522 * @see CaptureRequest#HOT_PIXEL_MODE
2523 */
2524 public static final int HOT_PIXEL_MODE_OFF = 0;
2525
2526 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002527 * <p>Hot pixel correction is applied, without reducing frame
2528 * rate relative to sensor raw output.</p>
2529 * <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 -08002530 *
2531 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002532 * @see CaptureRequest#HOT_PIXEL_MODE
2533 */
2534 public static final int HOT_PIXEL_MODE_FAST = 1;
2535
2536 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002537 * <p>High-quality hot pixel correction is applied, at a cost
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07002538 * of possibly reduced frame rate relative to sensor raw output.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002539 * <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 -08002540 *
2541 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002542 * @see CaptureRequest#HOT_PIXEL_MODE
2543 */
2544 public static final int HOT_PIXEL_MODE_HIGH_QUALITY = 2;
2545
2546 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002547 // Enumeration values for CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
2548 //
2549
2550 /**
Ruben Brunk00849b32014-01-17 18:30:23 -08002551 * <p>Optical stabilization is unavailable.</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_OFF = 0;
2555
2556 /**
Ruben Brunk00849b32014-01-17 18:30:23 -08002557 * <p>Optical stabilization is enabled.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002558 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
2559 */
2560 public static final int LENS_OPTICAL_STABILIZATION_MODE_ON = 1;
2561
2562 //
2563 // Enumeration values for CaptureRequest#NOISE_REDUCTION_MODE
2564 //
2565
2566 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002567 * <p>No noise reduction is applied.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002568 * @see CaptureRequest#NOISE_REDUCTION_MODE
2569 */
2570 public static final int NOISE_REDUCTION_MODE_OFF = 0;
2571
2572 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002573 * <p>Noise reduction is applied without reducing frame rate relative to sensor
Chien-Yu Chen9c9167e2015-07-14 16:38:25 -07002574 * output. It may be the same as OFF if noise reduction will reduce frame rate
2575 * relative to sensor.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002576 * @see CaptureRequest#NOISE_REDUCTION_MODE
2577 */
2578 public static final int NOISE_REDUCTION_MODE_FAST = 1;
2579
2580 /**
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07002581 * <p>High-quality noise reduction is applied, at the cost of possibly reduced frame
2582 * rate relative to sensor output.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002583 * @see CaptureRequest#NOISE_REDUCTION_MODE
2584 */
2585 public static final int NOISE_REDUCTION_MODE_HIGH_QUALITY = 2;
2586
Zhijun He0e99c222015-01-29 15:26:05 -08002587 /**
2588 * <p>MINIMAL noise reduction is applied without reducing frame rate relative to
2589 * sensor output. </p>
2590 * @see CaptureRequest#NOISE_REDUCTION_MODE
2591 */
2592 public static final int NOISE_REDUCTION_MODE_MINIMAL = 3;
2593
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002594 /**
2595 * <p>Noise reduction is applied at different levels for different output streams,
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08002596 * based on resolution. Streams at maximum recording resolution (see {@link android.hardware.camera2.CameraDevice#createCaptureSession })
2597 * or below have noise reduction applied, while higher-resolution streams have MINIMAL (if
2598 * supported) or no noise reduction applied (if MINIMAL is not supported.) The degree of
2599 * noise reduction for low-resolution streams is tuned so that frame rate is not impacted,
2600 * and the quality is equal to or better than FAST (since it is only applied to
2601 * lower-resolution outputs, quality may improve from FAST).</p>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002602 * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode
2603 * with YUV or PRIVATE reprocessing, where the application continuously captures
2604 * high-resolution intermediate buffers into a circular buffer, from which a final image is
2605 * produced via reprocessing when a user takes a picture. For such a use case, the
2606 * high-resolution buffers must not have noise reduction applied to maximize efficiency of
2607 * preview and to avoid over-applying noise filtering when reprocessing, while
2608 * low-resolution buffers (used for recording or preview, generally) need noise reduction
2609 * applied for reasonable preview quality.</p>
2610 * <p>This mode is guaranteed to be supported by devices that support either the
2611 * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
Chien-Yu Chen72333912015-07-08 11:55:19 -07002612 * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} lists either of those capabilities) and it will
2613 * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002614 *
2615 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2616 * @see CaptureRequest#NOISE_REDUCTION_MODE
2617 */
2618 public static final int NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG = 4;
2619
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002620 //
Igor Murashkinc127f052014-01-17 18:06:02 -08002621 // Enumeration values for CaptureRequest#SENSOR_TEST_PATTERN_MODE
2622 //
2623
2624 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002625 * <p>No test pattern mode is used, and the camera
Igor Murashkinc127f052014-01-17 18:06:02 -08002626 * device returns captures from the image sensor.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002627 * <p>This is the default if the key is not set.</p>
Igor Murashkinc127f052014-01-17 18:06:02 -08002628 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2629 */
2630 public static final int SENSOR_TEST_PATTERN_MODE_OFF = 0;
2631
2632 /**
2633 * <p>Each pixel in <code>[R, G_even, G_odd, B]</code> is replaced by its
2634 * respective color channel provided in
2635 * {@link CaptureRequest#SENSOR_TEST_PATTERN_DATA android.sensor.testPatternData}.</p>
2636 * <p>For example:</p>
2637 * <pre><code>android.testPatternData = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0]
2638 * </code></pre>
2639 * <p>All green pixels are 100% green. All red/blue pixels are black.</p>
2640 * <pre><code>android.testPatternData = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0]
2641 * </code></pre>
2642 * <p>All red pixels are 100% red. Only the odd green pixels
2643 * are 100% green. All blue pixels are 100% black.</p>
2644 *
2645 * @see CaptureRequest#SENSOR_TEST_PATTERN_DATA
2646 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2647 */
2648 public static final int SENSOR_TEST_PATTERN_MODE_SOLID_COLOR = 1;
2649
2650 /**
2651 * <p>All pixel data is replaced with an 8-bar color pattern.</p>
2652 * <p>The vertical bars (left-to-right) are as follows:</p>
2653 * <ul>
2654 * <li>100% white</li>
2655 * <li>yellow</li>
2656 * <li>cyan</li>
2657 * <li>green</li>
2658 * <li>magenta</li>
2659 * <li>red</li>
2660 * <li>blue</li>
2661 * <li>black</li>
2662 * </ul>
2663 * <p>In general the image would look like the following:</p>
2664 * <pre><code>W Y C G M R B K
2665 * W Y C G M R B K
2666 * W Y C G M R B K
2667 * W Y C G M R B K
2668 * W Y C G M R B K
2669 * . . . . . . . .
2670 * . . . . . . . .
2671 * . . . . . . . .
2672 *
2673 * (B = Blue, K = Black)
2674 * </code></pre>
2675 * <p>Each bar should take up 1/8 of the sensor pixel array width.
2676 * When this is not possible, the bar size should be rounded
2677 * down to the nearest integer and the pattern can repeat
2678 * on the right side.</p>
2679 * <p>Each bar's height must always take up the full sensor
2680 * pixel array height.</p>
2681 * <p>Each pixel in this test pattern must be set to either
2682 * 0% intensity or 100% intensity.</p>
2683 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2684 */
2685 public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS = 2;
2686
2687 /**
2688 * <p>The test pattern is similar to COLOR_BARS, except that
2689 * each bar should start at its specified color at the top,
2690 * and fade to gray at the bottom.</p>
2691 * <p>Furthermore each bar is further subdivided into a left and
2692 * right half. The left half should have a smooth gradient,
2693 * and the right half should have a quantized gradient.</p>
2694 * <p>In particular, the right half's should consist of blocks of the
2695 * same color for 1/16th active sensor pixel array width.</p>
2696 * <p>The least significant bits in the quantized gradient should
2697 * be copied from the most significant bits of the smooth gradient.</p>
2698 * <p>The height of each bar should always be a multiple of 128.
2699 * When this is not the case, the pattern should repeat at the bottom
2700 * of the image.</p>
2701 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2702 */
2703 public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY = 3;
2704
2705 /**
2706 * <p>All pixel data is replaced by a pseudo-random sequence
2707 * generated from a PN9 512-bit sequence (typically implemented
2708 * in hardware with a linear feedback shift register).</p>
2709 * <p>The generator should be reset at the beginning of each frame,
2710 * and thus each subsequent raw frame with this test pattern should
2711 * be exactly the same as the last.</p>
2712 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2713 */
2714 public static final int SENSOR_TEST_PATTERN_MODE_PN9 = 4;
2715
2716 /**
2717 * <p>The first custom test pattern. All custom patterns that are
2718 * available only on this camera device are at least this numeric
2719 * value.</p>
2720 * <p>All of the custom test patterns will be static
2721 * (that is the raw image must not vary from frame to frame).</p>
2722 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2723 */
2724 public static final int SENSOR_TEST_PATTERN_MODE_CUSTOM1 = 256;
2725
2726 //
Zhijun Heba93fe62014-01-17 16:43:05 -08002727 // Enumeration values for CaptureRequest#SHADING_MODE
2728 //
2729
2730 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002731 * <p>No lens shading correction is applied.</p>
Zhijun Heba93fe62014-01-17 16:43:05 -08002732 * @see CaptureRequest#SHADING_MODE
Zhijun Heba93fe62014-01-17 16:43:05 -08002733 */
2734 public static final int SHADING_MODE_OFF = 0;
2735
2736 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002737 * <p>Apply lens shading corrections, without slowing
2738 * frame rate relative to sensor raw output</p>
Zhijun Heba93fe62014-01-17 16:43:05 -08002739 * @see CaptureRequest#SHADING_MODE
Zhijun Heba93fe62014-01-17 16:43:05 -08002740 */
2741 public static final int SHADING_MODE_FAST = 1;
2742
2743 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002744 * <p>Apply high-quality lens shading correction, at the
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07002745 * cost of possibly reduced frame rate.</p>
Zhijun Heba93fe62014-01-17 16:43:05 -08002746 * @see CaptureRequest#SHADING_MODE
Zhijun Heba93fe62014-01-17 16:43:05 -08002747 */
2748 public static final int SHADING_MODE_HIGH_QUALITY = 2;
2749
2750 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002751 // Enumeration values for CaptureRequest#STATISTICS_FACE_DETECT_MODE
2752 //
2753
2754 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002755 * <p>Do not include face detection statistics in capture
2756 * results.</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_OFF = 0;
2760
2761 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002762 * <p>Return face rectangle and confidence values only.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002763 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
2764 */
2765 public static final int STATISTICS_FACE_DETECT_MODE_SIMPLE = 1;
2766
2767 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002768 * <p>Return all face
2769 * metadata.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002770 * <p>In this mode, face rectangles, scores, landmarks, and face IDs are all valid.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002771 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
2772 */
2773 public static final int STATISTICS_FACE_DETECT_MODE_FULL = 2;
2774
2775 //
Eino-Ville Talvalad96748b2013-09-12 11:11:27 -07002776 // Enumeration values for CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
2777 //
2778
2779 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002780 * <p>Do not 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_OFF = 0;
2784
2785 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002786 * <p>Include a lens shading map in the capture result.</p>
Eino-Ville Talvalad96748b2013-09-12 11:11:27 -07002787 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
2788 */
2789 public static final int STATISTICS_LENS_SHADING_MAP_MODE_ON = 1;
2790
2791 //
Chien-Yu Chenc9cf5b92018-01-18 12:24:40 -08002792 // Enumeration values for CaptureRequest#STATISTICS_OIS_DATA_MODE
2793 //
2794
2795 /**
2796 * <p>Do not include OIS data in the capture result.</p>
2797 * @see CaptureRequest#STATISTICS_OIS_DATA_MODE
2798 */
2799 public static final int STATISTICS_OIS_DATA_MODE_OFF = 0;
2800
2801 /**
2802 * <p>Include OIS data in the capture result.</p>
Chien-Yu Chenc804d1c2018-02-15 12:44:19 -08002803 * <p>{@link CaptureResult#STATISTICS_OIS_SAMPLES android.statistics.oisSamples} provides OIS sample data in the
2804 * output result metadata.</p>
2805 *
2806 * @see CaptureResult#STATISTICS_OIS_SAMPLES
Chien-Yu Chenc9cf5b92018-01-18 12:24:40 -08002807 * @see CaptureRequest#STATISTICS_OIS_DATA_MODE
2808 */
2809 public static final int STATISTICS_OIS_DATA_MODE_ON = 1;
2810
2811 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002812 // Enumeration values for CaptureRequest#TONEMAP_MODE
2813 //
2814
2815 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002816 * <p>Use the tone mapping curve specified in
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07002817 * the {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}* entries.</p>
Igor Murashkine0060932014-01-17 17:24:11 -08002818 * <p>All color enhancement and tonemapping must be disabled, except
2819 * for applying the tonemapping curve specified by
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07002820 * {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p>
Igor Murashkine0060932014-01-17 17:24:11 -08002821 * <p>Must not slow down frame rate relative to raw
2822 * sensor output.</p>
2823 *
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07002824 * @see CaptureRequest#TONEMAP_CURVE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002825 * @see CaptureRequest#TONEMAP_MODE
2826 */
2827 public static final int TONEMAP_MODE_CONTRAST_CURVE = 0;
2828
2829 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002830 * <p>Advanced gamma mapping and color enhancement may be applied, without
2831 * reducing frame rate compared to raw sensor output.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002832 * @see CaptureRequest#TONEMAP_MODE
2833 */
2834 public static final int TONEMAP_MODE_FAST = 1;
2835
2836 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002837 * <p>High-quality gamma mapping and color enhancement will be applied, at
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07002838 * the cost of possibly reduced frame rate compared to raw sensor output.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002839 * @see CaptureRequest#TONEMAP_MODE
2840 */
2841 public static final int TONEMAP_MODE_HIGH_QUALITY = 2;
2842
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002843 /**
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002844 * <p>Use the gamma value specified in {@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma} to peform
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002845 * tonemapping.</p>
2846 * <p>All color enhancement and tonemapping must be disabled, except
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002847 * for applying the tonemapping curve specified by {@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma}.</p>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002848 * <p>Must not slow down frame rate relative to raw sensor output.</p>
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002849 *
2850 * @see CaptureRequest#TONEMAP_GAMMA
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002851 * @see CaptureRequest#TONEMAP_MODE
2852 */
2853 public static final int TONEMAP_MODE_GAMMA_VALUE = 3;
2854
2855 /**
2856 * <p>Use the preset tonemapping curve specified in
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002857 * {@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve} to peform tonemapping.</p>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002858 * <p>All color enhancement and tonemapping must be disabled, except
2859 * for applying the tonemapping curve specified by
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002860 * {@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve}.</p>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002861 * <p>Must not slow down frame rate relative to raw sensor output.</p>
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002862 *
2863 * @see CaptureRequest#TONEMAP_PRESET_CURVE
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002864 * @see CaptureRequest#TONEMAP_MODE
2865 */
2866 public static final int TONEMAP_MODE_PRESET_CURVE = 4;
2867
2868 //
2869 // Enumeration values for CaptureRequest#TONEMAP_PRESET_CURVE
2870 //
2871
2872 /**
2873 * <p>Tonemapping curve is defined by sRGB</p>
2874 * @see CaptureRequest#TONEMAP_PRESET_CURVE
2875 */
2876 public static final int TONEMAP_PRESET_CURVE_SRGB = 0;
2877
2878 /**
2879 * <p>Tonemapping curve is defined by ITU-R BT.709</p>
2880 * @see CaptureRequest#TONEMAP_PRESET_CURVE
2881 */
2882 public static final int TONEMAP_PRESET_CURVE_REC709 = 1;
2883
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002884 //
Eino-Ville Talvala41670722018-03-13 19:43:07 -07002885 // Enumeration values for CaptureRequest#DISTORTION_CORRECTION_MODE
2886 //
2887
2888 /**
2889 * <p>No distortion correction is applied.</p>
2890 * @see CaptureRequest#DISTORTION_CORRECTION_MODE
2891 */
2892 public static final int DISTORTION_CORRECTION_MODE_OFF = 0;
2893
2894 /**
2895 * <p>Lens distortion correction is applied without reducing frame rate
2896 * relative to sensor output. It may be the same as OFF if distortion correction would
2897 * reduce frame rate relative to sensor.</p>
2898 * @see CaptureRequest#DISTORTION_CORRECTION_MODE
2899 */
2900 public static final int DISTORTION_CORRECTION_MODE_FAST = 1;
2901
2902 /**
2903 * <p>High-quality distortion correction is applied, at the cost of
2904 * possibly reduced frame rate relative to sensor output.</p>
2905 * @see CaptureRequest#DISTORTION_CORRECTION_MODE
2906 */
2907 public static final int DISTORTION_CORRECTION_MODE_HIGH_QUALITY = 2;
2908
2909 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002910 // Enumeration values for CaptureResult#CONTROL_AE_STATE
2911 //
2912
2913 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002914 * <p>AE is off or recently reset.</p>
2915 * <p>When a camera device is opened, it starts in
Zhijun He60b19dc2014-02-24 10:19:20 -08002916 * this state. This is a transient state, the camera device may skip reporting
2917 * this state in capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002918 * @see CaptureResult#CONTROL_AE_STATE
2919 */
2920 public static final int CONTROL_AE_STATE_INACTIVE = 0;
2921
2922 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002923 * <p>AE doesn't yet have a good set of control values
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002924 * for the current scene.</p>
2925 * <p>This is a transient state, the camera device may skip
Zhijun He60b19dc2014-02-24 10:19:20 -08002926 * reporting this state in capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002927 * @see CaptureResult#CONTROL_AE_STATE
2928 */
2929 public static final int CONTROL_AE_STATE_SEARCHING = 1;
2930
2931 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002932 * <p>AE has a good set of control values for the
Zhijun He228f4f92014-01-16 17:22:05 -08002933 * current scene.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002934 * @see CaptureResult#CONTROL_AE_STATE
2935 */
2936 public static final int CONTROL_AE_STATE_CONVERGED = 2;
2937
2938 /**
Zhijun He228f4f92014-01-16 17:22:05 -08002939 * <p>AE has been locked.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002940 * @see CaptureResult#CONTROL_AE_STATE
2941 */
2942 public static final int CONTROL_AE_STATE_LOCKED = 3;
2943
2944 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002945 * <p>AE has a good set of control values, but flash
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002946 * needs to be fired for good quality still
Zhijun He228f4f92014-01-16 17:22:05 -08002947 * capture.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002948 * @see CaptureResult#CONTROL_AE_STATE
2949 */
2950 public static final int CONTROL_AE_STATE_FLASH_REQUIRED = 4;
2951
2952 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002953 * <p>AE has been asked to do a precapture sequence
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002954 * and is currently executing it.</p>
2955 * <p>Precapture can be triggered through setting
Zhijun Hefa95b042015-02-09 10:40:49 -08002956 * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} to START. Currently
2957 * active and completed (if it causes camera device internal AE lock) precapture
2958 * metering sequence can be canceled through setting
2959 * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} to CANCEL.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002960 * <p>Once PRECAPTURE completes, AE will transition to CONVERGED
2961 * or FLASH_REQUIRED as appropriate. This is a transient
2962 * state, the camera device may skip reporting this state in
2963 * capture result.</p>
Zhijun He228f4f92014-01-16 17:22:05 -08002964 *
2965 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002966 * @see CaptureResult#CONTROL_AE_STATE
2967 */
2968 public static final int CONTROL_AE_STATE_PRECAPTURE = 5;
2969
2970 //
2971 // Enumeration values for CaptureResult#CONTROL_AF_STATE
2972 //
2973
2974 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002975 * <p>AF is off or has not yet tried to scan/been asked
2976 * to scan.</p>
2977 * <p>When a camera device is opened, it starts in this
2978 * state. This is a transient state, the camera device may
2979 * skip reporting this state in capture
2980 * result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002981 * @see CaptureResult#CONTROL_AF_STATE
2982 */
2983 public static final int CONTROL_AF_STATE_INACTIVE = 0;
2984
2985 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002986 * <p>AF is currently performing an AF scan initiated the
2987 * camera device in a continuous autofocus mode.</p>
2988 * <p>Only used by CONTINUOUS_* AF modes. This is a transient
2989 * state, the camera device may skip reporting this state in
2990 * capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002991 * @see CaptureResult#CONTROL_AF_STATE
2992 */
2993 public static final int CONTROL_AF_STATE_PASSIVE_SCAN = 1;
2994
2995 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002996 * <p>AF currently believes it is in focus, but may
2997 * restart scanning at any time.</p>
2998 * <p>Only used by CONTINUOUS_* AF modes. This is a transient
2999 * state, the camera device may skip reporting this state in
3000 * capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003001 * @see CaptureResult#CONTROL_AF_STATE
3002 */
3003 public static final int CONTROL_AF_STATE_PASSIVE_FOCUSED = 2;
3004
3005 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003006 * <p>AF is performing an AF scan because it was
3007 * triggered by AF trigger.</p>
3008 * <p>Only used by AUTO or MACRO AF modes. This is a transient
3009 * state, the camera device may skip reporting this state in
3010 * capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003011 * @see CaptureResult#CONTROL_AF_STATE
3012 */
3013 public static final int CONTROL_AF_STATE_ACTIVE_SCAN = 3;
3014
3015 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003016 * <p>AF believes it is focused correctly and has locked
3017 * focus.</p>
3018 * <p>This state is reached only after an explicit START AF trigger has been
3019 * sent ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}), when good focus has been obtained.</p>
3020 * <p>The lens will remain stationary until the AF mode ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) is changed or
3021 * a new AF trigger is sent to the camera device ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}).</p>
3022 *
3023 * @see CaptureRequest#CONTROL_AF_MODE
3024 * @see CaptureRequest#CONTROL_AF_TRIGGER
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003025 * @see CaptureResult#CONTROL_AF_STATE
3026 */
3027 public static final int CONTROL_AF_STATE_FOCUSED_LOCKED = 4;
3028
3029 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003030 * <p>AF has failed to focus successfully and has locked
3031 * focus.</p>
3032 * <p>This state is reached only after an explicit START AF trigger has been
3033 * sent ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}), when good focus cannot be obtained.</p>
3034 * <p>The lens will remain stationary until the AF mode ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) is changed or
3035 * a new AF trigger is sent to the camera device ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}).</p>
3036 *
3037 * @see CaptureRequest#CONTROL_AF_MODE
3038 * @see CaptureRequest#CONTROL_AF_TRIGGER
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003039 * @see CaptureResult#CONTROL_AF_STATE
3040 */
3041 public static final int CONTROL_AF_STATE_NOT_FOCUSED_LOCKED = 5;
3042
Eino-Ville Talvala9f880f72013-09-20 17:50:41 -07003043 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003044 * <p>AF finished a passive scan without finding focus,
3045 * and may restart scanning at any time.</p>
3046 * <p>Only used by CONTINUOUS_* AF modes. This is a transient state, the camera
Zhijun He60b19dc2014-02-24 10:19:20 -08003047 * device may skip reporting this state in capture result.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003048 * <p>LEGACY camera devices do not support this state. When a passive
3049 * scan has finished, it will always go to PASSIVE_FOCUSED.</p>
Eino-Ville Talvala9f880f72013-09-20 17:50:41 -07003050 * @see CaptureResult#CONTROL_AF_STATE
3051 */
3052 public static final int CONTROL_AF_STATE_PASSIVE_UNFOCUSED = 6;
3053
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003054 //
3055 // Enumeration values for CaptureResult#CONTROL_AWB_STATE
3056 //
3057
3058 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003059 * <p>AWB is not in auto mode, or has not yet started metering.</p>
3060 * <p>When a camera device is opened, it starts in this
3061 * state. This is a transient state, the camera device may
3062 * skip reporting this state in capture
3063 * result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003064 * @see CaptureResult#CONTROL_AWB_STATE
3065 */
3066 public static final int CONTROL_AWB_STATE_INACTIVE = 0;
3067
3068 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003069 * <p>AWB doesn't yet have a good set of control
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003070 * values for the current scene.</p>
3071 * <p>This is a transient state, the camera device
Zhijun He60b19dc2014-02-24 10:19:20 -08003072 * may skip reporting this state in capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003073 * @see CaptureResult#CONTROL_AWB_STATE
3074 */
3075 public static final int CONTROL_AWB_STATE_SEARCHING = 1;
3076
3077 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003078 * <p>AWB has a good set of control values for the
Zhijun He228f4f92014-01-16 17:22:05 -08003079 * current scene.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003080 * @see CaptureResult#CONTROL_AWB_STATE
3081 */
3082 public static final int CONTROL_AWB_STATE_CONVERGED = 2;
3083
3084 /**
Zhijun He228f4f92014-01-16 17:22:05 -08003085 * <p>AWB has been locked.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003086 * @see CaptureResult#CONTROL_AWB_STATE
3087 */
3088 public static final int CONTROL_AWB_STATE_LOCKED = 3;
3089
3090 //
Chien-Yu Chene8d86eb2017-11-27 15:42:44 -08003091 // Enumeration values for CaptureResult#CONTROL_AF_SCENE_CHANGE
3092 //
3093
3094 /**
Chien-Yu Chen2adc8ec2017-12-07 14:45:50 -08003095 * <p>Scene change is not 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_NOT_DETECTED = 0;
3099
3100 /**
Chien-Yu Chen2adc8ec2017-12-07 14:45:50 -08003101 * <p>Scene change is detected within the AF region(s).</p>
Chien-Yu Chene8d86eb2017-11-27 15:42:44 -08003102 * @see CaptureResult#CONTROL_AF_SCENE_CHANGE
3103 */
3104 public static final int CONTROL_AF_SCENE_CHANGE_DETECTED = 1;
3105
3106 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003107 // Enumeration values for CaptureResult#FLASH_STATE
3108 //
3109
3110 /**
Zhijun He8dda7272014-03-25 13:49:30 -07003111 * <p>No flash on camera.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003112 * @see CaptureResult#FLASH_STATE
3113 */
3114 public static final int FLASH_STATE_UNAVAILABLE = 0;
3115
3116 /**
Zhijun He8dda7272014-03-25 13:49:30 -07003117 * <p>Flash is charging and cannot be fired.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003118 * @see CaptureResult#FLASH_STATE
3119 */
3120 public static final int FLASH_STATE_CHARGING = 1;
3121
3122 /**
Zhijun He8dda7272014-03-25 13:49:30 -07003123 * <p>Flash is ready to fire.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003124 * @see CaptureResult#FLASH_STATE
3125 */
3126 public static final int FLASH_STATE_READY = 2;
3127
3128 /**
Zhijun He8dda7272014-03-25 13:49:30 -07003129 * <p>Flash fired for this capture.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003130 * @see CaptureResult#FLASH_STATE
3131 */
3132 public static final int FLASH_STATE_FIRED = 3;
3133
Zhijun He8dda7272014-03-25 13:49:30 -07003134 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003135 * <p>Flash partially illuminated this frame.</p>
3136 * <p>This is usually due to the next or previous frame having
3137 * the flash fire, and the flash spilling into this capture
Zhijun He8dda7272014-03-25 13:49:30 -07003138 * due to hardware limitations.</p>
3139 * @see CaptureResult#FLASH_STATE
3140 */
3141 public static final int FLASH_STATE_PARTIAL = 4;
3142
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003143 //
3144 // Enumeration values for CaptureResult#LENS_STATE
3145 //
3146
3147 /**
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08003148 * <p>The lens parameters ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
3149 * {@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 -08003150 *
3151 * @see CaptureRequest#LENS_APERTURE
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08003152 * @see CaptureRequest#LENS_FILTER_DENSITY
Zhijun Heca1b73a2014-02-03 12:39:53 -08003153 * @see CaptureRequest#LENS_FOCAL_LENGTH
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08003154 * @see CaptureRequest#LENS_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003155 * @see CaptureResult#LENS_STATE
3156 */
3157 public static final int LENS_STATE_STATIONARY = 0;
3158
Igor Murashkin9ea4ae62013-09-11 21:40:11 -07003159 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003160 * <p>One or several of the lens parameters
3161 * ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
3162 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} or {@link CaptureRequest#LENS_APERTURE android.lens.aperture}) is
3163 * currently changing.</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08003164 *
3165 * @see CaptureRequest#LENS_APERTURE
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08003166 * @see CaptureRequest#LENS_FILTER_DENSITY
Zhijun Heca1b73a2014-02-03 12:39:53 -08003167 * @see CaptureRequest#LENS_FOCAL_LENGTH
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08003168 * @see CaptureRequest#LENS_FOCUS_DISTANCE
Igor Murashkin9ea4ae62013-09-11 21:40:11 -07003169 * @see CaptureResult#LENS_STATE
3170 */
3171 public static final int LENS_STATE_MOVING = 1;
3172
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003173 //
3174 // Enumeration values for CaptureResult#STATISTICS_SCENE_FLICKER
3175 //
3176
3177 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003178 * <p>The camera device does not detect any flickering illumination
3179 * in the current scene.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003180 * @see CaptureResult#STATISTICS_SCENE_FLICKER
3181 */
3182 public static final int STATISTICS_SCENE_FLICKER_NONE = 0;
3183
3184 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003185 * <p>The camera device detects illumination flickering at 50Hz
3186 * in the current scene.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003187 * @see CaptureResult#STATISTICS_SCENE_FLICKER
3188 */
3189 public static final int STATISTICS_SCENE_FLICKER_50HZ = 1;
3190
3191 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003192 * <p>The camera device detects illumination flickering at 60Hz
3193 * in the current scene.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003194 * @see CaptureResult#STATISTICS_SCENE_FLICKER
3195 */
3196 public static final int STATISTICS_SCENE_FLICKER_60HZ = 2;
3197
Igor Murashkin3865a842014-01-17 18:18:39 -08003198 //
3199 // Enumeration values for CaptureResult#SYNC_FRAME_NUMBER
3200 //
3201
3202 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003203 * <p>The current result is not yet fully synchronized to any request.</p>
3204 * <p>Synchronization is in progress, and reading metadata from this
Igor Murashkin3865a842014-01-17 18:18:39 -08003205 * result may include a mix of data that have taken effect since the
3206 * last synchronization time.</p>
3207 * <p>In some future result, within {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} frames,
3208 * this value will update to the actual frame number frame number
3209 * the result is guaranteed to be synchronized to (as long as the
3210 * request settings remain constant).</p>
3211 *
3212 * @see CameraCharacteristics#SYNC_MAX_LATENCY
3213 * @see CaptureResult#SYNC_FRAME_NUMBER
3214 * @hide
3215 */
3216 public static final int SYNC_FRAME_NUMBER_CONVERGING = -1;
3217
3218 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003219 * <p>The current result's synchronization status is unknown.</p>
3220 * <p>The result may have already converged, or it may be in
3221 * progress. Reading from this result may include some mix
3222 * of settings from past requests.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08003223 * <p>After a settings change, the new settings will eventually all
3224 * take effect for the output buffers and results. However, this
3225 * value will not change when that happens. Altering settings
3226 * rapidly may provide outcomes using mixes of settings from recent
3227 * requests.</p>
3228 * <p>This value is intended primarily for backwards compatibility with
3229 * the older camera implementations (for android.hardware.Camera).</p>
3230 * @see CaptureResult#SYNC_FRAME_NUMBER
3231 * @hide
3232 */
3233 public static final int SYNC_FRAME_NUMBER_UNKNOWN = -2;
3234
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003235 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
3236 * End generated code
3237 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
3238
Igor Murashkinb519cc52013-07-02 11:23:44 -07003239}