CameraMetadata.java revision 45fa43a1815e2d0a25ed3a126e4e732a03b7ed7f
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.util.Log;
20
21import java.lang.reflect.Field;
22import java.lang.reflect.Modifier;
23import java.util.ArrayList;
24import java.util.Collections;
25import java.util.List;
26
27/**
28 * The base class for camera controls and information.
29 *
30 * <p>
31 * This class defines the basic key/value map used for querying for camera
32 * characteristics or capture results, and for setting camera request
33 * parameters.
34 * </p>
35 *
36 * <p>
37 * All instances of CameraMetadata are immutable. The list of keys with {@link #getKeys()}
38 * never changes, nor do the values returned by any key with {@code #get} throughout
39 * the lifetime of the object.
40 * </p>
41 *
42 * @see CameraDevice
43 * @see CameraManager
44 * @see CameraCharacteristics
45 **/
46public abstract class CameraMetadata<TKey> {
47
48    private static final String TAG = "CameraMetadataAb";
49    private static final boolean VERBOSE = false;
50
51    /**
52     * Set a camera metadata field to a value. The field definitions can be
53     * found in {@link CameraCharacteristics}, {@link CaptureResult}, and
54     * {@link CaptureRequest}.
55     *
56     * @param key The metadata field to write.
57     * @param value The value to set the field to, which must be of a matching
58     * type to the key.
59     *
60     * @hide
61     */
62    protected CameraMetadata() {
63    }
64
65    /**
66     * Get a camera metadata field value.
67     *
68     * <p>The field definitions can be
69     * found in {@link CameraCharacteristics}, {@link CaptureResult}, and
70     * {@link CaptureRequest}.</p>
71     *
72     * <p>Querying the value for the same key more than once will return a value
73     * which is equal to the previous queried value.</p>
74     *
75     * @throws IllegalArgumentException if the key was not valid
76     *
77     * @param key The metadata field to read.
78     * @return The value of that key, or {@code null} if the field is not set.
79     *
80     * @hide
81     */
82     protected abstract <T> T getProtected(TKey key);
83
84     /**
85      * @hide
86      */
87     protected abstract Class<TKey> getKeyClass();
88
89    /**
90     * Returns a list of the keys contained in this map.
91     *
92     * <p>The list returned is not modifiable, so any attempts to modify it will throw
93     * a {@code UnsupportedOperationException}.</p>
94     *
95     * <p>All values retrieved by a key from this list with {@code #get} are guaranteed to be
96     * non-{@code null}. Each key is only listed once in the list. The order of the keys
97     * is undefined.</p>
98     *
99     * @return List of the keys contained in this map.
100     */
101    @SuppressWarnings("unchecked")
102    public List<TKey> getKeys() {
103        Class<CameraMetadata<TKey>> thisClass = (Class<CameraMetadata<TKey>>) getClass();
104        return Collections.unmodifiableList(getKeysStatic(thisClass, getKeyClass(), this));
105    }
106
107    /**
108     * Return a list of all the Key<?> that are declared as a field inside of the class
109     * {@code type}.
110     *
111     * <p>
112     * Optionally, if {@code instance} is not null, then filter out any keys with null values.
113     * </p>
114     */
115     /*package*/ @SuppressWarnings("unchecked")
116    static <TKey> ArrayList<TKey> getKeysStatic(
117             Class<?> type, Class<TKey> keyClass,
118             CameraMetadata<TKey> instance) {
119
120        if (VERBOSE) Log.v(TAG, "getKeysStatic for " + type);
121
122        ArrayList<TKey> keyList = new ArrayList<TKey>();
123
124        Field[] fields = type.getDeclaredFields();
125        for (Field field : fields) {
126            // Filter for Keys that are public
127            if (field.getType().isAssignableFrom(keyClass) &&
128                    (field.getModifiers() & Modifier.PUBLIC) != 0) {
129
130                TKey key;
131                try {
132                    key = (TKey) field.get(instance);
133                } catch (IllegalAccessException e) {
134                    throw new AssertionError("Can't get IllegalAccessException", e);
135                } catch (IllegalArgumentException e) {
136                    throw new AssertionError("Can't get IllegalArgumentException", e);
137                }
138
139                if (instance == null || instance.getProtected(key) != null) {
140                    keyList.add(key);
141                }
142            }
143        }
144
145        return keyList;
146    }
147
148    /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
149     * The enum values below this point are generated from metadata
150     * definitions in /system/media/camera/docs. Do not modify by hand or
151     * modify the comment blocks at the start or end.
152     *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
153
154    //
155    // Enumeration values for CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
156    //
157
158    /**
159     * <p>The lens focus distance is not accurate, and the units used for
160     * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} do not correspond to any physical units.</p>
161     * <p>Setting the lens to the same focus distance on separate occasions may
162     * result in a different real focus distance, depending on factors such
163     * as the orientation of the device, the age of the focusing mechanism,
164     * and the device temperature. The focus distance value will still be
165     * in the range of <code>[0, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code>, where 0
166     * represents the farthest focus.</p>
167     *
168     * @see CaptureRequest#LENS_FOCUS_DISTANCE
169     * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
170     * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
171     */
172    public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED = 0;
173
174    /**
175     * <p>The lens focus distance is measured in diopters.</p>
176     * <p>However, setting the lens to the same focus distance
177     * on separate occasions may result in a different real
178     * focus distance, depending on factors such as the
179     * orientation of the device, the age of the focusing
180     * mechanism, and the device temperature.</p>
181     * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
182     */
183    public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE = 1;
184
185    /**
186     * <p>The lens focus distance is measured in diopters, and
187     * is calibrated.</p>
188     * <p>The lens mechanism is calibrated so that setting the
189     * same focus distance is repeatable on multiple
190     * occasions with good accuracy, and the focus distance
191     * corresponds to the real physical distance to the plane
192     * of best focus.</p>
193     * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
194     */
195    public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED = 2;
196
197    //
198    // Enumeration values for CameraCharacteristics#LENS_FACING
199    //
200
201    /**
202     * <p>The camera device faces the same direction as the device's screen.</p>
203     * @see CameraCharacteristics#LENS_FACING
204     */
205    public static final int LENS_FACING_FRONT = 0;
206
207    /**
208     * <p>The camera device faces the opposite direction as the device's screen.</p>
209     * @see CameraCharacteristics#LENS_FACING
210     */
211    public static final int LENS_FACING_BACK = 1;
212
213    //
214    // Enumeration values for CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
215    //
216
217    /**
218     * <p>The minimal set of capabilities that every camera
219     * device (regardless of {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel})
220     * will support.</p>
221     * <p>The full set of features supported by this capability makes
222     * the camera2 api backwards compatible with the camera1
223     * (android.hardware.Camera) API.</p>
224     *
225     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
226     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
227     * @hide
228     */
229    public static final int REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE = 0;
230
231    /**
232     * <p>This is a catch-all capability to include all other
233     * tags or functionality not encapsulated by one of the other
234     * capabilities.</p>
235     * <p>A typical example is all tags marked 'optional'.</p>
236     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
237     * @hide
238     */
239    public static final int REQUEST_AVAILABLE_CAPABILITIES_OPTIONAL = 1;
240
241    /**
242     * <p>The camera device can be manually controlled (3A algorithms such
243     * as auto-exposure, and auto-focus can be bypassed).
244     * The camera device supports basic manual control of the sensor image
245     * acquisition related stages. This means the following controls are
246     * guaranteed to be supported:</p>
247     * <ul>
248     * <li>Manual frame duration control<ul>
249     * <li>{@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}</li>
250     * <li>{@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li>
251     * <li>{@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}</li>
252     * </ul>
253     * </li>
254     * <li>Manual exposure control<ul>
255     * <li>{@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</li>
256     * <li>{@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
257     * </ul>
258     * </li>
259     * <li>Manual sensitivity control<ul>
260     * <li>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</li>
261     * <li>{@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</li>
262     * </ul>
263     * </li>
264     * <li>Manual lens control (if the lens is adjustable)<ul>
265     * <li>android.lens.*</li>
266     * </ul>
267     * </li>
268     * <li>Manual flash control (if a flash unit is present)<ul>
269     * <li>android.flash.*</li>
270     * </ul>
271     * </li>
272     * <li>Manual black level locking<ul>
273     * <li>{@link CaptureRequest#BLACK_LEVEL_LOCK android.blackLevel.lock}</li>
274     * </ul>
275     * </li>
276     * </ul>
277     * <p>If any of the above 3A algorithms are enabled, then the camera
278     * device will accurately report the values applied by 3A in the
279     * result.</p>
280     * <p>A given camera device may also support additional manual sensor controls,
281     * but this capability only covers the above list of controls.</p>
282     *
283     * @see CaptureRequest#BLACK_LEVEL_LOCK
284     * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
285     * @see CaptureRequest#SENSOR_EXPOSURE_TIME
286     * @see CaptureRequest#SENSOR_FRAME_DURATION
287     * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
288     * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
289     * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
290     * @see CaptureRequest#SENSOR_SENSITIVITY
291     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
292     */
293    public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR = 2;
294
295    /**
296     * <p>The camera device post-processing stages can be manually controlled.
297     * The camera device supports basic manual control of the image post-processing
298     * stages. This means the following controls are guaranteed to be supported:</p>
299     * <ul>
300     * <li>Manual tonemap control<ul>
301     * <li>{@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}</li>
302     * <li>{@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</li>
303     * <li>{@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</li>
304     * </ul>
305     * </li>
306     * <li>Manual white balance control<ul>
307     * <li>{@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}</li>
308     * <li>{@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}</li>
309     * </ul>
310     * </li>
311     * <li>Lens shading map information<ul>
312     * <li>android.statistics.lensShadingMap</li>
313     * <li>android.lens.info.shadingMapSize</li>
314     * </ul>
315     * </li>
316     * </ul>
317     * <p>If auto white balance is enabled, then the camera device
318     * will accurately report the values applied by AWB in the result.</p>
319     * <p>A given camera device may also support additional post-processing
320     * controls, but this capability only covers the above list of controls.</p>
321     *
322     * @see CaptureRequest#COLOR_CORRECTION_GAINS
323     * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
324     * @see CaptureRequest#TONEMAP_CURVE
325     * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
326     * @see CaptureRequest#TONEMAP_MODE
327     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
328     */
329    public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING = 3;
330
331    /**
332     * <p>The camera device supports the Zero Shutter Lag use case.</p>
333     * <ul>
334     * <li>At least one input stream can be used.</li>
335     * <li>RAW_OPAQUE is supported as an output/input format</li>
336     * <li>Using RAW_OPAQUE does not cause a frame rate drop
337     * relative to the sensor's maximum capture rate (at that
338     * resolution).</li>
339     * <li>RAW_OPAQUE will be reprocessable into both YUV_420_888
340     * and JPEG formats.</li>
341     * <li>The maximum available resolution for RAW_OPAQUE streams
342     * (both input/output) will match the maximum available
343     * resolution of JPEG streams.</li>
344     * </ul>
345     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
346     * @hide
347     */
348    public static final int REQUEST_AVAILABLE_CAPABILITIES_ZSL = 4;
349
350    /**
351     * <p>The camera device supports outputting RAW buffers that can be
352     * saved offline into a DNG format. It can reprocess DNG
353     * files (produced from the same camera device) back into YUV.</p>
354     * <ul>
355     * <li>At least one input stream can be used.</li>
356     * <li>RAW16 is supported as output/input format.</li>
357     * <li>RAW16 is reprocessable into both YUV_420_888 and JPEG
358     * formats.</li>
359     * <li>The maximum available resolution for RAW16 streams (both
360     * input/output) will match either the value in
361     * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize} or
362     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</li>
363     * <li>All DNG-related optional metadata entries are provided
364     * by the camera device.</li>
365     * </ul>
366     *
367     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
368     * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
369     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
370     */
371    public static final int REQUEST_AVAILABLE_CAPABILITIES_DNG = 5;
372
373    //
374    // Enumeration values for CameraCharacteristics#SCALER_CROPPING_TYPE
375    //
376
377    /**
378     * <p>The camera device only supports centered crop regions.</p>
379     * @see CameraCharacteristics#SCALER_CROPPING_TYPE
380     */
381    public static final int SCALER_CROPPING_TYPE_CENTER_ONLY = 0;
382
383    /**
384     * <p>The camera device supports arbitrarily chosen crop regions.</p>
385     * @see CameraCharacteristics#SCALER_CROPPING_TYPE
386     */
387    public static final int SCALER_CROPPING_TYPE_FREEFORM = 1;
388
389    //
390    // Enumeration values for CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
391    //
392
393    /**
394     * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
395     */
396    public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB = 0;
397
398    /**
399     * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
400     */
401    public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG = 1;
402
403    /**
404     * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
405     */
406    public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG = 2;
407
408    /**
409     * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
410     */
411    public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR = 3;
412
413    /**
414     * <p>Sensor is not Bayer; output has 3 16-bit
415     * values for each pixel, instead of just 1 16-bit value
416     * per pixel.</p>
417     * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
418     */
419    public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB = 4;
420
421    //
422    // Enumeration values for CameraCharacteristics#SENSOR_INFO_TIMESTAMP_CALIBRATION
423    //
424
425    /**
426     * <p>Timestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in nanoseconds and monotonic,
427     * but can not be compared to timestamps from other subsystems
428     * (e.g. accelerometer, gyro etc.), or other instances of the same or different
429     * camera devices in the same system. Timestamps between streams and results for
430     * a single camera instance are comparable, and the timestamps for all buffers
431     * and the result metadata generated by a single capture are identical.</p>
432     *
433     * @see CaptureResult#SENSOR_TIMESTAMP
434     * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_CALIBRATION
435     */
436    public static final int SENSOR_INFO_TIMESTAMP_CALIBRATION_UNCALIBRATED = 0;
437
438    /**
439     * <p>Timestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in the same timebase as
440     * android.os.SystemClock#elapsedRealtimeNanos(),
441     * and they can be compared to other timestamps using that base.</p>
442     *
443     * @see CaptureResult#SENSOR_TIMESTAMP
444     * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_CALIBRATION
445     */
446    public static final int SENSOR_INFO_TIMESTAMP_CALIBRATION_CALIBRATED = 1;
447
448    //
449    // Enumeration values for CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
450    //
451
452    /**
453     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
454     */
455    public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT = 1;
456
457    /**
458     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
459     */
460    public static final int SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT = 2;
461
462    /**
463     * <p>Incandescent light</p>
464     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
465     */
466    public static final int SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN = 3;
467
468    /**
469     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
470     */
471    public static final int SENSOR_REFERENCE_ILLUMINANT1_FLASH = 4;
472
473    /**
474     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
475     */
476    public static final int SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER = 9;
477
478    /**
479     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
480     */
481    public static final int SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER = 10;
482
483    /**
484     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
485     */
486    public static final int SENSOR_REFERENCE_ILLUMINANT1_SHADE = 11;
487
488    /**
489     * <p>D 5700 - 7100K</p>
490     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
491     */
492    public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT = 12;
493
494    /**
495     * <p>N 4600 - 5400K</p>
496     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
497     */
498    public static final int SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT = 13;
499
500    /**
501     * <p>W 3900 - 4500K</p>
502     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
503     */
504    public static final int SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT = 14;
505
506    /**
507     * <p>WW 3200 - 3700K</p>
508     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
509     */
510    public static final int SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT = 15;
511
512    /**
513     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
514     */
515    public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A = 17;
516
517    /**
518     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
519     */
520    public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B = 18;
521
522    /**
523     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
524     */
525    public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C = 19;
526
527    /**
528     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
529     */
530    public static final int SENSOR_REFERENCE_ILLUMINANT1_D55 = 20;
531
532    /**
533     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
534     */
535    public static final int SENSOR_REFERENCE_ILLUMINANT1_D65 = 21;
536
537    /**
538     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
539     */
540    public static final int SENSOR_REFERENCE_ILLUMINANT1_D75 = 22;
541
542    /**
543     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
544     */
545    public static final int SENSOR_REFERENCE_ILLUMINANT1_D50 = 23;
546
547    /**
548     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
549     */
550    public static final int SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN = 24;
551
552    //
553    // Enumeration values for CameraCharacteristics#LED_AVAILABLE_LEDS
554    //
555
556    /**
557     * <p>android.led.transmit control is used.</p>
558     * @see CameraCharacteristics#LED_AVAILABLE_LEDS
559     * @hide
560     */
561    public static final int LED_AVAILABLE_LEDS_TRANSMIT = 0;
562
563    //
564    // Enumeration values for CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
565    //
566
567    /**
568     * <p>This camera device has only limited capabilities.</p>
569     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
570     */
571    public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0;
572
573    /**
574     * <p>This camera device is capable of supporting advanced imaging
575     * applications.</p>
576     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
577     */
578    public static final int INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1;
579
580    //
581    // Enumeration values for CameraCharacteristics#SYNC_MAX_LATENCY
582    //
583
584    /**
585     * <p>Every frame has the requests immediately applied.</p>
586     * <p>Furthermore for all results,
587     * <code>android.sync.frameNumber == android.request.frameCount</code></p>
588     * <p>Changing controls over multiple requests one after another will
589     * produce results that have those controls applied atomically
590     * each frame.</p>
591     * <p>All FULL capability devices will have this as their maxLatency.</p>
592     * @see CameraCharacteristics#SYNC_MAX_LATENCY
593     */
594    public static final int SYNC_MAX_LATENCY_PER_FRAME_CONTROL = 0;
595
596    /**
597     * <p>Each new frame has some subset (potentially the entire set)
598     * of the past requests applied to the camera settings.</p>
599     * <p>By submitting a series of identical requests, the camera device
600     * will eventually have the camera settings applied, but it is
601     * unknown when that exact point will be.</p>
602     * @see CameraCharacteristics#SYNC_MAX_LATENCY
603     */
604    public static final int SYNC_MAX_LATENCY_UNKNOWN = -1;
605
606    //
607    // Enumeration values for CaptureRequest#COLOR_CORRECTION_MODE
608    //
609
610    /**
611     * <p>Use the {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} matrix
612     * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} to do color conversion.</p>
613     * <p>All advanced white balance adjustments (not specified
614     * by our white balance pipeline) must be disabled.</p>
615     * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
616     * TRANSFORM_MATRIX is ignored. The camera device will override
617     * this value to either FAST or HIGH_QUALITY.</p>
618     *
619     * @see CaptureRequest#COLOR_CORRECTION_GAINS
620     * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
621     * @see CaptureRequest#CONTROL_AWB_MODE
622     * @see CaptureRequest#COLOR_CORRECTION_MODE
623     */
624    public static final int COLOR_CORRECTION_MODE_TRANSFORM_MATRIX = 0;
625
626    /**
627     * <p>Color correction processing must not slow down
628     * capture rate relative to sensor raw output.</p>
629     * <p>Advanced white balance adjustments above and beyond
630     * the specified white balance pipeline may be applied.</p>
631     * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
632     * the camera device uses the last frame's AWB values
633     * (or defaults if AWB has never been run).</p>
634     *
635     * @see CaptureRequest#CONTROL_AWB_MODE
636     * @see CaptureRequest#COLOR_CORRECTION_MODE
637     */
638    public static final int COLOR_CORRECTION_MODE_FAST = 1;
639
640    /**
641     * <p>Color correction processing operates at improved
642     * quality but reduced capture rate (relative to sensor raw
643     * output).</p>
644     * <p>Advanced white balance adjustments above and beyond
645     * the specified white balance pipeline may be applied.</p>
646     * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
647     * the camera device uses the last frame's AWB values
648     * (or defaults if AWB has never been run).</p>
649     *
650     * @see CaptureRequest#CONTROL_AWB_MODE
651     * @see CaptureRequest#COLOR_CORRECTION_MODE
652     */
653    public static final int COLOR_CORRECTION_MODE_HIGH_QUALITY = 2;
654
655    //
656    // Enumeration values for CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
657    //
658
659    /**
660     * <p>The camera device will not adjust exposure duration to
661     * avoid banding problems.</p>
662     * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
663     */
664    public static final int CONTROL_AE_ANTIBANDING_MODE_OFF = 0;
665
666    /**
667     * <p>The camera device will adjust exposure duration to
668     * avoid banding problems with 50Hz illumination sources.</p>
669     * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
670     */
671    public static final int CONTROL_AE_ANTIBANDING_MODE_50HZ = 1;
672
673    /**
674     * <p>The camera device will adjust exposure duration to
675     * avoid banding problems with 60Hz illumination
676     * sources.</p>
677     * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
678     */
679    public static final int CONTROL_AE_ANTIBANDING_MODE_60HZ = 2;
680
681    /**
682     * <p>The camera device will automatically adapt its
683     * antibanding routine to the current illumination
684     * conditions. This is the default.</p>
685     * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
686     */
687    public static final int CONTROL_AE_ANTIBANDING_MODE_AUTO = 3;
688
689    //
690    // Enumeration values for CaptureRequest#CONTROL_AE_MODE
691    //
692
693    /**
694     * <p>The camera device's autoexposure routine is disabled.</p>
695     * <p>The application-selected {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
696     * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} and
697     * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are used by the camera
698     * device, along with android.flash.* fields, if there's
699     * a flash unit for this camera device.</p>
700     *
701     * @see CaptureRequest#SENSOR_EXPOSURE_TIME
702     * @see CaptureRequest#SENSOR_FRAME_DURATION
703     * @see CaptureRequest#SENSOR_SENSITIVITY
704     * @see CaptureRequest#CONTROL_AE_MODE
705     */
706    public static final int CONTROL_AE_MODE_OFF = 0;
707
708    /**
709     * <p>The camera device's autoexposure routine is active,
710     * with no flash control.</p>
711     * <p>The application's values for
712     * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
713     * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and
714     * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are ignored. The
715     * application has control over the various
716     * android.flash.* fields.</p>
717     *
718     * @see CaptureRequest#SENSOR_EXPOSURE_TIME
719     * @see CaptureRequest#SENSOR_FRAME_DURATION
720     * @see CaptureRequest#SENSOR_SENSITIVITY
721     * @see CaptureRequest#CONTROL_AE_MODE
722     */
723    public static final int CONTROL_AE_MODE_ON = 1;
724
725    /**
726     * <p>Like ON, except that the camera device also controls
727     * the camera's flash unit, firing it in low-light
728     * conditions.</p>
729     * <p>The flash may be fired during a precapture sequence
730     * (triggered by {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and
731     * may be fired for captures for which the
732     * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to
733     * STILL_CAPTURE</p>
734     *
735     * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
736     * @see CaptureRequest#CONTROL_CAPTURE_INTENT
737     * @see CaptureRequest#CONTROL_AE_MODE
738     */
739    public static final int CONTROL_AE_MODE_ON_AUTO_FLASH = 2;
740
741    /**
742     * <p>Like ON, except that the camera device also controls
743     * the camera's flash unit, always firing it for still
744     * captures.</p>
745     * <p>The flash may be fired during a precapture sequence
746     * (triggered by {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and
747     * will always be fired for captures for which the
748     * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to
749     * STILL_CAPTURE</p>
750     *
751     * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
752     * @see CaptureRequest#CONTROL_CAPTURE_INTENT
753     * @see CaptureRequest#CONTROL_AE_MODE
754     */
755    public static final int CONTROL_AE_MODE_ON_ALWAYS_FLASH = 3;
756
757    /**
758     * <p>Like ON_AUTO_FLASH, but with automatic red eye
759     * reduction.</p>
760     * <p>If deemed necessary by the camera device, a red eye
761     * reduction flash will fire during the precapture
762     * sequence.</p>
763     * @see CaptureRequest#CONTROL_AE_MODE
764     */
765    public static final int CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE = 4;
766
767    //
768    // Enumeration values for CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
769    //
770
771    /**
772     * <p>The trigger is idle.</p>
773     * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
774     */
775    public static final int CONTROL_AE_PRECAPTURE_TRIGGER_IDLE = 0;
776
777    /**
778     * <p>The precapture metering sequence will be started
779     * by the camera device.</p>
780     * <p>The exact effect of the precapture trigger depends on
781     * the current AE mode and state.</p>
782     * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
783     */
784    public static final int CONTROL_AE_PRECAPTURE_TRIGGER_START = 1;
785
786    //
787    // Enumeration values for CaptureRequest#CONTROL_AF_MODE
788    //
789
790    /**
791     * <p>The auto-focus routine does not control the lens;
792     * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} is controlled by the
793     * application.</p>
794     *
795     * @see CaptureRequest#LENS_FOCUS_DISTANCE
796     * @see CaptureRequest#CONTROL_AF_MODE
797     */
798    public static final int CONTROL_AF_MODE_OFF = 0;
799
800    /**
801     * <p>Basic automatic focus mode.</p>
802     * <p>In this mode, the lens does not move unless
803     * the autofocus trigger action is called. When that trigger
804     * is activated, AF will transition to ACTIVE_SCAN, then to
805     * the outcome of the scan (FOCUSED or NOT_FOCUSED).</p>
806     * <p>Always supported if lens is not fixed focus.</p>
807     * <p>Use {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} to determine if lens
808     * is fixed-focus.</p>
809     * <p>Triggering AF_CANCEL resets the lens position to default,
810     * and sets the AF state to INACTIVE.</p>
811     *
812     * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
813     * @see CaptureRequest#CONTROL_AF_MODE
814     */
815    public static final int CONTROL_AF_MODE_AUTO = 1;
816
817    /**
818     * <p>Close-up focusing mode.</p>
819     * <p>In this mode, the lens does not move unless the
820     * autofocus trigger action is called. When that trigger is
821     * activated, AF will transition to ACTIVE_SCAN, then to
822     * the outcome of the scan (FOCUSED or NOT_FOCUSED). This
823     * mode is optimized for focusing on objects very close to
824     * the camera.</p>
825     * <p>When that trigger is activated, AF will transition to
826     * ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or
827     * NOT_FOCUSED). Triggering cancel AF resets the lens
828     * position to default, and sets the AF state to
829     * INACTIVE.</p>
830     * @see CaptureRequest#CONTROL_AF_MODE
831     */
832    public static final int CONTROL_AF_MODE_MACRO = 2;
833
834    /**
835     * <p>In this mode, the AF algorithm modifies the lens
836     * position continually to attempt to provide a
837     * constantly-in-focus image stream.</p>
838     * <p>The focusing behavior should be suitable for good quality
839     * video recording; typically this means slower focus
840     * movement and no overshoots. When the AF trigger is not
841     * involved, the AF algorithm should start in INACTIVE state,
842     * and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED
843     * states as appropriate. When the AF trigger is activated,
844     * the algorithm should immediately transition into
845     * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
846     * lens position until a cancel AF trigger is received.</p>
847     * <p>Once cancel is received, the algorithm should transition
848     * back to INACTIVE and resume passive scan. Note that this
849     * behavior is not identical to CONTINUOUS_PICTURE, since an
850     * ongoing PASSIVE_SCAN must immediately be
851     * canceled.</p>
852     * @see CaptureRequest#CONTROL_AF_MODE
853     */
854    public static final int CONTROL_AF_MODE_CONTINUOUS_VIDEO = 3;
855
856    /**
857     * <p>In this mode, the AF algorithm modifies the lens
858     * position continually to attempt to provide a
859     * constantly-in-focus image stream.</p>
860     * <p>The focusing behavior should be suitable for still image
861     * capture; typically this means focusing as fast as
862     * possible. When the AF trigger is not involved, the AF
863     * algorithm should start in INACTIVE state, and then
864     * transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as
865     * appropriate as it attempts to maintain focus. When the AF
866     * trigger is activated, the algorithm should finish its
867     * PASSIVE_SCAN if active, and then transition into
868     * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
869     * lens position until a cancel AF trigger is received.</p>
870     * <p>When the AF cancel trigger is activated, the algorithm
871     * should transition back to INACTIVE and then act as if it
872     * has just been started.</p>
873     * @see CaptureRequest#CONTROL_AF_MODE
874     */
875    public static final int CONTROL_AF_MODE_CONTINUOUS_PICTURE = 4;
876
877    /**
878     * <p>Extended depth of field (digital focus) mode.</p>
879     * <p>The camera device will produce images with an extended
880     * depth of field automatically; no special focusing
881     * operations need to be done before taking a picture.</p>
882     * <p>AF triggers are ignored, and the AF state will always be
883     * INACTIVE.</p>
884     * @see CaptureRequest#CONTROL_AF_MODE
885     */
886    public static final int CONTROL_AF_MODE_EDOF = 5;
887
888    //
889    // Enumeration values for CaptureRequest#CONTROL_AF_TRIGGER
890    //
891
892    /**
893     * <p>The trigger is idle.</p>
894     * @see CaptureRequest#CONTROL_AF_TRIGGER
895     */
896    public static final int CONTROL_AF_TRIGGER_IDLE = 0;
897
898    /**
899     * <p>Autofocus will trigger now.</p>
900     * @see CaptureRequest#CONTROL_AF_TRIGGER
901     */
902    public static final int CONTROL_AF_TRIGGER_START = 1;
903
904    /**
905     * <p>Autofocus will return to its initial
906     * state, and cancel any currently active trigger.</p>
907     * @see CaptureRequest#CONTROL_AF_TRIGGER
908     */
909    public static final int CONTROL_AF_TRIGGER_CANCEL = 2;
910
911    //
912    // Enumeration values for CaptureRequest#CONTROL_AWB_MODE
913    //
914
915    /**
916     * <p>The camera device's auto-white balance routine is disabled.</p>
917     * <p>The application-selected color transform matrix
918     * ({@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}) and gains
919     * ({@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}) are used by the camera
920     * device for manual white balance control.</p>
921     *
922     * @see CaptureRequest#COLOR_CORRECTION_GAINS
923     * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
924     * @see CaptureRequest#CONTROL_AWB_MODE
925     */
926    public static final int CONTROL_AWB_MODE_OFF = 0;
927
928    /**
929     * <p>The camera device's auto-white balance routine is active.</p>
930     * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
931     * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
932     * For devices that support the MANUAL_POST_PROCESSING capability, the
933     * values used by the camera device for the transform and gains
934     * will be available in the capture result for this request.</p>
935     *
936     * @see CaptureRequest#COLOR_CORRECTION_GAINS
937     * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
938     * @see CaptureRequest#CONTROL_AWB_MODE
939     */
940    public static final int CONTROL_AWB_MODE_AUTO = 1;
941
942    /**
943     * <p>The camera device's auto-white balance routine is disabled;
944     * the camera device uses incandescent light as the assumed scene
945     * illumination for white balance.</p>
946     * <p>While the exact white balance transforms are up to the
947     * camera device, they will approximately match the CIE
948     * standard illuminant A.</p>
949     * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
950     * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
951     * For devices that support the MANUAL_POST_PROCESSING capability, the
952     * values used by the camera device for the transform and gains
953     * will be available in the capture result for this request.</p>
954     *
955     * @see CaptureRequest#COLOR_CORRECTION_GAINS
956     * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
957     * @see CaptureRequest#CONTROL_AWB_MODE
958     */
959    public static final int CONTROL_AWB_MODE_INCANDESCENT = 2;
960
961    /**
962     * <p>The camera device's auto-white balance routine is disabled;
963     * the camera device uses fluorescent light as the assumed scene
964     * illumination for white balance.</p>
965     * <p>While the exact white balance transforms are up to the
966     * camera device, they will approximately match the CIE
967     * standard illuminant F2.</p>
968     * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
969     * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
970     * For devices that support the MANUAL_POST_PROCESSING capability, the
971     * values used by the camera device for the transform and gains
972     * will be available in the capture result for this request.</p>
973     *
974     * @see CaptureRequest#COLOR_CORRECTION_GAINS
975     * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
976     * @see CaptureRequest#CONTROL_AWB_MODE
977     */
978    public static final int CONTROL_AWB_MODE_FLUORESCENT = 3;
979
980    /**
981     * <p>The camera device's auto-white balance routine is disabled;
982     * the camera device uses warm fluorescent light as the assumed scene
983     * illumination for white balance.</p>
984     * <p>While the exact white balance transforms are up to the
985     * camera device, they will approximately match the CIE
986     * standard illuminant F4.</p>
987     * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
988     * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
989     * For devices that support the MANUAL_POST_PROCESSING capability, the
990     * values used by the camera device for the transform and gains
991     * will be available in the capture result for this request.</p>
992     *
993     * @see CaptureRequest#COLOR_CORRECTION_GAINS
994     * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
995     * @see CaptureRequest#CONTROL_AWB_MODE
996     */
997    public static final int CONTROL_AWB_MODE_WARM_FLUORESCENT = 4;
998
999    /**
1000     * <p>The camera device's auto-white balance routine is disabled;
1001     * the camera device uses daylight light as the assumed scene
1002     * illumination for white balance.</p>
1003     * <p>While the exact white balance transforms are up to the
1004     * camera device, they will approximately match the CIE
1005     * standard illuminant D65.</p>
1006     * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1007     * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1008     * For devices that support the MANUAL_POST_PROCESSING capability, the
1009     * values used by the camera device for the transform and gains
1010     * will be available in the capture result for this request.</p>
1011     *
1012     * @see CaptureRequest#COLOR_CORRECTION_GAINS
1013     * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1014     * @see CaptureRequest#CONTROL_AWB_MODE
1015     */
1016    public static final int CONTROL_AWB_MODE_DAYLIGHT = 5;
1017
1018    /**
1019     * <p>The camera device's auto-white balance routine is disabled;
1020     * the camera device uses cloudy daylight light as the assumed scene
1021     * illumination for white balance.</p>
1022     * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1023     * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1024     * For devices that support the MANUAL_POST_PROCESSING capability, the
1025     * values used by the camera device for the transform and gains
1026     * will be available in the capture result for this request.</p>
1027     *
1028     * @see CaptureRequest#COLOR_CORRECTION_GAINS
1029     * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1030     * @see CaptureRequest#CONTROL_AWB_MODE
1031     */
1032    public static final int CONTROL_AWB_MODE_CLOUDY_DAYLIGHT = 6;
1033
1034    /**
1035     * <p>The camera device's auto-white balance routine is disabled;
1036     * the camera device uses twilight light as the assumed scene
1037     * illumination for white balance.</p>
1038     * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1039     * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1040     * For devices that support the MANUAL_POST_PROCESSING capability, the
1041     * values used by the camera device for the transform and gains
1042     * will be available in the capture result for this request.</p>
1043     *
1044     * @see CaptureRequest#COLOR_CORRECTION_GAINS
1045     * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1046     * @see CaptureRequest#CONTROL_AWB_MODE
1047     */
1048    public static final int CONTROL_AWB_MODE_TWILIGHT = 7;
1049
1050    /**
1051     * <p>The camera device's auto-white balance routine is disabled;
1052     * the camera device uses shade light as the assumed scene
1053     * illumination for white balance.</p>
1054     * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1055     * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1056     * For devices that support the MANUAL_POST_PROCESSING capability, the
1057     * values used by the camera device for the transform and gains
1058     * will be available in the capture result for this request.</p>
1059     *
1060     * @see CaptureRequest#COLOR_CORRECTION_GAINS
1061     * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1062     * @see CaptureRequest#CONTROL_AWB_MODE
1063     */
1064    public static final int CONTROL_AWB_MODE_SHADE = 8;
1065
1066    //
1067    // Enumeration values for CaptureRequest#CONTROL_CAPTURE_INTENT
1068    //
1069
1070    /**
1071     * <p>The goal of this request doesn't fall into the other
1072     * categories. The camera device will default to preview-like
1073     * behavior.</p>
1074     * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1075     */
1076    public static final int CONTROL_CAPTURE_INTENT_CUSTOM = 0;
1077
1078    /**
1079     * <p>This request is for a preview-like use case.</p>
1080     * <p>The precapture trigger may be used to start off a metering
1081     * w/flash sequence.</p>
1082     * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1083     */
1084    public static final int CONTROL_CAPTURE_INTENT_PREVIEW = 1;
1085
1086    /**
1087     * <p>This request is for a still capture-type
1088     * use case.</p>
1089     * <p>If the flash unit is under automatic control, it may fire as needed.</p>
1090     * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1091     */
1092    public static final int CONTROL_CAPTURE_INTENT_STILL_CAPTURE = 2;
1093
1094    /**
1095     * <p>This request is for a video recording
1096     * use case.</p>
1097     * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1098     */
1099    public static final int CONTROL_CAPTURE_INTENT_VIDEO_RECORD = 3;
1100
1101    /**
1102     * <p>This request is for a video snapshot (still
1103     * image while recording video) use case.</p>
1104     * <p>The camera device should take the highest-quality image
1105     * possible (given the other settings) without disrupting the
1106     * frame rate of video recording.<br />
1107     * </p>
1108     * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1109     */
1110    public static final int CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT = 4;
1111
1112    /**
1113     * <p>This request is for a ZSL usecase; the
1114     * application will stream full-resolution images and
1115     * reprocess one or several later for a final
1116     * capture.</p>
1117     * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1118     */
1119    public static final int CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG = 5;
1120
1121    /**
1122     * <p>This request is for manual capture use case where
1123     * the applications want to directly control the capture parameters.</p>
1124     * <p>For example, the application may wish to manually control
1125     * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, etc.</p>
1126     *
1127     * @see CaptureRequest#SENSOR_EXPOSURE_TIME
1128     * @see CaptureRequest#SENSOR_SENSITIVITY
1129     * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1130     */
1131    public static final int CONTROL_CAPTURE_INTENT_MANUAL = 6;
1132
1133    //
1134    // Enumeration values for CaptureRequest#CONTROL_EFFECT_MODE
1135    //
1136
1137    /**
1138     * <p>No color effect will be applied.</p>
1139     * @see CaptureRequest#CONTROL_EFFECT_MODE
1140     */
1141    public static final int CONTROL_EFFECT_MODE_OFF = 0;
1142
1143    /**
1144     * <p>A "monocolor" effect where the image is mapped into
1145     * a single color.</p>
1146     * <p>This will typically be grayscale.</p>
1147     * @see CaptureRequest#CONTROL_EFFECT_MODE
1148     */
1149    public static final int CONTROL_EFFECT_MODE_MONO = 1;
1150
1151    /**
1152     * <p>A "photo-negative" effect where the image's colors
1153     * are inverted.</p>
1154     * @see CaptureRequest#CONTROL_EFFECT_MODE
1155     */
1156    public static final int CONTROL_EFFECT_MODE_NEGATIVE = 2;
1157
1158    /**
1159     * <p>A "solarisation" effect (Sabattier effect) where the
1160     * image is wholly or partially reversed in
1161     * tone.</p>
1162     * @see CaptureRequest#CONTROL_EFFECT_MODE
1163     */
1164    public static final int CONTROL_EFFECT_MODE_SOLARIZE = 3;
1165
1166    /**
1167     * <p>A "sepia" effect where the image is mapped into warm
1168     * gray, red, and brown tones.</p>
1169     * @see CaptureRequest#CONTROL_EFFECT_MODE
1170     */
1171    public static final int CONTROL_EFFECT_MODE_SEPIA = 4;
1172
1173    /**
1174     * <p>A "posterization" effect where the image uses
1175     * discrete regions of tone rather than a continuous
1176     * gradient of tones.</p>
1177     * @see CaptureRequest#CONTROL_EFFECT_MODE
1178     */
1179    public static final int CONTROL_EFFECT_MODE_POSTERIZE = 5;
1180
1181    /**
1182     * <p>A "whiteboard" effect where the image is typically displayed
1183     * as regions of white, with black or grey details.</p>
1184     * @see CaptureRequest#CONTROL_EFFECT_MODE
1185     */
1186    public static final int CONTROL_EFFECT_MODE_WHITEBOARD = 6;
1187
1188    /**
1189     * <p>A "blackboard" effect where the image is typically displayed
1190     * as regions of black, with white or grey details.</p>
1191     * @see CaptureRequest#CONTROL_EFFECT_MODE
1192     */
1193    public static final int CONTROL_EFFECT_MODE_BLACKBOARD = 7;
1194
1195    /**
1196     * <p>An "aqua" effect where a blue hue is added to the image.</p>
1197     * @see CaptureRequest#CONTROL_EFFECT_MODE
1198     */
1199    public static final int CONTROL_EFFECT_MODE_AQUA = 8;
1200
1201    //
1202    // Enumeration values for CaptureRequest#CONTROL_MODE
1203    //
1204
1205    /**
1206     * <p>Full application control of pipeline.</p>
1207     * <p>All control by the device's metering and focusing (3A)
1208     * routines is disabled, and no other settings in
1209     * android.control.* have any effect, except that
1210     * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} may be used by the camera
1211     * device to select post-processing values for processing
1212     * blocks that do not allow for manual control, or are not
1213     * exposed by the camera API.</p>
1214     * <p>However, the camera device's 3A routines may continue to
1215     * collect statistics and update their internal state so that
1216     * when control is switched to AUTO mode, good control values
1217     * can be immediately applied.</p>
1218     *
1219     * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1220     * @see CaptureRequest#CONTROL_MODE
1221     */
1222    public static final int CONTROL_MODE_OFF = 0;
1223
1224    /**
1225     * <p>Use settings for each individual 3A routine.</p>
1226     * <p>Manual control of capture parameters is disabled. All
1227     * controls in android.control.* besides sceneMode take
1228     * effect.</p>
1229     * @see CaptureRequest#CONTROL_MODE
1230     */
1231    public static final int CONTROL_MODE_AUTO = 1;
1232
1233    /**
1234     * <p>Use a specific scene mode.</p>
1235     * <p>Enabling this disables control.aeMode, control.awbMode and
1236     * control.afMode controls; the camera device will ignore
1237     * those settings while USE_SCENE_MODE is active (except for
1238     * FACE_PRIORITY scene mode). Other control entries are still
1239     * active.  This setting can only be used if scene mode is
1240     * supported (i.e. {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}
1241     * contain some modes other than DISABLED).</p>
1242     *
1243     * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES
1244     * @see CaptureRequest#CONTROL_MODE
1245     */
1246    public static final int CONTROL_MODE_USE_SCENE_MODE = 2;
1247
1248    /**
1249     * <p>Same as OFF mode, except that this capture will not be
1250     * used by camera device background auto-exposure, auto-white balance and
1251     * auto-focus algorithms (3A) to update their statistics.</p>
1252     * <p>Specifically, the 3A routines are locked to the last
1253     * values set from a request with AUTO, OFF, or
1254     * USE_SCENE_MODE, and any statistics or state updates
1255     * collected from manual captures with OFF_KEEP_STATE will be
1256     * discarded by the camera device.</p>
1257     * @see CaptureRequest#CONTROL_MODE
1258     */
1259    public static final int CONTROL_MODE_OFF_KEEP_STATE = 3;
1260
1261    //
1262    // Enumeration values for CaptureRequest#CONTROL_SCENE_MODE
1263    //
1264
1265    /**
1266     * <p>Indicates that no scene modes are set for a given capture request.</p>
1267     * @see CaptureRequest#CONTROL_SCENE_MODE
1268     */
1269    public static final int CONTROL_SCENE_MODE_DISABLED = 0;
1270
1271    /**
1272     * <p>If face detection support exists, use face
1273     * detection data for auto-focus, auto-white balance, and
1274     * auto-exposure routines.</p>
1275     * <p>If face detection statistics are disabled
1276     * (i.e. {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} is set to OFF),
1277     * this should still operate correctly (but will not return
1278     * face detection statistics to the framework).</p>
1279     * <p>Unlike the other scene modes, {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode},
1280     * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}
1281     * remain active when FACE_PRIORITY is set.</p>
1282     *
1283     * @see CaptureRequest#CONTROL_AE_MODE
1284     * @see CaptureRequest#CONTROL_AF_MODE
1285     * @see CaptureRequest#CONTROL_AWB_MODE
1286     * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
1287     * @see CaptureRequest#CONTROL_SCENE_MODE
1288     */
1289    public static final int CONTROL_SCENE_MODE_FACE_PRIORITY = 1;
1290
1291    /**
1292     * <p>Optimized for photos of quickly moving objects.</p>
1293     * <p>Similar to SPORTS.</p>
1294     * @see CaptureRequest#CONTROL_SCENE_MODE
1295     */
1296    public static final int CONTROL_SCENE_MODE_ACTION = 2;
1297
1298    /**
1299     * <p>Optimized for still photos of people.</p>
1300     * @see CaptureRequest#CONTROL_SCENE_MODE
1301     */
1302    public static final int CONTROL_SCENE_MODE_PORTRAIT = 3;
1303
1304    /**
1305     * <p>Optimized for photos of distant macroscopic objects.</p>
1306     * @see CaptureRequest#CONTROL_SCENE_MODE
1307     */
1308    public static final int CONTROL_SCENE_MODE_LANDSCAPE = 4;
1309
1310    /**
1311     * <p>Optimized for low-light settings.</p>
1312     * @see CaptureRequest#CONTROL_SCENE_MODE
1313     */
1314    public static final int CONTROL_SCENE_MODE_NIGHT = 5;
1315
1316    /**
1317     * <p>Optimized for still photos of people in low-light
1318     * settings.</p>
1319     * @see CaptureRequest#CONTROL_SCENE_MODE
1320     */
1321    public static final int CONTROL_SCENE_MODE_NIGHT_PORTRAIT = 6;
1322
1323    /**
1324     * <p>Optimized for dim, indoor settings where flash must
1325     * remain off.</p>
1326     * @see CaptureRequest#CONTROL_SCENE_MODE
1327     */
1328    public static final int CONTROL_SCENE_MODE_THEATRE = 7;
1329
1330    /**
1331     * <p>Optimized for bright, outdoor beach settings.</p>
1332     * @see CaptureRequest#CONTROL_SCENE_MODE
1333     */
1334    public static final int CONTROL_SCENE_MODE_BEACH = 8;
1335
1336    /**
1337     * <p>Optimized for bright, outdoor settings containing snow.</p>
1338     * @see CaptureRequest#CONTROL_SCENE_MODE
1339     */
1340    public static final int CONTROL_SCENE_MODE_SNOW = 9;
1341
1342    /**
1343     * <p>Optimized for scenes of the setting sun.</p>
1344     * @see CaptureRequest#CONTROL_SCENE_MODE
1345     */
1346    public static final int CONTROL_SCENE_MODE_SUNSET = 10;
1347
1348    /**
1349     * <p>Optimized to avoid blurry photos due to small amounts of
1350     * device motion (for example: due to hand shake).</p>
1351     * @see CaptureRequest#CONTROL_SCENE_MODE
1352     */
1353    public static final int CONTROL_SCENE_MODE_STEADYPHOTO = 11;
1354
1355    /**
1356     * <p>Optimized for nighttime photos of fireworks.</p>
1357     * @see CaptureRequest#CONTROL_SCENE_MODE
1358     */
1359    public static final int CONTROL_SCENE_MODE_FIREWORKS = 12;
1360
1361    /**
1362     * <p>Optimized for photos of quickly moving people.</p>
1363     * <p>Similar to ACTION.</p>
1364     * @see CaptureRequest#CONTROL_SCENE_MODE
1365     */
1366    public static final int CONTROL_SCENE_MODE_SPORTS = 13;
1367
1368    /**
1369     * <p>Optimized for dim, indoor settings with multiple moving
1370     * people.</p>
1371     * @see CaptureRequest#CONTROL_SCENE_MODE
1372     */
1373    public static final int CONTROL_SCENE_MODE_PARTY = 14;
1374
1375    /**
1376     * <p>Optimized for dim settings where the main light source
1377     * is a flame.</p>
1378     * @see CaptureRequest#CONTROL_SCENE_MODE
1379     */
1380    public static final int CONTROL_SCENE_MODE_CANDLELIGHT = 15;
1381
1382    /**
1383     * <p>Optimized for accurately capturing a photo of barcode
1384     * for use by camera applications that wish to read the
1385     * barcode value.</p>
1386     * @see CaptureRequest#CONTROL_SCENE_MODE
1387     */
1388    public static final int CONTROL_SCENE_MODE_BARCODE = 16;
1389
1390    //
1391    // Enumeration values for CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
1392    //
1393
1394    /**
1395     * <p>Video stabilization is disabled.</p>
1396     * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
1397     */
1398    public static final int CONTROL_VIDEO_STABILIZATION_MODE_OFF = 0;
1399
1400    /**
1401     * <p>Video stabilization is enabled.</p>
1402     * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
1403     */
1404    public static final int CONTROL_VIDEO_STABILIZATION_MODE_ON = 1;
1405
1406    //
1407    // Enumeration values for CaptureRequest#EDGE_MODE
1408    //
1409
1410    /**
1411     * <p>No edge enhancement is applied.</p>
1412     * @see CaptureRequest#EDGE_MODE
1413     */
1414    public static final int EDGE_MODE_OFF = 0;
1415
1416    /**
1417     * <p>Apply edge enhancement at a quality level that does not slow down frame rate relative to sensor
1418     * output</p>
1419     * @see CaptureRequest#EDGE_MODE
1420     */
1421    public static final int EDGE_MODE_FAST = 1;
1422
1423    /**
1424     * <p>Apply high-quality edge enhancement, at a cost of reducing output frame rate.</p>
1425     * @see CaptureRequest#EDGE_MODE
1426     */
1427    public static final int EDGE_MODE_HIGH_QUALITY = 2;
1428
1429    //
1430    // Enumeration values for CaptureRequest#FLASH_MODE
1431    //
1432
1433    /**
1434     * <p>Do not fire the flash for this capture.</p>
1435     * @see CaptureRequest#FLASH_MODE
1436     */
1437    public static final int FLASH_MODE_OFF = 0;
1438
1439    /**
1440     * <p>If the flash is available and charged, fire flash
1441     * for this capture.</p>
1442     * @see CaptureRequest#FLASH_MODE
1443     */
1444    public static final int FLASH_MODE_SINGLE = 1;
1445
1446    /**
1447     * <p>Transition flash to continuously on.</p>
1448     * @see CaptureRequest#FLASH_MODE
1449     */
1450    public static final int FLASH_MODE_TORCH = 2;
1451
1452    //
1453    // Enumeration values for CaptureRequest#HOT_PIXEL_MODE
1454    //
1455
1456    /**
1457     * <p>No hot pixel correction is applied.</p>
1458     * <p>The frame rate must not be reduced relative to sensor raw output
1459     * for this option.</p>
1460     * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p>
1461     *
1462     * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
1463     * @see CaptureRequest#HOT_PIXEL_MODE
1464     */
1465    public static final int HOT_PIXEL_MODE_OFF = 0;
1466
1467    /**
1468     * <p>Hot pixel correction is applied, without reducing frame
1469     * rate relative to sensor raw output.</p>
1470     * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p>
1471     *
1472     * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
1473     * @see CaptureRequest#HOT_PIXEL_MODE
1474     */
1475    public static final int HOT_PIXEL_MODE_FAST = 1;
1476
1477    /**
1478     * <p>High-quality hot pixel correction is applied, at a cost
1479     * of reducing frame rate relative to sensor raw output.</p>
1480     * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p>
1481     *
1482     * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
1483     * @see CaptureRequest#HOT_PIXEL_MODE
1484     */
1485    public static final int HOT_PIXEL_MODE_HIGH_QUALITY = 2;
1486
1487    //
1488    // Enumeration values for CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
1489    //
1490
1491    /**
1492     * <p>Optical stabilization is unavailable.</p>
1493     * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
1494     */
1495    public static final int LENS_OPTICAL_STABILIZATION_MODE_OFF = 0;
1496
1497    /**
1498     * <p>Optical stabilization is enabled.</p>
1499     * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
1500     */
1501    public static final int LENS_OPTICAL_STABILIZATION_MODE_ON = 1;
1502
1503    //
1504    // Enumeration values for CaptureRequest#NOISE_REDUCTION_MODE
1505    //
1506
1507    /**
1508     * <p>No noise reduction is applied.</p>
1509     * @see CaptureRequest#NOISE_REDUCTION_MODE
1510     */
1511    public static final int NOISE_REDUCTION_MODE_OFF = 0;
1512
1513    /**
1514     * <p>Noise reduction is applied without reducing frame rate relative to sensor
1515     * output.</p>
1516     * @see CaptureRequest#NOISE_REDUCTION_MODE
1517     */
1518    public static final int NOISE_REDUCTION_MODE_FAST = 1;
1519
1520    /**
1521     * <p>High-quality noise reduction is applied, at the cost of reducing frame rate
1522     * relative to sensor output.</p>
1523     * @see CaptureRequest#NOISE_REDUCTION_MODE
1524     */
1525    public static final int NOISE_REDUCTION_MODE_HIGH_QUALITY = 2;
1526
1527    //
1528    // Enumeration values for CaptureRequest#SENSOR_TEST_PATTERN_MODE
1529    //
1530
1531    /**
1532     * <p>No test pattern mode is used, and the camera
1533     * device returns captures from the image sensor.</p>
1534     * <p>This is the default if the key is not set.</p>
1535     * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1536     */
1537    public static final int SENSOR_TEST_PATTERN_MODE_OFF = 0;
1538
1539    /**
1540     * <p>Each pixel in <code>[R, G_even, G_odd, B]</code> is replaced by its
1541     * respective color channel provided in
1542     * {@link CaptureRequest#SENSOR_TEST_PATTERN_DATA android.sensor.testPatternData}.</p>
1543     * <p>For example:</p>
1544     * <pre><code>android.testPatternData = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0]
1545     * </code></pre>
1546     * <p>All green pixels are 100% green. All red/blue pixels are black.</p>
1547     * <pre><code>android.testPatternData = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0]
1548     * </code></pre>
1549     * <p>All red pixels are 100% red. Only the odd green pixels
1550     * are 100% green. All blue pixels are 100% black.</p>
1551     *
1552     * @see CaptureRequest#SENSOR_TEST_PATTERN_DATA
1553     * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1554     */
1555    public static final int SENSOR_TEST_PATTERN_MODE_SOLID_COLOR = 1;
1556
1557    /**
1558     * <p>All pixel data is replaced with an 8-bar color pattern.</p>
1559     * <p>The vertical bars (left-to-right) are as follows:</p>
1560     * <ul>
1561     * <li>100% white</li>
1562     * <li>yellow</li>
1563     * <li>cyan</li>
1564     * <li>green</li>
1565     * <li>magenta</li>
1566     * <li>red</li>
1567     * <li>blue</li>
1568     * <li>black</li>
1569     * </ul>
1570     * <p>In general the image would look like the following:</p>
1571     * <pre><code>W Y C G M R B K
1572     * W Y C G M R B K
1573     * W Y C G M R B K
1574     * W Y C G M R B K
1575     * W Y C G M R B K
1576     * . . . . . . . .
1577     * . . . . . . . .
1578     * . . . . . . . .
1579     *
1580     * (B = Blue, K = Black)
1581     * </code></pre>
1582     * <p>Each bar should take up 1/8 of the sensor pixel array width.
1583     * When this is not possible, the bar size should be rounded
1584     * down to the nearest integer and the pattern can repeat
1585     * on the right side.</p>
1586     * <p>Each bar's height must always take up the full sensor
1587     * pixel array height.</p>
1588     * <p>Each pixel in this test pattern must be set to either
1589     * 0% intensity or 100% intensity.</p>
1590     * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1591     */
1592    public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS = 2;
1593
1594    /**
1595     * <p>The test pattern is similar to COLOR_BARS, except that
1596     * each bar should start at its specified color at the top,
1597     * and fade to gray at the bottom.</p>
1598     * <p>Furthermore each bar is further subdivided into a left and
1599     * right half. The left half should have a smooth gradient,
1600     * and the right half should have a quantized gradient.</p>
1601     * <p>In particular, the right half's should consist of blocks of the
1602     * same color for 1/16th active sensor pixel array width.</p>
1603     * <p>The least significant bits in the quantized gradient should
1604     * be copied from the most significant bits of the smooth gradient.</p>
1605     * <p>The height of each bar should always be a multiple of 128.
1606     * When this is not the case, the pattern should repeat at the bottom
1607     * of the image.</p>
1608     * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1609     */
1610    public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY = 3;
1611
1612    /**
1613     * <p>All pixel data is replaced by a pseudo-random sequence
1614     * generated from a PN9 512-bit sequence (typically implemented
1615     * in hardware with a linear feedback shift register).</p>
1616     * <p>The generator should be reset at the beginning of each frame,
1617     * and thus each subsequent raw frame with this test pattern should
1618     * be exactly the same as the last.</p>
1619     * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1620     */
1621    public static final int SENSOR_TEST_PATTERN_MODE_PN9 = 4;
1622
1623    /**
1624     * <p>The first custom test pattern. All custom patterns that are
1625     * available only on this camera device are at least this numeric
1626     * value.</p>
1627     * <p>All of the custom test patterns will be static
1628     * (that is the raw image must not vary from frame to frame).</p>
1629     * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1630     */
1631    public static final int SENSOR_TEST_PATTERN_MODE_CUSTOM1 = 256;
1632
1633    //
1634    // Enumeration values for CaptureRequest#SHADING_MODE
1635    //
1636
1637    /**
1638     * <p>No lens shading correction is applied.</p>
1639     * @see CaptureRequest#SHADING_MODE
1640     */
1641    public static final int SHADING_MODE_OFF = 0;
1642
1643    /**
1644     * <p>Apply lens shading corrections, without slowing
1645     * frame rate relative to sensor raw output</p>
1646     * @see CaptureRequest#SHADING_MODE
1647     */
1648    public static final int SHADING_MODE_FAST = 1;
1649
1650    /**
1651     * <p>Apply high-quality lens shading correction, at the
1652     * cost of reduced frame rate.</p>
1653     * @see CaptureRequest#SHADING_MODE
1654     */
1655    public static final int SHADING_MODE_HIGH_QUALITY = 2;
1656
1657    //
1658    // Enumeration values for CaptureRequest#STATISTICS_FACE_DETECT_MODE
1659    //
1660
1661    /**
1662     * <p>Do not include face detection statistics in capture
1663     * results.</p>
1664     * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
1665     */
1666    public static final int STATISTICS_FACE_DETECT_MODE_OFF = 0;
1667
1668    /**
1669     * <p>Return face rectangle and confidence values only.</p>
1670     * <p>In this mode, only android.statistics.faceRectangles and
1671     * android.statistics.faceScores outputs are valid.</p>
1672     * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
1673     */
1674    public static final int STATISTICS_FACE_DETECT_MODE_SIMPLE = 1;
1675
1676    /**
1677     * <p>Return all face
1678     * metadata.</p>
1679     * <p>In this mode,
1680     * android.statistics.faceRectangles,
1681     * android.statistics.faceScores,
1682     * android.statistics.faceIds, and
1683     * android.statistics.faceLandmarks outputs are valid.</p>
1684     * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
1685     */
1686    public static final int STATISTICS_FACE_DETECT_MODE_FULL = 2;
1687
1688    //
1689    // Enumeration values for CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
1690    //
1691
1692    /**
1693     * <p>Do not include a lens shading map in the capture result.</p>
1694     * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
1695     */
1696    public static final int STATISTICS_LENS_SHADING_MAP_MODE_OFF = 0;
1697
1698    /**
1699     * <p>Include a lens shading map in the capture result.</p>
1700     * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
1701     */
1702    public static final int STATISTICS_LENS_SHADING_MAP_MODE_ON = 1;
1703
1704    //
1705    // Enumeration values for CaptureRequest#TONEMAP_MODE
1706    //
1707
1708    /**
1709     * <p>Use the tone mapping curve specified in
1710     * the {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}* entries.</p>
1711     * <p>All color enhancement and tonemapping must be disabled, except
1712     * for applying the tonemapping curve specified by
1713     * {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p>
1714     * <p>Must not slow down frame rate relative to raw
1715     * sensor output.</p>
1716     *
1717     * @see CaptureRequest#TONEMAP_CURVE
1718     * @see CaptureRequest#TONEMAP_MODE
1719     */
1720    public static final int TONEMAP_MODE_CONTRAST_CURVE = 0;
1721
1722    /**
1723     * <p>Advanced gamma mapping and color enhancement may be applied, without
1724     * reducing frame rate compared to raw sensor output.</p>
1725     * @see CaptureRequest#TONEMAP_MODE
1726     */
1727    public static final int TONEMAP_MODE_FAST = 1;
1728
1729    /**
1730     * <p>High-quality gamma mapping and color enhancement will be applied, at
1731     * the cost of reduced frame rate compared to raw sensor output.</p>
1732     * @see CaptureRequest#TONEMAP_MODE
1733     */
1734    public static final int TONEMAP_MODE_HIGH_QUALITY = 2;
1735
1736    //
1737    // Enumeration values for CaptureResult#CONTROL_AE_STATE
1738    //
1739
1740    /**
1741     * <p>AE is off or recently reset.</p>
1742     * <p>When a camera device is opened, it starts in
1743     * this state. This is a transient state, the camera device may skip reporting
1744     * this state in capture result.</p>
1745     * @see CaptureResult#CONTROL_AE_STATE
1746     */
1747    public static final int CONTROL_AE_STATE_INACTIVE = 0;
1748
1749    /**
1750     * <p>AE doesn't yet have a good set of control values
1751     * for the current scene.</p>
1752     * <p>This is a transient state, the camera device may skip
1753     * reporting this state in capture result.</p>
1754     * @see CaptureResult#CONTROL_AE_STATE
1755     */
1756    public static final int CONTROL_AE_STATE_SEARCHING = 1;
1757
1758    /**
1759     * <p>AE has a good set of control values for the
1760     * current scene.</p>
1761     * @see CaptureResult#CONTROL_AE_STATE
1762     */
1763    public static final int CONTROL_AE_STATE_CONVERGED = 2;
1764
1765    /**
1766     * <p>AE has been locked.</p>
1767     * @see CaptureResult#CONTROL_AE_STATE
1768     */
1769    public static final int CONTROL_AE_STATE_LOCKED = 3;
1770
1771    /**
1772     * <p>AE has a good set of control values, but flash
1773     * needs to be fired for good quality still
1774     * capture.</p>
1775     * @see CaptureResult#CONTROL_AE_STATE
1776     */
1777    public static final int CONTROL_AE_STATE_FLASH_REQUIRED = 4;
1778
1779    /**
1780     * <p>AE has been asked to do a precapture sequence
1781     * and is currently executing it.</p>
1782     * <p>Precapture can be triggered through setting
1783     * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} to START.</p>
1784     * <p>Once PRECAPTURE completes, AE will transition to CONVERGED
1785     * or FLASH_REQUIRED as appropriate. This is a transient
1786     * state, the camera device may skip reporting this state in
1787     * capture result.</p>
1788     *
1789     * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1790     * @see CaptureResult#CONTROL_AE_STATE
1791     */
1792    public static final int CONTROL_AE_STATE_PRECAPTURE = 5;
1793
1794    //
1795    // Enumeration values for CaptureResult#CONTROL_AF_STATE
1796    //
1797
1798    /**
1799     * <p>AF is off or has not yet tried to scan/been asked
1800     * to scan.</p>
1801     * <p>When a camera device is opened, it starts in this
1802     * state. This is a transient state, the camera device may
1803     * skip reporting this state in capture
1804     * result.</p>
1805     * @see CaptureResult#CONTROL_AF_STATE
1806     */
1807    public static final int CONTROL_AF_STATE_INACTIVE = 0;
1808
1809    /**
1810     * <p>AF is currently performing an AF scan initiated the
1811     * camera device in a continuous autofocus mode.</p>
1812     * <p>Only used by CONTINUOUS_* AF modes. This is a transient
1813     * state, the camera device may skip reporting this state in
1814     * capture result.</p>
1815     * @see CaptureResult#CONTROL_AF_STATE
1816     */
1817    public static final int CONTROL_AF_STATE_PASSIVE_SCAN = 1;
1818
1819    /**
1820     * <p>AF currently believes it is in focus, but may
1821     * restart scanning at any time.</p>
1822     * <p>Only used by CONTINUOUS_* AF modes. This is a transient
1823     * state, the camera device may skip reporting this state in
1824     * capture result.</p>
1825     * @see CaptureResult#CONTROL_AF_STATE
1826     */
1827    public static final int CONTROL_AF_STATE_PASSIVE_FOCUSED = 2;
1828
1829    /**
1830     * <p>AF is performing an AF scan because it was
1831     * triggered by AF trigger.</p>
1832     * <p>Only used by AUTO or MACRO AF modes. This is a transient
1833     * state, the camera device may skip reporting this state in
1834     * capture result.</p>
1835     * @see CaptureResult#CONTROL_AF_STATE
1836     */
1837    public static final int CONTROL_AF_STATE_ACTIVE_SCAN = 3;
1838
1839    /**
1840     * <p>AF believes it is focused correctly and has locked
1841     * focus.</p>
1842     * <p>This state is reached only after an explicit START AF trigger has been
1843     * sent ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}), when good focus has been obtained.</p>
1844     * <p>The lens will remain stationary until the AF mode ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) is changed or
1845     * a new AF trigger is sent to the camera device ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}).</p>
1846     *
1847     * @see CaptureRequest#CONTROL_AF_MODE
1848     * @see CaptureRequest#CONTROL_AF_TRIGGER
1849     * @see CaptureResult#CONTROL_AF_STATE
1850     */
1851    public static final int CONTROL_AF_STATE_FOCUSED_LOCKED = 4;
1852
1853    /**
1854     * <p>AF has failed to focus successfully and has locked
1855     * focus.</p>
1856     * <p>This state is reached only after an explicit START AF trigger has been
1857     * sent ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}), when good focus cannot be obtained.</p>
1858     * <p>The lens will remain stationary until the AF mode ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) is changed or
1859     * a new AF trigger is sent to the camera device ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}).</p>
1860     *
1861     * @see CaptureRequest#CONTROL_AF_MODE
1862     * @see CaptureRequest#CONTROL_AF_TRIGGER
1863     * @see CaptureResult#CONTROL_AF_STATE
1864     */
1865    public static final int CONTROL_AF_STATE_NOT_FOCUSED_LOCKED = 5;
1866
1867    /**
1868     * <p>AF finished a passive scan without finding focus,
1869     * and may restart scanning at any time.</p>
1870     * <p>Only used by CONTINUOUS_* AF modes. This is a transient state, the camera
1871     * device may skip reporting this state in capture result.</p>
1872     * @see CaptureResult#CONTROL_AF_STATE
1873     */
1874    public static final int CONTROL_AF_STATE_PASSIVE_UNFOCUSED = 6;
1875
1876    //
1877    // Enumeration values for CaptureResult#CONTROL_AWB_STATE
1878    //
1879
1880    /**
1881     * <p>AWB is not in auto mode, or has not yet started metering.</p>
1882     * <p>When a camera device is opened, it starts in this
1883     * state. This is a transient state, the camera device may
1884     * skip reporting this state in capture
1885     * result.</p>
1886     * @see CaptureResult#CONTROL_AWB_STATE
1887     */
1888    public static final int CONTROL_AWB_STATE_INACTIVE = 0;
1889
1890    /**
1891     * <p>AWB doesn't yet have a good set of control
1892     * values for the current scene.</p>
1893     * <p>This is a transient state, the camera device
1894     * may skip reporting this state in capture result.</p>
1895     * @see CaptureResult#CONTROL_AWB_STATE
1896     */
1897    public static final int CONTROL_AWB_STATE_SEARCHING = 1;
1898
1899    /**
1900     * <p>AWB has a good set of control values for the
1901     * current scene.</p>
1902     * @see CaptureResult#CONTROL_AWB_STATE
1903     */
1904    public static final int CONTROL_AWB_STATE_CONVERGED = 2;
1905
1906    /**
1907     * <p>AWB has been locked.</p>
1908     * @see CaptureResult#CONTROL_AWB_STATE
1909     */
1910    public static final int CONTROL_AWB_STATE_LOCKED = 3;
1911
1912    //
1913    // Enumeration values for CaptureResult#FLASH_STATE
1914    //
1915
1916    /**
1917     * <p>No flash on camera.</p>
1918     * @see CaptureResult#FLASH_STATE
1919     */
1920    public static final int FLASH_STATE_UNAVAILABLE = 0;
1921
1922    /**
1923     * <p>Flash is charging and cannot be fired.</p>
1924     * @see CaptureResult#FLASH_STATE
1925     */
1926    public static final int FLASH_STATE_CHARGING = 1;
1927
1928    /**
1929     * <p>Flash is ready to fire.</p>
1930     * @see CaptureResult#FLASH_STATE
1931     */
1932    public static final int FLASH_STATE_READY = 2;
1933
1934    /**
1935     * <p>Flash fired for this capture.</p>
1936     * @see CaptureResult#FLASH_STATE
1937     */
1938    public static final int FLASH_STATE_FIRED = 3;
1939
1940    /**
1941     * <p>Flash partially illuminated this frame.</p>
1942     * <p>This is usually due to the next or previous frame having
1943     * the flash fire, and the flash spilling into this capture
1944     * due to hardware limitations.</p>
1945     * @see CaptureResult#FLASH_STATE
1946     */
1947    public static final int FLASH_STATE_PARTIAL = 4;
1948
1949    //
1950    // Enumeration values for CaptureResult#LENS_STATE
1951    //
1952
1953    /**
1954     * <p>The lens parameters ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
1955     * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}) are not changing.</p>
1956     *
1957     * @see CaptureRequest#LENS_APERTURE
1958     * @see CaptureRequest#LENS_FILTER_DENSITY
1959     * @see CaptureRequest#LENS_FOCAL_LENGTH
1960     * @see CaptureRequest#LENS_FOCUS_DISTANCE
1961     * @see CaptureResult#LENS_STATE
1962     */
1963    public static final int LENS_STATE_STATIONARY = 0;
1964
1965    /**
1966     * <p>One or several of the lens parameters
1967     * ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
1968     * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} or {@link CaptureRequest#LENS_APERTURE android.lens.aperture}) is
1969     * currently changing.</p>
1970     *
1971     * @see CaptureRequest#LENS_APERTURE
1972     * @see CaptureRequest#LENS_FILTER_DENSITY
1973     * @see CaptureRequest#LENS_FOCAL_LENGTH
1974     * @see CaptureRequest#LENS_FOCUS_DISTANCE
1975     * @see CaptureResult#LENS_STATE
1976     */
1977    public static final int LENS_STATE_MOVING = 1;
1978
1979    //
1980    // Enumeration values for CaptureResult#STATISTICS_SCENE_FLICKER
1981    //
1982
1983    /**
1984     * <p>The camera device does not detect any flickering illumination
1985     * in the current scene.</p>
1986     * @see CaptureResult#STATISTICS_SCENE_FLICKER
1987     */
1988    public static final int STATISTICS_SCENE_FLICKER_NONE = 0;
1989
1990    /**
1991     * <p>The camera device detects illumination flickering at 50Hz
1992     * in the current scene.</p>
1993     * @see CaptureResult#STATISTICS_SCENE_FLICKER
1994     */
1995    public static final int STATISTICS_SCENE_FLICKER_50HZ = 1;
1996
1997    /**
1998     * <p>The camera device detects illumination flickering at 60Hz
1999     * in the current scene.</p>
2000     * @see CaptureResult#STATISTICS_SCENE_FLICKER
2001     */
2002    public static final int STATISTICS_SCENE_FLICKER_60HZ = 2;
2003
2004    //
2005    // Enumeration values for CaptureResult#SYNC_FRAME_NUMBER
2006    //
2007
2008    /**
2009     * <p>The current result is not yet fully synchronized to any request.</p>
2010     * <p>Synchronization is in progress, and reading metadata from this
2011     * result may include a mix of data that have taken effect since the
2012     * last synchronization time.</p>
2013     * <p>In some future result, within {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} frames,
2014     * this value will update to the actual frame number frame number
2015     * the result is guaranteed to be synchronized to (as long as the
2016     * request settings remain constant).</p>
2017     *
2018     * @see CameraCharacteristics#SYNC_MAX_LATENCY
2019     * @see CaptureResult#SYNC_FRAME_NUMBER
2020     * @hide
2021     */
2022    public static final int SYNC_FRAME_NUMBER_CONVERGING = -1;
2023
2024    /**
2025     * <p>The current result's synchronization status is unknown.</p>
2026     * <p>The result may have already converged, or it may be in
2027     * progress.  Reading from this result may include some mix
2028     * of settings from past requests.</p>
2029     * <p>After a settings change, the new settings will eventually all
2030     * take effect for the output buffers and results. However, this
2031     * value will not change when that happens. Altering settings
2032     * rapidly may provide outcomes using mixes of settings from recent
2033     * requests.</p>
2034     * <p>This value is intended primarily for backwards compatibility with
2035     * the older camera implementations (for android.hardware.Camera).</p>
2036     * @see CaptureResult#SYNC_FRAME_NUMBER
2037     * @hide
2038     */
2039    public static final int SYNC_FRAME_NUMBER_UNKNOWN = -2;
2040
2041    /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
2042     * End generated code
2043     *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
2044
2045}
2046