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