CameraMetadata.java revision 3865a84255a4e65a5d9790083a1e519b05f40d50
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_FACING 210 // 211 212 /** 213 * @see CameraCharacteristics#LENS_FACING 214 */ 215 public static final int LENS_FACING_FRONT = 0; 216 217 /** 218 * @see CameraCharacteristics#LENS_FACING 219 */ 220 public static final int LENS_FACING_BACK = 1; 221 222 // 223 // Enumeration values for CameraCharacteristics#LED_AVAILABLE_LEDS 224 // 225 226 /** 227 * <p>android.led.transmit control is used</p> 228 * @see CameraCharacteristics#LED_AVAILABLE_LEDS 229 * @hide 230 */ 231 public static final int LED_AVAILABLE_LEDS_TRANSMIT = 0; 232 233 // 234 // Enumeration values for CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 235 // 236 237 /** 238 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 239 */ 240 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0; 241 242 /** 243 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 244 */ 245 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1; 246 247 // 248 // Enumeration values for CameraCharacteristics#SYNC_MAX_LATENCY 249 // 250 251 /** 252 * <p>Every frame has the requests immediately applied. 253 * (and furthermore for all results, 254 * <code>android.sync.frameNumber == android.request.frameCount</code>)</p> 255 * <p>Changing controls over multiple requests one after another will 256 * produce results that have those controls applied atomically 257 * each frame.</p> 258 * <p>All FULL capability devices will have this as their maxLatency.</p> 259 * @see CameraCharacteristics#SYNC_MAX_LATENCY 260 */ 261 public static final int SYNC_MAX_LATENCY_PER_FRAME_CONTROL = 0; 262 263 /** 264 * <p>Each new frame has some subset (potentially the entire set) 265 * of the past requests applied to the camera settings.</p> 266 * <p>By submitting a series of identical requests, the camera device 267 * will eventually have the camera settings applied, but it is 268 * unknown when that exact point will be.</p> 269 * @see CameraCharacteristics#SYNC_MAX_LATENCY 270 */ 271 public static final int SYNC_MAX_LATENCY_UNKNOWN = -1; 272 273 // 274 // Enumeration values for CaptureRequest#COLOR_CORRECTION_MODE 275 // 276 277 /** 278 * <p>Use the {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} matrix 279 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} to do color conversion.</p> 280 * <p>All advanced white balance adjustments (not specified 281 * by our white balance pipeline) must be disabled.</p> 282 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then 283 * TRANSFORM_MATRIX is ignored. The camera device will override 284 * this value to either FAST or HIGH_QUALITY.</p> 285 * 286 * @see CaptureRequest#COLOR_CORRECTION_GAINS 287 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 288 * @see CaptureRequest#CONTROL_AWB_MODE 289 * @see CaptureRequest#COLOR_CORRECTION_MODE 290 */ 291 public static final int COLOR_CORRECTION_MODE_TRANSFORM_MATRIX = 0; 292 293 /** 294 * <p>Must not slow down capture rate relative to sensor raw 295 * output.</p> 296 * <p>Advanced white balance adjustments above and beyond 297 * the specified white balance pipeline may be applied.</p> 298 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then 299 * the camera device uses the last frame's AWB values 300 * (or defaults if AWB has never been run).</p> 301 * 302 * @see CaptureRequest#CONTROL_AWB_MODE 303 * @see CaptureRequest#COLOR_CORRECTION_MODE 304 */ 305 public static final int COLOR_CORRECTION_MODE_FAST = 1; 306 307 /** 308 * <p>Capture rate (relative to sensor raw output) 309 * may be reduced by high quality.</p> 310 * <p>Advanced white balance adjustments above and beyond 311 * the specified white balance pipeline may be applied.</p> 312 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then 313 * the camera device uses the last frame's AWB values 314 * (or defaults if AWB has never been run).</p> 315 * 316 * @see CaptureRequest#CONTROL_AWB_MODE 317 * @see CaptureRequest#COLOR_CORRECTION_MODE 318 */ 319 public static final int COLOR_CORRECTION_MODE_HIGH_QUALITY = 2; 320 321 // 322 // Enumeration values for CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 323 // 324 325 /** 326 * <p>The camera device will not adjust exposure duration to 327 * avoid banding problems.</p> 328 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 329 */ 330 public static final int CONTROL_AE_ANTIBANDING_MODE_OFF = 0; 331 332 /** 333 * <p>The camera device will adjust exposure duration to 334 * avoid banding problems with 50Hz illumination sources.</p> 335 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 336 */ 337 public static final int CONTROL_AE_ANTIBANDING_MODE_50HZ = 1; 338 339 /** 340 * <p>The camera device will adjust exposure duration to 341 * avoid banding problems with 60Hz illumination 342 * sources.</p> 343 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 344 */ 345 public static final int CONTROL_AE_ANTIBANDING_MODE_60HZ = 2; 346 347 /** 348 * <p>The camera device will automatically adapt its 349 * antibanding routine to the current illumination 350 * conditions. This is the default.</p> 351 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 352 */ 353 public static final int CONTROL_AE_ANTIBANDING_MODE_AUTO = 3; 354 355 // 356 // Enumeration values for CaptureRequest#CONTROL_AE_MODE 357 // 358 359 /** 360 * <p>The camera device's autoexposure routine is disabled; 361 * the application-selected {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, 362 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} and 363 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are used by the camera 364 * device, along with android.flash.* fields, if there's 365 * a flash unit for this camera device.</p> 366 * 367 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 368 * @see CaptureRequest#SENSOR_FRAME_DURATION 369 * @see CaptureRequest#SENSOR_SENSITIVITY 370 * @see CaptureRequest#CONTROL_AE_MODE 371 */ 372 public static final int CONTROL_AE_MODE_OFF = 0; 373 374 /** 375 * <p>The camera device's autoexposure routine is active, 376 * with no flash control. The application's values for 377 * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, 378 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and 379 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are ignored. The 380 * application has control over the various 381 * android.flash.* fields.</p> 382 * 383 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 384 * @see CaptureRequest#SENSOR_FRAME_DURATION 385 * @see CaptureRequest#SENSOR_SENSITIVITY 386 * @see CaptureRequest#CONTROL_AE_MODE 387 */ 388 public static final int CONTROL_AE_MODE_ON = 1; 389 390 /** 391 * <p>Like ON, except that the camera device also controls 392 * the camera's flash unit, firing it in low-light 393 * conditions. The flash may be fired during a 394 * precapture sequence (triggered by 395 * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and may be fired 396 * for captures for which the 397 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to 398 * STILL_CAPTURE</p> 399 * 400 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 401 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 402 * @see CaptureRequest#CONTROL_AE_MODE 403 */ 404 public static final int CONTROL_AE_MODE_ON_AUTO_FLASH = 2; 405 406 /** 407 * <p>Like ON, except that the camera device also controls 408 * the camera's flash unit, always firing it for still 409 * captures. The flash may be fired during a precapture 410 * sequence (triggered by 411 * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and will always 412 * be fired for captures for which the 413 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to 414 * STILL_CAPTURE</p> 415 * 416 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 417 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 418 * @see CaptureRequest#CONTROL_AE_MODE 419 */ 420 public static final int CONTROL_AE_MODE_ON_ALWAYS_FLASH = 3; 421 422 /** 423 * <p>Like ON_AUTO_FLASH, but with automatic red eye 424 * reduction. If deemed necessary by the camera device, 425 * a red eye reduction flash will fire during the 426 * precapture sequence.</p> 427 * @see CaptureRequest#CONTROL_AE_MODE 428 */ 429 public static final int CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE = 4; 430 431 // 432 // Enumeration values for CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 433 // 434 435 /** 436 * <p>The trigger is idle.</p> 437 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 438 */ 439 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_IDLE = 0; 440 441 /** 442 * <p>The precapture metering sequence will be started 443 * by the camera device. The exact effect of the precapture 444 * trigger depends on the current AE mode and state.</p> 445 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 446 */ 447 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_START = 1; 448 449 // 450 // Enumeration values for CaptureRequest#CONTROL_AF_MODE 451 // 452 453 /** 454 * <p>The auto-focus routine does not control the lens; 455 * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} is controlled by the 456 * application</p> 457 * 458 * @see CaptureRequest#LENS_FOCUS_DISTANCE 459 * @see CaptureRequest#CONTROL_AF_MODE 460 */ 461 public static final int CONTROL_AF_MODE_OFF = 0; 462 463 /** 464 * <p>If lens is not fixed focus.</p> 465 * <p>Use {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} to determine if lens 466 * is fixed-focus. In this mode, the lens does not move unless 467 * the autofocus trigger action is called. When that trigger 468 * is activated, AF must transition to ACTIVE_SCAN, then to 469 * the outcome of the scan (FOCUSED or NOT_FOCUSED).</p> 470 * <p>Triggering AF_CANCEL resets the lens position to default, 471 * and sets the AF state to INACTIVE.</p> 472 * 473 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 474 * @see CaptureRequest#CONTROL_AF_MODE 475 */ 476 public static final int CONTROL_AF_MODE_AUTO = 1; 477 478 /** 479 * <p>In this mode, the lens does not move unless the 480 * autofocus trigger action is called.</p> 481 * <p>When that trigger is activated, AF must transition to 482 * ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or 483 * NOT_FOCUSED). Triggering cancel AF resets the lens 484 * position to default, and sets the AF state to 485 * INACTIVE.</p> 486 * @see CaptureRequest#CONTROL_AF_MODE 487 */ 488 public static final int CONTROL_AF_MODE_MACRO = 2; 489 490 /** 491 * <p>In this mode, the AF algorithm modifies the lens 492 * position continually to attempt to provide a 493 * constantly-in-focus image stream.</p> 494 * <p>The focusing behavior should be suitable for good quality 495 * video recording; typically this means slower focus 496 * movement and no overshoots. When the AF trigger is not 497 * involved, the AF algorithm should start in INACTIVE state, 498 * and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED 499 * states as appropriate. When the AF trigger is activated, 500 * the algorithm should immediately transition into 501 * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the 502 * lens position until a cancel AF trigger is received.</p> 503 * <p>Once cancel is received, the algorithm should transition 504 * back to INACTIVE and resume passive scan. Note that this 505 * behavior is not identical to CONTINUOUS_PICTURE, since an 506 * ongoing PASSIVE_SCAN must immediately be 507 * canceled.</p> 508 * @see CaptureRequest#CONTROL_AF_MODE 509 */ 510 public static final int CONTROL_AF_MODE_CONTINUOUS_VIDEO = 3; 511 512 /** 513 * <p>In this mode, the AF algorithm modifies the lens 514 * position continually to attempt to provide a 515 * constantly-in-focus image stream.</p> 516 * <p>The focusing behavior should be suitable for still image 517 * capture; typically this means focusing as fast as 518 * possible. When the AF trigger is not involved, the AF 519 * algorithm should start in INACTIVE state, and then 520 * transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as 521 * appropriate as it attempts to maintain focus. When the AF 522 * trigger is activated, the algorithm should finish its 523 * PASSIVE_SCAN if active, and then transition into 524 * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the 525 * lens position until a cancel AF trigger is received.</p> 526 * <p>When the AF cancel trigger is activated, the algorithm 527 * should transition back to INACTIVE and then act as if it 528 * has just been started.</p> 529 * @see CaptureRequest#CONTROL_AF_MODE 530 */ 531 public static final int CONTROL_AF_MODE_CONTINUOUS_PICTURE = 4; 532 533 /** 534 * <p>Extended depth of field (digital focus). AF 535 * trigger is ignored, AF state should always be 536 * INACTIVE.</p> 537 * @see CaptureRequest#CONTROL_AF_MODE 538 */ 539 public static final int CONTROL_AF_MODE_EDOF = 5; 540 541 // 542 // Enumeration values for CaptureRequest#CONTROL_AF_TRIGGER 543 // 544 545 /** 546 * <p>The trigger is idle.</p> 547 * @see CaptureRequest#CONTROL_AF_TRIGGER 548 */ 549 public static final int CONTROL_AF_TRIGGER_IDLE = 0; 550 551 /** 552 * <p>Autofocus will trigger now.</p> 553 * @see CaptureRequest#CONTROL_AF_TRIGGER 554 */ 555 public static final int CONTROL_AF_TRIGGER_START = 1; 556 557 /** 558 * <p>Autofocus will return to its initial 559 * state, and cancel any currently active trigger.</p> 560 * @see CaptureRequest#CONTROL_AF_TRIGGER 561 */ 562 public static final int CONTROL_AF_TRIGGER_CANCEL = 2; 563 564 // 565 // Enumeration values for CaptureRequest#CONTROL_AWB_MODE 566 // 567 568 /** 569 * <p>The camera device's auto white balance routine is disabled; 570 * the application-selected color transform matrix 571 * ({@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}) and gains 572 * ({@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}) are used by the camera 573 * device for manual white balance control.</p> 574 * 575 * @see CaptureRequest#COLOR_CORRECTION_GAINS 576 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 577 * @see CaptureRequest#CONTROL_AWB_MODE 578 */ 579 public static final int CONTROL_AWB_MODE_OFF = 0; 580 581 /** 582 * <p>The camera device's auto white balance routine is active; 583 * the application's values for android.colorCorrection.transform 584 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.</p> 585 * 586 * @see CaptureRequest#COLOR_CORRECTION_GAINS 587 * @see CaptureRequest#CONTROL_AWB_MODE 588 */ 589 public static final int CONTROL_AWB_MODE_AUTO = 1; 590 591 /** 592 * <p>The camera device's auto white balance routine is disabled; 593 * the camera device uses incandescent light as the assumed scene 594 * illumination for white balance. While the exact white balance 595 * transforms are up to the camera device, they will approximately 596 * match the CIE standard illuminant A.</p> 597 * @see CaptureRequest#CONTROL_AWB_MODE 598 */ 599 public static final int CONTROL_AWB_MODE_INCANDESCENT = 2; 600 601 /** 602 * <p>The camera device's auto white balance routine is disabled; 603 * the camera device uses fluorescent light as the assumed scene 604 * illumination for white balance. While the exact white balance 605 * transforms are up to the camera device, they will approximately 606 * match the CIE standard illuminant F2.</p> 607 * @see CaptureRequest#CONTROL_AWB_MODE 608 */ 609 public static final int CONTROL_AWB_MODE_FLUORESCENT = 3; 610 611 /** 612 * <p>The camera device's auto white balance routine is disabled; 613 * the camera device uses warm fluorescent light as the assumed scene 614 * illumination for white balance. While the exact white balance 615 * transforms are up to the camera device, they will approximately 616 * match the CIE standard illuminant F4.</p> 617 * @see CaptureRequest#CONTROL_AWB_MODE 618 */ 619 public static final int CONTROL_AWB_MODE_WARM_FLUORESCENT = 4; 620 621 /** 622 * <p>The camera device's auto white balance routine is disabled; 623 * the camera device uses daylight light as the assumed scene 624 * illumination for white balance. While the exact white balance 625 * transforms are up to the camera device, they will approximately 626 * match the CIE standard illuminant D65.</p> 627 * @see CaptureRequest#CONTROL_AWB_MODE 628 */ 629 public static final int CONTROL_AWB_MODE_DAYLIGHT = 5; 630 631 /** 632 * <p>The camera device's auto white balance routine is disabled; 633 * the camera device uses cloudy daylight light as the assumed scene 634 * illumination for white balance.</p> 635 * @see CaptureRequest#CONTROL_AWB_MODE 636 */ 637 public static final int CONTROL_AWB_MODE_CLOUDY_DAYLIGHT = 6; 638 639 /** 640 * <p>The camera device's auto white balance routine is disabled; 641 * the camera device uses twilight light as the assumed scene 642 * illumination for white balance.</p> 643 * @see CaptureRequest#CONTROL_AWB_MODE 644 */ 645 public static final int CONTROL_AWB_MODE_TWILIGHT = 7; 646 647 /** 648 * <p>The camera device's auto white balance routine is disabled; 649 * the camera device uses shade light as the assumed scene 650 * illumination for white balance.</p> 651 * @see CaptureRequest#CONTROL_AWB_MODE 652 */ 653 public static final int CONTROL_AWB_MODE_SHADE = 8; 654 655 // 656 // Enumeration values for CaptureRequest#CONTROL_CAPTURE_INTENT 657 // 658 659 /** 660 * <p>This request doesn't fall into the other 661 * categories. Default to preview-like 662 * behavior.</p> 663 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 664 */ 665 public static final int CONTROL_CAPTURE_INTENT_CUSTOM = 0; 666 667 /** 668 * <p>This request is for a preview-like usecase. The 669 * precapture trigger may be used to start off a metering 670 * w/flash sequence</p> 671 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 672 */ 673 public static final int CONTROL_CAPTURE_INTENT_PREVIEW = 1; 674 675 /** 676 * <p>This request is for a still capture-type 677 * usecase.</p> 678 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 679 */ 680 public static final int CONTROL_CAPTURE_INTENT_STILL_CAPTURE = 2; 681 682 /** 683 * <p>This request is for a video recording 684 * usecase.</p> 685 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 686 */ 687 public static final int CONTROL_CAPTURE_INTENT_VIDEO_RECORD = 3; 688 689 /** 690 * <p>This request is for a video snapshot (still 691 * image while recording video) usecase</p> 692 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 693 */ 694 public static final int CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT = 4; 695 696 /** 697 * <p>This request is for a ZSL usecase; the 698 * application will stream full-resolution images and 699 * reprocess one or several later for a final 700 * capture</p> 701 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 702 */ 703 public static final int CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG = 5; 704 705 // 706 // Enumeration values for CaptureRequest#CONTROL_EFFECT_MODE 707 // 708 709 /** 710 * <p>No color effect will be applied.</p> 711 * @see CaptureRequest#CONTROL_EFFECT_MODE 712 */ 713 public static final int CONTROL_EFFECT_MODE_OFF = 0; 714 715 /** 716 * <p>A "monocolor" effect where the image is mapped into 717 * a single color. This will typically be grayscale.</p> 718 * @see CaptureRequest#CONTROL_EFFECT_MODE 719 */ 720 public static final int CONTROL_EFFECT_MODE_MONO = 1; 721 722 /** 723 * <p>A "photo-negative" effect where the image's colors 724 * are inverted.</p> 725 * @see CaptureRequest#CONTROL_EFFECT_MODE 726 */ 727 public static final int CONTROL_EFFECT_MODE_NEGATIVE = 2; 728 729 /** 730 * <p>A "solarisation" effect (Sabattier effect) where the 731 * image is wholly or partially reversed in 732 * tone.</p> 733 * @see CaptureRequest#CONTROL_EFFECT_MODE 734 */ 735 public static final int CONTROL_EFFECT_MODE_SOLARIZE = 3; 736 737 /** 738 * <p>A "sepia" effect where the image is mapped into warm 739 * gray, red, and brown tones.</p> 740 * @see CaptureRequest#CONTROL_EFFECT_MODE 741 */ 742 public static final int CONTROL_EFFECT_MODE_SEPIA = 4; 743 744 /** 745 * <p>A "posterization" effect where the image uses 746 * discrete regions of tone rather than a continuous 747 * gradient of tones.</p> 748 * @see CaptureRequest#CONTROL_EFFECT_MODE 749 */ 750 public static final int CONTROL_EFFECT_MODE_POSTERIZE = 5; 751 752 /** 753 * <p>A "whiteboard" effect where the image is typically displayed 754 * as regions of white, with black or grey details.</p> 755 * @see CaptureRequest#CONTROL_EFFECT_MODE 756 */ 757 public static final int CONTROL_EFFECT_MODE_WHITEBOARD = 6; 758 759 /** 760 * <p>A "blackboard" effect where the image is typically displayed 761 * as regions of black, with white or grey details.</p> 762 * @see CaptureRequest#CONTROL_EFFECT_MODE 763 */ 764 public static final int CONTROL_EFFECT_MODE_BLACKBOARD = 7; 765 766 /** 767 * <p>An "aqua" effect where a blue hue is added to the image.</p> 768 * @see CaptureRequest#CONTROL_EFFECT_MODE 769 */ 770 public static final int CONTROL_EFFECT_MODE_AQUA = 8; 771 772 // 773 // Enumeration values for CaptureRequest#CONTROL_MODE 774 // 775 776 /** 777 * <p>Full application control of pipeline. All 3A 778 * routines are disabled, no other settings in 779 * android.control.* have any effect</p> 780 * @see CaptureRequest#CONTROL_MODE 781 */ 782 public static final int CONTROL_MODE_OFF = 0; 783 784 /** 785 * <p>Use settings for each individual 3A routine. 786 * Manual control of capture parameters is disabled. All 787 * controls in android.control.* besides sceneMode take 788 * effect</p> 789 * @see CaptureRequest#CONTROL_MODE 790 */ 791 public static final int CONTROL_MODE_AUTO = 1; 792 793 /** 794 * <p>Use specific scene mode. Enabling this disables 795 * control.aeMode, control.awbMode and control.afMode 796 * controls; the HAL must ignore those settings while 797 * USE_SCENE_MODE is active (except for FACE_PRIORITY 798 * scene mode). Other control entries are still active. 799 * This setting can only be used if availableSceneModes != 800 * UNSUPPORTED</p> 801 * @see CaptureRequest#CONTROL_MODE 802 */ 803 public static final int CONTROL_MODE_USE_SCENE_MODE = 2; 804 805 // 806 // Enumeration values for CaptureRequest#CONTROL_SCENE_MODE 807 // 808 809 /** 810 * <p>Indicates that no scene modes are set for a given capture request.</p> 811 * @see CaptureRequest#CONTROL_SCENE_MODE 812 */ 813 public static final int CONTROL_SCENE_MODE_DISABLED = 0; 814 815 /** 816 * <p>If face detection support exists, use face 817 * detection data for auto-focus, auto-white balance, and 818 * auto-exposure routines. If face detection statistics are 819 * disabled (i.e. {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} is set to OFF), 820 * this should still operate correctly (but will not return 821 * face detection statistics to the framework).</p> 822 * <p>Unlike the other scene modes, {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}, 823 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and android.control.afMode 824 * remain active when FACE_PRIORITY is set.</p> 825 * 826 * @see CaptureRequest#CONTROL_AE_MODE 827 * @see CaptureRequest#CONTROL_AWB_MODE 828 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 829 * @see CaptureRequest#CONTROL_SCENE_MODE 830 */ 831 public static final int CONTROL_SCENE_MODE_FACE_PRIORITY = 1; 832 833 /** 834 * <p>Optimized for photos of quickly moving objects. 835 * Similar to SPORTS.</p> 836 * @see CaptureRequest#CONTROL_SCENE_MODE 837 */ 838 public static final int CONTROL_SCENE_MODE_ACTION = 2; 839 840 /** 841 * <p>Optimized for still photos of people.</p> 842 * @see CaptureRequest#CONTROL_SCENE_MODE 843 */ 844 public static final int CONTROL_SCENE_MODE_PORTRAIT = 3; 845 846 /** 847 * <p>Optimized for photos of distant macroscopic objects.</p> 848 * @see CaptureRequest#CONTROL_SCENE_MODE 849 */ 850 public static final int CONTROL_SCENE_MODE_LANDSCAPE = 4; 851 852 /** 853 * <p>Optimized for low-light settings.</p> 854 * @see CaptureRequest#CONTROL_SCENE_MODE 855 */ 856 public static final int CONTROL_SCENE_MODE_NIGHT = 5; 857 858 /** 859 * <p>Optimized for still photos of people in low-light 860 * settings.</p> 861 * @see CaptureRequest#CONTROL_SCENE_MODE 862 */ 863 public static final int CONTROL_SCENE_MODE_NIGHT_PORTRAIT = 6; 864 865 /** 866 * <p>Optimized for dim, indoor settings where flash must 867 * remain off.</p> 868 * @see CaptureRequest#CONTROL_SCENE_MODE 869 */ 870 public static final int CONTROL_SCENE_MODE_THEATRE = 7; 871 872 /** 873 * <p>Optimized for bright, outdoor beach settings.</p> 874 * @see CaptureRequest#CONTROL_SCENE_MODE 875 */ 876 public static final int CONTROL_SCENE_MODE_BEACH = 8; 877 878 /** 879 * <p>Optimized for bright, outdoor settings containing snow.</p> 880 * @see CaptureRequest#CONTROL_SCENE_MODE 881 */ 882 public static final int CONTROL_SCENE_MODE_SNOW = 9; 883 884 /** 885 * <p>Optimized for scenes of the setting sun.</p> 886 * @see CaptureRequest#CONTROL_SCENE_MODE 887 */ 888 public static final int CONTROL_SCENE_MODE_SUNSET = 10; 889 890 /** 891 * <p>Optimized to avoid blurry photos due to small amounts of 892 * device motion (for example: due to hand shake).</p> 893 * @see CaptureRequest#CONTROL_SCENE_MODE 894 */ 895 public static final int CONTROL_SCENE_MODE_STEADYPHOTO = 11; 896 897 /** 898 * <p>Optimized for nighttime photos of fireworks.</p> 899 * @see CaptureRequest#CONTROL_SCENE_MODE 900 */ 901 public static final int CONTROL_SCENE_MODE_FIREWORKS = 12; 902 903 /** 904 * <p>Optimized for photos of quickly moving people. 905 * Similar to ACTION.</p> 906 * @see CaptureRequest#CONTROL_SCENE_MODE 907 */ 908 public static final int CONTROL_SCENE_MODE_SPORTS = 13; 909 910 /** 911 * <p>Optimized for dim, indoor settings with multiple moving 912 * people.</p> 913 * @see CaptureRequest#CONTROL_SCENE_MODE 914 */ 915 public static final int CONTROL_SCENE_MODE_PARTY = 14; 916 917 /** 918 * <p>Optimized for dim settings where the main light source 919 * is a flame.</p> 920 * @see CaptureRequest#CONTROL_SCENE_MODE 921 */ 922 public static final int CONTROL_SCENE_MODE_CANDLELIGHT = 15; 923 924 /** 925 * <p>Optimized for accurately capturing a photo of barcode 926 * for use by camera applications that wish to read the 927 * barcode value.</p> 928 * @see CaptureRequest#CONTROL_SCENE_MODE 929 */ 930 public static final int CONTROL_SCENE_MODE_BARCODE = 16; 931 932 // 933 // Enumeration values for CaptureRequest#EDGE_MODE 934 // 935 936 /** 937 * <p>No edge enhancement is applied</p> 938 * @see CaptureRequest#EDGE_MODE 939 */ 940 public static final int EDGE_MODE_OFF = 0; 941 942 /** 943 * <p>Must not slow down frame rate relative to sensor 944 * output</p> 945 * @see CaptureRequest#EDGE_MODE 946 */ 947 public static final int EDGE_MODE_FAST = 1; 948 949 /** 950 * <p>Frame rate may be reduced by high 951 * quality</p> 952 * @see CaptureRequest#EDGE_MODE 953 */ 954 public static final int EDGE_MODE_HIGH_QUALITY = 2; 955 956 // 957 // Enumeration values for CaptureRequest#FLASH_MODE 958 // 959 960 /** 961 * <p>Do not fire the flash for this capture.</p> 962 * @see CaptureRequest#FLASH_MODE 963 */ 964 public static final int FLASH_MODE_OFF = 0; 965 966 /** 967 * <p>If the flash is available and charged, fire flash 968 * for this capture based on android.flash.firingPower and 969 * android.flash.firingTime.</p> 970 * @see CaptureRequest#FLASH_MODE 971 */ 972 public static final int FLASH_MODE_SINGLE = 1; 973 974 /** 975 * <p>Transition flash to continuously on.</p> 976 * @see CaptureRequest#FLASH_MODE 977 */ 978 public static final int FLASH_MODE_TORCH = 2; 979 980 // 981 // Enumeration values for CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 982 // 983 984 /** 985 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 986 */ 987 public static final int LENS_OPTICAL_STABILIZATION_MODE_OFF = 0; 988 989 /** 990 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 991 */ 992 public static final int LENS_OPTICAL_STABILIZATION_MODE_ON = 1; 993 994 // 995 // Enumeration values for CaptureRequest#NOISE_REDUCTION_MODE 996 // 997 998 /** 999 * <p>No noise reduction is applied</p> 1000 * @see CaptureRequest#NOISE_REDUCTION_MODE 1001 */ 1002 public static final int NOISE_REDUCTION_MODE_OFF = 0; 1003 1004 /** 1005 * <p>Must not slow down frame rate relative to sensor 1006 * output</p> 1007 * @see CaptureRequest#NOISE_REDUCTION_MODE 1008 */ 1009 public static final int NOISE_REDUCTION_MODE_FAST = 1; 1010 1011 /** 1012 * <p>May slow down frame rate to provide highest 1013 * quality</p> 1014 * @see CaptureRequest#NOISE_REDUCTION_MODE 1015 */ 1016 public static final int NOISE_REDUCTION_MODE_HIGH_QUALITY = 2; 1017 1018 // 1019 // Enumeration values for CaptureRequest#SENSOR_TEST_PATTERN_MODE 1020 // 1021 1022 /** 1023 * <p>Default. No test pattern mode is used, and the camera 1024 * device returns captures from the image sensor.</p> 1025 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 1026 */ 1027 public static final int SENSOR_TEST_PATTERN_MODE_OFF = 0; 1028 1029 /** 1030 * <p>Each pixel in <code>[R, G_even, G_odd, B]</code> is replaced by its 1031 * respective color channel provided in 1032 * {@link CaptureRequest#SENSOR_TEST_PATTERN_DATA android.sensor.testPatternData}.</p> 1033 * <p>For example:</p> 1034 * <pre><code>android.testPatternData = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0] 1035 * </code></pre> 1036 * <p>All green pixels are 100% green. All red/blue pixels are black.</p> 1037 * <pre><code>android.testPatternData = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0] 1038 * </code></pre> 1039 * <p>All red pixels are 100% red. Only the odd green pixels 1040 * are 100% green. All blue pixels are 100% black.</p> 1041 * 1042 * @see CaptureRequest#SENSOR_TEST_PATTERN_DATA 1043 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 1044 */ 1045 public static final int SENSOR_TEST_PATTERN_MODE_SOLID_COLOR = 1; 1046 1047 /** 1048 * <p>All pixel data is replaced with an 8-bar color pattern.</p> 1049 * <p>The vertical bars (left-to-right) are as follows:</p> 1050 * <ul> 1051 * <li>100% white</li> 1052 * <li>yellow</li> 1053 * <li>cyan</li> 1054 * <li>green</li> 1055 * <li>magenta</li> 1056 * <li>red</li> 1057 * <li>blue</li> 1058 * <li>black</li> 1059 * </ul> 1060 * <p>In general the image would look like the following:</p> 1061 * <pre><code>W Y C G M R B K 1062 * W Y C G M R B K 1063 * W Y C G M R B K 1064 * W Y C G M R B K 1065 * W Y C G M R B K 1066 * . . . . . . . . 1067 * . . . . . . . . 1068 * . . . . . . . . 1069 * 1070 * (B = Blue, K = Black) 1071 * </code></pre> 1072 * <p>Each bar should take up 1/8 of the sensor pixel array width. 1073 * When this is not possible, the bar size should be rounded 1074 * down to the nearest integer and the pattern can repeat 1075 * on the right side.</p> 1076 * <p>Each bar's height must always take up the full sensor 1077 * pixel array height.</p> 1078 * <p>Each pixel in this test pattern must be set to either 1079 * 0% intensity or 100% intensity.</p> 1080 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 1081 */ 1082 public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS = 2; 1083 1084 /** 1085 * <p>The test pattern is similar to COLOR_BARS, except that 1086 * each bar should start at its specified color at the top, 1087 * and fade to gray at the bottom.</p> 1088 * <p>Furthermore each bar is further subdivided into a left and 1089 * right half. The left half should have a smooth gradient, 1090 * and the right half should have a quantized gradient.</p> 1091 * <p>In particular, the right half's should consist of blocks of the 1092 * same color for 1/16th active sensor pixel array width.</p> 1093 * <p>The least significant bits in the quantized gradient should 1094 * be copied from the most significant bits of the smooth gradient.</p> 1095 * <p>The height of each bar should always be a multiple of 128. 1096 * When this is not the case, the pattern should repeat at the bottom 1097 * of the image.</p> 1098 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 1099 */ 1100 public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY = 3; 1101 1102 /** 1103 * <p>All pixel data is replaced by a pseudo-random sequence 1104 * generated from a PN9 512-bit sequence (typically implemented 1105 * in hardware with a linear feedback shift register).</p> 1106 * <p>The generator should be reset at the beginning of each frame, 1107 * and thus each subsequent raw frame with this test pattern should 1108 * be exactly the same as the last.</p> 1109 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 1110 */ 1111 public static final int SENSOR_TEST_PATTERN_MODE_PN9 = 4; 1112 1113 /** 1114 * <p>The first custom test pattern. All custom patterns that are 1115 * available only on this camera device are at least this numeric 1116 * value.</p> 1117 * <p>All of the custom test patterns will be static 1118 * (that is the raw image must not vary from frame to frame).</p> 1119 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 1120 */ 1121 public static final int SENSOR_TEST_PATTERN_MODE_CUSTOM1 = 256; 1122 1123 // 1124 // Enumeration values for CaptureRequest#SHADING_MODE 1125 // 1126 1127 /** 1128 * <p>No lens shading correction is applied</p> 1129 * @see CaptureRequest#SHADING_MODE 1130 * @hide 1131 */ 1132 public static final int SHADING_MODE_OFF = 0; 1133 1134 /** 1135 * <p>Must not slow down frame rate relative to sensor raw output</p> 1136 * @see CaptureRequest#SHADING_MODE 1137 * @hide 1138 */ 1139 public static final int SHADING_MODE_FAST = 1; 1140 1141 /** 1142 * <p>Frame rate may be reduced by high quality</p> 1143 * @see CaptureRequest#SHADING_MODE 1144 * @hide 1145 */ 1146 public static final int SHADING_MODE_HIGH_QUALITY = 2; 1147 1148 // 1149 // Enumeration values for CaptureRequest#STATISTICS_FACE_DETECT_MODE 1150 // 1151 1152 /** 1153 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 1154 */ 1155 public static final int STATISTICS_FACE_DETECT_MODE_OFF = 0; 1156 1157 /** 1158 * <p>Optional Return rectangle and confidence 1159 * only</p> 1160 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 1161 */ 1162 public static final int STATISTICS_FACE_DETECT_MODE_SIMPLE = 1; 1163 1164 /** 1165 * <p>Optional Return all face 1166 * metadata</p> 1167 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 1168 */ 1169 public static final int STATISTICS_FACE_DETECT_MODE_FULL = 2; 1170 1171 // 1172 // Enumeration values for CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 1173 // 1174 1175 /** 1176 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 1177 */ 1178 public static final int STATISTICS_LENS_SHADING_MAP_MODE_OFF = 0; 1179 1180 /** 1181 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 1182 */ 1183 public static final int STATISTICS_LENS_SHADING_MAP_MODE_ON = 1; 1184 1185 // 1186 // Enumeration values for CaptureRequest#TONEMAP_MODE 1187 // 1188 1189 /** 1190 * <p>Use the tone mapping curve specified in 1191 * android.tonemap.curve.</p> 1192 * <p>All color enhancement and tonemapping must be disabled, except 1193 * for applying the tonemapping curve specified by 1194 * {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed}, {@link CaptureRequest#TONEMAP_CURVE_BLUE android.tonemap.curveBlue}, or 1195 * {@link CaptureRequest#TONEMAP_CURVE_GREEN android.tonemap.curveGreen}.</p> 1196 * <p>Must not slow down frame rate relative to raw 1197 * sensor output.</p> 1198 * 1199 * @see CaptureRequest#TONEMAP_CURVE_BLUE 1200 * @see CaptureRequest#TONEMAP_CURVE_GREEN 1201 * @see CaptureRequest#TONEMAP_CURVE_RED 1202 * @see CaptureRequest#TONEMAP_MODE 1203 */ 1204 public static final int TONEMAP_MODE_CONTRAST_CURVE = 0; 1205 1206 /** 1207 * <p>Advanced gamma mapping and color enhancement may be applied.</p> 1208 * <p>Should not slow down frame rate relative to raw sensor output.</p> 1209 * @see CaptureRequest#TONEMAP_MODE 1210 */ 1211 public static final int TONEMAP_MODE_FAST = 1; 1212 1213 /** 1214 * <p>Advanced gamma mapping and color enhancement may be applied.</p> 1215 * <p>May slow down frame rate relative to raw sensor output.</p> 1216 * @see CaptureRequest#TONEMAP_MODE 1217 */ 1218 public static final int TONEMAP_MODE_HIGH_QUALITY = 2; 1219 1220 // 1221 // Enumeration values for CaptureResult#CONTROL_AE_STATE 1222 // 1223 1224 /** 1225 * <p>AE is off or recently reset. When a camera device is opened, it starts in 1226 * this state.</p> 1227 * @see CaptureResult#CONTROL_AE_STATE 1228 */ 1229 public static final int CONTROL_AE_STATE_INACTIVE = 0; 1230 1231 /** 1232 * <p>AE doesn't yet have a good set of control values 1233 * for the current scene.</p> 1234 * @see CaptureResult#CONTROL_AE_STATE 1235 */ 1236 public static final int CONTROL_AE_STATE_SEARCHING = 1; 1237 1238 /** 1239 * <p>AE has a good set of control values for the 1240 * current scene.</p> 1241 * @see CaptureResult#CONTROL_AE_STATE 1242 */ 1243 public static final int CONTROL_AE_STATE_CONVERGED = 2; 1244 1245 /** 1246 * <p>AE has been locked.</p> 1247 * @see CaptureResult#CONTROL_AE_STATE 1248 */ 1249 public static final int CONTROL_AE_STATE_LOCKED = 3; 1250 1251 /** 1252 * <p>AE has a good set of control values, but flash 1253 * needs to be fired for good quality still 1254 * capture.</p> 1255 * @see CaptureResult#CONTROL_AE_STATE 1256 */ 1257 public static final int CONTROL_AE_STATE_FLASH_REQUIRED = 4; 1258 1259 /** 1260 * <p>AE has been asked to do a precapture sequence 1261 * (through the {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} START), 1262 * and is currently executing it. Once PRECAPTURE 1263 * completes, AE will transition to CONVERGED or 1264 * FLASH_REQUIRED as appropriate.</p> 1265 * 1266 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 1267 * @see CaptureResult#CONTROL_AE_STATE 1268 */ 1269 public static final int CONTROL_AE_STATE_PRECAPTURE = 5; 1270 1271 // 1272 // Enumeration values for CaptureResult#CONTROL_AF_STATE 1273 // 1274 1275 /** 1276 * <p>AF off or has not yet tried to scan/been asked 1277 * to scan. When a camera device is opened, it starts in 1278 * this state.</p> 1279 * @see CaptureResult#CONTROL_AF_STATE 1280 */ 1281 public static final int CONTROL_AF_STATE_INACTIVE = 0; 1282 1283 /** 1284 * <p>if CONTINUOUS_* modes are supported. AF is 1285 * currently doing an AF scan initiated by a continuous 1286 * autofocus mode</p> 1287 * @see CaptureResult#CONTROL_AF_STATE 1288 */ 1289 public static final int CONTROL_AF_STATE_PASSIVE_SCAN = 1; 1290 1291 /** 1292 * <p>if CONTINUOUS_* modes are supported. AF currently 1293 * believes it is in focus, but may restart scanning at 1294 * any time.</p> 1295 * @see CaptureResult#CONTROL_AF_STATE 1296 */ 1297 public static final int CONTROL_AF_STATE_PASSIVE_FOCUSED = 2; 1298 1299 /** 1300 * <p>if AUTO or MACRO modes are supported. AF is doing 1301 * an AF scan because it was triggered by AF 1302 * trigger</p> 1303 * @see CaptureResult#CONTROL_AF_STATE 1304 */ 1305 public static final int CONTROL_AF_STATE_ACTIVE_SCAN = 3; 1306 1307 /** 1308 * <p>if any AF mode besides OFF is supported. AF 1309 * believes it is focused correctly and is 1310 * locked</p> 1311 * @see CaptureResult#CONTROL_AF_STATE 1312 */ 1313 public static final int CONTROL_AF_STATE_FOCUSED_LOCKED = 4; 1314 1315 /** 1316 * <p>if any AF mode besides OFF is supported. AF has 1317 * failed to focus successfully and is 1318 * locked</p> 1319 * @see CaptureResult#CONTROL_AF_STATE 1320 */ 1321 public static final int CONTROL_AF_STATE_NOT_FOCUSED_LOCKED = 5; 1322 1323 /** 1324 * <p>if CONTINUOUS_* modes are supported. AF finished a 1325 * passive scan without finding focus, and may restart 1326 * scanning at any time.</p> 1327 * @see CaptureResult#CONTROL_AF_STATE 1328 */ 1329 public static final int CONTROL_AF_STATE_PASSIVE_UNFOCUSED = 6; 1330 1331 // 1332 // Enumeration values for CaptureResult#CONTROL_AWB_STATE 1333 // 1334 1335 /** 1336 * <p>AWB is not in auto mode. When a camera device is opened, it 1337 * starts in this state.</p> 1338 * @see CaptureResult#CONTROL_AWB_STATE 1339 */ 1340 public static final int CONTROL_AWB_STATE_INACTIVE = 0; 1341 1342 /** 1343 * <p>AWB doesn't yet have a good set of control 1344 * values for the current scene.</p> 1345 * @see CaptureResult#CONTROL_AWB_STATE 1346 */ 1347 public static final int CONTROL_AWB_STATE_SEARCHING = 1; 1348 1349 /** 1350 * <p>AWB has a good set of control values for the 1351 * current scene.</p> 1352 * @see CaptureResult#CONTROL_AWB_STATE 1353 */ 1354 public static final int CONTROL_AWB_STATE_CONVERGED = 2; 1355 1356 /** 1357 * <p>AWB has been locked.</p> 1358 * @see CaptureResult#CONTROL_AWB_STATE 1359 */ 1360 public static final int CONTROL_AWB_STATE_LOCKED = 3; 1361 1362 // 1363 // Enumeration values for CaptureResult#FLASH_STATE 1364 // 1365 1366 /** 1367 * <p>No flash on camera</p> 1368 * @see CaptureResult#FLASH_STATE 1369 */ 1370 public static final int FLASH_STATE_UNAVAILABLE = 0; 1371 1372 /** 1373 * <p>if android.flash.available is true Flash is 1374 * charging and cannot be fired</p> 1375 * @see CaptureResult#FLASH_STATE 1376 */ 1377 public static final int FLASH_STATE_CHARGING = 1; 1378 1379 /** 1380 * <p>if android.flash.available is true Flash is 1381 * ready to fire</p> 1382 * @see CaptureResult#FLASH_STATE 1383 */ 1384 public static final int FLASH_STATE_READY = 2; 1385 1386 /** 1387 * <p>if android.flash.available is true Flash fired 1388 * for this capture</p> 1389 * @see CaptureResult#FLASH_STATE 1390 */ 1391 public static final int FLASH_STATE_FIRED = 3; 1392 1393 // 1394 // Enumeration values for CaptureResult#LENS_STATE 1395 // 1396 1397 /** 1398 * @see CaptureResult#LENS_STATE 1399 */ 1400 public static final int LENS_STATE_STATIONARY = 0; 1401 1402 /** 1403 * @see CaptureResult#LENS_STATE 1404 */ 1405 public static final int LENS_STATE_MOVING = 1; 1406 1407 // 1408 // Enumeration values for CaptureResult#STATISTICS_SCENE_FLICKER 1409 // 1410 1411 /** 1412 * @see CaptureResult#STATISTICS_SCENE_FLICKER 1413 */ 1414 public static final int STATISTICS_SCENE_FLICKER_NONE = 0; 1415 1416 /** 1417 * @see CaptureResult#STATISTICS_SCENE_FLICKER 1418 */ 1419 public static final int STATISTICS_SCENE_FLICKER_50HZ = 1; 1420 1421 /** 1422 * @see CaptureResult#STATISTICS_SCENE_FLICKER 1423 */ 1424 public static final int STATISTICS_SCENE_FLICKER_60HZ = 2; 1425 1426 // 1427 // Enumeration values for CaptureResult#SYNC_FRAME_NUMBER 1428 // 1429 1430 /** 1431 * <p>The current result is not yet fully synchronized to any request. 1432 * Synchronization is in progress, and reading metadata from this 1433 * result may include a mix of data that have taken effect since the 1434 * last synchronization time.</p> 1435 * <p>In some future result, within {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} frames, 1436 * this value will update to the actual frame number frame number 1437 * the result is guaranteed to be synchronized to (as long as the 1438 * request settings remain constant).</p> 1439 * 1440 * @see CameraCharacteristics#SYNC_MAX_LATENCY 1441 * @see CaptureResult#SYNC_FRAME_NUMBER 1442 * @hide 1443 */ 1444 public static final int SYNC_FRAME_NUMBER_CONVERGING = -1; 1445 1446 /** 1447 * <p>The current result's synchronization status is unknown. The 1448 * result may have already converged, or it may be in progress. 1449 * Reading from this result may include some mix of settings from 1450 * past requests.</p> 1451 * <p>After a settings change, the new settings will eventually all 1452 * take effect for the output buffers and results. However, this 1453 * value will not change when that happens. Altering settings 1454 * rapidly may provide outcomes using mixes of settings from recent 1455 * requests.</p> 1456 * <p>This value is intended primarily for backwards compatibility with 1457 * the older camera implementations (for android.hardware.Camera).</p> 1458 * @see CaptureResult#SYNC_FRAME_NUMBER 1459 * @hide 1460 */ 1461 public static final int SYNC_FRAME_NUMBER_UNKNOWN = -2; 1462 1463 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 1464 * End generated code 1465 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/ 1466 1467} 1468