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