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