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