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