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.FlaggedApi; 20 import android.annotation.NonNull; 21 import android.annotation.TestApi; 22 import android.compat.annotation.UnsupportedAppUsage; 23 import android.hardware.camera2.impl.CameraMetadataNative; 24 import android.hardware.camera2.impl.ExtensionKey; 25 import android.hardware.camera2.impl.PublicKey; 26 import android.hardware.camera2.impl.SyntheticKey; 27 import android.util.Log; 28 29 import com.android.internal.camera.flags.Flags; 30 31 import java.lang.reflect.Field; 32 import java.lang.reflect.Modifier; 33 import java.util.ArrayList; 34 import java.util.Arrays; 35 import java.util.Collections; 36 import java.util.List; 37 38 /** 39 * The base class for camera controls and information. 40 * 41 * <p> 42 * This class defines the basic key/value map used for querying for camera 43 * characteristics or capture results, and for setting camera request 44 * parameters. 45 * </p> 46 * 47 * <p> 48 * All instances of CameraMetadata are immutable. Beginning with API level 32, the list of keys 49 * returned by {@link #getKeys()} may change depending on the state of the device, as may the 50 * values returned by any key with {@code #get} throughout the lifetime of the object. For 51 * information on whether a specific value is fixed, see the documentation for its key. 52 * </p> 53 * 54 * @see CameraDevice 55 * @see CameraManager 56 * @see CameraCharacteristics 57 **/ 58 public abstract class CameraMetadata<TKey> { 59 60 private static final String TAG = "CameraMetadataAb"; 61 private static final boolean DEBUG = false; 62 private CameraMetadataNative mNativeInstance = null; 63 64 /** 65 * Set a camera metadata field to a value. The field definitions can be 66 * found in {@link CameraCharacteristics}, {@link CaptureResult}, and 67 * {@link CaptureRequest}. 68 * 69 * @param key The metadata field to write. 70 * @param value The value to set the field to, which must be of a matching 71 * type to the key. 72 * 73 * @hide 74 */ CameraMetadata()75 protected CameraMetadata() { 76 } 77 78 /** 79 * Get a camera metadata field value. 80 * 81 * <p>The field definitions can be 82 * found in {@link CameraCharacteristics}, {@link CaptureResult}, and 83 * {@link CaptureRequest}.</p> 84 * 85 * <p>Querying the value for the same key more than once will return a value 86 * which is equal to the previous queried value.</p> 87 * 88 * @throws IllegalArgumentException if the key was not valid 89 * 90 * @param key The metadata field to read. 91 * @return The value of that key, or {@code null} if the field is not set. 92 * 93 * @hide 94 */ getProtected(TKey key)95 protected abstract <T> T getProtected(TKey key); 96 97 /** 98 * @hide 99 */ setNativeInstance(CameraMetadataNative nativeInstance)100 protected void setNativeInstance(CameraMetadataNative nativeInstance) { 101 mNativeInstance = nativeInstance; 102 } 103 104 /** 105 * Retrieves the native std::shared_ptr<CameraMetadata*>* as a Java long. 106 * Returns 0 if mNativeInstance is null. 107 * 108 * @hide 109 */ 110 @UnsupportedAppUsage(publicAlternatives = "This method is exposed for native " 111 + "{@code ACameraMetadata_fromCameraMetadata} in {@code libcamera2ndk}.") getNativeMetadataPtr()112 public long getNativeMetadataPtr() { 113 if (mNativeInstance == null) { 114 return 0; 115 } else { 116 return mNativeInstance.getMetadataPtr(); 117 } 118 } 119 120 /** 121 * Retrieves the CameraMetadataNative instance. 122 * 123 * @hide 124 */ getNativeMetadata()125 public CameraMetadataNative getNativeMetadata() { 126 return mNativeInstance; 127 } 128 129 /** 130 * @hide 131 */ getKeyClass()132 protected abstract Class<TKey> getKeyClass(); 133 134 /** 135 * Returns a list of the keys contained in this map. 136 * 137 * <p>The list returned is not modifiable, so any attempts to modify it will throw 138 * a {@code UnsupportedOperationException}.</p> 139 * 140 * <p>All values retrieved by a key from this list with {@code #get} are guaranteed to be 141 * non-{@code null}. Each key is only listed once in the list. The order of the keys 142 * is undefined.</p> 143 * 144 * @return List of the keys contained in this map. 145 */ 146 @SuppressWarnings("unchecked") 147 @NonNull getKeys()148 public List<TKey> getKeys() { 149 Class<CameraMetadata<TKey>> thisClass = (Class<CameraMetadata<TKey>>) getClass(); 150 return Collections.unmodifiableList( 151 getKeys(thisClass, getKeyClass(), this, /*filterTags*/null, 152 /*includeSynthetic*/ true)); 153 } 154 155 /** 156 * Return a list of all the Key<?> that are declared as a field inside of the class 157 * {@code type}. 158 * 159 * <p> 160 * Optionally, if {@code instance} is not null, then filter out any keys with null values. 161 * </p> 162 * 163 * <p> 164 * Optionally, if {@code filterTags} is not {@code null}, then filter out any keys 165 * whose native {@code tag} is not in {@code filterTags}. The {@code filterTags} array will be 166 * sorted as a side effect. 167 * {@code includeSynthetic} Includes public synthetic fields by default. 168 * </p> 169 */ 170 /*package*/ @SuppressWarnings("unchecked") getKeys( Class<?> type, Class<TKey> keyClass, CameraMetadata<TKey> instance, int[] filterTags, boolean includeSynthetic)171 <TKey> ArrayList<TKey> getKeys( 172 Class<?> type, Class<TKey> keyClass, 173 CameraMetadata<TKey> instance, 174 int[] filterTags, boolean includeSynthetic) { 175 176 if (DEBUG) Log.v(TAG, "getKeysStatic for " + type); 177 178 // TotalCaptureResult does not have any of the keys on it, use CaptureResult instead 179 if (type.equals(TotalCaptureResult.class)) { 180 type = CaptureResult.class; 181 } 182 183 if (filterTags != null) { 184 Arrays.sort(filterTags); 185 } 186 187 ArrayList<TKey> keyList = new ArrayList<TKey>(); 188 189 Field[] fields = type.getDeclaredFields(); 190 for (Field field : fields) { 191 // Filter for Keys that are public 192 if (field.getType().isAssignableFrom(keyClass) && 193 (field.getModifiers() & Modifier.PUBLIC) != 0) { 194 195 TKey key; 196 try { 197 key = (TKey) field.get(instance); 198 } catch (IllegalAccessException e) { 199 throw new AssertionError("Can't get IllegalAccessException", e); 200 } catch (IllegalArgumentException e) { 201 throw new AssertionError("Can't get IllegalArgumentException", e); 202 } 203 204 if (instance == null || instance.getProtected(key) != null) { 205 if (shouldKeyBeAdded(key, field, filterTags, includeSynthetic)) { 206 keyList.add(key); 207 208 if (DEBUG) { 209 Log.v(TAG, "getKeysStatic - key was added - " + key); 210 } 211 } else if (DEBUG) { 212 Log.v(TAG, "getKeysStatic - key was filtered - " + key); 213 } 214 } 215 } 216 } 217 218 if (null == mNativeInstance) { 219 return keyList; 220 } 221 222 ArrayList<TKey> vendorKeys = mNativeInstance.getAllVendorKeys(keyClass); 223 224 if (vendorKeys != null) { 225 for (TKey k : vendorKeys) { 226 String keyName; 227 long vendorId; 228 if (k instanceof CaptureRequest.Key<?>) { 229 keyName = ((CaptureRequest.Key<?>) k).getName(); 230 vendorId = ((CaptureRequest.Key<?>) k).getVendorId(); 231 } else if (k instanceof CaptureResult.Key<?>) { 232 keyName = ((CaptureResult.Key<?>) k).getName(); 233 vendorId = ((CaptureResult.Key<?>) k).getVendorId(); 234 } else if (k instanceof CameraCharacteristics.Key<?>) { 235 keyName = ((CameraCharacteristics.Key<?>) k).getName(); 236 vendorId = ((CameraCharacteristics.Key<?>) k).getVendorId(); 237 } else { 238 continue; 239 } 240 241 242 if (filterTags != null && Arrays.binarySearch(filterTags, 243 CameraMetadataNative.getTag(keyName, vendorId)) < 0) { 244 // ignore vendor keys not in filterTags 245 continue; 246 } 247 if (instance == null || instance.getProtected(k) != null) { 248 keyList.add(k); 249 } 250 251 } 252 } 253 254 return keyList; 255 } 256 257 @SuppressWarnings("rawtypes") shouldKeyBeAdded(TKey key, Field field, int[] filterTags, boolean includeSynthetic)258 private static <TKey> boolean shouldKeyBeAdded(TKey key, Field field, int[] filterTags, 259 boolean includeSynthetic) { 260 if (key == null) { 261 throw new NullPointerException("key must not be null"); 262 } 263 264 CameraMetadataNative.Key nativeKey; 265 266 /* 267 * Get the native key from the public api key 268 */ 269 if (key instanceof CameraCharacteristics.Key) { 270 nativeKey = ((CameraCharacteristics.Key)key).getNativeKey(); 271 } else if (key instanceof CaptureResult.Key) { 272 nativeKey = ((CaptureResult.Key)key).getNativeKey(); 273 } else if (key instanceof CaptureRequest.Key) { 274 nativeKey = ((CaptureRequest.Key)key).getNativeKey(); 275 } else { 276 // Reject fields that aren't a key 277 throw new IllegalArgumentException("key type must be that of a metadata key"); 278 } 279 280 if (field.getAnnotation(PublicKey.class) == null 281 && field.getAnnotation(ExtensionKey.class) == null) { 282 // Never expose @hide keys to the API user unless they are 283 // marked as @ExtensionKey, as these keys are publicly accessible via 284 // the extension key classes. 285 return false; 286 } 287 288 // No filtering necessary 289 if (filterTags == null) { 290 return true; 291 } 292 293 if (field.getAnnotation(SyntheticKey.class) != null) { 294 // This key is synthetic, so calling #getTag will throw IAE 295 296 return includeSynthetic; 297 } 298 299 /* 300 * Regular key: look up it's native tag and see if it's in filterTags 301 */ 302 303 int keyTag = nativeKey.getTag(); 304 305 // non-negative result is returned iff the value is in the array 306 return Arrays.binarySearch(filterTags, keyTag) >= 0; 307 } 308 309 /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 310 * The enum values below this point are generated from metadata 311 * definitions in /system/media/camera/docs. Do not modify by hand or 312 * modify the comment blocks at the start or end. 313 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/ 314 315 // 316 // Enumeration values for CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION 317 // 318 319 /** 320 * <p>The lens focus distance is not accurate, and the units used for 321 * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} do not correspond to any physical units.</p> 322 * <p>Setting the lens to the same focus distance on separate occasions may 323 * result in a different real focus distance, depending on factors such 324 * as the orientation of the device, the age of the focusing mechanism, 325 * and the device temperature. The focus distance value will still be 326 * in the range of <code>[0, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code>, where 0 327 * represents the farthest focus.</p> 328 * 329 * @see CaptureRequest#LENS_FOCUS_DISTANCE 330 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 331 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION 332 */ 333 public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED = 0; 334 335 /** 336 * <p>The lens focus distance is measured in diopters.</p> 337 * <p>However, setting the lens to the same focus distance 338 * on separate occasions may result in a different real 339 * focus distance, depending on factors such as the 340 * orientation of the device, the age of the focusing 341 * mechanism, and the device temperature.</p> 342 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION 343 */ 344 public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE = 1; 345 346 /** 347 * <p>The lens focus distance is measured in diopters, and 348 * is calibrated.</p> 349 * <p>The lens mechanism is calibrated so that setting the 350 * same focus distance is repeatable on multiple 351 * occasions with good accuracy, and the focus distance 352 * corresponds to the real physical distance to the plane 353 * of best focus.</p> 354 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION 355 */ 356 public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED = 2; 357 358 // 359 // Enumeration values for CameraCharacteristics#LENS_FACING 360 // 361 362 /** 363 * <p>The camera device faces the same direction as the device's screen.</p> 364 * @see CameraCharacteristics#LENS_FACING 365 */ 366 public static final int LENS_FACING_FRONT = 0; 367 368 /** 369 * <p>The camera device faces the opposite direction as the device's screen.</p> 370 * @see CameraCharacteristics#LENS_FACING 371 */ 372 public static final int LENS_FACING_BACK = 1; 373 374 /** 375 * <p>The camera device is an external camera, and has no fixed facing relative to the 376 * device's screen.</p> 377 * @see CameraCharacteristics#LENS_FACING 378 */ 379 public static final int LENS_FACING_EXTERNAL = 2; 380 381 // 382 // Enumeration values for CameraCharacteristics#LENS_POSE_REFERENCE 383 // 384 385 /** 386 * <p>The value of {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation} is relative to the optical center of 387 * the largest camera device facing the same direction as this camera.</p> 388 * <p>This is the default value for API levels before Android P.</p> 389 * 390 * @see CameraCharacteristics#LENS_POSE_TRANSLATION 391 * @see CameraCharacteristics#LENS_POSE_REFERENCE 392 */ 393 public static final int LENS_POSE_REFERENCE_PRIMARY_CAMERA = 0; 394 395 /** 396 * <p>The value of {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation} is relative to the position of the 397 * primary gyroscope of this Android device.</p> 398 * 399 * @see CameraCharacteristics#LENS_POSE_TRANSLATION 400 * @see CameraCharacteristics#LENS_POSE_REFERENCE 401 */ 402 public static final int LENS_POSE_REFERENCE_GYROSCOPE = 1; 403 404 /** 405 * <p>The camera device cannot represent the values of {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation} 406 * and {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} accurately enough. One such example is a camera device 407 * on the cover of a foldable phone: in order to measure the pose translation and rotation, 408 * some kind of hinge position sensor would be needed.</p> 409 * <p>The value of {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation} must be all zeros, and 410 * {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} must be values matching its default facing.</p> 411 * 412 * @see CameraCharacteristics#LENS_POSE_ROTATION 413 * @see CameraCharacteristics#LENS_POSE_TRANSLATION 414 * @see CameraCharacteristics#LENS_POSE_REFERENCE 415 */ 416 public static final int LENS_POSE_REFERENCE_UNDEFINED = 2; 417 418 /** 419 * <p>The value of {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation} is relative to the origin of the 420 * automotive sensor coordinate system, which is at the center of the rear axle.</p> 421 * 422 * @see CameraCharacteristics#LENS_POSE_TRANSLATION 423 * @see CameraCharacteristics#LENS_POSE_REFERENCE 424 */ 425 public static final int LENS_POSE_REFERENCE_AUTOMOTIVE = 3; 426 427 // 428 // Enumeration values for CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 429 // 430 431 /** 432 * <p>The minimal set of capabilities that every camera 433 * device (regardless of {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}) 434 * supports.</p> 435 * <p>This capability is listed by all normal devices, and 436 * indicates that the camera device has a feature set 437 * that's comparable to the baseline requirements for the 438 * older android.hardware.Camera API.</p> 439 * <p>Devices with the DEPTH_OUTPUT capability might not list this 440 * capability, indicating that they support only depth measurement, 441 * not standard color output.</p> 442 * 443 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 444 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 445 */ 446 public static final int REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE = 0; 447 448 /** 449 * <p>The camera device can be manually controlled (3A algorithms such 450 * as auto-exposure, and auto-focus can be bypassed). 451 * The camera device supports basic manual control of the sensor image 452 * acquisition related stages. This means the following controls are 453 * guaranteed to be supported:</p> 454 * <ul> 455 * <li>Manual frame duration control<ul> 456 * <li>{@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}</li> 457 * <li>{@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li> 458 * </ul> 459 * </li> 460 * <li>Manual exposure control<ul> 461 * <li>{@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</li> 462 * <li>{@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li> 463 * </ul> 464 * </li> 465 * <li>Manual sensitivity control<ul> 466 * <li>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</li> 467 * <li>{@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</li> 468 * </ul> 469 * </li> 470 * <li>Manual lens control (if the lens is adjustable)<ul> 471 * <li>android.lens.*</li> 472 * </ul> 473 * </li> 474 * <li>Manual flash control (if a flash unit is present)<ul> 475 * <li>android.flash.*</li> 476 * </ul> 477 * </li> 478 * <li>Manual black level locking<ul> 479 * <li>{@link CaptureRequest#BLACK_LEVEL_LOCK android.blackLevel.lock}</li> 480 * </ul> 481 * </li> 482 * <li>Auto exposure lock<ul> 483 * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li> 484 * </ul> 485 * </li> 486 * </ul> 487 * <p>If any of the above 3A algorithms are enabled, then the camera 488 * device will accurately report the values applied by 3A in the 489 * result.</p> 490 * <p>A given camera device may also support additional manual sensor controls, 491 * but this capability only covers the above list of controls.</p> 492 * <p>If this is supported, {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} will 493 * additionally return a min frame duration that is greater than 494 * zero for each supported size-format combination.</p> 495 * <p>For camera devices with LOGICAL_MULTI_CAMERA capability, when the underlying active 496 * physical camera switches, exposureTime, sensitivity, and lens properties may change 497 * even if AE/AF is locked. However, the overall auto exposure and auto focus experience 498 * for users will be consistent. Refer to LOGICAL_MULTI_CAMERA capability for details.</p> 499 * 500 * @see CaptureRequest#BLACK_LEVEL_LOCK 501 * @see CaptureRequest#CONTROL_AE_LOCK 502 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP 503 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 504 * @see CaptureRequest#SENSOR_FRAME_DURATION 505 * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE 506 * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION 507 * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE 508 * @see CaptureRequest#SENSOR_SENSITIVITY 509 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 510 */ 511 public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR = 1; 512 513 /** 514 * <p>The camera device post-processing stages can be manually controlled. 515 * The camera device supports basic manual control of the image post-processing 516 * stages. This means the following controls are guaranteed to be supported:</p> 517 * <ul> 518 * <li> 519 * <p>Manual tonemap control</p> 520 * <ul> 521 * <li>{@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}</li> 522 * <li>{@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</li> 523 * <li>{@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</li> 524 * <li>{@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma}</li> 525 * <li>{@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve}</li> 526 * </ul> 527 * </li> 528 * <li> 529 * <p>Manual white balance control</p> 530 * <ul> 531 * <li>{@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}</li> 532 * <li>{@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}</li> 533 * </ul> 534 * </li> 535 * <li>Manual lens shading map control<ul> 536 * <li>{@link CaptureRequest#SHADING_MODE android.shading.mode}</li> 537 * <li>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode}</li> 538 * <li>android.statistics.lensShadingMap</li> 539 * <li>android.lens.info.shadingMapSize</li> 540 * </ul> 541 * </li> 542 * <li>Manual aberration correction control (if aberration correction is supported)<ul> 543 * <li>{@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}</li> 544 * <li>{@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES android.colorCorrection.availableAberrationModes}</li> 545 * </ul> 546 * </li> 547 * <li>Auto white balance lock<ul> 548 * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li> 549 * </ul> 550 * </li> 551 * </ul> 552 * <p>If auto white balance is enabled, then the camera device 553 * will accurately report the values applied by AWB in the result.</p> 554 * <p>A given camera device may also support additional post-processing 555 * controls, but this capability only covers the above list of controls.</p> 556 * <p>For camera devices with LOGICAL_MULTI_CAMERA capability, when underlying active 557 * physical camera switches, tonemap, white balance, and shading map may change even if 558 * awb is locked. However, the overall post-processing experience for users will be 559 * consistent. Refer to LOGICAL_MULTI_CAMERA capability for details.</p> 560 * 561 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE 562 * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES 563 * @see CaptureRequest#COLOR_CORRECTION_GAINS 564 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 565 * @see CaptureRequest#CONTROL_AWB_LOCK 566 * @see CaptureRequest#SHADING_MODE 567 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 568 * @see CaptureRequest#TONEMAP_CURVE 569 * @see CaptureRequest#TONEMAP_GAMMA 570 * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS 571 * @see CaptureRequest#TONEMAP_MODE 572 * @see CaptureRequest#TONEMAP_PRESET_CURVE 573 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 574 */ 575 public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING = 2; 576 577 /** 578 * <p>The camera device supports outputting RAW buffers and 579 * metadata for interpreting them.</p> 580 * <p>Devices supporting the RAW capability allow both for 581 * saving DNG files, and for direct application processing of 582 * raw sensor images.</p> 583 * <ul> 584 * <li>RAW_SENSOR is supported as an output format.</li> 585 * <li>The maximum available resolution for RAW_SENSOR streams 586 * will match either the value in 587 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize} or 588 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.</li> 589 * <li>All DNG-related optional metadata entries are provided 590 * by the camera device.</li> 591 * </ul> 592 * 593 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE 594 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE 595 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 596 */ 597 public static final int REQUEST_AVAILABLE_CAPABILITIES_RAW = 3; 598 599 /** 600 * <p>The camera device supports the Zero Shutter Lag reprocessing use case.</p> 601 * <ul> 602 * <li>One input stream is supported, that is, <code>{@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} == 1</code>.</li> 603 * <li>{@link android.graphics.ImageFormat#PRIVATE } is supported as an output/input format, 604 * that is, {@link android.graphics.ImageFormat#PRIVATE } is included in the lists of 605 * formats returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats } and {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats }.</li> 606 * <li>{@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput } 607 * returns non-empty int[] for each supported input format returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }.</li> 608 * <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> 609 * <li>Using {@link android.graphics.ImageFormat#PRIVATE } does not cause a frame rate drop 610 * relative to the sensor's maximum capture rate (at that resolution).</li> 611 * <li>{@link android.graphics.ImageFormat#PRIVATE } will be reprocessable into both 612 * {@link android.graphics.ImageFormat#YUV_420_888 } and 613 * {@link android.graphics.ImageFormat#JPEG } formats.</li> 614 * <li>For a MONOCHROME camera supporting Y8 format, {@link android.graphics.ImageFormat#PRIVATE } will be reprocessable into 615 * {@link android.graphics.ImageFormat#Y8 }.</li> 616 * <li>The maximum available resolution for PRIVATE streams 617 * (both input/output) will match the maximum available 618 * resolution of JPEG streams.</li> 619 * <li>Static metadata {@link CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL android.reprocess.maxCaptureStall}.</li> 620 * <li>Only below controls are effective for reprocessing requests and 621 * will be present in capture results, other controls in reprocess 622 * requests will be ignored by the camera device.<ul> 623 * <li>android.jpeg.*</li> 624 * <li>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</li> 625 * <li>{@link CaptureRequest#EDGE_MODE android.edge.mode}</li> 626 * </ul> 627 * </li> 628 * <li>{@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes} and 629 * {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes} will both list ZERO_SHUTTER_LAG as a supported mode.</li> 630 * </ul> 631 * 632 * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES 633 * @see CaptureRequest#EDGE_MODE 634 * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES 635 * @see CaptureRequest#NOISE_REDUCTION_MODE 636 * @see CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL 637 * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS 638 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 639 */ 640 public static final int REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING = 4; 641 642 /** 643 * <p>The camera device supports accurately reporting the sensor settings for many of 644 * the sensor controls while the built-in 3A algorithm is running. This allows 645 * reporting of sensor settings even when these settings cannot be manually changed.</p> 646 * <p>The values reported for the following controls are guaranteed to be available 647 * in the CaptureResult, including when 3A is enabled:</p> 648 * <ul> 649 * <li>Exposure control<ul> 650 * <li>{@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</li> 651 * </ul> 652 * </li> 653 * <li>Sensitivity control<ul> 654 * <li>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</li> 655 * </ul> 656 * </li> 657 * <li>Lens controls (if the lens is adjustable)<ul> 658 * <li>{@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}</li> 659 * <li>{@link CaptureRequest#LENS_APERTURE android.lens.aperture}</li> 660 * </ul> 661 * </li> 662 * </ul> 663 * <p>This capability is a subset of the MANUAL_SENSOR control capability, and will 664 * always be included if the MANUAL_SENSOR capability is available.</p> 665 * 666 * @see CaptureRequest#LENS_APERTURE 667 * @see CaptureRequest#LENS_FOCUS_DISTANCE 668 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 669 * @see CaptureRequest#SENSOR_SENSITIVITY 670 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 671 */ 672 public static final int REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS = 5; 673 674 /** 675 * <p>The camera device supports capturing high-resolution images at >= 20 frames per 676 * second, in at least the uncompressed YUV format, when post-processing settings are 677 * set to FAST. Additionally, all image resolutions less than 24 megapixels can be 678 * captured at >= 10 frames per second. Here, 'high resolution' means at least 8 679 * megapixels, or the maximum resolution of the device, whichever is smaller.</p> 680 * <p>More specifically, this means that a size matching the camera device's active array 681 * 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 }, 682 * with a minimum frame duration for that format and size of either <= 1/20 s, or 683 * <= 1/10 s if the image size is less than 24 megapixels, respectively; and 684 * the {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges} entry lists at least one FPS range 685 * where the minimum FPS is >= 1 / minimumFrameDuration for the maximum-size 686 * YUV_420_888 format. If that maximum size is listed in {@link android.hardware.camera2.params.StreamConfigurationMap#getHighResolutionOutputSizes }, 687 * then the list of resolutions for YUV_420_888 from {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } contains at 688 * least one resolution >= 8 megapixels, with a minimum frame duration of <= 1/20 689 * s.</p> 690 * <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 691 * captured at the same rate as the maximum-size YUV_420_888 resolution is.</p> 692 * <p>If the device supports the PRIVATE_REPROCESSING capability, then the same guarantees 693 * as for the YUV_420_888 format also apply to the {@link android.graphics.ImageFormat#PRIVATE } format.</p> 694 * <p>In addition, the {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} field is guaranteed to have a value between 0 695 * and 4, inclusive. {@link CameraCharacteristics#CONTROL_AE_LOCK_AVAILABLE android.control.aeLockAvailable} and {@link CameraCharacteristics#CONTROL_AWB_LOCK_AVAILABLE android.control.awbLockAvailable} 696 * are also guaranteed to be <code>true</code> so burst capture with these two locks ON yields 697 * consistent image output.</p> 698 * 699 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES 700 * @see CameraCharacteristics#CONTROL_AE_LOCK_AVAILABLE 701 * @see CameraCharacteristics#CONTROL_AWB_LOCK_AVAILABLE 702 * @see CameraCharacteristics#SYNC_MAX_LATENCY 703 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 704 */ 705 public static final int REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE = 6; 706 707 /** 708 * <p>The camera device supports the YUV_420_888 reprocessing use case, similar as 709 * PRIVATE_REPROCESSING, This capability requires the camera device to support the 710 * following:</p> 711 * <ul> 712 * <li>One input stream is supported, that is, <code>{@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} == 1</code>.</li> 713 * <li>{@link android.graphics.ImageFormat#YUV_420_888 } is supported as an output/input 714 * 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> 715 * <li>{@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput } 716 * returns non-empty int[] for each supported input format returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }.</li> 717 * <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> 718 * <li>Using {@link android.graphics.ImageFormat#YUV_420_888 } does not cause a frame rate 719 * drop relative to the sensor's maximum capture rate (at that resolution).</li> 720 * <li>{@link android.graphics.ImageFormat#YUV_420_888 } will be reprocessable into both 721 * {@link android.graphics.ImageFormat#YUV_420_888 } and {@link android.graphics.ImageFormat#JPEG } formats.</li> 722 * <li>The maximum available resolution for {@link android.graphics.ImageFormat#YUV_420_888 } streams (both input/output) will match the 723 * maximum available resolution of {@link android.graphics.ImageFormat#JPEG } streams.</li> 724 * <li>For a MONOCHROME camera with Y8 format support, all the requirements mentioned 725 * above for YUV_420_888 apply for Y8 format as well.</li> 726 * <li>Static metadata {@link CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL android.reprocess.maxCaptureStall}.</li> 727 * <li>Only the below controls are effective for reprocessing requests and will be present 728 * in capture results. The reprocess requests are from the original capture results 729 * that are associated with the intermediate {@link android.graphics.ImageFormat#YUV_420_888 } output buffers. All other controls in the 730 * reprocess requests will be ignored by the camera device.<ul> 731 * <li>android.jpeg.*</li> 732 * <li>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</li> 733 * <li>{@link CaptureRequest#EDGE_MODE android.edge.mode}</li> 734 * <li>{@link CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR android.reprocess.effectiveExposureFactor}</li> 735 * </ul> 736 * </li> 737 * <li>{@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes} and 738 * {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes} will both list ZERO_SHUTTER_LAG as a supported mode.</li> 739 * </ul> 740 * 741 * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES 742 * @see CaptureRequest#EDGE_MODE 743 * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES 744 * @see CaptureRequest#NOISE_REDUCTION_MODE 745 * @see CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR 746 * @see CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL 747 * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS 748 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 749 */ 750 public static final int REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING = 7; 751 752 /** 753 * <p>The camera device can produce depth measurements from its field of view.</p> 754 * <p>This capability requires the camera device to support the following:</p> 755 * <ul> 756 * <li>{@link android.graphics.ImageFormat#DEPTH16 } is supported as 757 * an output format.</li> 758 * <li>{@link android.graphics.ImageFormat#DEPTH_POINT_CLOUD } is 759 * optionally supported as an output format.</li> 760 * <li>This camera device, and all camera devices with the same {@link CameraCharacteristics#LENS_FACING android.lens.facing}, will 761 * list the following calibration metadata entries in both {@link android.hardware.camera2.CameraCharacteristics } 762 * and {@link android.hardware.camera2.CaptureResult }:<ul> 763 * <li>{@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}</li> 764 * <li>{@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}</li> 765 * <li>{@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}</li> 766 * <li>{@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}</li> 767 * </ul> 768 * </li> 769 * <li>The {@link CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE android.depth.depthIsExclusive} entry is listed by this device.</li> 770 * <li>As of Android P, the {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} entry is listed by this device.</li> 771 * <li>A LIMITED camera with only the DEPTH_OUTPUT capability does not have to support 772 * normal YUV_420_888, Y8, JPEG, and PRIV-format outputs. It only has to support the 773 * DEPTH16 format.</li> 774 * </ul> 775 * <p>Generally, depth output operates at a slower frame rate than standard color capture, 776 * so the DEPTH16 and DEPTH_POINT_CLOUD formats will commonly have a stall duration that 777 * should be accounted for (see {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration }). 778 * On a device that supports both depth and color-based output, to enable smooth preview, 779 * using a repeating burst is recommended, where a depth-output target is only included 780 * once every N frames, where N is the ratio between preview output rate and depth output 781 * rate, including depth stall time.</p> 782 * 783 * @see CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE 784 * @see CameraCharacteristics#LENS_DISTORTION 785 * @see CameraCharacteristics#LENS_FACING 786 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION 787 * @see CameraCharacteristics#LENS_POSE_REFERENCE 788 * @see CameraCharacteristics#LENS_POSE_ROTATION 789 * @see CameraCharacteristics#LENS_POSE_TRANSLATION 790 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 791 */ 792 public static final int REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT = 8; 793 794 /** 795 * <p>The device supports constrained high speed video recording (frame rate >=120fps) use 796 * case. The camera device will support high speed capture session created by {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }, which 797 * only accepts high speed request lists created by {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList }.</p> 798 * <p>A camera device can still support high speed video streaming by advertising the high 799 * speed FPS ranges in {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges}. For this case, all 800 * normal capture request per frame control and synchronization requirements will apply 801 * to the high speed fps ranges, the same as all other fps ranges. This capability 802 * describes the capability of a specialized operating mode with many limitations (see 803 * below), which is only targeted at high speed video recording.</p> 804 * <p>The supported high speed video sizes and fps ranges are specified in {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges }. 805 * To get desired output frame rates, the application is only allowed to select video 806 * size and FPS range combinations provided by {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes }. The 807 * fps range can be controlled via {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}.</p> 808 * <p>In this capability, the camera device will override aeMode, awbMode, and afMode to 809 * ON, AUTO, and CONTINUOUS_VIDEO, respectively. All post-processing block mode 810 * controls will be overridden to be FAST. Therefore, no manual control of capture 811 * and post-processing parameters is possible. All other controls operate the 812 * same as when {@link CaptureRequest#CONTROL_MODE android.control.mode} == AUTO. This means that all other 813 * android.control.* fields continue to work, such as</p> 814 * <ul> 815 * <li>{@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}</li> 816 * <li>{@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}</li> 817 * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li> 818 * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li> 819 * <li>{@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</li> 820 * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li> 821 * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li> 822 * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li> 823 * <li>{@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}</li> 824 * <li>{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}</li> 825 * <li>{@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio}</li> 826 * </ul> 827 * <p>Outside of android.control.*, the following controls will work:</p> 828 * <ul> 829 * <li>{@link CaptureRequest#FLASH_MODE android.flash.mode} (TORCH mode only, automatic flash for still capture will not 830 * work since aeMode is ON)</li> 831 * <li>{@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} (if it is supported)</li> 832 * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li> 833 * <li>{@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} (if it is supported)</li> 834 * </ul> 835 * <p>For high speed recording use case, the actual maximum supported frame rate may 836 * be lower than what camera can output, depending on the destination Surfaces for 837 * the image data. For example, if the destination surface is from video encoder, 838 * the application need check if the video encoder is capable of supporting the 839 * high frame rate for a given video size, or it will end up with lower recording 840 * frame rate. If the destination surface is from preview window, the actual preview frame 841 * rate will be bounded by the screen refresh rate.</p> 842 * <p>The camera device will only support up to 2 high speed simultaneous output surfaces 843 * (preview and recording surfaces) in this mode. Above controls will be effective only 844 * if all of below conditions are true:</p> 845 * <ul> 846 * <li>The application creates a camera capture session with no more than 2 surfaces via 847 * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }. The 848 * targeted surfaces must be preview surface (either from {@link android.view.SurfaceView } or {@link android.graphics.SurfaceTexture }) or recording 849 * surface(either from {@link android.media.MediaRecorder#getSurface } or {@link android.media.MediaCodec#createInputSurface }).</li> 850 * <li>The stream sizes are selected from the sizes reported by 851 * {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes }.</li> 852 * <li>The FPS ranges are selected from {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges }.</li> 853 * </ul> 854 * <p>When above conditions are NOT satisfied, 855 * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession } 856 * will fail.</p> 857 * <p>Switching to a FPS range that has different maximum FPS may trigger some camera device 858 * reconfigurations, which may introduce extra latency. It is recommended that 859 * the application avoids unnecessary maximum target FPS changes as much as possible 860 * during high speed streaming.</p> 861 * 862 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES 863 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION 864 * @see CaptureRequest#CONTROL_AE_LOCK 865 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 866 * @see CaptureRequest#CONTROL_AE_REGIONS 867 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE 868 * @see CaptureRequest#CONTROL_AF_REGIONS 869 * @see CaptureRequest#CONTROL_AF_TRIGGER 870 * @see CaptureRequest#CONTROL_AWB_LOCK 871 * @see CaptureRequest#CONTROL_AWB_REGIONS 872 * @see CaptureRequest#CONTROL_EFFECT_MODE 873 * @see CaptureRequest#CONTROL_MODE 874 * @see CaptureRequest#CONTROL_ZOOM_RATIO 875 * @see CaptureRequest#FLASH_MODE 876 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 877 * @see CaptureRequest#SCALER_CROP_REGION 878 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 879 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 880 */ 881 public static final int REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO = 9; 882 883 /** 884 * <p>The camera device supports the MOTION_TRACKING value for 885 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent}, which limits maximum exposure time to 20 ms.</p> 886 * <p>This limits the motion blur of capture images, resulting in better image tracking 887 * results for use cases such as image stabilization or augmented reality.</p> 888 * 889 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 890 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 891 */ 892 public static final int REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING = 10; 893 894 /** 895 * <p>The camera device is a logical camera backed by two or more physical cameras.</p> 896 * <p>In API level 28, the physical cameras must also be exposed to the application via 897 * {@link android.hardware.camera2.CameraManager#getCameraIdList }.</p> 898 * <p>Starting from API level 29:</p> 899 * <ul> 900 * <li>Some or all physical cameras may not be independently exposed to the application, 901 * in which case the physical camera IDs will not be available in 902 * {@link android.hardware.camera2.CameraManager#getCameraIdList }. But the 903 * application can still query the physical cameras' characteristics by calling 904 * {@link android.hardware.camera2.CameraManager#getCameraCharacteristics }.</li> 905 * <li>If a physical camera is hidden from camera ID list, the mandatory stream 906 * combinations for that physical camera must be supported through the logical camera 907 * using physical streams. One exception is that in API level 30, a physical camera 908 * may become unavailable via 909 * {@link CameraManager.AvailabilityCallback#onPhysicalCameraUnavailable } 910 * callback.</li> 911 * </ul> 912 * <p>Combinations of logical and physical streams, or physical streams from different 913 * physical cameras are not guaranteed. However, if the camera device supports 914 * {@link CameraDevice#isSessionConfigurationSupported }, 915 * application must be able to query whether a stream combination involving physical 916 * streams is supported by calling 917 * {@link CameraDevice#isSessionConfigurationSupported }.</p> 918 * <p>Camera application shouldn't assume that there are at most 1 rear camera and 1 front 919 * camera in the system. For an application that switches between front and back cameras, 920 * the recommendation is to switch between the first rear camera and the first front 921 * camera in the list of supported camera devices.</p> 922 * <p>This capability requires the camera device to support the following:</p> 923 * <ul> 924 * <li>The IDs of underlying physical cameras are returned via 925 * {@link android.hardware.camera2.CameraCharacteristics#getPhysicalCameraIds }.</li> 926 * <li>This camera device must list static metadata 927 * {@link CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE android.logicalMultiCamera.sensorSyncType} in 928 * {@link android.hardware.camera2.CameraCharacteristics }.</li> 929 * <li>The underlying physical cameras' static metadata must list the following entries, 930 * so that the application can correlate pixels from the physical streams:<ul> 931 * <li>{@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference}</li> 932 * <li>{@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}</li> 933 * <li>{@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}</li> 934 * <li>{@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}</li> 935 * <li>{@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}</li> 936 * </ul> 937 * </li> 938 * <li>The SENSOR_INFO_TIMESTAMP_SOURCE of the logical device and physical devices must be 939 * the same.</li> 940 * <li>The logical camera must be LIMITED or higher device.</li> 941 * </ul> 942 * <p>A logical camera device's dynamic metadata may contain 943 * {@link CaptureResult#LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID android.logicalMultiCamera.activePhysicalId} to notify the application of the current 944 * active physical camera Id. An active physical camera is the physical camera from which 945 * the logical camera's main image data outputs (YUV or RAW) and metadata come from. 946 * In addition, this serves as an indication which physical camera is used to output to 947 * a RAW stream, or in case only physical cameras support RAW, which physical RAW stream 948 * the application should request.</p> 949 * <p>Logical camera's static metadata tags below describe the default active physical 950 * camera. An active physical camera is default if it's used when application directly 951 * uses requests built from a template. All templates will default to the same active 952 * physical camera.</p> 953 * <ul> 954 * <li>{@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</li> 955 * <li>{@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}</li> 956 * <li>{@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li> 957 * <li>{@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li> 958 * <li>{@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize}</li> 959 * <li>{@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}</li> 960 * <li>{@link CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED android.sensor.info.lensShadingApplied}</li> 961 * <li>{@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}</li> 962 * <li>{@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}</li> 963 * <li>{@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}</li> 964 * <li>{@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}</li> 965 * <li>{@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1}</li> 966 * <li>{@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2}</li> 967 * <li>{@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1}</li> 968 * <li>{@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2}</li> 969 * <li>{@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern}</li> 970 * <li>{@link CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY android.sensor.maxAnalogSensitivity}</li> 971 * <li>{@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions}</li> 972 * <li>{@link CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES android.sensor.availableTestPatternModes}</li> 973 * <li>{@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}</li> 974 * <li>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}</li> 975 * <li>{@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration}</li> 976 * <li>{@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}</li> 977 * <li>{@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}</li> 978 * <li>{@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}</li> 979 * <li>{@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference}</li> 980 * <li>{@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}</li> 981 * </ul> 982 * <p>The field of view of non-RAW physical streams must not be smaller than that of the 983 * non-RAW logical streams, or the maximum field-of-view of the physical camera, 984 * whichever is smaller. The application should check the physical capture result 985 * metadata for how the physical streams are cropped or zoomed. More specifically, given 986 * the physical camera result metadata, the effective horizontal field-of-view of the 987 * physical camera is:</p> 988 * <pre><code>fov = 2 * atan2(cropW * sensorW / (2 * zoomRatio * activeArrayW), focalLength) 989 * </code></pre> 990 * <p>where the equation parameters are the physical camera's crop region width, physical 991 * sensor width, zoom ratio, active array width, and focal length respectively. Typically 992 * the physical stream of active physical camera has the same field-of-view as the 993 * logical streams. However, the same may not be true for physical streams from 994 * non-active physical cameras. For example, if the logical camera has a wide-ultrawide 995 * configuration where the wide lens is the default, when the crop region is set to the 996 * logical camera's active array size, (and the zoom ratio set to 1.0 starting from 997 * Android 11), a physical stream for the ultrawide camera may prefer outputting images 998 * with larger field-of-view than that of the wide camera for better stereo matching 999 * margin or more robust motion tracking. At the same time, the physical non-RAW streams' 1000 * field of view must not be smaller than the requested crop region and zoom ratio, as 1001 * long as it's within the physical lens' capability. For example, for a logical camera 1002 * with wide-tele lens configuration where the wide lens is the default, if the logical 1003 * camera's crop region is set to maximum size, and zoom ratio set to 1.0, the physical 1004 * stream for the tele lens will be configured to its maximum size crop region (no zoom).</p> 1005 * <p><em>Deprecated:</em> Prior to Android 11, the field of view of all non-RAW physical streams 1006 * cannot be larger than that of non-RAW logical streams. If the logical camera has a 1007 * wide-ultrawide lens configuration where the wide lens is the default, when the logical 1008 * camera's crop region is set to maximum size, the FOV of the physical streams for the 1009 * ultrawide lens will be the same as the logical stream, by making the crop region 1010 * smaller than its active array size to compensate for the smaller focal length.</p> 1011 * <p>For a logical camera, typically the underlying physical cameras have different RAW 1012 * capabilities (such as resolution or CFA pattern). There are two ways for the 1013 * application to capture RAW images from the logical camera:</p> 1014 * <ul> 1015 * <li>If the logical camera has RAW capability, the application can create and use RAW 1016 * streams in the same way as before. In case a RAW stream is configured, to maintain 1017 * backward compatibility, the camera device makes sure the default active physical 1018 * camera remains active and does not switch to other physical cameras. (One exception 1019 * is that, if the logical camera consists of identical image sensors and advertises 1020 * multiple focalLength due to different lenses, the camera device may generate RAW 1021 * images from different physical cameras based on the focalLength being set by the 1022 * application.) This backward-compatible approach usually results in loss of optical 1023 * zoom, to telephoto lens or to ultrawide lens.</li> 1024 * <li>Alternatively, if supported by the device, 1025 * {@link android.hardware.camera2.MultiResolutionImageReader } 1026 * can be used to capture RAW images from one of the underlying physical cameras ( 1027 * depending on current zoom level). Because different physical cameras may have 1028 * different RAW characteristics, the application needs to use the characteristics 1029 * and result metadata of the active physical camera for the relevant RAW metadata.</li> 1030 * </ul> 1031 * <p>The capture request and result metadata tags required for backward compatible camera 1032 * functionalities will be solely based on the logical camera capability. On the other 1033 * hand, the use of manual capture controls (sensor or post-processing) with a 1034 * logical camera may result in unexpected behavior when the HAL decides to switch 1035 * between physical cameras with different characteristics under the hood. For example, 1036 * when the application manually sets exposure time and sensitivity while zooming in, 1037 * the brightness of the camera images may suddenly change because HAL switches from one 1038 * physical camera to the other.</p> 1039 * 1040 * @see CameraCharacteristics#LENS_DISTORTION 1041 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION 1042 * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE 1043 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 1044 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION 1045 * @see CameraCharacteristics#LENS_POSE_REFERENCE 1046 * @see CameraCharacteristics#LENS_POSE_ROTATION 1047 * @see CameraCharacteristics#LENS_POSE_TRANSLATION 1048 * @see CaptureResult#LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID 1049 * @see CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE 1050 * @see CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES 1051 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN 1052 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 1053 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 1054 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 1055 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 1056 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX1 1057 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX2 1058 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT 1059 * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE 1060 * @see CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED 1061 * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION 1062 * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE 1063 * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE 1064 * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL 1065 * @see CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY 1066 * @see CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS 1067 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1068 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 1069 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1070 */ 1071 public static final int REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA = 11; 1072 1073 /** 1074 * <p>The camera device is a monochrome camera that doesn't contain a color filter array, 1075 * and for YUV_420_888 stream, the pixel values on U and V planes are all 128.</p> 1076 * <p>A MONOCHROME camera must support the guaranteed stream combinations required for 1077 * its device level and capabilities. Additionally, if the monochrome camera device 1078 * supports Y8 format, all mandatory stream combination requirements related to {@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888} apply 1079 * to {@link android.graphics.ImageFormat#Y8 Y8} as well. There are no 1080 * mandatory stream combination requirements with regard to 1081 * {@link android.graphics.ImageFormat#Y8 Y8} for Bayer camera devices.</p> 1082 * <p>Starting from Android Q, the SENSOR_INFO_COLOR_FILTER_ARRANGEMENT of a MONOCHROME 1083 * camera will be either MONO or NIR.</p> 1084 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1085 */ 1086 public static final int REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME = 12; 1087 1088 /** 1089 * <p>The camera device is capable of writing image data into a region of memory 1090 * inaccessible to Android userspace or the Android kernel, and only accessible to 1091 * trusted execution environments (TEE).</p> 1092 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1093 */ 1094 public static final int REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA = 13; 1095 1096 /** 1097 * <p>The camera device is only accessible by Android's system components and privileged 1098 * applications. Processes need to have the android.permission.SYSTEM_CAMERA in 1099 * addition to android.permission.CAMERA in order to connect to this camera device.</p> 1100 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1101 */ 1102 public static final int REQUEST_AVAILABLE_CAPABILITIES_SYSTEM_CAMERA = 14; 1103 1104 /** 1105 * <p>The camera device supports the OFFLINE_PROCESSING use case.</p> 1106 * <p>With OFFLINE_PROCESSING capability, the application can switch an ongoing 1107 * capture session to offline mode by calling the 1108 * CameraCaptureSession#switchToOffline method and specify streams to be kept in offline 1109 * mode. The camera will then stop currently active repeating requests, prepare for 1110 * some requests to go into offline mode, and return an offline session object. After 1111 * the switchToOffline call returns, the original capture session is in closed state as 1112 * if the CameraCaptureSession#close method has been called. 1113 * In the offline mode, all inflight requests will continue to be processed in the 1114 * background, and the application can immediately close the camera or create a new 1115 * capture session without losing those requests' output images and capture results.</p> 1116 * <p>While the camera device is processing offline requests, it 1117 * might not be able to support all stream configurations it can support 1118 * without offline requests. When that happens, the createCaptureSession 1119 * method call will fail. The following stream configurations are guaranteed to work 1120 * without hitting the resource busy exception:</p> 1121 * <ul> 1122 * <li>One ongoing offline session: target one output surface of YUV or 1123 * JPEG format, any resolution.</li> 1124 * <li>The active camera capture session:<ol> 1125 * <li>One preview surface (SurfaceView or SurfaceTexture) up to 1920 width</li> 1126 * <li>One YUV ImageReader surface up to 1920 width</li> 1127 * <li>One Jpeg ImageReader, any resolution: the camera device is 1128 * allowed to slow down JPEG output speed by 50% if there is any ongoing offline 1129 * session.</li> 1130 * <li>If the device supports PRIVATE_REPROCESSING, one pair of ImageWriter/ImageReader 1131 * surfaces of private format, with the same resolution that is larger or equal to 1132 * the JPEG ImageReader resolution above.</li> 1133 * </ol> 1134 * </li> 1135 * <li>Alternatively, the active camera session above can be replaced by an legacy 1136 * {@link android.hardware.Camera Camera} with the following parameter settings:<ol> 1137 * <li>Preview size up to 1920 width</li> 1138 * <li>Preview callback size up to 1920 width</li> 1139 * <li>Video size up to 1920 width</li> 1140 * <li>Picture size, any resolution: the camera device is 1141 * allowed to slow down JPEG output speed by 50% if there is any ongoing offline 1142 * session.</li> 1143 * </ol> 1144 * </li> 1145 * </ul> 1146 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1147 */ 1148 public static final int REQUEST_AVAILABLE_CAPABILITIES_OFFLINE_PROCESSING = 15; 1149 1150 /** 1151 * <p>This camera device is capable of producing ultra high resolution images in 1152 * addition to the image sizes described in the 1153 * {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}. 1154 * It can operate in 'default' mode and 'max resolution' mode. It generally does this 1155 * by binning pixels in 'default' mode and not binning them in 'max resolution' mode. 1156 * <code>{@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}</code> describes the streams supported in 'default' 1157 * mode. 1158 * The stream configurations supported in 'max resolution' mode are described by 1159 * <code>{@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION android.scaler.streamConfigurationMapMaximumResolution}</code>. 1160 * The maximum resolution mode pixel array size of a camera device 1161 * (<code>{@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}</code>) with this capability, 1162 * will be at least 24 megapixels.</p> 1163 * 1164 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP 1165 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION 1166 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE 1167 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1168 */ 1169 public static final int REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR = 16; 1170 1171 /** 1172 * <p>The device supports reprocessing from the <code>RAW_SENSOR</code> format with a bayer pattern 1173 * given by {@link CameraCharacteristics#SENSOR_INFO_BINNING_FACTOR android.sensor.info.binningFactor} (m x n group of pixels with the same 1174 * color filter) to a remosaiced regular bayer pattern.</p> 1175 * <p>This capability will only be present for devices with 1176 * {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR } 1177 * capability. When 1178 * {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR } 1179 * devices do not advertise this capability, 1180 * {@link android.graphics.ImageFormat#RAW_SENSOR } images will already have a 1181 * regular bayer pattern.</p> 1182 * <p>If a <code>RAW_SENSOR</code> stream is requested along with another non-RAW stream in a 1183 * {@link android.hardware.camera2.CaptureRequest } (if multiple streams are supported 1184 * when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 1185 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }), 1186 * the <code>RAW_SENSOR</code> stream will have a regular bayer pattern.</p> 1187 * <p>This capability requires the camera device to support the following :</p> 1188 * <ul> 1189 * <li>The {@link android.hardware.camera2.params.StreamConfigurationMap } mentioned below 1190 * refers to the one, described by 1191 * <code>{@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION android.scaler.streamConfigurationMapMaximumResolution}</code>.</li> 1192 * <li>One input stream is supported, that is, <code>{@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} == 1</code>.</li> 1193 * <li>{@link android.graphics.ImageFormat#RAW_SENSOR } is supported as an output/input 1194 * format, that is, {@link android.graphics.ImageFormat#RAW_SENSOR } is included in the 1195 * lists of formats returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats } and {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats }.</li> 1196 * <li>{@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput } 1197 * returns non-empty int[] for each supported input format returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }.</li> 1198 * <li>Each size returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputSizes getInputSizes(ImageFormat.RAW_SENSOR)} is also included in {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes getOutputSizes(ImageFormat.RAW_SENSOR)}</li> 1199 * <li>Using {@link android.graphics.ImageFormat#RAW_SENSOR } does not cause a frame rate 1200 * drop relative to the sensor's maximum capture rate (at that resolution).</li> 1201 * <li>No CaptureRequest controls will be applicable when a request has an input target 1202 * with {@link android.graphics.ImageFormat#RAW_SENSOR } format.</li> 1203 * </ul> 1204 * 1205 * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS 1206 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION 1207 * @see CameraCharacteristics#SENSOR_INFO_BINNING_FACTOR 1208 * @see CaptureRequest#SENSOR_PIXEL_MODE 1209 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1210 */ 1211 public static final int REQUEST_AVAILABLE_CAPABILITIES_REMOSAIC_REPROCESSING = 17; 1212 1213 /** 1214 * <p>The device supports one or more 10-bit camera outputs according to the dynamic range 1215 * profiles specified in 1216 * {@link android.hardware.camera2.params.DynamicRangeProfiles#getSupportedProfiles }. 1217 * They can be configured as part of the capture session initialization via 1218 * {@link android.hardware.camera2.params.OutputConfiguration#setDynamicRangeProfile }. 1219 * Cameras that enable this capability must also support the following:</p> 1220 * <ul> 1221 * <li>Profile {@link android.hardware.camera2.params.DynamicRangeProfiles#HLG10 }</li> 1222 * <li>All mandatory stream combinations for this specific capability as per 1223 * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice#10-bit-output-additional-guaranteed-configurations">documentation</a></li> 1224 * <li>In case the device is not able to capture some combination of supported 1225 * standard 8-bit and/or 10-bit dynamic range profiles within the same capture request, 1226 * then those constraints must be listed in 1227 * {@link android.hardware.camera2.params.DynamicRangeProfiles#getProfileCaptureRequestConstraints }</li> 1228 * <li>Recommended dynamic range profile listed in 1229 * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_RECOMMENDED_TEN_BIT_DYNAMIC_RANGE_PROFILE }.</li> 1230 * </ul> 1231 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1232 */ 1233 public static final int REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT = 18; 1234 1235 /** 1236 * <p>The camera device supports selecting a per-stream use case via 1237 * {@link android.hardware.camera2.params.OutputConfiguration#setStreamUseCase } 1238 * so that the device can optimize camera pipeline parameters such as tuning, sensor 1239 * mode, or ISP settings for a specific user scenario. 1240 * Some sample usages of this capability are:</p> 1241 * <ul> 1242 * <li>Distinguish high quality YUV captures from a regular YUV stream where 1243 * the image quality may not be as good as the JPEG stream, or</li> 1244 * <li>Use one stream to serve multiple purposes: viewfinder, video recording and 1245 * still capture. This is common with applications that wish to apply edits equally 1246 * to preview, saved images, and saved videos.</li> 1247 * </ul> 1248 * <p>This capability requires the camera device to support the following 1249 * stream use cases:</p> 1250 * <ul> 1251 * <li>DEFAULT for backward compatibility where the application doesn't set 1252 * a stream use case</li> 1253 * <li>PREVIEW for live viewfinder and in-app image analysis</li> 1254 * <li>STILL_CAPTURE for still photo capture</li> 1255 * <li>VIDEO_RECORD for recording video clips</li> 1256 * <li>PREVIEW_VIDEO_STILL for one single stream used for viewfinder, video 1257 * recording, and still capture.</li> 1258 * <li>VIDEO_CALL for long running video calls</li> 1259 * </ul> 1260 * <p>{@link android.hardware.camera2.CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES } 1261 * lists all of the supported stream use cases.</p> 1262 * <p>Refer to the 1263 * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice#stream-use-case-capability-additional-guaranteed-configurations">guideline</a> 1264 * for the mandatory stream combinations involving stream use cases, which can also be 1265 * queried via {@link android.hardware.camera2.params.MandatoryStreamCombination }.</p> 1266 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1267 */ 1268 public static final int REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE = 19; 1269 1270 /** 1271 * <p>The device supports querying the possible combinations of color spaces, image 1272 * formats, and dynamic range profiles supported by the camera and requesting a 1273 * particular color space for a session via 1274 * {@link android.hardware.camera2.params.SessionConfiguration#setColorSpace }.</p> 1275 * <p>Cameras that enable this capability may or may not also implement dynamic range 1276 * profiles. If they don't, 1277 * {@link android.hardware.camera2.params.ColorSpaceProfiles#getSupportedDynamicRangeProfiles } 1278 * will return only 1279 * {@link android.hardware.camera2.params.DynamicRangeProfiles#STANDARD } and 1280 * {@link android.hardware.camera2.params.ColorSpaceProfiles#getSupportedColorSpacesForDynamicRange } 1281 * will assume support of the 1282 * {@link android.hardware.camera2.params.DynamicRangeProfiles#STANDARD } 1283 * profile in all combinations of color spaces and image formats.</p> 1284 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1285 */ 1286 public static final int REQUEST_AVAILABLE_CAPABILITIES_COLOR_SPACE_PROFILES = 20; 1287 1288 // 1289 // Enumeration values for CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP 1290 // 1291 1292 /** 1293 * <p>8-bit SDR profile which is the default for all non 10-bit output capable devices.</p> 1294 * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP 1295 * @hide 1296 */ 1297 public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD = 0x1; 1298 1299 /** 1300 * <p>10-bit pixel samples encoded using the Hybrid log-gamma transfer function.</p> 1301 * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP 1302 * @hide 1303 */ 1304 public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HLG10 = 0x2; 1305 1306 /** 1307 * <p>10-bit pixel samples encoded using the SMPTE ST 2084 transfer function. 1308 * This profile utilizes internal static metadata to increase the quality 1309 * of the capture.</p> 1310 * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP 1311 * @hide 1312 */ 1313 public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10 = 0x4; 1314 1315 /** 1316 * <p>10-bit pixel samples encoded using the SMPTE ST 2084 transfer function. 1317 * In contrast to HDR10, this profile uses internal per-frame metadata 1318 * to further enhance the quality of the capture.</p> 1319 * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP 1320 * @hide 1321 */ 1322 public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10_PLUS = 0x8; 1323 1324 /** 1325 * <p>This is a camera mode for Dolby Vision capture optimized for a more scene 1326 * accurate capture. This would typically differ from what a specific device 1327 * might want to tune for a consumer optimized Dolby Vision general capture.</p> 1328 * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP 1329 * @hide 1330 */ 1331 public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF = 0x10; 1332 1333 /** 1334 * <p>This is the power optimized mode for 10-bit Dolby Vision HDR Reference Mode.</p> 1335 * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP 1336 * @hide 1337 */ 1338 public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF_PO = 0x20; 1339 1340 /** 1341 * <p>This is the camera mode for the default Dolby Vision capture mode for the 1342 * specific device. This would be tuned by each specific device for consumer 1343 * pleasing results that resonate with their particular audience. We expect 1344 * that each specific device would have a different look for their default 1345 * Dolby Vision capture.</p> 1346 * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP 1347 * @hide 1348 */ 1349 public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM = 0x40; 1350 1351 /** 1352 * <p>This is the power optimized mode for 10-bit Dolby Vision HDR device specific 1353 * capture Mode.</p> 1354 * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP 1355 * @hide 1356 */ 1357 public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM_PO = 0x80; 1358 1359 /** 1360 * <p>This is the 8-bit version of the Dolby Vision reference capture mode optimized 1361 * for scene accuracy.</p> 1362 * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP 1363 * @hide 1364 */ 1365 public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF = 0x100; 1366 1367 /** 1368 * <p>This is the power optimized mode for 8-bit Dolby Vision HDR Reference Mode.</p> 1369 * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP 1370 * @hide 1371 */ 1372 public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF_PO = 0x200; 1373 1374 /** 1375 * <p>This is the 8-bit version of device specific tuned and optimized Dolby Vision 1376 * capture mode.</p> 1377 * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP 1378 * @hide 1379 */ 1380 public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM = 0x400; 1381 1382 /** 1383 * <p>This is the power optimized mode for 8-bit Dolby Vision HDR device specific 1384 * capture Mode.</p> 1385 * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP 1386 * @hide 1387 */ 1388 public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM_PO = 0x800; 1389 1390 /** 1391 * 1392 * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP 1393 * @hide 1394 */ 1395 public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_MAX = 0x1000; 1396 1397 // 1398 // Enumeration values for CameraCharacteristics#REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP 1399 // 1400 1401 /** 1402 * <p>Default value, when not explicitly specified. The Camera device will choose the color 1403 * space to employ.</p> 1404 * @see CameraCharacteristics#REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP 1405 * @hide 1406 */ 1407 public static final int REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_UNSPECIFIED = -1; 1408 1409 // 1410 // Enumeration values for CameraCharacteristics#SCALER_CROPPING_TYPE 1411 // 1412 1413 /** 1414 * <p>The camera device only supports centered crop regions.</p> 1415 * @see CameraCharacteristics#SCALER_CROPPING_TYPE 1416 */ 1417 public static final int SCALER_CROPPING_TYPE_CENTER_ONLY = 0; 1418 1419 /** 1420 * <p>The camera device supports arbitrarily chosen crop regions.</p> 1421 * @see CameraCharacteristics#SCALER_CROPPING_TYPE 1422 */ 1423 public static final int SCALER_CROPPING_TYPE_FREEFORM = 1; 1424 1425 // 1426 // Enumeration values for CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES 1427 // 1428 1429 /** 1430 * <p>Default stream use case.</p> 1431 * <p>This use case is the same as when the application doesn't set any use case for 1432 * the stream. The camera device uses the properties of the output target, such as 1433 * format, dataSpace, or surface class type, to optimize the image processing pipeline.</p> 1434 * @see CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES 1435 */ 1436 public static final int SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT = 0x0; 1437 1438 /** 1439 * <p>Live stream shown to the user.</p> 1440 * <p>Optimized for performance and usability as a viewfinder, but not necessarily for 1441 * image quality. The output is not meant to be persisted as saved images or video.</p> 1442 * <p>No stall if android.control.* are set to FAST. There may be stall if 1443 * they are set to HIGH_QUALITY. This use case has the same behavior as the 1444 * default SurfaceView and SurfaceTexture targets. Additionally, this use case can be 1445 * used for in-app image analysis.</p> 1446 * @see CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES 1447 */ 1448 public static final int SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW = 0x1; 1449 1450 /** 1451 * <p>Still photo capture.</p> 1452 * <p>Optimized for high-quality high-resolution capture, and not expected to maintain 1453 * preview-like frame rates.</p> 1454 * <p>The stream may have stalls regardless of whether android.control.* is HIGH_QUALITY. 1455 * This use case has the same behavior as the default JPEG and RAW related formats.</p> 1456 * @see CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES 1457 */ 1458 public static final int SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE = 0x2; 1459 1460 /** 1461 * <p>Recording video clips.</p> 1462 * <p>Optimized for high-quality video capture, including high-quality image stabilization 1463 * if supported by the device and enabled by the application. As a result, may produce 1464 * output frames with a substantial lag from real time, to allow for highest-quality 1465 * stabilization or other processing. As such, such an output is not suitable for drawing 1466 * to screen directly, and is expected to be persisted to disk or similar for later 1467 * playback or processing. Only streams that set the VIDEO_RECORD use case are guaranteed 1468 * to have video stabilization applied when the video stabilization control is set 1469 * to ON, as opposed to PREVIEW_STABILIZATION.</p> 1470 * <p>This use case has the same behavior as the default MediaRecorder and MediaCodec 1471 * targets.</p> 1472 * @see CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES 1473 */ 1474 public static final int SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD = 0x3; 1475 1476 /** 1477 * <p>One single stream used for combined purposes of preview, video, and still capture.</p> 1478 * <p>For such multi-purpose streams, the camera device aims to make the best tradeoff 1479 * between the individual use cases. For example, the STILL_CAPTURE use case by itself 1480 * may have stalls for achieving best image quality. But if combined with PREVIEW and 1481 * VIDEO_RECORD, the camera device needs to trade off the additional image processing 1482 * for speed so that preview and video recording aren't slowed down.</p> 1483 * <p>Similarly, VIDEO_RECORD may produce frames with a substantial lag, but 1484 * PREVIEW_VIDEO_STILL must have minimal output delay. This means that to enable video 1485 * stabilization with this use case, the device must support and the app must select the 1486 * PREVIEW_STABILIZATION mode for video stabilization.</p> 1487 * @see CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES 1488 */ 1489 public static final int SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW_VIDEO_STILL = 0x4; 1490 1491 /** 1492 * <p>Long-running video call optimized for both power efficiency and video quality.</p> 1493 * <p>The camera sensor may run in a lower-resolution mode to reduce power consumption 1494 * at the cost of some image and digital zoom quality. Unlike VIDEO_RECORD, VIDEO_CALL 1495 * outputs are expected to work in dark conditions, so are usually accompanied with 1496 * variable frame rate settings to allow sufficient exposure time in low light.</p> 1497 * @see CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES 1498 */ 1499 public static final int SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_CALL = 0x5; 1500 1501 /** 1502 * <p>Cropped RAW stream when the client chooses to crop the field of view.</p> 1503 * <p>Certain types of image sensors can run in binned modes in order to improve signal to 1504 * noise ratio while capturing frames. However, at certain zoom levels and / or when 1505 * other scene conditions are deemed fit, the camera sub-system may choose to un-bin and 1506 * remosaic the sensor's output. This results in a RAW frame which is cropped in field 1507 * of view and yet has the same number of pixels as full field of view RAW, thereby 1508 * improving image detail.</p> 1509 * <p>The resultant field of view of the RAW stream will be greater than or equal to 1510 * croppable non-RAW streams. The effective crop region for this RAW stream will be 1511 * reflected in the CaptureResult key {@link CaptureResult#SCALER_RAW_CROP_REGION android.scaler.rawCropRegion}.</p> 1512 * <p>If this stream use case is set on a non-RAW stream, i.e. not one of :</p> 1513 * <ul> 1514 * <li>{@link android.graphics.ImageFormat#RAW_SENSOR RAW_SENSOR}</li> 1515 * <li>{@link android.graphics.ImageFormat#RAW10 RAW10}</li> 1516 * <li>{@link android.graphics.ImageFormat#RAW12 RAW12}</li> 1517 * </ul> 1518 * <p>session configuration is not guaranteed to succeed.</p> 1519 * <p>This stream use case may not be supported on some devices.</p> 1520 * 1521 * @see CaptureResult#SCALER_RAW_CROP_REGION 1522 * @see CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES 1523 */ 1524 public static final int SCALER_AVAILABLE_STREAM_USE_CASES_CROPPED_RAW = 0x6; 1525 1526 /** 1527 * <p>Vendor defined use cases. These depend on the vendor implementation.</p> 1528 * @see CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES 1529 * @hide 1530 */ 1531 public static final int SCALER_AVAILABLE_STREAM_USE_CASES_VENDOR_START = 0x10000; 1532 1533 // 1534 // Enumeration values for CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT 1535 // 1536 1537 /** 1538 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT 1539 */ 1540 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB = 0; 1541 1542 /** 1543 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT 1544 */ 1545 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG = 1; 1546 1547 /** 1548 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT 1549 */ 1550 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG = 2; 1551 1552 /** 1553 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT 1554 */ 1555 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR = 3; 1556 1557 /** 1558 * <p>Sensor is not Bayer; output has 3 16-bit 1559 * values for each pixel, instead of just 1 16-bit value 1560 * per pixel.</p> 1561 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT 1562 */ 1563 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB = 4; 1564 1565 /** 1566 * <p>Sensor doesn't have any Bayer color filter. 1567 * Such sensor captures visible light in monochrome. The exact weighting and 1568 * wavelengths captured is not specified, but generally only includes the visible 1569 * frequencies. This value implies a MONOCHROME camera.</p> 1570 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT 1571 */ 1572 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_MONO = 5; 1573 1574 /** 1575 * <p>Sensor has a near infrared filter capturing light with wavelength between 1576 * roughly 750nm and 1400nm, and the same filter covers the whole sensor array. This 1577 * value implies a MONOCHROME camera.</p> 1578 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT 1579 */ 1580 public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR = 6; 1581 1582 // 1583 // Enumeration values for CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE 1584 // 1585 1586 /** 1587 * <p>Timestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in nanoseconds and monotonic, but can 1588 * not be compared to timestamps from other subsystems (e.g. accelerometer, gyro etc.), 1589 * or other instances of the same or different camera devices in the same system with 1590 * accuracy. However, the timestamps are roughly in the same timebase as 1591 * {@link android.os.SystemClock#uptimeMillis }. The accuracy is sufficient for tasks 1592 * like A/V synchronization for video recording, at least, and the timestamps can be 1593 * directly used together with timestamps from the audio subsystem for that task.</p> 1594 * <p>Timestamps between streams and results for a single camera instance are comparable, 1595 * and the timestamps for all buffers and the result metadata generated by a single 1596 * capture are identical.</p> 1597 * 1598 * @see CaptureResult#SENSOR_TIMESTAMP 1599 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE 1600 */ 1601 public static final int SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN = 0; 1602 1603 /** 1604 * <p>Timestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in the same timebase as 1605 * {@link android.os.SystemClock#elapsedRealtimeNanos }, 1606 * and they can be compared to other timestamps using that base.</p> 1607 * <p>When buffers from a REALTIME device are passed directly to a video encoder from the 1608 * camera, automatic compensation is done to account for differing timebases of the 1609 * audio and camera subsystems. If the application is receiving buffers and then later 1610 * sending them to a video encoder or other application where they are compared with 1611 * audio subsystem timestamps or similar, this compensation is not present. In those 1612 * cases, applications need to adjust the timestamps themselves. Since {@link android.os.SystemClock#elapsedRealtimeNanos } and {@link android.os.SystemClock#uptimeMillis } only diverge while the device is asleep, an 1613 * offset between the two sources can be measured once per active session and applied 1614 * to timestamps for sufficient accuracy for A/V sync.</p> 1615 * 1616 * @see CaptureResult#SENSOR_TIMESTAMP 1617 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE 1618 */ 1619 public static final int SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME = 1; 1620 1621 // 1622 // Enumeration values for CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1623 // 1624 1625 /** 1626 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1627 */ 1628 public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT = 1; 1629 1630 /** 1631 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1632 */ 1633 public static final int SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT = 2; 1634 1635 /** 1636 * <p>Incandescent light</p> 1637 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1638 */ 1639 public static final int SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN = 3; 1640 1641 /** 1642 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1643 */ 1644 public static final int SENSOR_REFERENCE_ILLUMINANT1_FLASH = 4; 1645 1646 /** 1647 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1648 */ 1649 public static final int SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER = 9; 1650 1651 /** 1652 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1653 */ 1654 public static final int SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER = 10; 1655 1656 /** 1657 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1658 */ 1659 public static final int SENSOR_REFERENCE_ILLUMINANT1_SHADE = 11; 1660 1661 /** 1662 * <p>D 5700 - 7100K</p> 1663 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1664 */ 1665 public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT = 12; 1666 1667 /** 1668 * <p>N 4600 - 5400K</p> 1669 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1670 */ 1671 public static final int SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT = 13; 1672 1673 /** 1674 * <p>W 3900 - 4500K</p> 1675 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1676 */ 1677 public static final int SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT = 14; 1678 1679 /** 1680 * <p>WW 3200 - 3700K</p> 1681 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1682 */ 1683 public static final int SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT = 15; 1684 1685 /** 1686 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1687 */ 1688 public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A = 17; 1689 1690 /** 1691 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1692 */ 1693 public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B = 18; 1694 1695 /** 1696 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1697 */ 1698 public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C = 19; 1699 1700 /** 1701 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1702 */ 1703 public static final int SENSOR_REFERENCE_ILLUMINANT1_D55 = 20; 1704 1705 /** 1706 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1707 */ 1708 public static final int SENSOR_REFERENCE_ILLUMINANT1_D65 = 21; 1709 1710 /** 1711 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1712 */ 1713 public static final int SENSOR_REFERENCE_ILLUMINANT1_D75 = 22; 1714 1715 /** 1716 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1717 */ 1718 public static final int SENSOR_REFERENCE_ILLUMINANT1_D50 = 23; 1719 1720 /** 1721 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1722 */ 1723 public static final int SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN = 24; 1724 1725 // 1726 // Enumeration values for CameraCharacteristics#SENSOR_READOUT_TIMESTAMP 1727 // 1728 1729 /** 1730 * <p>This camera device doesn't support readout timestamp and onReadoutStarted 1731 * callback.</p> 1732 * @see CameraCharacteristics#SENSOR_READOUT_TIMESTAMP 1733 */ 1734 public static final int SENSOR_READOUT_TIMESTAMP_NOT_SUPPORTED = 0; 1735 1736 /** 1737 * <p>This camera device supports the onReadoutStarted callback as well as outputting 1738 * readout timestamps. The readout timestamp is generated by the camera hardware and it 1739 * has the same accuracy and timing characteristics of the start-of-exposure time.</p> 1740 * @see CameraCharacteristics#SENSOR_READOUT_TIMESTAMP 1741 */ 1742 public static final int SENSOR_READOUT_TIMESTAMP_HARDWARE = 1; 1743 1744 // 1745 // Enumeration values for CameraCharacteristics#LED_AVAILABLE_LEDS 1746 // 1747 1748 /** 1749 * <p>android.led.transmit control is used.</p> 1750 * @see CameraCharacteristics#LED_AVAILABLE_LEDS 1751 * @hide 1752 */ 1753 public static final int LED_AVAILABLE_LEDS_TRANSMIT = 0; 1754 1755 // 1756 // Enumeration values for CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1757 // 1758 1759 /** 1760 * <p>This camera device does not have enough capabilities to qualify as a <code>FULL</code> device or 1761 * better.</p> 1762 * <p>Only the stream configurations listed in the <code>LEGACY</code> and <code>LIMITED</code> 1763 * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice#limited-level-additional-guaranteed-configurations">tables</a> 1764 * in the documentation are guaranteed to be supported.</p> 1765 * <p>All <code>LIMITED</code> devices support the <code>BACKWARDS_COMPATIBLE</code> capability, indicating basic 1766 * support for color image capture. The only exception is that the device may 1767 * alternatively support only the <code>DEPTH_OUTPUT</code> capability, if it can only output depth 1768 * measurements and not color images.</p> 1769 * <p><code>LIMITED</code> devices and above require the use of {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} 1770 * to lock exposure metering (and calculate flash power, for cameras with flash) before 1771 * capturing a high-quality still image.</p> 1772 * <p>A <code>LIMITED</code> device that only lists the <code>BACKWARDS_COMPATIBLE</code> capability is only 1773 * required to support full-automatic operation and post-processing (<code>OFF</code> is not 1774 * supported for {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}, {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}, or 1775 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode})</p> 1776 * <p>Additional capabilities may optionally be supported by a <code>LIMITED</code>-level device, and 1777 * can be checked for in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p> 1778 * 1779 * @see CaptureRequest#CONTROL_AE_MODE 1780 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 1781 * @see CaptureRequest#CONTROL_AF_MODE 1782 * @see CaptureRequest#CONTROL_AWB_MODE 1783 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1784 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1785 */ 1786 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0; 1787 1788 /** 1789 * <p>This camera device is capable of supporting advanced imaging applications.</p> 1790 * <p>The stream configurations listed in the <code>FULL</code>, <code>LEGACY</code> and <code>LIMITED</code> 1791 * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice#full-level-additional-guaranteed-configurations">tables</a> 1792 * in the documentation are guaranteed to be supported.</p> 1793 * <p>A <code>FULL</code> device will support below capabilities:</p> 1794 * <ul> 1795 * <li><code>BURST_CAPTURE</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains 1796 * <code>BURST_CAPTURE</code>)</li> 1797 * <li>Per frame control ({@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} <code>==</code> PER_FRAME_CONTROL)</li> 1798 * <li>Manual sensor control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains <code>MANUAL_SENSOR</code>)</li> 1799 * <li>Manual post-processing control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains 1800 * <code>MANUAL_POST_PROCESSING</code>)</li> 1801 * <li>The required exposure time range defined in {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li> 1802 * <li>The required maxFrameDuration defined in {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li> 1803 * </ul> 1804 * <p>Note: 1805 * Pre-API level 23, FULL devices also supported arbitrary cropping region 1806 * ({@link CameraCharacteristics#SCALER_CROPPING_TYPE android.scaler.croppingType} <code>== FREEFORM</code>); this requirement was relaxed in API level 1807 * 23, and <code>FULL</code> devices may only support <code>CENTERED</code> cropping.</p> 1808 * 1809 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1810 * @see CameraCharacteristics#SCALER_CROPPING_TYPE 1811 * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE 1812 * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION 1813 * @see CameraCharacteristics#SYNC_MAX_LATENCY 1814 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1815 */ 1816 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1; 1817 1818 /** 1819 * <p>This camera device is running in backward compatibility mode.</p> 1820 * <p>Only the stream configurations listed in the <code>LEGACY</code> 1821 * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice#legacy-level-guaranteed-configurations">table</a> 1822 * in the documentation are supported.</p> 1823 * <p>A <code>LEGACY</code> device does not support per-frame control, manual sensor control, manual 1824 * post-processing, arbitrary cropping regions, and has relaxed performance constraints. 1825 * No additional capabilities beyond <code>BACKWARD_COMPATIBLE</code> will ever be listed by a 1826 * <code>LEGACY</code> device in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p> 1827 * <p>In addition, the {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is not functional on <code>LEGACY</code> 1828 * devices. Instead, every request that includes a JPEG-format output target is treated 1829 * as triggering a still capture, internally executing a precapture trigger. This may 1830 * fire the flash for flash power metering during precapture, and then fire the flash 1831 * for the final capture, if a flash is available on the device and the AE mode is set to 1832 * enable the flash.</p> 1833 * <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> 1834 * 1835 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 1836 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1837 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1838 */ 1839 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY = 2; 1840 1841 /** 1842 * <p>This camera device is capable of YUV reprocessing and RAW data capture, in addition to 1843 * FULL-level capabilities.</p> 1844 * <p>The stream configurations listed in the <code>LEVEL_3</code>, <code>RAW</code>, <code>FULL</code>, <code>LEGACY</code> and 1845 * <code>LIMITED</code> 1846 * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice#level-3-additional-guaranteed-configurations">tables</a> 1847 * in the documentation are guaranteed to be supported.</p> 1848 * <p>The following additional capabilities are guaranteed to be supported:</p> 1849 * <ul> 1850 * <li><code>YUV_REPROCESSING</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains 1851 * <code>YUV_REPROCESSING</code>)</li> 1852 * <li><code>RAW</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains 1853 * <code>RAW</code>)</li> 1854 * </ul> 1855 * 1856 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1857 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1858 */ 1859 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_3 = 3; 1860 1861 /** 1862 * <p>This camera device is backed by an external camera connected to this Android device.</p> 1863 * <p>The device has capability identical to a LIMITED level device, with the following 1864 * exceptions:</p> 1865 * <ul> 1866 * <li>The device may not report lens/sensor related information such as<ul> 1867 * <li>{@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}</li> 1868 * <li>{@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}</li> 1869 * <li>{@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize}</li> 1870 * <li>{@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}</li> 1871 * <li>{@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern}</li> 1872 * <li>{@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}</li> 1873 * <li>{@link CaptureResult#SENSOR_ROLLING_SHUTTER_SKEW android.sensor.rollingShutterSkew}</li> 1874 * </ul> 1875 * </li> 1876 * <li>The device will report 0 for {@link CameraCharacteristics#SENSOR_ORIENTATION android.sensor.orientation}</li> 1877 * <li>The device has less guarantee on stable framerate, as the framerate partly depends 1878 * on the external camera being used.</li> 1879 * </ul> 1880 * 1881 * @see CaptureRequest#LENS_FOCAL_LENGTH 1882 * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE 1883 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN 1884 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT 1885 * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE 1886 * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL 1887 * @see CameraCharacteristics#SENSOR_ORIENTATION 1888 * @see CaptureResult#SENSOR_ROLLING_SHUTTER_SKEW 1889 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1890 */ 1891 public static final int INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL = 4; 1892 1893 // 1894 // Enumeration values for CameraCharacteristics#SYNC_MAX_LATENCY 1895 // 1896 1897 /** 1898 * <p>Every frame has the requests immediately applied.</p> 1899 * <p>Changing controls over multiple requests one after another will 1900 * produce results that have those controls applied atomically 1901 * each frame.</p> 1902 * <p>All FULL capability devices will have this as their maxLatency.</p> 1903 * @see CameraCharacteristics#SYNC_MAX_LATENCY 1904 */ 1905 public static final int SYNC_MAX_LATENCY_PER_FRAME_CONTROL = 0; 1906 1907 /** 1908 * <p>Each new frame has some subset (potentially the entire set) 1909 * of the past requests applied to the camera settings.</p> 1910 * <p>By submitting a series of identical requests, the camera device 1911 * will eventually have the camera settings applied, but it is 1912 * unknown when that exact point will be.</p> 1913 * <p>All LEGACY capability devices will have this as their maxLatency.</p> 1914 * @see CameraCharacteristics#SYNC_MAX_LATENCY 1915 */ 1916 public static final int SYNC_MAX_LATENCY_UNKNOWN = -1; 1917 1918 // 1919 // Enumeration values for CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE 1920 // 1921 1922 /** 1923 * <p>A software mechanism is used to synchronize between the physical cameras. As a result, 1924 * the timestamp of an image from a physical stream is only an approximation of the 1925 * image sensor start-of-exposure time.</p> 1926 * @see CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE 1927 */ 1928 public static final int LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE = 0; 1929 1930 /** 1931 * <p>The camera device supports frame timestamp synchronization at the hardware level, 1932 * and the timestamp of a physical stream image accurately reflects its 1933 * start-of-exposure time.</p> 1934 * @see CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE 1935 */ 1936 public static final int LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED = 1; 1937 1938 // 1939 // Enumeration values for CameraCharacteristics#AUTOMOTIVE_LENS_FACING 1940 // 1941 1942 /** 1943 * <p>The camera device faces the outside of the vehicle body frame but not exactly 1944 * one of the exterior sides defined by this enum. Applications should determine 1945 * the exact facing direction from {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} and 1946 * {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}.</p> 1947 * 1948 * @see CameraCharacteristics#LENS_POSE_ROTATION 1949 * @see CameraCharacteristics#LENS_POSE_TRANSLATION 1950 * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING 1951 */ 1952 public static final int AUTOMOTIVE_LENS_FACING_EXTERIOR_OTHER = 0; 1953 1954 /** 1955 * <p>The camera device faces the front of the vehicle body frame.</p> 1956 * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING 1957 */ 1958 public static final int AUTOMOTIVE_LENS_FACING_EXTERIOR_FRONT = 1; 1959 1960 /** 1961 * <p>The camera device faces the rear of the vehicle body frame.</p> 1962 * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING 1963 */ 1964 public static final int AUTOMOTIVE_LENS_FACING_EXTERIOR_REAR = 2; 1965 1966 /** 1967 * <p>The camera device faces the left side of the vehicle body frame.</p> 1968 * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING 1969 */ 1970 public static final int AUTOMOTIVE_LENS_FACING_EXTERIOR_LEFT = 3; 1971 1972 /** 1973 * <p>The camera device faces the right side of the vehicle body frame.</p> 1974 * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING 1975 */ 1976 public static final int AUTOMOTIVE_LENS_FACING_EXTERIOR_RIGHT = 4; 1977 1978 /** 1979 * <p>The camera device faces the inside of the vehicle body frame but not exactly 1980 * one of seats described by this enum. Applications should determine the exact 1981 * facing direction from {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} and {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}.</p> 1982 * 1983 * @see CameraCharacteristics#LENS_POSE_ROTATION 1984 * @see CameraCharacteristics#LENS_POSE_TRANSLATION 1985 * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING 1986 */ 1987 public static final int AUTOMOTIVE_LENS_FACING_INTERIOR_OTHER = 5; 1988 1989 /** 1990 * <p>The camera device faces the left side seat of the first row.</p> 1991 * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING 1992 */ 1993 public static final int AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_LEFT = 6; 1994 1995 /** 1996 * <p>The camera device faces the center seat of the first row.</p> 1997 * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING 1998 */ 1999 public static final int AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_CENTER = 7; 2000 2001 /** 2002 * <p>The camera device faces the right seat of the first row.</p> 2003 * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING 2004 */ 2005 public static final int AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_RIGHT = 8; 2006 2007 /** 2008 * <p>The camera device faces the left side seat of the second row.</p> 2009 * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING 2010 */ 2011 public static final int AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_LEFT = 9; 2012 2013 /** 2014 * <p>The camera device faces the center seat of the second row.</p> 2015 * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING 2016 */ 2017 public static final int AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_CENTER = 10; 2018 2019 /** 2020 * <p>The camera device faces the right side seat of the second row.</p> 2021 * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING 2022 */ 2023 public static final int AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_RIGHT = 11; 2024 2025 /** 2026 * <p>The camera device faces the left side seat of the third row.</p> 2027 * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING 2028 */ 2029 public static final int AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_LEFT = 12; 2030 2031 /** 2032 * <p>The camera device faces the center seat of the third row.</p> 2033 * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING 2034 */ 2035 public static final int AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_CENTER = 13; 2036 2037 /** 2038 * <p>The camera device faces the right seat of the third row.</p> 2039 * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING 2040 */ 2041 public static final int AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_RIGHT = 14; 2042 2043 // 2044 // Enumeration values for CameraCharacteristics#AUTOMOTIVE_LOCATION 2045 // 2046 2047 /** 2048 * <p>The camera device exists inside of the vehicle cabin.</p> 2049 * @see CameraCharacteristics#AUTOMOTIVE_LOCATION 2050 */ 2051 public static final int AUTOMOTIVE_LOCATION_INTERIOR = 0; 2052 2053 /** 2054 * <p>The camera exists outside of the vehicle body frame but not exactly on one of the 2055 * exterior locations this enum defines. The applications should determine the exact 2056 * location from {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}.</p> 2057 * 2058 * @see CameraCharacteristics#LENS_POSE_TRANSLATION 2059 * @see CameraCharacteristics#AUTOMOTIVE_LOCATION 2060 */ 2061 public static final int AUTOMOTIVE_LOCATION_EXTERIOR_OTHER = 1; 2062 2063 /** 2064 * <p>The camera device exists outside of the vehicle body frame and on its front side.</p> 2065 * @see CameraCharacteristics#AUTOMOTIVE_LOCATION 2066 */ 2067 public static final int AUTOMOTIVE_LOCATION_EXTERIOR_FRONT = 2; 2068 2069 /** 2070 * <p>The camera device exists outside of the vehicle body frame and on its rear side.</p> 2071 * @see CameraCharacteristics#AUTOMOTIVE_LOCATION 2072 */ 2073 public static final int AUTOMOTIVE_LOCATION_EXTERIOR_REAR = 3; 2074 2075 /** 2076 * <p>The camera device exists outside and on left side of the vehicle body frame.</p> 2077 * @see CameraCharacteristics#AUTOMOTIVE_LOCATION 2078 */ 2079 public static final int AUTOMOTIVE_LOCATION_EXTERIOR_LEFT = 4; 2080 2081 /** 2082 * <p>The camera device exists outside and on right side of the vehicle body frame.</p> 2083 * @see CameraCharacteristics#AUTOMOTIVE_LOCATION 2084 */ 2085 public static final int AUTOMOTIVE_LOCATION_EXTERIOR_RIGHT = 5; 2086 2087 /** 2088 * <p>The camera device exists on an extra vehicle, such as the trailer, but not exactly 2089 * on one of front, rear, left, or right side. Applications should determine the exact 2090 * location from {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}.</p> 2091 * 2092 * @see CameraCharacteristics#LENS_POSE_TRANSLATION 2093 * @see CameraCharacteristics#AUTOMOTIVE_LOCATION 2094 */ 2095 public static final int AUTOMOTIVE_LOCATION_EXTRA_OTHER = 6; 2096 2097 /** 2098 * <p>The camera device exists outside of the extra vehicle's body frame and on its front 2099 * side.</p> 2100 * @see CameraCharacteristics#AUTOMOTIVE_LOCATION 2101 */ 2102 public static final int AUTOMOTIVE_LOCATION_EXTRA_FRONT = 7; 2103 2104 /** 2105 * <p>The camera device exists outside of the extra vehicle's body frame and on its rear 2106 * side.</p> 2107 * @see CameraCharacteristics#AUTOMOTIVE_LOCATION 2108 */ 2109 public static final int AUTOMOTIVE_LOCATION_EXTRA_REAR = 8; 2110 2111 /** 2112 * <p>The camera device exists outside and on left side of the extra vehicle body.</p> 2113 * @see CameraCharacteristics#AUTOMOTIVE_LOCATION 2114 */ 2115 public static final int AUTOMOTIVE_LOCATION_EXTRA_LEFT = 9; 2116 2117 /** 2118 * <p>The camera device exists outside and on right side of the extra vehicle body.</p> 2119 * @see CameraCharacteristics#AUTOMOTIVE_LOCATION 2120 */ 2121 public static final int AUTOMOTIVE_LOCATION_EXTRA_RIGHT = 10; 2122 2123 // 2124 // Enumeration values for CaptureRequest#COLOR_CORRECTION_MODE 2125 // 2126 2127 /** 2128 * <p>Use the {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} matrix 2129 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} to do color conversion.</p> 2130 * <p>All advanced white balance adjustments (not specified 2131 * by our white balance pipeline) must be disabled.</p> 2132 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then 2133 * TRANSFORM_MATRIX is ignored. The camera device will override 2134 * this value to either FAST or HIGH_QUALITY.</p> 2135 * 2136 * @see CaptureRequest#COLOR_CORRECTION_GAINS 2137 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 2138 * @see CaptureRequest#CONTROL_AWB_MODE 2139 * @see CaptureRequest#COLOR_CORRECTION_MODE 2140 */ 2141 public static final int COLOR_CORRECTION_MODE_TRANSFORM_MATRIX = 0; 2142 2143 /** 2144 * <p>Color correction processing must not slow down 2145 * capture rate relative to sensor raw output.</p> 2146 * <p>Advanced white balance adjustments above and beyond 2147 * the specified white balance pipeline may be applied.</p> 2148 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then 2149 * the camera device uses the last frame's AWB values 2150 * (or defaults if AWB has never been run).</p> 2151 * 2152 * @see CaptureRequest#CONTROL_AWB_MODE 2153 * @see CaptureRequest#COLOR_CORRECTION_MODE 2154 */ 2155 public static final int COLOR_CORRECTION_MODE_FAST = 1; 2156 2157 /** 2158 * <p>Color correction processing operates at improved 2159 * quality but the capture rate might be reduced (relative to sensor 2160 * raw output rate)</p> 2161 * <p>Advanced white balance adjustments above and beyond 2162 * the specified white balance pipeline may be applied.</p> 2163 * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then 2164 * the camera device uses the last frame's AWB values 2165 * (or defaults if AWB has never been run).</p> 2166 * 2167 * @see CaptureRequest#CONTROL_AWB_MODE 2168 * @see CaptureRequest#COLOR_CORRECTION_MODE 2169 */ 2170 public static final int COLOR_CORRECTION_MODE_HIGH_QUALITY = 2; 2171 2172 // 2173 // Enumeration values for CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE 2174 // 2175 2176 /** 2177 * <p>No aberration correction is applied.</p> 2178 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE 2179 */ 2180 public static final int COLOR_CORRECTION_ABERRATION_MODE_OFF = 0; 2181 2182 /** 2183 * <p>Aberration correction will not slow down capture rate 2184 * relative to sensor raw output.</p> 2185 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE 2186 */ 2187 public static final int COLOR_CORRECTION_ABERRATION_MODE_FAST = 1; 2188 2189 /** 2190 * <p>Aberration correction operates at improved quality but the capture rate might be 2191 * reduced (relative to sensor raw output rate)</p> 2192 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE 2193 */ 2194 public static final int COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY = 2; 2195 2196 // 2197 // Enumeration values for CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 2198 // 2199 2200 /** 2201 * <p>The camera device will not adjust exposure duration to 2202 * avoid banding problems.</p> 2203 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 2204 */ 2205 public static final int CONTROL_AE_ANTIBANDING_MODE_OFF = 0; 2206 2207 /** 2208 * <p>The camera device will adjust exposure duration to 2209 * avoid banding problems with 50Hz illumination sources.</p> 2210 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 2211 */ 2212 public static final int CONTROL_AE_ANTIBANDING_MODE_50HZ = 1; 2213 2214 /** 2215 * <p>The camera device will adjust exposure duration to 2216 * avoid banding problems with 60Hz illumination 2217 * sources.</p> 2218 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 2219 */ 2220 public static final int CONTROL_AE_ANTIBANDING_MODE_60HZ = 2; 2221 2222 /** 2223 * <p>The camera device will automatically adapt its 2224 * antibanding routine to the current illumination 2225 * condition. This is the default mode if AUTO is 2226 * available on given camera device.</p> 2227 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 2228 */ 2229 public static final int CONTROL_AE_ANTIBANDING_MODE_AUTO = 3; 2230 2231 // 2232 // Enumeration values for CaptureRequest#CONTROL_AE_MODE 2233 // 2234 2235 /** 2236 * <p>The camera device's autoexposure routine is disabled.</p> 2237 * <p>The application-selected {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, 2238 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} and 2239 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are used by the camera 2240 * device, along with android.flash.* fields, if there's 2241 * a flash unit for this camera device.</p> 2242 * <p>Note that auto-white balance (AWB) and auto-focus (AF) 2243 * behavior is device dependent when AE is in OFF mode. 2244 * To have consistent behavior across different devices, 2245 * it is recommended to either set AWB and AF to OFF mode 2246 * or lock AWB and AF before setting AE to OFF. 2247 * See {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}, 2248 * {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}, and {@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger} 2249 * for more details.</p> 2250 * <p>LEGACY devices do not support the OFF mode and will 2251 * override attempts to use this value to ON.</p> 2252 * 2253 * @see CaptureRequest#CONTROL_AF_MODE 2254 * @see CaptureRequest#CONTROL_AF_TRIGGER 2255 * @see CaptureRequest#CONTROL_AWB_LOCK 2256 * @see CaptureRequest#CONTROL_AWB_MODE 2257 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 2258 * @see CaptureRequest#SENSOR_FRAME_DURATION 2259 * @see CaptureRequest#SENSOR_SENSITIVITY 2260 * @see CaptureRequest#CONTROL_AE_MODE 2261 */ 2262 public static final int CONTROL_AE_MODE_OFF = 0; 2263 2264 /** 2265 * <p>The camera device's autoexposure routine is active, 2266 * with no flash control.</p> 2267 * <p>The application's values for 2268 * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, 2269 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and 2270 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are ignored. The 2271 * application has control over the various 2272 * android.flash.* fields.</p> 2273 * 2274 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 2275 * @see CaptureRequest#SENSOR_FRAME_DURATION 2276 * @see CaptureRequest#SENSOR_SENSITIVITY 2277 * @see CaptureRequest#CONTROL_AE_MODE 2278 */ 2279 public static final int CONTROL_AE_MODE_ON = 1; 2280 2281 /** 2282 * <p>Like ON, except that the camera device also controls 2283 * the camera's flash unit, firing it in low-light 2284 * conditions.</p> 2285 * <p>The flash may be fired during a precapture sequence 2286 * (triggered by {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and 2287 * may be fired for captures for which the 2288 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to 2289 * STILL_CAPTURE</p> 2290 * 2291 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 2292 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 2293 * @see CaptureRequest#CONTROL_AE_MODE 2294 */ 2295 public static final int CONTROL_AE_MODE_ON_AUTO_FLASH = 2; 2296 2297 /** 2298 * <p>Like ON, except that the camera device also controls 2299 * the camera's flash unit, always firing it for still 2300 * captures.</p> 2301 * <p>The flash may be fired during a precapture sequence 2302 * (triggered by {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and 2303 * will always be fired for captures for which the 2304 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to 2305 * STILL_CAPTURE</p> 2306 * 2307 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 2308 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 2309 * @see CaptureRequest#CONTROL_AE_MODE 2310 */ 2311 public static final int CONTROL_AE_MODE_ON_ALWAYS_FLASH = 3; 2312 2313 /** 2314 * <p>Like ON_AUTO_FLASH, but with automatic red eye 2315 * reduction.</p> 2316 * <p>If deemed necessary by the camera device, a red eye 2317 * reduction flash will fire during the precapture 2318 * sequence.</p> 2319 * @see CaptureRequest#CONTROL_AE_MODE 2320 */ 2321 public static final int CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE = 4; 2322 2323 /** 2324 * <p>An external flash has been turned on.</p> 2325 * <p>It informs the camera device that an external flash has been turned on, and that 2326 * metering (and continuous focus if active) should be quickly recalculated to account 2327 * for the external flash. Otherwise, this mode acts like ON.</p> 2328 * <p>When the external flash is turned off, AE mode should be changed to one of the 2329 * other available AE modes.</p> 2330 * <p>If the camera device supports AE external flash mode, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} must 2331 * be FLASH_REQUIRED after the camera device finishes AE scan and it's too dark without 2332 * flash.</p> 2333 * 2334 * @see CaptureResult#CONTROL_AE_STATE 2335 * @see CaptureRequest#CONTROL_AE_MODE 2336 */ 2337 public static final int CONTROL_AE_MODE_ON_EXTERNAL_FLASH = 5; 2338 2339 /** 2340 * <p>Like 'ON' but applies additional brightness boost in low light scenes.</p> 2341 * <p>When the scene lighting conditions are within the range defined by 2342 * {@link CameraCharacteristics#CONTROL_LOW_LIGHT_BOOST_INFO_LUMINANCE_RANGE android.control.lowLightBoostInfoLuminanceRange} this mode will apply additional 2343 * brightness boost.</p> 2344 * <p>This mode will automatically adjust the intensity of low light boost applied 2345 * according to the scene lighting conditions. A darker scene will receive more boost 2346 * while a brighter scene will receive less boost.</p> 2347 * <p>This mode can ignore the set target frame rate to allow more light to be captured 2348 * which can result in choppier motion. The frame rate can extend to lower than the 2349 * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges} but will not go below 10 FPS. This mode 2350 * can also increase the sensor sensitivity gain which can result in increased luma 2351 * and chroma noise. The sensor sensitivity gain can extend to higher values beyond 2352 * {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}. This mode may also apply additional 2353 * processing to recover details in dark and bright areas of the image,and noise 2354 * reduction at high sensitivity gain settings to manage the trade-off between light 2355 * sensitivity and capture noise.</p> 2356 * <p>This mode is restricted to two output surfaces. One output surface type can either 2357 * be SurfaceView or TextureView. Another output surface type can either be MediaCodec 2358 * or MediaRecorder. This mode cannot be used with a target FPS range higher than 30 2359 * FPS.</p> 2360 * <p>If the session configuration is not supported, the AE mode reported in the 2361 * CaptureResult will be 'ON' instead of 'ON_LOW_LIGHT_BOOST_BRIGHTNESS_PRIORITY'.</p> 2362 * <p>When this AE mode is enabled, the CaptureResult field 2363 * {@link CaptureResult#CONTROL_LOW_LIGHT_BOOST_STATE android.control.lowLightBoostState} will indicate when low light boost is 'ACTIVE' 2364 * or 'INACTIVE'. By default {@link CaptureResult#CONTROL_LOW_LIGHT_BOOST_STATE android.control.lowLightBoostState} will be 'INACTIVE'.</p> 2365 * <p>The low light boost is 'ACTIVE' once the scene lighting condition is less than the 2366 * upper bound lux value defined by {@link CameraCharacteristics#CONTROL_LOW_LIGHT_BOOST_INFO_LUMINANCE_RANGE android.control.lowLightBoostInfoLuminanceRange}. 2367 * This mode will be 'INACTIVE' once the scene lighting condition is greater than the 2368 * upper bound lux value defined by {@link CameraCharacteristics#CONTROL_LOW_LIGHT_BOOST_INFO_LUMINANCE_RANGE android.control.lowLightBoostInfoLuminanceRange}.</p> 2369 * 2370 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES 2371 * @see CameraCharacteristics#CONTROL_LOW_LIGHT_BOOST_INFO_LUMINANCE_RANGE 2372 * @see CaptureResult#CONTROL_LOW_LIGHT_BOOST_STATE 2373 * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE 2374 * @see CaptureRequest#CONTROL_AE_MODE 2375 */ 2376 @FlaggedApi(Flags.FLAG_CAMERA_AE_MODE_LOW_LIGHT_BOOST) 2377 public static final int CONTROL_AE_MODE_ON_LOW_LIGHT_BOOST_BRIGHTNESS_PRIORITY = 6; 2378 2379 // 2380 // Enumeration values for CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 2381 // 2382 2383 /** 2384 * <p>The trigger is idle.</p> 2385 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 2386 */ 2387 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_IDLE = 0; 2388 2389 /** 2390 * <p>The precapture metering sequence will be started 2391 * by the camera device.</p> 2392 * <p>The exact effect of the precapture trigger depends on 2393 * the current AE mode and state.</p> 2394 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 2395 */ 2396 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_START = 1; 2397 2398 /** 2399 * <p>The camera device will cancel any currently active or completed 2400 * precapture metering sequence, the auto-exposure routine will return to its 2401 * initial state.</p> 2402 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 2403 */ 2404 public static final int CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL = 2; 2405 2406 // 2407 // Enumeration values for CaptureRequest#CONTROL_AF_MODE 2408 // 2409 2410 /** 2411 * <p>The auto-focus routine does not control the lens; 2412 * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} is controlled by the 2413 * application.</p> 2414 * 2415 * @see CaptureRequest#LENS_FOCUS_DISTANCE 2416 * @see CaptureRequest#CONTROL_AF_MODE 2417 */ 2418 public static final int CONTROL_AF_MODE_OFF = 0; 2419 2420 /** 2421 * <p>Basic automatic focus mode.</p> 2422 * <p>In this mode, the lens does not move unless 2423 * the autofocus trigger action is called. When that trigger 2424 * is activated, AF will transition to ACTIVE_SCAN, then to 2425 * the outcome of the scan (FOCUSED or NOT_FOCUSED).</p> 2426 * <p>Always supported if lens is not fixed focus.</p> 2427 * <p>Use {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} to determine if lens 2428 * is fixed-focus.</p> 2429 * <p>Triggering AF_CANCEL resets the lens position to default, 2430 * and sets the AF state to INACTIVE.</p> 2431 * 2432 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 2433 * @see CaptureRequest#CONTROL_AF_MODE 2434 */ 2435 public static final int CONTROL_AF_MODE_AUTO = 1; 2436 2437 /** 2438 * <p>Close-up focusing mode.</p> 2439 * <p>In this mode, the lens does not move unless the 2440 * autofocus trigger action is called. When that trigger is 2441 * activated, AF will transition to ACTIVE_SCAN, then to 2442 * the outcome of the scan (FOCUSED or NOT_FOCUSED). This 2443 * mode is optimized for focusing on objects very close to 2444 * the camera.</p> 2445 * <p>When that trigger is activated, AF will transition to 2446 * ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or 2447 * NOT_FOCUSED). Triggering cancel AF resets the lens 2448 * position to default, and sets the AF state to 2449 * INACTIVE.</p> 2450 * @see CaptureRequest#CONTROL_AF_MODE 2451 */ 2452 public static final int CONTROL_AF_MODE_MACRO = 2; 2453 2454 /** 2455 * <p>In this mode, the AF algorithm modifies the lens 2456 * position continually to attempt to provide a 2457 * constantly-in-focus image stream.</p> 2458 * <p>The focusing behavior should be suitable for good quality 2459 * video recording; typically this means slower focus 2460 * movement and no overshoots. When the AF trigger is not 2461 * involved, the AF algorithm should start in INACTIVE state, 2462 * and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED 2463 * states as appropriate. When the AF trigger is activated, 2464 * the algorithm should immediately transition into 2465 * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the 2466 * lens position until a cancel AF trigger is received.</p> 2467 * <p>Once cancel is received, the algorithm should transition 2468 * back to INACTIVE and resume passive scan. Note that this 2469 * behavior is not identical to CONTINUOUS_PICTURE, since an 2470 * ongoing PASSIVE_SCAN must immediately be 2471 * canceled.</p> 2472 * @see CaptureRequest#CONTROL_AF_MODE 2473 */ 2474 public static final int CONTROL_AF_MODE_CONTINUOUS_VIDEO = 3; 2475 2476 /** 2477 * <p>In this mode, the AF algorithm modifies the lens 2478 * position continually to attempt to provide a 2479 * constantly-in-focus image stream.</p> 2480 * <p>The focusing behavior should be suitable for still image 2481 * capture; typically this means focusing as fast as 2482 * possible. When the AF trigger is not involved, the AF 2483 * algorithm should start in INACTIVE state, and then 2484 * transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as 2485 * appropriate as it attempts to maintain focus. When the AF 2486 * trigger is activated, the algorithm should finish its 2487 * PASSIVE_SCAN if active, and then transition into 2488 * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the 2489 * lens position until a cancel AF trigger is received.</p> 2490 * <p>When the AF cancel trigger is activated, the algorithm 2491 * should transition back to INACTIVE and then act as if it 2492 * has just been started.</p> 2493 * @see CaptureRequest#CONTROL_AF_MODE 2494 */ 2495 public static final int CONTROL_AF_MODE_CONTINUOUS_PICTURE = 4; 2496 2497 /** 2498 * <p>Extended depth of field (digital focus) mode.</p> 2499 * <p>The camera device will produce images with an extended 2500 * depth of field automatically; no special focusing 2501 * operations need to be done before taking a picture.</p> 2502 * <p>AF triggers are ignored, and the AF state will always be 2503 * INACTIVE.</p> 2504 * @see CaptureRequest#CONTROL_AF_MODE 2505 */ 2506 public static final int CONTROL_AF_MODE_EDOF = 5; 2507 2508 // 2509 // Enumeration values for CaptureRequest#CONTROL_AF_TRIGGER 2510 // 2511 2512 /** 2513 * <p>The trigger is idle.</p> 2514 * @see CaptureRequest#CONTROL_AF_TRIGGER 2515 */ 2516 public static final int CONTROL_AF_TRIGGER_IDLE = 0; 2517 2518 /** 2519 * <p>Autofocus will trigger now.</p> 2520 * @see CaptureRequest#CONTROL_AF_TRIGGER 2521 */ 2522 public static final int CONTROL_AF_TRIGGER_START = 1; 2523 2524 /** 2525 * <p>Autofocus will return to its initial 2526 * state, and cancel any currently active trigger.</p> 2527 * @see CaptureRequest#CONTROL_AF_TRIGGER 2528 */ 2529 public static final int CONTROL_AF_TRIGGER_CANCEL = 2; 2530 2531 // 2532 // Enumeration values for CaptureRequest#CONTROL_AWB_MODE 2533 // 2534 2535 /** 2536 * <p>The camera device's auto-white balance routine is disabled.</p> 2537 * <p>The application-selected color transform matrix 2538 * ({@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}) and gains 2539 * ({@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}) are used by the camera 2540 * device for manual white balance control.</p> 2541 * 2542 * @see CaptureRequest#COLOR_CORRECTION_GAINS 2543 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 2544 * @see CaptureRequest#CONTROL_AWB_MODE 2545 */ 2546 public static final int CONTROL_AWB_MODE_OFF = 0; 2547 2548 /** 2549 * <p>The camera device's auto-white balance routine is active.</p> 2550 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} 2551 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. 2552 * For devices that support the MANUAL_POST_PROCESSING capability, the 2553 * values used by the camera device for the transform and gains 2554 * will be available in the capture result for this request.</p> 2555 * 2556 * @see CaptureRequest#COLOR_CORRECTION_GAINS 2557 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 2558 * @see CaptureRequest#CONTROL_AWB_MODE 2559 */ 2560 public static final int CONTROL_AWB_MODE_AUTO = 1; 2561 2562 /** 2563 * <p>The camera device's auto-white balance routine is disabled; 2564 * the camera device uses incandescent light as the assumed scene 2565 * illumination for white balance.</p> 2566 * <p>While the exact white balance transforms are up to the 2567 * camera device, they will approximately match the CIE 2568 * standard illuminant A.</p> 2569 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} 2570 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. 2571 * For devices that support the MANUAL_POST_PROCESSING capability, the 2572 * values used by the camera device for the transform and gains 2573 * will be available in the capture result for this request.</p> 2574 * 2575 * @see CaptureRequest#COLOR_CORRECTION_GAINS 2576 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 2577 * @see CaptureRequest#CONTROL_AWB_MODE 2578 */ 2579 public static final int CONTROL_AWB_MODE_INCANDESCENT = 2; 2580 2581 /** 2582 * <p>The camera device's auto-white balance routine is disabled; 2583 * the camera device uses fluorescent light as the assumed scene 2584 * illumination for white balance.</p> 2585 * <p>While the exact white balance transforms are up to the 2586 * camera device, they will approximately match the CIE 2587 * standard illuminant F2.</p> 2588 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} 2589 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. 2590 * For devices that support the MANUAL_POST_PROCESSING capability, the 2591 * values used by the camera device for the transform and gains 2592 * will be available in the capture result for this request.</p> 2593 * 2594 * @see CaptureRequest#COLOR_CORRECTION_GAINS 2595 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 2596 * @see CaptureRequest#CONTROL_AWB_MODE 2597 */ 2598 public static final int CONTROL_AWB_MODE_FLUORESCENT = 3; 2599 2600 /** 2601 * <p>The camera device's auto-white balance routine is disabled; 2602 * the camera device uses warm fluorescent light as the assumed scene 2603 * illumination for white balance.</p> 2604 * <p>While the exact white balance transforms are up to the 2605 * camera device, they will approximately match the CIE 2606 * standard illuminant F4.</p> 2607 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} 2608 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. 2609 * For devices that support the MANUAL_POST_PROCESSING capability, the 2610 * values used by the camera device for the transform and gains 2611 * will be available in the capture result for this request.</p> 2612 * 2613 * @see CaptureRequest#COLOR_CORRECTION_GAINS 2614 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 2615 * @see CaptureRequest#CONTROL_AWB_MODE 2616 */ 2617 public static final int CONTROL_AWB_MODE_WARM_FLUORESCENT = 4; 2618 2619 /** 2620 * <p>The camera device's auto-white balance routine is disabled; 2621 * the camera device uses daylight light as the assumed scene 2622 * illumination for white balance.</p> 2623 * <p>While the exact white balance transforms are up to the 2624 * camera device, they will approximately match the CIE 2625 * standard illuminant D65.</p> 2626 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} 2627 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. 2628 * For devices that support the MANUAL_POST_PROCESSING capability, the 2629 * values used by the camera device for the transform and gains 2630 * will be available in the capture result for this request.</p> 2631 * 2632 * @see CaptureRequest#COLOR_CORRECTION_GAINS 2633 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 2634 * @see CaptureRequest#CONTROL_AWB_MODE 2635 */ 2636 public static final int CONTROL_AWB_MODE_DAYLIGHT = 5; 2637 2638 /** 2639 * <p>The camera device's auto-white balance routine is disabled; 2640 * the camera device uses cloudy daylight light as the assumed scene 2641 * illumination for white balance.</p> 2642 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} 2643 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. 2644 * For devices that support the MANUAL_POST_PROCESSING capability, the 2645 * values used by the camera device for the transform and gains 2646 * will be available in the capture result for this request.</p> 2647 * 2648 * @see CaptureRequest#COLOR_CORRECTION_GAINS 2649 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 2650 * @see CaptureRequest#CONTROL_AWB_MODE 2651 */ 2652 public static final int CONTROL_AWB_MODE_CLOUDY_DAYLIGHT = 6; 2653 2654 /** 2655 * <p>The camera device's auto-white balance routine is disabled; 2656 * the camera device uses twilight light as the assumed scene 2657 * illumination for white balance.</p> 2658 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} 2659 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. 2660 * For devices that support the MANUAL_POST_PROCESSING capability, the 2661 * values used by the camera device for the transform and gains 2662 * will be available in the capture result for this request.</p> 2663 * 2664 * @see CaptureRequest#COLOR_CORRECTION_GAINS 2665 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 2666 * @see CaptureRequest#CONTROL_AWB_MODE 2667 */ 2668 public static final int CONTROL_AWB_MODE_TWILIGHT = 7; 2669 2670 /** 2671 * <p>The camera device's auto-white balance routine is disabled; 2672 * the camera device uses shade light as the assumed scene 2673 * illumination for white balance.</p> 2674 * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} 2675 * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored. 2676 * For devices that support the MANUAL_POST_PROCESSING capability, the 2677 * values used by the camera device for the transform and gains 2678 * will be available in the capture result for this request.</p> 2679 * 2680 * @see CaptureRequest#COLOR_CORRECTION_GAINS 2681 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 2682 * @see CaptureRequest#CONTROL_AWB_MODE 2683 */ 2684 public static final int CONTROL_AWB_MODE_SHADE = 8; 2685 2686 // 2687 // Enumeration values for CaptureRequest#CONTROL_CAPTURE_INTENT 2688 // 2689 2690 /** 2691 * <p>The goal of this request doesn't fall into the other 2692 * categories. The camera device will default to preview-like 2693 * behavior.</p> 2694 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 2695 */ 2696 public static final int CONTROL_CAPTURE_INTENT_CUSTOM = 0; 2697 2698 /** 2699 * <p>This request is for a preview-like use case.</p> 2700 * <p>The precapture trigger may be used to start off a metering 2701 * w/flash sequence.</p> 2702 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 2703 */ 2704 public static final int CONTROL_CAPTURE_INTENT_PREVIEW = 1; 2705 2706 /** 2707 * <p>This request is for a still capture-type 2708 * use case.</p> 2709 * <p>If the flash unit is under automatic control, it may fire as needed.</p> 2710 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 2711 */ 2712 public static final int CONTROL_CAPTURE_INTENT_STILL_CAPTURE = 2; 2713 2714 /** 2715 * <p>This request is for a video recording 2716 * use case.</p> 2717 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 2718 */ 2719 public static final int CONTROL_CAPTURE_INTENT_VIDEO_RECORD = 3; 2720 2721 /** 2722 * <p>This request is for a video snapshot (still 2723 * image while recording video) use case.</p> 2724 * <p>The camera device should take the highest-quality image 2725 * possible (given the other settings) without disrupting the 2726 * frame rate of video recording. </p> 2727 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 2728 */ 2729 public static final int CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT = 4; 2730 2731 /** 2732 * <p>This request is for a ZSL usecase; the 2733 * application will stream full-resolution images and 2734 * reprocess one or several later for a final 2735 * capture.</p> 2736 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 2737 */ 2738 public static final int CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG = 5; 2739 2740 /** 2741 * <p>This request is for manual capture use case where 2742 * the applications want to directly control the capture parameters.</p> 2743 * <p>For example, the application may wish to manually control 2744 * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, etc.</p> 2745 * 2746 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 2747 * @see CaptureRequest#SENSOR_SENSITIVITY 2748 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 2749 */ 2750 public static final int CONTROL_CAPTURE_INTENT_MANUAL = 6; 2751 2752 /** 2753 * <p>This request is for a motion tracking use case, where 2754 * the application will use camera and inertial sensor data to 2755 * locate and track objects in the world.</p> 2756 * <p>The camera device auto-exposure routine will limit the exposure time 2757 * of the camera to no more than 20 milliseconds, to minimize motion blur.</p> 2758 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 2759 */ 2760 public static final int CONTROL_CAPTURE_INTENT_MOTION_TRACKING = 7; 2761 2762 // 2763 // Enumeration values for CaptureRequest#CONTROL_EFFECT_MODE 2764 // 2765 2766 /** 2767 * <p>No color effect will be applied.</p> 2768 * @see CaptureRequest#CONTROL_EFFECT_MODE 2769 */ 2770 public static final int CONTROL_EFFECT_MODE_OFF = 0; 2771 2772 /** 2773 * <p>A "monocolor" effect where the image is mapped into 2774 * a single color.</p> 2775 * <p>This will typically be grayscale.</p> 2776 * @see CaptureRequest#CONTROL_EFFECT_MODE 2777 */ 2778 public static final int CONTROL_EFFECT_MODE_MONO = 1; 2779 2780 /** 2781 * <p>A "photo-negative" effect where the image's colors 2782 * are inverted.</p> 2783 * @see CaptureRequest#CONTROL_EFFECT_MODE 2784 */ 2785 public static final int CONTROL_EFFECT_MODE_NEGATIVE = 2; 2786 2787 /** 2788 * <p>A "solarisation" effect (Sabattier effect) where the 2789 * image is wholly or partially reversed in 2790 * tone.</p> 2791 * @see CaptureRequest#CONTROL_EFFECT_MODE 2792 */ 2793 public static final int CONTROL_EFFECT_MODE_SOLARIZE = 3; 2794 2795 /** 2796 * <p>A "sepia" effect where the image is mapped into warm 2797 * gray, red, and brown tones.</p> 2798 * @see CaptureRequest#CONTROL_EFFECT_MODE 2799 */ 2800 public static final int CONTROL_EFFECT_MODE_SEPIA = 4; 2801 2802 /** 2803 * <p>A "posterization" effect where the image uses 2804 * discrete regions of tone rather than a continuous 2805 * gradient of tones.</p> 2806 * @see CaptureRequest#CONTROL_EFFECT_MODE 2807 */ 2808 public static final int CONTROL_EFFECT_MODE_POSTERIZE = 5; 2809 2810 /** 2811 * <p>A "whiteboard" effect where the image is typically displayed 2812 * as regions of white, with black or grey details.</p> 2813 * @see CaptureRequest#CONTROL_EFFECT_MODE 2814 */ 2815 public static final int CONTROL_EFFECT_MODE_WHITEBOARD = 6; 2816 2817 /** 2818 * <p>A "blackboard" effect where the image is typically displayed 2819 * as regions of black, with white or grey details.</p> 2820 * @see CaptureRequest#CONTROL_EFFECT_MODE 2821 */ 2822 public static final int CONTROL_EFFECT_MODE_BLACKBOARD = 7; 2823 2824 /** 2825 * <p>An "aqua" effect where a blue hue is added to the image.</p> 2826 * @see CaptureRequest#CONTROL_EFFECT_MODE 2827 */ 2828 public static final int CONTROL_EFFECT_MODE_AQUA = 8; 2829 2830 // 2831 // Enumeration values for CaptureRequest#CONTROL_MODE 2832 // 2833 2834 /** 2835 * <p>Full application control of pipeline.</p> 2836 * <p>All control by the device's metering and focusing (3A) 2837 * routines is disabled, and no other settings in 2838 * android.control.* have any effect, except that 2839 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} may be used by the camera 2840 * device to select post-processing values for processing 2841 * blocks that do not allow for manual control, or are not 2842 * exposed by the camera API.</p> 2843 * <p>However, the camera device's 3A routines may continue to 2844 * collect statistics and update their internal state so that 2845 * when control is switched to AUTO mode, good control values 2846 * can be immediately applied.</p> 2847 * 2848 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 2849 * @see CaptureRequest#CONTROL_MODE 2850 */ 2851 public static final int CONTROL_MODE_OFF = 0; 2852 2853 /** 2854 * <p>Use settings for each individual 3A routine.</p> 2855 * <p>Manual control of capture parameters is disabled. All 2856 * controls in android.control.* besides sceneMode take 2857 * effect.</p> 2858 * @see CaptureRequest#CONTROL_MODE 2859 */ 2860 public static final int CONTROL_MODE_AUTO = 1; 2861 2862 /** 2863 * <p>Use a specific scene mode.</p> 2864 * <p>Enabling this disables control.aeMode, control.awbMode and 2865 * control.afMode controls; the camera device will ignore 2866 * those settings while USE_SCENE_MODE is active (except for 2867 * FACE_PRIORITY scene mode). Other control entries are still active. 2868 * This setting can only be used if scene mode is supported (i.e. 2869 * {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes} 2870 * contain some modes other than DISABLED).</p> 2871 * <p>For extended scene modes such as BOKEH, please use USE_EXTENDED_SCENE_MODE instead.</p> 2872 * 2873 * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES 2874 * @see CaptureRequest#CONTROL_MODE 2875 */ 2876 public static final int CONTROL_MODE_USE_SCENE_MODE = 2; 2877 2878 /** 2879 * <p>Same as OFF mode, except that this capture will not be 2880 * used by camera device background auto-exposure, auto-white balance and 2881 * auto-focus algorithms (3A) to update their statistics.</p> 2882 * <p>Specifically, the 3A routines are locked to the last 2883 * values set from a request with AUTO, OFF, or 2884 * USE_SCENE_MODE, and any statistics or state updates 2885 * collected from manual captures with OFF_KEEP_STATE will be 2886 * discarded by the camera device.</p> 2887 * @see CaptureRequest#CONTROL_MODE 2888 */ 2889 public static final int CONTROL_MODE_OFF_KEEP_STATE = 3; 2890 2891 /** 2892 * <p>Use a specific extended scene mode.</p> 2893 * <p>When extended scene mode is on, the camera device may override certain control 2894 * parameters, such as targetFpsRange, AE, AWB, and AF modes, to achieve best power and 2895 * quality tradeoffs. Only the mandatory stream combinations of LIMITED hardware level 2896 * are guaranteed.</p> 2897 * <p>This setting can only be used if extended scene mode is supported (i.e. 2898 * android.control.availableExtendedSceneModes 2899 * contains some modes other than DISABLED).</p> 2900 * @see CaptureRequest#CONTROL_MODE 2901 */ 2902 public static final int CONTROL_MODE_USE_EXTENDED_SCENE_MODE = 4; 2903 2904 // 2905 // Enumeration values for CaptureRequest#CONTROL_SCENE_MODE 2906 // 2907 2908 /** 2909 * <p>Indicates that no scene modes are set for a given capture request.</p> 2910 * @see CaptureRequest#CONTROL_SCENE_MODE 2911 */ 2912 public static final int CONTROL_SCENE_MODE_DISABLED = 0; 2913 2914 /** 2915 * <p>If face detection support exists, use face 2916 * detection data for auto-focus, auto-white balance, and 2917 * auto-exposure routines.</p> 2918 * <p>If face detection statistics are disabled 2919 * (i.e. {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} is set to OFF), 2920 * this should still operate correctly (but will not return 2921 * face detection statistics to the framework).</p> 2922 * <p>Unlike the other scene modes, {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}, 2923 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} 2924 * remain active when FACE_PRIORITY is set.</p> 2925 * 2926 * @see CaptureRequest#CONTROL_AE_MODE 2927 * @see CaptureRequest#CONTROL_AF_MODE 2928 * @see CaptureRequest#CONTROL_AWB_MODE 2929 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 2930 * @see CaptureRequest#CONTROL_SCENE_MODE 2931 */ 2932 public static final int CONTROL_SCENE_MODE_FACE_PRIORITY = 1; 2933 2934 /** 2935 * <p>Optimized for photos of quickly moving objects.</p> 2936 * <p>Similar to SPORTS.</p> 2937 * @see CaptureRequest#CONTROL_SCENE_MODE 2938 */ 2939 public static final int CONTROL_SCENE_MODE_ACTION = 2; 2940 2941 /** 2942 * <p>Optimized for still photos of people.</p> 2943 * @see CaptureRequest#CONTROL_SCENE_MODE 2944 */ 2945 public static final int CONTROL_SCENE_MODE_PORTRAIT = 3; 2946 2947 /** 2948 * <p>Optimized for photos of distant macroscopic objects.</p> 2949 * @see CaptureRequest#CONTROL_SCENE_MODE 2950 */ 2951 public static final int CONTROL_SCENE_MODE_LANDSCAPE = 4; 2952 2953 /** 2954 * <p>Optimized for low-light settings.</p> 2955 * @see CaptureRequest#CONTROL_SCENE_MODE 2956 */ 2957 public static final int CONTROL_SCENE_MODE_NIGHT = 5; 2958 2959 /** 2960 * <p>Optimized for still photos of people in low-light 2961 * settings.</p> 2962 * @see CaptureRequest#CONTROL_SCENE_MODE 2963 */ 2964 public static final int CONTROL_SCENE_MODE_NIGHT_PORTRAIT = 6; 2965 2966 /** 2967 * <p>Optimized for dim, indoor settings where flash must 2968 * remain off.</p> 2969 * @see CaptureRequest#CONTROL_SCENE_MODE 2970 */ 2971 public static final int CONTROL_SCENE_MODE_THEATRE = 7; 2972 2973 /** 2974 * <p>Optimized for bright, outdoor beach settings.</p> 2975 * @see CaptureRequest#CONTROL_SCENE_MODE 2976 */ 2977 public static final int CONTROL_SCENE_MODE_BEACH = 8; 2978 2979 /** 2980 * <p>Optimized for bright, outdoor settings containing snow.</p> 2981 * @see CaptureRequest#CONTROL_SCENE_MODE 2982 */ 2983 public static final int CONTROL_SCENE_MODE_SNOW = 9; 2984 2985 /** 2986 * <p>Optimized for scenes of the setting sun.</p> 2987 * @see CaptureRequest#CONTROL_SCENE_MODE 2988 */ 2989 public static final int CONTROL_SCENE_MODE_SUNSET = 10; 2990 2991 /** 2992 * <p>Optimized to avoid blurry photos due to small amounts of 2993 * device motion (for example: due to hand shake).</p> 2994 * @see CaptureRequest#CONTROL_SCENE_MODE 2995 */ 2996 public static final int CONTROL_SCENE_MODE_STEADYPHOTO = 11; 2997 2998 /** 2999 * <p>Optimized for nighttime photos of fireworks.</p> 3000 * @see CaptureRequest#CONTROL_SCENE_MODE 3001 */ 3002 public static final int CONTROL_SCENE_MODE_FIREWORKS = 12; 3003 3004 /** 3005 * <p>Optimized for photos of quickly moving people.</p> 3006 * <p>Similar to ACTION.</p> 3007 * @see CaptureRequest#CONTROL_SCENE_MODE 3008 */ 3009 public static final int CONTROL_SCENE_MODE_SPORTS = 13; 3010 3011 /** 3012 * <p>Optimized for dim, indoor settings with multiple moving 3013 * people.</p> 3014 * @see CaptureRequest#CONTROL_SCENE_MODE 3015 */ 3016 public static final int CONTROL_SCENE_MODE_PARTY = 14; 3017 3018 /** 3019 * <p>Optimized for dim settings where the main light source 3020 * is a candle.</p> 3021 * @see CaptureRequest#CONTROL_SCENE_MODE 3022 */ 3023 public static final int CONTROL_SCENE_MODE_CANDLELIGHT = 15; 3024 3025 /** 3026 * <p>Optimized for accurately capturing a photo of barcode 3027 * for use by camera applications that wish to read the 3028 * barcode value.</p> 3029 * @see CaptureRequest#CONTROL_SCENE_MODE 3030 */ 3031 public static final int CONTROL_SCENE_MODE_BARCODE = 16; 3032 3033 /** 3034 * <p>This is deprecated, please use {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession } 3035 * and {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList } 3036 * for high speed video recording.</p> 3037 * <p>Optimized for high speed video recording (frame rate >=60fps) use case.</p> 3038 * <p>The supported high speed video sizes and fps ranges are specified in 3039 * android.control.availableHighSpeedVideoConfigurations. To get desired 3040 * output frame rates, the application is only allowed to select video size 3041 * and fps range combinations listed in this static metadata. The fps range 3042 * can be control via {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}.</p> 3043 * <p>In this mode, the camera device will override aeMode, awbMode, and afMode to 3044 * ON, ON, and CONTINUOUS_VIDEO, respectively. All post-processing block mode 3045 * controls will be overridden to be FAST. Therefore, no manual control of capture 3046 * and post-processing parameters is possible. All other controls operate the 3047 * same as when {@link CaptureRequest#CONTROL_MODE android.control.mode} == AUTO. This means that all other 3048 * android.control.* fields continue to work, such as</p> 3049 * <ul> 3050 * <li>{@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}</li> 3051 * <li>{@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}</li> 3052 * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li> 3053 * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li> 3054 * <li>{@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</li> 3055 * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li> 3056 * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li> 3057 * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li> 3058 * <li>{@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}</li> 3059 * <li>{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}</li> 3060 * <li>{@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio}</li> 3061 * </ul> 3062 * <p>Outside of android.control.*, the following controls will work:</p> 3063 * <ul> 3064 * <li>{@link CaptureRequest#FLASH_MODE android.flash.mode} (automatic flash for still capture will not work since aeMode is ON)</li> 3065 * <li>{@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} (if it is supported)</li> 3066 * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li> 3067 * <li>{@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}</li> 3068 * </ul> 3069 * <p>For high speed recording use case, the actual maximum supported frame rate may 3070 * be lower than what camera can output, depending on the destination Surfaces for 3071 * the image data. For example, if the destination surface is from video encoder, 3072 * the application need check if the video encoder is capable of supporting the 3073 * high frame rate for a given video size, or it will end up with lower recording 3074 * frame rate. If the destination surface is from preview window, the preview frame 3075 * rate will be bounded by the screen refresh rate.</p> 3076 * <p>The camera device will only support up to 2 output high speed streams 3077 * (processed non-stalling format defined in android.request.maxNumOutputStreams) 3078 * in this mode. This control will be effective only if all of below conditions are true:</p> 3079 * <ul> 3080 * <li>The application created no more than maxNumHighSpeedStreams processed non-stalling 3081 * format output streams, where maxNumHighSpeedStreams is calculated as 3082 * min(2, android.request.maxNumOutputStreams[Processed (but not-stalling)]).</li> 3083 * <li>The stream sizes are selected from the sizes reported by 3084 * android.control.availableHighSpeedVideoConfigurations.</li> 3085 * <li>No processed non-stalling or raw streams are configured.</li> 3086 * </ul> 3087 * <p>When above conditions are NOT satisfied, the controls of this mode and 3088 * {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} will be ignored by the camera device, 3089 * the camera device will fall back to {@link CaptureRequest#CONTROL_MODE android.control.mode} <code>==</code> AUTO, 3090 * and the returned capture result metadata will give the fps range chosen 3091 * by the camera device.</p> 3092 * <p>Switching into or out of this mode may trigger some camera ISP/sensor 3093 * reconfigurations, which may introduce extra latency. It is recommended that 3094 * the application avoids unnecessary scene mode switch as much as possible.</p> 3095 * 3096 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION 3097 * @see CaptureRequest#CONTROL_AE_LOCK 3098 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 3099 * @see CaptureRequest#CONTROL_AE_REGIONS 3100 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE 3101 * @see CaptureRequest#CONTROL_AF_REGIONS 3102 * @see CaptureRequest#CONTROL_AF_TRIGGER 3103 * @see CaptureRequest#CONTROL_AWB_LOCK 3104 * @see CaptureRequest#CONTROL_AWB_REGIONS 3105 * @see CaptureRequest#CONTROL_EFFECT_MODE 3106 * @see CaptureRequest#CONTROL_MODE 3107 * @see CaptureRequest#CONTROL_ZOOM_RATIO 3108 * @see CaptureRequest#FLASH_MODE 3109 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 3110 * @see CaptureRequest#SCALER_CROP_REGION 3111 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 3112 * @see CaptureRequest#CONTROL_SCENE_MODE 3113 * @deprecated Please refer to this API documentation to find the alternatives 3114 */ 3115 @Deprecated 3116 public static final int CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO = 17; 3117 3118 /** 3119 * <p>Turn on a device-specific high dynamic range (HDR) mode.</p> 3120 * <p>In this scene mode, the camera device captures images 3121 * that keep a larger range of scene illumination levels 3122 * visible in the final image. For example, when taking a 3123 * picture of a object in front of a bright window, both 3124 * the object and the scene through the window may be 3125 * visible when using HDR mode, while in normal AUTO mode, 3126 * one or the other may be poorly exposed. As a tradeoff, 3127 * HDR mode generally takes much longer to capture a single 3128 * image, has no user control, and may have other artifacts 3129 * depending on the HDR method used.</p> 3130 * <p>Therefore, HDR captures operate at a much slower rate 3131 * than regular captures.</p> 3132 * <p>In this mode, on LIMITED or FULL devices, when a request 3133 * is made with a {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} of 3134 * STILL_CAPTURE, the camera device will capture an image 3135 * using a high dynamic range capture technique. On LEGACY 3136 * devices, captures that target a JPEG-format output will 3137 * be captured with HDR, and the capture intent is not 3138 * relevant.</p> 3139 * <p>The HDR capture may involve the device capturing a burst 3140 * of images internally and combining them into one, or it 3141 * may involve the device using specialized high dynamic 3142 * range capture hardware. In all cases, a single image is 3143 * produced in response to a capture request submitted 3144 * while in HDR mode.</p> 3145 * <p>Since substantial post-processing is generally needed to 3146 * produce an HDR image, only YUV, PRIVATE, and JPEG 3147 * outputs are supported for LIMITED/FULL device HDR 3148 * captures, and only JPEG outputs are supported for LEGACY 3149 * HDR captures. Using a RAW output for HDR capture is not 3150 * supported.</p> 3151 * <p>Some devices may also support always-on HDR, which 3152 * applies HDR processing at full frame rate. For these 3153 * devices, intents other than STILL_CAPTURE will also 3154 * produce an HDR output with no frame rate impact compared 3155 * to normal operation, though the quality may be lower 3156 * than for STILL_CAPTURE intents.</p> 3157 * <p>If SCENE_MODE_HDR is used with unsupported output types 3158 * or capture intents, the images captured will be as if 3159 * the SCENE_MODE was not enabled at all.</p> 3160 * 3161 * @see CaptureRequest#CONTROL_CAPTURE_INTENT 3162 * @see CaptureRequest#CONTROL_SCENE_MODE 3163 */ 3164 public static final int CONTROL_SCENE_MODE_HDR = 18; 3165 3166 /** 3167 * <p>Same as FACE_PRIORITY scene mode, except that the camera 3168 * device will choose higher sensitivity values ({@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}) 3169 * under low light conditions.</p> 3170 * <p>The camera device may be tuned to expose the images in a reduced 3171 * sensitivity range to produce the best quality images. For example, 3172 * if the {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange} gives range of [100, 1600], 3173 * the camera device auto-exposure routine tuning process may limit the actual 3174 * exposure sensitivity range to [100, 1200] to ensure that the noise level isn't 3175 * excessive in order to preserve the image quality. Under this situation, the image under 3176 * low light may be under-exposed when the sensor max exposure time (bounded by the 3177 * {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} when {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is one of the 3178 * ON_* modes) and effective max sensitivity are reached. This scene mode allows the 3179 * camera device auto-exposure routine to increase the sensitivity up to the max 3180 * sensitivity specified by {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange} when the scene is too 3181 * dark and the max exposure time is reached. The captured images may be noisier 3182 * compared with the images captured in normal FACE_PRIORITY mode; therefore, it is 3183 * recommended that the application only use this scene mode when it is capable of 3184 * reducing the noise level of the captured images.</p> 3185 * <p>Unlike the other scene modes, {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}, 3186 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} 3187 * remain active when FACE_PRIORITY_LOW_LIGHT is set.</p> 3188 * 3189 * @see CaptureRequest#CONTROL_AE_MODE 3190 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE 3191 * @see CaptureRequest#CONTROL_AF_MODE 3192 * @see CaptureRequest#CONTROL_AWB_MODE 3193 * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE 3194 * @see CaptureRequest#SENSOR_SENSITIVITY 3195 * @see CaptureRequest#CONTROL_SCENE_MODE 3196 * @hide 3197 */ 3198 public static final int CONTROL_SCENE_MODE_FACE_PRIORITY_LOW_LIGHT = 19; 3199 3200 /** 3201 * <p>Scene mode values within the range of 3202 * <code>[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]</code> are reserved for device specific 3203 * customized scene modes.</p> 3204 * @see CaptureRequest#CONTROL_SCENE_MODE 3205 * @hide 3206 */ 3207 public static final int CONTROL_SCENE_MODE_DEVICE_CUSTOM_START = 100; 3208 3209 /** 3210 * <p>Scene mode values within the range of 3211 * <code>[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]</code> are reserved for device specific 3212 * customized scene modes.</p> 3213 * @see CaptureRequest#CONTROL_SCENE_MODE 3214 * @hide 3215 */ 3216 public static final int CONTROL_SCENE_MODE_DEVICE_CUSTOM_END = 127; 3217 3218 // 3219 // Enumeration values for CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE 3220 // 3221 3222 /** 3223 * <p>Video stabilization is disabled.</p> 3224 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE 3225 */ 3226 public static final int CONTROL_VIDEO_STABILIZATION_MODE_OFF = 0; 3227 3228 /** 3229 * <p>Video stabilization is enabled.</p> 3230 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE 3231 */ 3232 public static final int CONTROL_VIDEO_STABILIZATION_MODE_ON = 1; 3233 3234 /** 3235 * <p>Preview stabilization, where the preview in addition to all other non-RAW streams are 3236 * stabilized with the same quality of stabilization, is enabled. This mode aims to give 3237 * clients a 'what you see is what you get' effect. In this mode, the FoV reduction will 3238 * be a maximum of 20 % both horizontally and vertically 3239 * (10% from left, right, top, bottom) for the given zoom ratio / crop region. 3240 * The resultant FoV will also be the same across all processed streams 3241 * (that have the same aspect ratio).</p> 3242 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE 3243 */ 3244 public static final int CONTROL_VIDEO_STABILIZATION_MODE_PREVIEW_STABILIZATION = 2; 3245 3246 // 3247 // Enumeration values for CaptureRequest#CONTROL_EXTENDED_SCENE_MODE 3248 // 3249 3250 /** 3251 * <p>Extended scene mode is disabled.</p> 3252 * @see CaptureRequest#CONTROL_EXTENDED_SCENE_MODE 3253 */ 3254 public static final int CONTROL_EXTENDED_SCENE_MODE_DISABLED = 0; 3255 3256 /** 3257 * <p>High quality bokeh mode is enabled for all non-raw streams (including YUV, 3258 * JPEG, and IMPLEMENTATION_DEFINED) when capture intent is STILL_CAPTURE. Due to the 3259 * extra image processing, this mode may introduce additional stall to non-raw streams. 3260 * This mode should be used in high quality still capture use case.</p> 3261 * @see CaptureRequest#CONTROL_EXTENDED_SCENE_MODE 3262 */ 3263 public static final int CONTROL_EXTENDED_SCENE_MODE_BOKEH_STILL_CAPTURE = 1; 3264 3265 /** 3266 * <p>Bokeh effect must not slow down capture rate relative to sensor raw output, 3267 * and the effect is applied to all processed streams no larger than the maximum 3268 * streaming dimension. This mode should be used if performance and power are a 3269 * priority, such as video recording.</p> 3270 * @see CaptureRequest#CONTROL_EXTENDED_SCENE_MODE 3271 */ 3272 public static final int CONTROL_EXTENDED_SCENE_MODE_BOKEH_CONTINUOUS = 2; 3273 3274 /** 3275 * <p>Vendor defined extended scene modes. These depend on vendor implementation.</p> 3276 * @see CaptureRequest#CONTROL_EXTENDED_SCENE_MODE 3277 * @hide 3278 */ 3279 public static final int CONTROL_EXTENDED_SCENE_MODE_VENDOR_START = 0x40; 3280 3281 // 3282 // Enumeration values for CaptureRequest#CONTROL_SETTINGS_OVERRIDE 3283 // 3284 3285 /** 3286 * <p>No keys are applied sooner than the other keys when applying CaptureRequest 3287 * settings to the camera device. This is the default value.</p> 3288 * @see CaptureRequest#CONTROL_SETTINGS_OVERRIDE 3289 */ 3290 public static final int CONTROL_SETTINGS_OVERRIDE_OFF = 0; 3291 3292 /** 3293 * <p>Zoom related keys are applied sooner than the other keys in the CaptureRequest. The 3294 * zoom related keys are:</p> 3295 * <ul> 3296 * <li>{@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio}</li> 3297 * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li> 3298 * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li> 3299 * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li> 3300 * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li> 3301 * </ul> 3302 * <p>Even though {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}, {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}, 3303 * and {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions} are not directly zoom related, applications 3304 * typically scale these regions together with {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to have a 3305 * consistent mapping within the current field of view. In this aspect, they are 3306 * related to {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} and {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio}.</p> 3307 * 3308 * @see CaptureRequest#CONTROL_AE_REGIONS 3309 * @see CaptureRequest#CONTROL_AF_REGIONS 3310 * @see CaptureRequest#CONTROL_AWB_REGIONS 3311 * @see CaptureRequest#CONTROL_ZOOM_RATIO 3312 * @see CaptureRequest#SCALER_CROP_REGION 3313 * @see CaptureRequest#CONTROL_SETTINGS_OVERRIDE 3314 */ 3315 public static final int CONTROL_SETTINGS_OVERRIDE_ZOOM = 1; 3316 3317 /** 3318 * <p>Vendor defined settingsOverride. These depend on vendor implementation.</p> 3319 * @see CaptureRequest#CONTROL_SETTINGS_OVERRIDE 3320 * @hide 3321 */ 3322 public static final int CONTROL_SETTINGS_OVERRIDE_VENDOR_START = 0x4000; 3323 3324 // 3325 // Enumeration values for CaptureRequest#CONTROL_AUTOFRAMING 3326 // 3327 3328 /** 3329 * <p>Disable autoframing.</p> 3330 * @see CaptureRequest#CONTROL_AUTOFRAMING 3331 */ 3332 public static final int CONTROL_AUTOFRAMING_OFF = 0; 3333 3334 /** 3335 * <p>Enable autoframing to keep people in the frame's field of view.</p> 3336 * @see CaptureRequest#CONTROL_AUTOFRAMING 3337 */ 3338 public static final int CONTROL_AUTOFRAMING_ON = 1; 3339 3340 /** 3341 * <p>Automatically select ON or OFF based on the system level preferences.</p> 3342 * @see CaptureRequest#CONTROL_AUTOFRAMING 3343 * @hide 3344 */ 3345 public static final int CONTROL_AUTOFRAMING_AUTO = 2; 3346 3347 // 3348 // Enumeration values for CaptureRequest#EDGE_MODE 3349 // 3350 3351 /** 3352 * <p>No edge enhancement is applied.</p> 3353 * @see CaptureRequest#EDGE_MODE 3354 */ 3355 public static final int EDGE_MODE_OFF = 0; 3356 3357 /** 3358 * <p>Apply edge enhancement at a quality level that does not slow down frame rate 3359 * relative to sensor output. It may be the same as OFF if edge enhancement will 3360 * slow down frame rate relative to sensor.</p> 3361 * @see CaptureRequest#EDGE_MODE 3362 */ 3363 public static final int EDGE_MODE_FAST = 1; 3364 3365 /** 3366 * <p>Apply high-quality edge enhancement, at a cost of possibly reduced output frame rate.</p> 3367 * @see CaptureRequest#EDGE_MODE 3368 */ 3369 public static final int EDGE_MODE_HIGH_QUALITY = 2; 3370 3371 /** 3372 * <p>Edge enhancement is applied at different 3373 * levels for different output streams, based on resolution. Streams at maximum recording 3374 * resolution (see {@link android.hardware.camera2.CameraDevice#createCaptureSession }) 3375 * or below have edge enhancement applied, while higher-resolution streams have no edge 3376 * enhancement applied. The level of edge enhancement for low-resolution streams is tuned 3377 * so that frame rate is not impacted, and the quality is equal to or better than FAST 3378 * (since it is only applied to lower-resolution outputs, quality may improve from FAST).</p> 3379 * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode 3380 * with YUV or PRIVATE reprocessing, where the application continuously captures 3381 * high-resolution intermediate buffers into a circular buffer, from which a final image is 3382 * produced via reprocessing when a user takes a picture. For such a use case, the 3383 * high-resolution buffers must not have edge enhancement applied to maximize efficiency of 3384 * preview and to avoid double-applying enhancement when reprocessed, while low-resolution 3385 * buffers (used for recording or preview, generally) need edge enhancement applied for 3386 * reasonable preview quality.</p> 3387 * <p>This mode is guaranteed to be supported by devices that support either the 3388 * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities 3389 * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} lists either of those capabilities) and it will 3390 * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p> 3391 * 3392 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 3393 * @see CaptureRequest#EDGE_MODE 3394 */ 3395 public static final int EDGE_MODE_ZERO_SHUTTER_LAG = 3; 3396 3397 // 3398 // Enumeration values for CaptureRequest#FLASH_MODE 3399 // 3400 3401 /** 3402 * <p>Do not fire the flash for this capture.</p> 3403 * @see CaptureRequest#FLASH_MODE 3404 */ 3405 public static final int FLASH_MODE_OFF = 0; 3406 3407 /** 3408 * <p>If the flash is available and charged, fire flash 3409 * for this capture.</p> 3410 * @see CaptureRequest#FLASH_MODE 3411 */ 3412 public static final int FLASH_MODE_SINGLE = 1; 3413 3414 /** 3415 * <p>Transition flash to continuously on.</p> 3416 * @see CaptureRequest#FLASH_MODE 3417 */ 3418 public static final int FLASH_MODE_TORCH = 2; 3419 3420 // 3421 // Enumeration values for CaptureRequest#HOT_PIXEL_MODE 3422 // 3423 3424 /** 3425 * <p>No hot pixel correction is applied.</p> 3426 * <p>The frame rate must not be reduced relative to sensor raw output 3427 * for this option.</p> 3428 * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p> 3429 * 3430 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP 3431 * @see CaptureRequest#HOT_PIXEL_MODE 3432 */ 3433 public static final int HOT_PIXEL_MODE_OFF = 0; 3434 3435 /** 3436 * <p>Hot pixel correction is applied, without reducing frame 3437 * rate relative to sensor raw output.</p> 3438 * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p> 3439 * 3440 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP 3441 * @see CaptureRequest#HOT_PIXEL_MODE 3442 */ 3443 public static final int HOT_PIXEL_MODE_FAST = 1; 3444 3445 /** 3446 * <p>High-quality hot pixel correction is applied, at a cost 3447 * of possibly reduced frame rate relative to sensor raw output.</p> 3448 * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p> 3449 * 3450 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP 3451 * @see CaptureRequest#HOT_PIXEL_MODE 3452 */ 3453 public static final int HOT_PIXEL_MODE_HIGH_QUALITY = 2; 3454 3455 // 3456 // Enumeration values for CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 3457 // 3458 3459 /** 3460 * <p>Optical stabilization is unavailable.</p> 3461 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 3462 */ 3463 public static final int LENS_OPTICAL_STABILIZATION_MODE_OFF = 0; 3464 3465 /** 3466 * <p>Optical stabilization is enabled.</p> 3467 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 3468 */ 3469 public static final int LENS_OPTICAL_STABILIZATION_MODE_ON = 1; 3470 3471 // 3472 // Enumeration values for CaptureRequest#NOISE_REDUCTION_MODE 3473 // 3474 3475 /** 3476 * <p>No noise reduction is applied.</p> 3477 * @see CaptureRequest#NOISE_REDUCTION_MODE 3478 */ 3479 public static final int NOISE_REDUCTION_MODE_OFF = 0; 3480 3481 /** 3482 * <p>Noise reduction is applied without reducing frame rate relative to sensor 3483 * output. It may be the same as OFF if noise reduction will reduce frame rate 3484 * relative to sensor.</p> 3485 * @see CaptureRequest#NOISE_REDUCTION_MODE 3486 */ 3487 public static final int NOISE_REDUCTION_MODE_FAST = 1; 3488 3489 /** 3490 * <p>High-quality noise reduction is applied, at the cost of possibly reduced frame 3491 * rate relative to sensor output.</p> 3492 * @see CaptureRequest#NOISE_REDUCTION_MODE 3493 */ 3494 public static final int NOISE_REDUCTION_MODE_HIGH_QUALITY = 2; 3495 3496 /** 3497 * <p>MINIMAL noise reduction is applied without reducing frame rate relative to 3498 * sensor output. </p> 3499 * @see CaptureRequest#NOISE_REDUCTION_MODE 3500 */ 3501 public static final int NOISE_REDUCTION_MODE_MINIMAL = 3; 3502 3503 /** 3504 * <p>Noise reduction is applied at different levels for different output streams, 3505 * based on resolution. Streams at maximum recording resolution (see {@link android.hardware.camera2.CameraDevice#createCaptureSession }) 3506 * or below have noise reduction applied, while higher-resolution streams have MINIMAL (if 3507 * supported) or no noise reduction applied (if MINIMAL is not supported.) The degree of 3508 * noise reduction for low-resolution streams is tuned so that frame rate is not impacted, 3509 * and the quality is equal to or better than FAST (since it is only applied to 3510 * lower-resolution outputs, quality may improve from FAST).</p> 3511 * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode 3512 * with YUV or PRIVATE reprocessing, where the application continuously captures 3513 * high-resolution intermediate buffers into a circular buffer, from which a final image is 3514 * produced via reprocessing when a user takes a picture. For such a use case, the 3515 * high-resolution buffers must not have noise reduction applied to maximize efficiency of 3516 * preview and to avoid over-applying noise filtering when reprocessing, while 3517 * low-resolution buffers (used for recording or preview, generally) need noise reduction 3518 * applied for reasonable preview quality.</p> 3519 * <p>This mode is guaranteed to be supported by devices that support either the 3520 * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities 3521 * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} lists either of those capabilities) and it will 3522 * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p> 3523 * 3524 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 3525 * @see CaptureRequest#NOISE_REDUCTION_MODE 3526 */ 3527 public static final int NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG = 4; 3528 3529 // 3530 // Enumeration values for CaptureRequest#SCALER_ROTATE_AND_CROP 3531 // 3532 3533 /** 3534 * <p>No rotate and crop is applied. Processed outputs are in the sensor orientation.</p> 3535 * @see CaptureRequest#SCALER_ROTATE_AND_CROP 3536 */ 3537 public static final int SCALER_ROTATE_AND_CROP_NONE = 0; 3538 3539 /** 3540 * <p>Processed images are rotated by 90 degrees clockwise, and then cropped 3541 * to the original aspect ratio.</p> 3542 * @see CaptureRequest#SCALER_ROTATE_AND_CROP 3543 */ 3544 public static final int SCALER_ROTATE_AND_CROP_90 = 1; 3545 3546 /** 3547 * <p>Processed images are rotated by 180 degrees. Since the aspect ratio does not 3548 * change, no cropping is performed.</p> 3549 * @see CaptureRequest#SCALER_ROTATE_AND_CROP 3550 */ 3551 public static final int SCALER_ROTATE_AND_CROP_180 = 2; 3552 3553 /** 3554 * <p>Processed images are rotated by 270 degrees clockwise, and then cropped 3555 * to the original aspect ratio.</p> 3556 * @see CaptureRequest#SCALER_ROTATE_AND_CROP 3557 */ 3558 public static final int SCALER_ROTATE_AND_CROP_270 = 3; 3559 3560 /** 3561 * <p>The camera API automatically selects the best concrete value for 3562 * rotate-and-crop based on the application's support for resizability and the current 3563 * multi-window mode.</p> 3564 * <p>If the application does not support resizing but the display mode for its main 3565 * Activity is not in a typical orientation, the camera API will set <code>ROTATE_AND_CROP_90</code> 3566 * or some other supported rotation value, depending on device configuration, 3567 * to ensure preview and captured images are correctly shown to the user. Otherwise, 3568 * <code>ROTATE_AND_CROP_NONE</code> will be selected.</p> 3569 * <p>When a value other than NONE is selected, several metadata fields will also be parsed 3570 * differently to ensure that coordinates are correctly handled for features like drawing 3571 * face detection boxes or passing in tap-to-focus coordinates. The camera API will 3572 * convert positions in the active array coordinate system to/from the cropped-and-rotated 3573 * coordinate system to make the operation transparent for applications.</p> 3574 * <p>No coordinate mapping will be done when the application selects a non-AUTO mode.</p> 3575 * @see CaptureRequest#SCALER_ROTATE_AND_CROP 3576 */ 3577 public static final int SCALER_ROTATE_AND_CROP_AUTO = 4; 3578 3579 // 3580 // Enumeration values for CaptureRequest#SENSOR_TEST_PATTERN_MODE 3581 // 3582 3583 /** 3584 * <p>No test pattern mode is used, and the camera 3585 * device returns captures from the image sensor.</p> 3586 * <p>This is the default if the key is not set.</p> 3587 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 3588 */ 3589 public static final int SENSOR_TEST_PATTERN_MODE_OFF = 0; 3590 3591 /** 3592 * <p>Each pixel in <code>[R, G_even, G_odd, B]</code> is replaced by its 3593 * respective color channel provided in 3594 * {@link CaptureRequest#SENSOR_TEST_PATTERN_DATA android.sensor.testPatternData}.</p> 3595 * <p>For example:</p> 3596 * <pre><code>{@link CaptureRequest#SENSOR_TEST_PATTERN_DATA android.sensor.testPatternData} = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0] 3597 * </code></pre> 3598 * <p>All green pixels are 100% green. All red/blue pixels are black.</p> 3599 * <pre><code>{@link CaptureRequest#SENSOR_TEST_PATTERN_DATA android.sensor.testPatternData} = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0] 3600 * </code></pre> 3601 * <p>All red pixels are 100% red. Only the odd green pixels 3602 * are 100% green. All blue pixels are 100% black.</p> 3603 * 3604 * @see CaptureRequest#SENSOR_TEST_PATTERN_DATA 3605 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 3606 */ 3607 public static final int SENSOR_TEST_PATTERN_MODE_SOLID_COLOR = 1; 3608 3609 /** 3610 * <p>All pixel data is replaced with an 8-bar color pattern.</p> 3611 * <p>The vertical bars (left-to-right) are as follows:</p> 3612 * <ul> 3613 * <li>100% white</li> 3614 * <li>yellow</li> 3615 * <li>cyan</li> 3616 * <li>green</li> 3617 * <li>magenta</li> 3618 * <li>red</li> 3619 * <li>blue</li> 3620 * <li>black</li> 3621 * </ul> 3622 * <p>In general the image would look like the following:</p> 3623 * <pre><code>W Y C G M R B K 3624 * W Y C G M R B K 3625 * W Y C G M R B K 3626 * W Y C G M R B K 3627 * W Y C G M R B K 3628 * . . . . . . . . 3629 * . . . . . . . . 3630 * . . . . . . . . 3631 * 3632 * (B = Blue, K = Black) 3633 * </code></pre> 3634 * <p>Each bar should take up 1/8 of the sensor pixel array width. 3635 * When this is not possible, the bar size should be rounded 3636 * down to the nearest integer and the pattern can repeat 3637 * on the right side.</p> 3638 * <p>Each bar's height must always take up the full sensor 3639 * pixel array height.</p> 3640 * <p>Each pixel in this test pattern must be set to either 3641 * 0% intensity or 100% intensity.</p> 3642 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 3643 */ 3644 public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS = 2; 3645 3646 /** 3647 * <p>The test pattern is similar to COLOR_BARS, except that 3648 * each bar should start at its specified color at the top, 3649 * and fade to gray at the bottom.</p> 3650 * <p>Furthermore each bar is further subdivided into a left and 3651 * right half. The left half should have a smooth gradient, 3652 * and the right half should have a quantized gradient.</p> 3653 * <p>In particular, the right half's should consist of blocks of the 3654 * same color for 1/16th active sensor pixel array width.</p> 3655 * <p>The least significant bits in the quantized gradient should 3656 * be copied from the most significant bits of the smooth gradient.</p> 3657 * <p>The height of each bar should always be a multiple of 128. 3658 * When this is not the case, the pattern should repeat at the bottom 3659 * of the image.</p> 3660 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 3661 */ 3662 public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY = 3; 3663 3664 /** 3665 * <p>All pixel data is replaced by a pseudo-random sequence 3666 * generated from a PN9 512-bit sequence (typically implemented 3667 * in hardware with a linear feedback shift register).</p> 3668 * <p>The generator should be reset at the beginning of each frame, 3669 * and thus each subsequent raw frame with this test pattern should 3670 * be exactly the same as the last.</p> 3671 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 3672 */ 3673 public static final int SENSOR_TEST_PATTERN_MODE_PN9 = 4; 3674 3675 /** 3676 * <p>All pixel data is replaced by 0% intensity (black) values.</p> 3677 * <p>This test pattern is identical to SOLID_COLOR with a value of <code>[0, 0, 0, 0]</code> for 3678 * {@link CaptureRequest#SENSOR_TEST_PATTERN_DATA android.sensor.testPatternData}. It is recommended that devices implement full 3679 * SOLID_COLOR support instead, but BLACK can be used to provide minimal support for a 3680 * test pattern suitable for privacy use cases.</p> 3681 * 3682 * @see CaptureRequest#SENSOR_TEST_PATTERN_DATA 3683 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 3684 * @hide 3685 */ 3686 @TestApi 3687 public static final int SENSOR_TEST_PATTERN_MODE_BLACK = 5; 3688 3689 /** 3690 * <p>The first custom test pattern. All custom patterns that are 3691 * available only on this camera device are at least this numeric 3692 * value.</p> 3693 * <p>All of the custom test patterns will be static 3694 * (that is the raw image must not vary from frame to frame).</p> 3695 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 3696 */ 3697 public static final int SENSOR_TEST_PATTERN_MODE_CUSTOM1 = 256; 3698 3699 // 3700 // Enumeration values for CaptureRequest#SENSOR_PIXEL_MODE 3701 // 3702 3703 /** 3704 * <p>This is the default sensor pixel mode.</p> 3705 * @see CaptureRequest#SENSOR_PIXEL_MODE 3706 */ 3707 public static final int SENSOR_PIXEL_MODE_DEFAULT = 0; 3708 3709 /** 3710 * <p>In this mode, sensors typically do not bin pixels, as a result can offer larger 3711 * image sizes.</p> 3712 * @see CaptureRequest#SENSOR_PIXEL_MODE 3713 */ 3714 public static final int SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION = 1; 3715 3716 // 3717 // Enumeration values for CaptureRequest#SHADING_MODE 3718 // 3719 3720 /** 3721 * <p>No lens shading correction is applied.</p> 3722 * @see CaptureRequest#SHADING_MODE 3723 */ 3724 public static final int SHADING_MODE_OFF = 0; 3725 3726 /** 3727 * <p>Apply lens shading corrections, without slowing 3728 * frame rate relative to sensor raw output</p> 3729 * @see CaptureRequest#SHADING_MODE 3730 */ 3731 public static final int SHADING_MODE_FAST = 1; 3732 3733 /** 3734 * <p>Apply high-quality lens shading correction, at the 3735 * cost of possibly reduced frame rate.</p> 3736 * @see CaptureRequest#SHADING_MODE 3737 */ 3738 public static final int SHADING_MODE_HIGH_QUALITY = 2; 3739 3740 // 3741 // Enumeration values for CaptureRequest#STATISTICS_FACE_DETECT_MODE 3742 // 3743 3744 /** 3745 * <p>Do not include face detection statistics in capture 3746 * results.</p> 3747 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 3748 */ 3749 public static final int STATISTICS_FACE_DETECT_MODE_OFF = 0; 3750 3751 /** 3752 * <p>Return face rectangle and confidence values only.</p> 3753 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 3754 */ 3755 public static final int STATISTICS_FACE_DETECT_MODE_SIMPLE = 1; 3756 3757 /** 3758 * <p>Return all face 3759 * metadata.</p> 3760 * <p>In this mode, face rectangles, scores, landmarks, and face IDs are all valid.</p> 3761 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 3762 */ 3763 public static final int STATISTICS_FACE_DETECT_MODE_FULL = 2; 3764 3765 // 3766 // Enumeration values for CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 3767 // 3768 3769 /** 3770 * <p>Do not include a lens shading map in the capture result.</p> 3771 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 3772 */ 3773 public static final int STATISTICS_LENS_SHADING_MAP_MODE_OFF = 0; 3774 3775 /** 3776 * <p>Include a lens shading map in the capture result.</p> 3777 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 3778 */ 3779 public static final int STATISTICS_LENS_SHADING_MAP_MODE_ON = 1; 3780 3781 // 3782 // Enumeration values for CaptureRequest#STATISTICS_OIS_DATA_MODE 3783 // 3784 3785 /** 3786 * <p>Do not include OIS data in the capture result.</p> 3787 * @see CaptureRequest#STATISTICS_OIS_DATA_MODE 3788 */ 3789 public static final int STATISTICS_OIS_DATA_MODE_OFF = 0; 3790 3791 /** 3792 * <p>Include OIS data in the capture result.</p> 3793 * <p>{@link CaptureResult#STATISTICS_OIS_SAMPLES android.statistics.oisSamples} provides OIS sample data in the 3794 * output result metadata.</p> 3795 * 3796 * @see CaptureResult#STATISTICS_OIS_SAMPLES 3797 * @see CaptureRequest#STATISTICS_OIS_DATA_MODE 3798 */ 3799 public static final int STATISTICS_OIS_DATA_MODE_ON = 1; 3800 3801 // 3802 // Enumeration values for CaptureRequest#TONEMAP_MODE 3803 // 3804 3805 /** 3806 * <p>Use the tone mapping curve specified in 3807 * the {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}* entries.</p> 3808 * <p>All color enhancement and tonemapping must be disabled, except 3809 * for applying the tonemapping curve specified by 3810 * {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p> 3811 * <p>Must not slow down frame rate relative to raw 3812 * sensor output.</p> 3813 * 3814 * @see CaptureRequest#TONEMAP_CURVE 3815 * @see CaptureRequest#TONEMAP_MODE 3816 */ 3817 public static final int TONEMAP_MODE_CONTRAST_CURVE = 0; 3818 3819 /** 3820 * <p>Advanced gamma mapping and color enhancement may be applied, without 3821 * reducing frame rate compared to raw sensor output.</p> 3822 * @see CaptureRequest#TONEMAP_MODE 3823 */ 3824 public static final int TONEMAP_MODE_FAST = 1; 3825 3826 /** 3827 * <p>High-quality gamma mapping and color enhancement will be applied, at 3828 * the cost of possibly reduced frame rate compared to raw sensor output.</p> 3829 * @see CaptureRequest#TONEMAP_MODE 3830 */ 3831 public static final int TONEMAP_MODE_HIGH_QUALITY = 2; 3832 3833 /** 3834 * <p>Use the gamma value specified in {@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma} to perform 3835 * tonemapping.</p> 3836 * <p>All color enhancement and tonemapping must be disabled, except 3837 * for applying the tonemapping curve specified by {@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma}.</p> 3838 * <p>Must not slow down frame rate relative to raw sensor output.</p> 3839 * 3840 * @see CaptureRequest#TONEMAP_GAMMA 3841 * @see CaptureRequest#TONEMAP_MODE 3842 */ 3843 public static final int TONEMAP_MODE_GAMMA_VALUE = 3; 3844 3845 /** 3846 * <p>Use the preset tonemapping curve specified in 3847 * {@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve} to perform tonemapping.</p> 3848 * <p>All color enhancement and tonemapping must be disabled, except 3849 * for applying the tonemapping curve specified by 3850 * {@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve}.</p> 3851 * <p>Must not slow down frame rate relative to raw sensor output.</p> 3852 * 3853 * @see CaptureRequest#TONEMAP_PRESET_CURVE 3854 * @see CaptureRequest#TONEMAP_MODE 3855 */ 3856 public static final int TONEMAP_MODE_PRESET_CURVE = 4; 3857 3858 // 3859 // Enumeration values for CaptureRequest#TONEMAP_PRESET_CURVE 3860 // 3861 3862 /** 3863 * <p>Tonemapping curve is defined by sRGB</p> 3864 * @see CaptureRequest#TONEMAP_PRESET_CURVE 3865 */ 3866 public static final int TONEMAP_PRESET_CURVE_SRGB = 0; 3867 3868 /** 3869 * <p>Tonemapping curve is defined by ITU-R BT.709</p> 3870 * @see CaptureRequest#TONEMAP_PRESET_CURVE 3871 */ 3872 public static final int TONEMAP_PRESET_CURVE_REC709 = 1; 3873 3874 // 3875 // Enumeration values for CaptureRequest#DISTORTION_CORRECTION_MODE 3876 // 3877 3878 /** 3879 * <p>No distortion correction is applied.</p> 3880 * @see CaptureRequest#DISTORTION_CORRECTION_MODE 3881 */ 3882 public static final int DISTORTION_CORRECTION_MODE_OFF = 0; 3883 3884 /** 3885 * <p>Lens distortion correction is applied without reducing frame rate 3886 * relative to sensor output. It may be the same as OFF if distortion correction would 3887 * reduce frame rate relative to sensor.</p> 3888 * @see CaptureRequest#DISTORTION_CORRECTION_MODE 3889 */ 3890 public static final int DISTORTION_CORRECTION_MODE_FAST = 1; 3891 3892 /** 3893 * <p>High-quality distortion correction is applied, at the cost of 3894 * possibly reduced frame rate relative to sensor output.</p> 3895 * @see CaptureRequest#DISTORTION_CORRECTION_MODE 3896 */ 3897 public static final int DISTORTION_CORRECTION_MODE_HIGH_QUALITY = 2; 3898 3899 // 3900 // Enumeration values for CaptureRequest#EFV_STABILIZATION_MODE 3901 // 3902 3903 /** 3904 * <p>No stabilization.</p> 3905 * @see CaptureRequest#EFV_STABILIZATION_MODE 3906 * @hide 3907 */ 3908 @FlaggedApi(Flags.FLAG_CONCERT_MODE_API) 3909 public static final int EFV_STABILIZATION_MODE_OFF = 0; 3910 3911 /** 3912 * <p>Gimbal stabilization mode.</p> 3913 * @see CaptureRequest#EFV_STABILIZATION_MODE 3914 * @hide 3915 */ 3916 @FlaggedApi(Flags.FLAG_CONCERT_MODE_API) 3917 public static final int EFV_STABILIZATION_MODE_GIMBAL = 1; 3918 3919 /** 3920 * <p>Locked stabilization mode which uses the 3921 * {@link android.hardware.camera2.CameraExtensionCharacteristics#EXTENSION_EYES_FREE_VIDEOGRAPHY } 3922 * stabilization to directionally steady the target region.</p> 3923 * @see CaptureRequest#EFV_STABILIZATION_MODE 3924 * @hide 3925 */ 3926 @FlaggedApi(Flags.FLAG_CONCERT_MODE_API) 3927 public static final int EFV_STABILIZATION_MODE_LOCKED = 2; 3928 3929 // 3930 // Enumeration values for CaptureResult#CONTROL_AE_STATE 3931 // 3932 3933 /** 3934 * <p>AE is off or recently reset.</p> 3935 * <p>When a camera device is opened, it starts in 3936 * this state. This is a transient state, the camera device may skip reporting 3937 * this state in capture result.</p> 3938 * @see CaptureResult#CONTROL_AE_STATE 3939 */ 3940 public static final int CONTROL_AE_STATE_INACTIVE = 0; 3941 3942 /** 3943 * <p>AE doesn't yet have a good set of control values 3944 * for the current scene.</p> 3945 * <p>This is a transient state, the camera device may skip 3946 * reporting this state in capture result.</p> 3947 * @see CaptureResult#CONTROL_AE_STATE 3948 */ 3949 public static final int CONTROL_AE_STATE_SEARCHING = 1; 3950 3951 /** 3952 * <p>AE has a good set of control values for the 3953 * current scene.</p> 3954 * @see CaptureResult#CONTROL_AE_STATE 3955 */ 3956 public static final int CONTROL_AE_STATE_CONVERGED = 2; 3957 3958 /** 3959 * <p>AE has been locked.</p> 3960 * @see CaptureResult#CONTROL_AE_STATE 3961 */ 3962 public static final int CONTROL_AE_STATE_LOCKED = 3; 3963 3964 /** 3965 * <p>AE has a good set of control values, but flash 3966 * needs to be fired for good quality still 3967 * capture.</p> 3968 * @see CaptureResult#CONTROL_AE_STATE 3969 */ 3970 public static final int CONTROL_AE_STATE_FLASH_REQUIRED = 4; 3971 3972 /** 3973 * <p>AE has been asked to do a precapture sequence 3974 * and is currently executing it.</p> 3975 * <p>Precapture can be triggered through setting 3976 * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} to START. Currently 3977 * active and completed (if it causes camera device internal AE lock) precapture 3978 * metering sequence can be canceled through setting 3979 * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} to CANCEL.</p> 3980 * <p>Once PRECAPTURE completes, AE will transition to CONVERGED 3981 * or FLASH_REQUIRED as appropriate. This is a transient 3982 * state, the camera device may skip reporting this state in 3983 * capture result.</p> 3984 * 3985 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 3986 * @see CaptureResult#CONTROL_AE_STATE 3987 */ 3988 public static final int CONTROL_AE_STATE_PRECAPTURE = 5; 3989 3990 // 3991 // Enumeration values for CaptureResult#CONTROL_AF_STATE 3992 // 3993 3994 /** 3995 * <p>AF is off or has not yet tried to scan/been asked 3996 * to scan.</p> 3997 * <p>When a camera device is opened, it starts in this 3998 * state. This is a transient state, the camera device may 3999 * skip reporting this state in capture 4000 * result.</p> 4001 * @see CaptureResult#CONTROL_AF_STATE 4002 */ 4003 public static final int CONTROL_AF_STATE_INACTIVE = 0; 4004 4005 /** 4006 * <p>AF is currently performing an AF scan initiated the 4007 * camera device in a continuous autofocus mode.</p> 4008 * <p>Only used by CONTINUOUS_* AF modes. This is a transient 4009 * state, the camera device may skip reporting this state in 4010 * capture result.</p> 4011 * @see CaptureResult#CONTROL_AF_STATE 4012 */ 4013 public static final int CONTROL_AF_STATE_PASSIVE_SCAN = 1; 4014 4015 /** 4016 * <p>AF currently believes it is in focus, but may 4017 * restart scanning at any time.</p> 4018 * <p>Only used by CONTINUOUS_* AF modes. This is a transient 4019 * state, the camera device may skip reporting this state in 4020 * capture result.</p> 4021 * @see CaptureResult#CONTROL_AF_STATE 4022 */ 4023 public static final int CONTROL_AF_STATE_PASSIVE_FOCUSED = 2; 4024 4025 /** 4026 * <p>AF is performing an AF scan because it was 4027 * triggered by AF trigger.</p> 4028 * <p>Only used by AUTO or MACRO AF modes. This is a transient 4029 * state, the camera device may skip reporting this state in 4030 * capture result.</p> 4031 * @see CaptureResult#CONTROL_AF_STATE 4032 */ 4033 public static final int CONTROL_AF_STATE_ACTIVE_SCAN = 3; 4034 4035 /** 4036 * <p>AF believes it is focused correctly and has locked 4037 * focus.</p> 4038 * <p>This state is reached only after an explicit START AF trigger has been 4039 * sent ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}), when good focus has been obtained.</p> 4040 * <p>The lens will remain stationary until the AF mode ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) is changed or 4041 * a new AF trigger is sent to the camera device ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}).</p> 4042 * 4043 * @see CaptureRequest#CONTROL_AF_MODE 4044 * @see CaptureRequest#CONTROL_AF_TRIGGER 4045 * @see CaptureResult#CONTROL_AF_STATE 4046 */ 4047 public static final int CONTROL_AF_STATE_FOCUSED_LOCKED = 4; 4048 4049 /** 4050 * <p>AF has failed to focus successfully and has locked 4051 * focus.</p> 4052 * <p>This state is reached only after an explicit START AF trigger has been 4053 * sent ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}), when good focus cannot be obtained.</p> 4054 * <p>The lens will remain stationary until the AF mode ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) is changed or 4055 * a new AF trigger is sent to the camera device ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}).</p> 4056 * 4057 * @see CaptureRequest#CONTROL_AF_MODE 4058 * @see CaptureRequest#CONTROL_AF_TRIGGER 4059 * @see CaptureResult#CONTROL_AF_STATE 4060 */ 4061 public static final int CONTROL_AF_STATE_NOT_FOCUSED_LOCKED = 5; 4062 4063 /** 4064 * <p>AF finished a passive scan without finding focus, 4065 * and may restart scanning at any time.</p> 4066 * <p>Only used by CONTINUOUS_* AF modes. This is a transient state, the camera 4067 * device may skip reporting this state in capture result.</p> 4068 * <p>LEGACY camera devices do not support this state. When a passive 4069 * scan has finished, it will always go to PASSIVE_FOCUSED.</p> 4070 * @see CaptureResult#CONTROL_AF_STATE 4071 */ 4072 public static final int CONTROL_AF_STATE_PASSIVE_UNFOCUSED = 6; 4073 4074 // 4075 // Enumeration values for CaptureResult#CONTROL_AWB_STATE 4076 // 4077 4078 /** 4079 * <p>AWB is not in auto mode, or has not yet started metering.</p> 4080 * <p>When a camera device is opened, it starts in this 4081 * state. This is a transient state, the camera device may 4082 * skip reporting this state in capture 4083 * result.</p> 4084 * @see CaptureResult#CONTROL_AWB_STATE 4085 */ 4086 public static final int CONTROL_AWB_STATE_INACTIVE = 0; 4087 4088 /** 4089 * <p>AWB doesn't yet have a good set of control 4090 * values for the current scene.</p> 4091 * <p>This is a transient state, the camera device 4092 * may skip reporting this state in capture result.</p> 4093 * @see CaptureResult#CONTROL_AWB_STATE 4094 */ 4095 public static final int CONTROL_AWB_STATE_SEARCHING = 1; 4096 4097 /** 4098 * <p>AWB has a good set of control values for the 4099 * current scene.</p> 4100 * @see CaptureResult#CONTROL_AWB_STATE 4101 */ 4102 public static final int CONTROL_AWB_STATE_CONVERGED = 2; 4103 4104 /** 4105 * <p>AWB has been locked.</p> 4106 * @see CaptureResult#CONTROL_AWB_STATE 4107 */ 4108 public static final int CONTROL_AWB_STATE_LOCKED = 3; 4109 4110 // 4111 // Enumeration values for CaptureResult#CONTROL_AF_SCENE_CHANGE 4112 // 4113 4114 /** 4115 * <p>Scene change is not detected within the AF region(s).</p> 4116 * @see CaptureResult#CONTROL_AF_SCENE_CHANGE 4117 */ 4118 public static final int CONTROL_AF_SCENE_CHANGE_NOT_DETECTED = 0; 4119 4120 /** 4121 * <p>Scene change is detected within the AF region(s).</p> 4122 * @see CaptureResult#CONTROL_AF_SCENE_CHANGE 4123 */ 4124 public static final int CONTROL_AF_SCENE_CHANGE_DETECTED = 1; 4125 4126 // 4127 // Enumeration values for CaptureResult#CONTROL_AUTOFRAMING_STATE 4128 // 4129 4130 /** 4131 * <p>Auto-framing is inactive.</p> 4132 * @see CaptureResult#CONTROL_AUTOFRAMING_STATE 4133 */ 4134 public static final int CONTROL_AUTOFRAMING_STATE_INACTIVE = 0; 4135 4136 /** 4137 * <p>Auto-framing is in process - either zooming in, zooming out or pan is taking place.</p> 4138 * @see CaptureResult#CONTROL_AUTOFRAMING_STATE 4139 */ 4140 public static final int CONTROL_AUTOFRAMING_STATE_FRAMING = 1; 4141 4142 /** 4143 * <p>Auto-framing has reached a stable state (frame/fov is not being adjusted). The state 4144 * may transition back to FRAMING if the scene changes.</p> 4145 * @see CaptureResult#CONTROL_AUTOFRAMING_STATE 4146 */ 4147 public static final int CONTROL_AUTOFRAMING_STATE_CONVERGED = 2; 4148 4149 // 4150 // Enumeration values for CaptureResult#CONTROL_LOW_LIGHT_BOOST_STATE 4151 // 4152 4153 /** 4154 * <p>The AE mode 'ON_LOW_LIGHT_BOOST_BRIGHTNESS_PRIORITY' is enabled but not applied.</p> 4155 * @see CaptureResult#CONTROL_LOW_LIGHT_BOOST_STATE 4156 */ 4157 @FlaggedApi(Flags.FLAG_CAMERA_AE_MODE_LOW_LIGHT_BOOST) 4158 public static final int CONTROL_LOW_LIGHT_BOOST_STATE_INACTIVE = 0; 4159 4160 /** 4161 * <p>The AE mode 'ON_LOW_LIGHT_BOOST_BRIGHTNESS_PRIORITY' is enabled and applied.</p> 4162 * @see CaptureResult#CONTROL_LOW_LIGHT_BOOST_STATE 4163 */ 4164 @FlaggedApi(Flags.FLAG_CAMERA_AE_MODE_LOW_LIGHT_BOOST) 4165 public static final int CONTROL_LOW_LIGHT_BOOST_STATE_ACTIVE = 1; 4166 4167 // 4168 // Enumeration values for CaptureResult#FLASH_STATE 4169 // 4170 4171 /** 4172 * <p>No flash on camera.</p> 4173 * @see CaptureResult#FLASH_STATE 4174 */ 4175 public static final int FLASH_STATE_UNAVAILABLE = 0; 4176 4177 /** 4178 * <p>Flash is charging and cannot be fired.</p> 4179 * @see CaptureResult#FLASH_STATE 4180 */ 4181 public static final int FLASH_STATE_CHARGING = 1; 4182 4183 /** 4184 * <p>Flash is ready to fire.</p> 4185 * @see CaptureResult#FLASH_STATE 4186 */ 4187 public static final int FLASH_STATE_READY = 2; 4188 4189 /** 4190 * <p>Flash fired for this capture.</p> 4191 * @see CaptureResult#FLASH_STATE 4192 */ 4193 public static final int FLASH_STATE_FIRED = 3; 4194 4195 /** 4196 * <p>Flash partially illuminated this frame.</p> 4197 * <p>This is usually due to the next or previous frame having 4198 * the flash fire, and the flash spilling into this capture 4199 * due to hardware limitations.</p> 4200 * @see CaptureResult#FLASH_STATE 4201 */ 4202 public static final int FLASH_STATE_PARTIAL = 4; 4203 4204 // 4205 // Enumeration values for CaptureResult#LENS_STATE 4206 // 4207 4208 /** 4209 * <p>The lens parameters ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}, 4210 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}) are not changing.</p> 4211 * 4212 * @see CaptureRequest#LENS_APERTURE 4213 * @see CaptureRequest#LENS_FILTER_DENSITY 4214 * @see CaptureRequest#LENS_FOCAL_LENGTH 4215 * @see CaptureRequest#LENS_FOCUS_DISTANCE 4216 * @see CaptureResult#LENS_STATE 4217 */ 4218 public static final int LENS_STATE_STATIONARY = 0; 4219 4220 /** 4221 * <p>One or several of the lens parameters 4222 * ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}, 4223 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} or {@link CaptureRequest#LENS_APERTURE android.lens.aperture}) is 4224 * currently changing.</p> 4225 * 4226 * @see CaptureRequest#LENS_APERTURE 4227 * @see CaptureRequest#LENS_FILTER_DENSITY 4228 * @see CaptureRequest#LENS_FOCAL_LENGTH 4229 * @see CaptureRequest#LENS_FOCUS_DISTANCE 4230 * @see CaptureResult#LENS_STATE 4231 */ 4232 public static final int LENS_STATE_MOVING = 1; 4233 4234 // 4235 // Enumeration values for CaptureResult#STATISTICS_SCENE_FLICKER 4236 // 4237 4238 /** 4239 * <p>The camera device does not detect any flickering illumination 4240 * in the current scene.</p> 4241 * @see CaptureResult#STATISTICS_SCENE_FLICKER 4242 */ 4243 public static final int STATISTICS_SCENE_FLICKER_NONE = 0; 4244 4245 /** 4246 * <p>The camera device detects illumination flickering at 50Hz 4247 * in the current scene.</p> 4248 * @see CaptureResult#STATISTICS_SCENE_FLICKER 4249 */ 4250 public static final int STATISTICS_SCENE_FLICKER_50HZ = 1; 4251 4252 /** 4253 * <p>The camera device detects illumination flickering at 60Hz 4254 * in the current scene.</p> 4255 * @see CaptureResult#STATISTICS_SCENE_FLICKER 4256 */ 4257 public static final int STATISTICS_SCENE_FLICKER_60HZ = 2; 4258 4259 // 4260 // Enumeration values for CaptureResult#SYNC_FRAME_NUMBER 4261 // 4262 4263 /** 4264 * <p>The current result is not yet fully synchronized to any request.</p> 4265 * <p>Synchronization is in progress, and reading metadata from this 4266 * result may include a mix of data that have taken effect since the 4267 * last synchronization time.</p> 4268 * <p>In some future result, within {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} frames, 4269 * this value will update to the actual frame number frame number 4270 * the result is guaranteed to be synchronized to (as long as the 4271 * request settings remain constant).</p> 4272 * 4273 * @see CameraCharacteristics#SYNC_MAX_LATENCY 4274 * @see CaptureResult#SYNC_FRAME_NUMBER 4275 * @hide 4276 */ 4277 public static final int SYNC_FRAME_NUMBER_CONVERGING = -1; 4278 4279 /** 4280 * <p>The current result's synchronization status is unknown.</p> 4281 * <p>The result may have already converged, or it may be in 4282 * progress. Reading from this result may include some mix 4283 * of settings from past requests.</p> 4284 * <p>After a settings change, the new settings will eventually all 4285 * take effect for the output buffers and results. However, this 4286 * value will not change when that happens. Altering settings 4287 * rapidly may provide outcomes using mixes of settings from recent 4288 * requests.</p> 4289 * <p>This value is intended primarily for backwards compatibility with 4290 * the older camera implementations (for android.hardware.Camera).</p> 4291 * @see CaptureResult#SYNC_FRAME_NUMBER 4292 * @hide 4293 */ 4294 public static final int SYNC_FRAME_NUMBER_UNKNOWN = -2; 4295 4296 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 4297 * End generated code 4298 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/ 4299 4300 } 4301