2 * Copyright (C) 2013 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package android.hardware.camera2;
19 import android.hardware.camera2.impl.CameraMetadataNative;
20 import android.hardware.camera2.impl.PublicKey;
21 import android.hardware.camera2.impl.SyntheticKey;
22 import android.util.Log;
24 import java.lang.reflect.Field;
25 import java.lang.reflect.Modifier;
26 import java.util.ArrayList;
27 import java.util.Arrays;
28 import java.util.Collections;
29 import java.util.List;
32 * The base class for camera controls and information.
35 * This class defines the basic key/value map used for querying for camera
36 * characteristics or capture results, and for setting camera request
41 * All instances of CameraMetadata are immutable. The list of keys with {@link #getKeys()}
42 * never changes, nor do the values returned by any key with {@code #get} throughout
43 * the lifetime of the object.
48 * @see CameraCharacteristics
50 public abstract class CameraMetadata<TKey> {
52 private static final String TAG = "CameraMetadataAb";
53 private static final boolean VERBOSE = Log.isLoggable(TAG, Log.VERBOSE);
56 * Set a camera metadata field to a value. The field definitions can be
57 * found in {@link CameraCharacteristics}, {@link CaptureResult}, and
58 * {@link CaptureRequest}.
60 * @param key The metadata field to write.
61 * @param value The value to set the field to, which must be of a matching
66 protected CameraMetadata() {
70 * Get a camera metadata field value.
72 * <p>The field definitions can be
73 * found in {@link CameraCharacteristics}, {@link CaptureResult}, and
74 * {@link CaptureRequest}.</p>
76 * <p>Querying the value for the same key more than once will return a value
77 * which is equal to the previous queried value.</p>
79 * @throws IllegalArgumentException if the key was not valid
81 * @param key The metadata field to read.
82 * @return The value of that key, or {@code null} if the field is not set.
86 protected abstract <T> T getProtected(TKey key);
91 protected abstract Class<TKey> getKeyClass();
94 * Returns a list of the keys contained in this map.
96 * <p>The list returned is not modifiable, so any attempts to modify it will throw
97 * a {@code UnsupportedOperationException}.</p>
99 * <p>All values retrieved by a key from this list with {@code #get} are guaranteed to be
100 * non-{@code null}. Each key is only listed once in the list. The order of the keys
103 * @return List of the keys contained in this map.
105 @SuppressWarnings("unchecked")
106 public List<TKey> getKeys() {
107 Class<CameraMetadata<TKey>> thisClass = (Class<CameraMetadata<TKey>>) getClass();
108 return Collections.unmodifiableList(
109 getKeysStatic(thisClass, getKeyClass(), this, /*filterTags*/null));
113 * Return a list of all the Key<?> that are declared as a field inside of the class
117 * Optionally, if {@code instance} is not null, then filter out any keys with null values.
121 * Optionally, if {@code filterTags} is not {@code null}, then filter out any keys
122 * whose native {@code tag} is not in {@code filterTags}. The {@code filterTags} array will be
123 * sorted as a side effect.
126 /*package*/ @SuppressWarnings("unchecked")
127 static <TKey> ArrayList<TKey> getKeysStatic(
128 Class<?> type, Class<TKey> keyClass,
129 CameraMetadata<TKey> instance,
132 if (VERBOSE) Log.v(TAG, "getKeysStatic for " + type);
134 // TotalCaptureResult does not have any of the keys on it, use CaptureResult instead
135 if (type.equals(TotalCaptureResult.class)) {
136 type = CaptureResult.class;
139 if (filterTags != null) {
140 Arrays.sort(filterTags);
143 ArrayList<TKey> keyList = new ArrayList<TKey>();
145 Field[] fields = type.getDeclaredFields();
146 for (Field field : fields) {
147 // Filter for Keys that are public
148 if (field.getType().isAssignableFrom(keyClass) &&
149 (field.getModifiers() & Modifier.PUBLIC) != 0) {
153 key = (TKey) field.get(instance);
154 } catch (IllegalAccessException e) {
155 throw new AssertionError("Can't get IllegalAccessException", e);
156 } catch (IllegalArgumentException e) {
157 throw new AssertionError("Can't get IllegalArgumentException", e);
160 if (instance == null || instance.getProtected(key) != null) {
161 if (shouldKeyBeAdded(key, field, filterTags)) {
165 Log.v(TAG, "getKeysStatic - key was added - " + key);
167 } else if (VERBOSE) {
168 Log.v(TAG, "getKeysStatic - key was filtered - " + key);
177 @SuppressWarnings("rawtypes")
178 private static <TKey> boolean shouldKeyBeAdded(TKey key, Field field, int[] filterTags) {
180 throw new NullPointerException("key must not be null");
183 CameraMetadataNative.Key nativeKey;
186 * Get the native key from the public api key
188 if (key instanceof CameraCharacteristics.Key) {
189 nativeKey = ((CameraCharacteristics.Key)key).getNativeKey();
190 } else if (key instanceof CaptureResult.Key) {
191 nativeKey = ((CaptureResult.Key)key).getNativeKey();
192 } else if (key instanceof CaptureRequest.Key) {
193 nativeKey = ((CaptureRequest.Key)key).getNativeKey();
195 // Reject fields that aren't a key
196 throw new IllegalArgumentException("key type must be that of a metadata key");
199 if (field.getAnnotation(PublicKey.class) == null) {
200 // Never expose @hide keys up to the API user
204 // No filtering necessary
205 if (filterTags == null) {
209 if (field.getAnnotation(SyntheticKey.class) != null) {
210 // This key is synthetic, so calling #getTag will throw IAE
212 // TODO: don't just assume all public+synthetic keys are always available
217 * Regular key: look up it's native tag and see if it's in filterTags
220 int keyTag = nativeKey.getTag();
222 // non-negative result is returned iff the value is in the array
223 return Arrays.binarySearch(filterTags, keyTag) >= 0;
226 /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
227 * The enum values below this point are generated from metadata
228 * definitions in /system/media/camera/docs. Do not modify by hand or
229 * modify the comment blocks at the start or end.
230 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
233 // Enumeration values for CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
237 * <p>The lens focus distance is not accurate, and the units used for
238 * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} do not correspond to any physical units.</p>
239 * <p>Setting the lens to the same focus distance on separate occasions may
240 * result in a different real focus distance, depending on factors such
241 * as the orientation of the device, the age of the focusing mechanism,
242 * and the device temperature. The focus distance value will still be
243 * in the range of <code>[0, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code>, where 0
244 * represents the farthest focus.</p>
246 * @see CaptureRequest#LENS_FOCUS_DISTANCE
247 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
248 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
250 public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED = 0;
253 * <p>The lens focus distance is measured in diopters.</p>
254 * <p>However, setting the lens to the same focus distance
255 * on separate occasions may result in a different real
256 * focus distance, depending on factors such as the
257 * orientation of the device, the age of the focusing
258 * mechanism, and the device temperature.</p>
259 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
261 public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE = 1;
264 * <p>The lens focus distance is measured in diopters, and
266 * <p>The lens mechanism is calibrated so that setting the
267 * same focus distance is repeatable on multiple
268 * occasions with good accuracy, and the focus distance
269 * corresponds to the real physical distance to the plane
271 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
273 public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED = 2;
276 // Enumeration values for CameraCharacteristics#LENS_FACING
280 * <p>The camera device faces the same direction as the device's screen.</p>
281 * @see CameraCharacteristics#LENS_FACING
283 public static final int LENS_FACING_FRONT = 0;
286 * <p>The camera device faces the opposite direction as the device's screen.</p>
287 * @see CameraCharacteristics#LENS_FACING
289 public static final int LENS_FACING_BACK = 1;
292 // Enumeration values for CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
296 * <p>The minimal set of capabilities that every camera
297 * device (regardless of {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel})
299 * <p>This capability is listed by all devices, and
300 * indicates that the camera device has a feature set
301 * that's comparable to the baseline requirements for the
302 * older android.hardware.Camera API.</p>
304 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
305 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
307 public static final int REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE = 0;
310 * <p>The camera device can be manually controlled (3A algorithms such
311 * as auto-exposure, and auto-focus can be bypassed).
312 * The camera device supports basic manual control of the sensor image
313 * acquisition related stages. This means the following controls are
314 * guaranteed to be supported:</p>
316 * <li>Manual frame duration control<ul>
317 * <li>{@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}</li>
318 * <li>{@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li>
321 * <li>Manual exposure control<ul>
322 * <li>{@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</li>
323 * <li>{@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
326 * <li>Manual sensitivity control<ul>
327 * <li>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</li>
328 * <li>{@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</li>
331 * <li>Manual lens control (if the lens is adjustable)<ul>
332 * <li>android.lens.*</li>
335 * <li>Manual flash control (if a flash unit is present)<ul>
336 * <li>android.flash.*</li>
339 * <li>Manual black level locking<ul>
340 * <li>{@link CaptureRequest#BLACK_LEVEL_LOCK android.blackLevel.lock}</li>
344 * <p>If any of the above 3A algorithms are enabled, then the camera
345 * device will accurately report the values applied by 3A in the
347 * <p>A given camera device may also support additional manual sensor controls,
348 * but this capability only covers the above list of controls.</p>
349 * <p>If this is supported, {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} will
350 * additionally return a min frame duration that is greater than
351 * zero for each supported size-format combination.</p>
353 * @see CaptureRequest#BLACK_LEVEL_LOCK
354 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
355 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
356 * @see CaptureRequest#SENSOR_FRAME_DURATION
357 * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
358 * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
359 * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
360 * @see CaptureRequest#SENSOR_SENSITIVITY
361 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
363 public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR = 1;
366 * <p>The camera device post-processing stages can be manually controlled.
367 * The camera device supports basic manual control of the image post-processing
368 * stages. This means the following controls are guaranteed to be supported:</p>
370 * <li>Manual tonemap control<ul>
371 * <li>{@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}</li>
372 * <li>{@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</li>
373 * <li>{@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</li>
376 * <li>Manual white balance control<ul>
377 * <li>{@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}</li>
378 * <li>{@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}</li>
381 * <li>Manual lens shading map control<ul>
382 * <li>{@link CaptureRequest#SHADING_MODE android.shading.mode}</li>
383 * <li>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode}</li>
384 * <li>android.statistics.lensShadingMap</li>
385 * <li>android.lens.info.shadingMapSize</li>
388 * <li>Manual aberration correction control (if aberration correction is supported)<ul>
389 * <li>{@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}</li>
390 * <li>{@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES android.colorCorrection.availableAberrationModes}</li>
394 * <p>If auto white balance is enabled, then the camera device
395 * will accurately report the values applied by AWB in the result.</p>
396 * <p>A given camera device may also support additional post-processing
397 * controls, but this capability only covers the above list of controls.</p>
399 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
400 * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
401 * @see CaptureRequest#COLOR_CORRECTION_GAINS
402 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
403 * @see CaptureRequest#SHADING_MODE
404 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
405 * @see CaptureRequest#TONEMAP_CURVE
406 * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
407 * @see CaptureRequest#TONEMAP_MODE
408 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
410 public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING = 2;
413 * <p>The camera device supports outputting RAW buffers and
414 * metadata for interpreting them.</p>
415 * <p>Devices supporting the RAW capability allow both for
416 * saving DNG files, and for direct application processing of
417 * raw sensor images.</p>
419 * <li>RAW_SENSOR is supported as an output format.</li>
420 * <li>The maximum available resolution for RAW_SENSOR streams
421 * will match either the value in
422 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize} or
423 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</li>
424 * <li>All DNG-related optional metadata entries are provided
425 * by the camera device.</li>
428 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
429 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
430 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
432 public static final int REQUEST_AVAILABLE_CAPABILITIES_RAW = 3;
435 * <p>The camera device supports the Zero Shutter Lag use case.</p>
437 * <li>At least one input stream can be used.</li>
438 * <li>RAW_OPAQUE is supported as an output/input format</li>
439 * <li>Using RAW_OPAQUE does not cause a frame rate drop
440 * relative to the sensor's maximum capture rate (at that
442 * <li>RAW_OPAQUE will be reprocessable into both YUV_420_888
443 * and JPEG formats.</li>
444 * <li>The maximum available resolution for RAW_OPAQUE streams
445 * (both input/output) will match the maximum available
446 * resolution of JPEG streams.</li>
448 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
451 public static final int REQUEST_AVAILABLE_CAPABILITIES_ZSL = 4;
454 * <p>The camera device supports accurately reporting the sensor settings for many of
455 * the sensor controls while the built-in 3A algorithm is running. This allows
456 * reporting of sensor settings even when these settings cannot be manually changed.</p>
457 * <p>The values reported for the following controls are guaranteed to be available
458 * in the CaptureResult, including when 3A is enabled:</p>
460 * <li>Exposure control<ul>
461 * <li>{@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</li>
464 * <li>Sensitivity control<ul>
465 * <li>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</li>
468 * <li>Lens controls (if the lens is adjustable)<ul>
469 * <li>{@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}</li>
470 * <li>{@link CaptureRequest#LENS_APERTURE android.lens.aperture}</li>
474 * <p>This capability is a subset of the MANUAL_SENSOR control capability, and will
475 * always be included if the MANUAL_SENSOR capability is available.</p>
477 * @see CaptureRequest#LENS_APERTURE
478 * @see CaptureRequest#LENS_FOCUS_DISTANCE
479 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
480 * @see CaptureRequest#SENSOR_SENSITIVITY
481 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
483 public static final int REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS = 5;
486 * <p>The camera device supports capturing maximum-resolution
487 * images at >= 20 frames per second, in at least the
488 * uncompressed YUV format, when post-processing settings
489 * are set to FAST.</p>
490 * <p>More specifically, this means that a size matching the
491 * camera device's active array size is listed as a
492 * supported size for the YUV_420_888 format in
493 * {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}, the minimum frame
494 * duration for that format and size is <= 1/20 s, and
495 * the {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges} entry
496 * lists at least one FPS range where the minimum FPS is</p>
498 * <p>= 1 / minimumFrameDuration for the maximum-size
499 * YUV_420_888 format.</p>
501 * <p>In addition, the {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} field is
502 * guaranted to have a value between 0 and 4, inclusive.</p>
504 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
505 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
506 * @see CameraCharacteristics#SYNC_MAX_LATENCY
507 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
509 public static final int REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE = 6;
512 // Enumeration values for CameraCharacteristics#SCALER_CROPPING_TYPE
516 * <p>The camera device only supports centered crop regions.</p>
517 * @see CameraCharacteristics#SCALER_CROPPING_TYPE
519 public static final int SCALER_CROPPING_TYPE_CENTER_ONLY = 0;
522 * <p>The camera device supports arbitrarily chosen crop regions.</p>
523 * @see CameraCharacteristics#SCALER_CROPPING_TYPE
525 public static final int SCALER_CROPPING_TYPE_FREEFORM = 1;
528 // Enumeration values for CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
532 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
534 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB = 0;
537 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
539 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG = 1;
542 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
544 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG = 2;
547 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
549 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR = 3;
552 * <p>Sensor is not Bayer; output has 3 16-bit
553 * values for each pixel, instead of just 1 16-bit value
555 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
557 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB = 4;
560 // Enumeration values for CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
564 * <p>Timestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in nanoseconds and monotonic,
565 * but can not be compared to timestamps from other subsystems
566 * (e.g. accelerometer, gyro etc.), or other instances of the same or different
567 * camera devices in the same system. Timestamps between streams and results for
568 * a single camera instance are comparable, and the timestamps for all buffers
569 * and the result metadata generated by a single capture are identical.</p>
571 * @see CaptureResult#SENSOR_TIMESTAMP
572 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
574 public static final int SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN = 0;
577 * <p>Timestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in the same timebase as
578 * android.os.SystemClock#elapsedRealtimeNanos(),
579 * and they can be compared to other timestamps using that base.</p>
581 * @see CaptureResult#SENSOR_TIMESTAMP
582 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
584 public static final int SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME = 1;
587 // Enumeration values for CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
591 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
593 public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT = 1;
596 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
598 public static final int SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT = 2;
601 * <p>Incandescent light</p>
602 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
604 public static final int SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN = 3;
607 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
609 public static final int SENSOR_REFERENCE_ILLUMINANT1_FLASH = 4;
612 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
614 public static final int SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER = 9;
617 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
619 public static final int SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER = 10;
622 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
624 public static final int SENSOR_REFERENCE_ILLUMINANT1_SHADE = 11;
627 * <p>D 5700 - 7100K</p>
628 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
630 public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT = 12;
633 * <p>N 4600 - 5400K</p>
634 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
636 public static final int SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT = 13;
639 * <p>W 3900 - 4500K</p>
640 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
642 public static final int SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT = 14;
645 * <p>WW 3200 - 3700K</p>
646 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
648 public static final int SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT = 15;
651 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
653 public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A = 17;
656 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
658 public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B = 18;
661 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
663 public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C = 19;
666 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
668 public static final int SENSOR_REFERENCE_ILLUMINANT1_D55 = 20;
671 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
673 public static final int SENSOR_REFERENCE_ILLUMINANT1_D65 = 21;
676 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
678 public static final int SENSOR_REFERENCE_ILLUMINANT1_D75 = 22;
681 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
683 public static final int SENSOR_REFERENCE_ILLUMINANT1_D50 = 23;
686 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
688 public static final int SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN = 24;
691 // Enumeration values for CameraCharacteristics#LED_AVAILABLE_LEDS
695 * <p>android.led.transmit control is used.</p>
696 * @see CameraCharacteristics#LED_AVAILABLE_LEDS
699 public static final int LED_AVAILABLE_LEDS_TRANSMIT = 0;
702 // Enumeration values for CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
706 * <p>This camera device has only limited capabilities.</p>
707 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
709 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0;
712 * <p>This camera device is capable of supporting advanced imaging applications.</p>
713 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
715 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1;
718 * <p>This camera device is running in backward compatibility mode.</p>
719 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
721 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY = 2;
724 // Enumeration values for CameraCharacteristics#SYNC_MAX_LATENCY
728 * <p>Every frame has the requests immediately applied.</p>
729 * <p>Furthermore for all results,
730 * <code>android.sync.frameNumber == CaptureResult#getFrameNumber()</code></p>
731 * <p>Changing controls over multiple requests one after another will
732 * produce results that have those controls applied atomically
734 * <p>All FULL capability devices will have this as their maxLatency.</p>
735 * @see CameraCharacteristics#SYNC_MAX_LATENCY
737 public static final int SYNC_MAX_LATENCY_PER_FRAME_CONTROL = 0;
740 * <p>Each new frame has some subset (potentially the entire set)
741 * of the past requests applied to the camera settings.</p>
742 * <p>By submitting a series of identical requests, the camera device
743 * will eventually have the camera settings applied, but it is
744 * unknown when that exact point will be.</p>
745 * <p>All LEGACY capability devices will have this as their maxLatency.</p>
746 * @see CameraCharacteristics#SYNC_MAX_LATENCY
748 public static final int SYNC_MAX_LATENCY_UNKNOWN = -1;
751 // Enumeration values for CaptureRequest#COLOR_CORRECTION_MODE
755 * <p>Use the {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} matrix
756 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} to do color conversion.</p>
757 * <p>All advanced white balance adjustments (not specified
758 * by our white balance pipeline) must be disabled.</p>
759 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
760 * TRANSFORM_MATRIX is ignored. The camera device will override
761 * this value to either FAST or HIGH_QUALITY.</p>
763 * @see CaptureRequest#COLOR_CORRECTION_GAINS
764 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
765 * @see CaptureRequest#CONTROL_AWB_MODE
766 * @see CaptureRequest#COLOR_CORRECTION_MODE
768 public static final int COLOR_CORRECTION_MODE_TRANSFORM_MATRIX = 0;
771 * <p>Color correction processing must not slow down
772 * capture rate relative to sensor raw output.</p>
773 * <p>Advanced white balance adjustments above and beyond
774 * the specified white balance pipeline may be applied.</p>
775 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
776 * the camera device uses the last frame's AWB values
777 * (or defaults if AWB has never been run).</p>
779 * @see CaptureRequest#CONTROL_AWB_MODE
780 * @see CaptureRequest#COLOR_CORRECTION_MODE
782 public static final int COLOR_CORRECTION_MODE_FAST = 1;
785 * <p>Color correction processing operates at improved
786 * quality but reduced capture rate (relative to sensor raw
788 * <p>Advanced white balance adjustments above and beyond
789 * the specified white balance pipeline may be applied.</p>
790 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
791 * the camera device uses the last frame's AWB values
792 * (or defaults if AWB has never been run).</p>
794 * @see CaptureRequest#CONTROL_AWB_MODE
795 * @see CaptureRequest#COLOR_CORRECTION_MODE
797 public static final int COLOR_CORRECTION_MODE_HIGH_QUALITY = 2;
800 // Enumeration values for CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
804 * <p>No aberration correction is applied.</p>
805 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
807 public static final int COLOR_CORRECTION_ABERRATION_MODE_OFF = 0;
810 * <p>Aberration correction will not slow down capture rate
811 * relative to sensor raw output.</p>
812 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
814 public static final int COLOR_CORRECTION_ABERRATION_MODE_FAST = 1;
817 * <p>Aberration correction operates at improved quality but reduced
818 * capture rate (relative to sensor raw output).</p>
819 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
821 public static final int COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY = 2;
824 // Enumeration values for CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
828 * <p>The camera device will not adjust exposure duration to
829 * avoid banding problems.</p>
830 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
832 public static final int CONTROL_AE_ANTIBANDING_MODE_OFF = 0;
835 * <p>The camera device will adjust exposure duration to
836 * avoid banding problems with 50Hz illumination sources.</p>
837 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
839 public static final int CONTROL_AE_ANTIBANDING_MODE_50HZ = 1;
842 * <p>The camera device will adjust exposure duration to
843 * avoid banding problems with 60Hz illumination
845 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
847 public static final int CONTROL_AE_ANTIBANDING_MODE_60HZ = 2;
850 * <p>The camera device will automatically adapt its
851 * antibanding routine to the current illumination
852 * condition. This is the default mode if AUTO is
853 * available on given camera device.</p>
854 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
856 public static final int CONTROL_AE_ANTIBANDING_MODE_AUTO = 3;
859 // Enumeration values for CaptureRequest#CONTROL_AE_MODE
863 * <p>The camera device's autoexposure routine is disabled.</p>
864 * <p>The application-selected {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
865 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} and
866 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are used by the camera
867 * device, along with android.flash.* fields, if there's
868 * a flash unit for this camera device.</p>
869 * <p>Note that auto-white balance (AWB) and auto-focus (AF)
870 * behavior is device dependent when AE is in OFF mode.
871 * To have consistent behavior across different devices,
872 * it is recommended to either set AWB and AF to OFF mode
873 * or lock AWB and AF before setting AE to OFF.
874 * See {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode},
875 * {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}, and {@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}
876 * for more details.</p>
877 * <p>LEGACY devices do not support the OFF mode and will
878 * override attempts to use this value to ON.</p>
880 * @see CaptureRequest#CONTROL_AF_MODE
881 * @see CaptureRequest#CONTROL_AF_TRIGGER
882 * @see CaptureRequest#CONTROL_AWB_LOCK
883 * @see CaptureRequest#CONTROL_AWB_MODE
884 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
885 * @see CaptureRequest#SENSOR_FRAME_DURATION
886 * @see CaptureRequest#SENSOR_SENSITIVITY
887 * @see CaptureRequest#CONTROL_AE_MODE
889 public static final int CONTROL_AE_MODE_OFF = 0;
892 * <p>The camera device's autoexposure routine is active,
893 * with no flash control.</p>
894 * <p>The application's values for
895 * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
896 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and
897 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are ignored. The
898 * application has control over the various
899 * android.flash.* fields.</p>
901 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
902 * @see CaptureRequest#SENSOR_FRAME_DURATION
903 * @see CaptureRequest#SENSOR_SENSITIVITY
904 * @see CaptureRequest#CONTROL_AE_MODE
906 public static final int CONTROL_AE_MODE_ON = 1;
909 * <p>Like ON, except that the camera device also controls
910 * the camera's flash unit, firing it in low-light
912 * <p>The flash may be fired during a precapture sequence
913 * (triggered by {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and
914 * may be fired for captures for which the
915 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to
918 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
919 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
920 * @see CaptureRequest#CONTROL_AE_MODE
922 public static final int CONTROL_AE_MODE_ON_AUTO_FLASH = 2;
925 * <p>Like ON, except that the camera device also controls
926 * the camera's flash unit, always firing it for still
928 * <p>The flash may be fired during a precapture sequence
929 * (triggered by {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and
930 * will always be fired for captures for which the
931 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to
934 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
935 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
936 * @see CaptureRequest#CONTROL_AE_MODE
938 public static final int CONTROL_AE_MODE_ON_ALWAYS_FLASH = 3;
941 * <p>Like ON_AUTO_FLASH, but with automatic red eye
943 * <p>If deemed necessary by the camera device, a red eye
944 * reduction flash will fire during the precapture
946 * @see CaptureRequest#CONTROL_AE_MODE
948 public static final int CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE = 4;
951 // Enumeration values for CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
955 * <p>The trigger is idle.</p>
956 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
958 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_IDLE = 0;
961 * <p>The precapture metering sequence will be started
962 * by the camera device.</p>
963 * <p>The exact effect of the precapture trigger depends on
964 * the current AE mode and state.</p>
965 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
967 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_START = 1;
970 // Enumeration values for CaptureRequest#CONTROL_AF_MODE
974 * <p>The auto-focus routine does not control the lens;
975 * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} is controlled by the
978 * @see CaptureRequest#LENS_FOCUS_DISTANCE
979 * @see CaptureRequest#CONTROL_AF_MODE
981 public static final int CONTROL_AF_MODE_OFF = 0;
984 * <p>Basic automatic focus mode.</p>
985 * <p>In this mode, the lens does not move unless
986 * the autofocus trigger action is called. When that trigger
987 * is activated, AF will transition to ACTIVE_SCAN, then to
988 * the outcome of the scan (FOCUSED or NOT_FOCUSED).</p>
989 * <p>Always supported if lens is not fixed focus.</p>
990 * <p>Use {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} to determine if lens
991 * is fixed-focus.</p>
992 * <p>Triggering AF_CANCEL resets the lens position to default,
993 * and sets the AF state to INACTIVE.</p>
995 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
996 * @see CaptureRequest#CONTROL_AF_MODE
998 public static final int CONTROL_AF_MODE_AUTO = 1;
1001 * <p>Close-up focusing mode.</p>
1002 * <p>In this mode, the lens does not move unless the
1003 * autofocus trigger action is called. When that trigger is
1004 * activated, AF will transition to ACTIVE_SCAN, then to
1005 * the outcome of the scan (FOCUSED or NOT_FOCUSED). This
1006 * mode is optimized for focusing on objects very close to
1008 * <p>When that trigger is activated, AF will transition to
1009 * ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or
1010 * NOT_FOCUSED). Triggering cancel AF resets the lens
1011 * position to default, and sets the AF state to
1013 * @see CaptureRequest#CONTROL_AF_MODE
1015 public static final int CONTROL_AF_MODE_MACRO = 2;
1018 * <p>In this mode, the AF algorithm modifies the lens
1019 * position continually to attempt to provide a
1020 * constantly-in-focus image stream.</p>
1021 * <p>The focusing behavior should be suitable for good quality
1022 * video recording; typically this means slower focus
1023 * movement and no overshoots. When the AF trigger is not
1024 * involved, the AF algorithm should start in INACTIVE state,
1025 * and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED
1026 * states as appropriate. When the AF trigger is activated,
1027 * the algorithm should immediately transition into
1028 * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
1029 * lens position until a cancel AF trigger is received.</p>
1030 * <p>Once cancel is received, the algorithm should transition
1031 * back to INACTIVE and resume passive scan. Note that this
1032 * behavior is not identical to CONTINUOUS_PICTURE, since an
1033 * ongoing PASSIVE_SCAN must immediately be
1035 * @see CaptureRequest#CONTROL_AF_MODE
1037 public static final int CONTROL_AF_MODE_CONTINUOUS_VIDEO = 3;
1040 * <p>In this mode, the AF algorithm modifies the lens
1041 * position continually to attempt to provide a
1042 * constantly-in-focus image stream.</p>
1043 * <p>The focusing behavior should be suitable for still image
1044 * capture; typically this means focusing as fast as
1045 * possible. When the AF trigger is not involved, the AF
1046 * algorithm should start in INACTIVE state, and then
1047 * transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as
1048 * appropriate as it attempts to maintain focus. When the AF
1049 * trigger is activated, the algorithm should finish its
1050 * PASSIVE_SCAN if active, and then transition into
1051 * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
1052 * lens position until a cancel AF trigger is received.</p>
1053 * <p>When the AF cancel trigger is activated, the algorithm
1054 * should transition back to INACTIVE and then act as if it
1055 * has just been started.</p>
1056 * @see CaptureRequest#CONTROL_AF_MODE
1058 public static final int CONTROL_AF_MODE_CONTINUOUS_PICTURE = 4;
1061 * <p>Extended depth of field (digital focus) mode.</p>
1062 * <p>The camera device will produce images with an extended
1063 * depth of field automatically; no special focusing
1064 * operations need to be done before taking a picture.</p>
1065 * <p>AF triggers are ignored, and the AF state will always be
1067 * @see CaptureRequest#CONTROL_AF_MODE
1069 public static final int CONTROL_AF_MODE_EDOF = 5;
1072 // Enumeration values for CaptureRequest#CONTROL_AF_TRIGGER
1076 * <p>The trigger is idle.</p>
1077 * @see CaptureRequest#CONTROL_AF_TRIGGER
1079 public static final int CONTROL_AF_TRIGGER_IDLE = 0;
1082 * <p>Autofocus will trigger now.</p>
1083 * @see CaptureRequest#CONTROL_AF_TRIGGER
1085 public static final int CONTROL_AF_TRIGGER_START = 1;
1088 * <p>Autofocus will return to its initial
1089 * state, and cancel any currently active trigger.</p>
1090 * @see CaptureRequest#CONTROL_AF_TRIGGER
1092 public static final int CONTROL_AF_TRIGGER_CANCEL = 2;
1095 // Enumeration values for CaptureRequest#CONTROL_AWB_MODE
1099 * <p>The camera device's auto-white balance routine is disabled.</p>
1100 * <p>The application-selected color transform matrix
1101 * ({@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}) and gains
1102 * ({@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}) are used by the camera
1103 * device for manual white balance control.</p>
1105 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1106 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1107 * @see CaptureRequest#CONTROL_AWB_MODE
1109 public static final int CONTROL_AWB_MODE_OFF = 0;
1112 * <p>The camera device's auto-white balance routine is active.</p>
1113 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1114 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1115 * For devices that support the MANUAL_POST_PROCESSING capability, the
1116 * values used by the camera device for the transform and gains
1117 * will be available in the capture result for this request.</p>
1119 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1120 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1121 * @see CaptureRequest#CONTROL_AWB_MODE
1123 public static final int CONTROL_AWB_MODE_AUTO = 1;
1126 * <p>The camera device's auto-white balance routine is disabled;
1127 * the camera device uses incandescent light as the assumed scene
1128 * illumination for white balance.</p>
1129 * <p>While the exact white balance transforms are up to the
1130 * camera device, they will approximately match the CIE
1131 * standard illuminant A.</p>
1132 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1133 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1134 * For devices that support the MANUAL_POST_PROCESSING capability, the
1135 * values used by the camera device for the transform and gains
1136 * will be available in the capture result for this request.</p>
1138 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1139 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1140 * @see CaptureRequest#CONTROL_AWB_MODE
1142 public static final int CONTROL_AWB_MODE_INCANDESCENT = 2;
1145 * <p>The camera device's auto-white balance routine is disabled;
1146 * the camera device uses fluorescent light as the assumed scene
1147 * illumination for white balance.</p>
1148 * <p>While the exact white balance transforms are up to the
1149 * camera device, they will approximately match the CIE
1150 * standard illuminant F2.</p>
1151 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1152 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1153 * For devices that support the MANUAL_POST_PROCESSING capability, the
1154 * values used by the camera device for the transform and gains
1155 * will be available in the capture result for this request.</p>
1157 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1158 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1159 * @see CaptureRequest#CONTROL_AWB_MODE
1161 public static final int CONTROL_AWB_MODE_FLUORESCENT = 3;
1164 * <p>The camera device's auto-white balance routine is disabled;
1165 * the camera device uses warm fluorescent light as the assumed scene
1166 * illumination for white balance.</p>
1167 * <p>While the exact white balance transforms are up to the
1168 * camera device, they will approximately match the CIE
1169 * standard illuminant F4.</p>
1170 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1171 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1172 * For devices that support the MANUAL_POST_PROCESSING capability, the
1173 * values used by the camera device for the transform and gains
1174 * will be available in the capture result for this request.</p>
1176 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1177 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1178 * @see CaptureRequest#CONTROL_AWB_MODE
1180 public static final int CONTROL_AWB_MODE_WARM_FLUORESCENT = 4;
1183 * <p>The camera device's auto-white balance routine is disabled;
1184 * the camera device uses daylight light as the assumed scene
1185 * illumination for white balance.</p>
1186 * <p>While the exact white balance transforms are up to the
1187 * camera device, they will approximately match the CIE
1188 * standard illuminant D65.</p>
1189 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1190 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1191 * For devices that support the MANUAL_POST_PROCESSING capability, the
1192 * values used by the camera device for the transform and gains
1193 * will be available in the capture result for this request.</p>
1195 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1196 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1197 * @see CaptureRequest#CONTROL_AWB_MODE
1199 public static final int CONTROL_AWB_MODE_DAYLIGHT = 5;
1202 * <p>The camera device's auto-white balance routine is disabled;
1203 * the camera device uses cloudy daylight light as the assumed scene
1204 * illumination for white balance.</p>
1205 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1206 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1207 * For devices that support the MANUAL_POST_PROCESSING capability, the
1208 * values used by the camera device for the transform and gains
1209 * will be available in the capture result for this request.</p>
1211 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1212 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1213 * @see CaptureRequest#CONTROL_AWB_MODE
1215 public static final int CONTROL_AWB_MODE_CLOUDY_DAYLIGHT = 6;
1218 * <p>The camera device's auto-white balance routine is disabled;
1219 * the camera device uses twilight light as the assumed scene
1220 * illumination for white balance.</p>
1221 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1222 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1223 * For devices that support the MANUAL_POST_PROCESSING capability, the
1224 * values used by the camera device for the transform and gains
1225 * will be available in the capture result for this request.</p>
1227 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1228 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1229 * @see CaptureRequest#CONTROL_AWB_MODE
1231 public static final int CONTROL_AWB_MODE_TWILIGHT = 7;
1234 * <p>The camera device's auto-white balance routine is disabled;
1235 * the camera device uses shade light as the assumed scene
1236 * illumination for white balance.</p>
1237 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1238 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1239 * For devices that support the MANUAL_POST_PROCESSING capability, the
1240 * values used by the camera device for the transform and gains
1241 * will be available in the capture result for this request.</p>
1243 * @see CaptureRequest#COLOR_CORRECTION_GAINS
1244 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1245 * @see CaptureRequest#CONTROL_AWB_MODE
1247 public static final int CONTROL_AWB_MODE_SHADE = 8;
1250 // Enumeration values for CaptureRequest#CONTROL_CAPTURE_INTENT
1254 * <p>The goal of this request doesn't fall into the other
1255 * categories. The camera device will default to preview-like
1257 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1259 public static final int CONTROL_CAPTURE_INTENT_CUSTOM = 0;
1262 * <p>This request is for a preview-like use case.</p>
1263 * <p>The precapture trigger may be used to start off a metering
1264 * w/flash sequence.</p>
1265 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1267 public static final int CONTROL_CAPTURE_INTENT_PREVIEW = 1;
1270 * <p>This request is for a still capture-type
1272 * <p>If the flash unit is under automatic control, it may fire as needed.</p>
1273 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1275 public static final int CONTROL_CAPTURE_INTENT_STILL_CAPTURE = 2;
1278 * <p>This request is for a video recording
1280 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1282 public static final int CONTROL_CAPTURE_INTENT_VIDEO_RECORD = 3;
1285 * <p>This request is for a video snapshot (still
1286 * image while recording video) use case.</p>
1287 * <p>The camera device should take the highest-quality image
1288 * possible (given the other settings) without disrupting the
1289 * frame rate of video recording. </p>
1290 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1292 public static final int CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT = 4;
1295 * <p>This request is for a ZSL usecase; the
1296 * application will stream full-resolution images and
1297 * reprocess one or several later for a final
1299 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1301 public static final int CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG = 5;
1304 * <p>This request is for manual capture use case where
1305 * the applications want to directly control the capture parameters.</p>
1306 * <p>For example, the application may wish to manually control
1307 * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, etc.</p>
1309 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
1310 * @see CaptureRequest#SENSOR_SENSITIVITY
1311 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1313 public static final int CONTROL_CAPTURE_INTENT_MANUAL = 6;
1316 // Enumeration values for CaptureRequest#CONTROL_EFFECT_MODE
1320 * <p>No color effect will be applied.</p>
1321 * @see CaptureRequest#CONTROL_EFFECT_MODE
1323 public static final int CONTROL_EFFECT_MODE_OFF = 0;
1326 * <p>A "monocolor" effect where the image is mapped into
1327 * a single color.</p>
1328 * <p>This will typically be grayscale.</p>
1329 * @see CaptureRequest#CONTROL_EFFECT_MODE
1331 public static final int CONTROL_EFFECT_MODE_MONO = 1;
1334 * <p>A "photo-negative" effect where the image's colors
1336 * @see CaptureRequest#CONTROL_EFFECT_MODE
1338 public static final int CONTROL_EFFECT_MODE_NEGATIVE = 2;
1341 * <p>A "solarisation" effect (Sabattier effect) where the
1342 * image is wholly or partially reversed in
1344 * @see CaptureRequest#CONTROL_EFFECT_MODE
1346 public static final int CONTROL_EFFECT_MODE_SOLARIZE = 3;
1349 * <p>A "sepia" effect where the image is mapped into warm
1350 * gray, red, and brown tones.</p>
1351 * @see CaptureRequest#CONTROL_EFFECT_MODE
1353 public static final int CONTROL_EFFECT_MODE_SEPIA = 4;
1356 * <p>A "posterization" effect where the image uses
1357 * discrete regions of tone rather than a continuous
1358 * gradient of tones.</p>
1359 * @see CaptureRequest#CONTROL_EFFECT_MODE
1361 public static final int CONTROL_EFFECT_MODE_POSTERIZE = 5;
1364 * <p>A "whiteboard" effect where the image is typically displayed
1365 * as regions of white, with black or grey details.</p>
1366 * @see CaptureRequest#CONTROL_EFFECT_MODE
1368 public static final int CONTROL_EFFECT_MODE_WHITEBOARD = 6;
1371 * <p>A "blackboard" effect where the image is typically displayed
1372 * as regions of black, with white or grey details.</p>
1373 * @see CaptureRequest#CONTROL_EFFECT_MODE
1375 public static final int CONTROL_EFFECT_MODE_BLACKBOARD = 7;
1378 * <p>An "aqua" effect where a blue hue is added to the image.</p>
1379 * @see CaptureRequest#CONTROL_EFFECT_MODE
1381 public static final int CONTROL_EFFECT_MODE_AQUA = 8;
1384 // Enumeration values for CaptureRequest#CONTROL_MODE
1388 * <p>Full application control of pipeline.</p>
1389 * <p>All control by the device's metering and focusing (3A)
1390 * routines is disabled, and no other settings in
1391 * android.control.* have any effect, except that
1392 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} may be used by the camera
1393 * device to select post-processing values for processing
1394 * blocks that do not allow for manual control, or are not
1395 * exposed by the camera API.</p>
1396 * <p>However, the camera device's 3A routines may continue to
1397 * collect statistics and update their internal state so that
1398 * when control is switched to AUTO mode, good control values
1399 * can be immediately applied.</p>
1401 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1402 * @see CaptureRequest#CONTROL_MODE
1404 public static final int CONTROL_MODE_OFF = 0;
1407 * <p>Use settings for each individual 3A routine.</p>
1408 * <p>Manual control of capture parameters is disabled. All
1409 * controls in android.control.* besides sceneMode take
1411 * @see CaptureRequest#CONTROL_MODE
1413 public static final int CONTROL_MODE_AUTO = 1;
1416 * <p>Use a specific scene mode.</p>
1417 * <p>Enabling this disables control.aeMode, control.awbMode and
1418 * control.afMode controls; the camera device will ignore
1419 * those settings while USE_SCENE_MODE is active (except for
1420 * FACE_PRIORITY scene mode). Other control entries are still
1421 * active. This setting can only be used if scene mode is
1422 * supported (i.e. {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}
1423 * contain some modes other than DISABLED).</p>
1425 * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES
1426 * @see CaptureRequest#CONTROL_MODE
1428 public static final int CONTROL_MODE_USE_SCENE_MODE = 2;
1431 * <p>Same as OFF mode, except that this capture will not be
1432 * used by camera device background auto-exposure, auto-white balance and
1433 * auto-focus algorithms (3A) to update their statistics.</p>
1434 * <p>Specifically, the 3A routines are locked to the last
1435 * values set from a request with AUTO, OFF, or
1436 * USE_SCENE_MODE, and any statistics or state updates
1437 * collected from manual captures with OFF_KEEP_STATE will be
1438 * discarded by the camera device.</p>
1439 * @see CaptureRequest#CONTROL_MODE
1441 public static final int CONTROL_MODE_OFF_KEEP_STATE = 3;
1444 // Enumeration values for CaptureRequest#CONTROL_SCENE_MODE
1448 * <p>Indicates that no scene modes are set for a given capture request.</p>
1449 * @see CaptureRequest#CONTROL_SCENE_MODE
1451 public static final int CONTROL_SCENE_MODE_DISABLED = 0;
1454 * <p>If face detection support exists, use face
1455 * detection data for auto-focus, auto-white balance, and
1456 * auto-exposure routines.</p>
1457 * <p>If face detection statistics are disabled
1458 * (i.e. {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} is set to OFF),
1459 * this should still operate correctly (but will not return
1460 * face detection statistics to the framework).</p>
1461 * <p>Unlike the other scene modes, {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode},
1462 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}
1463 * remain active when FACE_PRIORITY is set.</p>
1465 * @see CaptureRequest#CONTROL_AE_MODE
1466 * @see CaptureRequest#CONTROL_AF_MODE
1467 * @see CaptureRequest#CONTROL_AWB_MODE
1468 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
1469 * @see CaptureRequest#CONTROL_SCENE_MODE
1471 public static final int CONTROL_SCENE_MODE_FACE_PRIORITY = 1;
1474 * <p>Optimized for photos of quickly moving objects.</p>
1475 * <p>Similar to SPORTS.</p>
1476 * @see CaptureRequest#CONTROL_SCENE_MODE
1478 public static final int CONTROL_SCENE_MODE_ACTION = 2;
1481 * <p>Optimized for still photos of people.</p>
1482 * @see CaptureRequest#CONTROL_SCENE_MODE
1484 public static final int CONTROL_SCENE_MODE_PORTRAIT = 3;
1487 * <p>Optimized for photos of distant macroscopic objects.</p>
1488 * @see CaptureRequest#CONTROL_SCENE_MODE
1490 public static final int CONTROL_SCENE_MODE_LANDSCAPE = 4;
1493 * <p>Optimized for low-light settings.</p>
1494 * @see CaptureRequest#CONTROL_SCENE_MODE
1496 public static final int CONTROL_SCENE_MODE_NIGHT = 5;
1499 * <p>Optimized for still photos of people in low-light
1501 * @see CaptureRequest#CONTROL_SCENE_MODE
1503 public static final int CONTROL_SCENE_MODE_NIGHT_PORTRAIT = 6;
1506 * <p>Optimized for dim, indoor settings where flash must
1508 * @see CaptureRequest#CONTROL_SCENE_MODE
1510 public static final int CONTROL_SCENE_MODE_THEATRE = 7;
1513 * <p>Optimized for bright, outdoor beach settings.</p>
1514 * @see CaptureRequest#CONTROL_SCENE_MODE
1516 public static final int CONTROL_SCENE_MODE_BEACH = 8;
1519 * <p>Optimized for bright, outdoor settings containing snow.</p>
1520 * @see CaptureRequest#CONTROL_SCENE_MODE
1522 public static final int CONTROL_SCENE_MODE_SNOW = 9;
1525 * <p>Optimized for scenes of the setting sun.</p>
1526 * @see CaptureRequest#CONTROL_SCENE_MODE
1528 public static final int CONTROL_SCENE_MODE_SUNSET = 10;
1531 * <p>Optimized to avoid blurry photos due to small amounts of
1532 * device motion (for example: due to hand shake).</p>
1533 * @see CaptureRequest#CONTROL_SCENE_MODE
1535 public static final int CONTROL_SCENE_MODE_STEADYPHOTO = 11;
1538 * <p>Optimized for nighttime photos of fireworks.</p>
1539 * @see CaptureRequest#CONTROL_SCENE_MODE
1541 public static final int CONTROL_SCENE_MODE_FIREWORKS = 12;
1544 * <p>Optimized for photos of quickly moving people.</p>
1545 * <p>Similar to ACTION.</p>
1546 * @see CaptureRequest#CONTROL_SCENE_MODE
1548 public static final int CONTROL_SCENE_MODE_SPORTS = 13;
1551 * <p>Optimized for dim, indoor settings with multiple moving
1553 * @see CaptureRequest#CONTROL_SCENE_MODE
1555 public static final int CONTROL_SCENE_MODE_PARTY = 14;
1558 * <p>Optimized for dim settings where the main light source
1560 * @see CaptureRequest#CONTROL_SCENE_MODE
1562 public static final int CONTROL_SCENE_MODE_CANDLELIGHT = 15;
1565 * <p>Optimized for accurately capturing a photo of barcode
1566 * for use by camera applications that wish to read the
1567 * barcode value.</p>
1568 * @see CaptureRequest#CONTROL_SCENE_MODE
1570 public static final int CONTROL_SCENE_MODE_BARCODE = 16;
1573 * <p>Optimized for high speed video recording (frame rate >=60fps) use case.</p>
1574 * <p>The supported high speed video sizes and fps ranges are specified in
1575 * android.control.availableHighSpeedVideoConfigurations. To get desired
1576 * output frame rates, the application is only allowed to select video size
1577 * and fps range combinations listed in this static metadata. The fps range
1578 * can be control via {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}.</p>
1579 * <p>In this mode, the camera device will override aeMode, awbMode, and afMode to
1580 * ON, ON, and CONTINUOUS_VIDEO, respectively. All post-processing block mode
1581 * controls will be overridden to be FAST. Therefore, no manual control of capture
1582 * and post-processing parameters is possible. All other controls operate the
1583 * same as when {@link CaptureRequest#CONTROL_MODE android.control.mode} == AUTO. This means that all other
1584 * android.control.* fields continue to work, such as</p>
1586 * <li>{@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}</li>
1587 * <li>{@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}</li>
1588 * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li>
1589 * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li>
1590 * <li>{@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</li>
1591 * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li>
1592 * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li>
1593 * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li>
1594 * <li>{@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}</li>
1595 * <li>{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}</li>
1597 * <p>Outside of android.control.*, the following controls will work:</p>
1599 * <li>{@link CaptureRequest#FLASH_MODE android.flash.mode} (automatic flash for still capture will not work since aeMode is ON)</li>
1600 * <li>{@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} (if it is supported)</li>
1601 * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li>
1602 * <li>{@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}</li>
1604 * <p>For high speed recording use case, the actual maximum supported frame rate may
1605 * be lower than what camera can output, depending on the destination Surfaces for
1606 * the image data. For example, if the destination surface is from video encoder,
1607 * the application need check if the video encoder is capable of supporting the
1608 * high frame rate for a given video size, or it will end up with lower recording
1609 * frame rate. If the destination surface is from preview window, the preview frame
1610 * rate will be bounded by the screen refresh rate.</p>
1611 * <p>The camera device will only support up to 2 output high speed streams
1612 * (processed non-stalling format defined in android.request.maxNumOutputStreams)
1613 * in this mode. This control will be effective only if all of below conditions are true:</p>
1615 * <li>The application created no more than maxNumHighSpeedStreams processed non-stalling
1616 * format output streams, where maxNumHighSpeedStreams is calculated as
1617 * min(2, android.request.maxNumOutputStreams[Processed (but not-stalling)]).</li>
1618 * <li>The stream sizes are selected from the sizes reported by
1619 * android.control.availableHighSpeedVideoConfigurations.</li>
1620 * <li>No processed non-stalling or raw streams are configured.</li>
1622 * <p>When above conditions are NOT satistied, the controls of this mode and
1623 * {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} will be ignored by the camera device,
1624 * the camera device will fall back to {@link CaptureRequest#CONTROL_MODE android.control.mode} <code>==</code> AUTO,
1625 * and the returned capture result metadata will give the fps range choosen
1626 * by the camera device.</p>
1627 * <p>Switching into or out of this mode may trigger some camera ISP/sensor
1628 * reconfigurations, which may introduce extra latency. It is recommended that
1629 * the application avoids unnecessary scene mode switch as much as possible.</p>
1631 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
1632 * @see CaptureRequest#CONTROL_AE_LOCK
1633 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1634 * @see CaptureRequest#CONTROL_AE_REGIONS
1635 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
1636 * @see CaptureRequest#CONTROL_AF_REGIONS
1637 * @see CaptureRequest#CONTROL_AF_TRIGGER
1638 * @see CaptureRequest#CONTROL_AWB_LOCK
1639 * @see CaptureRequest#CONTROL_AWB_REGIONS
1640 * @see CaptureRequest#CONTROL_EFFECT_MODE
1641 * @see CaptureRequest#CONTROL_MODE
1642 * @see CaptureRequest#FLASH_MODE
1643 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
1644 * @see CaptureRequest#SCALER_CROP_REGION
1645 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
1646 * @see CaptureRequest#CONTROL_SCENE_MODE
1648 public static final int CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO = 17;
1651 * <p>Turn on a device-specific high dynamic range (HDR) mode.</p>
1652 * <p>In this scene mode, the camera device captures images
1653 * that keep a larger range of scene illumination levels
1654 * visible in the final image. For example, when taking a
1655 * picture of a object in front of a bright window, both
1656 * the object and the scene through the window may be
1657 * visible when using HDR mode, while in normal AUTO mode,
1658 * one or the other may be poorly exposed. As a tradeoff,
1659 * HDR mode generally takes much longer to capture a single
1660 * image, has no user control, and may have other artifacts
1661 * depending on the HDR method used.</p>
1662 * <p>Therefore, HDR captures operate at a much slower rate
1663 * than regular captures.</p>
1664 * <p>In this mode, on LIMITED or FULL devices, when a request
1665 * is made with a {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} of
1666 * STILL_CAPTURE, the camera device will capture an image
1667 * using a high dynamic range capture technique. On LEGACY
1668 * devices, captures that target a JPEG-format output will
1669 * be captured with HDR, and the capture intent is not
1671 * <p>The HDR capture may involve the device capturing a burst
1672 * of images internally and combining them into one, or it
1673 * may involve the device using specialized high dynamic
1674 * range capture hardware. In all cases, a single image is
1675 * produced in response to a capture request submitted
1676 * while in HDR mode.</p>
1677 * <p>Since substantial post-processing is generally needed to
1678 * produce an HDR image, only YUV and JPEG outputs are
1679 * supported for LIMITED/FULL device HDR captures, and only
1680 * JPEG outputs are supported for LEGACY HDR
1681 * captures. Using a RAW output for HDR capture is not
1684 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1685 * @see CaptureRequest#CONTROL_SCENE_MODE
1687 public static final int CONTROL_SCENE_MODE_HDR = 18;
1690 // Enumeration values for CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
1694 * <p>Video stabilization is disabled.</p>
1695 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
1697 public static final int CONTROL_VIDEO_STABILIZATION_MODE_OFF = 0;
1700 * <p>Video stabilization is enabled.</p>
1701 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
1703 public static final int CONTROL_VIDEO_STABILIZATION_MODE_ON = 1;
1706 // Enumeration values for CaptureRequest#EDGE_MODE
1710 * <p>No edge enhancement is applied.</p>
1711 * @see CaptureRequest#EDGE_MODE
1713 public static final int EDGE_MODE_OFF = 0;
1716 * <p>Apply edge enhancement at a quality level that does not slow down frame rate relative to sensor
1718 * @see CaptureRequest#EDGE_MODE
1720 public static final int EDGE_MODE_FAST = 1;
1723 * <p>Apply high-quality edge enhancement, at a cost of reducing output frame rate.</p>
1724 * @see CaptureRequest#EDGE_MODE
1726 public static final int EDGE_MODE_HIGH_QUALITY = 2;
1729 // Enumeration values for CaptureRequest#FLASH_MODE
1733 * <p>Do not fire the flash for this capture.</p>
1734 * @see CaptureRequest#FLASH_MODE
1736 public static final int FLASH_MODE_OFF = 0;
1739 * <p>If the flash is available and charged, fire flash
1740 * for this capture.</p>
1741 * @see CaptureRequest#FLASH_MODE
1743 public static final int FLASH_MODE_SINGLE = 1;
1746 * <p>Transition flash to continuously on.</p>
1747 * @see CaptureRequest#FLASH_MODE
1749 public static final int FLASH_MODE_TORCH = 2;
1752 // Enumeration values for CaptureRequest#HOT_PIXEL_MODE
1756 * <p>No hot pixel correction is applied.</p>
1757 * <p>The frame rate must not be reduced relative to sensor raw output
1758 * for this option.</p>
1759 * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p>
1761 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
1762 * @see CaptureRequest#HOT_PIXEL_MODE
1764 public static final int HOT_PIXEL_MODE_OFF = 0;
1767 * <p>Hot pixel correction is applied, without reducing frame
1768 * rate relative to sensor raw output.</p>
1769 * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p>
1771 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
1772 * @see CaptureRequest#HOT_PIXEL_MODE
1774 public static final int HOT_PIXEL_MODE_FAST = 1;
1777 * <p>High-quality hot pixel correction is applied, at a cost
1778 * of reducing frame rate relative to sensor raw output.</p>
1779 * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p>
1781 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
1782 * @see CaptureRequest#HOT_PIXEL_MODE
1784 public static final int HOT_PIXEL_MODE_HIGH_QUALITY = 2;
1787 // Enumeration values for CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
1791 * <p>Optical stabilization is unavailable.</p>
1792 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
1794 public static final int LENS_OPTICAL_STABILIZATION_MODE_OFF = 0;
1797 * <p>Optical stabilization is enabled.</p>
1798 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
1800 public static final int LENS_OPTICAL_STABILIZATION_MODE_ON = 1;
1803 // Enumeration values for CaptureRequest#NOISE_REDUCTION_MODE
1807 * <p>No noise reduction is applied.</p>
1808 * @see CaptureRequest#NOISE_REDUCTION_MODE
1810 public static final int NOISE_REDUCTION_MODE_OFF = 0;
1813 * <p>Noise reduction is applied without reducing frame rate relative to sensor
1815 * @see CaptureRequest#NOISE_REDUCTION_MODE
1817 public static final int NOISE_REDUCTION_MODE_FAST = 1;
1820 * <p>High-quality noise reduction is applied, at the cost of reducing frame rate
1821 * relative to sensor output.</p>
1822 * @see CaptureRequest#NOISE_REDUCTION_MODE
1824 public static final int NOISE_REDUCTION_MODE_HIGH_QUALITY = 2;
1827 // Enumeration values for CaptureRequest#SENSOR_TEST_PATTERN_MODE
1831 * <p>No test pattern mode is used, and the camera
1832 * device returns captures from the image sensor.</p>
1833 * <p>This is the default if the key is not set.</p>
1834 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1836 public static final int SENSOR_TEST_PATTERN_MODE_OFF = 0;
1839 * <p>Each pixel in <code>[R, G_even, G_odd, B]</code> is replaced by its
1840 * respective color channel provided in
1841 * {@link CaptureRequest#SENSOR_TEST_PATTERN_DATA android.sensor.testPatternData}.</p>
1842 * <p>For example:</p>
1843 * <pre><code>android.testPatternData = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0]
1845 * <p>All green pixels are 100% green. All red/blue pixels are black.</p>
1846 * <pre><code>android.testPatternData = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0]
1848 * <p>All red pixels are 100% red. Only the odd green pixels
1849 * are 100% green. All blue pixels are 100% black.</p>
1851 * @see CaptureRequest#SENSOR_TEST_PATTERN_DATA
1852 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1854 public static final int SENSOR_TEST_PATTERN_MODE_SOLID_COLOR = 1;
1857 * <p>All pixel data is replaced with an 8-bar color pattern.</p>
1858 * <p>The vertical bars (left-to-right) are as follows:</p>
1860 * <li>100% white</li>
1869 * <p>In general the image would look like the following:</p>
1870 * <pre><code>W Y C G M R B K
1879 * (B = Blue, K = Black)
1881 * <p>Each bar should take up 1/8 of the sensor pixel array width.
1882 * When this is not possible, the bar size should be rounded
1883 * down to the nearest integer and the pattern can repeat
1884 * on the right side.</p>
1885 * <p>Each bar's height must always take up the full sensor
1886 * pixel array height.</p>
1887 * <p>Each pixel in this test pattern must be set to either
1888 * 0% intensity or 100% intensity.</p>
1889 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1891 public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS = 2;
1894 * <p>The test pattern is similar to COLOR_BARS, except that
1895 * each bar should start at its specified color at the top,
1896 * and fade to gray at the bottom.</p>
1897 * <p>Furthermore each bar is further subdivided into a left and
1898 * right half. The left half should have a smooth gradient,
1899 * and the right half should have a quantized gradient.</p>
1900 * <p>In particular, the right half's should consist of blocks of the
1901 * same color for 1/16th active sensor pixel array width.</p>
1902 * <p>The least significant bits in the quantized gradient should
1903 * be copied from the most significant bits of the smooth gradient.</p>
1904 * <p>The height of each bar should always be a multiple of 128.
1905 * When this is not the case, the pattern should repeat at the bottom
1907 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1909 public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY = 3;
1912 * <p>All pixel data is replaced by a pseudo-random sequence
1913 * generated from a PN9 512-bit sequence (typically implemented
1914 * in hardware with a linear feedback shift register).</p>
1915 * <p>The generator should be reset at the beginning of each frame,
1916 * and thus each subsequent raw frame with this test pattern should
1917 * be exactly the same as the last.</p>
1918 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1920 public static final int SENSOR_TEST_PATTERN_MODE_PN9 = 4;
1923 * <p>The first custom test pattern. All custom patterns that are
1924 * available only on this camera device are at least this numeric
1926 * <p>All of the custom test patterns will be static
1927 * (that is the raw image must not vary from frame to frame).</p>
1928 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1930 public static final int SENSOR_TEST_PATTERN_MODE_CUSTOM1 = 256;
1933 // Enumeration values for CaptureRequest#SHADING_MODE
1937 * <p>No lens shading correction is applied.</p>
1938 * @see CaptureRequest#SHADING_MODE
1940 public static final int SHADING_MODE_OFF = 0;
1943 * <p>Apply lens shading corrections, without slowing
1944 * frame rate relative to sensor raw output</p>
1945 * @see CaptureRequest#SHADING_MODE
1947 public static final int SHADING_MODE_FAST = 1;
1950 * <p>Apply high-quality lens shading correction, at the
1951 * cost of reduced frame rate.</p>
1952 * @see CaptureRequest#SHADING_MODE
1954 public static final int SHADING_MODE_HIGH_QUALITY = 2;
1957 // Enumeration values for CaptureRequest#STATISTICS_FACE_DETECT_MODE
1961 * <p>Do not include face detection statistics in capture
1963 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
1965 public static final int STATISTICS_FACE_DETECT_MODE_OFF = 0;
1968 * <p>Return face rectangle and confidence values only.</p>
1969 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
1971 public static final int STATISTICS_FACE_DETECT_MODE_SIMPLE = 1;
1974 * <p>Return all face
1976 * <p>In this mode, face rectangles, scores, landmarks, and face IDs are all valid.</p>
1977 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
1979 public static final int STATISTICS_FACE_DETECT_MODE_FULL = 2;
1982 // Enumeration values for CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
1986 * <p>Do not include a lens shading map in the capture result.</p>
1987 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
1989 public static final int STATISTICS_LENS_SHADING_MAP_MODE_OFF = 0;
1992 * <p>Include a lens shading map in the capture result.</p>
1993 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
1995 public static final int STATISTICS_LENS_SHADING_MAP_MODE_ON = 1;
1998 // Enumeration values for CaptureRequest#TONEMAP_MODE
2002 * <p>Use the tone mapping curve specified in
2003 * the {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}* entries.</p>
2004 * <p>All color enhancement and tonemapping must be disabled, except
2005 * for applying the tonemapping curve specified by
2006 * {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p>
2007 * <p>Must not slow down frame rate relative to raw
2008 * sensor output.</p>
2010 * @see CaptureRequest#TONEMAP_CURVE
2011 * @see CaptureRequest#TONEMAP_MODE
2013 public static final int TONEMAP_MODE_CONTRAST_CURVE = 0;
2016 * <p>Advanced gamma mapping and color enhancement may be applied, without
2017 * reducing frame rate compared to raw sensor output.</p>
2018 * @see CaptureRequest#TONEMAP_MODE
2020 public static final int TONEMAP_MODE_FAST = 1;
2023 * <p>High-quality gamma mapping and color enhancement will be applied, at
2024 * the cost of reduced frame rate compared to raw sensor output.</p>
2025 * @see CaptureRequest#TONEMAP_MODE
2027 public static final int TONEMAP_MODE_HIGH_QUALITY = 2;
2030 // Enumeration values for CaptureResult#CONTROL_AE_STATE
2034 * <p>AE is off or recently reset.</p>
2035 * <p>When a camera device is opened, it starts in
2036 * this state. This is a transient state, the camera device may skip reporting
2037 * this state in capture result.</p>
2038 * @see CaptureResult#CONTROL_AE_STATE
2040 public static final int CONTROL_AE_STATE_INACTIVE = 0;
2043 * <p>AE doesn't yet have a good set of control values
2044 * for the current scene.</p>
2045 * <p>This is a transient state, the camera device may skip
2046 * reporting this state in capture result.</p>
2047 * @see CaptureResult#CONTROL_AE_STATE
2049 public static final int CONTROL_AE_STATE_SEARCHING = 1;
2052 * <p>AE has a good set of control values for the
2053 * current scene.</p>
2054 * @see CaptureResult#CONTROL_AE_STATE
2056 public static final int CONTROL_AE_STATE_CONVERGED = 2;
2059 * <p>AE has been locked.</p>
2060 * @see CaptureResult#CONTROL_AE_STATE
2062 public static final int CONTROL_AE_STATE_LOCKED = 3;
2065 * <p>AE has a good set of control values, but flash
2066 * needs to be fired for good quality still
2068 * @see CaptureResult#CONTROL_AE_STATE
2070 public static final int CONTROL_AE_STATE_FLASH_REQUIRED = 4;
2073 * <p>AE has been asked to do a precapture sequence
2074 * and is currently executing it.</p>
2075 * <p>Precapture can be triggered through setting
2076 * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} to START.</p>
2077 * <p>Once PRECAPTURE completes, AE will transition to CONVERGED
2078 * or FLASH_REQUIRED as appropriate. This is a transient
2079 * state, the camera device may skip reporting this state in
2080 * capture result.</p>
2082 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
2083 * @see CaptureResult#CONTROL_AE_STATE
2085 public static final int CONTROL_AE_STATE_PRECAPTURE = 5;
2088 // Enumeration values for CaptureResult#CONTROL_AF_STATE
2092 * <p>AF is off or has not yet tried to scan/been asked
2094 * <p>When a camera device is opened, it starts in this
2095 * state. This is a transient state, the camera device may
2096 * skip reporting this state in capture
2098 * @see CaptureResult#CONTROL_AF_STATE
2100 public static final int CONTROL_AF_STATE_INACTIVE = 0;
2103 * <p>AF is currently performing an AF scan initiated the
2104 * camera device in a continuous autofocus mode.</p>
2105 * <p>Only used by CONTINUOUS_* AF modes. This is a transient
2106 * state, the camera device may skip reporting this state in
2107 * capture result.</p>
2108 * @see CaptureResult#CONTROL_AF_STATE
2110 public static final int CONTROL_AF_STATE_PASSIVE_SCAN = 1;
2113 * <p>AF currently believes it is in focus, but may
2114 * restart scanning at any time.</p>
2115 * <p>Only used by CONTINUOUS_* AF modes. This is a transient
2116 * state, the camera device may skip reporting this state in
2117 * capture result.</p>
2118 * @see CaptureResult#CONTROL_AF_STATE
2120 public static final int CONTROL_AF_STATE_PASSIVE_FOCUSED = 2;
2123 * <p>AF is performing an AF scan because it was
2124 * triggered by AF trigger.</p>
2125 * <p>Only used by AUTO or MACRO AF modes. This is a transient
2126 * state, the camera device may skip reporting this state in
2127 * capture result.</p>
2128 * @see CaptureResult#CONTROL_AF_STATE
2130 public static final int CONTROL_AF_STATE_ACTIVE_SCAN = 3;
2133 * <p>AF believes it is focused correctly and has locked
2135 * <p>This state is reached only after an explicit START AF trigger has been
2136 * sent ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}), when good focus has been obtained.</p>
2137 * <p>The lens will remain stationary until the AF mode ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) is changed or
2138 * a new AF trigger is sent to the camera device ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}).</p>
2140 * @see CaptureRequest#CONTROL_AF_MODE
2141 * @see CaptureRequest#CONTROL_AF_TRIGGER
2142 * @see CaptureResult#CONTROL_AF_STATE
2144 public static final int CONTROL_AF_STATE_FOCUSED_LOCKED = 4;
2147 * <p>AF has failed to focus successfully and has locked
2149 * <p>This state is reached only after an explicit START AF trigger has been
2150 * sent ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}), when good focus cannot be obtained.</p>
2151 * <p>The lens will remain stationary until the AF mode ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) is changed or
2152 * a new AF trigger is sent to the camera device ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}).</p>
2154 * @see CaptureRequest#CONTROL_AF_MODE
2155 * @see CaptureRequest#CONTROL_AF_TRIGGER
2156 * @see CaptureResult#CONTROL_AF_STATE
2158 public static final int CONTROL_AF_STATE_NOT_FOCUSED_LOCKED = 5;
2161 * <p>AF finished a passive scan without finding focus,
2162 * and may restart scanning at any time.</p>
2163 * <p>Only used by CONTINUOUS_* AF modes. This is a transient state, the camera
2164 * device may skip reporting this state in capture result.</p>
2165 * <p>LEGACY camera devices do not support this state. When a passive
2166 * scan has finished, it will always go to PASSIVE_FOCUSED.</p>
2167 * @see CaptureResult#CONTROL_AF_STATE
2169 public static final int CONTROL_AF_STATE_PASSIVE_UNFOCUSED = 6;
2172 // Enumeration values for CaptureResult#CONTROL_AWB_STATE
2176 * <p>AWB is not in auto mode, or has not yet started metering.</p>
2177 * <p>When a camera device is opened, it starts in this
2178 * state. This is a transient state, the camera device may
2179 * skip reporting this state in capture
2181 * @see CaptureResult#CONTROL_AWB_STATE
2183 public static final int CONTROL_AWB_STATE_INACTIVE = 0;
2186 * <p>AWB doesn't yet have a good set of control
2187 * values for the current scene.</p>
2188 * <p>This is a transient state, the camera device
2189 * may skip reporting this state in capture result.</p>
2190 * @see CaptureResult#CONTROL_AWB_STATE
2192 public static final int CONTROL_AWB_STATE_SEARCHING = 1;
2195 * <p>AWB has a good set of control values for the
2196 * current scene.</p>
2197 * @see CaptureResult#CONTROL_AWB_STATE
2199 public static final int CONTROL_AWB_STATE_CONVERGED = 2;
2202 * <p>AWB has been locked.</p>
2203 * @see CaptureResult#CONTROL_AWB_STATE
2205 public static final int CONTROL_AWB_STATE_LOCKED = 3;
2208 // Enumeration values for CaptureResult#FLASH_STATE
2212 * <p>No flash on camera.</p>
2213 * @see CaptureResult#FLASH_STATE
2215 public static final int FLASH_STATE_UNAVAILABLE = 0;
2218 * <p>Flash is charging and cannot be fired.</p>
2219 * @see CaptureResult#FLASH_STATE
2221 public static final int FLASH_STATE_CHARGING = 1;
2224 * <p>Flash is ready to fire.</p>
2225 * @see CaptureResult#FLASH_STATE
2227 public static final int FLASH_STATE_READY = 2;
2230 * <p>Flash fired for this capture.</p>
2231 * @see CaptureResult#FLASH_STATE
2233 public static final int FLASH_STATE_FIRED = 3;
2236 * <p>Flash partially illuminated this frame.</p>
2237 * <p>This is usually due to the next or previous frame having
2238 * the flash fire, and the flash spilling into this capture
2239 * due to hardware limitations.</p>
2240 * @see CaptureResult#FLASH_STATE
2242 public static final int FLASH_STATE_PARTIAL = 4;
2245 // Enumeration values for CaptureResult#LENS_STATE
2249 * <p>The lens parameters ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
2250 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}) are not changing.</p>
2252 * @see CaptureRequest#LENS_APERTURE
2253 * @see CaptureRequest#LENS_FILTER_DENSITY
2254 * @see CaptureRequest#LENS_FOCAL_LENGTH
2255 * @see CaptureRequest#LENS_FOCUS_DISTANCE
2256 * @see CaptureResult#LENS_STATE
2258 public static final int LENS_STATE_STATIONARY = 0;
2261 * <p>One or several of the lens parameters
2262 * ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
2263 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} or {@link CaptureRequest#LENS_APERTURE android.lens.aperture}) is
2264 * currently changing.</p>
2266 * @see CaptureRequest#LENS_APERTURE
2267 * @see CaptureRequest#LENS_FILTER_DENSITY
2268 * @see CaptureRequest#LENS_FOCAL_LENGTH
2269 * @see CaptureRequest#LENS_FOCUS_DISTANCE
2270 * @see CaptureResult#LENS_STATE
2272 public static final int LENS_STATE_MOVING = 1;
2275 // Enumeration values for CaptureResult#STATISTICS_SCENE_FLICKER
2279 * <p>The camera device does not detect any flickering illumination
2280 * in the current scene.</p>
2281 * @see CaptureResult#STATISTICS_SCENE_FLICKER
2283 public static final int STATISTICS_SCENE_FLICKER_NONE = 0;
2286 * <p>The camera device detects illumination flickering at 50Hz
2287 * in the current scene.</p>
2288 * @see CaptureResult#STATISTICS_SCENE_FLICKER
2290 public static final int STATISTICS_SCENE_FLICKER_50HZ = 1;
2293 * <p>The camera device detects illumination flickering at 60Hz
2294 * in the current scene.</p>
2295 * @see CaptureResult#STATISTICS_SCENE_FLICKER
2297 public static final int STATISTICS_SCENE_FLICKER_60HZ = 2;
2300 // Enumeration values for CaptureResult#SYNC_FRAME_NUMBER
2304 * <p>The current result is not yet fully synchronized to any request.</p>
2305 * <p>Synchronization is in progress, and reading metadata from this
2306 * result may include a mix of data that have taken effect since the
2307 * last synchronization time.</p>
2308 * <p>In some future result, within {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} frames,
2309 * this value will update to the actual frame number frame number
2310 * the result is guaranteed to be synchronized to (as long as the
2311 * request settings remain constant).</p>
2313 * @see CameraCharacteristics#SYNC_MAX_LATENCY
2314 * @see CaptureResult#SYNC_FRAME_NUMBER
2317 public static final int SYNC_FRAME_NUMBER_CONVERGING = -1;
2320 * <p>The current result's synchronization status is unknown.</p>
2321 * <p>The result may have already converged, or it may be in
2322 * progress. Reading from this result may include some mix
2323 * of settings from past requests.</p>
2324 * <p>After a settings change, the new settings will eventually all
2325 * take effect for the output buffers and results. However, this
2326 * value will not change when that happens. Altering settings
2327 * rapidly may provide outcomes using mixes of settings from recent
2329 * <p>This value is intended primarily for backwards compatibility with
2330 * the older camera implementations (for android.hardware.Camera).</p>
2331 * @see CaptureResult#SYNC_FRAME_NUMBER
2334 public static final int SYNC_FRAME_NUMBER_UNKNOWN = -2;
2336 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
2337 * End generated code
2338 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/