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