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