CameraCharacteristics.java revision f967a5486a78db244624fde4c105aa5e6fa914b9
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.hardware.camera2.impl.CameraMetadataNative;
20import android.util.Rational;
21
22import java.util.Collections;
23import java.util.List;
24
25/**
26 * <p>The properties describing a
27 * {@link CameraDevice CameraDevice}.</p>
28 *
29 * <p>These properties are fixed for a given CameraDevice, and can be queried
30 * through the {@link CameraManager CameraManager}
31 * interface in addition to through the CameraDevice interface.</p>
32 *
33 * <p>{@link CameraCharacteristics} objects are immutable.</p>
34 *
35 * @see CameraDevice
36 * @see CameraManager
37 */
38public final class CameraCharacteristics extends CameraMetadata {
39
40    private final CameraMetadataNative mProperties;
41    private List<Key<?>> mAvailableRequestKeys;
42    private List<Key<?>> mAvailableResultKeys;
43
44    /**
45     * Takes ownership of the passed-in properties object
46     * @hide
47     */
48    public CameraCharacteristics(CameraMetadataNative properties) {
49        mProperties = properties;
50    }
51
52    /**
53     * Returns a copy of the underlying {@link CameraMetadataNative}.
54     * @hide
55     */
56    public CameraMetadataNative getNativeCopy() {
57        return new CameraMetadataNative(mProperties);
58    }
59
60    @Override
61    public <T> T get(Key<T> key) {
62        return mProperties.get(key);
63    }
64
65    /**
66     * Returns the list of keys supported by this {@link CameraDevice} for querying
67     * with a {@link CaptureRequest}.
68     *
69     * <p>The list returned is not modifiable, so any attempts to modify it will throw
70     * a {@code UnsupportedOperationException}.</p>
71     *
72     * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
73     *
74     * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use
75     * {@link #getKeys()} instead.</p>
76     *
77     * @return List of keys supported by this CameraDevice for CaptureRequests.
78     */
79    public List<Key<?>> getAvailableCaptureRequestKeys() {
80        if (mAvailableRequestKeys == null) {
81            mAvailableRequestKeys = getAvailableKeyList(CaptureRequest.class);
82        }
83        return mAvailableRequestKeys;
84    }
85
86    /**
87     * Returns the list of keys supported by this {@link CameraDevice} for querying
88     * with a {@link CaptureResult}.
89     *
90     * <p>The list returned is not modifiable, so any attempts to modify it will throw
91     * a {@code UnsupportedOperationException}.</p>
92     *
93     * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
94     *
95     * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use
96     * {@link #getKeys()} instead.</p>
97     *
98     * @return List of keys supported by this CameraDevice for CaptureResults.
99     */
100    public List<Key<?>> getAvailableCaptureResultKeys() {
101        if (mAvailableResultKeys == null) {
102            mAvailableResultKeys = getAvailableKeyList(CaptureResult.class);
103        }
104        return mAvailableResultKeys;
105    }
106
107    /**
108     * Returns the list of keys supported by this {@link CameraDevice} by metadataClass.
109     *
110     * <p>The list returned is not modifiable, so any attempts to modify it will throw
111     * a {@code UnsupportedOperationException}.</p>
112     *
113     * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
114     *
115     * @param metadataClass The subclass of CameraMetadata that you want to get the keys for.
116     *
117     * @return List of keys supported by this CameraDevice for metadataClass.
118     *
119     * @throws IllegalArgumentException if metadataClass is not a subclass of CameraMetadata
120     */
121    private <T extends CameraMetadata> List<Key<?>> getAvailableKeyList(Class<T> metadataClass) {
122
123        if (metadataClass.equals(CameraMetadata.class)) {
124            throw new AssertionError(
125                    "metadataClass must be a strict subclass of CameraMetadata");
126        } else if (!CameraMetadata.class.isAssignableFrom(metadataClass)) {
127            throw new AssertionError(
128                    "metadataClass must be a subclass of CameraMetadata");
129        }
130
131        return Collections.unmodifiableList(getKeysStatic(metadataClass, /*instance*/null));
132    }
133
134    /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
135     * The key entries below this point are generated from metadata
136     * definitions in /system/media/camera/docs. Do not modify by hand or
137     * modify the comment blocks at the start or end.
138     *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
139
140
141    /**
142     * <p>The set of auto-exposure antibanding modes that are
143     * supported by this camera device.</p>
144     * <p>Not all of the auto-exposure anti-banding modes may be
145     * supported by a given camera device. This field lists the
146     * valid anti-banding modes that the application may request
147     * for this camera device; they must include AUTO.</p>
148     */
149    public static final Key<byte[]> CONTROL_AE_AVAILABLE_ANTIBANDING_MODES =
150            new Key<byte[]>("android.control.aeAvailableAntibandingModes", byte[].class);
151
152    /**
153     * <p>The set of auto-exposure modes that are supported by this
154     * camera device.</p>
155     * <p>Not all the auto-exposure modes may be supported by a
156     * given camera device, especially if no flash unit is
157     * available. This entry lists the valid modes for
158     * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} for this camera device.</p>
159     * <p>All camera devices support ON, and all camera devices with
160     * flash units support ON_AUTO_FLASH and
161     * ON_ALWAYS_FLASH.</p>
162     * <p>FULL mode camera devices always support OFF mode,
163     * which enables application control of camera exposure time,
164     * sensitivity, and frame duration.</p>
165     *
166     * @see CaptureRequest#CONTROL_AE_MODE
167     */
168    public static final Key<byte[]> CONTROL_AE_AVAILABLE_MODES =
169            new Key<byte[]>("android.control.aeAvailableModes", byte[].class);
170
171    /**
172     * <p>List of frame rate ranges supported by the
173     * AE algorithm/hardware</p>
174     */
175    public static final Key<int[]> CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES =
176            new Key<int[]>("android.control.aeAvailableTargetFpsRanges", int[].class);
177
178    /**
179     * <p>Maximum and minimum exposure compensation
180     * setting, in counts of
181     * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep}.</p>
182     *
183     * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP
184     */
185    public static final Key<int[]> CONTROL_AE_COMPENSATION_RANGE =
186            new Key<int[]>("android.control.aeCompensationRange", int[].class);
187
188    /**
189     * <p>Smallest step by which exposure compensation
190     * can be changed</p>
191     */
192    public static final Key<Rational> CONTROL_AE_COMPENSATION_STEP =
193            new Key<Rational>("android.control.aeCompensationStep", Rational.class);
194
195    /**
196     * <p>List of AF modes that can be
197     * selected with {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}.</p>
198     * <p>Not all the auto-focus modes may be supported by a
199     * given camera device. This entry lists the valid modes for
200     * {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} for this camera device.</p>
201     * <p>All camera devices will support OFF mode, and all camera devices with
202     * adjustable focuser units (<code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} &gt; 0</code>)
203     * will support AUTO mode.</p>
204     *
205     * @see CaptureRequest#CONTROL_AF_MODE
206     * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
207     */
208    public static final Key<byte[]> CONTROL_AF_AVAILABLE_MODES =
209            new Key<byte[]>("android.control.afAvailableModes", byte[].class);
210
211    /**
212     * <p>List containing the subset of color effects
213     * specified in {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode} that is supported by
214     * this device.</p>
215     * <p>This list contains the color effect modes that can be applied to
216     * images produced by the camera device. Only modes that have
217     * been fully implemented for the current device may be included here.
218     * Implementations are not expected to be consistent across all devices.
219     * If no color effect modes are available for a device, this should
220     * simply be set to OFF.</p>
221     * <p>A color effect will only be applied if
222     * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF.</p>
223     *
224     * @see CaptureRequest#CONTROL_EFFECT_MODE
225     * @see CaptureRequest#CONTROL_MODE
226     */
227    public static final Key<byte[]> CONTROL_AVAILABLE_EFFECTS =
228            new Key<byte[]>("android.control.availableEffects", byte[].class);
229
230    /**
231     * <p>List containing a subset of scene modes
232     * specified in {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode}.</p>
233     * <p>This list contains scene modes that can be set for the camera device.
234     * Only scene modes that have been fully implemented for the
235     * camera device may be included here. Implementations are not expected
236     * to be consistent across all devices. If no scene modes are supported
237     * by the camera device, this will be set to <code>[DISABLED]</code>.</p>
238     *
239     * @see CaptureRequest#CONTROL_SCENE_MODE
240     */
241    public static final Key<byte[]> CONTROL_AVAILABLE_SCENE_MODES =
242            new Key<byte[]>("android.control.availableSceneModes", byte[].class);
243
244    /**
245     * <p>List of video stabilization modes that can
246     * be supported</p>
247     */
248    public static final Key<byte[]> CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES =
249            new Key<byte[]>("android.control.availableVideoStabilizationModes", byte[].class);
250
251    /**
252     * <p>The set of auto-white-balance modes ({@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode})
253     * that are supported by this camera device.</p>
254     * <p>Not all the auto-white-balance modes may be supported by a
255     * given camera device. This entry lists the valid modes for
256     * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} for this camera device.</p>
257     * <p>All camera devices will support ON mode.</p>
258     * <p>FULL mode camera devices will always support OFF mode,
259     * which enables application control of white balance, by using
260     * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}({@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} must be set to TRANSFORM_MATRIX).</p>
261     *
262     * @see CaptureRequest#COLOR_CORRECTION_GAINS
263     * @see CaptureRequest#COLOR_CORRECTION_MODE
264     * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
265     * @see CaptureRequest#CONTROL_AWB_MODE
266     */
267    public static final Key<byte[]> CONTROL_AWB_AVAILABLE_MODES =
268            new Key<byte[]>("android.control.awbAvailableModes", byte[].class);
269
270    /**
271     * <p>List of the maximum number of regions that can be used for metering in
272     * auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF);
273     * this corresponds to the the maximum number of elements in
274     * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}, {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions},
275     * and {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p>
276     *
277     * @see CaptureRequest#CONTROL_AE_REGIONS
278     * @see CaptureRequest#CONTROL_AF_REGIONS
279     * @see CaptureRequest#CONTROL_AWB_REGIONS
280     */
281    public static final Key<int[]> CONTROL_MAX_REGIONS =
282            new Key<int[]>("android.control.maxRegions", int[].class);
283
284    /**
285     * <p>The set of edge enhancement modes supported by this camera device.</p>
286     * <p>This tag lists the valid modes for {@link CaptureRequest#EDGE_MODE android.edge.mode}.</p>
287     * <p>Full-capability camera devices must always support OFF and FAST.</p>
288     *
289     * @see CaptureRequest#EDGE_MODE
290     */
291    public static final Key<byte[]> EDGE_AVAILABLE_EDGE_MODES =
292            new Key<byte[]>("android.edge.availableEdgeModes", byte[].class);
293
294    /**
295     * <p>Whether this camera device has a
296     * flash.</p>
297     * <p>If no flash, none of the flash controls do
298     * anything. All other metadata should return 0.</p>
299     */
300    public static final Key<Boolean> FLASH_INFO_AVAILABLE =
301            new Key<Boolean>("android.flash.info.available", boolean.class);
302
303    /**
304     * <p>The set of hot pixel correction modes that are supported by this
305     * camera device.</p>
306     * <p>This tag lists valid modes for {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode}.</p>
307     * <p>FULL mode camera devices will always support FAST.</p>
308     *
309     * @see CaptureRequest#HOT_PIXEL_MODE
310     */
311    public static final Key<byte[]> HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES =
312            new Key<byte[]>("android.hotPixel.availableHotPixelModes", byte[].class);
313
314    /**
315     * <p>Supported resolutions for the JPEG thumbnail</p>
316     * <p>Below condiditions will be satisfied for this size list:</p>
317     * <ul>
318     * <li>The sizes will be sorted by increasing pixel area (width x height).
319     * If several resolutions have the same area, they will be sorted by increasing width.</li>
320     * <li>The aspect ratio of the largest thumbnail size will be same as the
321     * aspect ratio of largest JPEG output size in android.scaler.availableStreamConfigurations.
322     * The largest size is defined as the size that has the largest pixel area
323     * in a given size list.</li>
324     * <li>Each output JPEG size in android.scaler.availableStreamConfigurations will have at least
325     * one corresponding size that has the same aspect ratio in availableThumbnailSizes,
326     * and vice versa.</li>
327     * <li>All non (0, 0) sizes will have non-zero widths and heights.</li>
328     * </ul>
329     */
330    public static final Key<android.util.Size[]> JPEG_AVAILABLE_THUMBNAIL_SIZES =
331            new Key<android.util.Size[]>("android.jpeg.availableThumbnailSizes", android.util.Size[].class);
332
333    /**
334     * <p>List of supported aperture
335     * values.</p>
336     * <p>If the camera device doesn't support variable apertures,
337     * listed value will be the fixed aperture.</p>
338     * <p>If the camera device supports variable apertures, the aperture value
339     * in this list will be sorted in ascending order.</p>
340     */
341    public static final Key<float[]> LENS_INFO_AVAILABLE_APERTURES =
342            new Key<float[]>("android.lens.info.availableApertures", float[].class);
343
344    /**
345     * <p>List of supported neutral density filter values for
346     * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity}.</p>
347     * <p>If changing {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} is not supported,
348     * availableFilterDensities must contain only 0. Otherwise, this
349     * list contains only the exact filter density values available on
350     * this camera device.</p>
351     *
352     * @see CaptureRequest#LENS_FILTER_DENSITY
353     */
354    public static final Key<float[]> LENS_INFO_AVAILABLE_FILTER_DENSITIES =
355            new Key<float[]>("android.lens.info.availableFilterDensities", float[].class);
356
357    /**
358     * <p>The available focal lengths for this device for use with
359     * {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}.</p>
360     * <p>If optical zoom is not supported, this will only report
361     * a single value corresponding to the static focal length of the
362     * device. Otherwise, this will report every focal length supported
363     * by the device.</p>
364     *
365     * @see CaptureRequest#LENS_FOCAL_LENGTH
366     */
367    public static final Key<float[]> LENS_INFO_AVAILABLE_FOCAL_LENGTHS =
368            new Key<float[]>("android.lens.info.availableFocalLengths", float[].class);
369
370    /**
371     * <p>List containing a subset of the optical image
372     * stabilization (OIS) modes specified in
373     * {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}.</p>
374     * <p>If OIS is not implemented for a given camera device, this should
375     * contain only OFF.</p>
376     *
377     * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
378     */
379    public static final Key<byte[]> LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION =
380            new Key<byte[]>("android.lens.info.availableOpticalStabilization", byte[].class);
381
382    /**
383     * <p>Optional. Hyperfocal distance for this lens.</p>
384     * <p>If the lens is not fixed focus, the camera device will report this
385     * field when {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} is APPROXIMATE or CALIBRATED.</p>
386     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
387     *
388     * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
389     */
390    public static final Key<Float> LENS_INFO_HYPERFOCAL_DISTANCE =
391            new Key<Float>("android.lens.info.hyperfocalDistance", float.class);
392
393    /**
394     * <p>Shortest distance from frontmost surface
395     * of the lens that can be focused correctly.</p>
396     * <p>If the lens is fixed-focus, this should be
397     * 0.</p>
398     */
399    public static final Key<Float> LENS_INFO_MINIMUM_FOCUS_DISTANCE =
400            new Key<Float>("android.lens.info.minimumFocusDistance", float.class);
401
402    /**
403     * <p>Dimensions of lens shading map.</p>
404     * <p>The map should be on the order of 30-40 rows and columns, and
405     * must be smaller than 64x64.</p>
406     */
407    public static final Key<android.util.Size> LENS_INFO_SHADING_MAP_SIZE =
408            new Key<android.util.Size>("android.lens.info.shadingMapSize", android.util.Size.class);
409
410    /**
411     * <p>The lens focus distance calibration quality.</p>
412     * <p>The lens focus distance calibration quality determines the reliability of
413     * focus related metadata entries, i.e. {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
414     * {@link CaptureResult#LENS_FOCUS_RANGE android.lens.focusRange}, {@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}, and
415     * {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}.</p>
416     *
417     * @see CaptureRequest#LENS_FOCUS_DISTANCE
418     * @see CaptureResult#LENS_FOCUS_RANGE
419     * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE
420     * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
421     * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED
422     * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE
423     * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED
424     */
425    public static final Key<Integer> LENS_INFO_FOCUS_DISTANCE_CALIBRATION =
426            new Key<Integer>("android.lens.info.focusDistanceCalibration", int.class);
427
428    /**
429     * <p>Direction the camera faces relative to
430     * device screen</p>
431     * @see #LENS_FACING_FRONT
432     * @see #LENS_FACING_BACK
433     */
434    public static final Key<Integer> LENS_FACING =
435            new Key<Integer>("android.lens.facing", int.class);
436
437    /**
438     * <p>The set of noise reduction modes supported by this camera device.</p>
439     * <p>This tag lists the valid modes for {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}.</p>
440     * <p>Full-capability camera devices must laways support OFF and FAST.</p>
441     *
442     * @see CaptureRequest#NOISE_REDUCTION_MODE
443     */
444    public static final Key<byte[]> NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES =
445            new Key<byte[]>("android.noiseReduction.availableNoiseReductionModes", byte[].class);
446
447    /**
448     * <p>If set to 1, the HAL will always split result
449     * metadata for a single capture into multiple buffers,
450     * returned using multiple process_capture_result calls.</p>
451     * <p>Does not need to be listed in static
452     * metadata. Support for partial results will be reworked in
453     * future versions of camera service. This quirk will stop
454     * working at that point; DO NOT USE without careful
455     * consideration of future support.</p>
456     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
457     * @deprecated
458     * @hide
459     */
460    @Deprecated
461    public static final Key<Byte> QUIRKS_USE_PARTIAL_RESULT =
462            new Key<Byte>("android.quirks.usePartialResult", byte.class);
463
464    /**
465     * <p>The maximum numbers of different types of output streams
466     * that can be configured and used simultaneously by a camera device.</p>
467     * <p>This is a 3 element tuple that contains the max number of output simultaneous
468     * streams for raw sensor, processed (but not stalling), and processed (and stalling)
469     * formats respectively. For example, assuming that JPEG is typically a processed and
470     * stalling stream, if max raw sensor format output stream number is 1, max YUV streams
471     * number is 3, and max JPEG stream number is 2, then this tuple should be <code>(1, 3, 2)</code>.</p>
472     * <p>This lists the upper bound of the number of output streams supported by
473     * the camera device. Using more streams simultaneously may require more hardware and
474     * CPU resources that will consume more power. The image format for a output stream can
475     * be any supported format provided by android.scaler.availableStreamConfigurations.
476     * The formats defined in android.scaler.availableStreamConfigurations can be catergorized
477     * into the 3 stream types as below:</p>
478     * <ul>
479     * <li>Processed (but stalling): any non-RAW format with a stallDurations &gt; 0.
480     * Typically JPEG format (ImageFormat#JPEG).</li>
481     * <li>Raw formats: ImageFormat#RAW_SENSOR and ImageFormat#RAW_OPAQUE.</li>
482     * <li>Processed (but not-stalling): any non-RAW format without a stall duration.
483     * Typically ImageFormat#YUV_420_888, ImageFormat#NV21, ImageFormat#YV12.</li>
484     * </ul>
485     */
486    public static final Key<int[]> REQUEST_MAX_NUM_OUTPUT_STREAMS =
487            new Key<int[]>("android.request.maxNumOutputStreams", int[].class);
488
489    /**
490     * <p>The maximum numbers of any type of input streams
491     * that can be configured and used simultaneously by a camera device.</p>
492     * <p>When set to 0, it means no input stream is supported.</p>
493     * <p>The image format for a input stream can be any supported
494     * format provided by
495     * android.scaler.availableInputOutputFormatsMap. When using an
496     * input stream, there must be at least one output stream
497     * configured to to receive the reprocessed images.</p>
498     * <p>For example, for Zero Shutter Lag (ZSL) still capture use case, the input
499     * stream image format will be RAW_OPAQUE, the associated output stream image format
500     * should be JPEG.</p>
501     */
502    public static final Key<Integer> REQUEST_MAX_NUM_INPUT_STREAMS =
503            new Key<Integer>("android.request.maxNumInputStreams", int.class);
504
505    /**
506     * <p>Specifies the number of maximum pipeline stages a frame
507     * has to go through from when it's exposed to when it's available
508     * to the framework.</p>
509     * <p>A typical minimum value for this is 2 (one stage to expose,
510     * one stage to readout) from the sensor. The ISP then usually adds
511     * its own stages to do custom HW processing. Further stages may be
512     * added by SW processing.</p>
513     * <p>Depending on what settings are used (e.g. YUV, JPEG) and what
514     * processing is enabled (e.g. face detection), the actual pipeline
515     * depth (specified by {@link CaptureResult#REQUEST_PIPELINE_DEPTH android.request.pipelineDepth}) may be less than
516     * the max pipeline depth.</p>
517     * <p>A pipeline depth of X stages is equivalent to a pipeline latency of
518     * X frame intervals.</p>
519     * <p>This value will be 8 or less.</p>
520     *
521     * @see CaptureResult#REQUEST_PIPELINE_DEPTH
522     */
523    public static final Key<Byte> REQUEST_PIPELINE_MAX_DEPTH =
524            new Key<Byte>("android.request.pipelineMaxDepth", byte.class);
525
526    /**
527     * <p>Optional. Defaults to 1. Defines how many sub-components
528     * a result will be composed of.</p>
529     * <p>In order to combat the pipeline latency, partial results
530     * may be delivered to the application layer from the camera device as
531     * soon as they are available.</p>
532     * <p>A value of 1 means that partial results are not supported.</p>
533     * <p>A typical use case for this might be: after requesting an AF lock the
534     * new AF state might be available 50% of the way through the pipeline.
535     * The camera device could then immediately dispatch this state via a
536     * partial result to the framework/application layer, and the rest of
537     * the metadata via later partial results.</p>
538     */
539    public static final Key<Integer> REQUEST_PARTIAL_RESULT_COUNT =
540            new Key<Integer>("android.request.partialResultCount", int.class);
541
542    /**
543     * <p>List of capabilities that the camera device
544     * advertises as fully supporting.</p>
545     * <p>A capability is a contract that the camera device makes in order
546     * to be able to satisfy one or more use cases.</p>
547     * <p>Listing a capability guarantees that the whole set of features
548     * required to support a common use will all be available.</p>
549     * <p>Using a subset of the functionality provided by an unsupported
550     * capability may be possible on a specific camera device implementation;
551     * to do this query each of android.request.availableRequestKeys,
552     * android.request.availableResultKeys,
553     * android.request.availableCharacteristicsKeys.</p>
554     * <p>XX: Maybe these should go into {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}
555     * as a table instead?</p>
556     * <p>The following capabilities are guaranteed to be available on
557     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL devices:</p>
558     * <ul>
559     * <li>MANUAL_SENSOR</li>
560     * <li>ZSL</li>
561     * </ul>
562     * <p>Other capabilities may be available on either FULL or LIMITED
563     * devices, but the app. should query this field to be sure.</p>
564     *
565     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
566     * @see #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE
567     * @see #REQUEST_AVAILABLE_CAPABILITIES_OPTIONAL
568     * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR
569     * @see #REQUEST_AVAILABLE_CAPABILITIES_GCAM
570     * @see #REQUEST_AVAILABLE_CAPABILITIES_ZSL
571     * @see #REQUEST_AVAILABLE_CAPABILITIES_DNG
572     */
573    public static final Key<Integer> REQUEST_AVAILABLE_CAPABILITIES =
574            new Key<Integer>("android.request.availableCapabilities", int.class);
575
576    /**
577     * <p>A list of all keys that the camera device has available
578     * to use with CaptureRequest.</p>
579     * <p>Attempting to set a key into a CaptureRequest that is not
580     * listed here will result in an invalid request and will be rejected
581     * by the camera device.</p>
582     * <p>This field can be used to query the feature set of a camera device
583     * at a more granular level than capabilities. This is especially
584     * important for optional keys that are not listed under any capability
585     * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
586     * <p>TODO: This should be used by #getAvailableCaptureRequestKeys.</p>
587     *
588     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
589     * @hide
590     */
591    public static final Key<int[]> REQUEST_AVAILABLE_REQUEST_KEYS =
592            new Key<int[]>("android.request.availableRequestKeys", int[].class);
593
594    /**
595     * <p>A list of all keys that the camera device has available
596     * to use with CaptureResult.</p>
597     * <p>Attempting to get a key from a CaptureResult that is not
598     * listed here will always return a <code>null</code> value. Getting a key from
599     * a CaptureResult that is listed here must never return a <code>null</code>
600     * value.</p>
601     * <p>The following keys may return <code>null</code> unless they are enabled:</p>
602     * <ul>
603     * <li>{@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap} (non-null iff {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON)</li>
604     * </ul>
605     * <p>(Those sometimes-null keys should nevertheless be listed here
606     * if they are available.)</p>
607     * <p>This field can be used to query the feature set of a camera device
608     * at a more granular level than capabilities. This is especially
609     * important for optional keys that are not listed under any capability
610     * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
611     * <p>TODO: This should be used by #getAvailableCaptureResultKeys.</p>
612     *
613     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
614     * @see CaptureResult#STATISTICS_LENS_SHADING_MAP
615     * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
616     * @hide
617     */
618    public static final Key<int[]> REQUEST_AVAILABLE_RESULT_KEYS =
619            new Key<int[]>("android.request.availableResultKeys", int[].class);
620
621    /**
622     * <p>A list of all keys that the camera device has available
623     * to use with CameraCharacteristics.</p>
624     * <p>This entry follows the same rules as
625     * android.request.availableResultKeys (except that it applies for
626     * CameraCharacteristics instead of CaptureResult). See above for more
627     * details.</p>
628     * <p>TODO: This should be used by CameraCharacteristics#getKeys.</p>
629     * @hide
630     */
631    public static final Key<int[]> REQUEST_AVAILABLE_CHARACTERISTICS_KEYS =
632            new Key<int[]>("android.request.availableCharacteristicsKeys", int[].class);
633
634    /**
635     * <p>The list of image formats that are supported by this
636     * camera device for output streams.</p>
637     * <p>All camera devices will support JPEG and YUV_420_888 formats.</p>
638     * <p>When set to YUV_420_888, application can access the YUV420 data directly.</p>
639     * @deprecated
640     * @hide
641     */
642    @Deprecated
643    public static final Key<int[]> SCALER_AVAILABLE_FORMATS =
644            new Key<int[]>("android.scaler.availableFormats", int[].class);
645
646    /**
647     * <p>The minimum frame duration that is supported
648     * for each resolution in android.scaler.availableJpegSizes.</p>
649     * <p>This corresponds to the minimum steady-state frame duration when only
650     * that JPEG stream is active and captured in a burst, with all
651     * processing (typically in android.*.mode) set to FAST.</p>
652     * <p>When multiple streams are configured, the minimum
653     * frame duration will be &gt;= max(individual stream min
654     * durations)</p>
655     * @deprecated
656     * @hide
657     */
658    @Deprecated
659    public static final Key<long[]> SCALER_AVAILABLE_JPEG_MIN_DURATIONS =
660            new Key<long[]>("android.scaler.availableJpegMinDurations", long[].class);
661
662    /**
663     * <p>The JPEG resolutions that are supported by this camera device.</p>
664     * <p>The resolutions are listed as <code>(width, height)</code> pairs. All camera devices will support
665     * sensor maximum resolution (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}).</p>
666     *
667     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
668     * @deprecated
669     * @hide
670     */
671    @Deprecated
672    public static final Key<android.util.Size[]> SCALER_AVAILABLE_JPEG_SIZES =
673            new Key<android.util.Size[]>("android.scaler.availableJpegSizes", android.util.Size[].class);
674
675    /**
676     * <p>The maximum ratio between active area width
677     * and crop region width, or between active area height and
678     * crop region height, if the crop region height is larger
679     * than width</p>
680     */
681    public static final Key<Float> SCALER_AVAILABLE_MAX_DIGITAL_ZOOM =
682            new Key<Float>("android.scaler.availableMaxDigitalZoom", float.class);
683
684    /**
685     * <p>For each available processed output size (defined in
686     * android.scaler.availableProcessedSizes), this property lists the
687     * minimum supportable frame duration for that size.</p>
688     * <p>This should correspond to the frame duration when only that processed
689     * stream is active, with all processing (typically in android.*.mode)
690     * set to FAST.</p>
691     * <p>When multiple streams are configured, the minimum frame duration will
692     * be &gt;= max(individual stream min durations).</p>
693     * @deprecated
694     * @hide
695     */
696    @Deprecated
697    public static final Key<long[]> SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS =
698            new Key<long[]>("android.scaler.availableProcessedMinDurations", long[].class);
699
700    /**
701     * <p>The resolutions available for use with
702     * processed output streams, such as YV12, NV12, and
703     * platform opaque YUV/RGB streams to the GPU or video
704     * encoders.</p>
705     * <p>The resolutions are listed as <code>(width, height)</code> pairs.</p>
706     * <p>For a given use case, the actual maximum supported resolution
707     * may be lower than what is listed here, depending on the destination
708     * Surface for the image data. For example, for recording video,
709     * the video encoder chosen may have a maximum size limit (e.g. 1080p)
710     * smaller than what the camera (e.g. maximum resolution is 3264x2448)
711     * can provide.</p>
712     * <p>Please reference the documentation for the image data destination to
713     * check if it limits the maximum size for image data.</p>
714     * @deprecated
715     * @hide
716     */
717    @Deprecated
718    public static final Key<android.util.Size[]> SCALER_AVAILABLE_PROCESSED_SIZES =
719            new Key<android.util.Size[]>("android.scaler.availableProcessedSizes", android.util.Size[].class);
720
721    /**
722     * <p>The mapping of image formats that are supported by this
723     * camera device for input streams, to their corresponding output formats.</p>
724     * <p>All camera devices with at least 1
725     * {@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} will have at least one
726     * available input format.</p>
727     * <p>The camera device will support the following map of formats,
728     * if its dependent capability is supported:</p>
729     * <table>
730     * <thead>
731     * <tr>
732     * <th align="left">Input Format</th>
733     * <th align="left">Output Format</th>
734     * <th align="left">Capability</th>
735     * </tr>
736     * </thead>
737     * <tbody>
738     * <tr>
739     * <td align="left">RAW_OPAQUE</td>
740     * <td align="left">JPEG</td>
741     * <td align="left">ZSL</td>
742     * </tr>
743     * <tr>
744     * <td align="left">RAW_OPAQUE</td>
745     * <td align="left">YUV_420_888</td>
746     * <td align="left">ZSL</td>
747     * </tr>
748     * <tr>
749     * <td align="left">RAW_OPAQUE</td>
750     * <td align="left">RAW16</td>
751     * <td align="left">DNG</td>
752     * </tr>
753     * <tr>
754     * <td align="left">RAW16</td>
755     * <td align="left">YUV_420_888</td>
756     * <td align="left">DNG</td>
757     * </tr>
758     * <tr>
759     * <td align="left">RAW16</td>
760     * <td align="left">JPEG</td>
761     * <td align="left">DNG</td>
762     * </tr>
763     * </tbody>
764     * </table>
765     * <p>For ZSL-capable camera devices, using the RAW_OPAQUE format
766     * as either input or output will never hurt maximum frame rate (i.e.
767     * StreamConfigurationMap#getOutputStallDuration(int,Size)
768     * for a <code>format =</code> RAW_OPAQUE is always 0).</p>
769     * <p>Attempting to configure an input stream with output streams not
770     * listed as available in this map is not valid.</p>
771     * <p>TODO: typedef to ReprocessFormatMap</p>
772     *
773     * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
774     * @hide
775     */
776    public static final Key<int[]> SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP =
777            new Key<int[]>("android.scaler.availableInputOutputFormatsMap", int[].class);
778
779    /**
780     * <p>The available stream configurations that this
781     * camera device supports
782     * (i.e. format, width, height, output/input stream).</p>
783     * <p>The configurations are listed as <code>(format, width, height, input?)</code>
784     * tuples.</p>
785     * <p>All camera devices will support sensor maximum resolution (defined by
786     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) for the JPEG format.</p>
787     * <p>For a given use case, the actual maximum supported resolution
788     * may be lower than what is listed here, depending on the destination
789     * Surface for the image data. For example, for recording video,
790     * the video encoder chosen may have a maximum size limit (e.g. 1080p)
791     * smaller than what the camera (e.g. maximum resolution is 3264x2448)
792     * can provide.</p>
793     * <p>Please reference the documentation for the image data destination to
794     * check if it limits the maximum size for image data.</p>
795     * <p>Not all output formats may be supported in a configuration with
796     * an input stream of a particular format. For more details, see
797     * android.scaler.availableInputOutputFormatsMap.</p>
798     * <p>The following table describes the minimum required output stream
799     * configurations based on the hardware level
800     * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p>
801     * <table>
802     * <thead>
803     * <tr>
804     * <th align="center">Format</th>
805     * <th align="center">Size</th>
806     * <th align="center">Hardware Level</th>
807     * <th align="center">Notes</th>
808     * </tr>
809     * </thead>
810     * <tbody>
811     * <tr>
812     * <td align="center">JPEG</td>
813     * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td>
814     * <td align="center">Any</td>
815     * <td align="center"></td>
816     * </tr>
817     * <tr>
818     * <td align="center">JPEG</td>
819     * <td align="center">1920x1080 (1080p)</td>
820     * <td align="center">Any</td>
821     * <td align="center">if 1080p &lt;= activeArraySize</td>
822     * </tr>
823     * <tr>
824     * <td align="center">JPEG</td>
825     * <td align="center">1280x720 (720)</td>
826     * <td align="center">Any</td>
827     * <td align="center">if 720p &lt;= activeArraySize</td>
828     * </tr>
829     * <tr>
830     * <td align="center">JPEG</td>
831     * <td align="center">640x480 (480p)</td>
832     * <td align="center">Any</td>
833     * <td align="center">if 480p &lt;= activeArraySize</td>
834     * </tr>
835     * <tr>
836     * <td align="center">JPEG</td>
837     * <td align="center">320x240 (240p)</td>
838     * <td align="center">Any</td>
839     * <td align="center">if 240p &lt;= activeArraySize</td>
840     * </tr>
841     * <tr>
842     * <td align="center">YUV_420_888</td>
843     * <td align="center">all output sizes available for JPEG</td>
844     * <td align="center">FULL</td>
845     * <td align="center"></td>
846     * </tr>
847     * <tr>
848     * <td align="center">YUV_420_888</td>
849     * <td align="center">all output sizes available for JPEG, up to the maximum video size</td>
850     * <td align="center">LIMITED</td>
851     * <td align="center"></td>
852     * </tr>
853     * <tr>
854     * <td align="center">IMPLEMENTATION_DEFINED</td>
855     * <td align="center">same as YUV_420_888</td>
856     * <td align="center">Any</td>
857     * <td align="center"></td>
858     * </tr>
859     * </tbody>
860     * </table>
861     * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional
862     * mandatory stream configurations on a per-capability basis.</p>
863     *
864     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
865     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
866     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
867     * @hide
868     */
869    public static final Key<android.hardware.camera2.params.StreamConfiguration[]> SCALER_AVAILABLE_STREAM_CONFIGURATIONS =
870            new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.scaler.availableStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
871
872    /**
873     * <p>This lists the minimum frame duration for each
874     * format/size combination.</p>
875     * <p>This should correspond to the frame duration when only that
876     * stream is active, with all processing (typically in android.*.mode)
877     * set to either OFF or FAST.</p>
878     * <p>When multiple streams are used in a request, the minimum frame
879     * duration will be max(individual stream min durations).</p>
880     * <p>The minimum frame duration of a stream (of a particular format, size)
881     * is the same regardless of whether the stream is input or output.</p>
882     * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and
883     * android.scaler.availableStallDurations for more details about
884     * calculating the max frame rate.</p>
885     * <p>(Keep in sync with
886     * StreamConfigurationMap#getOutputMinFrameDuration)</p>
887     *
888     * @see CaptureRequest#SENSOR_FRAME_DURATION
889     * @hide
890     */
891    public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_MIN_FRAME_DURATIONS =
892            new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
893
894    /**
895     * <p>This lists the maximum stall duration for each
896     * format/size combination.</p>
897     * <p>A stall duration is how much extra time would get added
898     * to the normal minimum frame duration for a repeating request
899     * that has streams with non-zero stall.</p>
900     * <p>For example, consider JPEG captures which have the following
901     * characteristics:</p>
902     * <ul>
903     * <li>JPEG streams act like processed YUV streams in requests for which
904     * they are not included; in requests in which they are directly
905     * referenced, they act as JPEG streams. This is because supporting a
906     * JPEG stream requires the underlying YUV data to always be ready for
907     * use by a JPEG encoder, but the encoder will only be used (and impact
908     * frame duration) on requests that actually reference a JPEG stream.</li>
909     * <li>The JPEG processor can run concurrently to the rest of the camera
910     * pipeline, but cannot process more than 1 capture at a time.</li>
911     * </ul>
912     * <p>In other words, using a repeating YUV request would result
913     * in a steady frame rate (let's say it's 30 FPS). If a single
914     * JPEG request is submitted periodically, the frame rate will stay
915     * at 30 FPS (as long as we wait for the previous JPEG to return each
916     * time). If we try to submit a repeating YUV + JPEG request, then
917     * the frame rate will drop from 30 FPS.</p>
918     * <p>In general, submitting a new request with a non-0 stall time
919     * stream will <em>not</em> cause a frame rate drop unless there are still
920     * outstanding buffers for that stream from previous requests.</p>
921     * <p>Submitting a repeating request with streams (call this <code>S</code>)
922     * is the same as setting the minimum frame duration from
923     * the normal minimum frame duration corresponding to <code>S</code>, added with
924     * the maximum stall duration for <code>S</code>.</p>
925     * <p>If interleaving requests with and without a stall duration,
926     * a request will stall by the maximum of the remaining times
927     * for each can-stall stream with outstanding buffers.</p>
928     * <p>This means that a stalling request will not have an exposure start
929     * until the stall has completed.</p>
930     * <p>This should correspond to the stall duration when only that stream is
931     * active, with all processing (typically in android.*.mode) set to FAST
932     * or OFF. Setting any of the processing modes to HIGH_QUALITY
933     * effectively results in an indeterminate stall duration for all
934     * streams in a request (the regular stall calculation rules are
935     * ignored).</p>
936     * <p>The following formats may always have a stall duration:</p>
937     * <ul>
938     * <li>JPEG</li>
939     * <li>RAW16</li>
940     * </ul>
941     * <p>The following formats will never have a stall duration:</p>
942     * <ul>
943     * <li>YUV_420_888</li>
944     * <li>IMPLEMENTATION_DEFINED</li>
945     * </ul>
946     * <p>All other formats may or may not have an allowed stall duration on
947     * a per-capability basis; refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
948     * for more details.</p>
949     * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} for more information about
950     * calculating the max frame rate (absent stalls).</p>
951     * <p>(Keep up to date with
952     * StreamConfigurationMap#getOutputStallDuration(int, Size) )</p>
953     *
954     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
955     * @see CaptureRequest#SENSOR_FRAME_DURATION
956     * @hide
957     */
958    public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_STALL_DURATIONS =
959            new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
960
961    /**
962     * <p>The available stream configurations that this
963     * camera device supports; also includes the minimum frame durations
964     * and the stall durations for each format/size combination.</p>
965     * <p>All camera devices will support sensor maximum resolution (defined by
966     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) for the JPEG format.</p>
967     * <p>For a given use case, the actual maximum supported resolution
968     * may be lower than what is listed here, depending on the destination
969     * Surface for the image data. For example, for recording video,
970     * the video encoder chosen may have a maximum size limit (e.g. 1080p)
971     * smaller than what the camera (e.g. maximum resolution is 3264x2448)
972     * can provide.</p>
973     * <p>Please reference the documentation for the image data destination to
974     * check if it limits the maximum size for image data.</p>
975     * <p>The following table describes the minimum required output stream
976     * configurations based on the hardware level
977     * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p>
978     * <table>
979     * <thead>
980     * <tr>
981     * <th align="center">Format</th>
982     * <th align="center">Size</th>
983     * <th align="center">Hardware Level</th>
984     * <th align="center">Notes</th>
985     * </tr>
986     * </thead>
987     * <tbody>
988     * <tr>
989     * <td align="center">JPEG</td>
990     * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td>
991     * <td align="center">Any</td>
992     * <td align="center"></td>
993     * </tr>
994     * <tr>
995     * <td align="center">JPEG</td>
996     * <td align="center">1920x1080 (1080p)</td>
997     * <td align="center">Any</td>
998     * <td align="center">if 1080p &lt;= activeArraySize</td>
999     * </tr>
1000     * <tr>
1001     * <td align="center">JPEG</td>
1002     * <td align="center">1280x720 (720)</td>
1003     * <td align="center">Any</td>
1004     * <td align="center">if 720p &lt;= activeArraySize</td>
1005     * </tr>
1006     * <tr>
1007     * <td align="center">JPEG</td>
1008     * <td align="center">640x480 (480p)</td>
1009     * <td align="center">Any</td>
1010     * <td align="center">if 480p &lt;= activeArraySize</td>
1011     * </tr>
1012     * <tr>
1013     * <td align="center">JPEG</td>
1014     * <td align="center">320x240 (240p)</td>
1015     * <td align="center">Any</td>
1016     * <td align="center">if 240p &lt;= activeArraySize</td>
1017     * </tr>
1018     * <tr>
1019     * <td align="center">YUV_420_888</td>
1020     * <td align="center">all output sizes available for JPEG</td>
1021     * <td align="center">FULL</td>
1022     * <td align="center"></td>
1023     * </tr>
1024     * <tr>
1025     * <td align="center">YUV_420_888</td>
1026     * <td align="center">all output sizes available for JPEG, up to the maximum video size</td>
1027     * <td align="center">LIMITED</td>
1028     * <td align="center"></td>
1029     * </tr>
1030     * <tr>
1031     * <td align="center">IMPLEMENTATION_DEFINED</td>
1032     * <td align="center">same as YUV_420_888</td>
1033     * <td align="center">Any</td>
1034     * <td align="center"></td>
1035     * </tr>
1036     * </tbody>
1037     * </table>
1038     * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional
1039     * mandatory stream configurations on a per-capability basis.</p>
1040     *
1041     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1042     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1043     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
1044     */
1045    public static final Key<android.hardware.camera2.params.StreamConfigurationMap> SCALER_STREAM_CONFIGURATION_MAP =
1046            new Key<android.hardware.camera2.params.StreamConfigurationMap>("android.scaler.streamConfigurationMap", android.hardware.camera2.params.StreamConfigurationMap.class);
1047
1048    /**
1049     * <p>Area of raw data which corresponds to only
1050     * active pixels.</p>
1051     * <p>It is smaller or equal to
1052     * sensor full pixel array, which could include the black calibration pixels.</p>
1053     */
1054    public static final Key<android.graphics.Rect> SENSOR_INFO_ACTIVE_ARRAY_SIZE =
1055            new Key<android.graphics.Rect>("android.sensor.info.activeArraySize", android.graphics.Rect.class);
1056
1057    /**
1058     * <p>Range of valid sensitivities</p>
1059     */
1060    public static final Key<int[]> SENSOR_INFO_SENSITIVITY_RANGE =
1061            new Key<int[]>("android.sensor.info.sensitivityRange", int[].class);
1062
1063    /**
1064     * <p>Arrangement of color filters on sensor;
1065     * represents the colors in the top-left 2x2 section of
1066     * the sensor, in reading order</p>
1067     * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB
1068     * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG
1069     * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG
1070     * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR
1071     * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB
1072     */
1073    public static final Key<Integer> SENSOR_INFO_COLOR_FILTER_ARRANGEMENT =
1074            new Key<Integer>("android.sensor.info.colorFilterArrangement", int.class);
1075
1076    /**
1077     * <p>Range of valid exposure
1078     * times used by {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}.</p>
1079     *
1080     * @see CaptureRequest#SENSOR_EXPOSURE_TIME
1081     */
1082    public static final Key<long[]> SENSOR_INFO_EXPOSURE_TIME_RANGE =
1083            new Key<long[]>("android.sensor.info.exposureTimeRange", long[].class);
1084
1085    /**
1086     * <p>Maximum possible frame duration (minimum frame
1087     * rate).</p>
1088     * <p>The largest possible {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}
1089     * that will be accepted by the camera device. Attempting to use
1090     * frame durations beyond the maximum will result in the frame duration
1091     * being clipped to the maximum. See that control
1092     * for a full definition of frame durations.</p>
1093     * <p>Refer to
1094     * StreamConfigurationMap#getOutputMinFrameDuration(int,Size)
1095     * for the minimum frame duration values.</p>
1096     *
1097     * @see CaptureRequest#SENSOR_FRAME_DURATION
1098     */
1099    public static final Key<Long> SENSOR_INFO_MAX_FRAME_DURATION =
1100            new Key<Long>("android.sensor.info.maxFrameDuration", long.class);
1101
1102    /**
1103     * <p>The physical dimensions of the full pixel
1104     * array</p>
1105     * <p>Needed for FOV calculation for old API</p>
1106     */
1107    public static final Key<float[]> SENSOR_INFO_PHYSICAL_SIZE =
1108            new Key<float[]>("android.sensor.info.physicalSize", float[].class);
1109
1110    /**
1111     * <p>Dimensions of full pixel array, possibly
1112     * including black calibration pixels.</p>
1113     * <p>Maximum output resolution for raw format must
1114     * match this in
1115     * android.scaler.availableStreamConfigurations.</p>
1116     */
1117    public static final Key<android.util.Size> SENSOR_INFO_PIXEL_ARRAY_SIZE =
1118            new Key<android.util.Size>("android.sensor.info.pixelArraySize", android.util.Size.class);
1119
1120    /**
1121     * <p>Maximum raw value output by sensor.</p>
1122     * <p>This specifies the fully-saturated encoding level for the raw
1123     * sample values from the sensor.  This is typically caused by the
1124     * sensor becoming highly non-linear or clipping. The minimum for
1125     * each channel is specified by the offset in the
1126     * {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} tag.</p>
1127     * <p>The white level is typically determined either by sensor bit depth
1128     * (8-14 bits is expected), or by the point where the sensor response
1129     * becomes too non-linear to be useful.  The default value for this is
1130     * maximum representable value for a 16-bit raw sample (2^16 - 1).</p>
1131     *
1132     * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
1133     */
1134    public static final Key<Integer> SENSOR_INFO_WHITE_LEVEL =
1135            new Key<Integer>("android.sensor.info.whiteLevel", int.class);
1136
1137    /**
1138     * <p>The standard reference illuminant used as the scene light source when
1139     * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1},
1140     * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and
1141     * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} matrices.</p>
1142     * <p>The values in this tag correspond to the values defined for the
1143     * EXIF LightSource tag. These illuminants are standard light sources
1144     * that are often used calibrating camera devices.</p>
1145     * <p>If this tag is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1},
1146     * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and
1147     * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} will also be present.</p>
1148     * <p>Some devices may choose to provide a second set of calibration
1149     * information for improved quality, including
1150     * {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2} and its corresponding matrices.</p>
1151     *
1152     * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1
1153     * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM1
1154     * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX1
1155     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
1156     * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT
1157     * @see #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT
1158     * @see #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN
1159     * @see #SENSOR_REFERENCE_ILLUMINANT1_FLASH
1160     * @see #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER
1161     * @see #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER
1162     * @see #SENSOR_REFERENCE_ILLUMINANT1_SHADE
1163     * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT
1164     * @see #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT
1165     * @see #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT
1166     * @see #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT
1167     * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A
1168     * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B
1169     * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C
1170     * @see #SENSOR_REFERENCE_ILLUMINANT1_D55
1171     * @see #SENSOR_REFERENCE_ILLUMINANT1_D65
1172     * @see #SENSOR_REFERENCE_ILLUMINANT1_D75
1173     * @see #SENSOR_REFERENCE_ILLUMINANT1_D50
1174     * @see #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN
1175     */
1176    public static final Key<Integer> SENSOR_REFERENCE_ILLUMINANT1 =
1177            new Key<Integer>("android.sensor.referenceIlluminant1", int.class);
1178
1179    /**
1180     * <p>The standard reference illuminant used as the scene light source when
1181     * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2},
1182     * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and
1183     * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} matrices.</p>
1184     * <p>See {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1} for more details.
1185     * Valid values for this are the same as those given for the first
1186     * reference illuminant.</p>
1187     * <p>If this tag is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2},
1188     * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and
1189     * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} will also be present.</p>
1190     *
1191     * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2
1192     * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM2
1193     * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX2
1194     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1195     */
1196    public static final Key<Byte> SENSOR_REFERENCE_ILLUMINANT2 =
1197            new Key<Byte>("android.sensor.referenceIlluminant2", byte.class);
1198
1199    /**
1200     * <p>A per-device calibration transform matrix that maps from the
1201     * reference sensor colorspace to the actual device sensor colorspace.</p>
1202     * <p>This matrix is used to correct for per-device variations in the
1203     * sensor colorspace, and is used for processing raw buffer data.</p>
1204     * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
1205     * contains a per-device calibration transform that maps colors
1206     * from reference sensor color space (i.e. the "golden module"
1207     * colorspace) into this camera device's native sensor color
1208     * space under the first reference illuminant
1209     * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p>
1210     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1211     *
1212     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1213     */
1214    public static final Key<Rational[]> SENSOR_CALIBRATION_TRANSFORM1 =
1215            new Key<Rational[]>("android.sensor.calibrationTransform1", Rational[].class);
1216
1217    /**
1218     * <p>A per-device calibration transform matrix that maps from the
1219     * reference sensor colorspace to the actual device sensor colorspace
1220     * (this is the colorspace of the raw buffer data).</p>
1221     * <p>This matrix is used to correct for per-device variations in the
1222     * sensor colorspace, and is used for processing raw buffer data.</p>
1223     * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
1224     * contains a per-device calibration transform that maps colors
1225     * from reference sensor color space (i.e. the "golden module"
1226     * colorspace) into this camera device's native sensor color
1227     * space under the second reference illuminant
1228     * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p>
1229     * <p>This matrix will only be present if the second reference
1230     * illuminant is present.</p>
1231     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1232     *
1233     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
1234     */
1235    public static final Key<Rational[]> SENSOR_CALIBRATION_TRANSFORM2 =
1236            new Key<Rational[]>("android.sensor.calibrationTransform2", Rational[].class);
1237
1238    /**
1239     * <p>A matrix that transforms color values from CIE XYZ color space to
1240     * reference sensor color space.</p>
1241     * <p>This matrix is used to convert from the standard CIE XYZ color
1242     * space to the reference sensor colorspace, and is used when processing
1243     * raw buffer data.</p>
1244     * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
1245     * contains a color transform matrix that maps colors from the CIE
1246     * XYZ color space to the reference sensor color space (i.e. the
1247     * "golden module" colorspace) under the first reference illuminant
1248     * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p>
1249     * <p>The white points chosen in both the reference sensor color space
1250     * and the CIE XYZ colorspace when calculating this transform will
1251     * match the standard white point for the first reference illuminant
1252     * (i.e. no chromatic adaptation will be applied by this transform).</p>
1253     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1254     *
1255     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1256     */
1257    public static final Key<Rational[]> SENSOR_COLOR_TRANSFORM1 =
1258            new Key<Rational[]>("android.sensor.colorTransform1", Rational[].class);
1259
1260    /**
1261     * <p>A matrix that transforms color values from CIE XYZ color space to
1262     * reference sensor color space.</p>
1263     * <p>This matrix is used to convert from the standard CIE XYZ color
1264     * space to the reference sensor colorspace, and is used when processing
1265     * raw buffer data.</p>
1266     * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
1267     * contains a color transform matrix that maps colors from the CIE
1268     * XYZ color space to the reference sensor color space (i.e. the
1269     * "golden module" colorspace) under the second reference illuminant
1270     * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p>
1271     * <p>The white points chosen in both the reference sensor color space
1272     * and the CIE XYZ colorspace when calculating this transform will
1273     * match the standard white point for the second reference illuminant
1274     * (i.e. no chromatic adaptation will be applied by this transform).</p>
1275     * <p>This matrix will only be present if the second reference
1276     * illuminant is present.</p>
1277     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1278     *
1279     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
1280     */
1281    public static final Key<Rational[]> SENSOR_COLOR_TRANSFORM2 =
1282            new Key<Rational[]>("android.sensor.colorTransform2", Rational[].class);
1283
1284    /**
1285     * <p>A matrix that transforms white balanced camera colors from the reference
1286     * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
1287     * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
1288     * is used when processing raw buffer data.</p>
1289     * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
1290     * a color transform matrix that maps white balanced colors from the
1291     * reference sensor color space to the CIE XYZ color space with a D50 white
1292     * point.</p>
1293     * <p>Under the first reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1})
1294     * this matrix is chosen so that the standard white point for this reference
1295     * illuminant in the reference sensor colorspace is mapped to D50 in the
1296     * CIE XYZ colorspace.</p>
1297     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1298     *
1299     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1300     */
1301    public static final Key<Rational[]> SENSOR_FORWARD_MATRIX1 =
1302            new Key<Rational[]>("android.sensor.forwardMatrix1", Rational[].class);
1303
1304    /**
1305     * <p>A matrix that transforms white balanced camera colors from the reference
1306     * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
1307     * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
1308     * is used when processing raw buffer data.</p>
1309     * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
1310     * a color transform matrix that maps white balanced colors from the
1311     * reference sensor color space to the CIE XYZ color space with a D50 white
1312     * point.</p>
1313     * <p>Under the second reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2})
1314     * this matrix is chosen so that the standard white point for this reference
1315     * illuminant in the reference sensor colorspace is mapped to D50 in the
1316     * CIE XYZ colorspace.</p>
1317     * <p>This matrix will only be present if the second reference
1318     * illuminant is present.</p>
1319     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1320     *
1321     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
1322     */
1323    public static final Key<Rational[]> SENSOR_FORWARD_MATRIX2 =
1324            new Key<Rational[]>("android.sensor.forwardMatrix2", Rational[].class);
1325
1326    /**
1327     * <p>Gain factor from electrons to raw units when
1328     * ISO=100</p>
1329     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1330     * <p><b>Full capability</b> -
1331     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1332     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1333     *
1334     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1335     */
1336    public static final Key<Rational> SENSOR_BASE_GAIN_FACTOR =
1337            new Key<Rational>("android.sensor.baseGainFactor", Rational.class);
1338
1339    /**
1340     * <p>A fixed black level offset for each of the color filter arrangement
1341     * (CFA) mosaic channels.</p>
1342     * <p>This tag specifies the zero light value for each of the CFA mosaic
1343     * channels in the camera sensor.  The maximal value output by the
1344     * sensor is represented by the value in {@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}.</p>
1345     * <p>The values are given in row-column scan order, with the first value
1346     * corresponding to the element of the CFA in row=0, column=0.</p>
1347     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1348     *
1349     * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL
1350     */
1351    public static final Key<int[]> SENSOR_BLACK_LEVEL_PATTERN =
1352            new Key<int[]>("android.sensor.blackLevelPattern", int[].class);
1353
1354    /**
1355     * <p>Maximum sensitivity that is implemented
1356     * purely through analog gain.</p>
1357     * <p>For {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} values less than or
1358     * equal to this, all applied gain must be analog. For
1359     * values above this, the gain applied can be a mix of analog and
1360     * digital.</p>
1361     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1362     * <p><b>Full capability</b> -
1363     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1364     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1365     *
1366     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1367     * @see CaptureRequest#SENSOR_SENSITIVITY
1368     */
1369    public static final Key<Integer> SENSOR_MAX_ANALOG_SENSITIVITY =
1370            new Key<Integer>("android.sensor.maxAnalogSensitivity", int.class);
1371
1372    /**
1373     * <p>Clockwise angle through which the output
1374     * image needs to be rotated to be upright on the device
1375     * screen in its native orientation. Also defines the
1376     * direction of rolling shutter readout, which is from top
1377     * to bottom in the sensor's coordinate system</p>
1378     */
1379    public static final Key<Integer> SENSOR_ORIENTATION =
1380            new Key<Integer>("android.sensor.orientation", int.class);
1381
1382    /**
1383     * <p>Optional. Defaults to [OFF]. Lists the supported test
1384     * pattern modes for {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}.</p>
1385     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1386     *
1387     * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1388     */
1389    public static final Key<int[]> SENSOR_AVAILABLE_TEST_PATTERN_MODES =
1390            new Key<int[]>("android.sensor.availableTestPatternModes", int[].class);
1391
1392    /**
1393     * <p>Which face detection modes are available,
1394     * if any</p>
1395     * <p>OFF means face detection is disabled, it must
1396     * be included in the list.</p>
1397     * <p>SIMPLE means the device supports the
1398     * android.statistics.faceRectangles and
1399     * android.statistics.faceScores outputs.</p>
1400     * <p>FULL means the device additionally supports the
1401     * android.statistics.faceIds and
1402     * android.statistics.faceLandmarks outputs.</p>
1403     */
1404    public static final Key<byte[]> STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES =
1405            new Key<byte[]>("android.statistics.info.availableFaceDetectModes", byte[].class);
1406
1407    /**
1408     * <p>Maximum number of simultaneously detectable
1409     * faces</p>
1410     */
1411    public static final Key<Integer> STATISTICS_INFO_MAX_FACE_COUNT =
1412            new Key<Integer>("android.statistics.info.maxFaceCount", int.class);
1413
1414    /**
1415     * <p>The set of hot pixel map output modes supported by this camera device.</p>
1416     * <p>This tag lists valid output modes for {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode}.</p>
1417     * <p>If no hotpixel map is available for this camera device, this will contain
1418     * only OFF.  If the hotpixel map is available, this should include both
1419     * the ON and OFF options.</p>
1420     *
1421     * @see CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE
1422     */
1423    public static final Key<boolean[]> STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES =
1424            new Key<boolean[]>("android.statistics.info.availableHotPixelMapModes", boolean[].class);
1425
1426    /**
1427     * <p>Maximum number of supported points in the
1428     * tonemap curve that can be used for {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed}, or
1429     * {@link CaptureRequest#TONEMAP_CURVE_GREEN android.tonemap.curveGreen}, or {@link CaptureRequest#TONEMAP_CURVE_BLUE android.tonemap.curveBlue}.</p>
1430     * <p>If the actual number of points provided by the application (in
1431     * android.tonemap.curve*)  is less than max, the camera device will
1432     * resample the curve to its internal representation, using linear
1433     * interpolation.</p>
1434     * <p>The output curves in the result metadata may have a different number
1435     * of points than the input curves, and will represent the actual
1436     * hardware curves used as closely as possible when linearly interpolated.</p>
1437     *
1438     * @see CaptureRequest#TONEMAP_CURVE_BLUE
1439     * @see CaptureRequest#TONEMAP_CURVE_GREEN
1440     * @see CaptureRequest#TONEMAP_CURVE_RED
1441     */
1442    public static final Key<Integer> TONEMAP_MAX_CURVE_POINTS =
1443            new Key<Integer>("android.tonemap.maxCurvePoints", int.class);
1444
1445    /**
1446     * <p>The set of tonemapping modes supported by this camera device.</p>
1447     * <p>This tag lists the valid modes for {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}.</p>
1448     * <p>Full-capability camera devices must always support CONTRAST_CURVE and
1449     * FAST.</p>
1450     *
1451     * @see CaptureRequest#TONEMAP_MODE
1452     */
1453    public static final Key<byte[]> TONEMAP_AVAILABLE_TONE_MAP_MODES =
1454            new Key<byte[]>("android.tonemap.availableToneMapModes", byte[].class);
1455
1456    /**
1457     * <p>A list of camera LEDs that are available on this system.</p>
1458     * @see #LED_AVAILABLE_LEDS_TRANSMIT
1459     * @hide
1460     */
1461    public static final Key<int[]> LED_AVAILABLE_LEDS =
1462            new Key<int[]>("android.led.availableLeds", int[].class);
1463
1464    /**
1465     * <p>Generally classifies the overall set of the camera device functionality.</p>
1466     * <p>Camera devices will come in two flavors: LIMITED and FULL.</p>
1467     * <p>A FULL device has the most support possible and will enable the
1468     * widest range of use cases such as:</p>
1469     * <ul>
1470     * <li>30 FPS at maximum resolution (== sensor resolution)</li>
1471     * <li>Per frame control</li>
1472     * <li>Manual sensor control</li>
1473     * <li>Zero Shutter Lag (ZSL)</li>
1474     * </ul>
1475     * <p>A LIMITED device may have some or none of the above characteristics.
1476     * To find out more refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
1477     *
1478     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1479     * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED
1480     * @see #INFO_SUPPORTED_HARDWARE_LEVEL_FULL
1481     */
1482    public static final Key<Integer> INFO_SUPPORTED_HARDWARE_LEVEL =
1483            new Key<Integer>("android.info.supportedHardwareLevel", int.class);
1484
1485    /**
1486     * <p>The maximum number of frames that can occur after a request
1487     * (different than the previous) has been submitted, and before the
1488     * result's state becomes synchronized (by setting
1489     * android.sync.frameNumber to a non-negative value).</p>
1490     * <p>This defines the maximum distance (in number of metadata results),
1491     * between android.sync.frameNumber and the equivalent
1492     * android.request.frameCount.</p>
1493     * <p>In other words this acts as an upper boundary for how many frames
1494     * must occur before the camera device knows for a fact that the new
1495     * submitted camera settings have been applied in outgoing frames.</p>
1496     * <p>For example if the distance was 2,</p>
1497     * <pre><code>initial request = X (repeating)
1498     * request1 = X
1499     * request2 = Y
1500     * request3 = Y
1501     * request4 = Y
1502     *
1503     * where requestN has frameNumber N, and the first of the repeating
1504     * initial request's has frameNumber F (and F &lt; 1).
1505     *
1506     * initial result = X' + { android.sync.frameNumber == F }
1507     * result1 = X' + { android.sync.frameNumber == F }
1508     * result2 = X' + { android.sync.frameNumber == CONVERGING }
1509     * result3 = X' + { android.sync.frameNumber == CONVERGING }
1510     * result4 = X' + { android.sync.frameNumber == 2 }
1511     *
1512     * where resultN has frameNumber N.
1513     * </code></pre>
1514     * <p>Since <code>result4</code> has a <code>frameNumber == 4</code> and
1515     * <code>android.sync.frameNumber == 2</code>, the distance is clearly
1516     * <code>4 - 2 = 2</code>.</p>
1517     * @see #SYNC_MAX_LATENCY_PER_FRAME_CONTROL
1518     * @see #SYNC_MAX_LATENCY_UNKNOWN
1519     */
1520    public static final Key<Integer> SYNC_MAX_LATENCY =
1521            new Key<Integer>("android.sync.maxLatency", int.class);
1522
1523    /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
1524     * End generated code
1525     *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
1526}
1527