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