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