blob: d06e08b70910312683fe1cfa81f875bd55321b74 [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;
Igor Murashkin70725502013-06-25 20:27:06 +000055
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080056 /**
Igor Murashkin68f40062013-09-10 12:15:54 -070057 * Set a camera metadata field to a value. The field definitions can be
58 * found in {@link CameraCharacteristics}, {@link CaptureResult}, and
59 * {@link CaptureRequest}.
60 *
61 * @param key The metadata field to write.
62 * @param value The value to set the field to, which must be of a matching
63 * type to the key.
64 *
Eino-Ville Talvala70c22072013-08-27 12:09:04 -070065 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080066 */
Eino-Ville Talvala70c22072013-08-27 12:09:04 -070067 protected CameraMetadata() {
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080068 }
69
70 /**
Igor Murashkin7a36a0f2013-09-10 18:13:09 -070071 * Get a camera metadata field value.
72 *
73 * <p>The field definitions can be
Igor Murashkin68f40062013-09-10 12:15:54 -070074 * found in {@link CameraCharacteristics}, {@link CaptureResult}, and
Igor Murashkin7a36a0f2013-09-10 18:13:09 -070075 * {@link CaptureRequest}.</p>
76 *
77 * <p>Querying the value for the same key more than once will return a value
78 * which is equal to the previous queried value.</p>
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080079 *
Igor Murashkinb519cc52013-07-02 11:23:44 -070080 * @throws IllegalArgumentException if the key was not valid
81 *
Benjamin Hendricks24eb8a32013-08-15 12:46:22 -070082 * @param key The metadata field to read.
83 * @return The value of that key, or {@code null} if the field is not set.
Igor Murashkind6d65152014-05-19 16:31:02 -070084 *
85 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080086 */
Igor Murashkind6d65152014-05-19 16:31:02 -070087 protected abstract <T> T getProtected(TKey key);
88
89 /**
90 * @hide
91 */
92 protected abstract Class<TKey> getKeyClass();
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080093
Igor Murashkin7a36a0f2013-09-10 18:13:09 -070094 /**
95 * Returns a list of the keys contained in this map.
96 *
97 * <p>The list returned is not modifiable, so any attempts to modify it will throw
98 * a {@code UnsupportedOperationException}.</p>
99 *
Igor Murashkind6d65152014-05-19 16:31:02 -0700100 * <p>All values retrieved by a key from this list with {@code #get} are guaranteed to be
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700101 * non-{@code null}. Each key is only listed once in the list. The order of the keys
102 * is undefined.</p>
103 *
104 * @return List of the keys contained in this map.
105 */
Igor Murashkind6d65152014-05-19 16:31:02 -0700106 @SuppressWarnings("unchecked")
Eino-Ville Talvala8b905572015-05-14 15:43:01 -0700107 @NonNull
Igor Murashkind6d65152014-05-19 16:31:02 -0700108 public List<TKey> getKeys() {
109 Class<CameraMetadata<TKey>> thisClass = (Class<CameraMetadata<TKey>>) getClass();
Igor Murashkincc542a42014-06-25 11:52:23 -0700110 return Collections.unmodifiableList(
111 getKeysStatic(thisClass, getKeyClass(), this, /*filterTags*/null));
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700112 }
113
114 /**
115 * Return a list of all the Key<?> that are declared as a field inside of the class
116 * {@code type}.
117 *
118 * <p>
119 * Optionally, if {@code instance} is not null, then filter out any keys with null values.
120 * </p>
Igor Murashkincc542a42014-06-25 11:52:23 -0700121 *
122 * <p>
123 * Optionally, if {@code filterTags} is not {@code null}, then filter out any keys
124 * whose native {@code tag} is not in {@code filterTags}. The {@code filterTags} array will be
125 * sorted as a side effect.
126 * </p>
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700127 */
Igor Murashkind6d65152014-05-19 16:31:02 -0700128 /*package*/ @SuppressWarnings("unchecked")
129 static <TKey> ArrayList<TKey> getKeysStatic(
130 Class<?> type, Class<TKey> keyClass,
Igor Murashkincc542a42014-06-25 11:52:23 -0700131 CameraMetadata<TKey> instance,
132 int[] filterTags) {
Igor Murashkind6d65152014-05-19 16:31:02 -0700133
Eino-Ville Talvalaa78791f2015-06-01 12:39:54 -0700134 if (DEBUG) Log.v(TAG, "getKeysStatic for " + type);
Igor Murashkind6d65152014-05-19 16:31:02 -0700135
Igor Murashkin696bbee2014-08-07 18:02:51 -0700136 // TotalCaptureResult does not have any of the keys on it, use CaptureResult instead
137 if (type.equals(TotalCaptureResult.class)) {
138 type = CaptureResult.class;
139 }
140
Igor Murashkincc542a42014-06-25 11:52:23 -0700141 if (filterTags != null) {
142 Arrays.sort(filterTags);
143 }
144
Igor Murashkind6d65152014-05-19 16:31:02 -0700145 ArrayList<TKey> keyList = new ArrayList<TKey>();
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700146
147 Field[] fields = type.getDeclaredFields();
148 for (Field field : fields) {
Igor Murashkin03fdb142013-09-30 12:14:58 -0700149 // Filter for Keys that are public
Igor Murashkind6d65152014-05-19 16:31:02 -0700150 if (field.getType().isAssignableFrom(keyClass) &&
Igor Murashkin03fdb142013-09-30 12:14:58 -0700151 (field.getModifiers() & Modifier.PUBLIC) != 0) {
Igor Murashkind6d65152014-05-19 16:31:02 -0700152
153 TKey key;
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700154 try {
Igor Murashkind6d65152014-05-19 16:31:02 -0700155 key = (TKey) field.get(instance);
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700156 } catch (IllegalAccessException e) {
157 throw new AssertionError("Can't get IllegalAccessException", e);
158 } catch (IllegalArgumentException e) {
159 throw new AssertionError("Can't get IllegalArgumentException", e);
160 }
Igor Murashkind6d65152014-05-19 16:31:02 -0700161
162 if (instance == null || instance.getProtected(key) != null) {
Igor Murashkin6c76f582014-07-15 17:19:49 -0700163 if (shouldKeyBeAdded(key, field, filterTags)) {
Igor Murashkincc542a42014-06-25 11:52:23 -0700164 keyList.add(key);
165
Eino-Ville Talvalaa78791f2015-06-01 12:39:54 -0700166 if (DEBUG) {
Igor Murashkincc542a42014-06-25 11:52:23 -0700167 Log.v(TAG, "getKeysStatic - key was added - " + key);
168 }
Eino-Ville Talvalaa78791f2015-06-01 12:39:54 -0700169 } else if (DEBUG) {
Igor Murashkincc542a42014-06-25 11:52:23 -0700170 Log.v(TAG, "getKeysStatic - key was filtered - " + key);
171 }
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700172 }
173 }
174 }
175
Ruben Brunkc620eb72015-07-29 18:19:11 -0700176 ArrayList<TKey> vendorKeys = CameraMetadataNative.getAllVendorKeys(keyClass);
177
178 if (vendorKeys != null) {
179 for (TKey k : vendorKeys) {
180 String keyName;
181 if (k instanceof CaptureRequest.Key<?>) {
182 keyName = ((CaptureRequest.Key<?>) k).getName();
183 } else if (k instanceof CaptureResult.Key<?>) {
184 keyName = ((CaptureResult.Key<?>) k).getName();
185 } else if (k instanceof CameraCharacteristics.Key<?>) {
186 keyName = ((CameraCharacteristics.Key<?>) k).getName();
187 } else {
188 continue;
189 }
190
191 if (filterTags == null || Arrays.binarySearch(filterTags,
192 CameraMetadataNative.getTag(keyName)) >= 0) {
193 keyList.add(k);
194 }
195 }
196 }
197
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700198 return keyList;
199 }
200
Igor Murashkincc542a42014-06-25 11:52:23 -0700201 @SuppressWarnings("rawtypes")
Igor Murashkin6c76f582014-07-15 17:19:49 -0700202 private static <TKey> boolean shouldKeyBeAdded(TKey key, Field field, int[] filterTags) {
Igor Murashkincc542a42014-06-25 11:52:23 -0700203 if (key == null) {
204 throw new NullPointerException("key must not be null");
205 }
206
207 CameraMetadataNative.Key nativeKey;
208
209 /*
210 * Get the native key from the public api key
211 */
212 if (key instanceof CameraCharacteristics.Key) {
213 nativeKey = ((CameraCharacteristics.Key)key).getNativeKey();
214 } else if (key instanceof CaptureResult.Key) {
215 nativeKey = ((CaptureResult.Key)key).getNativeKey();
216 } else if (key instanceof CaptureRequest.Key) {
217 nativeKey = ((CaptureRequest.Key)key).getNativeKey();
218 } else {
219 // Reject fields that aren't a key
220 throw new IllegalArgumentException("key type must be that of a metadata key");
221 }
222
Igor Murashkin6c76f582014-07-15 17:19:49 -0700223 if (field.getAnnotation(PublicKey.class) == null) {
224 // Never expose @hide keys up to the API user
225 return false;
226 }
227
Igor Murashkincc542a42014-06-25 11:52:23 -0700228 // No filtering necessary
229 if (filterTags == null) {
230 return true;
231 }
232
Igor Murashkin6c76f582014-07-15 17:19:49 -0700233 if (field.getAnnotation(SyntheticKey.class) != null) {
234 // This key is synthetic, so calling #getTag will throw IAE
235
236 // TODO: don't just assume all public+synthetic keys are always available
237 return true;
238 }
239
240 /*
241 * Regular key: look up it's native tag and see if it's in filterTags
242 */
243
Igor Murashkincc542a42014-06-25 11:52:23 -0700244 int keyTag = nativeKey.getTag();
245
246 // non-negative result is returned iff the value is in the array
247 return Arrays.binarySearch(filterTags, keyTag) >= 0;
248 }
249
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700250 /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
251 * The enum values below this point are generated from metadata
252 * definitions in /system/media/camera/docs. Do not modify by hand or
253 * modify the comment blocks at the start or end.
254 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
255
256 //
Zhijun Heff413932014-02-07 15:44:30 -0800257 // Enumeration values for CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
258 //
259
260 /**
261 * <p>The lens focus distance is not accurate, and the units used for
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700262 * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} do not correspond to any physical units.</p>
263 * <p>Setting the lens to the same focus distance on separate occasions may
Zhijun Heff413932014-02-07 15:44:30 -0800264 * result in a different real focus distance, depending on factors such
265 * as the orientation of the device, the age of the focusing mechanism,
266 * and the device temperature. The focus distance value will still be
267 * in the range of <code>[0, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code>, where 0
268 * represents the farthest focus.</p>
269 *
270 * @see CaptureRequest#LENS_FOCUS_DISTANCE
271 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
272 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
273 */
274 public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED = 0;
275
276 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700277 * <p>The lens focus distance is measured in diopters.</p>
278 * <p>However, setting the lens to the same focus distance
279 * on separate occasions may result in a different real
280 * focus distance, depending on factors such as the
281 * orientation of the device, the age of the focusing
282 * mechanism, and the device temperature.</p>
Zhijun Heff413932014-02-07 15:44:30 -0800283 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
284 */
285 public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE = 1;
286
287 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700288 * <p>The lens focus distance is measured in diopters, and
289 * is calibrated.</p>
290 * <p>The lens mechanism is calibrated so that setting the
291 * same focus distance is repeatable on multiple
292 * occasions with good accuracy, and the focus distance
293 * corresponds to the real physical distance to the plane
294 * of best focus.</p>
Zhijun Heff413932014-02-07 15:44:30 -0800295 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
296 */
297 public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED = 2;
298
299 //
Igor Murashkin68f40062013-09-10 12:15:54 -0700300 // Enumeration values for CameraCharacteristics#LENS_FACING
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700301 //
302
303 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700304 * <p>The camera device faces the same direction as the device's screen.</p>
Igor Murashkin68f40062013-09-10 12:15:54 -0700305 * @see CameraCharacteristics#LENS_FACING
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700306 */
307 public static final int LENS_FACING_FRONT = 0;
308
309 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700310 * <p>The camera device faces the opposite direction as the device's screen.</p>
Igor Murashkin68f40062013-09-10 12:15:54 -0700311 * @see CameraCharacteristics#LENS_FACING
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700312 */
313 public static final int LENS_FACING_BACK = 1;
314
Zhijun He503e8152015-01-12 15:16:56 -0800315 /**
316 * <p>The camera device is an external camera, and has no fixed facing relative to the
317 * device's screen.</p>
318 * @see CameraCharacteristics#LENS_FACING
319 */
320 public static final int LENS_FACING_EXTERNAL = 2;
321
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700322 //
Igor Murashkine46c0da2014-02-07 18:34:37 -0800323 // Enumeration values for CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
324 //
325
326 /**
327 * <p>The minimal set of capabilities that every camera
328 * device (regardless of {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel})
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700329 * supports.</p>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700330 * <p>This capability is listed by all normal devices, and
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700331 * indicates that the camera device has a feature set
332 * that's comparable to the baseline requirements for the
333 * older android.hardware.Camera API.</p>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700334 * <p>Devices with the DEPTH_OUTPUT capability might not list this
335 * capability, indicating that they support only depth measurement,
336 * not standard color output.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800337 *
338 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
339 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
340 */
341 public static final int REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE = 0;
342
343 /**
Igor Murashkine46c0da2014-02-07 18:34:37 -0800344 * <p>The camera device can be manually controlled (3A algorithms such
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700345 * as auto-exposure, and auto-focus can be bypassed).
Zhijun He50f72432014-05-28 13:52:04 -0700346 * The camera device supports basic manual control of the sensor image
347 * acquisition related stages. This means the following controls are
348 * guaranteed to be supported:</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800349 * <ul>
Zhijun He50f72432014-05-28 13:52:04 -0700350 * <li>Manual frame duration control<ul>
351 * <li>{@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}</li>
352 * <li>{@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li>
Zhijun He50f72432014-05-28 13:52:04 -0700353 * </ul>
354 * </li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800355 * <li>Manual exposure control<ul>
356 * <li>{@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</li>
357 * <li>{@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
358 * </ul>
359 * </li>
360 * <li>Manual sensitivity control<ul>
361 * <li>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</li>
362 * <li>{@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800363 * </ul>
364 * </li>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700365 * <li>Manual lens control (if the lens is adjustable)<ul>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800366 * <li>android.lens.*</li>
367 * </ul>
368 * </li>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700369 * <li>Manual flash control (if a flash unit is present)<ul>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800370 * <li>android.flash.*</li>
371 * </ul>
372 * </li>
373 * <li>Manual black level locking<ul>
374 * <li>{@link CaptureRequest#BLACK_LEVEL_LOCK android.blackLevel.lock}</li>
375 * </ul>
376 * </li>
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700377 * <li>Auto exposure lock<ul>
378 * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li>
379 * </ul>
380 * </li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800381 * </ul>
382 * <p>If any of the above 3A algorithms are enabled, then the camera
383 * device will accurately report the values applied by 3A in the
384 * result.</p>
Zhijun He50f72432014-05-28 13:52:04 -0700385 * <p>A given camera device may also support additional manual sensor controls,
386 * but this capability only covers the above list of controls.</p>
Ruben Brunk3e4fed22014-06-18 17:08:42 -0700387 * <p>If this is supported, {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} will
388 * additionally return a min frame duration that is greater than
389 * zero for each supported size-format combination.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800390 *
391 * @see CaptureRequest#BLACK_LEVEL_LOCK
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700392 * @see CaptureRequest#CONTROL_AE_LOCK
Zhijun He50f72432014-05-28 13:52:04 -0700393 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
Igor Murashkine46c0da2014-02-07 18:34:37 -0800394 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Zhijun He50f72432014-05-28 13:52:04 -0700395 * @see CaptureRequest#SENSOR_FRAME_DURATION
Igor Murashkine46c0da2014-02-07 18:34:37 -0800396 * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
Zhijun He50f72432014-05-28 13:52:04 -0700397 * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
Igor Murashkine46c0da2014-02-07 18:34:37 -0800398 * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
399 * @see CaptureRequest#SENSOR_SENSITIVITY
400 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
401 */
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700402 public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR = 1;
Igor Murashkine46c0da2014-02-07 18:34:37 -0800403
404 /**
Zhijun He50f72432014-05-28 13:52:04 -0700405 * <p>The camera device post-processing stages can be manually controlled.
406 * The camera device supports basic manual control of the image post-processing
407 * stages. This means the following controls are guaranteed to be supported:</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800408 * <ul>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -0800409 * <li>
410 * <p>Manual tonemap control</p>
411 * <ul>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -0700412 * <li>{@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800413 * <li>{@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</li>
414 * <li>{@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</li>
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -0700415 * <li>{@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma}</li>
416 * <li>{@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve}</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800417 * </ul>
418 * </li>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -0800419 * <li>
420 * <p>Manual white balance control</p>
421 * <ul>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800422 * <li>{@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}</li>
423 * <li>{@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}</li>
424 * </ul>
425 * </li>
Zhijun He28288ca2014-06-25 15:49:13 -0700426 * <li>Manual lens shading map control<ul>
427 * <li>{@link CaptureRequest#SHADING_MODE android.shading.mode}</li>
428 * <li>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode}</li>
Ruben Brunk57493682014-05-27 18:58:08 -0700429 * <li>android.statistics.lensShadingMap</li>
430 * <li>android.lens.info.shadingMapSize</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800431 * </ul>
432 * </li>
Zhijun Hea05e59d2014-07-08 18:27:47 -0700433 * <li>Manual aberration correction control (if aberration correction is supported)<ul>
Zhijun He9e4e4392014-08-18 11:12:32 -0700434 * <li>{@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}</li>
435 * <li>{@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES android.colorCorrection.availableAberrationModes}</li>
Zhijun Hea05e59d2014-07-08 18:27:47 -0700436 * </ul>
437 * </li>
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700438 * <li>Auto white balance lock<ul>
439 * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li>
440 * </ul>
441 * </li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800442 * </ul>
443 * <p>If auto white balance is enabled, then the camera device
444 * will accurately report the values applied by AWB in the result.</p>
Zhijun He50f72432014-05-28 13:52:04 -0700445 * <p>A given camera device may also support additional post-processing
446 * controls, but this capability only covers the above list of controls.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800447 *
Zhijun He9e4e4392014-08-18 11:12:32 -0700448 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
449 * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
Igor Murashkine46c0da2014-02-07 18:34:37 -0800450 * @see CaptureRequest#COLOR_CORRECTION_GAINS
451 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700452 * @see CaptureRequest#CONTROL_AWB_LOCK
Zhijun He28288ca2014-06-25 15:49:13 -0700453 * @see CaptureRequest#SHADING_MODE
454 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -0700455 * @see CaptureRequest#TONEMAP_CURVE
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -0700456 * @see CaptureRequest#TONEMAP_GAMMA
Igor Murashkine46c0da2014-02-07 18:34:37 -0800457 * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
458 * @see CaptureRequest#TONEMAP_MODE
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -0700459 * @see CaptureRequest#TONEMAP_PRESET_CURVE
Igor Murashkine46c0da2014-02-07 18:34:37 -0800460 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
461 */
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700462 public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING = 2;
463
464 /**
Eino-Ville Talvala611fece2014-07-10 17:29:38 -0700465 * <p>The camera device supports outputting RAW buffers and
466 * metadata for interpreting them.</p>
467 * <p>Devices supporting the RAW capability allow both for
468 * saving DNG files, and for direct application processing of
469 * raw sensor images.</p>
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700470 * <ul>
471 * <li>RAW_SENSOR is supported as an output format.</li>
472 * <li>The maximum available resolution for RAW_SENSOR streams
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700473 * will match either the value in
474 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize} or
Eino-Ville Talvalad8407272015-11-08 18:27:20 -0800475 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.</li>
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700476 * <li>All DNG-related optional metadata entries are provided
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700477 * by the camera device.</li>
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700478 * </ul>
479 *
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700480 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
Eino-Ville Talvalad8407272015-11-08 18:27:20 -0800481 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -0700482 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
483 */
Eino-Ville Talvala611fece2014-07-10 17:29:38 -0700484 public static final int REQUEST_AVAILABLE_CAPABILITIES_RAW = 3;
Igor Murashkine46c0da2014-02-07 18:34:37 -0800485
486 /**
Zhijun He0e99c222015-01-29 15:26:05 -0800487 * <p>The camera device supports the Zero Shutter Lag reprocessing use case.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800488 * <ul>
Zhijun He0e99c222015-01-29 15:26:05 -0800489 * <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 -0700490 * <li>{@link android.graphics.ImageFormat#PRIVATE } is supported as an output/input format,
491 * that is, {@link android.graphics.ImageFormat#PRIVATE } is included in the lists of
492 * formats returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats } and {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats }.</li>
493 * <li>{@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput }
494 * returns non empty int[] for each supported input format returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }.</li>
495 * <li>Each size returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputSizes getInputSizes(ImageFormat.PRIVATE)} is also included in {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes getOutputSizes(ImageFormat.PRIVATE)}</li>
496 * <li>Using {@link android.graphics.ImageFormat#PRIVATE } does not cause a frame rate drop
497 * relative to the sensor's maximum capture rate (at that resolution).</li>
498 * <li>{@link android.graphics.ImageFormat#PRIVATE } will be reprocessable into both
499 * {@link android.graphics.ImageFormat#YUV_420_888 } and
500 * {@link android.graphics.ImageFormat#JPEG } formats.</li>
Chien-Yu Chen8062d312015-05-12 14:24:10 -0700501 * <li>The maximum available resolution for PRIVATE streams
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700502 * (both input/output) will match the maximum available
503 * resolution of JPEG streams.</li>
Zhijun He513f7c32015-04-24 18:23:54 -0700504 * <li>Static metadata {@link CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL android.reprocess.maxCaptureStall}.</li>
Zhijun He0e99c222015-01-29 15:26:05 -0800505 * <li>Only below controls are effective for reprocessing requests and
506 * will be present in capture results, other controls in reprocess
507 * requests will be ignored by the camera device.<ul>
508 * <li>android.jpeg.*</li>
509 * <li>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</li>
510 * <li>{@link CaptureRequest#EDGE_MODE android.edge.mode}</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -0800511 * </ul>
Zhijun He0e99c222015-01-29 15:26:05 -0800512 * </li>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700513 * <li>{@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes} and
514 * {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes} will both list ZERO_SHUTTER_LAG as a supported mode.</li>
Zhijun He0e99c222015-01-29 15:26:05 -0800515 * </ul>
516 *
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700517 * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES
Zhijun He0e99c222015-01-29 15:26:05 -0800518 * @see CaptureRequest#EDGE_MODE
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700519 * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
Zhijun He0e99c222015-01-29 15:26:05 -0800520 * @see CaptureRequest#NOISE_REDUCTION_MODE
Zhijun He513f7c32015-04-24 18:23:54 -0700521 * @see CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL
Zhijun He0e99c222015-01-29 15:26:05 -0800522 * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
Igor Murashkine46c0da2014-02-07 18:34:37 -0800523 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
524 */
Chien-Yu Chen8062d312015-05-12 14:24:10 -0700525 public static final int REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING = 4;
Igor Murashkine46c0da2014-02-07 18:34:37 -0800526
Ruben Brunk0c22e692014-11-11 12:00:34 -0800527 /**
528 * <p>The camera device supports accurately reporting the sensor settings for many of
529 * the sensor controls while the built-in 3A algorithm is running. This allows
530 * reporting of sensor settings even when these settings cannot be manually changed.</p>
531 * <p>The values reported for the following controls are guaranteed to be available
532 * in the CaptureResult, including when 3A is enabled:</p>
533 * <ul>
534 * <li>Exposure control<ul>
535 * <li>{@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</li>
536 * </ul>
537 * </li>
538 * <li>Sensitivity control<ul>
539 * <li>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</li>
540 * </ul>
541 * </li>
542 * <li>Lens controls (if the lens is adjustable)<ul>
543 * <li>{@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}</li>
544 * <li>{@link CaptureRequest#LENS_APERTURE android.lens.aperture}</li>
545 * </ul>
546 * </li>
547 * </ul>
548 * <p>This capability is a subset of the MANUAL_SENSOR control capability, and will
549 * always be included if the MANUAL_SENSOR capability is available.</p>
550 *
551 * @see CaptureRequest#LENS_APERTURE
552 * @see CaptureRequest#LENS_FOCUS_DISTANCE
553 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
554 * @see CaptureRequest#SENSOR_SENSITIVITY
555 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
556 */
557 public static final int REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS = 5;
558
Eino-Ville Talvala126a7462014-11-04 16:31:01 -0800559 /**
Eino-Ville Talvala0819c752015-06-17 11:34:41 -0700560 * <p>The camera device supports capturing high-resolution images at &gt;= 20 frames per
561 * second, in at least the uncompressed YUV format, when post-processing settings are set
562 * to FAST. Additionally, maximum-resolution images can be captured at &gt;= 10 frames
563 * per second. Here, 'high resolution' means at least 8 megapixels, or the maximum
564 * resolution of the device, whichever is smaller.</p>
565 * <p>More specifically, this means that a size matching the camera device's active array
566 * size is listed as a supported size for the {@link android.graphics.ImageFormat#YUV_420_888 } format in either {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } or {@link android.hardware.camera2.params.StreamConfigurationMap#getHighResolutionOutputSizes },
567 * with a minimum frame duration for that format and size of either &lt;= 1/20 s, or
568 * &lt;= 1/10 s, respectively; and the {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges} entry
569 * lists at least one FPS range where the minimum FPS is &gt;= 1 / minimumFrameDuration
570 * for the maximum-size YUV_420_888 format. If that maximum size is listed in {@link android.hardware.camera2.params.StreamConfigurationMap#getHighResolutionOutputSizes },
571 * then the list of resolutions for YUV_420_888 from {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } contains at
572 * least one resolution &gt;= 8 megapixels, with a minimum frame duration of &lt;= 1/20
573 * s.</p>
574 * <p>If the device supports the {@link android.graphics.ImageFormat#RAW10 }, {@link android.graphics.ImageFormat#RAW12 }, then those can also be captured at the same rate
575 * as the maximum-size YUV_420_888 resolution is.</p>
576 * <p>If the device supports the PRIVATE_REPROCESSING capability, then the same guarantees
577 * as for the YUV_420_888 format also apply to the {@link android.graphics.ImageFormat#PRIVATE } format.</p>
578 * <p>In addition, the {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} field is guaranted to have a value between 0
579 * and 4, inclusive. {@link CameraCharacteristics#CONTROL_AE_LOCK_AVAILABLE android.control.aeLockAvailable} and {@link CameraCharacteristics#CONTROL_AWB_LOCK_AVAILABLE android.control.awbLockAvailable}
580 * are also guaranteed to be <code>true</code> so burst capture with these two locks ON yields
581 * consistent image output.</p>
Eino-Ville Talvala126a7462014-11-04 16:31:01 -0800582 *
Eino-Ville Talvala8d709f32014-11-17 11:28:38 -0800583 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700584 * @see CameraCharacteristics#CONTROL_AE_LOCK_AVAILABLE
585 * @see CameraCharacteristics#CONTROL_AWB_LOCK_AVAILABLE
Eino-Ville Talvala126a7462014-11-04 16:31:01 -0800586 * @see CameraCharacteristics#SYNC_MAX_LATENCY
587 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
588 */
589 public static final int REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE = 6;
590
Zhijun He0e99c222015-01-29 15:26:05 -0800591 /**
Chien-Yu Chen0a551f12015-04-03 17:57:35 -0700592 * <p>The camera device supports the YUV_420_888 reprocessing use case, similar as
Chien-Yu Chen8062d312015-05-12 14:24:10 -0700593 * PRIVATE_REPROCESSING, This capability requires the camera device to support the
Zhijun He0e99c222015-01-29 15:26:05 -0800594 * following:</p>
595 * <ul>
596 * <li>One input stream is supported, that is, <code>{@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} == 1</code>.</li>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700597 * <li>{@link android.graphics.ImageFormat#YUV_420_888 } is supported as an output/input format, that is,
Chien-Yu Chen0a551f12015-04-03 17:57:35 -0700598 * YUV_420_888 is included in the lists of formats returned by
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700599 * {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats } and
600 * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats }.</li>
601 * <li>{@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput }
602 * returns non-empty int[] for each supported input format returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }.</li>
603 * <li>Each size returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputSizes getInputSizes(YUV_420_888)} is also included in {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes getOutputSizes(YUV_420_888)}</li>
604 * <li>Using {@link android.graphics.ImageFormat#YUV_420_888 } does not cause a frame rate drop
Chien-Yu Chen0a551f12015-04-03 17:57:35 -0700605 * relative to the sensor's maximum capture rate (at that resolution).</li>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700606 * <li>{@link android.graphics.ImageFormat#YUV_420_888 } will be reprocessable into both
607 * {@link android.graphics.ImageFormat#YUV_420_888 } and {@link android.graphics.ImageFormat#JPEG } formats.</li>
608 * <li>The maximum available resolution for {@link android.graphics.ImageFormat#YUV_420_888 } streams (both input/output) will match the
609 * maximum available resolution of {@link android.graphics.ImageFormat#JPEG } streams.</li>
Zhijun He513f7c32015-04-24 18:23:54 -0700610 * <li>Static metadata {@link CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL android.reprocess.maxCaptureStall}.</li>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700611 * <li>Only the below controls are effective for reprocessing requests and will be present
612 * in capture results. The reprocess requests are from the original capture results that
613 * are associated with the intermediate {@link android.graphics.ImageFormat#YUV_420_888 }
614 * output buffers. All other controls in the reprocess requests will be ignored by the
615 * camera device.<ul>
Zhijun He0e99c222015-01-29 15:26:05 -0800616 * <li>android.jpeg.*</li>
617 * <li>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</li>
618 * <li>{@link CaptureRequest#EDGE_MODE android.edge.mode}</li>
619 * <li>{@link CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR android.reprocess.effectiveExposureFactor}</li>
620 * </ul>
621 * </li>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700622 * <li>{@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes} and
623 * {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes} will both list ZERO_SHUTTER_LAG as a supported mode.</li>
Zhijun He0e99c222015-01-29 15:26:05 -0800624 * </ul>
625 *
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700626 * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES
Zhijun He0e99c222015-01-29 15:26:05 -0800627 * @see CaptureRequest#EDGE_MODE
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -0700628 * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
Zhijun He0e99c222015-01-29 15:26:05 -0800629 * @see CaptureRequest#NOISE_REDUCTION_MODE
630 * @see CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR
Zhijun He513f7c32015-04-24 18:23:54 -0700631 * @see CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL
Zhijun He0e99c222015-01-29 15:26:05 -0800632 * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
633 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
634 */
635 public static final int REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING = 7;
636
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700637 /**
638 * <p>The camera device can produce depth measurements from its field of view.</p>
639 * <p>This capability requires the camera device to support the following:</p>
640 * <ul>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700641 * <li>{@link android.graphics.ImageFormat#DEPTH16 } is supported as an output format.</li>
642 * <li>{@link android.graphics.ImageFormat#DEPTH_POINT_CLOUD } is optionally supported as an
643 * output format.</li>
644 * <li>This camera device, and all camera devices with the same {@link CameraCharacteristics#LENS_FACING android.lens.facing},
645 * will list the following calibration entries in both
646 * {@link android.hardware.camera2.CameraCharacteristics } and
647 * {@link android.hardware.camera2.CaptureResult }:<ul>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700648 * <li>{@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}</li>
649 * <li>{@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}</li>
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -0700650 * <li>{@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}</li>
651 * <li>{@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion}</li>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700652 * </ul>
653 * </li>
654 * <li>The {@link CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE android.depth.depthIsExclusive} entry is listed by this device.</li>
655 * <li>A LIMITED camera with only the DEPTH_OUTPUT capability does not have to support
656 * normal YUV_420_888, JPEG, and PRIV-format outputs. It only has to support the DEPTH16
657 * format.</li>
658 * </ul>
659 * <p>Generally, depth output operates at a slower frame rate than standard color capture,
660 * so the DEPTH16 and DEPTH_POINT_CLOUD formats will commonly have a stall duration that
661 * should be accounted for (see
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700662 * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration }).
663 * On a device that supports both depth and color-based output, to enable smooth preview,
664 * using a repeating burst is recommended, where a depth-output target is only included
665 * once every N frames, where N is the ratio between preview output rate and depth output
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700666 * rate, including depth stall time.</p>
667 *
668 * @see CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700669 * @see CameraCharacteristics#LENS_FACING
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -0700670 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700671 * @see CameraCharacteristics#LENS_POSE_ROTATION
672 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -0700673 * @see CameraCharacteristics#LENS_RADIAL_DISTORTION
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -0700674 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
675 */
676 public static final int REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT = 8;
677
Zhijun Hefab663e2015-05-26 19:46:31 -0700678 /**
679 * <p>The device supports constrained high speed video recording (frame rate &gt;=120fps)
680 * use case. The camera device will support high speed capture session created by
681 * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }, which
Eino-Ville Talvala639fffe2015-06-30 10:34:48 -0700682 * only accepts high speed request lists created by
683 * {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList }.</p>
Zhijun Hefab663e2015-05-26 19:46:31 -0700684 * <p>A camera device can still support high speed video streaming by advertising the high speed
685 * FPS ranges in {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges}. For this case, all normal
686 * capture request per frame control and synchronization requirements will apply to
687 * the high speed fps ranges, the same as all other fps ranges. This capability describes
688 * the capability of a specialized operating mode with many limitations (see below), which
689 * is only targeted at high speed video recording.</p>
690 * <p>The supported high speed video sizes and fps ranges are specified in
691 * {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges }.
692 * To get desired output frame rates, the application is only allowed to select video size
693 * and FPS range combinations provided by
694 * {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes }.
695 * The fps range can be controlled via {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}.</p>
696 * <p>In this capability, the camera device will override aeMode, awbMode, and afMode to
Zhijun Heee2ebde2015-06-16 19:58:11 -0700697 * ON, AUTO, and CONTINUOUS_VIDEO, respectively. All post-processing block mode
Zhijun Hefab663e2015-05-26 19:46:31 -0700698 * controls will be overridden to be FAST. Therefore, no manual control of capture
699 * and post-processing parameters is possible. All other controls operate the
700 * same as when {@link CaptureRequest#CONTROL_MODE android.control.mode} == AUTO. This means that all other
701 * android.control.* fields continue to work, such as</p>
702 * <ul>
703 * <li>{@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}</li>
704 * <li>{@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}</li>
705 * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li>
706 * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li>
707 * <li>{@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</li>
708 * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li>
709 * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li>
710 * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li>
711 * <li>{@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}</li>
712 * <li>{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}</li>
713 * </ul>
714 * <p>Outside of android.control.*, the following controls will work:</p>
715 * <ul>
716 * <li>{@link CaptureRequest#FLASH_MODE android.flash.mode} (TORCH mode only, automatic flash for still capture will not
717 * work since aeMode is ON)</li>
718 * <li>{@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} (if it is supported)</li>
719 * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li>
720 * <li>{@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} (if it is supported)</li>
721 * </ul>
722 * <p>For high speed recording use case, the actual maximum supported frame rate may
723 * be lower than what camera can output, depending on the destination Surfaces for
724 * the image data. For example, if the destination surface is from video encoder,
725 * the application need check if the video encoder is capable of supporting the
726 * high frame rate for a given video size, or it will end up with lower recording
727 * frame rate. If the destination surface is from preview window, the actual preview frame
728 * rate will be bounded by the screen refresh rate.</p>
729 * <p>The camera device will only support up to 2 high speed simultaneous output surfaces
730 * (preview and recording surfaces)
731 * in this mode. Above controls will be effective only if all of below conditions are true:</p>
732 * <ul>
733 * <li>The application creates a camera capture session with no more than 2 surfaces via
734 * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }. The
735 * targeted surfaces must be preview surface (either from
736 * {@link android.view.SurfaceView } or {@link android.graphics.SurfaceTexture }) or
737 * recording surface(either from {@link android.media.MediaRecorder#getSurface } or
738 * {@link android.media.MediaCodec#createInputSurface }).</li>
739 * <li>The stream sizes are selected from the sizes reported by
740 * {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes }.</li>
741 * <li>The FPS ranges are selected from
742 * {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges }.</li>
743 * </ul>
Eino-Ville Talvala639fffe2015-06-30 10:34:48 -0700744 * <p>When above conditions are NOT satistied,
Zhijun Hefab663e2015-05-26 19:46:31 -0700745 * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }
Eino-Ville Talvala639fffe2015-06-30 10:34:48 -0700746 * will fail.</p>
Zhijun Hefab663e2015-05-26 19:46:31 -0700747 * <p>Switching to a FPS range that has different maximum FPS may trigger some camera device
748 * reconfigurations, which may introduce extra latency. It is recommended that
749 * the application avoids unnecessary maximum target FPS changes as much as possible
750 * during high speed streaming.</p>
751 *
752 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
753 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
754 * @see CaptureRequest#CONTROL_AE_LOCK
755 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
756 * @see CaptureRequest#CONTROL_AE_REGIONS
757 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
758 * @see CaptureRequest#CONTROL_AF_REGIONS
759 * @see CaptureRequest#CONTROL_AF_TRIGGER
760 * @see CaptureRequest#CONTROL_AWB_LOCK
761 * @see CaptureRequest#CONTROL_AWB_REGIONS
762 * @see CaptureRequest#CONTROL_EFFECT_MODE
763 * @see CaptureRequest#CONTROL_MODE
764 * @see CaptureRequest#FLASH_MODE
765 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
766 * @see CaptureRequest#SCALER_CROP_REGION
767 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
768 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
769 */
770 public static final int REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO = 9;
771
Igor Murashkine46c0da2014-02-07 18:34:37 -0800772 //
Zhijun He14986152014-05-22 21:17:37 -0700773 // Enumeration values for CameraCharacteristics#SCALER_CROPPING_TYPE
774 //
775
776 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700777 * <p>The camera device only supports centered crop regions.</p>
Zhijun He14986152014-05-22 21:17:37 -0700778 * @see CameraCharacteristics#SCALER_CROPPING_TYPE
779 */
780 public static final int SCALER_CROPPING_TYPE_CENTER_ONLY = 0;
781
782 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700783 * <p>The camera device supports arbitrarily chosen crop regions.</p>
Zhijun He14986152014-05-22 21:17:37 -0700784 * @see CameraCharacteristics#SCALER_CROPPING_TYPE
785 */
786 public static final int SCALER_CROPPING_TYPE_FREEFORM = 1;
787
788 //
Zhijun Hed1784962014-04-08 17:41:46 -0700789 // Enumeration values for CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
790 //
791
792 /**
793 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
794 */
795 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB = 0;
796
797 /**
798 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
799 */
800 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG = 1;
801
802 /**
803 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
804 */
805 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG = 2;
806
807 /**
808 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
809 */
810 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR = 3;
811
812 /**
813 * <p>Sensor is not Bayer; output has 3 16-bit
814 * values for each pixel, instead of just 1 16-bit value
815 * per pixel.</p>
816 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
817 */
818 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB = 4;
819
820 //
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -0700821 // Enumeration values for CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
Zhijun He45fa43a12014-06-13 18:29:37 -0700822 //
823
824 /**
825 * <p>Timestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in nanoseconds and monotonic,
826 * but can not be compared to timestamps from other subsystems
827 * (e.g. accelerometer, gyro etc.), or other instances of the same or different
828 * camera devices in the same system. Timestamps between streams and results for
829 * a single camera instance are comparable, and the timestamps for all buffers
830 * and the result metadata generated by a single capture are identical.</p>
831 *
832 * @see CaptureResult#SENSOR_TIMESTAMP
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -0700833 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
Zhijun He45fa43a12014-06-13 18:29:37 -0700834 */
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -0700835 public static final int SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN = 0;
Zhijun He45fa43a12014-06-13 18:29:37 -0700836
837 /**
838 * <p>Timestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in the same timebase as
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -0700839 * {@link android.os.SystemClock#elapsedRealtimeNanos },
Zhijun He45fa43a12014-06-13 18:29:37 -0700840 * and they can be compared to other timestamps using that base.</p>
841 *
842 * @see CaptureResult#SENSOR_TIMESTAMP
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -0700843 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
Zhijun He45fa43a12014-06-13 18:29:37 -0700844 */
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -0700845 public static final int SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME = 1;
Zhijun He45fa43a12014-06-13 18:29:37 -0700846
847 //
Ruben Brunk7c062362014-04-15 23:53:53 -0700848 // Enumeration values for CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
849 //
850
851 /**
852 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
853 */
854 public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT = 1;
855
856 /**
857 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
858 */
859 public static final int SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT = 2;
860
861 /**
862 * <p>Incandescent light</p>
863 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
864 */
865 public static final int SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN = 3;
866
867 /**
868 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
869 */
870 public static final int SENSOR_REFERENCE_ILLUMINANT1_FLASH = 4;
871
872 /**
873 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
874 */
875 public static final int SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER = 9;
876
877 /**
878 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
879 */
880 public static final int SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER = 10;
881
882 /**
883 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
884 */
885 public static final int SENSOR_REFERENCE_ILLUMINANT1_SHADE = 11;
886
887 /**
888 * <p>D 5700 - 7100K</p>
889 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
890 */
891 public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT = 12;
892
893 /**
894 * <p>N 4600 - 5400K</p>
895 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
896 */
897 public static final int SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT = 13;
898
899 /**
900 * <p>W 3900 - 4500K</p>
901 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
902 */
903 public static final int SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT = 14;
904
905 /**
906 * <p>WW 3200 - 3700K</p>
907 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
908 */
909 public static final int SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT = 15;
910
911 /**
912 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
913 */
914 public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A = 17;
915
916 /**
917 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
918 */
919 public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B = 18;
920
921 /**
922 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
923 */
924 public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C = 19;
925
926 /**
927 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
928 */
929 public static final int SENSOR_REFERENCE_ILLUMINANT1_D55 = 20;
930
931 /**
932 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
933 */
934 public static final int SENSOR_REFERENCE_ILLUMINANT1_D65 = 21;
935
936 /**
937 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
938 */
939 public static final int SENSOR_REFERENCE_ILLUMINANT1_D75 = 22;
940
941 /**
942 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
943 */
944 public static final int SENSOR_REFERENCE_ILLUMINANT1_D50 = 23;
945
946 /**
947 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
948 */
949 public static final int SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN = 24;
950
951 //
Igor Murashkin68f40062013-09-10 12:15:54 -0700952 // Enumeration values for CameraCharacteristics#LED_AVAILABLE_LEDS
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700953 //
954
955 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700956 * <p>android.led.transmit control is used.</p>
Igor Murashkin68f40062013-09-10 12:15:54 -0700957 * @see CameraCharacteristics#LED_AVAILABLE_LEDS
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700958 * @hide
959 */
960 public static final int LED_AVAILABLE_LEDS_TRANSMIT = 0;
961
962 //
Igor Murashkin68f40062013-09-10 12:15:54 -0700963 // Enumeration values for CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700964 //
965
966 /**
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -0800967 * <p>This camera device does not have enough capabilities to qualify as a <code>FULL</code> device or
968 * better.</p>
969 * <p>Only the stream configurations listed in the <code>LEGACY</code> and <code>LIMITED</code> tables in the
970 * {@link android.hardware.camera2.CameraDevice#createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p>
971 * <p>All <code>LIMITED</code> devices support the <code>BACKWARDS_COMPATIBLE</code> capability, indicating basic
972 * support for color image capture. The only exception is that the device may
973 * alternatively support only the <code>DEPTH_OUTPUT</code> capability, if it can only output depth
974 * measurements and not color images.</p>
975 * <p><code>LIMITED</code> devices and above require the use of {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}
976 * to lock exposure metering (and calculate flash power, for cameras with flash) before
977 * capturing a high-quality still image.</p>
978 * <p>A <code>LIMITED</code> device that only lists the <code>BACKWARDS_COMPATIBLE</code> capability is only
979 * required to support full-automatic operation and post-processing (<code>OFF</code> is not
980 * supported for {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}, {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}, or
981 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode})</p>
982 * <p>Additional capabilities may optionally be supported by a <code>LIMITED</code>-level device, and
983 * can be checked for in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
984 *
985 * @see CaptureRequest#CONTROL_AE_MODE
986 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
987 * @see CaptureRequest#CONTROL_AF_MODE
988 * @see CaptureRequest#CONTROL_AWB_MODE
989 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Igor Murashkin68f40062013-09-10 12:15:54 -0700990 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700991 */
992 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0;
993
994 /**
Ruben Brunk4a61a862014-07-01 16:00:26 -0700995 * <p>This camera device is capable of supporting advanced imaging applications.</p>
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -0800996 * <p>The stream configurations listed in the <code>FULL</code>, <code>LEGACY</code> and <code>LIMITED</code> tables in the
997 * {@link android.hardware.camera2.CameraDevice#createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p>
998 * <p>A <code>FULL</code> device will support below capabilities:</p>
999 * <ul>
1000 * <li><code>BURST_CAPTURE</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1001 * <code>BURST_CAPTURE</code>)</li>
1002 * <li>Per frame control ({@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} <code>==</code> PER_FRAME_CONTROL)</li>
1003 * <li>Manual sensor control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains <code>MANUAL_SENSOR</code>)</li>
1004 * <li>Manual post-processing control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1005 * <code>MANUAL_POST_PROCESSING</code>)</li>
1006 * <li>The required exposure time range defined in {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
1007 * <li>The required maxFrameDuration defined in {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li>
1008 * </ul>
1009 * <p>Note:
1010 * Pre-API level 23, FULL devices also supported arbitrary cropping region
1011 * ({@link CameraCharacteristics#SCALER_CROPPING_TYPE android.scaler.croppingType} <code>== FREEFORM</code>); this requirement was relaxed in API level
1012 * 23, and <code>FULL</code> devices may only support <code>CENTERED</code> cropping.</p>
1013 *
1014 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1015 * @see CameraCharacteristics#SCALER_CROPPING_TYPE
1016 * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
1017 * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
1018 * @see CameraCharacteristics#SYNC_MAX_LATENCY
Igor Murashkin68f40062013-09-10 12:15:54 -07001019 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001020 */
1021 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1;
1022
Ruben Brunk4a61a862014-07-01 16:00:26 -07001023 /**
1024 * <p>This camera device is running in backward compatibility mode.</p>
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08001025 * <p>Only the stream configurations listed in the <code>LEGACY</code> table in the {@link android.hardware.camera2.CameraDevice#createCaptureSession createCaptureSession}
1026 * documentation are supported.</p>
1027 * <p>A <code>LEGACY</code> device does not support per-frame control, manual sensor control, manual
1028 * post-processing, arbitrary cropping regions, and has relaxed performance constraints.
1029 * No additional capabilities beyond <code>BACKWARD_COMPATIBLE</code> will ever be listed by a
1030 * <code>LEGACY</code> device in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
1031 * <p>In addition, the {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is not functional on <code>LEGACY</code>
1032 * devices. Instead, every request that includes a JPEG-format output target is treated
1033 * as triggering a still capture, internally executing a precapture trigger. This may
1034 * fire the flash for flash power metering during precapture, and then fire the flash
1035 * for the final capture, if a flash is available on the device and the AE mode is set to
1036 * enable the flash.</p>
1037 *
1038 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1039 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Ruben Brunk4a61a862014-07-01 16:00:26 -07001040 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1041 */
1042 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY = 2;
1043
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08001044 /**
1045 * <p>This camera device is capable of YUV reprocessing and RAW data capture, in addition to
1046 * FULL-level capabilities.</p>
1047 * <p>The stream configurations listed in the <code>LEVEL_3</code>, <code>RAW</code>, <code>FULL</code>, <code>LEGACY</code> and
1048 * <code>LIMITED</code> tables in the {@link android.hardware.camera2.CameraDevice#createCaptureSession createCaptureSession}
1049 * documentation are guaranteed to be supported.</p>
1050 * <p>The following additional capabilities are guaranteed to be supported:</p>
1051 * <ul>
1052 * <li><code>YUV_REPROCESSING</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1053 * <code>YUV_REPROCESSING</code>)</li>
1054 * <li><code>RAW</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1055 * <code>RAW</code>)</li>
1056 * </ul>
1057 *
1058 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1059 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1060 */
1061 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_3 = 3;
1062
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001063 //
Igor Murashkin3865a842014-01-17 18:18:39 -08001064 // Enumeration values for CameraCharacteristics#SYNC_MAX_LATENCY
1065 //
1066
1067 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001068 * <p>Every frame has the requests immediately applied.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08001069 * <p>Changing controls over multiple requests one after another will
1070 * produce results that have those controls applied atomically
1071 * each frame.</p>
1072 * <p>All FULL capability devices will have this as their maxLatency.</p>
1073 * @see CameraCharacteristics#SYNC_MAX_LATENCY
1074 */
1075 public static final int SYNC_MAX_LATENCY_PER_FRAME_CONTROL = 0;
1076
1077 /**
1078 * <p>Each new frame has some subset (potentially the entire set)
1079 * of the past requests applied to the camera settings.</p>
1080 * <p>By submitting a series of identical requests, the camera device
1081 * will eventually have the camera settings applied, but it is
1082 * unknown when that exact point will be.</p>
Igor Murashkinbdf366c2014-07-25 16:54:20 -07001083 * <p>All LEGACY capability devices will have this as their maxLatency.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08001084 * @see CameraCharacteristics#SYNC_MAX_LATENCY
1085 */
1086 public static final int SYNC_MAX_LATENCY_UNKNOWN = -1;
1087
1088 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001089 // Enumeration values for CaptureRequest#COLOR_CORRECTION_MODE
1090 //
1091
1092 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001093 * <p>Use the {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} matrix
Igor Murashkin7d2a5c52014-01-17 15:07:52 -08001094 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} to do color conversion.</p>
1095 * <p>All advanced white balance adjustments (not specified
1096 * by our white balance pipeline) must be disabled.</p>
1097 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
1098 * TRANSFORM_MATRIX is ignored. The camera device will override
1099 * this value to either FAST or HIGH_QUALITY.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001100 *
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001101 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001102 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Igor Murashkin7d2a5c52014-01-17 15:07:52 -08001103 * @see CaptureRequest#CONTROL_AWB_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001104 * @see CaptureRequest#COLOR_CORRECTION_MODE
1105 */
1106 public static final int COLOR_CORRECTION_MODE_TRANSFORM_MATRIX = 0;
1107
1108 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001109 * <p>Color correction processing must not slow down
1110 * capture rate relative to sensor raw output.</p>
Igor Murashkin7d2a5c52014-01-17 15:07:52 -08001111 * <p>Advanced white balance adjustments above and beyond
1112 * the specified white balance pipeline may be applied.</p>
1113 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
1114 * the camera device uses the last frame's AWB values
1115 * (or defaults if AWB has never been run).</p>
1116 *
1117 * @see CaptureRequest#CONTROL_AWB_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001118 * @see CaptureRequest#COLOR_CORRECTION_MODE
1119 */
1120 public static final int COLOR_CORRECTION_MODE_FAST = 1;
1121
1122 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001123 * <p>Color correction processing operates at improved
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07001124 * quality but the capture rate might be reduced (relative to sensor
1125 * raw output rate)</p>
Igor Murashkin7d2a5c52014-01-17 15:07:52 -08001126 * <p>Advanced white balance adjustments above and beyond
1127 * the specified white balance pipeline may be applied.</p>
1128 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
1129 * the camera device uses the last frame's AWB values
1130 * (or defaults if AWB has never been run).</p>
1131 *
1132 * @see CaptureRequest#CONTROL_AWB_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001133 * @see CaptureRequest#COLOR_CORRECTION_MODE
1134 */
1135 public static final int COLOR_CORRECTION_MODE_HIGH_QUALITY = 2;
1136
1137 //
Zhijun He9e4e4392014-08-18 11:12:32 -07001138 // Enumeration values for CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
Zhijun Hea05e59d2014-07-08 18:27:47 -07001139 //
1140
1141 /**
1142 * <p>No aberration correction is applied.</p>
Zhijun He9e4e4392014-08-18 11:12:32 -07001143 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
Zhijun Hea05e59d2014-07-08 18:27:47 -07001144 */
Zhijun He9e4e4392014-08-18 11:12:32 -07001145 public static final int COLOR_CORRECTION_ABERRATION_MODE_OFF = 0;
Zhijun Hea05e59d2014-07-08 18:27:47 -07001146
1147 /**
1148 * <p>Aberration correction will not slow down capture rate
1149 * relative to sensor raw output.</p>
Zhijun He9e4e4392014-08-18 11:12:32 -07001150 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
Zhijun Hea05e59d2014-07-08 18:27:47 -07001151 */
Zhijun He9e4e4392014-08-18 11:12:32 -07001152 public static final int COLOR_CORRECTION_ABERRATION_MODE_FAST = 1;
Zhijun Hea05e59d2014-07-08 18:27:47 -07001153
1154 /**
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07001155 * <p>Aberration correction operates at improved quality but the capture rate might be
1156 * reduced (relative to sensor raw output rate)</p>
Zhijun He9e4e4392014-08-18 11:12:32 -07001157 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
Zhijun Hea05e59d2014-07-08 18:27:47 -07001158 */
Zhijun He9e4e4392014-08-18 11:12:32 -07001159 public static final int COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY = 2;
Zhijun Hea05e59d2014-07-08 18:27:47 -07001160
1161 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001162 // Enumeration values for CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1163 //
1164
1165 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001166 * <p>The camera device will not adjust exposure duration to
1167 * avoid banding problems.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001168 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1169 */
1170 public static final int CONTROL_AE_ANTIBANDING_MODE_OFF = 0;
1171
1172 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001173 * <p>The camera device will adjust exposure duration to
1174 * avoid banding problems with 50Hz illumination sources.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001175 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1176 */
1177 public static final int CONTROL_AE_ANTIBANDING_MODE_50HZ = 1;
1178
1179 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001180 * <p>The camera device will adjust exposure duration to
1181 * avoid banding problems with 60Hz illumination
1182 * sources.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001183 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1184 */
1185 public static final int CONTROL_AE_ANTIBANDING_MODE_60HZ = 2;
1186
1187 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001188 * <p>The camera device will automatically adapt its
1189 * antibanding routine to the current illumination
Yin-Chia Yeh7b2cae62014-11-25 11:54:18 -08001190 * condition. This is the default mode if AUTO is
1191 * available on given camera device.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001192 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1193 */
1194 public static final int CONTROL_AE_ANTIBANDING_MODE_AUTO = 3;
1195
1196 //
1197 // Enumeration values for CaptureRequest#CONTROL_AE_MODE
1198 //
1199
1200 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001201 * <p>The camera device's autoexposure routine is disabled.</p>
1202 * <p>The application-selected {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001203 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} and
1204 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are used by the camera
1205 * device, along with android.flash.* fields, if there's
1206 * a flash unit for this camera device.</p>
Yin-Chia Yeh7144b5d2014-11-12 11:42:49 -08001207 * <p>Note that auto-white balance (AWB) and auto-focus (AF)
1208 * behavior is device dependent when AE is in OFF mode.
1209 * To have consistent behavior across different devices,
1210 * it is recommended to either set AWB and AF to OFF mode
1211 * or lock AWB and AF before setting AE to OFF.
1212 * See {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode},
1213 * {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}, and {@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}
1214 * for more details.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001215 * <p>LEGACY devices do not support the OFF mode and will
1216 * override attempts to use this value to ON.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001217 *
Yin-Chia Yeh7144b5d2014-11-12 11:42:49 -08001218 * @see CaptureRequest#CONTROL_AF_MODE
1219 * @see CaptureRequest#CONTROL_AF_TRIGGER
1220 * @see CaptureRequest#CONTROL_AWB_LOCK
1221 * @see CaptureRequest#CONTROL_AWB_MODE
Zhijun He5f2a47f2014-01-16 15:44:41 -08001222 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001223 * @see CaptureRequest#SENSOR_FRAME_DURATION
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001224 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001225 * @see CaptureRequest#CONTROL_AE_MODE
1226 */
1227 public static final int CONTROL_AE_MODE_OFF = 0;
1228
1229 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001230 * <p>The camera device's autoexposure routine is active,
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001231 * with no flash control.</p>
1232 * <p>The application's values for
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001233 * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
1234 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and
1235 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are ignored. The
1236 * application has control over the various
1237 * android.flash.* fields.</p>
1238 *
Zhijun He5f2a47f2014-01-16 15:44:41 -08001239 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001240 * @see CaptureRequest#SENSOR_FRAME_DURATION
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001241 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001242 * @see CaptureRequest#CONTROL_AE_MODE
1243 */
1244 public static final int CONTROL_AE_MODE_ON = 1;
1245
1246 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001247 * <p>Like ON, except that the camera device also controls
1248 * the camera's flash unit, firing it in low-light
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001249 * conditions.</p>
1250 * <p>The flash may be fired during a precapture sequence
1251 * (triggered by {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and
1252 * may be fired for captures for which the
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001253 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to
1254 * STILL_CAPTURE</p>
1255 *
Igor Murashkin3242f4f2014-01-15 12:27:41 -08001256 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
Zhijun He5f2a47f2014-01-16 15:44:41 -08001257 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001258 * @see CaptureRequest#CONTROL_AE_MODE
1259 */
1260 public static final int CONTROL_AE_MODE_ON_AUTO_FLASH = 2;
1261
1262 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001263 * <p>Like ON, except that the camera device also controls
1264 * the camera's flash unit, always firing it for still
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001265 * captures.</p>
1266 * <p>The flash may be fired during a precapture sequence
1267 * (triggered by {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and
1268 * will always be fired for captures for which the
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001269 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to
1270 * STILL_CAPTURE</p>
1271 *
Igor Murashkin3242f4f2014-01-15 12:27:41 -08001272 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
Zhijun He5f2a47f2014-01-16 15:44:41 -08001273 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001274 * @see CaptureRequest#CONTROL_AE_MODE
1275 */
1276 public static final int CONTROL_AE_MODE_ON_ALWAYS_FLASH = 3;
1277
1278 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001279 * <p>Like ON_AUTO_FLASH, but with automatic red eye
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001280 * reduction.</p>
1281 * <p>If deemed necessary by the camera device, a red eye
1282 * reduction flash will fire during the precapture
1283 * sequence.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001284 * @see CaptureRequest#CONTROL_AE_MODE
1285 */
1286 public static final int CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE = 4;
1287
1288 //
1289 // Enumeration values for CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1290 //
1291
1292 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001293 * <p>The trigger is idle.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001294 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1295 */
1296 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_IDLE = 0;
1297
1298 /**
Zhijun He228f4f92014-01-16 17:22:05 -08001299 * <p>The precapture metering sequence will be started
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001300 * by the camera device.</p>
1301 * <p>The exact effect of the precapture trigger depends on
1302 * the current AE mode and state.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001303 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1304 */
1305 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_START = 1;
1306
Zhijun Hefa95b042015-02-09 10:40:49 -08001307 /**
1308 * <p>The camera device will cancel any currently active or completed
1309 * precapture metering sequence, the auto-exposure routine will return to its
1310 * initial state.</p>
1311 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1312 */
1313 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL = 2;
1314
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001315 //
1316 // Enumeration values for CaptureRequest#CONTROL_AF_MODE
1317 //
1318
1319 /**
Zhijun Hef3537422013-12-16 16:56:35 -08001320 * <p>The auto-focus routine does not control the lens;
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001321 * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} is controlled by the
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001322 * application.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001323 *
1324 * @see CaptureRequest#LENS_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001325 * @see CaptureRequest#CONTROL_AF_MODE
1326 */
1327 public static final int CONTROL_AF_MODE_OFF = 0;
1328
1329 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001330 * <p>Basic automatic focus mode.</p>
1331 * <p>In this mode, the lens does not move unless
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001332 * the autofocus trigger action is called. When that trigger
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001333 * is activated, AF will transition to ACTIVE_SCAN, then to
Zhijun Hef3537422013-12-16 16:56:35 -08001334 * the outcome of the scan (FOCUSED or NOT_FOCUSED).</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001335 * <p>Always supported if lens is not fixed focus.</p>
1336 * <p>Use {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} to determine if lens
1337 * is fixed-focus.</p>
Zhijun Hef3537422013-12-16 16:56:35 -08001338 * <p>Triggering AF_CANCEL resets the lens position to default,
Igor Murashkinace5bf02013-12-10 17:36:40 -08001339 * and sets the AF state to INACTIVE.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001340 *
1341 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001342 * @see CaptureRequest#CONTROL_AF_MODE
1343 */
1344 public static final int CONTROL_AF_MODE_AUTO = 1;
1345
1346 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001347 * <p>Close-up focusing mode.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08001348 * <p>In this mode, the lens does not move unless the
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001349 * autofocus trigger action is called. When that trigger is
1350 * activated, AF will transition to ACTIVE_SCAN, then to
1351 * the outcome of the scan (FOCUSED or NOT_FOCUSED). This
1352 * mode is optimized for focusing on objects very close to
1353 * the camera.</p>
1354 * <p>When that trigger is activated, AF will transition to
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001355 * ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001356 * NOT_FOCUSED). Triggering cancel AF resets the lens
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001357 * position to default, and sets the AF state to
Igor Murashkinace5bf02013-12-10 17:36:40 -08001358 * INACTIVE.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001359 * @see CaptureRequest#CONTROL_AF_MODE
1360 */
1361 public static final int CONTROL_AF_MODE_MACRO = 2;
1362
1363 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001364 * <p>In this mode, the AF algorithm modifies the lens
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001365 * position continually to attempt to provide a
Igor Murashkinace5bf02013-12-10 17:36:40 -08001366 * constantly-in-focus image stream.</p>
1367 * <p>The focusing behavior should be suitable for good quality
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001368 * video recording; typically this means slower focus
1369 * movement and no overshoots. When the AF trigger is not
1370 * involved, the AF algorithm should start in INACTIVE state,
1371 * and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED
1372 * states as appropriate. When the AF trigger is activated,
1373 * the algorithm should immediately transition into
1374 * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
Igor Murashkinace5bf02013-12-10 17:36:40 -08001375 * lens position until a cancel AF trigger is received.</p>
1376 * <p>Once cancel is received, the algorithm should transition
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001377 * back to INACTIVE and resume passive scan. Note that this
1378 * behavior is not identical to CONTINUOUS_PICTURE, since an
1379 * ongoing PASSIVE_SCAN must immediately be
Igor Murashkinace5bf02013-12-10 17:36:40 -08001380 * canceled.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001381 * @see CaptureRequest#CONTROL_AF_MODE
1382 */
1383 public static final int CONTROL_AF_MODE_CONTINUOUS_VIDEO = 3;
1384
1385 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001386 * <p>In this mode, the AF algorithm modifies the lens
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001387 * position continually to attempt to provide a
Igor Murashkinace5bf02013-12-10 17:36:40 -08001388 * constantly-in-focus image stream.</p>
1389 * <p>The focusing behavior should be suitable for still image
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001390 * capture; typically this means focusing as fast as
1391 * possible. When the AF trigger is not involved, the AF
1392 * algorithm should start in INACTIVE state, and then
1393 * transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as
1394 * appropriate as it attempts to maintain focus. When the AF
1395 * trigger is activated, the algorithm should finish its
1396 * PASSIVE_SCAN if active, and then transition into
1397 * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
Igor Murashkinace5bf02013-12-10 17:36:40 -08001398 * lens position until a cancel AF trigger is received.</p>
1399 * <p>When the AF cancel trigger is activated, the algorithm
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001400 * should transition back to INACTIVE and then act as if it
Igor Murashkinace5bf02013-12-10 17:36:40 -08001401 * has just been started.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001402 * @see CaptureRequest#CONTROL_AF_MODE
1403 */
1404 public static final int CONTROL_AF_MODE_CONTINUOUS_PICTURE = 4;
1405
1406 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001407 * <p>Extended depth of field (digital focus) mode.</p>
1408 * <p>The camera device will produce images with an extended
1409 * depth of field automatically; no special focusing
1410 * operations need to be done before taking a picture.</p>
1411 * <p>AF triggers are ignored, and the AF state will always be
Igor Murashkinace5bf02013-12-10 17:36:40 -08001412 * INACTIVE.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001413 * @see CaptureRequest#CONTROL_AF_MODE
1414 */
1415 public static final int CONTROL_AF_MODE_EDOF = 5;
1416
1417 //
1418 // Enumeration values for CaptureRequest#CONTROL_AF_TRIGGER
1419 //
1420
1421 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001422 * <p>The trigger is idle.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001423 * @see CaptureRequest#CONTROL_AF_TRIGGER
1424 */
1425 public static final int CONTROL_AF_TRIGGER_IDLE = 0;
1426
1427 /**
Zhijun He228f4f92014-01-16 17:22:05 -08001428 * <p>Autofocus will trigger now.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001429 * @see CaptureRequest#CONTROL_AF_TRIGGER
1430 */
1431 public static final int CONTROL_AF_TRIGGER_START = 1;
1432
1433 /**
Zhijun He228f4f92014-01-16 17:22:05 -08001434 * <p>Autofocus will return to its initial
1435 * state, and cancel any currently active trigger.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001436 * @see CaptureRequest#CONTROL_AF_TRIGGER
1437 */
1438 public static final int CONTROL_AF_TRIGGER_CANCEL = 2;
1439
1440 //
1441 // Enumeration values for CaptureRequest#CONTROL_AWB_MODE
1442 //
1443
1444 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001445 * <p>The camera device's auto-white balance routine is disabled.</p>
1446 * <p>The application-selected color transform matrix
Zhijun He399f05d2014-01-15 11:31:30 -08001447 * ({@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}) and gains
1448 * ({@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}) are used by the camera
1449 * device for manual white balance control.</p>
1450 *
Zhijun He399f05d2014-01-15 11:31:30 -08001451 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001452 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001453 * @see CaptureRequest#CONTROL_AWB_MODE
1454 */
1455 public static final int CONTROL_AWB_MODE_OFF = 0;
1456
1457 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001458 * <p>The camera device's auto-white balance routine is active.</p>
1459 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1460 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1461 * For devices that support the MANUAL_POST_PROCESSING capability, the
1462 * values used by the camera device for the transform and gains
1463 * will be available in the capture result for this request.</p>
Zhijun He399f05d2014-01-15 11:31:30 -08001464 *
1465 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001466 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001467 * @see CaptureRequest#CONTROL_AWB_MODE
1468 */
1469 public static final int CONTROL_AWB_MODE_AUTO = 1;
1470
1471 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001472 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001473 * the camera device uses incandescent light as the assumed scene
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001474 * illumination for white balance.</p>
1475 * <p>While the exact white balance transforms are up to the
1476 * camera device, they will approximately match the CIE
1477 * standard illuminant A.</p>
1478 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1479 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1480 * For devices that support the MANUAL_POST_PROCESSING capability, the
1481 * values used by the camera device for the transform and gains
1482 * will be available in the capture result for this request.</p>
1483 *
1484 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1485 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001486 * @see CaptureRequest#CONTROL_AWB_MODE
1487 */
1488 public static final int CONTROL_AWB_MODE_INCANDESCENT = 2;
1489
1490 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001491 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001492 * the camera device uses fluorescent light as the assumed scene
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001493 * illumination for white balance.</p>
1494 * <p>While the exact white balance transforms are up to the
1495 * camera device, they will approximately match the CIE
1496 * standard illuminant F2.</p>
1497 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1498 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1499 * For devices that support the MANUAL_POST_PROCESSING capability, the
1500 * values used by the camera device for the transform and gains
1501 * will be available in the capture result for this request.</p>
1502 *
1503 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1504 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001505 * @see CaptureRequest#CONTROL_AWB_MODE
1506 */
1507 public static final int CONTROL_AWB_MODE_FLUORESCENT = 3;
1508
1509 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001510 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001511 * the camera device uses warm fluorescent light as the assumed scene
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001512 * illumination for white balance.</p>
1513 * <p>While the exact white balance transforms are up to the
1514 * camera device, they will approximately match the CIE
1515 * standard illuminant F4.</p>
1516 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1517 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1518 * For devices that support the MANUAL_POST_PROCESSING capability, the
1519 * values used by the camera device for the transform and gains
1520 * will be available in the capture result for this request.</p>
1521 *
1522 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1523 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001524 * @see CaptureRequest#CONTROL_AWB_MODE
1525 */
1526 public static final int CONTROL_AWB_MODE_WARM_FLUORESCENT = 4;
1527
1528 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001529 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001530 * the camera device uses daylight light as the assumed scene
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001531 * illumination for white balance.</p>
1532 * <p>While the exact white balance transforms are up to the
1533 * camera device, they will approximately match the CIE
1534 * standard illuminant D65.</p>
1535 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1536 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1537 * For devices that support the MANUAL_POST_PROCESSING capability, the
1538 * values used by the camera device for the transform and gains
1539 * will be available in the capture result for this request.</p>
1540 *
1541 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1542 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001543 * @see CaptureRequest#CONTROL_AWB_MODE
1544 */
1545 public static final int CONTROL_AWB_MODE_DAYLIGHT = 5;
1546
1547 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001548 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001549 * the camera device uses cloudy daylight light as the assumed scene
1550 * illumination for white balance.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001551 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1552 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1553 * For devices that support the MANUAL_POST_PROCESSING capability, the
1554 * values used by the camera device for the transform and gains
1555 * will be available in the capture result for this request.</p>
1556 *
1557 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1558 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001559 * @see CaptureRequest#CONTROL_AWB_MODE
1560 */
1561 public static final int CONTROL_AWB_MODE_CLOUDY_DAYLIGHT = 6;
1562
1563 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001564 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001565 * the camera device uses twilight light as the assumed scene
1566 * illumination for white balance.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001567 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1568 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1569 * For devices that support the MANUAL_POST_PROCESSING capability, the
1570 * values used by the camera device for the transform and gains
1571 * will be available in the capture result for this request.</p>
1572 *
1573 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1574 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001575 * @see CaptureRequest#CONTROL_AWB_MODE
1576 */
1577 public static final int CONTROL_AWB_MODE_TWILIGHT = 7;
1578
1579 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001580 * <p>The camera device's auto-white balance routine is disabled;
Zhijun He399f05d2014-01-15 11:31:30 -08001581 * the camera device uses shade light as the assumed scene
1582 * illumination for white balance.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001583 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1584 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1585 * For devices that support the MANUAL_POST_PROCESSING capability, the
1586 * values used by the camera device for the transform and gains
1587 * will be available in the capture result for this request.</p>
1588 *
1589 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1590 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001591 * @see CaptureRequest#CONTROL_AWB_MODE
1592 */
1593 public static final int CONTROL_AWB_MODE_SHADE = 8;
1594
1595 //
1596 // Enumeration values for CaptureRequest#CONTROL_CAPTURE_INTENT
1597 //
1598
1599 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001600 * <p>The goal of this request doesn't fall into the other
1601 * categories. The camera device will default to preview-like
Igor Murashkinace5bf02013-12-10 17:36:40 -08001602 * behavior.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001603 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1604 */
1605 public static final int CONTROL_CAPTURE_INTENT_CUSTOM = 0;
1606
1607 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001608 * <p>This request is for a preview-like use case.</p>
1609 * <p>The precapture trigger may be used to start off a metering
1610 * w/flash sequence.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001611 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1612 */
1613 public static final int CONTROL_CAPTURE_INTENT_PREVIEW = 1;
1614
1615 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001616 * <p>This request is for a still capture-type
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001617 * use case.</p>
1618 * <p>If the flash unit is under automatic control, it may fire as needed.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001619 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1620 */
1621 public static final int CONTROL_CAPTURE_INTENT_STILL_CAPTURE = 2;
1622
1623 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001624 * <p>This request is for a video recording
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001625 * use case.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001626 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1627 */
1628 public static final int CONTROL_CAPTURE_INTENT_VIDEO_RECORD = 3;
1629
1630 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001631 * <p>This request is for a video snapshot (still
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001632 * image while recording video) use case.</p>
1633 * <p>The camera device should take the highest-quality image
1634 * possible (given the other settings) without disrupting the
Eino-Ville Talvala126a7462014-11-04 16:31:01 -08001635 * frame rate of video recording. </p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001636 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1637 */
1638 public static final int CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT = 4;
1639
1640 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001641 * <p>This request is for a ZSL usecase; the
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001642 * application will stream full-resolution images and
1643 * reprocess one or several later for a final
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001644 * capture.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001645 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1646 */
1647 public static final int CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG = 5;
1648
Zhijun Hee30adb72014-04-09 19:04:31 -07001649 /**
1650 * <p>This request is for manual capture use case where
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001651 * the applications want to directly control the capture parameters.</p>
1652 * <p>For example, the application may wish to manually control
1653 * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, etc.</p>
Zhijun Hee30adb72014-04-09 19:04:31 -07001654 *
1655 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
1656 * @see CaptureRequest#SENSOR_SENSITIVITY
1657 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1658 */
1659 public static final int CONTROL_CAPTURE_INTENT_MANUAL = 6;
1660
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001661 //
1662 // Enumeration values for CaptureRequest#CONTROL_EFFECT_MODE
1663 //
1664
1665 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001666 * <p>No color effect will be applied.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001667 * @see CaptureRequest#CONTROL_EFFECT_MODE
1668 */
1669 public static final int CONTROL_EFFECT_MODE_OFF = 0;
1670
1671 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001672 * <p>A "monocolor" effect where the image is mapped into
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001673 * a single color.</p>
1674 * <p>This will typically be grayscale.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001675 * @see CaptureRequest#CONTROL_EFFECT_MODE
1676 */
1677 public static final int CONTROL_EFFECT_MODE_MONO = 1;
1678
1679 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001680 * <p>A "photo-negative" effect where the image's colors
1681 * are inverted.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001682 * @see CaptureRequest#CONTROL_EFFECT_MODE
1683 */
1684 public static final int CONTROL_EFFECT_MODE_NEGATIVE = 2;
1685
1686 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001687 * <p>A "solarisation" effect (Sabattier effect) where the
1688 * image is wholly or partially reversed in
1689 * tone.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001690 * @see CaptureRequest#CONTROL_EFFECT_MODE
1691 */
1692 public static final int CONTROL_EFFECT_MODE_SOLARIZE = 3;
1693
1694 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001695 * <p>A "sepia" effect where the image is mapped into warm
1696 * gray, red, and brown tones.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001697 * @see CaptureRequest#CONTROL_EFFECT_MODE
1698 */
1699 public static final int CONTROL_EFFECT_MODE_SEPIA = 4;
1700
1701 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001702 * <p>A "posterization" effect where the image uses
1703 * discrete regions of tone rather than a continuous
1704 * gradient of tones.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001705 * @see CaptureRequest#CONTROL_EFFECT_MODE
1706 */
1707 public static final int CONTROL_EFFECT_MODE_POSTERIZE = 5;
1708
1709 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001710 * <p>A "whiteboard" effect where the image is typically displayed
1711 * as regions of white, with black or grey details.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001712 * @see CaptureRequest#CONTROL_EFFECT_MODE
1713 */
1714 public static final int CONTROL_EFFECT_MODE_WHITEBOARD = 6;
1715
1716 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001717 * <p>A "blackboard" effect where the image is typically displayed
1718 * as regions of black, with white or grey details.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001719 * @see CaptureRequest#CONTROL_EFFECT_MODE
1720 */
1721 public static final int CONTROL_EFFECT_MODE_BLACKBOARD = 7;
1722
1723 /**
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -08001724 * <p>An "aqua" effect where a blue hue is added to the image.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001725 * @see CaptureRequest#CONTROL_EFFECT_MODE
1726 */
1727 public static final int CONTROL_EFFECT_MODE_AQUA = 8;
1728
1729 //
1730 // Enumeration values for CaptureRequest#CONTROL_MODE
1731 //
1732
1733 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001734 * <p>Full application control of pipeline.</p>
1735 * <p>All control by the device's metering and focusing (3A)
1736 * routines is disabled, and no other settings in
1737 * android.control.* have any effect, except that
1738 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} may be used by the camera
1739 * device to select post-processing values for processing
1740 * blocks that do not allow for manual control, or are not
1741 * exposed by the camera API.</p>
1742 * <p>However, the camera device's 3A routines may continue to
1743 * collect statistics and update their internal state so that
1744 * when control is switched to AUTO mode, good control values
1745 * can be immediately applied.</p>
1746 *
1747 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001748 * @see CaptureRequest#CONTROL_MODE
1749 */
1750 public static final int CONTROL_MODE_OFF = 0;
1751
1752 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001753 * <p>Use settings for each individual 3A routine.</p>
1754 * <p>Manual control of capture parameters is disabled. All
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001755 * controls in android.control.* besides sceneMode take
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001756 * effect.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001757 * @see CaptureRequest#CONTROL_MODE
1758 */
1759 public static final int CONTROL_MODE_AUTO = 1;
1760
1761 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001762 * <p>Use a specific scene mode.</p>
1763 * <p>Enabling this disables control.aeMode, control.awbMode and
1764 * control.afMode controls; the camera device will ignore
1765 * those settings while USE_SCENE_MODE is active (except for
Zhijun Heee2ebde2015-06-16 19:58:11 -07001766 * FACE_PRIORITY scene mode). Other control entries are still active.
1767 * This setting can only be used if scene mode is supported (i.e.
1768 * {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001769 * contain some modes other than DISABLED).</p>
Zhijun Hea4866242014-03-27 23:51:34 -07001770 *
1771 * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001772 * @see CaptureRequest#CONTROL_MODE
1773 */
1774 public static final int CONTROL_MODE_USE_SCENE_MODE = 2;
1775
Zhijun He2d5e8972014-02-07 16:13:46 -08001776 /**
1777 * <p>Same as OFF mode, except that this capture will not be
1778 * used by camera device background auto-exposure, auto-white balance and
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001779 * auto-focus algorithms (3A) to update their statistics.</p>
1780 * <p>Specifically, the 3A routines are locked to the last
1781 * values set from a request with AUTO, OFF, or
1782 * USE_SCENE_MODE, and any statistics or state updates
1783 * collected from manual captures with OFF_KEEP_STATE will be
1784 * discarded by the camera device.</p>
Zhijun He2d5e8972014-02-07 16:13:46 -08001785 * @see CaptureRequest#CONTROL_MODE
1786 */
1787 public static final int CONTROL_MODE_OFF_KEEP_STATE = 3;
1788
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001789 //
1790 // Enumeration values for CaptureRequest#CONTROL_SCENE_MODE
1791 //
1792
1793 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001794 * <p>Indicates that no scene modes are set for a given capture request.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001795 * @see CaptureRequest#CONTROL_SCENE_MODE
1796 */
Ruben Brunke6679362014-01-17 17:05:54 -08001797 public static final int CONTROL_SCENE_MODE_DISABLED = 0;
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001798
1799 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001800 * <p>If face detection support exists, use face
1801 * detection data for auto-focus, auto-white balance, and
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001802 * auto-exposure routines.</p>
1803 * <p>If face detection statistics are disabled
1804 * (i.e. {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} is set to OFF),
Ruben Brunke6679362014-01-17 17:05:54 -08001805 * this should still operate correctly (but will not return
1806 * face detection statistics to the framework).</p>
1807 * <p>Unlike the other scene modes, {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode},
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001808 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}
Ruben Brunke6679362014-01-17 17:05:54 -08001809 * remain active when FACE_PRIORITY is set.</p>
1810 *
1811 * @see CaptureRequest#CONTROL_AE_MODE
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001812 * @see CaptureRequest#CONTROL_AF_MODE
Ruben Brunke6679362014-01-17 17:05:54 -08001813 * @see CaptureRequest#CONTROL_AWB_MODE
1814 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001815 * @see CaptureRequest#CONTROL_SCENE_MODE
1816 */
1817 public static final int CONTROL_SCENE_MODE_FACE_PRIORITY = 1;
1818
1819 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001820 * <p>Optimized for photos of quickly moving objects.</p>
1821 * <p>Similar to SPORTS.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001822 * @see CaptureRequest#CONTROL_SCENE_MODE
1823 */
1824 public static final int CONTROL_SCENE_MODE_ACTION = 2;
1825
1826 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001827 * <p>Optimized for still photos of people.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001828 * @see CaptureRequest#CONTROL_SCENE_MODE
1829 */
1830 public static final int CONTROL_SCENE_MODE_PORTRAIT = 3;
1831
1832 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001833 * <p>Optimized for photos of distant macroscopic objects.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001834 * @see CaptureRequest#CONTROL_SCENE_MODE
1835 */
1836 public static final int CONTROL_SCENE_MODE_LANDSCAPE = 4;
1837
1838 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001839 * <p>Optimized for low-light settings.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001840 * @see CaptureRequest#CONTROL_SCENE_MODE
1841 */
1842 public static final int CONTROL_SCENE_MODE_NIGHT = 5;
1843
1844 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001845 * <p>Optimized for still photos of people in low-light
1846 * settings.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001847 * @see CaptureRequest#CONTROL_SCENE_MODE
1848 */
1849 public static final int CONTROL_SCENE_MODE_NIGHT_PORTRAIT = 6;
1850
1851 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001852 * <p>Optimized for dim, indoor settings where flash must
1853 * remain off.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001854 * @see CaptureRequest#CONTROL_SCENE_MODE
1855 */
1856 public static final int CONTROL_SCENE_MODE_THEATRE = 7;
1857
1858 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001859 * <p>Optimized for bright, outdoor beach settings.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001860 * @see CaptureRequest#CONTROL_SCENE_MODE
1861 */
1862 public static final int CONTROL_SCENE_MODE_BEACH = 8;
1863
1864 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001865 * <p>Optimized for bright, outdoor settings containing snow.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001866 * @see CaptureRequest#CONTROL_SCENE_MODE
1867 */
1868 public static final int CONTROL_SCENE_MODE_SNOW = 9;
1869
1870 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001871 * <p>Optimized for scenes of the setting sun.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001872 * @see CaptureRequest#CONTROL_SCENE_MODE
1873 */
1874 public static final int CONTROL_SCENE_MODE_SUNSET = 10;
1875
1876 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001877 * <p>Optimized to avoid blurry photos due to small amounts of
1878 * device motion (for example: due to hand shake).</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001879 * @see CaptureRequest#CONTROL_SCENE_MODE
1880 */
1881 public static final int CONTROL_SCENE_MODE_STEADYPHOTO = 11;
1882
1883 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001884 * <p>Optimized for nighttime photos of fireworks.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001885 * @see CaptureRequest#CONTROL_SCENE_MODE
1886 */
1887 public static final int CONTROL_SCENE_MODE_FIREWORKS = 12;
1888
1889 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001890 * <p>Optimized for photos of quickly moving people.</p>
1891 * <p>Similar to ACTION.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001892 * @see CaptureRequest#CONTROL_SCENE_MODE
1893 */
1894 public static final int CONTROL_SCENE_MODE_SPORTS = 13;
1895
1896 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001897 * <p>Optimized for dim, indoor settings with multiple moving
1898 * people.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001899 * @see CaptureRequest#CONTROL_SCENE_MODE
1900 */
1901 public static final int CONTROL_SCENE_MODE_PARTY = 14;
1902
1903 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001904 * <p>Optimized for dim settings where the main light source
1905 * is a flame.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001906 * @see CaptureRequest#CONTROL_SCENE_MODE
1907 */
1908 public static final int CONTROL_SCENE_MODE_CANDLELIGHT = 15;
1909
1910 /**
Ruben Brunke6679362014-01-17 17:05:54 -08001911 * <p>Optimized for accurately capturing a photo of barcode
1912 * for use by camera applications that wish to read the
1913 * barcode value.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001914 * @see CaptureRequest#CONTROL_SCENE_MODE
1915 */
1916 public static final int CONTROL_SCENE_MODE_BARCODE = 16;
1917
Zhijun Hee0404182014-06-26 13:17:09 -07001918 /**
Eino-Ville Talvala639fffe2015-06-30 10:34:48 -07001919 * <p>This is deprecated, please use {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }
1920 * and {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList }
Zhijun Hefab663e2015-05-26 19:46:31 -07001921 * for high speed video recording.</p>
Zhijun Hee0404182014-06-26 13:17:09 -07001922 * <p>Optimized for high speed video recording (frame rate &gt;=60fps) use case.</p>
1923 * <p>The supported high speed video sizes and fps ranges are specified in
1924 * android.control.availableHighSpeedVideoConfigurations. To get desired
1925 * output frame rates, the application is only allowed to select video size
1926 * and fps range combinations listed in this static metadata. The fps range
1927 * can be control via {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}.</p>
1928 * <p>In this mode, the camera device will override aeMode, awbMode, and afMode to
1929 * ON, ON, and CONTINUOUS_VIDEO, respectively. All post-processing block mode
1930 * controls will be overridden to be FAST. Therefore, no manual control of capture
1931 * and post-processing parameters is possible. All other controls operate the
1932 * same as when {@link CaptureRequest#CONTROL_MODE android.control.mode} == AUTO. This means that all other
1933 * android.control.* fields continue to work, such as</p>
1934 * <ul>
1935 * <li>{@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}</li>
1936 * <li>{@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}</li>
1937 * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li>
1938 * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li>
1939 * <li>{@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</li>
1940 * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li>
1941 * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li>
1942 * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li>
1943 * <li>{@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}</li>
1944 * <li>{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}</li>
1945 * </ul>
1946 * <p>Outside of android.control.*, the following controls will work:</p>
1947 * <ul>
1948 * <li>{@link CaptureRequest#FLASH_MODE android.flash.mode} (automatic flash for still capture will not work since aeMode is ON)</li>
1949 * <li>{@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} (if it is supported)</li>
1950 * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li>
1951 * <li>{@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}</li>
1952 * </ul>
1953 * <p>For high speed recording use case, the actual maximum supported frame rate may
1954 * be lower than what camera can output, depending on the destination Surfaces for
1955 * the image data. For example, if the destination surface is from video encoder,
1956 * the application need check if the video encoder is capable of supporting the
1957 * high frame rate for a given video size, or it will end up with lower recording
1958 * frame rate. If the destination surface is from preview window, the preview frame
1959 * rate will be bounded by the screen refresh rate.</p>
1960 * <p>The camera device will only support up to 2 output high speed streams
1961 * (processed non-stalling format defined in android.request.maxNumOutputStreams)
1962 * in this mode. This control will be effective only if all of below conditions are true:</p>
1963 * <ul>
1964 * <li>The application created no more than maxNumHighSpeedStreams processed non-stalling
1965 * format output streams, where maxNumHighSpeedStreams is calculated as
1966 * min(2, android.request.maxNumOutputStreams[Processed (but not-stalling)]).</li>
1967 * <li>The stream sizes are selected from the sizes reported by
1968 * android.control.availableHighSpeedVideoConfigurations.</li>
1969 * <li>No processed non-stalling or raw streams are configured.</li>
1970 * </ul>
1971 * <p>When above conditions are NOT satistied, the controls of this mode and
1972 * {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} will be ignored by the camera device,
1973 * the camera device will fall back to {@link CaptureRequest#CONTROL_MODE android.control.mode} <code>==</code> AUTO,
1974 * and the returned capture result metadata will give the fps range choosen
1975 * by the camera device.</p>
1976 * <p>Switching into or out of this mode may trigger some camera ISP/sensor
1977 * reconfigurations, which may introduce extra latency. It is recommended that
1978 * the application avoids unnecessary scene mode switch as much as possible.</p>
1979 *
1980 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
1981 * @see CaptureRequest#CONTROL_AE_LOCK
1982 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1983 * @see CaptureRequest#CONTROL_AE_REGIONS
1984 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
1985 * @see CaptureRequest#CONTROL_AF_REGIONS
1986 * @see CaptureRequest#CONTROL_AF_TRIGGER
1987 * @see CaptureRequest#CONTROL_AWB_LOCK
1988 * @see CaptureRequest#CONTROL_AWB_REGIONS
1989 * @see CaptureRequest#CONTROL_EFFECT_MODE
1990 * @see CaptureRequest#CONTROL_MODE
1991 * @see CaptureRequest#FLASH_MODE
1992 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
1993 * @see CaptureRequest#SCALER_CROP_REGION
1994 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
1995 * @see CaptureRequest#CONTROL_SCENE_MODE
Zhijun Hefab663e2015-05-26 19:46:31 -07001996 * @deprecated Please refer to this API documentation to find the alternatives
Zhijun Hee0404182014-06-26 13:17:09 -07001997 */
1998 public static final int CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO = 17;
1999
Ruben Brunkff99a0a2014-08-28 18:42:35 -07002000 /**
Eino-Ville Talvalaf4eac122014-12-05 11:10:15 -08002001 * <p>Turn on a device-specific high dynamic range (HDR) mode.</p>
2002 * <p>In this scene mode, the camera device captures images
2003 * that keep a larger range of scene illumination levels
2004 * visible in the final image. For example, when taking a
2005 * picture of a object in front of a bright window, both
2006 * the object and the scene through the window may be
2007 * visible when using HDR mode, while in normal AUTO mode,
2008 * one or the other may be poorly exposed. As a tradeoff,
2009 * HDR mode generally takes much longer to capture a single
2010 * image, has no user control, and may have other artifacts
2011 * depending on the HDR method used.</p>
2012 * <p>Therefore, HDR captures operate at a much slower rate
2013 * than regular captures.</p>
2014 * <p>In this mode, on LIMITED or FULL devices, when a request
2015 * is made with a {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} of
2016 * STILL_CAPTURE, the camera device will capture an image
2017 * using a high dynamic range capture technique. On LEGACY
2018 * devices, captures that target a JPEG-format output will
2019 * be captured with HDR, and the capture intent is not
2020 * relevant.</p>
2021 * <p>The HDR capture may involve the device capturing a burst
2022 * of images internally and combining them into one, or it
2023 * may involve the device using specialized high dynamic
2024 * range capture hardware. In all cases, a single image is
2025 * produced in response to a capture request submitted
2026 * while in HDR mode.</p>
2027 * <p>Since substantial post-processing is generally needed to
Eino-Ville Talvalac7c569d2016-04-04 10:48:38 -07002028 * produce an HDR image, only YUV, PRIVATE, and JPEG
2029 * outputs are supported for LIMITED/FULL device HDR
2030 * captures, and only JPEG outputs are supported for LEGACY
2031 * HDR captures. Using a RAW output for HDR capture is not
Eino-Ville Talvalaf4eac122014-12-05 11:10:15 -08002032 * supported.</p>
Eino-Ville Talvalac7c569d2016-04-04 10:48:38 -07002033 * <p>Some devices may also support always-on HDR, which
2034 * applies HDR processing at full frame rate. For these
2035 * devices, intents other than STILL_CAPTURE will also
2036 * produce an HDR output with no frame rate impact compared
2037 * to normal operation, though the quality may be lower
2038 * than for STILL_CAPTURE intents.</p>
2039 * <p>If SCENE_MODE_HDR is used with unsupported output types
2040 * or capture intents, the images captured will be as if
2041 * the SCENE_MODE was not enabled at all.</p>
Eino-Ville Talvalaf4eac122014-12-05 11:10:15 -08002042 *
2043 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
Ruben Brunkff99a0a2014-08-28 18:42:35 -07002044 * @see CaptureRequest#CONTROL_SCENE_MODE
Ruben Brunkff99a0a2014-08-28 18:42:35 -07002045 */
2046 public static final int CONTROL_SCENE_MODE_HDR = 18;
2047
Zhijun Heee2ebde2015-06-16 19:58:11 -07002048 /**
2049 * <p>Same as FACE_PRIORITY scene mode, except that the camera
Zhijun He4fb81252015-07-11 20:02:30 -07002050 * device will choose higher sensitivity values ({@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity})
Zhijun Heee2ebde2015-06-16 19:58:11 -07002051 * under low light conditions.</p>
2052 * <p>The camera device may be tuned to expose the images in a reduced
2053 * sensitivity range to produce the best quality images. For example,
2054 * if the {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange} gives range of [100, 1600],
2055 * the camera device auto-exposure routine tuning process may limit the actual
Zhijun He4fb81252015-07-11 20:02:30 -07002056 * exposure sensitivity range to [100, 1200] to ensure that the noise level isn't
2057 * exessive in order to preserve the image quality. Under this situation, the image under
Zhijun Heee2ebde2015-06-16 19:58:11 -07002058 * low light may be under-exposed when the sensor max exposure time (bounded by the
2059 * {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} when {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is one of the
Zhijun He4fb81252015-07-11 20:02:30 -07002060 * ON_* modes) and effective max sensitivity are reached. This scene mode allows the
Zhijun Heee2ebde2015-06-16 19:58:11 -07002061 * camera device auto-exposure routine to increase the sensitivity up to the max
2062 * sensitivity specified by {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange} when the scene is too
2063 * dark and the max exposure time is reached. The captured images may be noisier
Zhijun He4fb81252015-07-11 20:02:30 -07002064 * compared with the images captured in normal FACE_PRIORITY mode; therefore, it is
Zhijun Heee2ebde2015-06-16 19:58:11 -07002065 * recommended that the application only use this scene mode when it is capable of
2066 * reducing the noise level of the captured images.</p>
2067 * <p>Unlike the other scene modes, {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode},
2068 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}
2069 * remain active when FACE_PRIORITY_LOW_LIGHT is set.</p>
2070 *
2071 * @see CaptureRequest#CONTROL_AE_MODE
2072 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
2073 * @see CaptureRequest#CONTROL_AF_MODE
2074 * @see CaptureRequest#CONTROL_AWB_MODE
2075 * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
2076 * @see CaptureRequest#SENSOR_SENSITIVITY
2077 * @see CaptureRequest#CONTROL_SCENE_MODE
2078 * @hide
2079 */
2080 public static final int CONTROL_SCENE_MODE_FACE_PRIORITY_LOW_LIGHT = 19;
2081
Yin-Chia Yeh37348202016-03-09 14:44:49 -08002082 /**
2083 * <p>Scene mode values within the range of
2084 * <code>[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]</code> are reserved for device specific
2085 * customized scene modes.</p>
2086 * @see CaptureRequest#CONTROL_SCENE_MODE
2087 * @hide
2088 */
2089 public static final int CONTROL_SCENE_MODE_DEVICE_CUSTOM_START = 100;
2090
2091 /**
2092 * <p>Scene mode values within the range of
2093 * <code>[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]</code> are reserved for device specific
2094 * customized scene modes.</p>
2095 * @see CaptureRequest#CONTROL_SCENE_MODE
2096 * @hide
2097 */
2098 public static final int CONTROL_SCENE_MODE_DEVICE_CUSTOM_END = 127;
2099
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002100 //
Zhijun He4793af52014-05-05 10:39:12 -07002101 // Enumeration values for CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
2102 //
2103
2104 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002105 * <p>Video stabilization is disabled.</p>
Zhijun He4793af52014-05-05 10:39:12 -07002106 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
2107 */
2108 public static final int CONTROL_VIDEO_STABILIZATION_MODE_OFF = 0;
2109
2110 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002111 * <p>Video stabilization is enabled.</p>
Zhijun He4793af52014-05-05 10:39:12 -07002112 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
2113 */
2114 public static final int CONTROL_VIDEO_STABILIZATION_MODE_ON = 1;
2115
2116 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002117 // Enumeration values for CaptureRequest#EDGE_MODE
2118 //
2119
2120 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002121 * <p>No edge enhancement is applied.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002122 * @see CaptureRequest#EDGE_MODE
2123 */
2124 public static final int EDGE_MODE_OFF = 0;
2125
2126 /**
Chien-Yu Chen9c9167e2015-07-14 16:38:25 -07002127 * <p>Apply edge enhancement at a quality level that does not slow down frame rate
2128 * relative to sensor output. It may be the same as OFF if edge enhancement will
2129 * slow down frame rate relative to sensor.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002130 * @see CaptureRequest#EDGE_MODE
2131 */
2132 public static final int EDGE_MODE_FAST = 1;
2133
2134 /**
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07002135 * <p>Apply high-quality edge enhancement, at a cost of possibly reduced output frame rate.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002136 * @see CaptureRequest#EDGE_MODE
2137 */
2138 public static final int EDGE_MODE_HIGH_QUALITY = 2;
2139
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002140 /**
2141 * <p>Edge enhancement is applied at different levels for different output streams,
2142 * based on resolution. Streams at maximum recording resolution (see {@link android.hardware.camera2.CameraDevice#createCaptureSession }) or below have
2143 * edge enhancement applied, while higher-resolution streams have no edge enhancement
2144 * applied. The level of edge enhancement for low-resolution streams is tuned so that
2145 * frame rate is not impacted, and the quality is equal to or better than FAST (since it
2146 * is only applied to lower-resolution outputs, quality may improve from FAST).</p>
2147 * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode
2148 * with YUV or PRIVATE reprocessing, where the application continuously captures
2149 * high-resolution intermediate buffers into a circular buffer, from which a final image is
2150 * produced via reprocessing when a user takes a picture. For such a use case, the
2151 * high-resolution buffers must not have edge enhancement applied to maximize efficiency of
2152 * preview and to avoid double-applying enhancement when reprocessed, while low-resolution
2153 * buffers (used for recording or preview, generally) need edge enhancement applied for
2154 * reasonable preview quality.</p>
2155 * <p>This mode is guaranteed to be supported by devices that support either the
2156 * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
Chien-Yu Chen72333912015-07-08 11:55:19 -07002157 * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} lists either of those capabilities) and it will
2158 * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002159 *
2160 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2161 * @see CaptureRequest#EDGE_MODE
2162 */
2163 public static final int EDGE_MODE_ZERO_SHUTTER_LAG = 3;
2164
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002165 //
2166 // Enumeration values for CaptureRequest#FLASH_MODE
2167 //
2168
2169 /**
Zhijun He66d065a2014-01-16 18:18:50 -08002170 * <p>Do not fire the flash for this capture.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002171 * @see CaptureRequest#FLASH_MODE
2172 */
2173 public static final int FLASH_MODE_OFF = 0;
2174
2175 /**
Zhijun He66d065a2014-01-16 18:18:50 -08002176 * <p>If the flash is available and charged, fire flash
Zhijun He89492252014-05-23 13:49:59 -07002177 * for this capture.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002178 * @see CaptureRequest#FLASH_MODE
2179 */
2180 public static final int FLASH_MODE_SINGLE = 1;
2181
2182 /**
Zhijun He66d065a2014-01-16 18:18:50 -08002183 * <p>Transition flash to continuously on.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002184 * @see CaptureRequest#FLASH_MODE
2185 */
2186 public static final int FLASH_MODE_TORCH = 2;
2187
2188 //
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002189 // Enumeration values for CaptureRequest#HOT_PIXEL_MODE
2190 //
2191
2192 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002193 * <p>No hot pixel correction is applied.</p>
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002194 * <p>The frame rate must not be reduced relative to sensor raw output
2195 * for this option.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002196 * <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 -08002197 *
2198 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002199 * @see CaptureRequest#HOT_PIXEL_MODE
2200 */
2201 public static final int HOT_PIXEL_MODE_OFF = 0;
2202
2203 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002204 * <p>Hot pixel correction is applied, without reducing frame
2205 * rate relative to sensor raw output.</p>
2206 * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08002207 *
2208 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002209 * @see CaptureRequest#HOT_PIXEL_MODE
2210 */
2211 public static final int HOT_PIXEL_MODE_FAST = 1;
2212
2213 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002214 * <p>High-quality hot pixel correction is applied, at a cost
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07002215 * of possibly reduced frame rate relative to sensor raw output.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002216 * <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 -08002217 *
2218 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002219 * @see CaptureRequest#HOT_PIXEL_MODE
2220 */
2221 public static final int HOT_PIXEL_MODE_HIGH_QUALITY = 2;
2222
2223 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002224 // Enumeration values for CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
2225 //
2226
2227 /**
Ruben Brunk00849b32014-01-17 18:30:23 -08002228 * <p>Optical stabilization is unavailable.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002229 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
2230 */
2231 public static final int LENS_OPTICAL_STABILIZATION_MODE_OFF = 0;
2232
2233 /**
Ruben Brunk00849b32014-01-17 18:30:23 -08002234 * <p>Optical stabilization is enabled.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002235 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
2236 */
2237 public static final int LENS_OPTICAL_STABILIZATION_MODE_ON = 1;
2238
2239 //
2240 // Enumeration values for CaptureRequest#NOISE_REDUCTION_MODE
2241 //
2242
2243 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002244 * <p>No noise reduction is applied.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002245 * @see CaptureRequest#NOISE_REDUCTION_MODE
2246 */
2247 public static final int NOISE_REDUCTION_MODE_OFF = 0;
2248
2249 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002250 * <p>Noise reduction is applied without reducing frame rate relative to sensor
Chien-Yu Chen9c9167e2015-07-14 16:38:25 -07002251 * output. It may be the same as OFF if noise reduction will reduce frame rate
2252 * relative to sensor.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002253 * @see CaptureRequest#NOISE_REDUCTION_MODE
2254 */
2255 public static final int NOISE_REDUCTION_MODE_FAST = 1;
2256
2257 /**
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07002258 * <p>High-quality noise reduction is applied, at the cost of possibly reduced frame
2259 * rate relative to sensor output.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002260 * @see CaptureRequest#NOISE_REDUCTION_MODE
2261 */
2262 public static final int NOISE_REDUCTION_MODE_HIGH_QUALITY = 2;
2263
Zhijun He0e99c222015-01-29 15:26:05 -08002264 /**
2265 * <p>MINIMAL noise reduction is applied without reducing frame rate relative to
2266 * sensor output. </p>
2267 * @see CaptureRequest#NOISE_REDUCTION_MODE
2268 */
2269 public static final int NOISE_REDUCTION_MODE_MINIMAL = 3;
2270
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002271 /**
2272 * <p>Noise reduction is applied at different levels for different output streams,
2273 * based on resolution. Streams at maximum recording resolution (see {@link android.hardware.camera2.CameraDevice#createCaptureSession }) or below have noise
2274 * reduction applied, while higher-resolution streams have MINIMAL (if supported) or no
2275 * noise reduction applied (if MINIMAL is not supported.) The degree of noise reduction
2276 * for low-resolution streams is tuned so that frame rate is not impacted, and the quality
2277 * is equal to or better than FAST (since it is only applied to lower-resolution outputs,
2278 * quality may improve from FAST).</p>
2279 * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode
2280 * with YUV or PRIVATE reprocessing, where the application continuously captures
2281 * high-resolution intermediate buffers into a circular buffer, from which a final image is
2282 * produced via reprocessing when a user takes a picture. For such a use case, the
2283 * high-resolution buffers must not have noise reduction applied to maximize efficiency of
2284 * preview and to avoid over-applying noise filtering when reprocessing, while
2285 * low-resolution buffers (used for recording or preview, generally) need noise reduction
2286 * applied for reasonable preview quality.</p>
2287 * <p>This mode is guaranteed to be supported by devices that support either the
2288 * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
Chien-Yu Chen72333912015-07-08 11:55:19 -07002289 * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} lists either of those capabilities) and it will
2290 * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002291 *
2292 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2293 * @see CaptureRequest#NOISE_REDUCTION_MODE
2294 */
2295 public static final int NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG = 4;
2296
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002297 //
Igor Murashkinc127f052014-01-17 18:06:02 -08002298 // Enumeration values for CaptureRequest#SENSOR_TEST_PATTERN_MODE
2299 //
2300
2301 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002302 * <p>No test pattern mode is used, and the camera
Igor Murashkinc127f052014-01-17 18:06:02 -08002303 * device returns captures from the image sensor.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002304 * <p>This is the default if the key is not set.</p>
Igor Murashkinc127f052014-01-17 18:06:02 -08002305 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2306 */
2307 public static final int SENSOR_TEST_PATTERN_MODE_OFF = 0;
2308
2309 /**
2310 * <p>Each pixel in <code>[R, G_even, G_odd, B]</code> is replaced by its
2311 * respective color channel provided in
2312 * {@link CaptureRequest#SENSOR_TEST_PATTERN_DATA android.sensor.testPatternData}.</p>
2313 * <p>For example:</p>
2314 * <pre><code>android.testPatternData = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0]
2315 * </code></pre>
2316 * <p>All green pixels are 100% green. All red/blue pixels are black.</p>
2317 * <pre><code>android.testPatternData = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0]
2318 * </code></pre>
2319 * <p>All red pixels are 100% red. Only the odd green pixels
2320 * are 100% green. All blue pixels are 100% black.</p>
2321 *
2322 * @see CaptureRequest#SENSOR_TEST_PATTERN_DATA
2323 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2324 */
2325 public static final int SENSOR_TEST_PATTERN_MODE_SOLID_COLOR = 1;
2326
2327 /**
2328 * <p>All pixel data is replaced with an 8-bar color pattern.</p>
2329 * <p>The vertical bars (left-to-right) are as follows:</p>
2330 * <ul>
2331 * <li>100% white</li>
2332 * <li>yellow</li>
2333 * <li>cyan</li>
2334 * <li>green</li>
2335 * <li>magenta</li>
2336 * <li>red</li>
2337 * <li>blue</li>
2338 * <li>black</li>
2339 * </ul>
2340 * <p>In general the image would look like the following:</p>
2341 * <pre><code>W Y C G M R B K
2342 * W Y C G M R B K
2343 * W Y C G M R B K
2344 * W Y C G M R B K
2345 * W Y C G M R B K
2346 * . . . . . . . .
2347 * . . . . . . . .
2348 * . . . . . . . .
2349 *
2350 * (B = Blue, K = Black)
2351 * </code></pre>
2352 * <p>Each bar should take up 1/8 of the sensor pixel array width.
2353 * When this is not possible, the bar size should be rounded
2354 * down to the nearest integer and the pattern can repeat
2355 * on the right side.</p>
2356 * <p>Each bar's height must always take up the full sensor
2357 * pixel array height.</p>
2358 * <p>Each pixel in this test pattern must be set to either
2359 * 0% intensity or 100% intensity.</p>
2360 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2361 */
2362 public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS = 2;
2363
2364 /**
2365 * <p>The test pattern is similar to COLOR_BARS, except that
2366 * each bar should start at its specified color at the top,
2367 * and fade to gray at the bottom.</p>
2368 * <p>Furthermore each bar is further subdivided into a left and
2369 * right half. The left half should have a smooth gradient,
2370 * and the right half should have a quantized gradient.</p>
2371 * <p>In particular, the right half's should consist of blocks of the
2372 * same color for 1/16th active sensor pixel array width.</p>
2373 * <p>The least significant bits in the quantized gradient should
2374 * be copied from the most significant bits of the smooth gradient.</p>
2375 * <p>The height of each bar should always be a multiple of 128.
2376 * When this is not the case, the pattern should repeat at the bottom
2377 * of the image.</p>
2378 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2379 */
2380 public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY = 3;
2381
2382 /**
2383 * <p>All pixel data is replaced by a pseudo-random sequence
2384 * generated from a PN9 512-bit sequence (typically implemented
2385 * in hardware with a linear feedback shift register).</p>
2386 * <p>The generator should be reset at the beginning of each frame,
2387 * and thus each subsequent raw frame with this test pattern should
2388 * be exactly the same as the last.</p>
2389 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2390 */
2391 public static final int SENSOR_TEST_PATTERN_MODE_PN9 = 4;
2392
2393 /**
2394 * <p>The first custom test pattern. All custom patterns that are
2395 * available only on this camera device are at least this numeric
2396 * value.</p>
2397 * <p>All of the custom test patterns will be static
2398 * (that is the raw image must not vary from frame to frame).</p>
2399 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2400 */
2401 public static final int SENSOR_TEST_PATTERN_MODE_CUSTOM1 = 256;
2402
2403 //
Zhijun Heba93fe62014-01-17 16:43:05 -08002404 // Enumeration values for CaptureRequest#SHADING_MODE
2405 //
2406
2407 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002408 * <p>No lens shading correction is applied.</p>
Zhijun Heba93fe62014-01-17 16:43:05 -08002409 * @see CaptureRequest#SHADING_MODE
Zhijun Heba93fe62014-01-17 16:43:05 -08002410 */
2411 public static final int SHADING_MODE_OFF = 0;
2412
2413 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002414 * <p>Apply lens shading corrections, without slowing
2415 * frame rate relative to sensor raw output</p>
Zhijun Heba93fe62014-01-17 16:43:05 -08002416 * @see CaptureRequest#SHADING_MODE
Zhijun Heba93fe62014-01-17 16:43:05 -08002417 */
2418 public static final int SHADING_MODE_FAST = 1;
2419
2420 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002421 * <p>Apply high-quality lens shading correction, at the
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07002422 * cost of possibly reduced frame rate.</p>
Zhijun Heba93fe62014-01-17 16:43:05 -08002423 * @see CaptureRequest#SHADING_MODE
Zhijun Heba93fe62014-01-17 16:43:05 -08002424 */
2425 public static final int SHADING_MODE_HIGH_QUALITY = 2;
2426
2427 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002428 // Enumeration values for CaptureRequest#STATISTICS_FACE_DETECT_MODE
2429 //
2430
2431 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002432 * <p>Do not include face detection statistics in capture
2433 * results.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002434 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
2435 */
2436 public static final int STATISTICS_FACE_DETECT_MODE_OFF = 0;
2437
2438 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002439 * <p>Return face rectangle and confidence values only.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002440 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
2441 */
2442 public static final int STATISTICS_FACE_DETECT_MODE_SIMPLE = 1;
2443
2444 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002445 * <p>Return all face
2446 * metadata.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002447 * <p>In this mode, face rectangles, scores, landmarks, and face IDs are all valid.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002448 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
2449 */
2450 public static final int STATISTICS_FACE_DETECT_MODE_FULL = 2;
2451
2452 //
Eino-Ville Talvalad96748b2013-09-12 11:11:27 -07002453 // Enumeration values for CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
2454 //
2455
2456 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002457 * <p>Do not include a lens shading map in the capture result.</p>
Eino-Ville Talvalad96748b2013-09-12 11:11:27 -07002458 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
2459 */
2460 public static final int STATISTICS_LENS_SHADING_MAP_MODE_OFF = 0;
2461
2462 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002463 * <p>Include a lens shading map in the capture result.</p>
Eino-Ville Talvalad96748b2013-09-12 11:11:27 -07002464 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
2465 */
2466 public static final int STATISTICS_LENS_SHADING_MAP_MODE_ON = 1;
2467
2468 //
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002469 // Enumeration values for CaptureRequest#TONEMAP_MODE
2470 //
2471
2472 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002473 * <p>Use the tone mapping curve specified in
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07002474 * the {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}* entries.</p>
Igor Murashkine0060932014-01-17 17:24:11 -08002475 * <p>All color enhancement and tonemapping must be disabled, except
2476 * for applying the tonemapping curve specified by
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07002477 * {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p>
Igor Murashkine0060932014-01-17 17:24:11 -08002478 * <p>Must not slow down frame rate relative to raw
2479 * sensor output.</p>
2480 *
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07002481 * @see CaptureRequest#TONEMAP_CURVE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002482 * @see CaptureRequest#TONEMAP_MODE
2483 */
2484 public static final int TONEMAP_MODE_CONTRAST_CURVE = 0;
2485
2486 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002487 * <p>Advanced gamma mapping and color enhancement may be applied, without
2488 * reducing frame rate compared to raw sensor output.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002489 * @see CaptureRequest#TONEMAP_MODE
2490 */
2491 public static final int TONEMAP_MODE_FAST = 1;
2492
2493 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002494 * <p>High-quality gamma mapping and color enhancement will be applied, at
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07002495 * the cost of possibly reduced frame rate compared to raw sensor output.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002496 * @see CaptureRequest#TONEMAP_MODE
2497 */
2498 public static final int TONEMAP_MODE_HIGH_QUALITY = 2;
2499
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002500 /**
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002501 * <p>Use the gamma value specified in {@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma} to peform
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002502 * tonemapping.</p>
2503 * <p>All color enhancement and tonemapping must be disabled, except
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002504 * for applying the tonemapping curve specified by {@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma}.</p>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002505 * <p>Must not slow down frame rate relative to raw sensor output.</p>
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002506 *
2507 * @see CaptureRequest#TONEMAP_GAMMA
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002508 * @see CaptureRequest#TONEMAP_MODE
2509 */
2510 public static final int TONEMAP_MODE_GAMMA_VALUE = 3;
2511
2512 /**
2513 * <p>Use the preset tonemapping curve specified in
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002514 * {@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve} to peform tonemapping.</p>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002515 * <p>All color enhancement and tonemapping must be disabled, except
2516 * for applying the tonemapping curve specified by
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002517 * {@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve}.</p>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002518 * <p>Must not slow down frame rate relative to raw sensor output.</p>
Yin-Chia Yeh03d50da2015-05-06 00:10:11 -07002519 *
2520 * @see CaptureRequest#TONEMAP_PRESET_CURVE
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002521 * @see CaptureRequest#TONEMAP_MODE
2522 */
2523 public static final int TONEMAP_MODE_PRESET_CURVE = 4;
2524
2525 //
2526 // Enumeration values for CaptureRequest#TONEMAP_PRESET_CURVE
2527 //
2528
2529 /**
2530 * <p>Tonemapping curve is defined by sRGB</p>
2531 * @see CaptureRequest#TONEMAP_PRESET_CURVE
2532 */
2533 public static final int TONEMAP_PRESET_CURVE_SRGB = 0;
2534
2535 /**
2536 * <p>Tonemapping curve is defined by ITU-R BT.709</p>
2537 * @see CaptureRequest#TONEMAP_PRESET_CURVE
2538 */
2539 public static final int TONEMAP_PRESET_CURVE_REC709 = 1;
2540
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002541 //
2542 // Enumeration values for CaptureResult#CONTROL_AE_STATE
2543 //
2544
2545 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002546 * <p>AE is off or recently reset.</p>
2547 * <p>When a camera device is opened, it starts in
Zhijun He60b19dc2014-02-24 10:19:20 -08002548 * this state. This is a transient state, the camera device may skip reporting
2549 * this state in capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002550 * @see CaptureResult#CONTROL_AE_STATE
2551 */
2552 public static final int CONTROL_AE_STATE_INACTIVE = 0;
2553
2554 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002555 * <p>AE doesn't yet have a good set of control values
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002556 * for the current scene.</p>
2557 * <p>This is a transient state, the camera device may skip
Zhijun He60b19dc2014-02-24 10:19:20 -08002558 * reporting this state in capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002559 * @see CaptureResult#CONTROL_AE_STATE
2560 */
2561 public static final int CONTROL_AE_STATE_SEARCHING = 1;
2562
2563 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002564 * <p>AE has a good set of control values for the
Zhijun He228f4f92014-01-16 17:22:05 -08002565 * current scene.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002566 * @see CaptureResult#CONTROL_AE_STATE
2567 */
2568 public static final int CONTROL_AE_STATE_CONVERGED = 2;
2569
2570 /**
Zhijun He228f4f92014-01-16 17:22:05 -08002571 * <p>AE has been locked.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002572 * @see CaptureResult#CONTROL_AE_STATE
2573 */
2574 public static final int CONTROL_AE_STATE_LOCKED = 3;
2575
2576 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002577 * <p>AE has a good set of control values, but flash
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002578 * needs to be fired for good quality still
Zhijun He228f4f92014-01-16 17:22:05 -08002579 * capture.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002580 * @see CaptureResult#CONTROL_AE_STATE
2581 */
2582 public static final int CONTROL_AE_STATE_FLASH_REQUIRED = 4;
2583
2584 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002585 * <p>AE has been asked to do a precapture sequence
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002586 * and is currently executing it.</p>
2587 * <p>Precapture can be triggered through setting
Zhijun Hefa95b042015-02-09 10:40:49 -08002588 * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} to START. Currently
2589 * active and completed (if it causes camera device internal AE lock) precapture
2590 * metering sequence can be canceled through setting
2591 * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} to CANCEL.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002592 * <p>Once PRECAPTURE completes, AE will transition to CONVERGED
2593 * or FLASH_REQUIRED as appropriate. This is a transient
2594 * state, the camera device may skip reporting this state in
2595 * capture result.</p>
Zhijun He228f4f92014-01-16 17:22:05 -08002596 *
2597 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002598 * @see CaptureResult#CONTROL_AE_STATE
2599 */
2600 public static final int CONTROL_AE_STATE_PRECAPTURE = 5;
2601
2602 //
2603 // Enumeration values for CaptureResult#CONTROL_AF_STATE
2604 //
2605
2606 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002607 * <p>AF is off or has not yet tried to scan/been asked
2608 * to scan.</p>
2609 * <p>When a camera device is opened, it starts in this
2610 * state. This is a transient state, the camera device may
2611 * skip reporting this state in capture
2612 * result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002613 * @see CaptureResult#CONTROL_AF_STATE
2614 */
2615 public static final int CONTROL_AF_STATE_INACTIVE = 0;
2616
2617 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002618 * <p>AF is currently performing an AF scan initiated the
2619 * camera device in a continuous autofocus mode.</p>
2620 * <p>Only used by CONTINUOUS_* AF modes. This is a transient
2621 * state, the camera device may skip reporting this state in
2622 * capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002623 * @see CaptureResult#CONTROL_AF_STATE
2624 */
2625 public static final int CONTROL_AF_STATE_PASSIVE_SCAN = 1;
2626
2627 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002628 * <p>AF currently believes it is in focus, but may
2629 * restart scanning at any time.</p>
2630 * <p>Only used by CONTINUOUS_* AF modes. This is a transient
2631 * state, the camera device may skip reporting this state in
2632 * capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002633 * @see CaptureResult#CONTROL_AF_STATE
2634 */
2635 public static final int CONTROL_AF_STATE_PASSIVE_FOCUSED = 2;
2636
2637 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002638 * <p>AF is performing an AF scan because it was
2639 * triggered by AF trigger.</p>
2640 * <p>Only used by AUTO or MACRO AF modes. This is a transient
2641 * state, the camera device may skip reporting this state in
2642 * capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002643 * @see CaptureResult#CONTROL_AF_STATE
2644 */
2645 public static final int CONTROL_AF_STATE_ACTIVE_SCAN = 3;
2646
2647 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002648 * <p>AF believes it is focused correctly and has locked
2649 * focus.</p>
2650 * <p>This state is reached only after an explicit START AF trigger has been
2651 * sent ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}), when good focus has been obtained.</p>
2652 * <p>The lens will remain stationary until the AF mode ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) is changed or
2653 * a new AF trigger is sent to the camera device ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}).</p>
2654 *
2655 * @see CaptureRequest#CONTROL_AF_MODE
2656 * @see CaptureRequest#CONTROL_AF_TRIGGER
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002657 * @see CaptureResult#CONTROL_AF_STATE
2658 */
2659 public static final int CONTROL_AF_STATE_FOCUSED_LOCKED = 4;
2660
2661 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002662 * <p>AF has failed to focus successfully and has locked
2663 * focus.</p>
2664 * <p>This state is reached only after an explicit START AF trigger has been
2665 * sent ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}), when good focus cannot be obtained.</p>
2666 * <p>The lens will remain stationary until the AF mode ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) is changed or
2667 * a new AF trigger is sent to the camera device ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}).</p>
2668 *
2669 * @see CaptureRequest#CONTROL_AF_MODE
2670 * @see CaptureRequest#CONTROL_AF_TRIGGER
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002671 * @see CaptureResult#CONTROL_AF_STATE
2672 */
2673 public static final int CONTROL_AF_STATE_NOT_FOCUSED_LOCKED = 5;
2674
Eino-Ville Talvala9f880f72013-09-20 17:50:41 -07002675 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002676 * <p>AF finished a passive scan without finding focus,
2677 * and may restart scanning at any time.</p>
2678 * <p>Only used by CONTINUOUS_* AF modes. This is a transient state, the camera
Zhijun He60b19dc2014-02-24 10:19:20 -08002679 * device may skip reporting this state in capture result.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002680 * <p>LEGACY camera devices do not support this state. When a passive
2681 * scan has finished, it will always go to PASSIVE_FOCUSED.</p>
Eino-Ville Talvala9f880f72013-09-20 17:50:41 -07002682 * @see CaptureResult#CONTROL_AF_STATE
2683 */
2684 public static final int CONTROL_AF_STATE_PASSIVE_UNFOCUSED = 6;
2685
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002686 //
2687 // Enumeration values for CaptureResult#CONTROL_AWB_STATE
2688 //
2689
2690 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002691 * <p>AWB is not in auto mode, or has not yet started metering.</p>
2692 * <p>When a camera device is opened, it starts in this
2693 * state. This is a transient state, the camera device may
2694 * skip reporting this state in capture
2695 * result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002696 * @see CaptureResult#CONTROL_AWB_STATE
2697 */
2698 public static final int CONTROL_AWB_STATE_INACTIVE = 0;
2699
2700 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002701 * <p>AWB doesn't yet have a good set of control
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002702 * values for the current scene.</p>
2703 * <p>This is a transient state, the camera device
Zhijun He60b19dc2014-02-24 10:19:20 -08002704 * may skip reporting this state in capture result.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002705 * @see CaptureResult#CONTROL_AWB_STATE
2706 */
2707 public static final int CONTROL_AWB_STATE_SEARCHING = 1;
2708
2709 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002710 * <p>AWB has a good set of control values for the
Zhijun He228f4f92014-01-16 17:22:05 -08002711 * current scene.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002712 * @see CaptureResult#CONTROL_AWB_STATE
2713 */
2714 public static final int CONTROL_AWB_STATE_CONVERGED = 2;
2715
2716 /**
Zhijun He228f4f92014-01-16 17:22:05 -08002717 * <p>AWB has been locked.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002718 * @see CaptureResult#CONTROL_AWB_STATE
2719 */
2720 public static final int CONTROL_AWB_STATE_LOCKED = 3;
2721
2722 //
2723 // Enumeration values for CaptureResult#FLASH_STATE
2724 //
2725
2726 /**
Zhijun He8dda7272014-03-25 13:49:30 -07002727 * <p>No flash on camera.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002728 * @see CaptureResult#FLASH_STATE
2729 */
2730 public static final int FLASH_STATE_UNAVAILABLE = 0;
2731
2732 /**
Zhijun He8dda7272014-03-25 13:49:30 -07002733 * <p>Flash is charging and cannot be fired.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002734 * @see CaptureResult#FLASH_STATE
2735 */
2736 public static final int FLASH_STATE_CHARGING = 1;
2737
2738 /**
Zhijun He8dda7272014-03-25 13:49:30 -07002739 * <p>Flash is ready to fire.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002740 * @see CaptureResult#FLASH_STATE
2741 */
2742 public static final int FLASH_STATE_READY = 2;
2743
2744 /**
Zhijun He8dda7272014-03-25 13:49:30 -07002745 * <p>Flash fired for this capture.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002746 * @see CaptureResult#FLASH_STATE
2747 */
2748 public static final int FLASH_STATE_FIRED = 3;
2749
Zhijun He8dda7272014-03-25 13:49:30 -07002750 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002751 * <p>Flash partially illuminated this frame.</p>
2752 * <p>This is usually due to the next or previous frame having
2753 * the flash fire, and the flash spilling into this capture
Zhijun He8dda7272014-03-25 13:49:30 -07002754 * due to hardware limitations.</p>
2755 * @see CaptureResult#FLASH_STATE
2756 */
2757 public static final int FLASH_STATE_PARTIAL = 4;
2758
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002759 //
2760 // Enumeration values for CaptureResult#LENS_STATE
2761 //
2762
2763 /**
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002764 * <p>The lens parameters ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
2765 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}) are not changing.</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08002766 *
2767 * @see CaptureRequest#LENS_APERTURE
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002768 * @see CaptureRequest#LENS_FILTER_DENSITY
Zhijun Heca1b73a2014-02-03 12:39:53 -08002769 * @see CaptureRequest#LENS_FOCAL_LENGTH
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002770 * @see CaptureRequest#LENS_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002771 * @see CaptureResult#LENS_STATE
2772 */
2773 public static final int LENS_STATE_STATIONARY = 0;
2774
Igor Murashkin9ea4ae62013-09-11 21:40:11 -07002775 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002776 * <p>One or several of the lens parameters
2777 * ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
2778 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} or {@link CaptureRequest#LENS_APERTURE android.lens.aperture}) is
2779 * currently changing.</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08002780 *
2781 * @see CaptureRequest#LENS_APERTURE
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002782 * @see CaptureRequest#LENS_FILTER_DENSITY
Zhijun Heca1b73a2014-02-03 12:39:53 -08002783 * @see CaptureRequest#LENS_FOCAL_LENGTH
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002784 * @see CaptureRequest#LENS_FOCUS_DISTANCE
Igor Murashkin9ea4ae62013-09-11 21:40:11 -07002785 * @see CaptureResult#LENS_STATE
2786 */
2787 public static final int LENS_STATE_MOVING = 1;
2788
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002789 //
2790 // Enumeration values for CaptureResult#STATISTICS_SCENE_FLICKER
2791 //
2792
2793 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002794 * <p>The camera device does not detect any flickering illumination
2795 * in the current scene.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002796 * @see CaptureResult#STATISTICS_SCENE_FLICKER
2797 */
2798 public static final int STATISTICS_SCENE_FLICKER_NONE = 0;
2799
2800 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002801 * <p>The camera device detects illumination flickering at 50Hz
2802 * in the current scene.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002803 * @see CaptureResult#STATISTICS_SCENE_FLICKER
2804 */
2805 public static final int STATISTICS_SCENE_FLICKER_50HZ = 1;
2806
2807 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002808 * <p>The camera device detects illumination flickering at 60Hz
2809 * in the current scene.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002810 * @see CaptureResult#STATISTICS_SCENE_FLICKER
2811 */
2812 public static final int STATISTICS_SCENE_FLICKER_60HZ = 2;
2813
Igor Murashkin3865a842014-01-17 18:18:39 -08002814 //
2815 // Enumeration values for CaptureResult#SYNC_FRAME_NUMBER
2816 //
2817
2818 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002819 * <p>The current result is not yet fully synchronized to any request.</p>
2820 * <p>Synchronization is in progress, and reading metadata from this
Igor Murashkin3865a842014-01-17 18:18:39 -08002821 * result may include a mix of data that have taken effect since the
2822 * last synchronization time.</p>
2823 * <p>In some future result, within {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} frames,
2824 * this value will update to the actual frame number frame number
2825 * the result is guaranteed to be synchronized to (as long as the
2826 * request settings remain constant).</p>
2827 *
2828 * @see CameraCharacteristics#SYNC_MAX_LATENCY
2829 * @see CaptureResult#SYNC_FRAME_NUMBER
2830 * @hide
2831 */
2832 public static final int SYNC_FRAME_NUMBER_CONVERGING = -1;
2833
2834 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002835 * <p>The current result's synchronization status is unknown.</p>
2836 * <p>The result may have already converged, or it may be in
2837 * progress. Reading from this result may include some mix
2838 * of settings from past requests.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08002839 * <p>After a settings change, the new settings will eventually all
2840 * take effect for the output buffers and results. However, this
2841 * value will not change when that happens. Altering settings
2842 * rapidly may provide outcomes using mixes of settings from recent
2843 * requests.</p>
2844 * <p>This value is intended primarily for backwards compatibility with
2845 * the older camera implementations (for android.hardware.Camera).</p>
2846 * @see CaptureResult#SYNC_FRAME_NUMBER
2847 * @hide
2848 */
2849 public static final int SYNC_FRAME_NUMBER_UNKNOWN = -2;
2850
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002851 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
2852 * End generated code
2853 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
2854
Igor Murashkinb519cc52013-07-02 11:23:44 -07002855}