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 17 package android.hardware.camera2; 18 19 import android.annotation.NonNull; 20 import android.hardware.camera2.impl.CameraMetadataNative; 21 import android.hardware.camera2.impl.PublicKey; 22 import android.hardware.camera2.impl.SyntheticKey; 23 import android.util.Log; 24 25 import java.lang.reflect.Field; 26 import java.lang.reflect.Modifier; 27 import java.util.ArrayList; 28 import java.util.Arrays; 29 import java.util.Collections; 30 import 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 **/ 51 public 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 */ CameraMetadata()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 */ getProtected(TKey key)87 protected abstract <T> T getProtected(TKey key); 88 89 /** 90 * @hide 91 */ getKeyClass()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 getKeys()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") getKeysStatic( Class<?> type, Class<TKey> keyClass, CameraMetadata<TKey> instance, int[] filterTags)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") shouldKeyBeAdded(TKey key, Field field, int[] filterTags)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_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</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_ACTIVE_ARRAY_SIZE 481 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_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>{@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}</li> 651 * <li>{@link CameraCharacteristics#LENS_RADIAL_DISTORTION 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_INTRINSIC_CALIBRATION 671 * @see CameraCharacteristics#LENS_POSE_ROTATION 672 * @see CameraCharacteristics#LENS_POSE_TRANSLATION 673 * @see CameraCharacteristics#LENS_RADIAL_DISTORTION 674 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 675 */ 676 public static final int REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT = 8; 677 678 /** 679 * <p>The device supports constrained high speed video recording (frame rate >=120fps) 680 * use case. The camera device will support high speed capture session created by 681 * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }, which 682 * only accepts high speed request lists created by 683 * {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList }.</p> 684 * <p>A camera device can still support high speed video streaming by advertising the high speed 685 * FPS ranges in {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges}. For this case, all normal 686 * capture request per frame control and synchronization requirements will apply to 687 * the high speed fps ranges, the same as all other fps ranges. This capability describes 688 * the capability of a specialized operating mode with many limitations (see below), which 689 * is only targeted at high speed video recording.</p> 690 * <p>The supported high speed video sizes and fps ranges are specified in 691 * {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges }. 692 * To get desired output frame rates, the application is only allowed to select video size 693 * and FPS range combinations provided by 694 * {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes }. 695 * The fps range can be controlled via {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}.</p> 696 * <p>In this capability, the camera device will override aeMode, awbMode, and afMode to 697 * ON, AUTO, and CONTINUOUS_VIDEO, respectively. All post-processing block mode 698 * controls will be overridden to be FAST. Therefore, no manual control of capture 699 * and post-processing parameters is possible. All other controls operate the 700 * same as when {@link CaptureRequest#CONTROL_MODE android.control.mode} == AUTO. This means that all other 701 * android.control.* fields continue to work, such as</p> 702 * <ul> 703 * <li>{@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}</li> 704 * <li>{@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}</li> 705 * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li> 706 * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li> 707 * <li>{@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</li> 708 * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li> 709 * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li> 710 * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li> 711 * <li>{@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}</li> 712 * <li>{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}</li> 713 * </ul> 714 * <p>Outside of android.control.*, the following controls will work:</p> 715 * <ul> 716 * <li>{@link CaptureRequest#FLASH_MODE android.flash.mode} (TORCH mode only, automatic flash for still capture will not 717 * work since aeMode is ON)</li> 718 * <li>{@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} (if it is supported)</li> 719 * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li> 720 * <li>{@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} (if it is supported)</li> 721 * </ul> 722 * <p>For high speed recording use case, the actual maximum supported frame rate may 723 * be lower than what camera can output, depending on the destination Surfaces for 724 * the image data. For example, if the destination surface is from video encoder, 725 * the application need check if the video encoder is capable of supporting the 726 * high frame rate for a given video size, or it will end up with lower recording 727 * frame rate. If the destination surface is from preview window, the actual preview frame 728 * rate will be bounded by the screen refresh rate.</p> 729 * <p>The camera device will only support up to 2 high speed simultaneous output surfaces 730 * (preview and recording surfaces) 731 * in this mode. Above controls will be effective only if all of below conditions are true:</p> 732 * <ul> 733 * <li>The application creates a camera capture session with no more than 2 surfaces via 734 * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }. The 735 * targeted surfaces must be preview surface (either from 736 * {@link android.view.SurfaceView } or {@link android.graphics.SurfaceTexture }) or 737 * recording surface(either from {@link android.media.MediaRecorder#getSurface } or 738 * {@link android.media.MediaCodec#createInputSurface }).</li> 739 * <li>The stream sizes are selected from the sizes reported by 740 * {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes }.</li> 741 * <li>The FPS ranges are selected from 742 * {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges }.</li> 743 * </ul> 744 * <p>When above conditions are NOT satistied, 745 * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession } 746 * will fail.</p> 747 * <p>Switching to a FPS range that has different maximum FPS may trigger some camera device 748 * reconfigurations, which may introduce extra latency. It is recommended that 749 * the application avoids unnecessary maximum target FPS changes as much as possible 750 * during high speed streaming.</p> 751 * 752 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES 753 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION 754 * @see CaptureRequest#CONTROL_AE_LOCK 755 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 756 * @see CaptureRequest#CONTROL_AE_REGIONS 757 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE 758 * @see CaptureRequest#CONTROL_AF_REGIONS 759 * @see CaptureRequest#CONTROL_AF_TRIGGER 760 * @see CaptureRequest#CONTROL_AWB_LOCK 761 * @see CaptureRequest#CONTROL_AWB_REGIONS 762 * @see CaptureRequest#CONTROL_EFFECT_MODE 763 * @see CaptureRequest#CONTROL_MODE 764 * @see CaptureRequest#FLASH_MODE 765 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 766 * @see CaptureRequest#SCALER_CROP_REGION 767 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 768 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 769 */ 770 public static final int REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO = 9; 771 772 // 773 // Enumeration values for CameraCharacteristics#SCALER_CROPPING_TYPE 774 // 775 776 /** 777 * <p>The camera device only supports centered crop regions.</p> 778 * @see CameraCharacteristics#SCALER_CROPPING_TYPE 779 */ 780 public static final int SCALER_CROPPING_TYPE_CENTER_ONLY = 0; 781 782 /** 783 * <p>The camera device supports arbitrarily chosen crop regions.</p> 784 * @see CameraCharacteristics#SCALER_CROPPING_TYPE 785 */ 786 public static final int SCALER_CROPPING_TYPE_FREEFORM = 1; 787 788 // 789 // Enumeration values for CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT 790 // 791 792 /** 793 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT 794 */ 795 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB = 0; 796 797 /** 798 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT 799 */ 800 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG = 1; 801 802 /** 803 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT 804 */ 805 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG = 2; 806 807 /** 808 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT 809 */ 810 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR = 3; 811 812 /** 813 * <p>Sensor is not Bayer; output has 3 16-bit 814 * values for each pixel, instead of just 1 16-bit value 815 * per pixel.</p> 816 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT 817 */ 818 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB = 4; 819 820 // 821 // Enumeration values for CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE 822 // 823 824 /** 825 * <p>Timestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in nanoseconds and monotonic, 826 * but can not be compared to timestamps from other subsystems 827 * (e.g. accelerometer, gyro etc.), or other instances of the same or different 828 * camera devices in the same system. Timestamps between streams and results for 829 * a single camera instance are comparable, and the timestamps for all buffers 830 * and the result metadata generated by a single capture are identical.</p> 831 * 832 * @see CaptureResult#SENSOR_TIMESTAMP 833 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE 834 */ 835 public static final int SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN = 0; 836 837 /** 838 * <p>Timestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in the same timebase as 839 * {@link android.os.SystemClock#elapsedRealtimeNanos }, 840 * and they can be compared to other timestamps using that base.</p> 841 * 842 * @see CaptureResult#SENSOR_TIMESTAMP 843 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE 844 */ 845 public static final int SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME = 1; 846 847 // 848 // Enumeration values for CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 849 // 850 851 /** 852 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 853 */ 854 public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT = 1; 855 856 /** 857 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 858 */ 859 public static final int SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT = 2; 860 861 /** 862 * <p>Incandescent light</p> 863 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 864 */ 865 public static final int SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN = 3; 866 867 /** 868 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 869 */ 870 public static final int SENSOR_REFERENCE_ILLUMINANT1_FLASH = 4; 871 872 /** 873 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 874 */ 875 public static final int SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER = 9; 876 877 /** 878 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 879 */ 880 public static final int SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER = 10; 881 882 /** 883 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 884 */ 885 public static final int SENSOR_REFERENCE_ILLUMINANT1_SHADE = 11; 886 887 /** 888 * <p>D 5700 - 7100K</p> 889 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 890 */ 891 public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT = 12; 892 893 /** 894 * <p>N 4600 - 5400K</p> 895 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 896 */ 897 public static final int SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT = 13; 898 899 /** 900 * <p>W 3900 - 4500K</p> 901 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 902 */ 903 public static final int SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT = 14; 904 905 /** 906 * <p>WW 3200 - 3700K</p> 907 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 908 */ 909 public static final int SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT = 15; 910 911 /** 912 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 913 */ 914 public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A = 17; 915 916 /** 917 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 918 */ 919 public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B = 18; 920 921 /** 922 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 923 */ 924 public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C = 19; 925 926 /** 927 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 928 */ 929 public static final int SENSOR_REFERENCE_ILLUMINANT1_D55 = 20; 930 931 /** 932 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 933 */ 934 public static final int SENSOR_REFERENCE_ILLUMINANT1_D65 = 21; 935 936 /** 937 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 938 */ 939 public static final int SENSOR_REFERENCE_ILLUMINANT1_D75 = 22; 940 941 /** 942 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 943 */ 944 public static final int SENSOR_REFERENCE_ILLUMINANT1_D50 = 23; 945 946 /** 947 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 948 */ 949 public static final int SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN = 24; 950 951 // 952 // Enumeration values for CameraCharacteristics#LED_AVAILABLE_LEDS 953 // 954 955 /** 956 * <p>android.led.transmit control is used.</p> 957 * @see CameraCharacteristics#LED_AVAILABLE_LEDS 958 * @hide 959 */ 960 public static final int LED_AVAILABLE_LEDS_TRANSMIT = 0; 961 962 // 963 // Enumeration values for CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 964 // 965 966 /** 967 * <p>This camera device has only limited capabilities.</p> 968 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 969 */ 970 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0; 971 972 /** 973 * <p>This camera device is capable of supporting advanced imaging applications.</p> 974 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 975 */ 976 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1; 977 978 /** 979 * <p>This camera device is running in backward compatibility mode.</p> 980 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 981 */ 982 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY = 2; 983 984 // 985 // Enumeration values for CameraCharacteristics#SYNC_MAX_LATENCY 986 // 987 988 /** 989 * <p>Every frame has the requests immediately applied.</p> 990 * <p>Changing controls over multiple requests one after another will 991 * produce results that have those controls applied atomically 992 * each frame.</p> 993 * <p>All FULL capability devices will have this as their maxLatency.</p> 994 * @see CameraCharacteristics#SYNC_MAX_LATENCY 995 */ 996 public static final int SYNC_MAX_LATENCY_PER_FRAME_CONTROL = 0; 997 998 /** 999 * <p>Each new frame has some subset (potentially the entire set) 1000 * of the past requests applied to the camera settings.</p> 1001 * <p>By submitting a series of identical requests, the camera device 1002 * will eventually have the camera settings applied, but it is 1003 * unknown when that exact point will be.</p> 1004 * <p>All LEGACY capability devices will have this as their maxLatency.</p> 1005 * @see CameraCharacteristics#SYNC_MAX_LATENCY 1006 */ 1007 public static final int SYNC_MAX_LATENCY_UNKNOWN = -1; 1008 1009 // 1010 // Enumeration values for CaptureRequest#COLOR_CORRECTION_MODE 1011 // 1012 1013 /** 1014 * <p>Use the {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} matrix 1015 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} to do color conversion.</p> 1016 * <p>All advanced white balance adjustments (not specified 1017 * by our white balance pipeline) must be disabled.</p> 1018 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then 1019 * TRANSFORM_MATRIX is ignored. The camera device will override 1020 * this value to either FAST or HIGH_QUALITY.</p> 1021 * 1022 * @see CaptureRequest#COLOR_CORRECTION_GAINS 1023 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 1024 * @see CaptureRequest#CONTROL_AWB_MODE 1025 * @see CaptureRequest#COLOR_CORRECTION_MODE 1026 */ 1027 public static final int COLOR_CORRECTION_MODE_TRANSFORM_MATRIX = 0; 1028 1029 /** 1030 * <p>Color correction processing must not slow down 1031 * capture rate relative to sensor raw output.</p> 1032 * <p>Advanced white balance adjustments above and beyond 1033 * the specified white balance pipeline may be applied.</p> 1034 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then 1035 * the camera device uses the last frame's AWB values 1036 * (or defaults if AWB has never been run).</p> 1037 * 1038 * @see CaptureRequest#CONTROL_AWB_MODE 1039 * @see CaptureRequest#COLOR_CORRECTION_MODE 1040 */ 1041 public static final int COLOR_CORRECTION_MODE_FAST = 1; 1042 1043 /** 1044 * <p>Color correction processing operates at improved 1045 * quality but the capture rate might be reduced (relative to sensor 1046 * raw output rate)</p> 1047 * <p>Advanced white balance adjustments above and beyond 1048 * the specified white balance pipeline may be applied.</p> 1049 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then 1050 * the camera device uses the last frame's AWB values 1051 * (or defaults if AWB has never been run).</p> 1052 * 1053 * @see CaptureRequest#CONTROL_AWB_MODE 1054 * @see CaptureRequest#COLOR_CORRECTION_MODE 1055 */ 1056 public static final int COLOR_CORRECTION_MODE_HIGH_QUALITY = 2; 1057 1058 // 1059 // Enumeration values for CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE 1060 // 1061 1062 /** 1063 * <p>No aberration correction is applied.</p> 1064 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE 1065 */ 1066 public static final int COLOR_CORRECTION_ABERRATION_MODE_OFF = 0; 1067 1068 /** 1069 * <p>Aberration correction will not slow down capture rate 1070 * relative to sensor raw output.</p> 1071 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE 1072 */ 1073 public static final int COLOR_CORRECTION_ABERRATION_MODE_FAST = 1; 1074 1075 /** 1076 * <p>Aberration correction operates at improved quality but the capture rate might be 1077 * reduced (relative to sensor raw output rate)</p> 1078 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE 1079 */ 1080 public static final int COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY = 2; 1081 1082 // 1083 // Enumeration values for CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 1084 // 1085 1086 /** 1087 * <p>The camera device will not adjust exposure duration to 1088 * avoid banding problems.</p> 1089 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 1090 */ 1091 public static final int CONTROL_AE_ANTIBANDING_MODE_OFF = 0; 1092 1093 /** 1094 * <p>The camera device will adjust exposure duration to 1095 * avoid banding problems with 50Hz illumination sources.</p> 1096 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 1097 */ 1098 public static final int CONTROL_AE_ANTIBANDING_MODE_50HZ = 1; 1099 1100 /** 1101 * <p>The camera device will adjust exposure duration to 1102 * avoid banding problems with 60Hz illumination 1103 * sources.</p> 1104 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 1105 */ 1106 public static final int CONTROL_AE_ANTIBANDING_MODE_60HZ = 2; 1107 1108 /** 1109 * <p>The camera device will automatically adapt its 1110 * antibanding routine to the current illumination 1111 * condition. This is the default mode if AUTO is 1112 * available on given camera device.</p> 1113 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 1114 */ 1115 public static final int CONTROL_AE_ANTIBANDING_MODE_AUTO = 3; 1116 1117 // 1118 // Enumeration values for CaptureRequest#CONTROL_AE_MODE 1119 // 1120 1121 /** 1122 * <p>The camera device's autoexposure routine is disabled.</p> 1123 * <p>The application-selected {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, 1124 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} and 1125 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are used by the camera 1126 * device, along with android.flash.* fields, if there's 1127 * a flash unit for this camera device.</p> 1128 * <p>Note that auto-white balance (AWB) and auto-focus (AF) 1129 * behavior is device dependent when AE is in OFF mode. 1130 * To have consistent behavior across different devices, 1131 * it is recommended to either set AWB and AF to OFF mode 1132 * or lock AWB and AF before setting AE to OFF. 1133 * See {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}, 1134 * {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}, and {@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger} 1135 * for more details.</p> 1136 * <p>LEGACY devices do not support the OFF mode and will 1137 * override attempts to use this value to ON.</p> 1138 * 1139 * @see CaptureRequest#CONTROL_AF_MODE 1140 * @see CaptureRequest#CONTROL_AF_TRIGGER 1141 * @see CaptureRequest#CONTROL_AWB_LOCK 1142 * @see CaptureRequest#CONTROL_AWB_MODE 1143 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 1144 * @see CaptureRequest#SENSOR_FRAME_DURATION 1145 * @see CaptureRequest#SENSOR_SENSITIVITY 1146 * @see CaptureRequest#CONTROL_AE_MODE 1147 */ 1148 public static final int CONTROL_AE_MODE_OFF = 0; 1149 1150 /** 1151 * <p>The camera device's autoexposure routine is active, 1152 * with no flash control.</p> 1153 * <p>The application's values for 1154 * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, 1155 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and 1156 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are ignored. The 1157 * application has control over the various 1158 * android.flash.* fields.</p> 1159 * 1160 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 1161 * @see CaptureRequest#SENSOR_FRAME_DURATION 1162 * @see CaptureRequest#SENSOR_SENSITIVITY 1163 * @see CaptureRequest#CONTROL_AE_MODE 1164 */ 1165 public static final int CONTROL_AE_MODE_ON = 1; 1166 1167 /** 1168 * <p>Like ON, except that the camera device also controls 1169 * the camera's flash unit, firing it in low-light 1170 * conditions.</p> 1171 * <p>The flash may be fired during a precapture sequence 1172 * (triggered by {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and 1173 * may be fired for captures for which the 1174 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to 1175 * STILL_CAPTURE</p> 1176 * 1177 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 1178 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 1179 * @see CaptureRequest#CONTROL_AE_MODE 1180 */ 1181 public static final int CONTROL_AE_MODE_ON_AUTO_FLASH = 2; 1182 1183 /** 1184 * <p>Like ON, except that the camera device also controls 1185 * the camera's flash unit, always firing it for still 1186 * captures.</p> 1187 * <p>The flash may be fired during a precapture sequence 1188 * (triggered by {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and 1189 * will always be fired for captures for which the 1190 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to 1191 * STILL_CAPTURE</p> 1192 * 1193 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 1194 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 1195 * @see CaptureRequest#CONTROL_AE_MODE 1196 */ 1197 public static final int CONTROL_AE_MODE_ON_ALWAYS_FLASH = 3; 1198 1199 /** 1200 * <p>Like ON_AUTO_FLASH, but with automatic red eye 1201 * reduction.</p> 1202 * <p>If deemed necessary by the camera device, a red eye 1203 * reduction flash will fire during the precapture 1204 * sequence.</p> 1205 * @see CaptureRequest#CONTROL_AE_MODE 1206 */ 1207 public static final int CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE = 4; 1208 1209 // 1210 // Enumeration values for CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 1211 // 1212 1213 /** 1214 * <p>The trigger is idle.</p> 1215 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 1216 */ 1217 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_IDLE = 0; 1218 1219 /** 1220 * <p>The precapture metering sequence will be started 1221 * by the camera device.</p> 1222 * <p>The exact effect of the precapture trigger depends on 1223 * the current AE mode and state.</p> 1224 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 1225 */ 1226 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_START = 1; 1227 1228 /** 1229 * <p>The camera device will cancel any currently active or completed 1230 * precapture metering sequence, the auto-exposure routine will return to its 1231 * initial state.</p> 1232 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 1233 */ 1234 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL = 2; 1235 1236 // 1237 // Enumeration values for CaptureRequest#CONTROL_AF_MODE 1238 // 1239 1240 /** 1241 * <p>The auto-focus routine does not control the lens; 1242 * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} is controlled by the 1243 * application.</p> 1244 * 1245 * @see CaptureRequest#LENS_FOCUS_DISTANCE 1246 * @see CaptureRequest#CONTROL_AF_MODE 1247 */ 1248 public static final int CONTROL_AF_MODE_OFF = 0; 1249 1250 /** 1251 * <p>Basic automatic focus mode.</p> 1252 * <p>In this mode, the lens does not move unless 1253 * the autofocus trigger action is called. When that trigger 1254 * is activated, AF will transition to ACTIVE_SCAN, then to 1255 * the outcome of the scan (FOCUSED or NOT_FOCUSED).</p> 1256 * <p>Always supported if lens is not fixed focus.</p> 1257 * <p>Use {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} to determine if lens 1258 * is fixed-focus.</p> 1259 * <p>Triggering AF_CANCEL resets the lens position to default, 1260 * and sets the AF state to INACTIVE.</p> 1261 * 1262 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 1263 * @see CaptureRequest#CONTROL_AF_MODE 1264 */ 1265 public static final int CONTROL_AF_MODE_AUTO = 1; 1266 1267 /** 1268 * <p>Close-up focusing mode.</p> 1269 * <p>In this mode, the lens does not move unless the 1270 * autofocus trigger action is called. When that trigger is 1271 * activated, AF will transition to ACTIVE_SCAN, then to 1272 * the outcome of the scan (FOCUSED or NOT_FOCUSED). This 1273 * mode is optimized for focusing on objects very close to 1274 * the camera.</p> 1275 * <p>When that trigger is activated, AF will transition to 1276 * ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or 1277 * NOT_FOCUSED). Triggering cancel AF resets the lens 1278 * position to default, and sets the AF state to 1279 * INACTIVE.</p> 1280 * @see CaptureRequest#CONTROL_AF_MODE 1281 */ 1282 public static final int CONTROL_AF_MODE_MACRO = 2; 1283 1284 /** 1285 * <p>In this mode, the AF algorithm modifies the lens 1286 * position continually to attempt to provide a 1287 * constantly-in-focus image stream.</p> 1288 * <p>The focusing behavior should be suitable for good quality 1289 * video recording; typically this means slower focus 1290 * movement and no overshoots. When the AF trigger is not 1291 * involved, the AF algorithm should start in INACTIVE state, 1292 * and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED 1293 * states as appropriate. When the AF trigger is activated, 1294 * the algorithm should immediately transition into 1295 * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the 1296 * lens position until a cancel AF trigger is received.</p> 1297 * <p>Once cancel is received, the algorithm should transition 1298 * back to INACTIVE and resume passive scan. Note that this 1299 * behavior is not identical to CONTINUOUS_PICTURE, since an 1300 * ongoing PASSIVE_SCAN must immediately be 1301 * canceled.</p> 1302 * @see CaptureRequest#CONTROL_AF_MODE 1303 */ 1304 public static final int CONTROL_AF_MODE_CONTINUOUS_VIDEO = 3; 1305 1306 /** 1307 * <p>In this mode, the AF algorithm modifies the lens 1308 * position continually to attempt to provide a 1309 * constantly-in-focus image stream.</p> 1310 * <p>The focusing behavior should be suitable for still image 1311 * capture; typically this means focusing as fast as 1312 * possible. When the AF trigger is not involved, the AF 1313 * algorithm should start in INACTIVE state, and then 1314 * transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as 1315 * appropriate as it attempts to maintain focus. When the AF 1316 * trigger is activated, the algorithm should finish its 1317 * PASSIVE_SCAN if active, and then transition into 1318 * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the 1319 * lens position until a cancel AF trigger is received.</p> 1320 * <p>When the AF cancel trigger is activated, the algorithm 1321 * should transition back to INACTIVE and then act as if it 1322 * has just been started.</p> 1323 * @see CaptureRequest#CONTROL_AF_MODE 1324 */ 1325 public static final int CONTROL_AF_MODE_CONTINUOUS_PICTURE = 4; 1326 1327 /** 1328 * <p>Extended depth of field (digital focus) mode.</p> 1329 * <p>The camera device will produce images with an extended 1330 * depth of field automatically; no special focusing 1331 * operations need to be done before taking a picture.</p> 1332 * <p>AF triggers are ignored, and the AF state will always be 1333 * INACTIVE.</p> 1334 * @see CaptureRequest#CONTROL_AF_MODE 1335 */ 1336 public static final int CONTROL_AF_MODE_EDOF = 5; 1337 1338 // 1339 // Enumeration values for CaptureRequest#CONTROL_AF_TRIGGER 1340 // 1341 1342 /** 1343 * <p>The trigger is idle.</p> 1344 * @see CaptureRequest#CONTROL_AF_TRIGGER 1345 */ 1346 public static final int CONTROL_AF_TRIGGER_IDLE = 0; 1347 1348 /** 1349 * <p>Autofocus will trigger now.</p> 1350 * @see CaptureRequest#CONTROL_AF_TRIGGER 1351 */ 1352 public static final int CONTROL_AF_TRIGGER_START = 1; 1353 1354 /** 1355 * <p>Autofocus will return to its initial 1356 * state, and cancel any currently active trigger.</p> 1357 * @see CaptureRequest#CONTROL_AF_TRIGGER 1358 */ 1359 public static final int CONTROL_AF_TRIGGER_CANCEL = 2; 1360 1361 // 1362 // Enumeration values for CaptureRequest#CONTROL_AWB_MODE 1363 // 1364 1365 /** 1366 * <p>The camera device's auto-white balance routine is disabled.</p> 1367 * <p>The application-selected color transform matrix 1368 * ({@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}) and gains 1369 * ({@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}) are used by the camera 1370 * device for manual white balance control.</p> 1371 * 1372 * @see CaptureRequest#COLOR_CORRECTION_GAINS 1373 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 1374 * @see CaptureRequest#CONTROL_AWB_MODE 1375 */ 1376 public static final int CONTROL_AWB_MODE_OFF = 0; 1377 1378 /** 1379 * <p>The camera device's auto-white balance routine is active.</p> 1380 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} 1381 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. 1382 * For devices that support the MANUAL_POST_PROCESSING capability, the 1383 * values used by the camera device for the transform and gains 1384 * will be available in the capture result for this request.</p> 1385 * 1386 * @see CaptureRequest#COLOR_CORRECTION_GAINS 1387 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 1388 * @see CaptureRequest#CONTROL_AWB_MODE 1389 */ 1390 public static final int CONTROL_AWB_MODE_AUTO = 1; 1391 1392 /** 1393 * <p>The camera device's auto-white balance routine is disabled; 1394 * the camera device uses incandescent light as the assumed scene 1395 * illumination for white balance.</p> 1396 * <p>While the exact white balance transforms are up to the 1397 * camera device, they will approximately match the CIE 1398 * standard illuminant A.</p> 1399 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} 1400 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. 1401 * For devices that support the MANUAL_POST_PROCESSING capability, the 1402 * values used by the camera device for the transform and gains 1403 * will be available in the capture result for this request.</p> 1404 * 1405 * @see CaptureRequest#COLOR_CORRECTION_GAINS 1406 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 1407 * @see CaptureRequest#CONTROL_AWB_MODE 1408 */ 1409 public static final int CONTROL_AWB_MODE_INCANDESCENT = 2; 1410 1411 /** 1412 * <p>The camera device's auto-white balance routine is disabled; 1413 * the camera device uses fluorescent light as the assumed scene 1414 * illumination for white balance.</p> 1415 * <p>While the exact white balance transforms are up to the 1416 * camera device, they will approximately match the CIE 1417 * standard illuminant F2.</p> 1418 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} 1419 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. 1420 * For devices that support the MANUAL_POST_PROCESSING capability, the 1421 * values used by the camera device for the transform and gains 1422 * will be available in the capture result for this request.</p> 1423 * 1424 * @see CaptureRequest#COLOR_CORRECTION_GAINS 1425 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 1426 * @see CaptureRequest#CONTROL_AWB_MODE 1427 */ 1428 public static final int CONTROL_AWB_MODE_FLUORESCENT = 3; 1429 1430 /** 1431 * <p>The camera device's auto-white balance routine is disabled; 1432 * the camera device uses warm fluorescent light as the assumed scene 1433 * illumination for white balance.</p> 1434 * <p>While the exact white balance transforms are up to the 1435 * camera device, they will approximately match the CIE 1436 * standard illuminant F4.</p> 1437 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} 1438 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. 1439 * For devices that support the MANUAL_POST_PROCESSING capability, the 1440 * values used by the camera device for the transform and gains 1441 * will be available in the capture result for this request.</p> 1442 * 1443 * @see CaptureRequest#COLOR_CORRECTION_GAINS 1444 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 1445 * @see CaptureRequest#CONTROL_AWB_MODE 1446 */ 1447 public static final int CONTROL_AWB_MODE_WARM_FLUORESCENT = 4; 1448 1449 /** 1450 * <p>The camera device's auto-white balance routine is disabled; 1451 * the camera device uses daylight light as the assumed scene 1452 * illumination for white balance.</p> 1453 * <p>While the exact white balance transforms are up to the 1454 * camera device, they will approximately match the CIE 1455 * standard illuminant D65.</p> 1456 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} 1457 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. 1458 * For devices that support the MANUAL_POST_PROCESSING capability, the 1459 * values used by the camera device for the transform and gains 1460 * will be available in the capture result for this request.</p> 1461 * 1462 * @see CaptureRequest#COLOR_CORRECTION_GAINS 1463 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 1464 * @see CaptureRequest#CONTROL_AWB_MODE 1465 */ 1466 public static final int CONTROL_AWB_MODE_DAYLIGHT = 5; 1467 1468 /** 1469 * <p>The camera device's auto-white balance routine is disabled; 1470 * the camera device uses cloudy daylight light as the assumed scene 1471 * illumination for white balance.</p> 1472 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} 1473 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. 1474 * For devices that support the MANUAL_POST_PROCESSING capability, the 1475 * values used by the camera device for the transform and gains 1476 * will be available in the capture result for this request.</p> 1477 * 1478 * @see CaptureRequest#COLOR_CORRECTION_GAINS 1479 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 1480 * @see CaptureRequest#CONTROL_AWB_MODE 1481 */ 1482 public static final int CONTROL_AWB_MODE_CLOUDY_DAYLIGHT = 6; 1483 1484 /** 1485 * <p>The camera device's auto-white balance routine is disabled; 1486 * the camera device uses twilight light as the assumed scene 1487 * illumination for white balance.</p> 1488 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} 1489 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. 1490 * For devices that support the MANUAL_POST_PROCESSING capability, the 1491 * values used by the camera device for the transform and gains 1492 * will be available in the capture result for this request.</p> 1493 * 1494 * @see CaptureRequest#COLOR_CORRECTION_GAINS 1495 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 1496 * @see CaptureRequest#CONTROL_AWB_MODE 1497 */ 1498 public static final int CONTROL_AWB_MODE_TWILIGHT = 7; 1499 1500 /** 1501 * <p>The camera device's auto-white balance routine is disabled; 1502 * the camera device uses shade light as the assumed scene 1503 * illumination for white balance.</p> 1504 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} 1505 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. 1506 * For devices that support the MANUAL_POST_PROCESSING capability, the 1507 * values used by the camera device for the transform and gains 1508 * will be available in the capture result for this request.</p> 1509 * 1510 * @see CaptureRequest#COLOR_CORRECTION_GAINS 1511 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 1512 * @see CaptureRequest#CONTROL_AWB_MODE 1513 */ 1514 public static final int CONTROL_AWB_MODE_SHADE = 8; 1515 1516 // 1517 // Enumeration values for CaptureRequest#CONTROL_CAPTURE_INTENT 1518 // 1519 1520 /** 1521 * <p>The goal of this request doesn't fall into the other 1522 * categories. The camera device will default to preview-like 1523 * behavior.</p> 1524 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 1525 */ 1526 public static final int CONTROL_CAPTURE_INTENT_CUSTOM = 0; 1527 1528 /** 1529 * <p>This request is for a preview-like use case.</p> 1530 * <p>The precapture trigger may be used to start off a metering 1531 * w/flash sequence.</p> 1532 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 1533 */ 1534 public static final int CONTROL_CAPTURE_INTENT_PREVIEW = 1; 1535 1536 /** 1537 * <p>This request is for a still capture-type 1538 * use case.</p> 1539 * <p>If the flash unit is under automatic control, it may fire as needed.</p> 1540 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 1541 */ 1542 public static final int CONTROL_CAPTURE_INTENT_STILL_CAPTURE = 2; 1543 1544 /** 1545 * <p>This request is for a video recording 1546 * use case.</p> 1547 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 1548 */ 1549 public static final int CONTROL_CAPTURE_INTENT_VIDEO_RECORD = 3; 1550 1551 /** 1552 * <p>This request is for a video snapshot (still 1553 * image while recording video) use case.</p> 1554 * <p>The camera device should take the highest-quality image 1555 * possible (given the other settings) without disrupting the 1556 * frame rate of video recording. </p> 1557 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 1558 */ 1559 public static final int CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT = 4; 1560 1561 /** 1562 * <p>This request is for a ZSL usecase; the 1563 * application will stream full-resolution images and 1564 * reprocess one or several later for a final 1565 * capture.</p> 1566 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 1567 */ 1568 public static final int CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG = 5; 1569 1570 /** 1571 * <p>This request is for manual capture use case where 1572 * the applications want to directly control the capture parameters.</p> 1573 * <p>For example, the application may wish to manually control 1574 * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, etc.</p> 1575 * 1576 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 1577 * @see CaptureRequest#SENSOR_SENSITIVITY 1578 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 1579 */ 1580 public static final int CONTROL_CAPTURE_INTENT_MANUAL = 6; 1581 1582 // 1583 // Enumeration values for CaptureRequest#CONTROL_EFFECT_MODE 1584 // 1585 1586 /** 1587 * <p>No color effect will be applied.</p> 1588 * @see CaptureRequest#CONTROL_EFFECT_MODE 1589 */ 1590 public static final int CONTROL_EFFECT_MODE_OFF = 0; 1591 1592 /** 1593 * <p>A "monocolor" effect where the image is mapped into 1594 * a single color.</p> 1595 * <p>This will typically be grayscale.</p> 1596 * @see CaptureRequest#CONTROL_EFFECT_MODE 1597 */ 1598 public static final int CONTROL_EFFECT_MODE_MONO = 1; 1599 1600 /** 1601 * <p>A "photo-negative" effect where the image's colors 1602 * are inverted.</p> 1603 * @see CaptureRequest#CONTROL_EFFECT_MODE 1604 */ 1605 public static final int CONTROL_EFFECT_MODE_NEGATIVE = 2; 1606 1607 /** 1608 * <p>A "solarisation" effect (Sabattier effect) where the 1609 * image is wholly or partially reversed in 1610 * tone.</p> 1611 * @see CaptureRequest#CONTROL_EFFECT_MODE 1612 */ 1613 public static final int CONTROL_EFFECT_MODE_SOLARIZE = 3; 1614 1615 /** 1616 * <p>A "sepia" effect where the image is mapped into warm 1617 * gray, red, and brown tones.</p> 1618 * @see CaptureRequest#CONTROL_EFFECT_MODE 1619 */ 1620 public static final int CONTROL_EFFECT_MODE_SEPIA = 4; 1621 1622 /** 1623 * <p>A "posterization" effect where the image uses 1624 * discrete regions of tone rather than a continuous 1625 * gradient of tones.</p> 1626 * @see CaptureRequest#CONTROL_EFFECT_MODE 1627 */ 1628 public static final int CONTROL_EFFECT_MODE_POSTERIZE = 5; 1629 1630 /** 1631 * <p>A "whiteboard" effect where the image is typically displayed 1632 * as regions of white, with black or grey details.</p> 1633 * @see CaptureRequest#CONTROL_EFFECT_MODE 1634 */ 1635 public static final int CONTROL_EFFECT_MODE_WHITEBOARD = 6; 1636 1637 /** 1638 * <p>A "blackboard" effect where the image is typically displayed 1639 * as regions of black, with white or grey details.</p> 1640 * @see CaptureRequest#CONTROL_EFFECT_MODE 1641 */ 1642 public static final int CONTROL_EFFECT_MODE_BLACKBOARD = 7; 1643 1644 /** 1645 * <p>An "aqua" effect where a blue hue is added to the image.</p> 1646 * @see CaptureRequest#CONTROL_EFFECT_MODE 1647 */ 1648 public static final int CONTROL_EFFECT_MODE_AQUA = 8; 1649 1650 // 1651 // Enumeration values for CaptureRequest#CONTROL_MODE 1652 // 1653 1654 /** 1655 * <p>Full application control of pipeline.</p> 1656 * <p>All control by the device's metering and focusing (3A) 1657 * routines is disabled, and no other settings in 1658 * android.control.* have any effect, except that 1659 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} may be used by the camera 1660 * device to select post-processing values for processing 1661 * blocks that do not allow for manual control, or are not 1662 * exposed by the camera API.</p> 1663 * <p>However, the camera device's 3A routines may continue to 1664 * collect statistics and update their internal state so that 1665 * when control is switched to AUTO mode, good control values 1666 * can be immediately applied.</p> 1667 * 1668 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 1669 * @see CaptureRequest#CONTROL_MODE 1670 */ 1671 public static final int CONTROL_MODE_OFF = 0; 1672 1673 /** 1674 * <p>Use settings for each individual 3A routine.</p> 1675 * <p>Manual control of capture parameters is disabled. All 1676 * controls in android.control.* besides sceneMode take 1677 * effect.</p> 1678 * @see CaptureRequest#CONTROL_MODE 1679 */ 1680 public static final int CONTROL_MODE_AUTO = 1; 1681 1682 /** 1683 * <p>Use a specific scene mode.</p> 1684 * <p>Enabling this disables control.aeMode, control.awbMode and 1685 * control.afMode controls; the camera device will ignore 1686 * those settings while USE_SCENE_MODE is active (except for 1687 * FACE_PRIORITY scene mode). Other control entries are still active. 1688 * This setting can only be used if scene mode is supported (i.e. 1689 * {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes} 1690 * contain some modes other than DISABLED).</p> 1691 * 1692 * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES 1693 * @see CaptureRequest#CONTROL_MODE 1694 */ 1695 public static final int CONTROL_MODE_USE_SCENE_MODE = 2; 1696 1697 /** 1698 * <p>Same as OFF mode, except that this capture will not be 1699 * used by camera device background auto-exposure, auto-white balance and 1700 * auto-focus algorithms (3A) to update their statistics.</p> 1701 * <p>Specifically, the 3A routines are locked to the last 1702 * values set from a request with AUTO, OFF, or 1703 * USE_SCENE_MODE, and any statistics or state updates 1704 * collected from manual captures with OFF_KEEP_STATE will be 1705 * discarded by the camera device.</p> 1706 * @see CaptureRequest#CONTROL_MODE 1707 */ 1708 public static final int CONTROL_MODE_OFF_KEEP_STATE = 3; 1709 1710 // 1711 // Enumeration values for CaptureRequest#CONTROL_SCENE_MODE 1712 // 1713 1714 /** 1715 * <p>Indicates that no scene modes are set for a given capture request.</p> 1716 * @see CaptureRequest#CONTROL_SCENE_MODE 1717 */ 1718 public static final int CONTROL_SCENE_MODE_DISABLED = 0; 1719 1720 /** 1721 * <p>If face detection support exists, use face 1722 * detection data for auto-focus, auto-white balance, and 1723 * auto-exposure routines.</p> 1724 * <p>If face detection statistics are disabled 1725 * (i.e. {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} is set to OFF), 1726 * this should still operate correctly (but will not return 1727 * face detection statistics to the framework).</p> 1728 * <p>Unlike the other scene modes, {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}, 1729 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} 1730 * remain active when FACE_PRIORITY is set.</p> 1731 * 1732 * @see CaptureRequest#CONTROL_AE_MODE 1733 * @see CaptureRequest#CONTROL_AF_MODE 1734 * @see CaptureRequest#CONTROL_AWB_MODE 1735 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 1736 * @see CaptureRequest#CONTROL_SCENE_MODE 1737 */ 1738 public static final int CONTROL_SCENE_MODE_FACE_PRIORITY = 1; 1739 1740 /** 1741 * <p>Optimized for photos of quickly moving objects.</p> 1742 * <p>Similar to SPORTS.</p> 1743 * @see CaptureRequest#CONTROL_SCENE_MODE 1744 */ 1745 public static final int CONTROL_SCENE_MODE_ACTION = 2; 1746 1747 /** 1748 * <p>Optimized for still photos of people.</p> 1749 * @see CaptureRequest#CONTROL_SCENE_MODE 1750 */ 1751 public static final int CONTROL_SCENE_MODE_PORTRAIT = 3; 1752 1753 /** 1754 * <p>Optimized for photos of distant macroscopic objects.</p> 1755 * @see CaptureRequest#CONTROL_SCENE_MODE 1756 */ 1757 public static final int CONTROL_SCENE_MODE_LANDSCAPE = 4; 1758 1759 /** 1760 * <p>Optimized for low-light settings.</p> 1761 * @see CaptureRequest#CONTROL_SCENE_MODE 1762 */ 1763 public static final int CONTROL_SCENE_MODE_NIGHT = 5; 1764 1765 /** 1766 * <p>Optimized for still photos of people in low-light 1767 * settings.</p> 1768 * @see CaptureRequest#CONTROL_SCENE_MODE 1769 */ 1770 public static final int CONTROL_SCENE_MODE_NIGHT_PORTRAIT = 6; 1771 1772 /** 1773 * <p>Optimized for dim, indoor settings where flash must 1774 * remain off.</p> 1775 * @see CaptureRequest#CONTROL_SCENE_MODE 1776 */ 1777 public static final int CONTROL_SCENE_MODE_THEATRE = 7; 1778 1779 /** 1780 * <p>Optimized for bright, outdoor beach settings.</p> 1781 * @see CaptureRequest#CONTROL_SCENE_MODE 1782 */ 1783 public static final int CONTROL_SCENE_MODE_BEACH = 8; 1784 1785 /** 1786 * <p>Optimized for bright, outdoor settings containing snow.</p> 1787 * @see CaptureRequest#CONTROL_SCENE_MODE 1788 */ 1789 public static final int CONTROL_SCENE_MODE_SNOW = 9; 1790 1791 /** 1792 * <p>Optimized for scenes of the setting sun.</p> 1793 * @see CaptureRequest#CONTROL_SCENE_MODE 1794 */ 1795 public static final int CONTROL_SCENE_MODE_SUNSET = 10; 1796 1797 /** 1798 * <p>Optimized to avoid blurry photos due to small amounts of 1799 * device motion (for example: due to hand shake).</p> 1800 * @see CaptureRequest#CONTROL_SCENE_MODE 1801 */ 1802 public static final int CONTROL_SCENE_MODE_STEADYPHOTO = 11; 1803 1804 /** 1805 * <p>Optimized for nighttime photos of fireworks.</p> 1806 * @see CaptureRequest#CONTROL_SCENE_MODE 1807 */ 1808 public static final int CONTROL_SCENE_MODE_FIREWORKS = 12; 1809 1810 /** 1811 * <p>Optimized for photos of quickly moving people.</p> 1812 * <p>Similar to ACTION.</p> 1813 * @see CaptureRequest#CONTROL_SCENE_MODE 1814 */ 1815 public static final int CONTROL_SCENE_MODE_SPORTS = 13; 1816 1817 /** 1818 * <p>Optimized for dim, indoor settings with multiple moving 1819 * people.</p> 1820 * @see CaptureRequest#CONTROL_SCENE_MODE 1821 */ 1822 public static final int CONTROL_SCENE_MODE_PARTY = 14; 1823 1824 /** 1825 * <p>Optimized for dim settings where the main light source 1826 * is a flame.</p> 1827 * @see CaptureRequest#CONTROL_SCENE_MODE 1828 */ 1829 public static final int CONTROL_SCENE_MODE_CANDLELIGHT = 15; 1830 1831 /** 1832 * <p>Optimized for accurately capturing a photo of barcode 1833 * for use by camera applications that wish to read the 1834 * barcode value.</p> 1835 * @see CaptureRequest#CONTROL_SCENE_MODE 1836 */ 1837 public static final int CONTROL_SCENE_MODE_BARCODE = 16; 1838 1839 /** 1840 * <p>This is deprecated, please use {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession } 1841 * and {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList } 1842 * for high speed video recording.</p> 1843 * <p>Optimized for high speed video recording (frame rate >=60fps) use case.</p> 1844 * <p>The supported high speed video sizes and fps ranges are specified in 1845 * android.control.availableHighSpeedVideoConfigurations. To get desired 1846 * output frame rates, the application is only allowed to select video size 1847 * and fps range combinations listed in this static metadata. The fps range 1848 * can be control via {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}.</p> 1849 * <p>In this mode, the camera device will override aeMode, awbMode, and afMode to 1850 * ON, ON, and CONTINUOUS_VIDEO, respectively. All post-processing block mode 1851 * controls will be overridden to be FAST. Therefore, no manual control of capture 1852 * and post-processing parameters is possible. All other controls operate the 1853 * same as when {@link CaptureRequest#CONTROL_MODE android.control.mode} == AUTO. This means that all other 1854 * android.control.* fields continue to work, such as</p> 1855 * <ul> 1856 * <li>{@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}</li> 1857 * <li>{@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}</li> 1858 * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li> 1859 * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li> 1860 * <li>{@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</li> 1861 * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li> 1862 * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li> 1863 * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li> 1864 * <li>{@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}</li> 1865 * <li>{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}</li> 1866 * </ul> 1867 * <p>Outside of android.control.*, the following controls will work:</p> 1868 * <ul> 1869 * <li>{@link CaptureRequest#FLASH_MODE android.flash.mode} (automatic flash for still capture will not work since aeMode is ON)</li> 1870 * <li>{@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} (if it is supported)</li> 1871 * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li> 1872 * <li>{@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}</li> 1873 * </ul> 1874 * <p>For high speed recording use case, the actual maximum supported frame rate may 1875 * be lower than what camera can output, depending on the destination Surfaces for 1876 * the image data. For example, if the destination surface is from video encoder, 1877 * the application need check if the video encoder is capable of supporting the 1878 * high frame rate for a given video size, or it will end up with lower recording 1879 * frame rate. If the destination surface is from preview window, the preview frame 1880 * rate will be bounded by the screen refresh rate.</p> 1881 * <p>The camera device will only support up to 2 output high speed streams 1882 * (processed non-stalling format defined in android.request.maxNumOutputStreams) 1883 * in this mode. This control will be effective only if all of below conditions are true:</p> 1884 * <ul> 1885 * <li>The application created no more than maxNumHighSpeedStreams processed non-stalling 1886 * format output streams, where maxNumHighSpeedStreams is calculated as 1887 * min(2, android.request.maxNumOutputStreams[Processed (but not-stalling)]).</li> 1888 * <li>The stream sizes are selected from the sizes reported by 1889 * android.control.availableHighSpeedVideoConfigurations.</li> 1890 * <li>No processed non-stalling or raw streams are configured.</li> 1891 * </ul> 1892 * <p>When above conditions are NOT satistied, the controls of this mode and 1893 * {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} will be ignored by the camera device, 1894 * the camera device will fall back to {@link CaptureRequest#CONTROL_MODE android.control.mode} <code>==</code> AUTO, 1895 * and the returned capture result metadata will give the fps range choosen 1896 * by the camera device.</p> 1897 * <p>Switching into or out of this mode may trigger some camera ISP/sensor 1898 * reconfigurations, which may introduce extra latency. It is recommended that 1899 * the application avoids unnecessary scene mode switch as much as possible.</p> 1900 * 1901 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION 1902 * @see CaptureRequest#CONTROL_AE_LOCK 1903 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 1904 * @see CaptureRequest#CONTROL_AE_REGIONS 1905 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE 1906 * @see CaptureRequest#CONTROL_AF_REGIONS 1907 * @see CaptureRequest#CONTROL_AF_TRIGGER 1908 * @see CaptureRequest#CONTROL_AWB_LOCK 1909 * @see CaptureRequest#CONTROL_AWB_REGIONS 1910 * @see CaptureRequest#CONTROL_EFFECT_MODE 1911 * @see CaptureRequest#CONTROL_MODE 1912 * @see CaptureRequest#FLASH_MODE 1913 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 1914 * @see CaptureRequest#SCALER_CROP_REGION 1915 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 1916 * @see CaptureRequest#CONTROL_SCENE_MODE 1917 * @deprecated Please refer to this API documentation to find the alternatives 1918 */ 1919 public static final int CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO = 17; 1920 1921 /** 1922 * <p>Turn on a device-specific high dynamic range (HDR) mode.</p> 1923 * <p>In this scene mode, the camera device captures images 1924 * that keep a larger range of scene illumination levels 1925 * visible in the final image. For example, when taking a 1926 * picture of a object in front of a bright window, both 1927 * the object and the scene through the window may be 1928 * visible when using HDR mode, while in normal AUTO mode, 1929 * one or the other may be poorly exposed. As a tradeoff, 1930 * HDR mode generally takes much longer to capture a single 1931 * image, has no user control, and may have other artifacts 1932 * depending on the HDR method used.</p> 1933 * <p>Therefore, HDR captures operate at a much slower rate 1934 * than regular captures.</p> 1935 * <p>In this mode, on LIMITED or FULL devices, when a request 1936 * is made with a {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} of 1937 * STILL_CAPTURE, the camera device will capture an image 1938 * using a high dynamic range capture technique. On LEGACY 1939 * devices, captures that target a JPEG-format output will 1940 * be captured with HDR, and the capture intent is not 1941 * relevant.</p> 1942 * <p>The HDR capture may involve the device capturing a burst 1943 * of images internally and combining them into one, or it 1944 * may involve the device using specialized high dynamic 1945 * range capture hardware. In all cases, a single image is 1946 * produced in response to a capture request submitted 1947 * while in HDR mode.</p> 1948 * <p>Since substantial post-processing is generally needed to 1949 * produce an HDR image, only YUV and JPEG outputs are 1950 * supported for LIMITED/FULL device HDR captures, and only 1951 * JPEG outputs are supported for LEGACY HDR 1952 * captures. Using a RAW output for HDR capture is not 1953 * supported.</p> 1954 * 1955 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 1956 * @see CaptureRequest#CONTROL_SCENE_MODE 1957 */ 1958 public static final int CONTROL_SCENE_MODE_HDR = 18; 1959 1960 /** 1961 * <p>Same as FACE_PRIORITY scene mode, except that the camera 1962 * device will choose higher sensitivity values ({@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}) 1963 * under low light conditions.</p> 1964 * <p>The camera device may be tuned to expose the images in a reduced 1965 * sensitivity range to produce the best quality images. For example, 1966 * if the {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange} gives range of [100, 1600], 1967 * the camera device auto-exposure routine tuning process may limit the actual 1968 * exposure sensitivity range to [100, 1200] to ensure that the noise level isn't 1969 * exessive in order to preserve the image quality. Under this situation, the image under 1970 * low light may be under-exposed when the sensor max exposure time (bounded by the 1971 * {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} when {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is one of the 1972 * ON_* modes) and effective max sensitivity are reached. This scene mode allows the 1973 * camera device auto-exposure routine to increase the sensitivity up to the max 1974 * sensitivity specified by {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange} when the scene is too 1975 * dark and the max exposure time is reached. The captured images may be noisier 1976 * compared with the images captured in normal FACE_PRIORITY mode; therefore, it is 1977 * recommended that the application only use this scene mode when it is capable of 1978 * reducing the noise level of the captured images.</p> 1979 * <p>Unlike the other scene modes, {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}, 1980 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} 1981 * remain active when FACE_PRIORITY_LOW_LIGHT is set.</p> 1982 * 1983 * @see CaptureRequest#CONTROL_AE_MODE 1984 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE 1985 * @see CaptureRequest#CONTROL_AF_MODE 1986 * @see CaptureRequest#CONTROL_AWB_MODE 1987 * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE 1988 * @see CaptureRequest#SENSOR_SENSITIVITY 1989 * @see CaptureRequest#CONTROL_SCENE_MODE 1990 * @hide 1991 */ 1992 public static final int CONTROL_SCENE_MODE_FACE_PRIORITY_LOW_LIGHT = 19; 1993 1994 // 1995 // Enumeration values for CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE 1996 // 1997 1998 /** 1999 * <p>Video stabilization is disabled.</p> 2000 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE 2001 */ 2002 public static final int CONTROL_VIDEO_STABILIZATION_MODE_OFF = 0; 2003 2004 /** 2005 * <p>Video stabilization is enabled.</p> 2006 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE 2007 */ 2008 public static final int CONTROL_VIDEO_STABILIZATION_MODE_ON = 1; 2009 2010 // 2011 // Enumeration values for CaptureRequest#EDGE_MODE 2012 // 2013 2014 /** 2015 * <p>No edge enhancement is applied.</p> 2016 * @see CaptureRequest#EDGE_MODE 2017 */ 2018 public static final int EDGE_MODE_OFF = 0; 2019 2020 /** 2021 * <p>Apply edge enhancement at a quality level that does not slow down frame rate 2022 * relative to sensor output. It may be the same as OFF if edge enhancement will 2023 * slow down frame rate relative to sensor.</p> 2024 * @see CaptureRequest#EDGE_MODE 2025 */ 2026 public static final int EDGE_MODE_FAST = 1; 2027 2028 /** 2029 * <p>Apply high-quality edge enhancement, at a cost of possibly reduced output frame rate.</p> 2030 * @see CaptureRequest#EDGE_MODE 2031 */ 2032 public static final int EDGE_MODE_HIGH_QUALITY = 2; 2033 2034 /** 2035 * <p>Edge enhancement is applied at different levels for different output streams, 2036 * based on resolution. Streams at maximum recording resolution (see {@link android.hardware.camera2.CameraDevice#createCaptureSession }) or below have 2037 * edge enhancement applied, while higher-resolution streams have no edge enhancement 2038 * applied. The level of edge enhancement for low-resolution streams is tuned so that 2039 * frame rate is not impacted, and the quality is equal to or better than FAST (since it 2040 * is only applied to lower-resolution outputs, quality may improve from FAST).</p> 2041 * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode 2042 * with YUV or PRIVATE reprocessing, where the application continuously captures 2043 * high-resolution intermediate buffers into a circular buffer, from which a final image is 2044 * produced via reprocessing when a user takes a picture. For such a use case, the 2045 * high-resolution buffers must not have edge enhancement applied to maximize efficiency of 2046 * preview and to avoid double-applying enhancement when reprocessed, while low-resolution 2047 * buffers (used for recording or preview, generally) need edge enhancement applied for 2048 * reasonable preview quality.</p> 2049 * <p>This mode is guaranteed to be supported by devices that support either the 2050 * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities 2051 * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} lists either of those capabilities) and it will 2052 * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p> 2053 * 2054 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 2055 * @see CaptureRequest#EDGE_MODE 2056 */ 2057 public static final int EDGE_MODE_ZERO_SHUTTER_LAG = 3; 2058 2059 // 2060 // Enumeration values for CaptureRequest#FLASH_MODE 2061 // 2062 2063 /** 2064 * <p>Do not fire the flash for this capture.</p> 2065 * @see CaptureRequest#FLASH_MODE 2066 */ 2067 public static final int FLASH_MODE_OFF = 0; 2068 2069 /** 2070 * <p>If the flash is available and charged, fire flash 2071 * for this capture.</p> 2072 * @see CaptureRequest#FLASH_MODE 2073 */ 2074 public static final int FLASH_MODE_SINGLE = 1; 2075 2076 /** 2077 * <p>Transition flash to continuously on.</p> 2078 * @see CaptureRequest#FLASH_MODE 2079 */ 2080 public static final int FLASH_MODE_TORCH = 2; 2081 2082 // 2083 // Enumeration values for CaptureRequest#HOT_PIXEL_MODE 2084 // 2085 2086 /** 2087 * <p>No hot pixel correction is applied.</p> 2088 * <p>The frame rate must not be reduced relative to sensor raw output 2089 * for this option.</p> 2090 * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p> 2091 * 2092 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP 2093 * @see CaptureRequest#HOT_PIXEL_MODE 2094 */ 2095 public static final int HOT_PIXEL_MODE_OFF = 0; 2096 2097 /** 2098 * <p>Hot pixel correction is applied, without reducing frame 2099 * rate relative to sensor raw output.</p> 2100 * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p> 2101 * 2102 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP 2103 * @see CaptureRequest#HOT_PIXEL_MODE 2104 */ 2105 public static final int HOT_PIXEL_MODE_FAST = 1; 2106 2107 /** 2108 * <p>High-quality hot pixel correction is applied, at a cost 2109 * of possibly reduced frame rate relative to sensor raw output.</p> 2110 * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p> 2111 * 2112 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP 2113 * @see CaptureRequest#HOT_PIXEL_MODE 2114 */ 2115 public static final int HOT_PIXEL_MODE_HIGH_QUALITY = 2; 2116 2117 // 2118 // Enumeration values for CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 2119 // 2120 2121 /** 2122 * <p>Optical stabilization is unavailable.</p> 2123 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 2124 */ 2125 public static final int LENS_OPTICAL_STABILIZATION_MODE_OFF = 0; 2126 2127 /** 2128 * <p>Optical stabilization is enabled.</p> 2129 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 2130 */ 2131 public static final int LENS_OPTICAL_STABILIZATION_MODE_ON = 1; 2132 2133 // 2134 // Enumeration values for CaptureRequest#NOISE_REDUCTION_MODE 2135 // 2136 2137 /** 2138 * <p>No noise reduction is applied.</p> 2139 * @see CaptureRequest#NOISE_REDUCTION_MODE 2140 */ 2141 public static final int NOISE_REDUCTION_MODE_OFF = 0; 2142 2143 /** 2144 * <p>Noise reduction is applied without reducing frame rate relative to sensor 2145 * output. It may be the same as OFF if noise reduction will reduce frame rate 2146 * relative to sensor.</p> 2147 * @see CaptureRequest#NOISE_REDUCTION_MODE 2148 */ 2149 public static final int NOISE_REDUCTION_MODE_FAST = 1; 2150 2151 /** 2152 * <p>High-quality noise reduction is applied, at the cost of possibly reduced frame 2153 * rate relative to sensor output.</p> 2154 * @see CaptureRequest#NOISE_REDUCTION_MODE 2155 */ 2156 public static final int NOISE_REDUCTION_MODE_HIGH_QUALITY = 2; 2157 2158 /** 2159 * <p>MINIMAL noise reduction is applied without reducing frame rate relative to 2160 * sensor output. </p> 2161 * @see CaptureRequest#NOISE_REDUCTION_MODE 2162 */ 2163 public static final int NOISE_REDUCTION_MODE_MINIMAL = 3; 2164 2165 /** 2166 * <p>Noise reduction is applied at different levels for different output streams, 2167 * based on resolution. Streams at maximum recording resolution (see {@link android.hardware.camera2.CameraDevice#createCaptureSession }) or below have noise 2168 * reduction applied, while higher-resolution streams have MINIMAL (if supported) or no 2169 * noise reduction applied (if MINIMAL is not supported.) The degree of noise reduction 2170 * for low-resolution streams is tuned so that frame rate is not impacted, and the quality 2171 * is equal to or better than FAST (since it is only applied to lower-resolution outputs, 2172 * quality may improve from FAST).</p> 2173 * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode 2174 * with YUV or PRIVATE reprocessing, where the application continuously captures 2175 * high-resolution intermediate buffers into a circular buffer, from which a final image is 2176 * produced via reprocessing when a user takes a picture. For such a use case, the 2177 * high-resolution buffers must not have noise reduction applied to maximize efficiency of 2178 * preview and to avoid over-applying noise filtering when reprocessing, while 2179 * low-resolution buffers (used for recording or preview, generally) need noise reduction 2180 * applied for reasonable preview quality.</p> 2181 * <p>This mode is guaranteed to be supported by devices that support either the 2182 * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities 2183 * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} lists either of those capabilities) and it will 2184 * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p> 2185 * 2186 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 2187 * @see CaptureRequest#NOISE_REDUCTION_MODE 2188 */ 2189 public static final int NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG = 4; 2190 2191 // 2192 // Enumeration values for CaptureRequest#SENSOR_TEST_PATTERN_MODE 2193 // 2194 2195 /** 2196 * <p>No test pattern mode is used, and the camera 2197 * device returns captures from the image sensor.</p> 2198 * <p>This is the default if the key is not set.</p> 2199 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 2200 */ 2201 public static final int SENSOR_TEST_PATTERN_MODE_OFF = 0; 2202 2203 /** 2204 * <p>Each pixel in <code>[R, G_even, G_odd, B]</code> is replaced by its 2205 * respective color channel provided in 2206 * {@link CaptureRequest#SENSOR_TEST_PATTERN_DATA android.sensor.testPatternData}.</p> 2207 * <p>For example:</p> 2208 * <pre><code>android.testPatternData = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0] 2209 * </code></pre> 2210 * <p>All green pixels are 100% green. All red/blue pixels are black.</p> 2211 * <pre><code>android.testPatternData = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0] 2212 * </code></pre> 2213 * <p>All red pixels are 100% red. Only the odd green pixels 2214 * are 100% green. All blue pixels are 100% black.</p> 2215 * 2216 * @see CaptureRequest#SENSOR_TEST_PATTERN_DATA 2217 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 2218 */ 2219 public static final int SENSOR_TEST_PATTERN_MODE_SOLID_COLOR = 1; 2220 2221 /** 2222 * <p>All pixel data is replaced with an 8-bar color pattern.</p> 2223 * <p>The vertical bars (left-to-right) are as follows:</p> 2224 * <ul> 2225 * <li>100% white</li> 2226 * <li>yellow</li> 2227 * <li>cyan</li> 2228 * <li>green</li> 2229 * <li>magenta</li> 2230 * <li>red</li> 2231 * <li>blue</li> 2232 * <li>black</li> 2233 * </ul> 2234 * <p>In general the image would look like the following:</p> 2235 * <pre><code>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 * W Y C G M R B K 2239 * W Y C G M R B K 2240 * . . . . . . . . 2241 * . . . . . . . . 2242 * . . . . . . . . 2243 * 2244 * (B = Blue, K = Black) 2245 * </code></pre> 2246 * <p>Each bar should take up 1/8 of the sensor pixel array width. 2247 * When this is not possible, the bar size should be rounded 2248 * down to the nearest integer and the pattern can repeat 2249 * on the right side.</p> 2250 * <p>Each bar's height must always take up the full sensor 2251 * pixel array height.</p> 2252 * <p>Each pixel in this test pattern must be set to either 2253 * 0% intensity or 100% intensity.</p> 2254 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 2255 */ 2256 public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS = 2; 2257 2258 /** 2259 * <p>The test pattern is similar to COLOR_BARS, except that 2260 * each bar should start at its specified color at the top, 2261 * and fade to gray at the bottom.</p> 2262 * <p>Furthermore each bar is further subdivided into a left and 2263 * right half. The left half should have a smooth gradient, 2264 * and the right half should have a quantized gradient.</p> 2265 * <p>In particular, the right half's should consist of blocks of the 2266 * same color for 1/16th active sensor pixel array width.</p> 2267 * <p>The least significant bits in the quantized gradient should 2268 * be copied from the most significant bits of the smooth gradient.</p> 2269 * <p>The height of each bar should always be a multiple of 128. 2270 * When this is not the case, the pattern should repeat at the bottom 2271 * of the image.</p> 2272 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 2273 */ 2274 public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY = 3; 2275 2276 /** 2277 * <p>All pixel data is replaced by a pseudo-random sequence 2278 * generated from a PN9 512-bit sequence (typically implemented 2279 * in hardware with a linear feedback shift register).</p> 2280 * <p>The generator should be reset at the beginning of each frame, 2281 * and thus each subsequent raw frame with this test pattern should 2282 * be exactly the same as the last.</p> 2283 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 2284 */ 2285 public static final int SENSOR_TEST_PATTERN_MODE_PN9 = 4; 2286 2287 /** 2288 * <p>The first custom test pattern. All custom patterns that are 2289 * available only on this camera device are at least this numeric 2290 * value.</p> 2291 * <p>All of the custom test patterns will be static 2292 * (that is the raw image must not vary from frame to frame).</p> 2293 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 2294 */ 2295 public static final int SENSOR_TEST_PATTERN_MODE_CUSTOM1 = 256; 2296 2297 // 2298 // Enumeration values for CaptureRequest#SHADING_MODE 2299 // 2300 2301 /** 2302 * <p>No lens shading correction is applied.</p> 2303 * @see CaptureRequest#SHADING_MODE 2304 */ 2305 public static final int SHADING_MODE_OFF = 0; 2306 2307 /** 2308 * <p>Apply lens shading corrections, without slowing 2309 * frame rate relative to sensor raw output</p> 2310 * @see CaptureRequest#SHADING_MODE 2311 */ 2312 public static final int SHADING_MODE_FAST = 1; 2313 2314 /** 2315 * <p>Apply high-quality lens shading correction, at the 2316 * cost of possibly reduced frame rate.</p> 2317 * @see CaptureRequest#SHADING_MODE 2318 */ 2319 public static final int SHADING_MODE_HIGH_QUALITY = 2; 2320 2321 // 2322 // Enumeration values for CaptureRequest#STATISTICS_FACE_DETECT_MODE 2323 // 2324 2325 /** 2326 * <p>Do not include face detection statistics in capture 2327 * results.</p> 2328 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 2329 */ 2330 public static final int STATISTICS_FACE_DETECT_MODE_OFF = 0; 2331 2332 /** 2333 * <p>Return face rectangle and confidence values only.</p> 2334 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 2335 */ 2336 public static final int STATISTICS_FACE_DETECT_MODE_SIMPLE = 1; 2337 2338 /** 2339 * <p>Return all face 2340 * metadata.</p> 2341 * <p>In this mode, face rectangles, scores, landmarks, and face IDs are all valid.</p> 2342 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 2343 */ 2344 public static final int STATISTICS_FACE_DETECT_MODE_FULL = 2; 2345 2346 // 2347 // Enumeration values for CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 2348 // 2349 2350 /** 2351 * <p>Do not include a lens shading map in the capture result.</p> 2352 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 2353 */ 2354 public static final int STATISTICS_LENS_SHADING_MAP_MODE_OFF = 0; 2355 2356 /** 2357 * <p>Include a lens shading map in the capture result.</p> 2358 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 2359 */ 2360 public static final int STATISTICS_LENS_SHADING_MAP_MODE_ON = 1; 2361 2362 // 2363 // Enumeration values for CaptureRequest#TONEMAP_MODE 2364 // 2365 2366 /** 2367 * <p>Use the tone mapping curve specified in 2368 * the {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}* entries.</p> 2369 * <p>All color enhancement and tonemapping must be disabled, except 2370 * for applying the tonemapping curve specified by 2371 * {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p> 2372 * <p>Must not slow down frame rate relative to raw 2373 * sensor output.</p> 2374 * 2375 * @see CaptureRequest#TONEMAP_CURVE 2376 * @see CaptureRequest#TONEMAP_MODE 2377 */ 2378 public static final int TONEMAP_MODE_CONTRAST_CURVE = 0; 2379 2380 /** 2381 * <p>Advanced gamma mapping and color enhancement may be applied, without 2382 * reducing frame rate compared to raw sensor output.</p> 2383 * @see CaptureRequest#TONEMAP_MODE 2384 */ 2385 public static final int TONEMAP_MODE_FAST = 1; 2386 2387 /** 2388 * <p>High-quality gamma mapping and color enhancement will be applied, at 2389 * the cost of possibly reduced frame rate compared to raw sensor output.</p> 2390 * @see CaptureRequest#TONEMAP_MODE 2391 */ 2392 public static final int TONEMAP_MODE_HIGH_QUALITY = 2; 2393 2394 /** 2395 * <p>Use the gamma value specified in {@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma} to peform 2396 * tonemapping.</p> 2397 * <p>All color enhancement and tonemapping must be disabled, except 2398 * for applying the tonemapping curve specified by {@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma}.</p> 2399 * <p>Must not slow down frame rate relative to raw sensor output.</p> 2400 * 2401 * @see CaptureRequest#TONEMAP_GAMMA 2402 * @see CaptureRequest#TONEMAP_MODE 2403 */ 2404 public static final int TONEMAP_MODE_GAMMA_VALUE = 3; 2405 2406 /** 2407 * <p>Use the preset tonemapping curve specified in 2408 * {@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve} to peform tonemapping.</p> 2409 * <p>All color enhancement and tonemapping must be disabled, except 2410 * for applying the tonemapping curve specified by 2411 * {@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve}.</p> 2412 * <p>Must not slow down frame rate relative to raw sensor output.</p> 2413 * 2414 * @see CaptureRequest#TONEMAP_PRESET_CURVE 2415 * @see CaptureRequest#TONEMAP_MODE 2416 */ 2417 public static final int TONEMAP_MODE_PRESET_CURVE = 4; 2418 2419 // 2420 // Enumeration values for CaptureRequest#TONEMAP_PRESET_CURVE 2421 // 2422 2423 /** 2424 * <p>Tonemapping curve is defined by sRGB</p> 2425 * @see CaptureRequest#TONEMAP_PRESET_CURVE 2426 */ 2427 public static final int TONEMAP_PRESET_CURVE_SRGB = 0; 2428 2429 /** 2430 * <p>Tonemapping curve is defined by ITU-R BT.709</p> 2431 * @see CaptureRequest#TONEMAP_PRESET_CURVE 2432 */ 2433 public static final int TONEMAP_PRESET_CURVE_REC709 = 1; 2434 2435 // 2436 // Enumeration values for CaptureResult#CONTROL_AE_STATE 2437 // 2438 2439 /** 2440 * <p>AE is off or recently reset.</p> 2441 * <p>When a camera device is opened, it starts in 2442 * this state. This is a transient state, the camera device may skip reporting 2443 * this state in capture result.</p> 2444 * @see CaptureResult#CONTROL_AE_STATE 2445 */ 2446 public static final int CONTROL_AE_STATE_INACTIVE = 0; 2447 2448 /** 2449 * <p>AE doesn't yet have a good set of control values 2450 * for the current scene.</p> 2451 * <p>This is a transient state, the camera device may skip 2452 * reporting this state in capture result.</p> 2453 * @see CaptureResult#CONTROL_AE_STATE 2454 */ 2455 public static final int CONTROL_AE_STATE_SEARCHING = 1; 2456 2457 /** 2458 * <p>AE has a good set of control values for the 2459 * current scene.</p> 2460 * @see CaptureResult#CONTROL_AE_STATE 2461 */ 2462 public static final int CONTROL_AE_STATE_CONVERGED = 2; 2463 2464 /** 2465 * <p>AE has been locked.</p> 2466 * @see CaptureResult#CONTROL_AE_STATE 2467 */ 2468 public static final int CONTROL_AE_STATE_LOCKED = 3; 2469 2470 /** 2471 * <p>AE has a good set of control values, but flash 2472 * needs to be fired for good quality still 2473 * capture.</p> 2474 * @see CaptureResult#CONTROL_AE_STATE 2475 */ 2476 public static final int CONTROL_AE_STATE_FLASH_REQUIRED = 4; 2477 2478 /** 2479 * <p>AE has been asked to do a precapture sequence 2480 * and is currently executing it.</p> 2481 * <p>Precapture can be triggered through setting 2482 * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} to START. Currently 2483 * active and completed (if it causes camera device internal AE lock) precapture 2484 * metering sequence can be canceled through setting 2485 * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} to CANCEL.</p> 2486 * <p>Once PRECAPTURE completes, AE will transition to CONVERGED 2487 * or FLASH_REQUIRED as appropriate. This is a transient 2488 * state, the camera device may skip reporting this state in 2489 * capture result.</p> 2490 * 2491 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 2492 * @see CaptureResult#CONTROL_AE_STATE 2493 */ 2494 public static final int CONTROL_AE_STATE_PRECAPTURE = 5; 2495 2496 // 2497 // Enumeration values for CaptureResult#CONTROL_AF_STATE 2498 // 2499 2500 /** 2501 * <p>AF is off or has not yet tried to scan/been asked 2502 * to scan.</p> 2503 * <p>When a camera device is opened, it starts in this 2504 * state. This is a transient state, the camera device may 2505 * skip reporting this state in capture 2506 * result.</p> 2507 * @see CaptureResult#CONTROL_AF_STATE 2508 */ 2509 public static final int CONTROL_AF_STATE_INACTIVE = 0; 2510 2511 /** 2512 * <p>AF is currently performing an AF scan initiated the 2513 * camera device in a continuous autofocus mode.</p> 2514 * <p>Only used by CONTINUOUS_* AF modes. This is a transient 2515 * state, the camera device may skip reporting this state in 2516 * capture result.</p> 2517 * @see CaptureResult#CONTROL_AF_STATE 2518 */ 2519 public static final int CONTROL_AF_STATE_PASSIVE_SCAN = 1; 2520 2521 /** 2522 * <p>AF currently believes it is in focus, but may 2523 * restart scanning at any time.</p> 2524 * <p>Only used by CONTINUOUS_* AF modes. This is a transient 2525 * state, the camera device may skip reporting this state in 2526 * capture result.</p> 2527 * @see CaptureResult#CONTROL_AF_STATE 2528 */ 2529 public static final int CONTROL_AF_STATE_PASSIVE_FOCUSED = 2; 2530 2531 /** 2532 * <p>AF is performing an AF scan because it was 2533 * triggered by AF trigger.</p> 2534 * <p>Only used by AUTO or MACRO AF modes. This is a transient 2535 * state, the camera device may skip reporting this state in 2536 * capture result.</p> 2537 * @see CaptureResult#CONTROL_AF_STATE 2538 */ 2539 public static final int CONTROL_AF_STATE_ACTIVE_SCAN = 3; 2540 2541 /** 2542 * <p>AF believes it is focused correctly and has locked 2543 * focus.</p> 2544 * <p>This state is reached only after an explicit START AF trigger has been 2545 * sent ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}), when good focus has been obtained.</p> 2546 * <p>The lens will remain stationary until the AF mode ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) is changed or 2547 * a new AF trigger is sent to the camera device ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}).</p> 2548 * 2549 * @see CaptureRequest#CONTROL_AF_MODE 2550 * @see CaptureRequest#CONTROL_AF_TRIGGER 2551 * @see CaptureResult#CONTROL_AF_STATE 2552 */ 2553 public static final int CONTROL_AF_STATE_FOCUSED_LOCKED = 4; 2554 2555 /** 2556 * <p>AF has failed to focus successfully and has locked 2557 * focus.</p> 2558 * <p>This state is reached only after an explicit START AF trigger has been 2559 * sent ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}), when good focus cannot be obtained.</p> 2560 * <p>The lens will remain stationary until the AF mode ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) is changed or 2561 * a new AF trigger is sent to the camera device ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}).</p> 2562 * 2563 * @see CaptureRequest#CONTROL_AF_MODE 2564 * @see CaptureRequest#CONTROL_AF_TRIGGER 2565 * @see CaptureResult#CONTROL_AF_STATE 2566 */ 2567 public static final int CONTROL_AF_STATE_NOT_FOCUSED_LOCKED = 5; 2568 2569 /** 2570 * <p>AF finished a passive scan without finding focus, 2571 * and may restart scanning at any time.</p> 2572 * <p>Only used by CONTINUOUS_* AF modes. This is a transient state, the camera 2573 * device may skip reporting this state in capture result.</p> 2574 * <p>LEGACY camera devices do not support this state. When a passive 2575 * scan has finished, it will always go to PASSIVE_FOCUSED.</p> 2576 * @see CaptureResult#CONTROL_AF_STATE 2577 */ 2578 public static final int CONTROL_AF_STATE_PASSIVE_UNFOCUSED = 6; 2579 2580 // 2581 // Enumeration values for CaptureResult#CONTROL_AWB_STATE 2582 // 2583 2584 /** 2585 * <p>AWB is not in auto mode, or has not yet started metering.</p> 2586 * <p>When a camera device is opened, it starts in this 2587 * state. This is a transient state, the camera device may 2588 * skip reporting this state in capture 2589 * result.</p> 2590 * @see CaptureResult#CONTROL_AWB_STATE 2591 */ 2592 public static final int CONTROL_AWB_STATE_INACTIVE = 0; 2593 2594 /** 2595 * <p>AWB doesn't yet have a good set of control 2596 * values for the current scene.</p> 2597 * <p>This is a transient state, the camera device 2598 * may skip reporting this state in capture result.</p> 2599 * @see CaptureResult#CONTROL_AWB_STATE 2600 */ 2601 public static final int CONTROL_AWB_STATE_SEARCHING = 1; 2602 2603 /** 2604 * <p>AWB has a good set of control values for the 2605 * current scene.</p> 2606 * @see CaptureResult#CONTROL_AWB_STATE 2607 */ 2608 public static final int CONTROL_AWB_STATE_CONVERGED = 2; 2609 2610 /** 2611 * <p>AWB has been locked.</p> 2612 * @see CaptureResult#CONTROL_AWB_STATE 2613 */ 2614 public static final int CONTROL_AWB_STATE_LOCKED = 3; 2615 2616 // 2617 // Enumeration values for CaptureResult#FLASH_STATE 2618 // 2619 2620 /** 2621 * <p>No flash on camera.</p> 2622 * @see CaptureResult#FLASH_STATE 2623 */ 2624 public static final int FLASH_STATE_UNAVAILABLE = 0; 2625 2626 /** 2627 * <p>Flash is charging and cannot be fired.</p> 2628 * @see CaptureResult#FLASH_STATE 2629 */ 2630 public static final int FLASH_STATE_CHARGING = 1; 2631 2632 /** 2633 * <p>Flash is ready to fire.</p> 2634 * @see CaptureResult#FLASH_STATE 2635 */ 2636 public static final int FLASH_STATE_READY = 2; 2637 2638 /** 2639 * <p>Flash fired for this capture.</p> 2640 * @see CaptureResult#FLASH_STATE 2641 */ 2642 public static final int FLASH_STATE_FIRED = 3; 2643 2644 /** 2645 * <p>Flash partially illuminated this frame.</p> 2646 * <p>This is usually due to the next or previous frame having 2647 * the flash fire, and the flash spilling into this capture 2648 * due to hardware limitations.</p> 2649 * @see CaptureResult#FLASH_STATE 2650 */ 2651 public static final int FLASH_STATE_PARTIAL = 4; 2652 2653 // 2654 // Enumeration values for CaptureResult#LENS_STATE 2655 // 2656 2657 /** 2658 * <p>The lens parameters ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}, 2659 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}) are not changing.</p> 2660 * 2661 * @see CaptureRequest#LENS_APERTURE 2662 * @see CaptureRequest#LENS_FILTER_DENSITY 2663 * @see CaptureRequest#LENS_FOCAL_LENGTH 2664 * @see CaptureRequest#LENS_FOCUS_DISTANCE 2665 * @see CaptureResult#LENS_STATE 2666 */ 2667 public static final int LENS_STATE_STATIONARY = 0; 2668 2669 /** 2670 * <p>One or several of the lens parameters 2671 * ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}, 2672 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} or {@link CaptureRequest#LENS_APERTURE android.lens.aperture}) is 2673 * currently changing.</p> 2674 * 2675 * @see CaptureRequest#LENS_APERTURE 2676 * @see CaptureRequest#LENS_FILTER_DENSITY 2677 * @see CaptureRequest#LENS_FOCAL_LENGTH 2678 * @see CaptureRequest#LENS_FOCUS_DISTANCE 2679 * @see CaptureResult#LENS_STATE 2680 */ 2681 public static final int LENS_STATE_MOVING = 1; 2682 2683 // 2684 // Enumeration values for CaptureResult#STATISTICS_SCENE_FLICKER 2685 // 2686 2687 /** 2688 * <p>The camera device does not detect any flickering illumination 2689 * in the current scene.</p> 2690 * @see CaptureResult#STATISTICS_SCENE_FLICKER 2691 */ 2692 public static final int STATISTICS_SCENE_FLICKER_NONE = 0; 2693 2694 /** 2695 * <p>The camera device detects illumination flickering at 50Hz 2696 * in the current scene.</p> 2697 * @see CaptureResult#STATISTICS_SCENE_FLICKER 2698 */ 2699 public static final int STATISTICS_SCENE_FLICKER_50HZ = 1; 2700 2701 /** 2702 * <p>The camera device detects illumination flickering at 60Hz 2703 * in the current scene.</p> 2704 * @see CaptureResult#STATISTICS_SCENE_FLICKER 2705 */ 2706 public static final int STATISTICS_SCENE_FLICKER_60HZ = 2; 2707 2708 // 2709 // Enumeration values for CaptureResult#SYNC_FRAME_NUMBER 2710 // 2711 2712 /** 2713 * <p>The current result is not yet fully synchronized to any request.</p> 2714 * <p>Synchronization is in progress, and reading metadata from this 2715 * result may include a mix of data that have taken effect since the 2716 * last synchronization time.</p> 2717 * <p>In some future result, within {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} frames, 2718 * this value will update to the actual frame number frame number 2719 * the result is guaranteed to be synchronized to (as long as the 2720 * request settings remain constant).</p> 2721 * 2722 * @see CameraCharacteristics#SYNC_MAX_LATENCY 2723 * @see CaptureResult#SYNC_FRAME_NUMBER 2724 * @hide 2725 */ 2726 public static final int SYNC_FRAME_NUMBER_CONVERGING = -1; 2727 2728 /** 2729 * <p>The current result's synchronization status is unknown.</p> 2730 * <p>The result may have already converged, or it may be in 2731 * progress. Reading from this result may include some mix 2732 * of settings from past requests.</p> 2733 * <p>After a settings change, the new settings will eventually all 2734 * take effect for the output buffers and results. However, this 2735 * value will not change when that happens. Altering settings 2736 * rapidly may provide outcomes using mixes of settings from recent 2737 * requests.</p> 2738 * <p>This value is intended primarily for backwards compatibility with 2739 * the older camera implementations (for android.hardware.Camera).</p> 2740 * @see CaptureResult#SYNC_FRAME_NUMBER 2741 * @hide 2742 */ 2743 public static final int SYNC_FRAME_NUMBER_UNKNOWN = -2; 2744 2745 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 2746 * End generated code 2747 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/ 2748 2749 } 2750