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