CameraMetadata.java revision 9f880f79a3f179443c8b37c3434717432b2ec8d9
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.util.ArrayList; 23import java.util.Collections; 24import java.util.List; 25 26/** 27 * The base class for camera controls and information. 28 * 29 * <p> 30 * This class defines the basic key/value map used for querying for camera 31 * characteristics or capture results, and for setting camera request 32 * parameters. 33 * </p> 34 * 35 * <p> 36 * All instances of CameraMetadata are immutable. The list of keys with {@link #getKeys()} 37 * never changes, nor do the values returned by any key with {@link #get} throughout 38 * the lifetime of the object. 39 * </p> 40 * 41 * @see CameraDevice 42 * @see CameraManager 43 * @see CameraProperties 44 **/ 45public abstract class CameraMetadata { 46 47 /** 48 * @hide 49 */ 50 protected CameraMetadata() { 51 } 52 53 /** 54 * Get a camera metadata field value. 55 * 56 * <p>The field definitions can be 57 * found in {@link CameraProperties}, {@link CaptureResult}, and 58 * {@link CaptureRequest}.</p> 59 * 60 * <p>Querying the value for the same key more than once will return a value 61 * which is equal to the previous queried value.</p> 62 * 63 * @throws IllegalArgumentException if the key was not valid 64 * 65 * @param key The metadata field to read. 66 * @return The value of that key, or {@code null} if the field is not set. 67 */ 68 public abstract <T> T get(Key<T> key); 69 70 /** 71 * Returns a list of the keys contained in this map. 72 * 73 * <p>The list returned is not modifiable, so any attempts to modify it will throw 74 * a {@code UnsupportedOperationException}.</p> 75 * 76 * <p>All values retrieved by a key from this list with {@link #get} are guaranteed to be 77 * non-{@code null}. Each key is only listed once in the list. The order of the keys 78 * is undefined.</p> 79 * 80 * @return List of the keys contained in this map. 81 */ 82 public List<Key<?>> getKeys() { 83 return Collections.unmodifiableList(getKeysStatic(this.getClass(), this)); 84 } 85 86 /** 87 * Return a list of all the Key<?> that are declared as a field inside of the class 88 * {@code type}. 89 * 90 * <p> 91 * Optionally, if {@code instance} is not null, then filter out any keys with null values. 92 * </p> 93 */ 94 /*package*/ static ArrayList<Key<?>> getKeysStatic(Class<? extends CameraMetadata> type, 95 CameraMetadata instance) { 96 ArrayList<Key<?>> keyList = new ArrayList<Key<?>>(); 97 98 Field[] fields = type.getDeclaredFields(); 99 for (Field field : fields) { 100 if (field.getDeclaringClass().isAssignableFrom(Key.class)) { 101 Key<?> key; 102 try { 103 key = (Key<?>) field.get(instance); 104 } catch (IllegalAccessException e) { 105 throw new AssertionError("Can't get IllegalAccessException", e); 106 } catch (IllegalArgumentException e) { 107 throw new AssertionError("Can't get IllegalArgumentException", e); 108 } 109 if (instance == null || instance.get(key) != null) { 110 keyList.add(key); 111 } 112 } 113 } 114 115 return keyList; 116 } 117 118 public static class Key<T> { 119 120 private boolean mHasTag; 121 private int mTag; 122 private final Class<T> mType; 123 private final String mName; 124 125 /** 126 * @hide 127 */ 128 public Key(String name, Class<T> type) { 129 if (name == null) { 130 throw new NullPointerException("Key needs a valid name"); 131 } else if (type == null) { 132 throw new NullPointerException("Type needs to be non-null"); 133 } 134 mName = name; 135 mType = type; 136 } 137 138 public final String getName() { 139 return mName; 140 } 141 142 @Override 143 public final int hashCode() { 144 return mName.hashCode(); 145 } 146 147 @Override 148 @SuppressWarnings("unchecked") 149 public final boolean equals(Object o) { 150 if (this == o) { 151 return true; 152 } 153 154 if (!(o instanceof Key)) { 155 return false; 156 } 157 158 Key lhs = (Key) o; 159 160 return mName.equals(lhs.mName); 161 } 162 163 /** 164 * <p> 165 * Get the tag corresponding to this key. This enables insertion into the 166 * native metadata. 167 * </p> 168 * 169 * <p>This value is looked up the first time, and cached subsequently.</p> 170 * 171 * @return The tag numeric value corresponding to the string 172 * 173 * @hide 174 */ 175 public final int getTag() { 176 if (!mHasTag) { 177 mTag = CameraMetadataNative.getTag(mName); 178 mHasTag = true; 179 } 180 return mTag; 181 } 182 183 /** 184 * @hide 185 */ 186 public final Class<T> getType() { 187 return mType; 188 } 189 } 190 191 /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 192 * The enum values below this point are generated from metadata 193 * definitions in /system/media/camera/docs. Do not modify by hand or 194 * modify the comment blocks at the start or end. 195 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/ 196 197 // 198 // Enumeration values for CameraProperties#LENS_FACING 199 // 200 201 /** 202 * @see CameraProperties#LENS_FACING 203 */ 204 public static final int LENS_FACING_FRONT = 0; 205 206 /** 207 * @see CameraProperties#LENS_FACING 208 */ 209 public static final int LENS_FACING_BACK = 1; 210 211 // 212 // Enumeration values for CameraProperties#LED_AVAILABLE_LEDS 213 // 214 215 /** 216 * <p> 217 * android.led.transmit control is used 218 * </p> 219 * @see CameraProperties#LED_AVAILABLE_LEDS 220 * @hide 221 */ 222 public static final int LED_AVAILABLE_LEDS_TRANSMIT = 0; 223 224 // 225 // Enumeration values for CameraProperties#INFO_SUPPORTED_HARDWARE_LEVEL 226 // 227 228 /** 229 * @see CameraProperties#INFO_SUPPORTED_HARDWARE_LEVEL 230 */ 231 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0; 232 233 /** 234 * @see CameraProperties#INFO_SUPPORTED_HARDWARE_LEVEL 235 */ 236 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1; 237 238 // 239 // Enumeration values for CaptureRequest#COLOR_CORRECTION_MODE 240 // 241 242 /** 243 * <p> 244 * Use the android.colorCorrection.transform matrix 245 * and android.colorCorrection.gains to do color conversion 246 * </p> 247 * @see CaptureRequest#COLOR_CORRECTION_MODE 248 */ 249 public static final int COLOR_CORRECTION_MODE_TRANSFORM_MATRIX = 0; 250 251 /** 252 * <p> 253 * Must not slow down frame rate relative to raw 254 * bayer output 255 * </p> 256 * @see CaptureRequest#COLOR_CORRECTION_MODE 257 */ 258 public static final int COLOR_CORRECTION_MODE_FAST = 1; 259 260 /** 261 * <p> 262 * Frame rate may be reduced by high 263 * quality 264 * </p> 265 * @see CaptureRequest#COLOR_CORRECTION_MODE 266 */ 267 public static final int COLOR_CORRECTION_MODE_HIGH_QUALITY = 2; 268 269 // 270 // Enumeration values for CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 271 // 272 273 /** 274 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 275 */ 276 public static final int CONTROL_AE_ANTIBANDING_MODE_OFF = 0; 277 278 /** 279 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 280 */ 281 public static final int CONTROL_AE_ANTIBANDING_MODE_50HZ = 1; 282 283 /** 284 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 285 */ 286 public static final int CONTROL_AE_ANTIBANDING_MODE_60HZ = 2; 287 288 /** 289 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 290 */ 291 public static final int CONTROL_AE_ANTIBANDING_MODE_AUTO = 3; 292 293 // 294 // Enumeration values for CaptureRequest#CONTROL_AE_MODE 295 // 296 297 /** 298 * <p> 299 * Autoexposure is disabled; sensor.exposureTime, 300 * sensor.sensitivity and sensor.frameDuration are used 301 * </p> 302 * @see CaptureRequest#CONTROL_AE_MODE 303 */ 304 public static final int CONTROL_AE_MODE_OFF = 0; 305 306 /** 307 * <p> 308 * Autoexposure is active, no flash 309 * control 310 * </p> 311 * @see CaptureRequest#CONTROL_AE_MODE 312 */ 313 public static final int CONTROL_AE_MODE_ON = 1; 314 315 /** 316 * <p> 317 * if flash exists Autoexposure is active, auto 318 * flash control; flash may be fired when precapture 319 * trigger is activated, and for captures for which 320 * captureIntent = STILL_CAPTURE 321 * </p> 322 * @see CaptureRequest#CONTROL_AE_MODE 323 */ 324 public static final int CONTROL_AE_MODE_ON_AUTO_FLASH = 2; 325 326 /** 327 * <p> 328 * if flash exists Autoexposure is active, auto 329 * flash control for precapture trigger and always flash 330 * when captureIntent = STILL_CAPTURE 331 * </p> 332 * @see CaptureRequest#CONTROL_AE_MODE 333 */ 334 public static final int CONTROL_AE_MODE_ON_ALWAYS_FLASH = 3; 335 336 /** 337 * <p> 338 * optional Automatic red eye reduction with flash. 339 * If deemed necessary, red eye reduction sequence should 340 * fire when precapture trigger is activated, and final 341 * flash should fire when captureIntent = 342 * STILL_CAPTURE 343 * </p> 344 * @see CaptureRequest#CONTROL_AE_MODE 345 */ 346 public static final int CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE = 4; 347 348 // 349 // Enumeration values for CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 350 // 351 352 /** 353 * <p> 354 * The trigger is idle. 355 * </p> 356 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 357 */ 358 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_IDLE = 0; 359 360 /** 361 * <p> 362 * The precapture metering sequence 363 * must be started. The exact effect of the precapture 364 * trigger depends on the current AE mode and 365 * state. 366 * </p> 367 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 368 */ 369 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_START = 1; 370 371 // 372 // Enumeration values for CaptureRequest#CONTROL_AF_MODE 373 // 374 375 /** 376 * <p> 377 * The 3A routines do not control the lens; 378 * android.lens.focusDistance is controlled by the 379 * application 380 * </p> 381 * @see CaptureRequest#CONTROL_AF_MODE 382 */ 383 public static final int CONTROL_AF_MODE_OFF = 0; 384 385 /** 386 * <p> 387 * if lens is not fixed focus. 388 * </p><p> 389 * Use android.lens.minimumFocusDistance to determine if lens 390 * is fixed focus In this mode, the lens does not move unless 391 * the autofocus trigger action is called. When that trigger 392 * is activated, AF must transition to ACTIVE_SCAN, then to 393 * the outcome of the scan (FOCUSED or 394 * NOT_FOCUSED). 395 * </p><p> 396 * Triggering cancel AF resets the lens position to default, 397 * and sets the AF state to INACTIVE. 398 * </p> 399 * @see CaptureRequest#CONTROL_AF_MODE 400 */ 401 public static final int CONTROL_AF_MODE_AUTO = 1; 402 403 /** 404 * <p> 405 * In this mode, the lens does not move unless the 406 * autofocus trigger action is called. 407 * </p><p> 408 * When that trigger is activated, AF must transition to 409 * ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or 410 * NOT_FOCUSED). Triggering cancel AF resets the lens 411 * position to default, and sets the AF state to 412 * INACTIVE. 413 * </p> 414 * @see CaptureRequest#CONTROL_AF_MODE 415 */ 416 public static final int CONTROL_AF_MODE_MACRO = 2; 417 418 /** 419 * <p> 420 * In this mode, the AF algorithm modifies the lens 421 * position continually to attempt to provide a 422 * constantly-in-focus image stream. 423 * </p><p> 424 * The focusing behavior should be suitable for good quality 425 * video recording; typically this means slower focus 426 * movement and no overshoots. When the AF trigger is not 427 * involved, the AF algorithm should start in INACTIVE state, 428 * and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED 429 * states as appropriate. When the AF trigger is activated, 430 * the algorithm should immediately transition into 431 * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the 432 * lens position until a cancel AF trigger is received. 433 * </p><p> 434 * Once cancel is received, the algorithm should transition 435 * back to INACTIVE and resume passive scan. Note that this 436 * behavior is not identical to CONTINUOUS_PICTURE, since an 437 * ongoing PASSIVE_SCAN must immediately be 438 * canceled. 439 * </p> 440 * @see CaptureRequest#CONTROL_AF_MODE 441 */ 442 public static final int CONTROL_AF_MODE_CONTINUOUS_VIDEO = 3; 443 444 /** 445 * <p> 446 * In this mode, the AF algorithm modifies the lens 447 * position continually to attempt to provide a 448 * constantly-in-focus image stream. 449 * </p><p> 450 * The focusing behavior should be suitable for still image 451 * capture; typically this means focusing as fast as 452 * possible. When the AF trigger is not involved, the AF 453 * algorithm should start in INACTIVE state, and then 454 * transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as 455 * appropriate as it attempts to maintain focus. When the AF 456 * trigger is activated, the algorithm should finish its 457 * PASSIVE_SCAN if active, and then transition into 458 * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the 459 * lens position until a cancel AF trigger is received. 460 * </p><p> 461 * When the AF cancel trigger is activated, the algorithm 462 * should transition back to INACTIVE and then act as if it 463 * has just been started. 464 * </p> 465 * @see CaptureRequest#CONTROL_AF_MODE 466 */ 467 public static final int CONTROL_AF_MODE_CONTINUOUS_PICTURE = 4; 468 469 /** 470 * <p> 471 * Extended depth of field (digital focus). AF 472 * trigger is ignored, AF state should always be 473 * INACTIVE. 474 * </p> 475 * @see CaptureRequest#CONTROL_AF_MODE 476 */ 477 public static final int CONTROL_AF_MODE_EDOF = 5; 478 479 // 480 // Enumeration values for CaptureRequest#CONTROL_AF_TRIGGER 481 // 482 483 /** 484 * <p> 485 * The trigger is idle. 486 * </p> 487 * @see CaptureRequest#CONTROL_AF_TRIGGER 488 */ 489 public static final int CONTROL_AF_TRIGGER_IDLE = 0; 490 491 /** 492 * <p> 493 * Autofocus must trigger now. 494 * </p> 495 * @see CaptureRequest#CONTROL_AF_TRIGGER 496 */ 497 public static final int CONTROL_AF_TRIGGER_START = 1; 498 499 /** 500 * <p> 501 * Autofocus must return to initial 502 * state, and cancel any active trigger. 503 * </p> 504 * @see CaptureRequest#CONTROL_AF_TRIGGER 505 */ 506 public static final int CONTROL_AF_TRIGGER_CANCEL = 2; 507 508 // 509 // Enumeration values for CaptureRequest#CONTROL_AWB_MODE 510 // 511 512 /** 513 * @see CaptureRequest#CONTROL_AWB_MODE 514 */ 515 public static final int CONTROL_AWB_MODE_OFF = 0; 516 517 /** 518 * @see CaptureRequest#CONTROL_AWB_MODE 519 */ 520 public static final int CONTROL_AWB_MODE_AUTO = 1; 521 522 /** 523 * @see CaptureRequest#CONTROL_AWB_MODE 524 */ 525 public static final int CONTROL_AWB_MODE_INCANDESCENT = 2; 526 527 /** 528 * @see CaptureRequest#CONTROL_AWB_MODE 529 */ 530 public static final int CONTROL_AWB_MODE_FLUORESCENT = 3; 531 532 /** 533 * @see CaptureRequest#CONTROL_AWB_MODE 534 */ 535 public static final int CONTROL_AWB_MODE_WARM_FLUORESCENT = 4; 536 537 /** 538 * @see CaptureRequest#CONTROL_AWB_MODE 539 */ 540 public static final int CONTROL_AWB_MODE_DAYLIGHT = 5; 541 542 /** 543 * @see CaptureRequest#CONTROL_AWB_MODE 544 */ 545 public static final int CONTROL_AWB_MODE_CLOUDY_DAYLIGHT = 6; 546 547 /** 548 * @see CaptureRequest#CONTROL_AWB_MODE 549 */ 550 public static final int CONTROL_AWB_MODE_TWILIGHT = 7; 551 552 /** 553 * @see CaptureRequest#CONTROL_AWB_MODE 554 */ 555 public static final int CONTROL_AWB_MODE_SHADE = 8; 556 557 // 558 // Enumeration values for CaptureRequest#CONTROL_CAPTURE_INTENT 559 // 560 561 /** 562 * <p> 563 * This request doesn't fall into the other 564 * categories. Default to preview-like 565 * behavior. 566 * </p> 567 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 568 */ 569 public static final int CONTROL_CAPTURE_INTENT_CUSTOM = 0; 570 571 /** 572 * <p> 573 * This request is for a preview-like usecase. The 574 * precapture trigger may be used to start off a metering 575 * w/flash sequence 576 * </p> 577 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 578 */ 579 public static final int CONTROL_CAPTURE_INTENT_PREVIEW = 1; 580 581 /** 582 * <p> 583 * This request is for a still capture-type 584 * usecase. 585 * </p> 586 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 587 */ 588 public static final int CONTROL_CAPTURE_INTENT_STILL_CAPTURE = 2; 589 590 /** 591 * <p> 592 * This request is for a video recording 593 * usecase. 594 * </p> 595 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 596 */ 597 public static final int CONTROL_CAPTURE_INTENT_VIDEO_RECORD = 3; 598 599 /** 600 * <p> 601 * This request is for a video snapshot (still 602 * image while recording video) usecase 603 * </p> 604 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 605 */ 606 public static final int CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT = 4; 607 608 /** 609 * <p> 610 * This request is for a ZSL usecase; the 611 * application will stream full-resolution images and 612 * reprocess one or several later for a final 613 * capture 614 * </p> 615 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 616 */ 617 public static final int CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG = 5; 618 619 // 620 // Enumeration values for CaptureRequest#CONTROL_EFFECT_MODE 621 // 622 623 /** 624 * @see CaptureRequest#CONTROL_EFFECT_MODE 625 */ 626 public static final int CONTROL_EFFECT_MODE_OFF = 0; 627 628 /** 629 * @see CaptureRequest#CONTROL_EFFECT_MODE 630 */ 631 public static final int CONTROL_EFFECT_MODE_MONO = 1; 632 633 /** 634 * @see CaptureRequest#CONTROL_EFFECT_MODE 635 */ 636 public static final int CONTROL_EFFECT_MODE_NEGATIVE = 2; 637 638 /** 639 * @see CaptureRequest#CONTROL_EFFECT_MODE 640 */ 641 public static final int CONTROL_EFFECT_MODE_SOLARIZE = 3; 642 643 /** 644 * @see CaptureRequest#CONTROL_EFFECT_MODE 645 */ 646 public static final int CONTROL_EFFECT_MODE_SEPIA = 4; 647 648 /** 649 * @see CaptureRequest#CONTROL_EFFECT_MODE 650 */ 651 public static final int CONTROL_EFFECT_MODE_POSTERIZE = 5; 652 653 /** 654 * @see CaptureRequest#CONTROL_EFFECT_MODE 655 */ 656 public static final int CONTROL_EFFECT_MODE_WHITEBOARD = 6; 657 658 /** 659 * @see CaptureRequest#CONTROL_EFFECT_MODE 660 */ 661 public static final int CONTROL_EFFECT_MODE_BLACKBOARD = 7; 662 663 /** 664 * @see CaptureRequest#CONTROL_EFFECT_MODE 665 */ 666 public static final int CONTROL_EFFECT_MODE_AQUA = 8; 667 668 // 669 // Enumeration values for CaptureRequest#CONTROL_MODE 670 // 671 672 /** 673 * <p> 674 * Full application control of pipeline. All 3A 675 * routines are disabled, no other settings in 676 * android.control.* have any effect 677 * </p> 678 * @see CaptureRequest#CONTROL_MODE 679 */ 680 public static final int CONTROL_MODE_OFF = 0; 681 682 /** 683 * <p> 684 * Use settings for each individual 3A routine. 685 * Manual control of capture parameters is disabled. All 686 * controls in android.control.* besides sceneMode take 687 * effect 688 * </p> 689 * @see CaptureRequest#CONTROL_MODE 690 */ 691 public static final int CONTROL_MODE_AUTO = 1; 692 693 /** 694 * <p> 695 * Use specific scene mode. Enabling this disables 696 * control.aeMode, control.awbMode and control.afMode 697 * controls; the HAL must ignore those settings while 698 * USE_SCENE_MODE is active (except for FACE_PRIORITY 699 * scene mode). Other control entries are still active. 700 * This setting can only be used if availableSceneModes != 701 * UNSUPPORTED 702 * </p> 703 * @see CaptureRequest#CONTROL_MODE 704 */ 705 public static final int CONTROL_MODE_USE_SCENE_MODE = 2; 706 707 // 708 // Enumeration values for CaptureRequest#CONTROL_SCENE_MODE 709 // 710 711 /** 712 * @see CaptureRequest#CONTROL_SCENE_MODE 713 */ 714 public static final int CONTROL_SCENE_MODE_UNSUPPORTED = 0; 715 716 /** 717 * <p> 718 * if face detection support exists Use face 719 * detection data to drive 3A routines. If face detection 720 * statistics are disabled, should still operate correctly 721 * (but not return face detection statistics to the 722 * framework). 723 * </p><p> 724 * Unlike the other scene modes, aeMode, awbMode, and afMode 725 * remain active when FACE_PRIORITY is set. This is due to 726 * compatibility concerns with the old camera 727 * API 728 * </p> 729 * @see CaptureRequest#CONTROL_SCENE_MODE 730 */ 731 public static final int CONTROL_SCENE_MODE_FACE_PRIORITY = 1; 732 733 /** 734 * @see CaptureRequest#CONTROL_SCENE_MODE 735 */ 736 public static final int CONTROL_SCENE_MODE_ACTION = 2; 737 738 /** 739 * @see CaptureRequest#CONTROL_SCENE_MODE 740 */ 741 public static final int CONTROL_SCENE_MODE_PORTRAIT = 3; 742 743 /** 744 * @see CaptureRequest#CONTROL_SCENE_MODE 745 */ 746 public static final int CONTROL_SCENE_MODE_LANDSCAPE = 4; 747 748 /** 749 * @see CaptureRequest#CONTROL_SCENE_MODE 750 */ 751 public static final int CONTROL_SCENE_MODE_NIGHT = 5; 752 753 /** 754 * @see CaptureRequest#CONTROL_SCENE_MODE 755 */ 756 public static final int CONTROL_SCENE_MODE_NIGHT_PORTRAIT = 6; 757 758 /** 759 * @see CaptureRequest#CONTROL_SCENE_MODE 760 */ 761 public static final int CONTROL_SCENE_MODE_THEATRE = 7; 762 763 /** 764 * @see CaptureRequest#CONTROL_SCENE_MODE 765 */ 766 public static final int CONTROL_SCENE_MODE_BEACH = 8; 767 768 /** 769 * @see CaptureRequest#CONTROL_SCENE_MODE 770 */ 771 public static final int CONTROL_SCENE_MODE_SNOW = 9; 772 773 /** 774 * @see CaptureRequest#CONTROL_SCENE_MODE 775 */ 776 public static final int CONTROL_SCENE_MODE_SUNSET = 10; 777 778 /** 779 * @see CaptureRequest#CONTROL_SCENE_MODE 780 */ 781 public static final int CONTROL_SCENE_MODE_STEADYPHOTO = 11; 782 783 /** 784 * @see CaptureRequest#CONTROL_SCENE_MODE 785 */ 786 public static final int CONTROL_SCENE_MODE_FIREWORKS = 12; 787 788 /** 789 * @see CaptureRequest#CONTROL_SCENE_MODE 790 */ 791 public static final int CONTROL_SCENE_MODE_SPORTS = 13; 792 793 /** 794 * @see CaptureRequest#CONTROL_SCENE_MODE 795 */ 796 public static final int CONTROL_SCENE_MODE_PARTY = 14; 797 798 /** 799 * @see CaptureRequest#CONTROL_SCENE_MODE 800 */ 801 public static final int CONTROL_SCENE_MODE_CANDLELIGHT = 15; 802 803 /** 804 * @see CaptureRequest#CONTROL_SCENE_MODE 805 */ 806 public static final int CONTROL_SCENE_MODE_BARCODE = 16; 807 808 // 809 // Enumeration values for CaptureRequest#EDGE_MODE 810 // 811 812 /** 813 * <p> 814 * No edge enhancement is applied 815 * </p> 816 * @see CaptureRequest#EDGE_MODE 817 */ 818 public static final int EDGE_MODE_OFF = 0; 819 820 /** 821 * <p> 822 * Must not slow down frame rate relative to raw 823 * bayer output 824 * </p> 825 * @see CaptureRequest#EDGE_MODE 826 */ 827 public static final int EDGE_MODE_FAST = 1; 828 829 /** 830 * <p> 831 * Frame rate may be reduced by high 832 * quality 833 * </p> 834 * @see CaptureRequest#EDGE_MODE 835 */ 836 public static final int EDGE_MODE_HIGH_QUALITY = 2; 837 838 // 839 // Enumeration values for CaptureRequest#FLASH_MODE 840 // 841 842 /** 843 * <p> 844 * Do not fire the flash for this 845 * capture 846 * </p> 847 * @see CaptureRequest#FLASH_MODE 848 */ 849 public static final int FLASH_MODE_OFF = 0; 850 851 /** 852 * <p> 853 * if android.flash.available is true Fire flash 854 * for this capture based on firingPower, 855 * firingTime. 856 * </p> 857 * @see CaptureRequest#FLASH_MODE 858 */ 859 public static final int FLASH_MODE_SINGLE = 1; 860 861 /** 862 * <p> 863 * if android.flash.available is true Flash 864 * continuously on, power set by 865 * firingPower 866 * </p> 867 * @see CaptureRequest#FLASH_MODE 868 */ 869 public static final int FLASH_MODE_TORCH = 2; 870 871 // 872 // Enumeration values for CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 873 // 874 875 /** 876 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 877 */ 878 public static final int LENS_OPTICAL_STABILIZATION_MODE_OFF = 0; 879 880 /** 881 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 882 */ 883 public static final int LENS_OPTICAL_STABILIZATION_MODE_ON = 1; 884 885 // 886 // Enumeration values for CaptureRequest#NOISE_REDUCTION_MODE 887 // 888 889 /** 890 * <p> 891 * No noise reduction is applied 892 * </p> 893 * @see CaptureRequest#NOISE_REDUCTION_MODE 894 */ 895 public static final int NOISE_REDUCTION_MODE_OFF = 0; 896 897 /** 898 * <p> 899 * Must not slow down frame rate relative to raw 900 * bayer output 901 * </p> 902 * @see CaptureRequest#NOISE_REDUCTION_MODE 903 */ 904 public static final int NOISE_REDUCTION_MODE_FAST = 1; 905 906 /** 907 * <p> 908 * May slow down frame rate to provide highest 909 * quality 910 * </p> 911 * @see CaptureRequest#NOISE_REDUCTION_MODE 912 */ 913 public static final int NOISE_REDUCTION_MODE_HIGH_QUALITY = 2; 914 915 // 916 // Enumeration values for CaptureRequest#STATISTICS_FACE_DETECT_MODE 917 // 918 919 /** 920 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 921 */ 922 public static final int STATISTICS_FACE_DETECT_MODE_OFF = 0; 923 924 /** 925 * <p> 926 * Optional Return rectangle and confidence 927 * only 928 * </p> 929 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 930 */ 931 public static final int STATISTICS_FACE_DETECT_MODE_SIMPLE = 1; 932 933 /** 934 * <p> 935 * Optional Return all face 936 * metadata 937 * </p> 938 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 939 */ 940 public static final int STATISTICS_FACE_DETECT_MODE_FULL = 2; 941 942 // 943 // Enumeration values for CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 944 // 945 946 /** 947 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 948 */ 949 public static final int STATISTICS_LENS_SHADING_MAP_MODE_OFF = 0; 950 951 /** 952 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 953 */ 954 public static final int STATISTICS_LENS_SHADING_MAP_MODE_ON = 1; 955 956 // 957 // Enumeration values for CaptureRequest#TONEMAP_MODE 958 // 959 960 /** 961 * <p> 962 * Use the tone mapping curve specified in 963 * android.tonemap.curve 964 * </p> 965 * @see CaptureRequest#TONEMAP_MODE 966 */ 967 public static final int TONEMAP_MODE_CONTRAST_CURVE = 0; 968 969 /** 970 * <p> 971 * Must not slow down frame rate relative to raw 972 * bayer output 973 * </p> 974 * @see CaptureRequest#TONEMAP_MODE 975 */ 976 public static final int TONEMAP_MODE_FAST = 1; 977 978 /** 979 * <p> 980 * Frame rate may be reduced by high 981 * quality 982 * </p> 983 * @see CaptureRequest#TONEMAP_MODE 984 */ 985 public static final int TONEMAP_MODE_HIGH_QUALITY = 2; 986 987 // 988 // Enumeration values for CaptureResult#CONTROL_AE_STATE 989 // 990 991 /** 992 * <p> 993 * AE is off. When a camera device is opened, it starts in 994 * this state. 995 * </p> 996 * @see CaptureResult#CONTROL_AE_STATE 997 */ 998 public static final int CONTROL_AE_STATE_INACTIVE = 0; 999 1000 /** 1001 * <p> 1002 * AE doesn't yet have a good set of control values 1003 * for the current scene 1004 * </p> 1005 * @see CaptureResult#CONTROL_AE_STATE 1006 */ 1007 public static final int CONTROL_AE_STATE_SEARCHING = 1; 1008 1009 /** 1010 * <p> 1011 * AE has a good set of control values for the 1012 * current scene 1013 * </p> 1014 * @see CaptureResult#CONTROL_AE_STATE 1015 */ 1016 public static final int CONTROL_AE_STATE_CONVERGED = 2; 1017 1018 /** 1019 * <p> 1020 * AE has been locked (aeMode = 1021 * LOCKED) 1022 * </p> 1023 * @see CaptureResult#CONTROL_AE_STATE 1024 */ 1025 public static final int CONTROL_AE_STATE_LOCKED = 3; 1026 1027 /** 1028 * <p> 1029 * AE has a good set of control values, but flash 1030 * needs to be fired for good quality still 1031 * capture 1032 * </p> 1033 * @see CaptureResult#CONTROL_AE_STATE 1034 */ 1035 public static final int CONTROL_AE_STATE_FLASH_REQUIRED = 4; 1036 1037 /** 1038 * <p> 1039 * AE has been asked to do a precapture sequence 1040 * (through the 1041 * trigger_action(CAMERA2_TRIGGER_PRECAPTURE_METERING) 1042 * call), and is currently executing it. Once PRECAPTURE 1043 * completes, AE will transition to CONVERGED or 1044 * FLASH_REQUIRED as appropriate 1045 * </p> 1046 * @see CaptureResult#CONTROL_AE_STATE 1047 */ 1048 public static final int CONTROL_AE_STATE_PRECAPTURE = 5; 1049 1050 // 1051 // Enumeration values for CaptureResult#CONTROL_AF_STATE 1052 // 1053 1054 /** 1055 * <p> 1056 * AF off or has not yet tried to scan/been asked 1057 * to scan. When a camera device is opened, it starts in 1058 * this state. 1059 * </p> 1060 * @see CaptureResult#CONTROL_AF_STATE 1061 */ 1062 public static final int CONTROL_AF_STATE_INACTIVE = 0; 1063 1064 /** 1065 * <p> 1066 * if CONTINUOUS_* modes are supported. AF is 1067 * currently doing an AF scan initiated by a continuous 1068 * autofocus mode 1069 * </p> 1070 * @see CaptureResult#CONTROL_AF_STATE 1071 */ 1072 public static final int CONTROL_AF_STATE_PASSIVE_SCAN = 1; 1073 1074 /** 1075 * <p> 1076 * if CONTINUOUS_* modes are supported. AF currently 1077 * believes it is in focus, but may restart scanning at 1078 * any time. 1079 * </p> 1080 * @see CaptureResult#CONTROL_AF_STATE 1081 */ 1082 public static final int CONTROL_AF_STATE_PASSIVE_FOCUSED = 2; 1083 1084 /** 1085 * <p> 1086 * if AUTO or MACRO modes are supported. AF is doing 1087 * an AF scan because it was triggered by AF 1088 * trigger 1089 * </p> 1090 * @see CaptureResult#CONTROL_AF_STATE 1091 */ 1092 public static final int CONTROL_AF_STATE_ACTIVE_SCAN = 3; 1093 1094 /** 1095 * <p> 1096 * if any AF mode besides OFF is supported. AF 1097 * believes it is focused correctly and is 1098 * locked 1099 * </p> 1100 * @see CaptureResult#CONTROL_AF_STATE 1101 */ 1102 public static final int CONTROL_AF_STATE_FOCUSED_LOCKED = 4; 1103 1104 /** 1105 * <p> 1106 * if any AF mode besides OFF is supported. AF has 1107 * failed to focus successfully and is 1108 * locked 1109 * </p> 1110 * @see CaptureResult#CONTROL_AF_STATE 1111 */ 1112 public static final int CONTROL_AF_STATE_NOT_FOCUSED_LOCKED = 5; 1113 1114 /** 1115 * <p> 1116 * if CONTINUOUS_* modes are supported. AF finished a 1117 * passive scan without finding focus, and may restart 1118 * scanning at any time. 1119 * </p> 1120 * @see CaptureResult#CONTROL_AF_STATE 1121 */ 1122 public static final int CONTROL_AF_STATE_PASSIVE_UNFOCUSED = 6; 1123 1124 // 1125 // Enumeration values for CaptureResult#CONTROL_AWB_STATE 1126 // 1127 1128 /** 1129 * <p> 1130 * AWB is not in auto mode. When a camera device is opened, it 1131 * starts in this state. 1132 * </p> 1133 * @see CaptureResult#CONTROL_AWB_STATE 1134 */ 1135 public static final int CONTROL_AWB_STATE_INACTIVE = 0; 1136 1137 /** 1138 * <p> 1139 * AWB doesn't yet have a good set of control 1140 * values for the current scene 1141 * </p> 1142 * @see CaptureResult#CONTROL_AWB_STATE 1143 */ 1144 public static final int CONTROL_AWB_STATE_SEARCHING = 1; 1145 1146 /** 1147 * <p> 1148 * AWB has a good set of control values for the 1149 * current scene 1150 * </p> 1151 * @see CaptureResult#CONTROL_AWB_STATE 1152 */ 1153 public static final int CONTROL_AWB_STATE_CONVERGED = 2; 1154 1155 /** 1156 * <p> 1157 * AE has been locked (aeMode = 1158 * LOCKED) 1159 * </p> 1160 * @see CaptureResult#CONTROL_AWB_STATE 1161 */ 1162 public static final int CONTROL_AWB_STATE_LOCKED = 3; 1163 1164 // 1165 // Enumeration values for CaptureResult#FLASH_STATE 1166 // 1167 1168 /** 1169 * <p> 1170 * No flash on camera 1171 * </p> 1172 * @see CaptureResult#FLASH_STATE 1173 */ 1174 public static final int FLASH_STATE_UNAVAILABLE = 0; 1175 1176 /** 1177 * <p> 1178 * if android.flash.available is true Flash is 1179 * charging and cannot be fired 1180 * </p> 1181 * @see CaptureResult#FLASH_STATE 1182 */ 1183 public static final int FLASH_STATE_CHARGING = 1; 1184 1185 /** 1186 * <p> 1187 * if android.flash.available is true Flash is 1188 * ready to fire 1189 * </p> 1190 * @see CaptureResult#FLASH_STATE 1191 */ 1192 public static final int FLASH_STATE_READY = 2; 1193 1194 /** 1195 * <p> 1196 * if android.flash.available is true Flash fired 1197 * for this capture 1198 * </p> 1199 * @see CaptureResult#FLASH_STATE 1200 */ 1201 public static final int FLASH_STATE_FIRED = 3; 1202 1203 // 1204 // Enumeration values for CaptureResult#LENS_STATE 1205 // 1206 1207 /** 1208 * @see CaptureResult#LENS_STATE 1209 */ 1210 public static final int LENS_STATE_STATIONARY = 0; 1211 1212 /** 1213 * @see CaptureResult#LENS_STATE 1214 */ 1215 public static final int LENS_STATE_MOVING = 1; 1216 1217 // 1218 // Enumeration values for CaptureResult#STATISTICS_SCENE_FLICKER 1219 // 1220 1221 /** 1222 * @see CaptureResult#STATISTICS_SCENE_FLICKER 1223 */ 1224 public static final int STATISTICS_SCENE_FLICKER_NONE = 0; 1225 1226 /** 1227 * @see CaptureResult#STATISTICS_SCENE_FLICKER 1228 */ 1229 public static final int STATISTICS_SCENE_FLICKER_50HZ = 1; 1230 1231 /** 1232 * @see CaptureResult#STATISTICS_SCENE_FLICKER 1233 */ 1234 public static final int STATISTICS_SCENE_FLICKER_60HZ = 2; 1235 1236 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 1237 * End generated code 1238 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/ 1239 1240} 1241