CameraCharacteristics.java revision 08bc3b0f0299a02d00004f4b2886469c1ed75569
1/* 2 * Copyright (C) 2013 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package android.hardware.camera2; 18 19import android.hardware.camera2.CaptureResult.Key; 20import android.hardware.camera2.impl.CameraMetadataNative; 21import android.hardware.camera2.utils.TypeReference; 22import android.util.Rational; 23 24import java.util.Collections; 25import java.util.List; 26 27/** 28 * <p>The properties describing a 29 * {@link CameraDevice CameraDevice}.</p> 30 * 31 * <p>These properties are fixed for a given CameraDevice, and can be queried 32 * through the {@link CameraManager CameraManager} 33 * interface with {@link CameraManager#getCameraCharacteristics}.</p> 34 * 35 * <p>{@link CameraCharacteristics} objects are immutable.</p> 36 * 37 * @see CameraDevice 38 * @see CameraManager 39 */ 40public final class CameraCharacteristics extends CameraMetadata<CameraCharacteristics.Key<?>> { 41 42 /** 43 * A {@code Key} is used to do camera characteristics field lookups with 44 * {@link CameraCharacteristics#get}. 45 * 46 * <p>For example, to get the stream configuration map: 47 * <code><pre> 48 * StreamConfigurationMap map = cameraCharacteristics.get( 49 * CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP); 50 * </pre></code> 51 * </p> 52 * 53 * <p>To enumerate over all possible keys for {@link CameraCharacteristics}, see 54 * {@link CameraCharacteristics#getKeys()}.</p> 55 * 56 * @see CameraCharacteristics#get 57 * @see CameraCharacteristics#getKeys() 58 */ 59 public static final class Key<T> { 60 private final CameraMetadataNative.Key<T> mKey; 61 62 /** 63 * Visible for testing and vendor extensions only. 64 * 65 * @hide 66 */ 67 public Key(String name, Class<T> type) { 68 mKey = new CameraMetadataNative.Key<T>(name, type); 69 } 70 71 /** 72 * Visible for testing and vendor extensions only. 73 * 74 * @hide 75 */ 76 public Key(String name, TypeReference<T> typeReference) { 77 mKey = new CameraMetadataNative.Key<T>(name, typeReference); 78 } 79 80 /** 81 * Return a camelCase, period separated name formatted like: 82 * {@code "root.section[.subsections].name"}. 83 * 84 * <p>Built-in keys exposed by the Android SDK are always prefixed with {@code "android."}; 85 * keys that are device/platform-specific are prefixed with {@code "com."}.</p> 86 * 87 * <p>For example, {@code CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP} would 88 * have a name of {@code "android.scaler.streamConfigurationMap"}; whereas a device 89 * specific key might look like {@code "com.google.nexus.data.private"}.</p> 90 * 91 * @return String representation of the key name 92 */ 93 public String getName() { 94 return mKey.getName(); 95 } 96 97 /** 98 * {@inheritDoc} 99 */ 100 @Override 101 public final int hashCode() { 102 return mKey.hashCode(); 103 } 104 105 /** 106 * {@inheritDoc} 107 */ 108 @SuppressWarnings("unchecked") 109 @Override 110 public final boolean equals(Object o) { 111 return o instanceof Key && ((Key<T>)o).mKey.equals(mKey); 112 } 113 114 /** 115 * Visible for CameraMetadataNative implementation only; do not use. 116 * 117 * TODO: Make this private or remove it altogether. 118 * 119 * @hide 120 */ 121 public CameraMetadataNative.Key<T> getNativeKey() { 122 return mKey; 123 } 124 125 @SuppressWarnings({ 126 "unused", "unchecked" 127 }) 128 private Key(CameraMetadataNative.Key<?> nativeKey) { 129 mKey = (CameraMetadataNative.Key<T>) nativeKey; 130 } 131 } 132 133 private final CameraMetadataNative mProperties; 134 private List<CaptureRequest.Key<?>> mAvailableRequestKeys; 135 private List<CaptureResult.Key<?>> mAvailableResultKeys; 136 137 /** 138 * Takes ownership of the passed-in properties object 139 * @hide 140 */ 141 public CameraCharacteristics(CameraMetadataNative properties) { 142 mProperties = CameraMetadataNative.move(properties); 143 } 144 145 /** 146 * Returns a copy of the underlying {@link CameraMetadataNative}. 147 * @hide 148 */ 149 public CameraMetadataNative getNativeCopy() { 150 return new CameraMetadataNative(mProperties); 151 } 152 153 /** 154 * Get a camera characteristics field value. 155 * 156 * <p>The field definitions can be 157 * found in {@link CameraCharacteristics}.</p> 158 * 159 * <p>Querying the value for the same key more than once will return a value 160 * which is equal to the previous queried value.</p> 161 * 162 * @throws IllegalArgumentException if the key was not valid 163 * 164 * @param key The characteristics field to read. 165 * @return The value of that key, or {@code null} if the field is not set. 166 */ 167 public <T> T get(Key<T> key) { 168 return mProperties.get(key); 169 } 170 171 /** 172 * {@inheritDoc} 173 * @hide 174 */ 175 @SuppressWarnings("unchecked") 176 @Override 177 protected <T> T getProtected(Key<?> key) { 178 return (T) mProperties.get(key); 179 } 180 181 /** 182 * {@inheritDoc} 183 * @hide 184 */ 185 @SuppressWarnings("unchecked") 186 @Override 187 protected Class<Key<?>> getKeyClass() { 188 Object thisClass = Key.class; 189 return (Class<Key<?>>)thisClass; 190 } 191 192 /** 193 * {@inheritDoc} 194 */ 195 @Override 196 public List<Key<?>> getKeys() { 197 // Force the javadoc for this function to show up on the CameraCharacteristics page 198 return super.getKeys(); 199 } 200 201 /** 202 * Returns the list of keys supported by this {@link CameraDevice} for querying 203 * with a {@link CaptureRequest}. 204 * 205 * <p>The list returned is not modifiable, so any attempts to modify it will throw 206 * a {@code UnsupportedOperationException}.</p> 207 * 208 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> 209 * 210 * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use 211 * {@link #getKeys()} instead.</p> 212 * 213 * @return List of keys supported by this CameraDevice for CaptureRequests. 214 */ 215 @SuppressWarnings({"unchecked"}) 216 public List<CaptureRequest.Key<?>> getAvailableCaptureRequestKeys() { 217 if (mAvailableRequestKeys == null) { 218 Object crKey = CaptureRequest.Key.class; 219 Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey; 220 221 mAvailableRequestKeys = Collections.unmodifiableList( 222 getAvailableKeyList(CaptureRequest.class, crKeyTyped)); 223 } 224 return mAvailableRequestKeys; 225 } 226 227 /** 228 * Returns the list of keys supported by this {@link CameraDevice} for querying 229 * with a {@link CaptureResult}. 230 * 231 * <p>The list returned is not modifiable, so any attempts to modify it will throw 232 * a {@code UnsupportedOperationException}.</p> 233 * 234 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> 235 * 236 * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use 237 * {@link #getKeys()} instead.</p> 238 * 239 * @return List of keys supported by this CameraDevice for CaptureResults. 240 */ 241 @SuppressWarnings({"unchecked"}) 242 public List<CaptureResult.Key<?>> getAvailableCaptureResultKeys() { 243 if (mAvailableResultKeys == null) { 244 Object crKey = CaptureResult.Key.class; 245 Class<CaptureResult.Key<?>> crKeyTyped = (Class<CaptureResult.Key<?>>)crKey; 246 247 mAvailableResultKeys = Collections.unmodifiableList( 248 getAvailableKeyList(CaptureResult.class, crKeyTyped)); 249 } 250 return mAvailableResultKeys; 251 } 252 253 /** 254 * Returns the list of keys supported by this {@link CameraDevice} by metadataClass. 255 * 256 * <p>The list returned is not modifiable, so any attempts to modify it will throw 257 * a {@code UnsupportedOperationException}.</p> 258 * 259 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> 260 * 261 * @param metadataClass The subclass of CameraMetadata that you want to get the keys for. 262 * @param keyClass The class of the metadata key, e.g. CaptureRequest.Key.class 263 * 264 * @return List of keys supported by this CameraDevice for metadataClass. 265 * 266 * @throws IllegalArgumentException if metadataClass is not a subclass of CameraMetadata 267 */ 268 private <TKey> List<TKey> 269 getAvailableKeyList(Class<?> metadataClass, Class<TKey> keyClass) { 270 271 if (metadataClass.equals(CameraMetadata.class)) { 272 throw new AssertionError( 273 "metadataClass must be a strict subclass of CameraMetadata"); 274 } else if (!CameraMetadata.class.isAssignableFrom(metadataClass)) { 275 throw new AssertionError( 276 "metadataClass must be a subclass of CameraMetadata"); 277 } 278 279 List<TKey> staticKeyList = CameraCharacteristics.<TKey>getKeysStatic( 280 metadataClass, keyClass, /*instance*/null); 281 return Collections.unmodifiableList(staticKeyList); 282 } 283 284 /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 285 * The key entries below this point are generated from metadata 286 * definitions in /system/media/camera/docs. Do not modify by hand or 287 * modify the comment blocks at the start or end. 288 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/ 289 290 291 /** 292 * <p>The set of aberration correction modes supported by this camera device.</p> 293 * <p>This metadata lists the valid modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_CORRECTION_MODE android.colorCorrection.aberrationCorrectionMode}. 294 * If no aberration correction modes are available for a device, this list will solely include 295 * OFF mode.</p> 296 * <p>For FULL capability device ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL), OFF must be 297 * included.</p> 298 * 299 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_CORRECTION_MODE 300 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 301 */ 302 public static final Key<int[]> COLOR_CORRECTION_AVAILABLE_ABERRATION_CORRECTION_MODES = 303 new Key<int[]>("android.colorCorrection.availableAberrationCorrectionModes", int[].class); 304 305 /** 306 * <p>The set of auto-exposure antibanding modes that are 307 * supported by this camera device.</p> 308 * <p>Not all of the auto-exposure anti-banding modes may be 309 * supported by a given camera device. This field lists the 310 * valid anti-banding modes that the application may request 311 * for this camera device; they must include AUTO.</p> 312 */ 313 public static final Key<int[]> CONTROL_AE_AVAILABLE_ANTIBANDING_MODES = 314 new Key<int[]>("android.control.aeAvailableAntibandingModes", int[].class); 315 316 /** 317 * <p>The set of auto-exposure modes that are supported by this 318 * camera device.</p> 319 * <p>Not all the auto-exposure modes may be supported by a 320 * given camera device, especially if no flash unit is 321 * available. This entry lists the valid modes for 322 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} for this camera device.</p> 323 * <p>All camera devices support ON, and all camera devices with 324 * flash units support ON_AUTO_FLASH and 325 * ON_ALWAYS_FLASH.</p> 326 * <p>FULL mode camera devices always support OFF mode, 327 * which enables application control of camera exposure time, 328 * sensitivity, and frame duration.</p> 329 * 330 * @see CaptureRequest#CONTROL_AE_MODE 331 */ 332 public static final Key<int[]> CONTROL_AE_AVAILABLE_MODES = 333 new Key<int[]>("android.control.aeAvailableModes", int[].class); 334 335 /** 336 * <p>List of frame rate ranges supported by the 337 * auto-exposure (AE) algorithm/hardware</p> 338 */ 339 public static final Key<android.util.Range<Integer>[]> CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES = 340 new Key<android.util.Range<Integer>[]>("android.control.aeAvailableTargetFpsRanges", new TypeReference<android.util.Range<Integer>[]>() {{ }}); 341 342 /** 343 * <p>Maximum and minimum exposure compensation 344 * setting, in counts of 345 * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep}.</p> 346 * 347 * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP 348 */ 349 public static final Key<android.util.Range<Integer>> CONTROL_AE_COMPENSATION_RANGE = 350 new Key<android.util.Range<Integer>>("android.control.aeCompensationRange", new TypeReference<android.util.Range<Integer>>() {{ }}); 351 352 /** 353 * <p>Smallest step by which exposure compensation 354 * can be changed</p> 355 */ 356 public static final Key<Rational> CONTROL_AE_COMPENSATION_STEP = 357 new Key<Rational>("android.control.aeCompensationStep", Rational.class); 358 359 /** 360 * <p>List of auto-focus (AF) modes that can be 361 * selected with {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}.</p> 362 * <p>Not all the auto-focus modes may be supported by a 363 * given camera device. This entry lists the valid modes for 364 * {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} for this camera device.</p> 365 * <p>All camera devices will support OFF mode, and all camera devices with 366 * adjustable focuser units (<code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} > 0</code>) 367 * will support AUTO mode.</p> 368 * 369 * @see CaptureRequest#CONTROL_AF_MODE 370 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 371 */ 372 public static final Key<int[]> CONTROL_AF_AVAILABLE_MODES = 373 new Key<int[]>("android.control.afAvailableModes", int[].class); 374 375 /** 376 * <p>List containing the subset of color effects 377 * specified in {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode} that is supported by 378 * this device.</p> 379 * <p>This list contains the color effect modes that can be applied to 380 * images produced by the camera device. Only modes that have 381 * been fully implemented for the current device may be included here. 382 * Implementations are not expected to be consistent across all devices. 383 * If no color effect modes are available for a device, this should 384 * simply be set to OFF.</p> 385 * <p>A color effect will only be applied if 386 * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF.</p> 387 * 388 * @see CaptureRequest#CONTROL_EFFECT_MODE 389 * @see CaptureRequest#CONTROL_MODE 390 */ 391 public static final Key<int[]> CONTROL_AVAILABLE_EFFECTS = 392 new Key<int[]>("android.control.availableEffects", int[].class); 393 394 /** 395 * <p>List containing a subset of scene modes 396 * specified in {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode}.</p> 397 * <p>This list contains scene modes that can be set for the camera device. 398 * Only scene modes that have been fully implemented for the 399 * camera device may be included here. Implementations are not expected 400 * to be consistent across all devices. If no scene modes are supported 401 * by the camera device, this will be set to <code>[DISABLED]</code>.</p> 402 * 403 * @see CaptureRequest#CONTROL_SCENE_MODE 404 */ 405 public static final Key<int[]> CONTROL_AVAILABLE_SCENE_MODES = 406 new Key<int[]>("android.control.availableSceneModes", int[].class); 407 408 /** 409 * <p>List of video stabilization modes that can 410 * be supported</p> 411 */ 412 public static final Key<int[]> CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES = 413 new Key<int[]>("android.control.availableVideoStabilizationModes", int[].class); 414 415 /** 416 * <p>The set of auto-white-balance modes ({@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}) 417 * that are supported by this camera device.</p> 418 * <p>Not all the auto-white-balance modes may be supported by a 419 * given camera device. This entry lists the valid modes for 420 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} for this camera device.</p> 421 * <p>All camera devices will support ON mode.</p> 422 * <p>FULL mode camera devices will always support OFF mode, 423 * which enables application control of white balance, by using 424 * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}({@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} must be set to TRANSFORM_MATRIX).</p> 425 * 426 * @see CaptureRequest#COLOR_CORRECTION_GAINS 427 * @see CaptureRequest#COLOR_CORRECTION_MODE 428 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 429 * @see CaptureRequest#CONTROL_AWB_MODE 430 */ 431 public static final Key<int[]> CONTROL_AWB_AVAILABLE_MODES = 432 new Key<int[]>("android.control.awbAvailableModes", int[].class); 433 434 /** 435 * <p>List of the maximum number of regions that can be used for metering in 436 * auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF); 437 * this corresponds to the the maximum number of elements in 438 * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}, {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}, 439 * and {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p> 440 * 441 * @see CaptureRequest#CONTROL_AE_REGIONS 442 * @see CaptureRequest#CONTROL_AF_REGIONS 443 * @see CaptureRequest#CONTROL_AWB_REGIONS 444 * @hide 445 */ 446 public static final Key<int[]> CONTROL_MAX_REGIONS = 447 new Key<int[]>("android.control.maxRegions", int[].class); 448 449 /** 450 * <p>List of the maximum number of regions that can be used for metering in 451 * auto-exposure (AE); 452 * this corresponds to the the maximum number of elements in 453 * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}.</p> 454 * 455 * @see CaptureRequest#CONTROL_AE_REGIONS 456 */ 457 public static final Key<Integer> CONTROL_MAX_REGIONS_AE = 458 new Key<Integer>("android.control.maxRegionsAe", int.class); 459 460 /** 461 * <p>List of the maximum number of regions that can be used for metering in 462 * auto-white balance (AWB); 463 * this corresponds to the the maximum number of elements in 464 * {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}.</p> 465 * 466 * @see CaptureRequest#CONTROL_AWB_REGIONS 467 */ 468 public static final Key<Integer> CONTROL_MAX_REGIONS_AWB = 469 new Key<Integer>("android.control.maxRegionsAwb", int.class); 470 471 /** 472 * <p>List of the maximum number of regions that can be used for metering in 473 * auto-focus (AF); 474 * this corresponds to the the maximum number of elements in 475 * {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p> 476 * 477 * @see CaptureRequest#CONTROL_AF_REGIONS 478 */ 479 public static final Key<Integer> CONTROL_MAX_REGIONS_AF = 480 new Key<Integer>("android.control.maxRegionsAf", int.class); 481 482 /** 483 * <p>List of available high speed video size and fps range configurations 484 * supported by the camera device, in the format of (width, height, fps_min, fps_max).</p> 485 * <p>When HIGH_SPEED_VIDEO is supported in {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}, 486 * this metadata will list the supported high speed video size and fps range 487 * configurations. All the sizes listed in this configuration will be a subset 488 * of the sizes reported by StreamConfigurationMap#getOutputSizes for processed 489 * non-stalling formats.</p> 490 * <p>For the high speed video use case, where the application will set 491 * {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} to HIGH_SPEED_VIDEO in capture requests, the application must 492 * select the video size and fps range from this metadata to configure the recording and 493 * preview streams and setup the recording requests. For example, if the application intends 494 * to do high speed recording, it can select the maximum size reported by this metadata to 495 * configure output streams. Once the size is selected, application can filter this metadata 496 * by selected size and get the supported fps ranges, and use these fps ranges to setup the 497 * recording requests.</p> 498 * <p>For normal video recording use case, where some application will NOT set 499 * {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} to HIGH_SPEED_VIDEO in capture requests, the fps ranges 500 * reported in this metadata must not be used to setup capture requests, or it will cause 501 * request error.</p> 502 * 503 * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES 504 * @see CaptureRequest#CONTROL_SCENE_MODE 505 * @hide 506 */ 507 public static final Key<int[]> CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS = 508 new Key<int[]>("android.control.availableHighSpeedVideoConfigurations", int[].class); 509 510 /** 511 * <p>The set of edge enhancement modes supported by this camera device.</p> 512 * <p>This tag lists the valid modes for {@link CaptureRequest#EDGE_MODE android.edge.mode}.</p> 513 * <p>Full-capability camera devices must always support OFF and FAST.</p> 514 * 515 * @see CaptureRequest#EDGE_MODE 516 */ 517 public static final Key<int[]> EDGE_AVAILABLE_EDGE_MODES = 518 new Key<int[]>("android.edge.availableEdgeModes", int[].class); 519 520 /** 521 * <p>Whether this camera device has a 522 * flash.</p> 523 * <p>If no flash, none of the flash controls do 524 * anything. All other metadata should return 0.</p> 525 */ 526 public static final Key<Boolean> FLASH_INFO_AVAILABLE = 527 new Key<Boolean>("android.flash.info.available", boolean.class); 528 529 /** 530 * <p>The set of hot pixel correction modes that are supported by this 531 * camera device.</p> 532 * <p>This tag lists valid modes for {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode}.</p> 533 * <p>FULL mode camera devices will always support FAST.</p> 534 * 535 * @see CaptureRequest#HOT_PIXEL_MODE 536 */ 537 public static final Key<int[]> HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES = 538 new Key<int[]>("android.hotPixel.availableHotPixelModes", int[].class); 539 540 /** 541 * <p>Supported resolutions for the JPEG thumbnail.</p> 542 * <p>Below condiditions will be satisfied for this size list:</p> 543 * <ul> 544 * <li>The sizes will be sorted by increasing pixel area (width x height). 545 * If several resolutions have the same area, they will be sorted by increasing width.</li> 546 * <li>The aspect ratio of the largest thumbnail size will be same as the 547 * aspect ratio of largest JPEG output size in android.scaler.availableStreamConfigurations. 548 * The largest size is defined as the size that has the largest pixel area 549 * in a given size list.</li> 550 * <li>Each output JPEG size in android.scaler.availableStreamConfigurations will have at least 551 * one corresponding size that has the same aspect ratio in availableThumbnailSizes, 552 * and vice versa.</li> 553 * <li>All non (0, 0) sizes will have non-zero widths and heights.</li> 554 * </ul> 555 */ 556 public static final Key<android.util.Size[]> JPEG_AVAILABLE_THUMBNAIL_SIZES = 557 new Key<android.util.Size[]>("android.jpeg.availableThumbnailSizes", android.util.Size[].class); 558 559 /** 560 * <p>List of supported aperture 561 * values.</p> 562 * <p>If the camera device doesn't support variable apertures, 563 * listed value will be the fixed aperture.</p> 564 * <p>If the camera device supports variable apertures, the aperture value 565 * in this list will be sorted in ascending order.</p> 566 */ 567 public static final Key<float[]> LENS_INFO_AVAILABLE_APERTURES = 568 new Key<float[]>("android.lens.info.availableApertures", float[].class); 569 570 /** 571 * <p>List of supported neutral density filter values for 572 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity}.</p> 573 * <p>If changing {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} is not supported, 574 * availableFilterDensities must contain only 0. Otherwise, this 575 * list contains only the exact filter density values available on 576 * this camera device.</p> 577 * 578 * @see CaptureRequest#LENS_FILTER_DENSITY 579 */ 580 public static final Key<float[]> LENS_INFO_AVAILABLE_FILTER_DENSITIES = 581 new Key<float[]>("android.lens.info.availableFilterDensities", float[].class); 582 583 /** 584 * <p>The available focal lengths for this device for use with 585 * {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}.</p> 586 * <p>If optical zoom is not supported, this will only report 587 * a single value corresponding to the static focal length of the 588 * device. Otherwise, this will report every focal length supported 589 * by the device.</p> 590 * 591 * @see CaptureRequest#LENS_FOCAL_LENGTH 592 */ 593 public static final Key<float[]> LENS_INFO_AVAILABLE_FOCAL_LENGTHS = 594 new Key<float[]>("android.lens.info.availableFocalLengths", float[].class); 595 596 /** 597 * <p>List containing a subset of the optical image 598 * stabilization (OIS) modes specified in 599 * {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}.</p> 600 * <p>If OIS is not implemented for a given camera device, this will 601 * contain only OFF.</p> 602 * 603 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 604 */ 605 public static final Key<int[]> LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION = 606 new Key<int[]>("android.lens.info.availableOpticalStabilization", int[].class); 607 608 /** 609 * <p>Optional. Hyperfocal distance for this lens.</p> 610 * <p>If the lens is not fixed focus, the camera device will report this 611 * field when {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} is APPROXIMATE or CALIBRATED.</p> 612 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 613 * 614 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION 615 */ 616 public static final Key<Float> LENS_INFO_HYPERFOCAL_DISTANCE = 617 new Key<Float>("android.lens.info.hyperfocalDistance", float.class); 618 619 /** 620 * <p>Shortest distance from frontmost surface 621 * of the lens that can be focused correctly.</p> 622 * <p>If the lens is fixed-focus, this should be 623 * 0.</p> 624 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 625 */ 626 public static final Key<Float> LENS_INFO_MINIMUM_FOCUS_DISTANCE = 627 new Key<Float>("android.lens.info.minimumFocusDistance", float.class); 628 629 /** 630 * <p>Dimensions of lens shading map.</p> 631 * <p>The map should be on the order of 30-40 rows and columns, and 632 * must be smaller than 64x64.</p> 633 * @hide 634 */ 635 public static final Key<android.util.Size> LENS_INFO_SHADING_MAP_SIZE = 636 new Key<android.util.Size>("android.lens.info.shadingMapSize", android.util.Size.class); 637 638 /** 639 * <p>The lens focus distance calibration quality.</p> 640 * <p>The lens focus distance calibration quality determines the reliability of 641 * focus related metadata entries, i.e. {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}, 642 * {@link CaptureResult#LENS_FOCUS_RANGE android.lens.focusRange}, {@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}, and 643 * {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}.</p> 644 * 645 * @see CaptureRequest#LENS_FOCUS_DISTANCE 646 * @see CaptureResult#LENS_FOCUS_RANGE 647 * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE 648 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 649 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED 650 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE 651 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED 652 */ 653 public static final Key<Integer> LENS_INFO_FOCUS_DISTANCE_CALIBRATION = 654 new Key<Integer>("android.lens.info.focusDistanceCalibration", int.class); 655 656 /** 657 * <p>Direction the camera faces relative to 658 * device screen.</p> 659 * @see #LENS_FACING_FRONT 660 * @see #LENS_FACING_BACK 661 */ 662 public static final Key<Integer> LENS_FACING = 663 new Key<Integer>("android.lens.facing", int.class); 664 665 /** 666 * <p>The set of noise reduction modes supported by this camera device.</p> 667 * <p>This tag lists the valid modes for {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}.</p> 668 * <p>Full-capability camera devices must always support OFF and FAST.</p> 669 * 670 * @see CaptureRequest#NOISE_REDUCTION_MODE 671 */ 672 public static final Key<int[]> NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES = 673 new Key<int[]>("android.noiseReduction.availableNoiseReductionModes", int[].class); 674 675 /** 676 * <p>If set to 1, the HAL will always split result 677 * metadata for a single capture into multiple buffers, 678 * returned using multiple process_capture_result calls.</p> 679 * <p>Does not need to be listed in static 680 * metadata. Support for partial results will be reworked in 681 * future versions of camera service. This quirk will stop 682 * working at that point; DO NOT USE without careful 683 * consideration of future support.</p> 684 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 685 * @deprecated 686 * @hide 687 */ 688 @Deprecated 689 public static final Key<Byte> QUIRKS_USE_PARTIAL_RESULT = 690 new Key<Byte>("android.quirks.usePartialResult", byte.class); 691 692 /** 693 * <p>The maximum numbers of different types of output streams 694 * that can be configured and used simultaneously by a camera device.</p> 695 * <p>This is a 3 element tuple that contains the max number of output simultaneous 696 * streams for raw sensor, processed (but not stalling), and processed (and stalling) 697 * formats respectively. For example, assuming that JPEG is typically a processed and 698 * stalling stream, if max raw sensor format output stream number is 1, max YUV streams 699 * number is 3, and max JPEG stream number is 2, then this tuple should be <code>(1, 3, 2)</code>.</p> 700 * <p>This lists the upper bound of the number of output streams supported by 701 * the camera device. Using more streams simultaneously may require more hardware and 702 * CPU resources that will consume more power. The image format for an output stream can 703 * be any supported format provided by android.scaler.availableStreamConfigurations. 704 * The formats defined in android.scaler.availableStreamConfigurations can be catergorized 705 * into the 3 stream types as below:</p> 706 * <ul> 707 * <li>Processed (but stalling): any non-RAW format with a stallDurations > 0. 708 * Typically JPEG format (ImageFormat#JPEG).</li> 709 * <li>Raw formats: ImageFormat#RAW_SENSOR, ImageFormat#RAW10 and ImageFormat#RAW_OPAQUE.</li> 710 * <li>Processed (but not-stalling): any non-RAW format without a stall duration. 711 * Typically ImageFormat#YUV_420_888, ImageFormat#NV21, ImageFormat#YV12.</li> 712 * </ul> 713 * @hide 714 */ 715 public static final Key<int[]> REQUEST_MAX_NUM_OUTPUT_STREAMS = 716 new Key<int[]>("android.request.maxNumOutputStreams", int[].class); 717 718 /** 719 * <p>The maximum numbers of different types of output streams 720 * that can be configured and used simultaneously by a camera device 721 * for any <code>RAW</code> formats.</p> 722 * <p>This value contains the max number of output simultaneous 723 * streams from the raw sensor.</p> 724 * <p>This lists the upper bound of the number of output streams supported by 725 * the camera device. Using more streams simultaneously may require more hardware and 726 * CPU resources that will consume more power. The image format for this kind of an output stream can 727 * be any <code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p> 728 * <p>In particular, a <code>RAW</code> format is typically one of:</p> 729 * <ul> 730 * <li>ImageFormat#RAW_SENSOR</li> 731 * <li>ImageFormat#RAW10</li> 732 * <li>Opaque <code>RAW</code></li> 733 * </ul> 734 * 735 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP 736 */ 737 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_RAW = 738 new Key<Integer>("android.request.maxNumOutputRaw", int.class); 739 740 /** 741 * <p>The maximum numbers of different types of output streams 742 * that can be configured and used simultaneously by a camera device 743 * for any processed (but not-stalling) formats.</p> 744 * <p>This value contains the max number of output simultaneous 745 * streams for any processed (but not-stalling) formats.</p> 746 * <p>This lists the upper bound of the number of output streams supported by 747 * the camera device. Using more streams simultaneously may require more hardware and 748 * CPU resources that will consume more power. The image format for this kind of an output stream can 749 * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p> 750 * <p>Processed (but not-stalling) is defined as any non-RAW format without a stall duration. 751 * Typically:</p> 752 * <ul> 753 * <li>ImageFormat#YUV_420_888</li> 754 * <li>ImageFormat#NV21</li> 755 * <li>ImageFormat#YV12</li> 756 * <li>Implementation-defined formats, i.e. StreamConfiguration#isOutputSupportedFor(Class)</li> 757 * </ul> 758 * <p>For full guarantees, query StreamConfigurationMap#getOutputStallDuration with 759 * a processed format -- it will return 0 for a non-stalling stream.</p> 760 * 761 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP 762 */ 763 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC = 764 new Key<Integer>("android.request.maxNumOutputProc", int.class); 765 766 /** 767 * <p>The maximum numbers of different types of output streams 768 * that can be configured and used simultaneously by a camera device 769 * for any processed (and stalling) formats.</p> 770 * <p>This value contains the max number of output simultaneous 771 * streams for any processed (but not-stalling) formats.</p> 772 * <p>This lists the upper bound of the number of output streams supported by 773 * the camera device. Using more streams simultaneously may require more hardware and 774 * CPU resources that will consume more power. The image format for this kind of an output stream can 775 * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p> 776 * <p>A processed and stalling format is defined as any non-RAW format with a stallDurations > 0. 777 * Typically only the <code>JPEG</code> format (ImageFormat#JPEG)</p> 778 * <p>For full guarantees, query StreamConfigurationMap#getOutputStallDuration with 779 * a processed format -- it will return a non-0 value for a stalling stream.</p> 780 * 781 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP 782 */ 783 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC_STALLING = 784 new Key<Integer>("android.request.maxNumOutputProcStalling", int.class); 785 786 /** 787 * <p>The maximum numbers of any type of input streams 788 * that can be configured and used simultaneously by a camera device.</p> 789 * <p>When set to 0, it means no input stream is supported.</p> 790 * <p>The image format for a input stream can be any supported 791 * format provided by 792 * android.scaler.availableInputOutputFormatsMap. When using an 793 * input stream, there must be at least one output stream 794 * configured to to receive the reprocessed images.</p> 795 * <p>For example, for Zero Shutter Lag (ZSL) still capture use case, the input 796 * stream image format will be RAW_OPAQUE, the associated output stream image format 797 * should be JPEG.</p> 798 * @hide 799 */ 800 public static final Key<Integer> REQUEST_MAX_NUM_INPUT_STREAMS = 801 new Key<Integer>("android.request.maxNumInputStreams", int.class); 802 803 /** 804 * <p>Specifies the number of maximum pipeline stages a frame 805 * has to go through from when it's exposed to when it's available 806 * to the framework.</p> 807 * <p>A typical minimum value for this is 2 (one stage to expose, 808 * one stage to readout) from the sensor. The ISP then usually adds 809 * its own stages to do custom HW processing. Further stages may be 810 * added by SW processing.</p> 811 * <p>Depending on what settings are used (e.g. YUV, JPEG) and what 812 * processing is enabled (e.g. face detection), the actual pipeline 813 * depth (specified by {@link CaptureResult#REQUEST_PIPELINE_DEPTH android.request.pipelineDepth}) may be less than 814 * the max pipeline depth.</p> 815 * <p>A pipeline depth of X stages is equivalent to a pipeline latency of 816 * X frame intervals.</p> 817 * <p>This value will be 8 or less.</p> 818 * 819 * @see CaptureResult#REQUEST_PIPELINE_DEPTH 820 */ 821 public static final Key<Byte> REQUEST_PIPELINE_MAX_DEPTH = 822 new Key<Byte>("android.request.pipelineMaxDepth", byte.class); 823 824 /** 825 * <p>Defines how many sub-components 826 * a result will be composed of.</p> 827 * <p>In order to combat the pipeline latency, partial results 828 * may be delivered to the application layer from the camera device as 829 * soon as they are available.</p> 830 * <p>Optional; defaults to 1. A value of 1 means that partial 831 * results are not supported, and only the final TotalCaptureResult will 832 * be produced by the camera device.</p> 833 * <p>A typical use case for this might be: after requesting an 834 * auto-focus (AF) lock the new AF state might be available 50% 835 * of the way through the pipeline. The camera device could 836 * then immediately dispatch this state via a partial result to 837 * the application, and the rest of the metadata via later 838 * partial results.</p> 839 */ 840 public static final Key<Integer> REQUEST_PARTIAL_RESULT_COUNT = 841 new Key<Integer>("android.request.partialResultCount", int.class); 842 843 /** 844 * <p>List of capabilities that the camera device 845 * advertises as fully supporting.</p> 846 * <p>A capability is a contract that the camera device makes in order 847 * to be able to satisfy one or more use cases.</p> 848 * <p>Listing a capability guarantees that the whole set of features 849 * required to support a common use will all be available.</p> 850 * <p>Using a subset of the functionality provided by an unsupported 851 * capability may be possible on a specific camera device implementation; 852 * to do this query each of android.request.availableRequestKeys, 853 * android.request.availableResultKeys, 854 * android.request.availableCharacteristicsKeys.</p> 855 * <p>The following capabilities are guaranteed to be available on 856 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL devices:</p> 857 * <ul> 858 * <li>MANUAL_SENSOR</li> 859 * <li>MANUAL_POST_PROCESSING</li> 860 * </ul> 861 * <p>Other capabilities may be available on either FULL or LIMITED 862 * devices, but the application should query this field to be sure.</p> 863 * 864 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 865 * @see #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE 866 * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR 867 * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING 868 * @see #REQUEST_AVAILABLE_CAPABILITIES_DNG 869 */ 870 public static final Key<int[]> REQUEST_AVAILABLE_CAPABILITIES = 871 new Key<int[]>("android.request.availableCapabilities", int[].class); 872 873 /** 874 * <p>A list of all keys that the camera device has available 875 * to use with CaptureRequest.</p> 876 * <p>Attempting to set a key into a CaptureRequest that is not 877 * listed here will result in an invalid request and will be rejected 878 * by the camera device.</p> 879 * <p>This field can be used to query the feature set of a camera device 880 * at a more granular level than capabilities. This is especially 881 * important for optional keys that are not listed under any capability 882 * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p> 883 * 884 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 885 * @hide 886 */ 887 public static final Key<int[]> REQUEST_AVAILABLE_REQUEST_KEYS = 888 new Key<int[]>("android.request.availableRequestKeys", int[].class); 889 890 /** 891 * <p>A list of all keys that the camera device has available 892 * to use with CaptureResult.</p> 893 * <p>Attempting to get a key from a CaptureResult that is not 894 * listed here will always return a <code>null</code> value. Getting a key from 895 * a CaptureResult that is listed here must never return a <code>null</code> 896 * value.</p> 897 * <p>The following keys may return <code>null</code> unless they are enabled:</p> 898 * <ul> 899 * <li>android.statistics.lensShadingMap (non-null iff {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON)</li> 900 * </ul> 901 * <p>(Those sometimes-null keys should nevertheless be listed here 902 * if they are available.)</p> 903 * <p>This field can be used to query the feature set of a camera device 904 * at a more granular level than capabilities. This is especially 905 * important for optional keys that are not listed under any capability 906 * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p> 907 * 908 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 909 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 910 * @hide 911 */ 912 public static final Key<int[]> REQUEST_AVAILABLE_RESULT_KEYS = 913 new Key<int[]>("android.request.availableResultKeys", int[].class); 914 915 /** 916 * <p>A list of all keys that the camera device has available 917 * to use with CameraCharacteristics.</p> 918 * <p>This entry follows the same rules as 919 * android.request.availableResultKeys (except that it applies for 920 * CameraCharacteristics instead of CaptureResult). See above for more 921 * details.</p> 922 * @hide 923 */ 924 public static final Key<int[]> REQUEST_AVAILABLE_CHARACTERISTICS_KEYS = 925 new Key<int[]>("android.request.availableCharacteristicsKeys", int[].class); 926 927 /** 928 * <p>The list of image formats that are supported by this 929 * camera device for output streams.</p> 930 * <p>All camera devices will support JPEG and YUV_420_888 formats.</p> 931 * <p>When set to YUV_420_888, application can access the YUV420 data directly.</p> 932 * @deprecated 933 * @hide 934 */ 935 @Deprecated 936 public static final Key<int[]> SCALER_AVAILABLE_FORMATS = 937 new Key<int[]>("android.scaler.availableFormats", int[].class); 938 939 /** 940 * <p>The minimum frame duration that is supported 941 * for each resolution in android.scaler.availableJpegSizes.</p> 942 * <p>This corresponds to the minimum steady-state frame duration when only 943 * that JPEG stream is active and captured in a burst, with all 944 * processing (typically in android.*.mode) set to FAST.</p> 945 * <p>When multiple streams are configured, the minimum 946 * frame duration will be >= max(individual stream min 947 * durations)</p> 948 * @deprecated 949 * @hide 950 */ 951 @Deprecated 952 public static final Key<long[]> SCALER_AVAILABLE_JPEG_MIN_DURATIONS = 953 new Key<long[]>("android.scaler.availableJpegMinDurations", long[].class); 954 955 /** 956 * <p>The JPEG resolutions that are supported by this camera device.</p> 957 * <p>The resolutions are listed as <code>(width, height)</code> pairs. All camera devices will support 958 * sensor maximum resolution (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}).</p> 959 * 960 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 961 * @deprecated 962 * @hide 963 */ 964 @Deprecated 965 public static final Key<android.util.Size[]> SCALER_AVAILABLE_JPEG_SIZES = 966 new Key<android.util.Size[]>("android.scaler.availableJpegSizes", android.util.Size[].class); 967 968 /** 969 * <p>The maximum ratio between both active area width 970 * and crop region width, and active area height and 971 * crop region height.</p> 972 * <p>This represents the maximum amount of zooming possible by 973 * the camera device, or equivalently, the minimum cropping 974 * window size.</p> 975 * <p>Crop regions that have a width or height that is smaller 976 * than this ratio allows will be rounded up to the minimum 977 * allowed size by the camera device.</p> 978 */ 979 public static final Key<Float> SCALER_AVAILABLE_MAX_DIGITAL_ZOOM = 980 new Key<Float>("android.scaler.availableMaxDigitalZoom", float.class); 981 982 /** 983 * <p>For each available processed output size (defined in 984 * android.scaler.availableProcessedSizes), this property lists the 985 * minimum supportable frame duration for that size.</p> 986 * <p>This should correspond to the frame duration when only that processed 987 * stream is active, with all processing (typically in android.*.mode) 988 * set to FAST.</p> 989 * <p>When multiple streams are configured, the minimum frame duration will 990 * be >= max(individual stream min durations).</p> 991 * @deprecated 992 * @hide 993 */ 994 @Deprecated 995 public static final Key<long[]> SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS = 996 new Key<long[]>("android.scaler.availableProcessedMinDurations", long[].class); 997 998 /** 999 * <p>The resolutions available for use with 1000 * processed output streams, such as YV12, NV12, and 1001 * platform opaque YUV/RGB streams to the GPU or video 1002 * encoders.</p> 1003 * <p>The resolutions are listed as <code>(width, height)</code> pairs.</p> 1004 * <p>For a given use case, the actual maximum supported resolution 1005 * may be lower than what is listed here, depending on the destination 1006 * Surface for the image data. For example, for recording video, 1007 * the video encoder chosen may have a maximum size limit (e.g. 1080p) 1008 * smaller than what the camera (e.g. maximum resolution is 3264x2448) 1009 * can provide.</p> 1010 * <p>Please reference the documentation for the image data destination to 1011 * check if it limits the maximum size for image data.</p> 1012 * @deprecated 1013 * @hide 1014 */ 1015 @Deprecated 1016 public static final Key<android.util.Size[]> SCALER_AVAILABLE_PROCESSED_SIZES = 1017 new Key<android.util.Size[]>("android.scaler.availableProcessedSizes", android.util.Size[].class); 1018 1019 /** 1020 * <p>The mapping of image formats that are supported by this 1021 * camera device for input streams, to their corresponding output formats.</p> 1022 * <p>All camera devices with at least 1 1023 * android.request.maxNumInputStreams will have at least one 1024 * available input format.</p> 1025 * <p>The camera device will support the following map of formats, 1026 * if its dependent capability is supported:</p> 1027 * <table> 1028 * <thead> 1029 * <tr> 1030 * <th align="left">Input Format</th> 1031 * <th align="left">Output Format</th> 1032 * <th align="left">Capability</th> 1033 * </tr> 1034 * </thead> 1035 * <tbody> 1036 * <tr> 1037 * <td align="left">RAW_OPAQUE</td> 1038 * <td align="left">JPEG</td> 1039 * <td align="left">ZSL</td> 1040 * </tr> 1041 * <tr> 1042 * <td align="left">RAW_OPAQUE</td> 1043 * <td align="left">YUV_420_888</td> 1044 * <td align="left">ZSL</td> 1045 * </tr> 1046 * <tr> 1047 * <td align="left">RAW_OPAQUE</td> 1048 * <td align="left">RAW16</td> 1049 * <td align="left">DNG</td> 1050 * </tr> 1051 * <tr> 1052 * <td align="left">RAW16</td> 1053 * <td align="left">YUV_420_888</td> 1054 * <td align="left">DNG</td> 1055 * </tr> 1056 * <tr> 1057 * <td align="left">RAW16</td> 1058 * <td align="left">JPEG</td> 1059 * <td align="left">DNG</td> 1060 * </tr> 1061 * </tbody> 1062 * </table> 1063 * <p>For ZSL-capable camera devices, using the RAW_OPAQUE format 1064 * as either input or output will never hurt maximum frame rate (i.e. 1065 * StreamConfigurationMap#getOutputStallDuration(int,Size) 1066 * for a <code>format =</code> RAW_OPAQUE is always 0).</p> 1067 * <p>Attempting to configure an input stream with output streams not 1068 * listed as available in this map is not valid.</p> 1069 * <p>TODO: typedef to ReprocessFormatMap</p> 1070 * @hide 1071 */ 1072 public static final Key<int[]> SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP = 1073 new Key<int[]>("android.scaler.availableInputOutputFormatsMap", int[].class); 1074 1075 /** 1076 * <p>The available stream configurations that this 1077 * camera device supports 1078 * (i.e. format, width, height, output/input stream).</p> 1079 * <p>The configurations are listed as <code>(format, width, height, input?)</code> 1080 * tuples.</p> 1081 * <p>For a given use case, the actual maximum supported resolution 1082 * may be lower than what is listed here, depending on the destination 1083 * Surface for the image data. For example, for recording video, 1084 * the video encoder chosen may have a maximum size limit (e.g. 1080p) 1085 * smaller than what the camera (e.g. maximum resolution is 3264x2448) 1086 * can provide.</p> 1087 * <p>Please reference the documentation for the image data destination to 1088 * check if it limits the maximum size for image data.</p> 1089 * <p>Not all output formats may be supported in a configuration with 1090 * an input stream of a particular format. For more details, see 1091 * android.scaler.availableInputOutputFormatsMap.</p> 1092 * <p>The following table describes the minimum required output stream 1093 * configurations based on the hardware level 1094 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p> 1095 * <table> 1096 * <thead> 1097 * <tr> 1098 * <th align="center">Format</th> 1099 * <th align="center">Size</th> 1100 * <th align="center">Hardware Level</th> 1101 * <th align="center">Notes</th> 1102 * </tr> 1103 * </thead> 1104 * <tbody> 1105 * <tr> 1106 * <td align="center">JPEG</td> 1107 * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td> 1108 * <td align="center">Any</td> 1109 * <td align="center"></td> 1110 * </tr> 1111 * <tr> 1112 * <td align="center">JPEG</td> 1113 * <td align="center">1920x1080 (1080p)</td> 1114 * <td align="center">Any</td> 1115 * <td align="center">if 1080p <= activeArraySize</td> 1116 * </tr> 1117 * <tr> 1118 * <td align="center">JPEG</td> 1119 * <td align="center">1280x720 (720)</td> 1120 * <td align="center">Any</td> 1121 * <td align="center">if 720p <= activeArraySize</td> 1122 * </tr> 1123 * <tr> 1124 * <td align="center">JPEG</td> 1125 * <td align="center">640x480 (480p)</td> 1126 * <td align="center">Any</td> 1127 * <td align="center">if 480p <= activeArraySize</td> 1128 * </tr> 1129 * <tr> 1130 * <td align="center">JPEG</td> 1131 * <td align="center">320x240 (240p)</td> 1132 * <td align="center">Any</td> 1133 * <td align="center">if 240p <= activeArraySize</td> 1134 * </tr> 1135 * <tr> 1136 * <td align="center">YUV_420_888</td> 1137 * <td align="center">all output sizes available for JPEG</td> 1138 * <td align="center">FULL</td> 1139 * <td align="center"></td> 1140 * </tr> 1141 * <tr> 1142 * <td align="center">YUV_420_888</td> 1143 * <td align="center">all output sizes available for JPEG, up to the maximum video size</td> 1144 * <td align="center">LIMITED</td> 1145 * <td align="center"></td> 1146 * </tr> 1147 * <tr> 1148 * <td align="center">IMPLEMENTATION_DEFINED</td> 1149 * <td align="center">same as YUV_420_888</td> 1150 * <td align="center">Any</td> 1151 * <td align="center"></td> 1152 * </tr> 1153 * </tbody> 1154 * </table> 1155 * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional 1156 * mandatory stream configurations on a per-capability basis.</p> 1157 * 1158 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1159 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1160 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 1161 * @hide 1162 */ 1163 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> SCALER_AVAILABLE_STREAM_CONFIGURATIONS = 1164 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.scaler.availableStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class); 1165 1166 /** 1167 * <p>This lists the minimum frame duration for each 1168 * format/size combination.</p> 1169 * <p>This should correspond to the frame duration when only that 1170 * stream is active, with all processing (typically in android.*.mode) 1171 * set to either OFF or FAST.</p> 1172 * <p>When multiple streams are used in a request, the minimum frame 1173 * duration will be max(individual stream min durations).</p> 1174 * <p>The minimum frame duration of a stream (of a particular format, size) 1175 * is the same regardless of whether the stream is input or output.</p> 1176 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and 1177 * android.scaler.availableStallDurations for more details about 1178 * calculating the max frame rate.</p> 1179 * <p>(Keep in sync with 1180 * StreamConfigurationMap#getOutputMinFrameDuration)</p> 1181 * 1182 * @see CaptureRequest#SENSOR_FRAME_DURATION 1183 * @hide 1184 */ 1185 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_MIN_FRAME_DURATIONS = 1186 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); 1187 1188 /** 1189 * <p>This lists the maximum stall duration for each 1190 * format/size combination.</p> 1191 * <p>A stall duration is how much extra time would get added 1192 * to the normal minimum frame duration for a repeating request 1193 * that has streams with non-zero stall.</p> 1194 * <p>For example, consider JPEG captures which have the following 1195 * characteristics:</p> 1196 * <ul> 1197 * <li>JPEG streams act like processed YUV streams in requests for which 1198 * they are not included; in requests in which they are directly 1199 * referenced, they act as JPEG streams. This is because supporting a 1200 * JPEG stream requires the underlying YUV data to always be ready for 1201 * use by a JPEG encoder, but the encoder will only be used (and impact 1202 * frame duration) on requests that actually reference a JPEG stream.</li> 1203 * <li>The JPEG processor can run concurrently to the rest of the camera 1204 * pipeline, but cannot process more than 1 capture at a time.</li> 1205 * </ul> 1206 * <p>In other words, using a repeating YUV request would result 1207 * in a steady frame rate (let's say it's 30 FPS). If a single 1208 * JPEG request is submitted periodically, the frame rate will stay 1209 * at 30 FPS (as long as we wait for the previous JPEG to return each 1210 * time). If we try to submit a repeating YUV + JPEG request, then 1211 * the frame rate will drop from 30 FPS.</p> 1212 * <p>In general, submitting a new request with a non-0 stall time 1213 * stream will <em>not</em> cause a frame rate drop unless there are still 1214 * outstanding buffers for that stream from previous requests.</p> 1215 * <p>Submitting a repeating request with streams (call this <code>S</code>) 1216 * is the same as setting the minimum frame duration from 1217 * the normal minimum frame duration corresponding to <code>S</code>, added with 1218 * the maximum stall duration for <code>S</code>.</p> 1219 * <p>If interleaving requests with and without a stall duration, 1220 * a request will stall by the maximum of the remaining times 1221 * for each can-stall stream with outstanding buffers.</p> 1222 * <p>This means that a stalling request will not have an exposure start 1223 * until the stall has completed.</p> 1224 * <p>This should correspond to the stall duration when only that stream is 1225 * active, with all processing (typically in android.*.mode) set to FAST 1226 * or OFF. Setting any of the processing modes to HIGH_QUALITY 1227 * effectively results in an indeterminate stall duration for all 1228 * streams in a request (the regular stall calculation rules are 1229 * ignored).</p> 1230 * <p>The following formats may always have a stall duration:</p> 1231 * <ul> 1232 * <li>ImageFormat#JPEG</li> 1233 * <li>ImageFormat#RAW_SENSOR</li> 1234 * </ul> 1235 * <p>The following formats will never have a stall duration:</p> 1236 * <ul> 1237 * <li>ImageFormat#YUV_420_888</li> 1238 * </ul> 1239 * <p>All other formats may or may not have an allowed stall duration on 1240 * a per-capability basis; refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} 1241 * for more details.</p> 1242 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} for more information about 1243 * calculating the max frame rate (absent stalls).</p> 1244 * <p>(Keep up to date with 1245 * StreamConfigurationMap#getOutputStallDuration(int, Size) )</p> 1246 * 1247 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1248 * @see CaptureRequest#SENSOR_FRAME_DURATION 1249 * @hide 1250 */ 1251 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_STALL_DURATIONS = 1252 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); 1253 1254 /** 1255 * <p>The available stream configurations that this 1256 * camera device supports; also includes the minimum frame durations 1257 * and the stall durations for each format/size combination.</p> 1258 * <p>All camera devices will support sensor maximum resolution (defined by 1259 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) for the JPEG format.</p> 1260 * <p>For a given use case, the actual maximum supported resolution 1261 * may be lower than what is listed here, depending on the destination 1262 * Surface for the image data. For example, for recording video, 1263 * the video encoder chosen may have a maximum size limit (e.g. 1080p) 1264 * smaller than what the camera (e.g. maximum resolution is 3264x2448) 1265 * can provide.</p> 1266 * <p>Please reference the documentation for the image data destination to 1267 * check if it limits the maximum size for image data.</p> 1268 * <p>The following table describes the minimum required output stream 1269 * configurations based on the hardware level 1270 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p> 1271 * <table> 1272 * <thead> 1273 * <tr> 1274 * <th align="center">Format</th> 1275 * <th align="center">Size</th> 1276 * <th align="center">Hardware Level</th> 1277 * <th align="center">Notes</th> 1278 * </tr> 1279 * </thead> 1280 * <tbody> 1281 * <tr> 1282 * <td align="center">JPEG</td> 1283 * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td> 1284 * <td align="center">Any</td> 1285 * <td align="center"></td> 1286 * </tr> 1287 * <tr> 1288 * <td align="center">JPEG</td> 1289 * <td align="center">1920x1080 (1080p)</td> 1290 * <td align="center">Any</td> 1291 * <td align="center">if 1080p <= activeArraySize</td> 1292 * </tr> 1293 * <tr> 1294 * <td align="center">JPEG</td> 1295 * <td align="center">1280x720 (720)</td> 1296 * <td align="center">Any</td> 1297 * <td align="center">if 720p <= activeArraySize</td> 1298 * </tr> 1299 * <tr> 1300 * <td align="center">JPEG</td> 1301 * <td align="center">640x480 (480p)</td> 1302 * <td align="center">Any</td> 1303 * <td align="center">if 480p <= activeArraySize</td> 1304 * </tr> 1305 * <tr> 1306 * <td align="center">JPEG</td> 1307 * <td align="center">320x240 (240p)</td> 1308 * <td align="center">Any</td> 1309 * <td align="center">if 240p <= activeArraySize</td> 1310 * </tr> 1311 * <tr> 1312 * <td align="center">YUV_420_888</td> 1313 * <td align="center">all output sizes available for JPEG</td> 1314 * <td align="center">FULL</td> 1315 * <td align="center"></td> 1316 * </tr> 1317 * <tr> 1318 * <td align="center">YUV_420_888</td> 1319 * <td align="center">all output sizes available for JPEG, up to the maximum video size</td> 1320 * <td align="center">LIMITED</td> 1321 * <td align="center"></td> 1322 * </tr> 1323 * <tr> 1324 * <td align="center">IMPLEMENTATION_DEFINED</td> 1325 * <td align="center">same as YUV_420_888</td> 1326 * <td align="center">Any</td> 1327 * <td align="center"></td> 1328 * </tr> 1329 * </tbody> 1330 * </table> 1331 * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional 1332 * mandatory stream configurations on a per-capability basis.</p> 1333 * 1334 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1335 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1336 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 1337 */ 1338 public static final Key<android.hardware.camera2.params.StreamConfigurationMap> SCALER_STREAM_CONFIGURATION_MAP = 1339 new Key<android.hardware.camera2.params.StreamConfigurationMap>("android.scaler.streamConfigurationMap", android.hardware.camera2.params.StreamConfigurationMap.class); 1340 1341 /** 1342 * <p>The crop type that this camera device supports.</p> 1343 * <p>When passing a non-centered crop region ({@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}) to a camera 1344 * device that only supports CENTER_ONLY cropping, the camera device will move the 1345 * crop region to the center of the sensor active array ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) 1346 * and keep the crop region width and height unchanged. The camera device will return the 1347 * final used crop region in metadata result {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p> 1348 * <p>Camera devices that support FREEFORM cropping will support any crop region that 1349 * is inside of the active array. The camera device will apply the same crop region and 1350 * return the final used crop region in capture result metadata {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p> 1351 * <p>FULL capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL) will support 1352 * FREEFORM cropping.</p> 1353 * 1354 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1355 * @see CaptureRequest#SCALER_CROP_REGION 1356 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 1357 * @see #SCALER_CROPPING_TYPE_CENTER_ONLY 1358 * @see #SCALER_CROPPING_TYPE_FREEFORM 1359 */ 1360 public static final Key<Integer> SCALER_CROPPING_TYPE = 1361 new Key<Integer>("android.scaler.croppingType", int.class); 1362 1363 /** 1364 * <p>Area of raw data which corresponds to only 1365 * active pixels.</p> 1366 * <p>It is smaller or equal to 1367 * sensor full pixel array, which could include the black calibration pixels.</p> 1368 */ 1369 public static final Key<android.graphics.Rect> SENSOR_INFO_ACTIVE_ARRAY_SIZE = 1370 new Key<android.graphics.Rect>("android.sensor.info.activeArraySize", android.graphics.Rect.class); 1371 1372 /** 1373 * <p>Range of valid sensitivities.</p> 1374 * <p>The minimum and maximum valid values for the 1375 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} control.</p> 1376 * <p>The values are the standard ISO sensitivity values, 1377 * as defined in ISO 12232:2006.</p> 1378 * 1379 * @see CaptureRequest#SENSOR_SENSITIVITY 1380 */ 1381 public static final Key<android.util.Range<Integer>> SENSOR_INFO_SENSITIVITY_RANGE = 1382 new Key<android.util.Range<Integer>>("android.sensor.info.sensitivityRange", new TypeReference<android.util.Range<Integer>>() {{ }}); 1383 1384 /** 1385 * <p>The arrangement of color filters on sensor; 1386 * represents the colors in the top-left 2x2 section of 1387 * the sensor, in reading order.</p> 1388 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB 1389 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG 1390 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG 1391 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR 1392 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB 1393 */ 1394 public static final Key<Integer> SENSOR_INFO_COLOR_FILTER_ARRANGEMENT = 1395 new Key<Integer>("android.sensor.info.colorFilterArrangement", int.class); 1396 1397 /** 1398 * <p>Range of valid exposure 1399 * times used by {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}.</p> 1400 * <p>The min value will be <= 100e3 (100 us). For FULL 1401 * capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL), 1402 * max will be >= 100e6 (100ms)</p> 1403 * 1404 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1405 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 1406 */ 1407 public static final Key<android.util.Range<Long>> SENSOR_INFO_EXPOSURE_TIME_RANGE = 1408 new Key<android.util.Range<Long>>("android.sensor.info.exposureTimeRange", new TypeReference<android.util.Range<Long>>() {{ }}); 1409 1410 /** 1411 * <p>Maximum possible frame duration (minimum frame 1412 * rate).</p> 1413 * <p>The largest possible {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} 1414 * that will be accepted by the camera device. Attempting to use 1415 * frame durations beyond the maximum will result in the frame duration 1416 * being clipped to the maximum. See that control 1417 * for a full definition of frame durations.</p> 1418 * <p>Refer to 1419 * StreamConfigurationMap#getOutputMinFrameDuration(int,Size) 1420 * for the minimum frame duration values.</p> 1421 * <p>For FULL capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL), 1422 * max will be >= 100e6 (100ms).</p> 1423 * 1424 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1425 * @see CaptureRequest#SENSOR_FRAME_DURATION 1426 */ 1427 public static final Key<Long> SENSOR_INFO_MAX_FRAME_DURATION = 1428 new Key<Long>("android.sensor.info.maxFrameDuration", long.class); 1429 1430 /** 1431 * <p>The physical dimensions of the full pixel 1432 * array.</p> 1433 * <p>This is the physical size of the sensor pixel 1434 * array defined by {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p> 1435 * 1436 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE 1437 */ 1438 public static final Key<android.util.SizeF> SENSOR_INFO_PHYSICAL_SIZE = 1439 new Key<android.util.SizeF>("android.sensor.info.physicalSize", android.util.SizeF.class); 1440 1441 /** 1442 * <p>Dimensions of full pixel array, possibly 1443 * including black calibration pixels.</p> 1444 * <p>The pixel count of the full pixel array, 1445 * which covers {@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize} area.</p> 1446 * <p>If a camera device supports raw sensor formats, either this 1447 * or {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} is the maximum output 1448 * raw size listed in {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}. 1449 * If a size corresponding to pixelArraySize is listed, the resulting 1450 * raw sensor image will include black pixels.</p> 1451 * 1452 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP 1453 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 1454 * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE 1455 */ 1456 public static final Key<android.util.Size> SENSOR_INFO_PIXEL_ARRAY_SIZE = 1457 new Key<android.util.Size>("android.sensor.info.pixelArraySize", android.util.Size.class); 1458 1459 /** 1460 * <p>Maximum raw value output by sensor.</p> 1461 * <p>This specifies the fully-saturated encoding level for the raw 1462 * sample values from the sensor. This is typically caused by the 1463 * sensor becoming highly non-linear or clipping. The minimum for 1464 * each channel is specified by the offset in the 1465 * {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} tag.</p> 1466 * <p>The white level is typically determined either by sensor bit depth 1467 * (8-14 bits is expected), or by the point where the sensor response 1468 * becomes too non-linear to be useful. The default value for this is 1469 * maximum representable value for a 16-bit raw sample (2^16 - 1).</p> 1470 * 1471 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN 1472 */ 1473 public static final Key<Integer> SENSOR_INFO_WHITE_LEVEL = 1474 new Key<Integer>("android.sensor.info.whiteLevel", int.class); 1475 1476 /** 1477 * <p>The sensor timestamp calibration quality.</p> 1478 * <p>The sensor timestamp calibration quality determines the reliability of 1479 * {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} provided by the camera device.</p> 1480 * 1481 * @see CaptureResult#SENSOR_TIMESTAMP 1482 * @see #SENSOR_INFO_TIMESTAMP_CALIBRATION_UNCALIBRATED 1483 * @see #SENSOR_INFO_TIMESTAMP_CALIBRATION_CALIBRATED 1484 */ 1485 public static final Key<Integer> SENSOR_INFO_TIMESTAMP_CALIBRATION = 1486 new Key<Integer>("android.sensor.info.timestampCalibration", int.class); 1487 1488 /** 1489 * <p>The standard reference illuminant used as the scene light source when 1490 * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1}, 1491 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and 1492 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} matrices.</p> 1493 * <p>The values in this tag correspond to the values defined for the 1494 * EXIF LightSource tag. These illuminants are standard light sources 1495 * that are often used calibrating camera devices.</p> 1496 * <p>If this tag is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1}, 1497 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and 1498 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} will also be present.</p> 1499 * <p>Some devices may choose to provide a second set of calibration 1500 * information for improved quality, including 1501 * {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2} and its corresponding matrices.</p> 1502 * 1503 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 1504 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 1505 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX1 1506 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 1507 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT 1508 * @see #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT 1509 * @see #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN 1510 * @see #SENSOR_REFERENCE_ILLUMINANT1_FLASH 1511 * @see #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER 1512 * @see #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER 1513 * @see #SENSOR_REFERENCE_ILLUMINANT1_SHADE 1514 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT 1515 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT 1516 * @see #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT 1517 * @see #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT 1518 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A 1519 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B 1520 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C 1521 * @see #SENSOR_REFERENCE_ILLUMINANT1_D55 1522 * @see #SENSOR_REFERENCE_ILLUMINANT1_D65 1523 * @see #SENSOR_REFERENCE_ILLUMINANT1_D75 1524 * @see #SENSOR_REFERENCE_ILLUMINANT1_D50 1525 * @see #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN 1526 */ 1527 public static final Key<Integer> SENSOR_REFERENCE_ILLUMINANT1 = 1528 new Key<Integer>("android.sensor.referenceIlluminant1", int.class); 1529 1530 /** 1531 * <p>The standard reference illuminant used as the scene light source when 1532 * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2}, 1533 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and 1534 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} matrices.</p> 1535 * <p>See {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1} for more details. 1536 * Valid values for this are the same as those given for the first 1537 * reference illuminant.</p> 1538 * <p>If this tag is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2}, 1539 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and 1540 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} will also be present.</p> 1541 * 1542 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 1543 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 1544 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX2 1545 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1546 */ 1547 public static final Key<Byte> SENSOR_REFERENCE_ILLUMINANT2 = 1548 new Key<Byte>("android.sensor.referenceIlluminant2", byte.class); 1549 1550 /** 1551 * <p>A per-device calibration transform matrix that maps from the 1552 * reference sensor colorspace to the actual device sensor colorspace.</p> 1553 * <p>This matrix is used to correct for per-device variations in the 1554 * sensor colorspace, and is used for processing raw buffer data.</p> 1555 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and 1556 * contains a per-device calibration transform that maps colors 1557 * from reference sensor color space (i.e. the "golden module" 1558 * colorspace) into this camera device's native sensor color 1559 * space under the first reference illuminant 1560 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p> 1561 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1562 * 1563 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1564 */ 1565 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM1 = 1566 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform1", android.hardware.camera2.params.ColorSpaceTransform.class); 1567 1568 /** 1569 * <p>A per-device calibration transform matrix that maps from the 1570 * reference sensor colorspace to the actual device sensor colorspace 1571 * (this is the colorspace of the raw buffer data).</p> 1572 * <p>This matrix is used to correct for per-device variations in the 1573 * sensor colorspace, and is used for processing raw buffer data.</p> 1574 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and 1575 * contains a per-device calibration transform that maps colors 1576 * from reference sensor color space (i.e. the "golden module" 1577 * colorspace) into this camera device's native sensor color 1578 * space under the second reference illuminant 1579 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p> 1580 * <p>This matrix will only be present if the second reference 1581 * illuminant is present.</p> 1582 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1583 * 1584 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 1585 */ 1586 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM2 = 1587 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform2", android.hardware.camera2.params.ColorSpaceTransform.class); 1588 1589 /** 1590 * <p>A matrix that transforms color values from CIE XYZ color space to 1591 * reference sensor color space.</p> 1592 * <p>This matrix is used to convert from the standard CIE XYZ color 1593 * space to the reference sensor colorspace, and is used when processing 1594 * raw buffer data.</p> 1595 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and 1596 * contains a color transform matrix that maps colors from the CIE 1597 * XYZ color space to the reference sensor color space (i.e. the 1598 * "golden module" colorspace) under the first reference illuminant 1599 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p> 1600 * <p>The white points chosen in both the reference sensor color space 1601 * and the CIE XYZ colorspace when calculating this transform will 1602 * match the standard white point for the first reference illuminant 1603 * (i.e. no chromatic adaptation will be applied by this transform).</p> 1604 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1605 * 1606 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1607 */ 1608 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM1 = 1609 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform1", android.hardware.camera2.params.ColorSpaceTransform.class); 1610 1611 /** 1612 * <p>A matrix that transforms color values from CIE XYZ color space to 1613 * reference sensor color space.</p> 1614 * <p>This matrix is used to convert from the standard CIE XYZ color 1615 * space to the reference sensor colorspace, and is used when processing 1616 * raw buffer data.</p> 1617 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and 1618 * contains a color transform matrix that maps colors from the CIE 1619 * XYZ color space to the reference sensor color space (i.e. the 1620 * "golden module" colorspace) under the second reference illuminant 1621 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p> 1622 * <p>The white points chosen in both the reference sensor color space 1623 * and the CIE XYZ colorspace when calculating this transform will 1624 * match the standard white point for the second reference illuminant 1625 * (i.e. no chromatic adaptation will be applied by this transform).</p> 1626 * <p>This matrix will only be present if the second reference 1627 * illuminant is present.</p> 1628 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1629 * 1630 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 1631 */ 1632 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM2 = 1633 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform2", android.hardware.camera2.params.ColorSpaceTransform.class); 1634 1635 /** 1636 * <p>A matrix that transforms white balanced camera colors from the reference 1637 * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p> 1638 * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and 1639 * is used when processing raw buffer data.</p> 1640 * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains 1641 * a color transform matrix that maps white balanced colors from the 1642 * reference sensor color space to the CIE XYZ color space with a D50 white 1643 * point.</p> 1644 * <p>Under the first reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}) 1645 * this matrix is chosen so that the standard white point for this reference 1646 * illuminant in the reference sensor colorspace is mapped to D50 in the 1647 * CIE XYZ colorspace.</p> 1648 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1649 * 1650 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1651 */ 1652 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX1 = 1653 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix1", android.hardware.camera2.params.ColorSpaceTransform.class); 1654 1655 /** 1656 * <p>A matrix that transforms white balanced camera colors from the reference 1657 * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p> 1658 * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and 1659 * is used when processing raw buffer data.</p> 1660 * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains 1661 * a color transform matrix that maps white balanced colors from the 1662 * reference sensor color space to the CIE XYZ color space with a D50 white 1663 * point.</p> 1664 * <p>Under the second reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}) 1665 * this matrix is chosen so that the standard white point for this reference 1666 * illuminant in the reference sensor colorspace is mapped to D50 in the 1667 * CIE XYZ colorspace.</p> 1668 * <p>This matrix will only be present if the second reference 1669 * illuminant is present.</p> 1670 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1671 * 1672 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 1673 */ 1674 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX2 = 1675 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix2", android.hardware.camera2.params.ColorSpaceTransform.class); 1676 1677 /** 1678 * <p>A fixed black level offset for each of the color filter arrangement 1679 * (CFA) mosaic channels.</p> 1680 * <p>This tag specifies the zero light value for each of the CFA mosaic 1681 * channels in the camera sensor. The maximal value output by the 1682 * sensor is represented by the value in {@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}.</p> 1683 * <p>The values are given in row-column scan order, with the first value 1684 * corresponding to the element of the CFA in row=0, column=0.</p> 1685 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1686 * 1687 * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL 1688 */ 1689 public static final Key<int[]> SENSOR_BLACK_LEVEL_PATTERN = 1690 new Key<int[]>("android.sensor.blackLevelPattern", int[].class); 1691 1692 /** 1693 * <p>Maximum sensitivity that is implemented 1694 * purely through analog gain.</p> 1695 * <p>For {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} values less than or 1696 * equal to this, all applied gain must be analog. For 1697 * values above this, the gain applied can be a mix of analog and 1698 * digital.</p> 1699 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1700 * <p><b>Full capability</b> - 1701 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 1702 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1703 * 1704 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1705 * @see CaptureRequest#SENSOR_SENSITIVITY 1706 */ 1707 public static final Key<Integer> SENSOR_MAX_ANALOG_SENSITIVITY = 1708 new Key<Integer>("android.sensor.maxAnalogSensitivity", int.class); 1709 1710 /** 1711 * <p>Clockwise angle through which the output 1712 * image needs to be rotated to be upright on the device 1713 * screen in its native orientation. Also defines the 1714 * direction of rolling shutter readout, which is from top 1715 * to bottom in the sensor's coordinate system</p> 1716 */ 1717 public static final Key<Integer> SENSOR_ORIENTATION = 1718 new Key<Integer>("android.sensor.orientation", int.class); 1719 1720 /** 1721 * <p>Noise model coefficients for each CFA mosaic channel.</p> 1722 * <p>This tag contains two noise model coefficients for each CFA channel 1723 * corresponding to the sensor amplification (S) and sensor readout 1724 * noise (O). These are given as pairs of coefficients for each channel 1725 * in the same order as channels listed for the CFA layout tag 1726 * (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}). This is 1727 * represented as an array of Pair<Double, Double>, where 1728 * the first member of the Pair at index n is the S coefficient and the 1729 * second member is the O coefficient for the nth color channel in the CFA.</p> 1730 * <p>These coefficients are used in a two parameter noise model to describe 1731 * the amount of noise present in the image for each CFA channel. The 1732 * noise model used here is:</p> 1733 * <p>N(x) = sqrt(Sx + O)</p> 1734 * <p>Where x represents the recorded signal of a CFA channel normalized to 1735 * the range [0, 1], and S and O are the noise model coeffiecients for 1736 * that channel.</p> 1737 * <p>A more detailed description of the noise model can be found in the 1738 * Adobe DNG specification for the NoiseProfile tag.</p> 1739 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1740 * 1741 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT 1742 */ 1743 public static final Key<android.util.Pair<Double,Double>[]> SENSOR_NOISE_PROFILE = 1744 new Key<android.util.Pair<Double,Double>[]>("android.sensor.noiseProfile", new TypeReference<android.util.Pair<Double,Double>[]>() {{ }}); 1745 1746 /** 1747 * <p>Lists the supported sensor test pattern modes for {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}.</p> 1748 * <p>Optional. Defaults to [OFF].</p> 1749 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1750 * 1751 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 1752 */ 1753 public static final Key<int[]> SENSOR_AVAILABLE_TEST_PATTERN_MODES = 1754 new Key<int[]>("android.sensor.availableTestPatternModes", int[].class); 1755 1756 /** 1757 * <p>The face detection modes that are available 1758 * for this camera device.</p> 1759 * <p>OFF is always supported.</p> 1760 * <p>SIMPLE means the device supports the 1761 * android.statistics.faceRectangles and 1762 * android.statistics.faceScores outputs.</p> 1763 * <p>FULL means the device additionally supports the 1764 * android.statistics.faceIds and 1765 * android.statistics.faceLandmarks outputs.</p> 1766 */ 1767 public static final Key<int[]> STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES = 1768 new Key<int[]>("android.statistics.info.availableFaceDetectModes", int[].class); 1769 1770 /** 1771 * <p>The maximum number of simultaneously detectable 1772 * faces.</p> 1773 */ 1774 public static final Key<Integer> STATISTICS_INFO_MAX_FACE_COUNT = 1775 new Key<Integer>("android.statistics.info.maxFaceCount", int.class); 1776 1777 /** 1778 * <p>The set of hot pixel map output modes supported by this camera device.</p> 1779 * <p>This tag lists valid output modes for {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode}.</p> 1780 * <p>If no hotpixel map is available for this camera device, this will contain 1781 * only OFF. If the hotpixel map is available, this will include both 1782 * the ON and OFF options.</p> 1783 * 1784 * @see CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE 1785 */ 1786 public static final Key<boolean[]> STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES = 1787 new Key<boolean[]>("android.statistics.info.availableHotPixelMapModes", boolean[].class); 1788 1789 /** 1790 * <p>Maximum number of supported points in the 1791 * tonemap curve that can be used for {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p> 1792 * <p>If the actual number of points provided by the application (in 1793 * {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}*) is less than max, the camera device will 1794 * resample the curve to its internal representation, using linear 1795 * interpolation.</p> 1796 * <p>The output curves in the result metadata may have a different number 1797 * of points than the input curves, and will represent the actual 1798 * hardware curves used as closely as possible when linearly interpolated.</p> 1799 * 1800 * @see CaptureRequest#TONEMAP_CURVE 1801 */ 1802 public static final Key<Integer> TONEMAP_MAX_CURVE_POINTS = 1803 new Key<Integer>("android.tonemap.maxCurvePoints", int.class); 1804 1805 /** 1806 * <p>The set of tonemapping modes supported by this camera device.</p> 1807 * <p>This tag lists the valid modes for {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}.</p> 1808 * <p>Full-capability camera devices must always support CONTRAST_CURVE and 1809 * FAST.</p> 1810 * 1811 * @see CaptureRequest#TONEMAP_MODE 1812 */ 1813 public static final Key<int[]> TONEMAP_AVAILABLE_TONE_MAP_MODES = 1814 new Key<int[]>("android.tonemap.availableToneMapModes", int[].class); 1815 1816 /** 1817 * <p>A list of camera LEDs that are available on this system.</p> 1818 * @see #LED_AVAILABLE_LEDS_TRANSMIT 1819 * @hide 1820 */ 1821 public static final Key<int[]> LED_AVAILABLE_LEDS = 1822 new Key<int[]>("android.led.availableLeds", int[].class); 1823 1824 /** 1825 * <p>Generally classifies the overall set of the camera device functionality.</p> 1826 * <p>Camera devices will come in two flavors: LIMITED and FULL.</p> 1827 * <p>A FULL device has the most support possible and will support below capabilities:</p> 1828 * <ul> 1829 * <li>30fps at maximum resolution (== sensor resolution) is preferred, more than 20fps is required.</li> 1830 * <li>Per frame control ({@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} <code>==</code> PER_FRAME_CONTROL)</li> 1831 * <li>Manual sensor control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains MANUAL_SENSOR)</li> 1832 * <li>Manual post-processing control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains MANUAL_POST_PROCESSING)</li> 1833 * <li>Arbitrary cropping region ({@link CameraCharacteristics#SCALER_CROPPING_TYPE android.scaler.croppingType} <code>==</code> FREEFORM)</li> 1834 * <li>At least 3 processed (but not stalling) format output streams ({@link CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_PROC android.request.maxNumOutputProc} <code>>=</code> 3)</li> 1835 * <li>The required stream configuration defined in android.scaler.availableStreamConfigurations</li> 1836 * <li>The required exposure time range defined in {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li> 1837 * <li>The required maxFrameDuration defined in {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li> 1838 * </ul> 1839 * <p>A LIMITED device may have some or none of the above characteristics. 1840 * To find out more refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p> 1841 * <p>A LEGACY device does not support per-frame control, manual sensor control, manual 1842 * post-processing, arbitrary cropping regions, and has relaxed performance constraints.</p> 1843 * 1844 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1845 * @see CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_PROC 1846 * @see CameraCharacteristics#SCALER_CROPPING_TYPE 1847 * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE 1848 * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION 1849 * @see CameraCharacteristics#SYNC_MAX_LATENCY 1850 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED 1851 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_FULL 1852 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY 1853 */ 1854 public static final Key<Integer> INFO_SUPPORTED_HARDWARE_LEVEL = 1855 new Key<Integer>("android.info.supportedHardwareLevel", int.class); 1856 1857 /** 1858 * <p>The maximum number of frames that can occur after a request 1859 * (different than the previous) has been submitted, and before the 1860 * result's state becomes synchronized (by setting 1861 * android.sync.frameNumber to a non-negative value).</p> 1862 * <p>This defines the maximum distance (in number of metadata results), 1863 * between android.sync.frameNumber and the equivalent 1864 * android.request.frameCount.</p> 1865 * <p>In other words this acts as an upper boundary for how many frames 1866 * must occur before the camera device knows for a fact that the new 1867 * submitted camera settings have been applied in outgoing frames.</p> 1868 * <p>For example if the distance was 2,</p> 1869 * <pre><code>initial request = X (repeating) 1870 * request1 = X 1871 * request2 = Y 1872 * request3 = Y 1873 * request4 = Y 1874 * 1875 * where requestN has frameNumber N, and the first of the repeating 1876 * initial request's has frameNumber F (and F < 1). 1877 * 1878 * initial result = X' + { android.sync.frameNumber == F } 1879 * result1 = X' + { android.sync.frameNumber == F } 1880 * result2 = X' + { android.sync.frameNumber == CONVERGING } 1881 * result3 = X' + { android.sync.frameNumber == CONVERGING } 1882 * result4 = X' + { android.sync.frameNumber == 2 } 1883 * 1884 * where resultN has frameNumber N. 1885 * </code></pre> 1886 * <p>Since <code>result4</code> has a <code>frameNumber == 4</code> and 1887 * <code>android.sync.frameNumber == 2</code>, the distance is clearly 1888 * <code>4 - 2 = 2</code>.</p> 1889 * @see #SYNC_MAX_LATENCY_PER_FRAME_CONTROL 1890 * @see #SYNC_MAX_LATENCY_UNKNOWN 1891 */ 1892 public static final Key<Integer> SYNC_MAX_LATENCY = 1893 new Key<Integer>("android.sync.maxLatency", int.class); 1894 1895 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 1896 * End generated code 1897 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/ 1898} 1899