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