CameraCharacteristics.java revision 3c1ff68d699be7157af0ea43adac27ad46bb6e56
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.annotation.NonNull; 20import android.annotation.Nullable; 21import android.hardware.camera2.impl.CameraMetadataNative; 22import android.hardware.camera2.impl.PublicKey; 23import android.hardware.camera2.impl.SyntheticKey; 24import android.hardware.camera2.utils.TypeReference; 25import android.util.Rational; 26 27import java.util.Collections; 28import java.util.List; 29 30/** 31 * <p>The properties describing a 32 * {@link CameraDevice CameraDevice}.</p> 33 * 34 * <p>These properties are fixed for a given CameraDevice, and can be queried 35 * through the {@link CameraManager CameraManager} 36 * interface with {@link CameraManager#getCameraCharacteristics}.</p> 37 * 38 * <p>{@link CameraCharacteristics} objects are immutable.</p> 39 * 40 * @see CameraDevice 41 * @see CameraManager 42 */ 43public final class CameraCharacteristics extends CameraMetadata<CameraCharacteristics.Key<?>> { 44 45 /** 46 * A {@code Key} is used to do camera characteristics field lookups with 47 * {@link CameraCharacteristics#get}. 48 * 49 * <p>For example, to get the stream configuration map: 50 * <code><pre> 51 * StreamConfigurationMap map = cameraCharacteristics.get( 52 * CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP); 53 * </pre></code> 54 * </p> 55 * 56 * <p>To enumerate over all possible keys for {@link CameraCharacteristics}, see 57 * {@link CameraCharacteristics#getKeys()}.</p> 58 * 59 * @see CameraCharacteristics#get 60 * @see CameraCharacteristics#getKeys() 61 */ 62 public static final class Key<T> { 63 private final CameraMetadataNative.Key<T> mKey; 64 65 /** 66 * Visible for testing and vendor extensions only. 67 * 68 * @hide 69 */ 70 public Key(String name, Class<T> type) { 71 mKey = new CameraMetadataNative.Key<T>(name, type); 72 } 73 74 /** 75 * Visible for testing and vendor extensions only. 76 * 77 * @hide 78 */ 79 public Key(String name, TypeReference<T> typeReference) { 80 mKey = new CameraMetadataNative.Key<T>(name, typeReference); 81 } 82 83 /** 84 * Return a camelCase, period separated name formatted like: 85 * {@code "root.section[.subsections].name"}. 86 * 87 * <p>Built-in keys exposed by the Android SDK are always prefixed with {@code "android."}; 88 * keys that are device/platform-specific are prefixed with {@code "com."}.</p> 89 * 90 * <p>For example, {@code CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP} would 91 * have a name of {@code "android.scaler.streamConfigurationMap"}; whereas a device 92 * specific key might look like {@code "com.google.nexus.data.private"}.</p> 93 * 94 * @return String representation of the key name 95 */ 96 @NonNull 97 public String getName() { 98 return mKey.getName(); 99 } 100 101 /** 102 * {@inheritDoc} 103 */ 104 @Override 105 public final int hashCode() { 106 return mKey.hashCode(); 107 } 108 109 /** 110 * {@inheritDoc} 111 */ 112 @SuppressWarnings("unchecked") 113 @Override 114 public final boolean equals(Object o) { 115 return o instanceof Key && ((Key<T>)o).mKey.equals(mKey); 116 } 117 118 /** 119 * Visible for CameraMetadataNative implementation only; do not use. 120 * 121 * TODO: Make this private or remove it altogether. 122 * 123 * @hide 124 */ 125 public CameraMetadataNative.Key<T> getNativeKey() { 126 return mKey; 127 } 128 129 @SuppressWarnings({ 130 "unused", "unchecked" 131 }) 132 private Key(CameraMetadataNative.Key<?> nativeKey) { 133 mKey = (CameraMetadataNative.Key<T>) nativeKey; 134 } 135 } 136 137 private final CameraMetadataNative mProperties; 138 private List<CameraCharacteristics.Key<?>> mKeys; 139 private List<CaptureRequest.Key<?>> mAvailableRequestKeys; 140 private List<CaptureResult.Key<?>> mAvailableResultKeys; 141 142 /** 143 * Takes ownership of the passed-in properties object 144 * @hide 145 */ 146 public CameraCharacteristics(CameraMetadataNative properties) { 147 mProperties = CameraMetadataNative.move(properties); 148 } 149 150 /** 151 * Returns a copy of the underlying {@link CameraMetadataNative}. 152 * @hide 153 */ 154 public CameraMetadataNative getNativeCopy() { 155 return new CameraMetadataNative(mProperties); 156 } 157 158 /** 159 * Get a camera characteristics field value. 160 * 161 * <p>The field definitions can be 162 * found in {@link CameraCharacteristics}.</p> 163 * 164 * <p>Querying the value for the same key more than once will return a value 165 * which is equal to the previous queried value.</p> 166 * 167 * @throws IllegalArgumentException if the key was not valid 168 * 169 * @param key The characteristics field to read. 170 * @return The value of that key, or {@code null} if the field is not set. 171 */ 172 @Nullable 173 public <T> T get(Key<T> key) { 174 return mProperties.get(key); 175 } 176 177 /** 178 * {@inheritDoc} 179 * @hide 180 */ 181 @SuppressWarnings("unchecked") 182 @Override 183 protected <T> T getProtected(Key<?> key) { 184 return (T) mProperties.get(key); 185 } 186 187 /** 188 * {@inheritDoc} 189 * @hide 190 */ 191 @SuppressWarnings("unchecked") 192 @Override 193 protected Class<Key<?>> getKeyClass() { 194 Object thisClass = Key.class; 195 return (Class<Key<?>>)thisClass; 196 } 197 198 /** 199 * {@inheritDoc} 200 */ 201 @NonNull 202 @Override 203 public List<Key<?>> getKeys() { 204 // List of keys is immutable; cache the results after we calculate them 205 if (mKeys != null) { 206 return mKeys; 207 } 208 209 int[] filterTags = get(REQUEST_AVAILABLE_CHARACTERISTICS_KEYS); 210 if (filterTags == null) { 211 throw new AssertionError("android.request.availableCharacteristicsKeys must be non-null" 212 + " in the characteristics"); 213 } 214 215 mKeys = Collections.unmodifiableList( 216 getKeysStatic(getClass(), getKeyClass(), this, filterTags)); 217 return mKeys; 218 } 219 220 /** 221 * Returns the list of keys supported by this {@link CameraDevice} for querying 222 * with a {@link CaptureRequest}. 223 * 224 * <p>The list returned is not modifiable, so any attempts to modify it will throw 225 * a {@code UnsupportedOperationException}.</p> 226 * 227 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> 228 * 229 * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use 230 * {@link #getKeys()} instead.</p> 231 * 232 * @return List of keys supported by this CameraDevice for CaptureRequests. 233 */ 234 @SuppressWarnings({"unchecked"}) 235 @NonNull 236 public List<CaptureRequest.Key<?>> getAvailableCaptureRequestKeys() { 237 if (mAvailableRequestKeys == null) { 238 Object crKey = CaptureRequest.Key.class; 239 Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey; 240 241 int[] filterTags = get(REQUEST_AVAILABLE_REQUEST_KEYS); 242 if (filterTags == null) { 243 throw new AssertionError("android.request.availableRequestKeys must be non-null " 244 + "in the characteristics"); 245 } 246 mAvailableRequestKeys = 247 getAvailableKeyList(CaptureRequest.class, crKeyTyped, filterTags); 248 } 249 return mAvailableRequestKeys; 250 } 251 252 /** 253 * Returns the list of keys supported by this {@link CameraDevice} for querying 254 * with a {@link CaptureResult}. 255 * 256 * <p>The list returned is not modifiable, so any attempts to modify it will throw 257 * a {@code UnsupportedOperationException}.</p> 258 * 259 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> 260 * 261 * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use 262 * {@link #getKeys()} instead.</p> 263 * 264 * @return List of keys supported by this CameraDevice for CaptureResults. 265 */ 266 @SuppressWarnings({"unchecked"}) 267 @NonNull 268 public List<CaptureResult.Key<?>> getAvailableCaptureResultKeys() { 269 if (mAvailableResultKeys == null) { 270 Object crKey = CaptureResult.Key.class; 271 Class<CaptureResult.Key<?>> crKeyTyped = (Class<CaptureResult.Key<?>>)crKey; 272 273 int[] filterTags = get(REQUEST_AVAILABLE_RESULT_KEYS); 274 if (filterTags == null) { 275 throw new AssertionError("android.request.availableResultKeys must be non-null " 276 + "in the characteristics"); 277 } 278 mAvailableResultKeys = getAvailableKeyList(CaptureResult.class, crKeyTyped, filterTags); 279 } 280 return mAvailableResultKeys; 281 } 282 283 /** 284 * Returns the list of keys supported by this {@link CameraDevice} by metadataClass. 285 * 286 * <p>The list returned is not modifiable, so any attempts to modify it will throw 287 * a {@code UnsupportedOperationException}.</p> 288 * 289 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> 290 * 291 * @param metadataClass The subclass of CameraMetadata that you want to get the keys for. 292 * @param keyClass The class of the metadata key, e.g. CaptureRequest.Key.class 293 * 294 * @return List of keys supported by this CameraDevice for metadataClass. 295 * 296 * @throws IllegalArgumentException if metadataClass is not a subclass of CameraMetadata 297 */ 298 private <TKey> List<TKey> 299 getAvailableKeyList(Class<?> metadataClass, Class<TKey> keyClass, int[] filterTags) { 300 301 if (metadataClass.equals(CameraMetadata.class)) { 302 throw new AssertionError( 303 "metadataClass must be a strict subclass of CameraMetadata"); 304 } else if (!CameraMetadata.class.isAssignableFrom(metadataClass)) { 305 throw new AssertionError( 306 "metadataClass must be a subclass of CameraMetadata"); 307 } 308 309 List<TKey> staticKeyList = CameraCharacteristics.<TKey>getKeysStatic( 310 metadataClass, keyClass, /*instance*/null, filterTags); 311 return Collections.unmodifiableList(staticKeyList); 312 } 313 314 /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 315 * The key entries below this point are generated from metadata 316 * definitions in /system/media/camera/docs. Do not modify by hand or 317 * modify the comment blocks at the start or end. 318 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/ 319 320 /** 321 * <p>List of aberration correction modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode} that are 322 * supported by this camera device.</p> 323 * <p>This key lists the valid modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}. If no 324 * aberration correction modes are available for a device, this list will solely include 325 * OFF mode. All camera devices will support either OFF or FAST mode.</p> 326 * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always list 327 * OFF mode. This includes all FULL level devices.</p> 328 * <p>LEGACY devices will always only support FAST mode.</p> 329 * <p><b>Range of valid values:</b><br> 330 * Any value listed in {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}</p> 331 * <p>This key is available on all devices.</p> 332 * 333 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE 334 */ 335 @PublicKey 336 public static final Key<int[]> COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES = 337 new Key<int[]>("android.colorCorrection.availableAberrationModes", int[].class); 338 339 /** 340 * <p>List of auto-exposure antibanding modes for {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} that are 341 * supported by this camera device.</p> 342 * <p>Not all of the auto-exposure anti-banding modes may be 343 * supported by a given camera device. This field lists the 344 * valid anti-banding modes that the application may request 345 * for this camera device with the 346 * {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} control.</p> 347 * <p><b>Range of valid values:</b><br> 348 * Any value listed in {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode}</p> 349 * <p>This key is available on all devices.</p> 350 * 351 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 352 */ 353 @PublicKey 354 public static final Key<int[]> CONTROL_AE_AVAILABLE_ANTIBANDING_MODES = 355 new Key<int[]>("android.control.aeAvailableAntibandingModes", int[].class); 356 357 /** 358 * <p>List of auto-exposure modes for {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} that are supported by this camera 359 * device.</p> 360 * <p>Not all the auto-exposure modes may be supported by a 361 * given camera device, especially if no flash unit is 362 * available. This entry lists the valid modes for 363 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} for this camera device.</p> 364 * <p>All camera devices support ON, and all camera devices with flash 365 * units support ON_AUTO_FLASH and ON_ALWAYS_FLASH.</p> 366 * <p>FULL mode camera devices always support OFF mode, 367 * which enables application control of camera exposure time, 368 * sensitivity, and frame duration.</p> 369 * <p>LEGACY mode camera devices never support OFF mode. 370 * LIMITED mode devices support OFF if they support the MANUAL_SENSOR 371 * capability.</p> 372 * <p><b>Range of valid values:</b><br> 373 * Any value listed in {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}</p> 374 * <p>This key is available on all devices.</p> 375 * 376 * @see CaptureRequest#CONTROL_AE_MODE 377 */ 378 @PublicKey 379 public static final Key<int[]> CONTROL_AE_AVAILABLE_MODES = 380 new Key<int[]>("android.control.aeAvailableModes", int[].class); 381 382 /** 383 * <p>List of frame rate ranges for {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} supported by 384 * this camera device.</p> 385 * <p>For devices at the LEGACY level or above:</p> 386 * <ul> 387 * <li>This list will always include (30, 30).</li> 388 * <li>Also, for constant-framerate recording, for each normal 389 * {@link android.media.CamcorderProfile CamcorderProfile} that has 390 * {@link android.media.CamcorderProfile#quality quality} in 391 * the range [{@link android.media.CamcorderProfile#QUALITY_LOW QUALITY_LOW}, 392 * {@link android.media.CamcorderProfile#QUALITY_2160P QUALITY_2160P}], if the profile is 393 * supported by the device and has 394 * {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} <code>x</code>, this list will 395 * always include (<code>x</code>,<code>x</code>).</li> 396 * <li>For preview streaming use case, this list will always include (<code>min</code>, <code>max</code>) where 397 * <code>min</code> <= 15 and <code>max</code> >= 30.</li> 398 * </ul> 399 * <p>For devices at the LIMITED level or above:</p> 400 * <ul> 401 * <li>For YUV_420_888 burst capture use case, this list will always include (<code>min</code>, <code>max</code>) 402 * and (<code>max</code>, <code>max</code>) where <code>min</code> <= 15 and <code>max</code> = the maximum output frame rate of the 403 * maximum YUV_420_888 output size.</li> 404 * </ul> 405 * <p><b>Units</b>: Frames per second (FPS)</p> 406 * <p>This key is available on all devices.</p> 407 * 408 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE 409 */ 410 @PublicKey 411 public static final Key<android.util.Range<Integer>[]> CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES = 412 new Key<android.util.Range<Integer>[]>("android.control.aeAvailableTargetFpsRanges", new TypeReference<android.util.Range<Integer>[]>() {{ }}); 413 414 /** 415 * <p>Maximum and minimum exposure compensation values for 416 * {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}, in counts of {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep}, 417 * that are supported by this camera device.</p> 418 * <p><b>Range of valid values:</b><br></p> 419 * <p>Range [0,0] indicates that exposure compensation is not supported.</p> 420 * <p>For LIMITED and FULL devices, range must follow below requirements if exposure 421 * compensation is supported (<code>range != [0, 0]</code>):</p> 422 * <p><code>Min.exposure compensation * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} <= -2 EV</code></p> 423 * <p><code>Max.exposure compensation * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} >= 2 EV</code></p> 424 * <p>LEGACY devices may support a smaller range than this.</p> 425 * <p>This key is available on all devices.</p> 426 * 427 * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP 428 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION 429 */ 430 @PublicKey 431 public static final Key<android.util.Range<Integer>> CONTROL_AE_COMPENSATION_RANGE = 432 new Key<android.util.Range<Integer>>("android.control.aeCompensationRange", new TypeReference<android.util.Range<Integer>>() {{ }}); 433 434 /** 435 * <p>Smallest step by which the exposure compensation 436 * can be changed.</p> 437 * <p>This is the unit for {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}. For example, if this key has 438 * a value of <code>1/2</code>, then a setting of <code>-2</code> for {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation} means 439 * that the target EV offset for the auto-exposure routine is -1 EV.</p> 440 * <p>One unit of EV compensation changes the brightness of the captured image by a factor 441 * of two. +1 EV doubles the image brightness, while -1 EV halves the image brightness.</p> 442 * <p><b>Units</b>: Exposure Value (EV)</p> 443 * <p>This key is available on all devices.</p> 444 * 445 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION 446 */ 447 @PublicKey 448 public static final Key<Rational> CONTROL_AE_COMPENSATION_STEP = 449 new Key<Rational>("android.control.aeCompensationStep", Rational.class); 450 451 /** 452 * <p>List of auto-focus (AF) modes for {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} that are 453 * supported by this camera device.</p> 454 * <p>Not all the auto-focus modes may be supported by a 455 * given camera device. This entry lists the valid modes for 456 * {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} for this camera device.</p> 457 * <p>All LIMITED and FULL mode camera devices will support OFF mode, and all 458 * camera devices with adjustable focuser units 459 * (<code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} > 0</code>) will support AUTO mode.</p> 460 * <p>LEGACY devices will support OFF mode only if they support 461 * focusing to infinity (by also setting {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} to 462 * <code>0.0f</code>).</p> 463 * <p><b>Range of valid values:</b><br> 464 * Any value listed in {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}</p> 465 * <p>This key is available on all devices.</p> 466 * 467 * @see CaptureRequest#CONTROL_AF_MODE 468 * @see CaptureRequest#LENS_FOCUS_DISTANCE 469 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 470 */ 471 @PublicKey 472 public static final Key<int[]> CONTROL_AF_AVAILABLE_MODES = 473 new Key<int[]>("android.control.afAvailableModes", int[].class); 474 475 /** 476 * <p>List of color effects for {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode} that are supported by this camera 477 * device.</p> 478 * <p>This list contains the color effect modes that can be applied to 479 * images produced by the camera device. 480 * Implementations are not expected to be consistent across all devices. 481 * If no color effect modes are available for a device, this will only list 482 * OFF.</p> 483 * <p>A color effect will only be applied if 484 * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF. OFF is always included in this list.</p> 485 * <p>This control has no effect on the operation of other control routines such 486 * as auto-exposure, white balance, or focus.</p> 487 * <p><b>Range of valid values:</b><br> 488 * Any value listed in {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</p> 489 * <p>This key is available on all devices.</p> 490 * 491 * @see CaptureRequest#CONTROL_EFFECT_MODE 492 * @see CaptureRequest#CONTROL_MODE 493 */ 494 @PublicKey 495 public static final Key<int[]> CONTROL_AVAILABLE_EFFECTS = 496 new Key<int[]>("android.control.availableEffects", int[].class); 497 498 /** 499 * <p>List of scene modes for {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} that are supported by this camera 500 * device.</p> 501 * <p>This list contains scene modes that can be set for the camera device. 502 * Only scene modes that have been fully implemented for the 503 * camera device may be included here. Implementations are not expected 504 * to be consistent across all devices.</p> 505 * <p>If no scene modes are supported by the camera device, this 506 * will be set to DISABLED. Otherwise DISABLED will not be listed.</p> 507 * <p>FACE_PRIORITY is always listed if face detection is 508 * supported (i.e.<code>{@link CameraCharacteristics#STATISTICS_INFO_MAX_FACE_COUNT android.statistics.info.maxFaceCount} > 509 * 0</code>).</p> 510 * <p><b>Range of valid values:</b><br> 511 * Any value listed in {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode}</p> 512 * <p>This key is available on all devices.</p> 513 * 514 * @see CaptureRequest#CONTROL_SCENE_MODE 515 * @see CameraCharacteristics#STATISTICS_INFO_MAX_FACE_COUNT 516 */ 517 @PublicKey 518 public static final Key<int[]> CONTROL_AVAILABLE_SCENE_MODES = 519 new Key<int[]>("android.control.availableSceneModes", int[].class); 520 521 /** 522 * <p>List of video stabilization modes for {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode} 523 * that are supported by this camera device.</p> 524 * <p>OFF will always be listed.</p> 525 * <p><b>Range of valid values:</b><br> 526 * Any value listed in {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}</p> 527 * <p>This key is available on all devices.</p> 528 * 529 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE 530 */ 531 @PublicKey 532 public static final Key<int[]> CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES = 533 new Key<int[]>("android.control.availableVideoStabilizationModes", int[].class); 534 535 /** 536 * <p>List of auto-white-balance modes for {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} that are supported by this 537 * camera device.</p> 538 * <p>Not all the auto-white-balance modes may be supported by a 539 * given camera device. This entry lists the valid modes for 540 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} for this camera device.</p> 541 * <p>All camera devices will support ON mode.</p> 542 * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always support OFF 543 * mode, which enables application control of white balance, by using 544 * {@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). This includes all FULL 545 * mode camera devices.</p> 546 * <p><b>Range of valid values:</b><br> 547 * Any value listed in {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}</p> 548 * <p>This key is available on all devices.</p> 549 * 550 * @see CaptureRequest#COLOR_CORRECTION_GAINS 551 * @see CaptureRequest#COLOR_CORRECTION_MODE 552 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 553 * @see CaptureRequest#CONTROL_AWB_MODE 554 */ 555 @PublicKey 556 public static final Key<int[]> CONTROL_AWB_AVAILABLE_MODES = 557 new Key<int[]>("android.control.awbAvailableModes", int[].class); 558 559 /** 560 * <p>List of the maximum number of regions that can be used for metering in 561 * auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF); 562 * this corresponds to the the maximum number of elements in 563 * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}, {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}, 564 * and {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p> 565 * <p><b>Range of valid values:</b><br></p> 566 * <p>Value must be >= 0 for each element. For full-capability devices 567 * this value must be >= 1 for AE and AF. The order of the elements is: 568 * <code>(AE, AWB, AF)</code>.</p> 569 * <p>This key is available on all devices.</p> 570 * 571 * @see CaptureRequest#CONTROL_AE_REGIONS 572 * @see CaptureRequest#CONTROL_AF_REGIONS 573 * @see CaptureRequest#CONTROL_AWB_REGIONS 574 * @hide 575 */ 576 public static final Key<int[]> CONTROL_MAX_REGIONS = 577 new Key<int[]>("android.control.maxRegions", int[].class); 578 579 /** 580 * <p>The maximum number of metering regions that can be used by the auto-exposure (AE) 581 * routine.</p> 582 * <p>This corresponds to the the maximum allowed number of elements in 583 * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}.</p> 584 * <p><b>Range of valid values:</b><br> 585 * Value will be >= 0. For FULL-capability devices, this 586 * value will be >= 1.</p> 587 * <p>This key is available on all devices.</p> 588 * 589 * @see CaptureRequest#CONTROL_AE_REGIONS 590 */ 591 @PublicKey 592 @SyntheticKey 593 public static final Key<Integer> CONTROL_MAX_REGIONS_AE = 594 new Key<Integer>("android.control.maxRegionsAe", int.class); 595 596 /** 597 * <p>The maximum number of metering regions that can be used by the auto-white balance (AWB) 598 * routine.</p> 599 * <p>This corresponds to the the maximum allowed number of elements in 600 * {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}.</p> 601 * <p><b>Range of valid values:</b><br> 602 * Value will be >= 0.</p> 603 * <p>This key is available on all devices.</p> 604 * 605 * @see CaptureRequest#CONTROL_AWB_REGIONS 606 */ 607 @PublicKey 608 @SyntheticKey 609 public static final Key<Integer> CONTROL_MAX_REGIONS_AWB = 610 new Key<Integer>("android.control.maxRegionsAwb", int.class); 611 612 /** 613 * <p>The maximum number of metering regions that can be used by the auto-focus (AF) routine.</p> 614 * <p>This corresponds to the the maximum allowed number of elements in 615 * {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p> 616 * <p><b>Range of valid values:</b><br> 617 * Value will be >= 0. For FULL-capability devices, this 618 * value will be >= 1.</p> 619 * <p>This key is available on all devices.</p> 620 * 621 * @see CaptureRequest#CONTROL_AF_REGIONS 622 */ 623 @PublicKey 624 @SyntheticKey 625 public static final Key<Integer> CONTROL_MAX_REGIONS_AF = 626 new Key<Integer>("android.control.maxRegionsAf", int.class); 627 628 /** 629 * <p>List of available high speed video size, fps range and max batch size configurations 630 * supported by the camera device, in the format of (width, height, fps_min, fps_max, batch_size_max).</p> 631 * <p>When CONSTRAINED_HIGH_SPEED_VIDEO is supported in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}, 632 * this metadata will list the supported high speed video size, fps range and max batch size 633 * configurations. All the sizes listed in this configuration will be a subset of the sizes 634 * reported by {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } 635 * for processed non-stalling formats.</p> 636 * <p>For the high speed video use case, the application must 637 * select the video size and fps range from this metadata to configure the recording and 638 * preview streams and setup the recording requests. For example, if the application intends 639 * to do high speed recording, it can select the maximum size reported by this metadata to 640 * configure output streams. Once the size is selected, application can filter this metadata 641 * by selected size and get the supported fps ranges, and use these fps ranges to setup the 642 * recording requests. Note that for the use case of multiple output streams, application 643 * must select one unique size from this metadata to use (e.g., preview and recording streams 644 * must have the same size). Otherwise, the high speed capture session creation will fail.</p> 645 * <p>The min and max fps will be multiple times of 30fps.</p> 646 * <p>High speed video streaming extends significant performance pressue to camera hardware, 647 * to achieve efficient high speed streaming, the camera device may have to aggregate 648 * multiple frames together and send to camera device for processing where the request 649 * controls are same for all the frames in this batch. Max batch size indicates 650 * the max possible number of frames the camera device will group together for this high 651 * speed stream configuration. This max batch size will be used to generate a high speed 652 * recording request list by 653 * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedRequestList }. 654 * The max batch size for each configuration will satisfy below conditions:</p> 655 * <ul> 656 * <li>Each max batch size will be a divisor of its corresponding fps_max / 30. For example, 657 * if max_fps is 300, max batch size will only be 1, 2, 5, or 10.</li> 658 * <li>The camera device may choose smaller internal batch size for each configuration, but 659 * the actual batch size will be a divisor of max batch size. For example, if the max batch 660 * size is 8, the actual batch size used by camera device will only be 1, 2, 4, or 8.</li> 661 * <li>The max batch size in each configuration entry must be no larger than 32.</li> 662 * </ul> 663 * <p>The camera device doesn't have to support batch mode to achieve high speed video recording, 664 * in such case, batch_size_max will be reported as 1 in each configuration entry.</p> 665 * <p>This fps ranges in this configuration list can only be used to create requests 666 * that are submitted to a high speed camera capture session created by 667 * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }. 668 * The fps ranges reported in this metadata must not be used to setup capture requests for 669 * normal capture session, or it will cause request error.</p> 670 * <p><b>Range of valid values:</b><br></p> 671 * <p>For each configuration, the fps_max >= 120fps.</p> 672 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 673 * <p><b>Limited capability</b> - 674 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 675 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 676 * 677 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 678 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 679 * @hide 680 */ 681 public static final Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]> CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS = 682 new Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]>("android.control.availableHighSpeedVideoConfigurations", android.hardware.camera2.params.HighSpeedVideoConfiguration[].class); 683 684 /** 685 * <p>Whether the camera device supports {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</p> 686 * <p>Devices with MANUAL_SENSOR capability or BURST_CAPTURE capability will always 687 * list <code>true</code>. This includes FULL devices.</p> 688 * <p>This key is available on all devices.</p> 689 * 690 * @see CaptureRequest#CONTROL_AE_LOCK 691 */ 692 @PublicKey 693 public static final Key<Boolean> CONTROL_AE_LOCK_AVAILABLE = 694 new Key<Boolean>("android.control.aeLockAvailable", boolean.class); 695 696 /** 697 * <p>Whether the camera device supports {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</p> 698 * <p>Devices with MANUAL_POST_PROCESSING capability or BURST_CAPTURE capability will 699 * always list <code>true</code>. This includes FULL devices.</p> 700 * <p>This key is available on all devices.</p> 701 * 702 * @see CaptureRequest#CONTROL_AWB_LOCK 703 */ 704 @PublicKey 705 public static final Key<Boolean> CONTROL_AWB_LOCK_AVAILABLE = 706 new Key<Boolean>("android.control.awbLockAvailable", boolean.class); 707 708 /** 709 * <p>List of control modes for {@link CaptureRequest#CONTROL_MODE android.control.mode} that are supported by this camera 710 * device.</p> 711 * <p>This list contains control modes that can be set for the camera device. 712 * LEGACY mode devices will always support AUTO mode. LIMITED and FULL 713 * devices will always support OFF, AUTO modes.</p> 714 * <p><b>Range of valid values:</b><br> 715 * Any value listed in {@link CaptureRequest#CONTROL_MODE android.control.mode}</p> 716 * <p>This key is available on all devices.</p> 717 * 718 * @see CaptureRequest#CONTROL_MODE 719 */ 720 @PublicKey 721 public static final Key<int[]> CONTROL_AVAILABLE_MODES = 722 new Key<int[]>("android.control.availableModes", int[].class); 723 724 /** 725 * <p>List of edge enhancement modes for {@link CaptureRequest#EDGE_MODE android.edge.mode} that are supported by this camera 726 * device.</p> 727 * <p>Full-capability camera devices must always support OFF; all devices will list FAST.</p> 728 * <p><b>Range of valid values:</b><br> 729 * Any value listed in {@link CaptureRequest#EDGE_MODE android.edge.mode}</p> 730 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 731 * <p><b>Full capability</b> - 732 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 733 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 734 * 735 * @see CaptureRequest#EDGE_MODE 736 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 737 */ 738 @PublicKey 739 public static final Key<int[]> EDGE_AVAILABLE_EDGE_MODES = 740 new Key<int[]>("android.edge.availableEdgeModes", int[].class); 741 742 /** 743 * <p>Whether this camera device has a 744 * flash unit.</p> 745 * <p>Will be <code>false</code> if no flash is available.</p> 746 * <p>If there is no flash unit, none of the flash controls do 747 * anything. 748 * This key is available on all devices.</p> 749 */ 750 @PublicKey 751 public static final Key<Boolean> FLASH_INFO_AVAILABLE = 752 new Key<Boolean>("android.flash.info.available", boolean.class); 753 754 /** 755 * <p>List of hot pixel correction modes for {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode} that are supported by this 756 * camera device.</p> 757 * <p>FULL mode camera devices will always support FAST.</p> 758 * <p><b>Range of valid values:</b><br> 759 * Any value listed in {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode}</p> 760 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 761 * 762 * @see CaptureRequest#HOT_PIXEL_MODE 763 */ 764 @PublicKey 765 public static final Key<int[]> HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES = 766 new Key<int[]>("android.hotPixel.availableHotPixelModes", int[].class); 767 768 /** 769 * <p>List of JPEG thumbnail sizes for {@link CaptureRequest#JPEG_THUMBNAIL_SIZE android.jpeg.thumbnailSize} supported by this 770 * camera device.</p> 771 * <p>This list will include at least one non-zero resolution, plus <code>(0,0)</code> for indicating no 772 * thumbnail should be generated.</p> 773 * <p>Below condiditions will be satisfied for this size list:</p> 774 * <ul> 775 * <li>The sizes will be sorted by increasing pixel area (width x height). 776 * If several resolutions have the same area, they will be sorted by increasing width.</li> 777 * <li>The aspect ratio of the largest thumbnail size will be same as the 778 * aspect ratio of largest JPEG output size in android.scaler.availableStreamConfigurations. 779 * The largest size is defined as the size that has the largest pixel area 780 * in a given size list.</li> 781 * <li>Each output JPEG size in android.scaler.availableStreamConfigurations will have at least 782 * one corresponding size that has the same aspect ratio in availableThumbnailSizes, 783 * and vice versa.</li> 784 * <li>All non-<code>(0, 0)</code> sizes will have non-zero widths and heights. 785 * This key is available on all devices.</li> 786 * </ul> 787 * 788 * @see CaptureRequest#JPEG_THUMBNAIL_SIZE 789 */ 790 @PublicKey 791 public static final Key<android.util.Size[]> JPEG_AVAILABLE_THUMBNAIL_SIZES = 792 new Key<android.util.Size[]>("android.jpeg.availableThumbnailSizes", android.util.Size[].class); 793 794 /** 795 * <p>List of aperture size values for {@link CaptureRequest#LENS_APERTURE android.lens.aperture} that are 796 * supported by this camera device.</p> 797 * <p>If the camera device doesn't support a variable lens aperture, 798 * this list will contain only one value, which is the fixed aperture size.</p> 799 * <p>If the camera device supports a variable aperture, the aperture values 800 * in this list will be sorted in ascending order.</p> 801 * <p><b>Units</b>: The aperture f-number</p> 802 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 803 * <p><b>Full capability</b> - 804 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 805 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 806 * 807 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 808 * @see CaptureRequest#LENS_APERTURE 809 */ 810 @PublicKey 811 public static final Key<float[]> LENS_INFO_AVAILABLE_APERTURES = 812 new Key<float[]>("android.lens.info.availableApertures", float[].class); 813 814 /** 815 * <p>List of neutral density filter values for 816 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} that are supported by this camera device.</p> 817 * <p>If a neutral density filter is not supported by this camera device, 818 * this list will contain only 0. Otherwise, this list will include every 819 * filter density supported by the camera device, in ascending order.</p> 820 * <p><b>Units</b>: Exposure value (EV)</p> 821 * <p><b>Range of valid values:</b><br></p> 822 * <p>Values are >= 0</p> 823 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 824 * <p><b>Full capability</b> - 825 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 826 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 827 * 828 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 829 * @see CaptureRequest#LENS_FILTER_DENSITY 830 */ 831 @PublicKey 832 public static final Key<float[]> LENS_INFO_AVAILABLE_FILTER_DENSITIES = 833 new Key<float[]>("android.lens.info.availableFilterDensities", float[].class); 834 835 /** 836 * <p>List of focal lengths for {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength} that are supported by this camera 837 * device.</p> 838 * <p>If optical zoom is not supported, this list will only contain 839 * a single value corresponding to the fixed focal length of the 840 * device. Otherwise, this list will include every focal length supported 841 * by the camera device, in ascending order.</p> 842 * <p><b>Units</b>: Millimeters</p> 843 * <p><b>Range of valid values:</b><br></p> 844 * <p>Values are > 0</p> 845 * <p>This key is available on all devices.</p> 846 * 847 * @see CaptureRequest#LENS_FOCAL_LENGTH 848 */ 849 @PublicKey 850 public static final Key<float[]> LENS_INFO_AVAILABLE_FOCAL_LENGTHS = 851 new Key<float[]>("android.lens.info.availableFocalLengths", float[].class); 852 853 /** 854 * <p>List of optical image stabilization (OIS) modes for 855 * {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} that are supported by this camera device.</p> 856 * <p>If OIS is not supported by a given camera device, this list will 857 * contain only OFF.</p> 858 * <p><b>Range of valid values:</b><br> 859 * Any value listed in {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}</p> 860 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 861 * <p><b>Limited capability</b> - 862 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 863 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 864 * 865 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 866 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 867 */ 868 @PublicKey 869 public static final Key<int[]> LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION = 870 new Key<int[]>("android.lens.info.availableOpticalStabilization", int[].class); 871 872 /** 873 * <p>Hyperfocal distance for this lens.</p> 874 * <p>If the lens is not fixed focus, the camera device will report this 875 * field when {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} is APPROXIMATE or CALIBRATED.</p> 876 * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p> 877 * <p><b>Range of valid values:</b><br> 878 * If lens is fixed focus, >= 0. If lens has focuser unit, the value is 879 * within <code>(0.0f, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code></p> 880 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 881 * <p><b>Limited capability</b> - 882 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 883 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 884 * 885 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 886 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION 887 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 888 */ 889 @PublicKey 890 public static final Key<Float> LENS_INFO_HYPERFOCAL_DISTANCE = 891 new Key<Float>("android.lens.info.hyperfocalDistance", float.class); 892 893 /** 894 * <p>Shortest distance from frontmost surface 895 * of the lens that can be brought into sharp focus.</p> 896 * <p>If the lens is fixed-focus, this will be 897 * 0.</p> 898 * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p> 899 * <p><b>Range of valid values:</b><br> 900 * >= 0</p> 901 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 902 * <p><b>Limited capability</b> - 903 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 904 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 905 * 906 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 907 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION 908 */ 909 @PublicKey 910 public static final Key<Float> LENS_INFO_MINIMUM_FOCUS_DISTANCE = 911 new Key<Float>("android.lens.info.minimumFocusDistance", float.class); 912 913 /** 914 * <p>Dimensions of lens shading map.</p> 915 * <p>The map should be on the order of 30-40 rows and columns, and 916 * must be smaller than 64x64.</p> 917 * <p><b>Range of valid values:</b><br> 918 * Both values >= 1</p> 919 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 920 * <p><b>Full capability</b> - 921 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 922 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 923 * 924 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 925 * @hide 926 */ 927 public static final Key<android.util.Size> LENS_INFO_SHADING_MAP_SIZE = 928 new Key<android.util.Size>("android.lens.info.shadingMapSize", android.util.Size.class); 929 930 /** 931 * <p>The lens focus distance calibration quality.</p> 932 * <p>The lens focus distance calibration quality determines the reliability of 933 * focus related metadata entries, i.e. {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}, 934 * {@link CaptureResult#LENS_FOCUS_RANGE android.lens.focusRange}, {@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}, and 935 * {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}.</p> 936 * <p>APPROXIMATE and CALIBRATED devices report the focus metadata in 937 * units of diopters (1/meter), so <code>0.0f</code> represents focusing at infinity, 938 * and increasing positive numbers represent focusing closer and closer 939 * to the camera device. The focus distance control also uses diopters 940 * on these devices.</p> 941 * <p>UNCALIBRATED devices do not use units that are directly comparable 942 * to any real physical measurement, but <code>0.0f</code> still represents farthest 943 * focus, and {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} represents the 944 * nearest focus the device can achieve.</p> 945 * <p><b>Possible values:</b> 946 * <ul> 947 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED UNCALIBRATED}</li> 948 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE APPROXIMATE}</li> 949 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED CALIBRATED}</li> 950 * </ul></p> 951 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 952 * <p><b>Limited capability</b> - 953 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 954 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 955 * 956 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 957 * @see CaptureRequest#LENS_FOCUS_DISTANCE 958 * @see CaptureResult#LENS_FOCUS_RANGE 959 * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE 960 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 961 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED 962 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE 963 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED 964 */ 965 @PublicKey 966 public static final Key<Integer> LENS_INFO_FOCUS_DISTANCE_CALIBRATION = 967 new Key<Integer>("android.lens.info.focusDistanceCalibration", int.class); 968 969 /** 970 * <p>Direction the camera faces relative to 971 * device screen.</p> 972 * <p><b>Possible values:</b> 973 * <ul> 974 * <li>{@link #LENS_FACING_FRONT FRONT}</li> 975 * <li>{@link #LENS_FACING_BACK BACK}</li> 976 * <li>{@link #LENS_FACING_EXTERNAL EXTERNAL}</li> 977 * </ul></p> 978 * <p>This key is available on all devices.</p> 979 * @see #LENS_FACING_FRONT 980 * @see #LENS_FACING_BACK 981 * @see #LENS_FACING_EXTERNAL 982 */ 983 @PublicKey 984 public static final Key<Integer> LENS_FACING = 985 new Key<Integer>("android.lens.facing", int.class); 986 987 /** 988 * <p>The orientation of the camera relative to the sensor 989 * coordinate system.</p> 990 * <p>The four coefficients that describe the quarternion 991 * rotation from the Android sensor coordinate system to a 992 * camera-aligned coordinate system where the X-axis is 993 * aligned with the long side of the image sensor, the Y-axis 994 * is aligned with the short side of the image sensor, and 995 * the Z-axis is aligned with the optical axis of the sensor.</p> 996 * <p>To convert from the quarternion coefficients <code>(x,y,z,w)</code> 997 * to the axis of rotation <code>(a_x, a_y, a_z)</code> and rotation 998 * amount <code>theta</code>, the following formulas can be used:</p> 999 * <pre><code> theta = 2 * acos(w) 1000 * a_x = x / sin(theta/2) 1001 * a_y = y / sin(theta/2) 1002 * a_z = z / sin(theta/2) 1003 * </code></pre> 1004 * <p>To create a 3x3 rotation matrix that applies the rotation 1005 * defined by this quarternion, the following matrix can be 1006 * used:</p> 1007 * <pre><code>R = [ 1 - 2y^2 - 2z^2, 2xy - 2zw, 2xz + 2yw, 1008 * 2xy + 2zw, 1 - 2x^2 - 2z^2, 2yz - 2xw, 1009 * 2xz - 2yw, 2yz + 2xw, 1 - 2x^2 - 2y^2 ] 1010 * </code></pre> 1011 * <p>This matrix can then be used to apply the rotation to a 1012 * column vector point with</p> 1013 * <p><code>p' = Rp</code></p> 1014 * <p>where <code>p</code> is in the device sensor coordinate system, and 1015 * <code>p'</code> is in the camera-oriented coordinate system.</p> 1016 * <p><b>Units</b>: 1017 * Quarternion coefficients</p> 1018 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1019 */ 1020 @PublicKey 1021 public static final Key<float[]> LENS_POSE_ROTATION = 1022 new Key<float[]>("android.lens.poseRotation", float[].class); 1023 1024 /** 1025 * <p>Position of the camera optical center.</p> 1026 * <p>The position of the camera device's lens optical center, 1027 * as a three-dimensional vector <code>(x,y,z)</code>, relative to the 1028 * optical center of the largest camera device facing in the 1029 * same direction as this camera, in the {@link android.hardware.SensorEvent Android sensor coordinate 1030 * axes}. Note that only the axis definitions are shared with 1031 * the sensor coordinate system, but not the origin.</p> 1032 * <p>If this device is the largest or only camera device with a 1033 * given facing, then this position will be <code>(0, 0, 0)</code>; a 1034 * camera device with a lens optical center located 3 cm from 1035 * the main sensor along the +X axis (to the right from the 1036 * user's perspective) will report <code>(0.03, 0, 0)</code>.</p> 1037 * <p>To transform a pixel coordinates between two cameras 1038 * facing the same direction, first the source camera 1039 * android.lens.radialDistortion must be corrected for. Then 1040 * the source camera android.lens.intrinsicCalibration needs 1041 * to be applied, followed by the {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} 1042 * of the source camera, the translation of the source camera 1043 * relative to the destination camera, the 1044 * {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the destination camera, and 1045 * finally the inverse of android.lens.intrinsicCalibration 1046 * of the destination camera. This obtains a 1047 * radial-distortion-free coordinate in the destination 1048 * camera pixel coordinates.</p> 1049 * <p>To compare this against a real image from the destination 1050 * camera, the destination camera image then needs to be 1051 * corrected for radial distortion before comparison or 1052 * sampling.</p> 1053 * <p><b>Units</b>: Meters</p> 1054 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1055 * 1056 * @see CameraCharacteristics#LENS_POSE_ROTATION 1057 */ 1058 @PublicKey 1059 public static final Key<float[]> LENS_POSE_TRANSLATION = 1060 new Key<float[]>("android.lens.poseTranslation", float[].class); 1061 1062 /** 1063 * <p>The parameters for this camera device's intrinsic 1064 * calibration.</p> 1065 * <p>The five calibration parameters that describe the 1066 * transform from camera-centric 3D coordinates to sensor 1067 * pixel coordinates:</p> 1068 * <pre><code>[f_x, f_y, c_x, c_y, s] 1069 * </code></pre> 1070 * <p>Where <code>f_x</code> and <code>f_y</code> are the horizontal and vertical 1071 * focal lengths, <code>[c_x, c_y]</code> is the position of the optical 1072 * axis, and <code>s</code> is a skew parameter for the sensor plane not 1073 * being aligned with the lens plane.</p> 1074 * <p>These are typically used within a transformation matrix K:</p> 1075 * <pre><code>K = [ f_x, s, c_x, 1076 * 0, f_y, c_y, 1077 * 0 0, 1 ] 1078 * </code></pre> 1079 * <p>which can then be combined with the camera pose rotation 1080 * <code>R</code> and translation <code>t</code> ({@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} and 1081 * {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}, respective) to calculate the 1082 * complete transform from world coordinates to pixel 1083 * coordinates:</p> 1084 * <pre><code>P = [ K 0 * [ R t 1085 * 0 1 ] 0 1 ] 1086 * </code></pre> 1087 * <p>and with <code>p_w</code> being a point in the world coordinate system 1088 * and <code>p_s</code> being a point in the camera active pixel array 1089 * coordinate system, and with the mapping including the 1090 * homogeneous division by z:</p> 1091 * <pre><code> p_h = (x_h, y_h, z_h) = P p_w 1092 * p_s = p_h / z_h 1093 * </code></pre> 1094 * <p>so <code>[x_s, y_s]</code> is the pixel coordinates of the world 1095 * point, <code>z_s = 1</code>, and <code>w_s</code> is a measurement of disparity 1096 * (depth) in pixel coordinates.</p> 1097 * <p>Note that the coordinate system for this transform is the 1098 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} system, 1099 * where <code>(0,0)</code> is the top-left of the 1100 * preCorrectionActiveArraySize rectangle. Once the pose and 1101 * intrinsic calibration transforms have been applied to a 1102 * world point, then the android.lens.radialDistortion 1103 * transform needs to be applied, and the result adjusted to 1104 * be in the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} coordinate 1105 * system (where <code>(0, 0)</code> is the top-left of the 1106 * activeArraySize rectangle), to determine the final pixel 1107 * coordinate of the world point for processed (non-RAW) 1108 * output buffers.</p> 1109 * <p><b>Units</b>: 1110 * Pixels in the 1111 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} 1112 * coordinate system.</p> 1113 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1114 * 1115 * @see CameraCharacteristics#LENS_POSE_ROTATION 1116 * @see CameraCharacteristics#LENS_POSE_TRANSLATION 1117 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 1118 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE 1119 */ 1120 @PublicKey 1121 public static final Key<float[]> LENS_INTRINSIC_CALIBRATION = 1122 new Key<float[]>("android.lens.intrinsicCalibration", float[].class); 1123 1124 /** 1125 * <p>The correction coefficients to correct for this camera device's 1126 * radial and tangential lens distortion.</p> 1127 * <p>Four radial distortion coefficients <code>[kappa_0, kappa_1, kappa_2, 1128 * kappa_3]</code> and two tangential distortion coefficients 1129 * <code>[kappa_4, kappa_5]</code> that can be used to correct the 1130 * lens's geometric distortion with the mapping equations:</p> 1131 * <pre><code> x_c = x_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + 1132 * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 ) 1133 * y_c = y_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + 1134 * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 ) 1135 * </code></pre> 1136 * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the 1137 * input image that correspond to the pixel values in the 1138 * corrected image at the coordinate <code>[x_i, y_i]</code>:</p> 1139 * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage) 1140 * </code></pre> 1141 * <p>The pixel coordinates are defined in a normalized 1142 * coordinate system related to the 1143 * android.lens.intrinsicCalibration calibration fields. 1144 * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code> have <code>(0,0)</code> at the 1145 * lens optical center <code>[c_x, c_y]</code>. The maximum magnitudes 1146 * of both x and y coordinates are normalized to be 1 at the 1147 * edge further from the optical center, so the range 1148 * for both dimensions is <code>-1 <= x <= 1</code>.</p> 1149 * <p>Finally, <code>r</code> represents the radial distance from the 1150 * optical center, <code>r^2 = x_i^2 + y_i^2</code>, and its magnitude 1151 * is therefore no larger than <code>|r| <= sqrt(2)</code>.</p> 1152 * <p>The distortion model used is the Brown-Conrady model.</p> 1153 * <p><b>Units</b>: 1154 * Unitless coefficients.</p> 1155 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1156 */ 1157 @PublicKey 1158 public static final Key<float[]> LENS_RADIAL_DISTORTION = 1159 new Key<float[]>("android.lens.radialDistortion", float[].class); 1160 1161 /** 1162 * <p>List of noise reduction modes for {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode} that are supported 1163 * by this camera device.</p> 1164 * <p>Full-capability camera devices will always support OFF and FAST.</p> 1165 * <p>Legacy-capability camera devices will only support FAST mode.</p> 1166 * <p><b>Range of valid values:</b><br> 1167 * Any value listed in {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</p> 1168 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1169 * <p><b>Limited capability</b> - 1170 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 1171 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1172 * 1173 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1174 * @see CaptureRequest#NOISE_REDUCTION_MODE 1175 */ 1176 @PublicKey 1177 public static final Key<int[]> NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES = 1178 new Key<int[]>("android.noiseReduction.availableNoiseReductionModes", int[].class); 1179 1180 /** 1181 * <p>If set to 1, the HAL will always split result 1182 * metadata for a single capture into multiple buffers, 1183 * returned using multiple process_capture_result calls.</p> 1184 * <p>Does not need to be listed in static 1185 * metadata. Support for partial results will be reworked in 1186 * future versions of camera service. This quirk will stop 1187 * working at that point; DO NOT USE without careful 1188 * consideration of future support.</p> 1189 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1190 * @deprecated 1191 * @hide 1192 */ 1193 @Deprecated 1194 public static final Key<Byte> QUIRKS_USE_PARTIAL_RESULT = 1195 new Key<Byte>("android.quirks.usePartialResult", byte.class); 1196 1197 /** 1198 * <p>The maximum numbers of different types of output streams 1199 * that can be configured and used simultaneously by a camera device.</p> 1200 * <p>This is a 3 element tuple that contains the max number of output simultaneous 1201 * streams for raw sensor, processed (but not stalling), and processed (and stalling) 1202 * formats respectively. For example, assuming that JPEG is typically a processed and 1203 * stalling stream, if max raw sensor format output stream number is 1, max YUV streams 1204 * number is 3, and max JPEG stream number is 2, then this tuple should be <code>(1, 3, 2)</code>.</p> 1205 * <p>This lists the upper bound of the number of output streams supported by 1206 * the camera device. Using more streams simultaneously may require more hardware and 1207 * CPU resources that will consume more power. The image format for an output stream can 1208 * be any supported format provided by android.scaler.availableStreamConfigurations. 1209 * The formats defined in android.scaler.availableStreamConfigurations can be catergorized 1210 * into the 3 stream types as below:</p> 1211 * <ul> 1212 * <li>Processed (but stalling): any non-RAW format with a stallDurations > 0. 1213 * Typically {@link android.graphics.ImageFormat#JPEG JPEG format}.</li> 1214 * <li>Raw formats: {@link android.graphics.ImageFormat#RAW_SENSOR RAW_SENSOR}, {@link android.graphics.ImageFormat#RAW10 RAW10}, or {@link android.graphics.ImageFormat#RAW12 RAW12}.</li> 1215 * <li>Processed (but not-stalling): any non-RAW format without a stall duration. 1216 * Typically {@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888}, 1217 * {@link android.graphics.ImageFormat#NV21 NV21}, or 1218 * {@link android.graphics.ImageFormat#YV12 YV12}.</li> 1219 * </ul> 1220 * <p><b>Range of valid values:</b><br></p> 1221 * <p>For processed (and stalling) format streams, >= 1.</p> 1222 * <p>For Raw format (either stalling or non-stalling) streams, >= 0.</p> 1223 * <p>For processed (but not stalling) format streams, >= 3 1224 * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>); 1225 * >= 2 for LIMITED mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == LIMITED</code>).</p> 1226 * <p>This key is available on all devices.</p> 1227 * 1228 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1229 * @hide 1230 */ 1231 public static final Key<int[]> REQUEST_MAX_NUM_OUTPUT_STREAMS = 1232 new Key<int[]>("android.request.maxNumOutputStreams", int[].class); 1233 1234 /** 1235 * <p>The maximum numbers of different types of output streams 1236 * that can be configured and used simultaneously by a camera device 1237 * for any <code>RAW</code> formats.</p> 1238 * <p>This value contains the max number of output simultaneous 1239 * streams from the raw sensor.</p> 1240 * <p>This lists the upper bound of the number of output streams supported by 1241 * the camera device. Using more streams simultaneously may require more hardware and 1242 * CPU resources that will consume more power. The image format for this kind of an output stream can 1243 * be any <code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p> 1244 * <p>In particular, a <code>RAW</code> format is typically one of:</p> 1245 * <ul> 1246 * <li>{@link android.graphics.ImageFormat#RAW_SENSOR RAW_SENSOR}</li> 1247 * <li>{@link android.graphics.ImageFormat#RAW10 RAW10}</li> 1248 * <li>{@link android.graphics.ImageFormat#RAW12 RAW12}</li> 1249 * </ul> 1250 * <p>LEGACY mode devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> LEGACY) 1251 * never support raw streams.</p> 1252 * <p><b>Range of valid values:</b><br></p> 1253 * <p>>= 0</p> 1254 * <p>This key is available on all devices.</p> 1255 * 1256 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1257 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP 1258 */ 1259 @PublicKey 1260 @SyntheticKey 1261 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_RAW = 1262 new Key<Integer>("android.request.maxNumOutputRaw", int.class); 1263 1264 /** 1265 * <p>The maximum numbers of different types of output streams 1266 * that can be configured and used simultaneously by a camera device 1267 * for any processed (but not-stalling) formats.</p> 1268 * <p>This value contains the max number of output simultaneous 1269 * streams for any processed (but not-stalling) formats.</p> 1270 * <p>This lists the upper bound of the number of output streams supported by 1271 * the camera device. Using more streams simultaneously may require more hardware and 1272 * CPU resources that will consume more power. The image format for this kind of an output stream can 1273 * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p> 1274 * <p>Processed (but not-stalling) is defined as any non-RAW format without a stall duration. 1275 * Typically:</p> 1276 * <ul> 1277 * <li>{@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888}</li> 1278 * <li>{@link android.graphics.ImageFormat#NV21 NV21}</li> 1279 * <li>{@link android.graphics.ImageFormat#YV12 YV12}</li> 1280 * <li>Implementation-defined formats, i.e. {@link android.hardware.camera2.params.StreamConfigurationMap#isOutputSupportedFor(Class) }</li> 1281 * </ul> 1282 * <p>For full guarantees, query {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } with a 1283 * processed format -- it will return 0 for a non-stalling stream.</p> 1284 * <p>LEGACY devices will support at least 2 processing/non-stalling streams.</p> 1285 * <p><b>Range of valid values:</b><br></p> 1286 * <p>>= 3 1287 * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>); 1288 * >= 2 for LIMITED mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == LIMITED</code>).</p> 1289 * <p>This key is available on all devices.</p> 1290 * 1291 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1292 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP 1293 */ 1294 @PublicKey 1295 @SyntheticKey 1296 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC = 1297 new Key<Integer>("android.request.maxNumOutputProc", int.class); 1298 1299 /** 1300 * <p>The maximum numbers of different types of output streams 1301 * that can be configured and used simultaneously by a camera device 1302 * for any processed (and stalling) formats.</p> 1303 * <p>This value contains the max number of output simultaneous 1304 * streams for any processed (but not-stalling) formats.</p> 1305 * <p>This lists the upper bound of the number of output streams supported by 1306 * the camera device. Using more streams simultaneously may require more hardware and 1307 * CPU resources that will consume more power. The image format for this kind of an output stream can 1308 * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p> 1309 * <p>A processed and stalling format is defined as any non-RAW format with a stallDurations 1310 * > 0. Typically only the {@link android.graphics.ImageFormat#JPEG JPEG format} is a 1311 * stalling format.</p> 1312 * <p>For full guarantees, query {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } with a 1313 * processed format -- it will return a non-0 value for a stalling stream.</p> 1314 * <p>LEGACY devices will support up to 1 processing/stalling stream.</p> 1315 * <p><b>Range of valid values:</b><br></p> 1316 * <p>>= 1</p> 1317 * <p>This key is available on all devices.</p> 1318 * 1319 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP 1320 */ 1321 @PublicKey 1322 @SyntheticKey 1323 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC_STALLING = 1324 new Key<Integer>("android.request.maxNumOutputProcStalling", int.class); 1325 1326 /** 1327 * <p>The maximum numbers of any type of input streams 1328 * that can be configured and used simultaneously by a camera device.</p> 1329 * <p>When set to 0, it means no input stream is supported.</p> 1330 * <p>The image format for a input stream can be any supported format returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }. When using an 1331 * input stream, there must be at least one output stream configured to to receive the 1332 * reprocessed images.</p> 1333 * <p>When an input stream and some output streams are used in a reprocessing request, 1334 * only the input buffer will be used to produce these output stream buffers, and a 1335 * new sensor image will not be captured.</p> 1336 * <p>For example, for Zero Shutter Lag (ZSL) still capture use case, the input 1337 * stream image format will be PRIVATE, the associated output stream image format 1338 * should be JPEG.</p> 1339 * <p><b>Range of valid values:</b><br></p> 1340 * <p>0 or 1.</p> 1341 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1342 * <p><b>Full capability</b> - 1343 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 1344 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1345 * 1346 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1347 */ 1348 @PublicKey 1349 public static final Key<Integer> REQUEST_MAX_NUM_INPUT_STREAMS = 1350 new Key<Integer>("android.request.maxNumInputStreams", int.class); 1351 1352 /** 1353 * <p>Specifies the number of maximum pipeline stages a frame 1354 * has to go through from when it's exposed to when it's available 1355 * to the framework.</p> 1356 * <p>A typical minimum value for this is 2 (one stage to expose, 1357 * one stage to readout) from the sensor. The ISP then usually adds 1358 * its own stages to do custom HW processing. Further stages may be 1359 * added by SW processing.</p> 1360 * <p>Depending on what settings are used (e.g. YUV, JPEG) and what 1361 * processing is enabled (e.g. face detection), the actual pipeline 1362 * depth (specified by {@link CaptureResult#REQUEST_PIPELINE_DEPTH android.request.pipelineDepth}) may be less than 1363 * the max pipeline depth.</p> 1364 * <p>A pipeline depth of X stages is equivalent to a pipeline latency of 1365 * X frame intervals.</p> 1366 * <p>This value will normally be 8 or less, however, for high speed capture session, 1367 * the max pipeline depth will be up to 8 x size of high speed capture request list.</p> 1368 * <p>This key is available on all devices.</p> 1369 * 1370 * @see CaptureResult#REQUEST_PIPELINE_DEPTH 1371 */ 1372 @PublicKey 1373 public static final Key<Byte> REQUEST_PIPELINE_MAX_DEPTH = 1374 new Key<Byte>("android.request.pipelineMaxDepth", byte.class); 1375 1376 /** 1377 * <p>Defines how many sub-components 1378 * a result will be composed of.</p> 1379 * <p>In order to combat the pipeline latency, partial results 1380 * may be delivered to the application layer from the camera device as 1381 * soon as they are available.</p> 1382 * <p>Optional; defaults to 1. A value of 1 means that partial 1383 * results are not supported, and only the final TotalCaptureResult will 1384 * be produced by the camera device.</p> 1385 * <p>A typical use case for this might be: after requesting an 1386 * auto-focus (AF) lock the new AF state might be available 50% 1387 * of the way through the pipeline. The camera device could 1388 * then immediately dispatch this state via a partial result to 1389 * the application, and the rest of the metadata via later 1390 * partial results.</p> 1391 * <p><b>Range of valid values:</b><br> 1392 * >= 1</p> 1393 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1394 */ 1395 @PublicKey 1396 public static final Key<Integer> REQUEST_PARTIAL_RESULT_COUNT = 1397 new Key<Integer>("android.request.partialResultCount", int.class); 1398 1399 /** 1400 * <p>List of capabilities that this camera device 1401 * advertises as fully supporting.</p> 1402 * <p>A capability is a contract that the camera device makes in order 1403 * to be able to satisfy one or more use cases.</p> 1404 * <p>Listing a capability guarantees that the whole set of features 1405 * required to support a common use will all be available.</p> 1406 * <p>Using a subset of the functionality provided by an unsupported 1407 * capability may be possible on a specific camera device implementation; 1408 * to do this query each of android.request.availableRequestKeys, 1409 * android.request.availableResultKeys, 1410 * android.request.availableCharacteristicsKeys.</p> 1411 * <p>The following capabilities are guaranteed to be available on 1412 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL devices:</p> 1413 * <ul> 1414 * <li>MANUAL_SENSOR</li> 1415 * <li>MANUAL_POST_PROCESSING</li> 1416 * </ul> 1417 * <p>Other capabilities may be available on either FULL or LIMITED 1418 * devices, but the application should query this key to be sure.</p> 1419 * <p><b>Possible values:</b> 1420 * <ul> 1421 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE BACKWARD_COMPATIBLE}</li> 1422 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR MANUAL_SENSOR}</li> 1423 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING MANUAL_POST_PROCESSING}</li> 1424 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_RAW RAW}</li> 1425 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING PRIVATE_REPROCESSING}</li> 1426 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS READ_SENSOR_SETTINGS}</li> 1427 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE BURST_CAPTURE}</li> 1428 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING YUV_REPROCESSING}</li> 1429 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT DEPTH_OUTPUT}</li> 1430 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO CONSTRAINED_HIGH_SPEED_VIDEO}</li> 1431 * </ul></p> 1432 * <p>This key is available on all devices.</p> 1433 * 1434 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1435 * @see #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE 1436 * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR 1437 * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING 1438 * @see #REQUEST_AVAILABLE_CAPABILITIES_RAW 1439 * @see #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING 1440 * @see #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS 1441 * @see #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE 1442 * @see #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING 1443 * @see #REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT 1444 * @see #REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO 1445 */ 1446 @PublicKey 1447 public static final Key<int[]> REQUEST_AVAILABLE_CAPABILITIES = 1448 new Key<int[]>("android.request.availableCapabilities", int[].class); 1449 1450 /** 1451 * <p>A list of all keys that the camera device has available 1452 * to use with {@link android.hardware.camera2.CaptureRequest }.</p> 1453 * <p>Attempting to set a key into a CaptureRequest that is not 1454 * listed here will result in an invalid request and will be rejected 1455 * by the camera device.</p> 1456 * <p>This field can be used to query the feature set of a camera device 1457 * at a more granular level than capabilities. This is especially 1458 * important for optional keys that are not listed under any capability 1459 * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p> 1460 * <p>This key is available on all devices.</p> 1461 * 1462 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1463 * @hide 1464 */ 1465 public static final Key<int[]> REQUEST_AVAILABLE_REQUEST_KEYS = 1466 new Key<int[]>("android.request.availableRequestKeys", int[].class); 1467 1468 /** 1469 * <p>A list of all keys that the camera device has available 1470 * to use with {@link android.hardware.camera2.CaptureResult }.</p> 1471 * <p>Attempting to get a key from a CaptureResult that is not 1472 * listed here will always return a <code>null</code> value. Getting a key from 1473 * a CaptureResult that is listed here will generally never return a <code>null</code> 1474 * value.</p> 1475 * <p>The following keys may return <code>null</code> unless they are enabled:</p> 1476 * <ul> 1477 * <li>android.statistics.lensShadingMap (non-null iff {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON)</li> 1478 * </ul> 1479 * <p>(Those sometimes-null keys will nevertheless be listed here 1480 * if they are available.)</p> 1481 * <p>This field can be used to query the feature set of a camera device 1482 * at a more granular level than capabilities. This is especially 1483 * important for optional keys that are not listed under any capability 1484 * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p> 1485 * <p>This key is available on all devices.</p> 1486 * 1487 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1488 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 1489 * @hide 1490 */ 1491 public static final Key<int[]> REQUEST_AVAILABLE_RESULT_KEYS = 1492 new Key<int[]>("android.request.availableResultKeys", int[].class); 1493 1494 /** 1495 * <p>A list of all keys that the camera device has available 1496 * to use with {@link android.hardware.camera2.CameraCharacteristics }.</p> 1497 * <p>This entry follows the same rules as 1498 * android.request.availableResultKeys (except that it applies for 1499 * CameraCharacteristics instead of CaptureResult). See above for more 1500 * details.</p> 1501 * <p>This key is available on all devices.</p> 1502 * @hide 1503 */ 1504 public static final Key<int[]> REQUEST_AVAILABLE_CHARACTERISTICS_KEYS = 1505 new Key<int[]>("android.request.availableCharacteristicsKeys", int[].class); 1506 1507 /** 1508 * <p>The list of image formats that are supported by this 1509 * camera device for output streams.</p> 1510 * <p>All camera devices will support JPEG and YUV_420_888 formats.</p> 1511 * <p>When set to YUV_420_888, application can access the YUV420 data directly.</p> 1512 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1513 * @deprecated 1514 * @hide 1515 */ 1516 @Deprecated 1517 public static final Key<int[]> SCALER_AVAILABLE_FORMATS = 1518 new Key<int[]>("android.scaler.availableFormats", int[].class); 1519 1520 /** 1521 * <p>The minimum frame duration that is supported 1522 * for each resolution in android.scaler.availableJpegSizes.</p> 1523 * <p>This corresponds to the minimum steady-state frame duration when only 1524 * that JPEG stream is active and captured in a burst, with all 1525 * processing (typically in android.*.mode) set to FAST.</p> 1526 * <p>When multiple streams are configured, the minimum 1527 * frame duration will be >= max(individual stream min 1528 * durations)</p> 1529 * <p><b>Units</b>: Nanoseconds</p> 1530 * <p><b>Range of valid values:</b><br> 1531 * TODO: Remove property.</p> 1532 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1533 * @deprecated 1534 * @hide 1535 */ 1536 @Deprecated 1537 public static final Key<long[]> SCALER_AVAILABLE_JPEG_MIN_DURATIONS = 1538 new Key<long[]>("android.scaler.availableJpegMinDurations", long[].class); 1539 1540 /** 1541 * <p>The JPEG resolutions that are supported by this camera device.</p> 1542 * <p>The resolutions are listed as <code>(width, height)</code> pairs. All camera devices will support 1543 * sensor maximum resolution (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}).</p> 1544 * <p><b>Range of valid values:</b><br> 1545 * TODO: Remove property.</p> 1546 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1547 * 1548 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 1549 * @deprecated 1550 * @hide 1551 */ 1552 @Deprecated 1553 public static final Key<android.util.Size[]> SCALER_AVAILABLE_JPEG_SIZES = 1554 new Key<android.util.Size[]>("android.scaler.availableJpegSizes", android.util.Size[].class); 1555 1556 /** 1557 * <p>The maximum ratio between both active area width 1558 * and crop region width, and active area height and 1559 * crop region height, for {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p> 1560 * <p>This represents the maximum amount of zooming possible by 1561 * the camera device, or equivalently, the minimum cropping 1562 * window size.</p> 1563 * <p>Crop regions that have a width or height that is smaller 1564 * than this ratio allows will be rounded up to the minimum 1565 * allowed size by the camera device.</p> 1566 * <p><b>Units</b>: Zoom scale factor</p> 1567 * <p><b>Range of valid values:</b><br> 1568 * >=1</p> 1569 * <p>This key is available on all devices.</p> 1570 * 1571 * @see CaptureRequest#SCALER_CROP_REGION 1572 */ 1573 @PublicKey 1574 public static final Key<Float> SCALER_AVAILABLE_MAX_DIGITAL_ZOOM = 1575 new Key<Float>("android.scaler.availableMaxDigitalZoom", float.class); 1576 1577 /** 1578 * <p>For each available processed output size (defined in 1579 * android.scaler.availableProcessedSizes), this property lists the 1580 * minimum supportable frame duration for that size.</p> 1581 * <p>This should correspond to the frame duration when only that processed 1582 * stream is active, with all processing (typically in android.*.mode) 1583 * set to FAST.</p> 1584 * <p>When multiple streams are configured, the minimum frame duration will 1585 * be >= max(individual stream min durations).</p> 1586 * <p><b>Units</b>: Nanoseconds</p> 1587 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1588 * @deprecated 1589 * @hide 1590 */ 1591 @Deprecated 1592 public static final Key<long[]> SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS = 1593 new Key<long[]>("android.scaler.availableProcessedMinDurations", long[].class); 1594 1595 /** 1596 * <p>The resolutions available for use with 1597 * processed output streams, such as YV12, NV12, and 1598 * platform opaque YUV/RGB streams to the GPU or video 1599 * encoders.</p> 1600 * <p>The resolutions are listed as <code>(width, height)</code> pairs.</p> 1601 * <p>For a given use case, the actual maximum supported resolution 1602 * may be lower than what is listed here, depending on the destination 1603 * Surface for the image data. For example, for recording video, 1604 * the video encoder chosen may have a maximum size limit (e.g. 1080p) 1605 * smaller than what the camera (e.g. maximum resolution is 3264x2448) 1606 * can provide.</p> 1607 * <p>Please reference the documentation for the image data destination to 1608 * check if it limits the maximum size for image data.</p> 1609 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1610 * @deprecated 1611 * @hide 1612 */ 1613 @Deprecated 1614 public static final Key<android.util.Size[]> SCALER_AVAILABLE_PROCESSED_SIZES = 1615 new Key<android.util.Size[]>("android.scaler.availableProcessedSizes", android.util.Size[].class); 1616 1617 /** 1618 * <p>The mapping of image formats that are supported by this 1619 * camera device for input streams, to their corresponding output formats.</p> 1620 * <p>All camera devices with at least 1 1621 * {@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} will have at least one 1622 * available input format.</p> 1623 * <p>The camera device will support the following map of formats, 1624 * if its dependent capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}) is supported:</p> 1625 * <table> 1626 * <thead> 1627 * <tr> 1628 * <th align="left">Input Format</th> 1629 * <th align="left">Output Format</th> 1630 * <th align="left">Capability</th> 1631 * </tr> 1632 * </thead> 1633 * <tbody> 1634 * <tr> 1635 * <td align="left">{@link android.graphics.ImageFormat#PRIVATE }</td> 1636 * <td align="left">{@link android.graphics.ImageFormat#JPEG }</td> 1637 * <td align="left">PRIVATE_REPROCESSING</td> 1638 * </tr> 1639 * <tr> 1640 * <td align="left">{@link android.graphics.ImageFormat#PRIVATE }</td> 1641 * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 1642 * <td align="left">PRIVATE_REPROCESSING</td> 1643 * </tr> 1644 * <tr> 1645 * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 1646 * <td align="left">{@link android.graphics.ImageFormat#JPEG }</td> 1647 * <td align="left">YUV_REPROCESSING</td> 1648 * </tr> 1649 * <tr> 1650 * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 1651 * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 1652 * <td align="left">YUV_REPROCESSING</td> 1653 * </tr> 1654 * </tbody> 1655 * </table> 1656 * <p>PRIVATE refers to a device-internal format that is not directly application-visible. A 1657 * PRIVATE input surface can be acquired by {@link android.media.ImageReader#newInstance } 1658 * with {@link android.graphics.ImageFormat#PRIVATE } as the format.</p> 1659 * <p>For a PRIVATE_REPROCESSING-capable camera device, using the PRIVATE format as either input 1660 * or output will never hurt maximum frame rate (i.e. {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration getOutputStallDuration(ImageFormat.PRIVATE, size)} is always 0),</p> 1661 * <p>Attempting to configure an input stream with output streams not 1662 * listed as available in this map is not valid.</p> 1663 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1664 * 1665 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1666 * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS 1667 * @hide 1668 */ 1669 public static final Key<android.hardware.camera2.params.ReprocessFormatsMap> SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP = 1670 new Key<android.hardware.camera2.params.ReprocessFormatsMap>("android.scaler.availableInputOutputFormatsMap", android.hardware.camera2.params.ReprocessFormatsMap.class); 1671 1672 /** 1673 * <p>The available stream configurations that this 1674 * camera device supports 1675 * (i.e. format, width, height, output/input stream).</p> 1676 * <p>The configurations are listed as <code>(format, width, height, input?)</code> 1677 * tuples.</p> 1678 * <p>For a given use case, the actual maximum supported resolution 1679 * may be lower than what is listed here, depending on the destination 1680 * Surface for the image data. For example, for recording video, 1681 * the video encoder chosen may have a maximum size limit (e.g. 1080p) 1682 * smaller than what the camera (e.g. maximum resolution is 3264x2448) 1683 * can provide.</p> 1684 * <p>Please reference the documentation for the image data destination to 1685 * check if it limits the maximum size for image data.</p> 1686 * <p>Not all output formats may be supported in a configuration with 1687 * an input stream of a particular format. For more details, see 1688 * android.scaler.availableInputOutputFormatsMap.</p> 1689 * <p>The following table describes the minimum required output stream 1690 * configurations based on the hardware level 1691 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p> 1692 * <table> 1693 * <thead> 1694 * <tr> 1695 * <th align="center">Format</th> 1696 * <th align="center">Size</th> 1697 * <th align="center">Hardware Level</th> 1698 * <th align="center">Notes</th> 1699 * </tr> 1700 * </thead> 1701 * <tbody> 1702 * <tr> 1703 * <td align="center">JPEG</td> 1704 * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td> 1705 * <td align="center">Any</td> 1706 * <td align="center"></td> 1707 * </tr> 1708 * <tr> 1709 * <td align="center">JPEG</td> 1710 * <td align="center">1920x1080 (1080p)</td> 1711 * <td align="center">Any</td> 1712 * <td align="center">if 1080p <= activeArraySize</td> 1713 * </tr> 1714 * <tr> 1715 * <td align="center">JPEG</td> 1716 * <td align="center">1280x720 (720)</td> 1717 * <td align="center">Any</td> 1718 * <td align="center">if 720p <= activeArraySize</td> 1719 * </tr> 1720 * <tr> 1721 * <td align="center">JPEG</td> 1722 * <td align="center">640x480 (480p)</td> 1723 * <td align="center">Any</td> 1724 * <td align="center">if 480p <= activeArraySize</td> 1725 * </tr> 1726 * <tr> 1727 * <td align="center">JPEG</td> 1728 * <td align="center">320x240 (240p)</td> 1729 * <td align="center">Any</td> 1730 * <td align="center">if 240p <= activeArraySize</td> 1731 * </tr> 1732 * <tr> 1733 * <td align="center">YUV_420_888</td> 1734 * <td align="center">all output sizes available for JPEG</td> 1735 * <td align="center">FULL</td> 1736 * <td align="center"></td> 1737 * </tr> 1738 * <tr> 1739 * <td align="center">YUV_420_888</td> 1740 * <td align="center">all output sizes available for JPEG, up to the maximum video size</td> 1741 * <td align="center">LIMITED</td> 1742 * <td align="center"></td> 1743 * </tr> 1744 * <tr> 1745 * <td align="center">IMPLEMENTATION_DEFINED</td> 1746 * <td align="center">same as YUV_420_888</td> 1747 * <td align="center">Any</td> 1748 * <td align="center"></td> 1749 * </tr> 1750 * </tbody> 1751 * </table> 1752 * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional 1753 * mandatory stream configurations on a per-capability basis.</p> 1754 * <p>This key is available on all devices.</p> 1755 * 1756 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1757 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1758 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 1759 * @hide 1760 */ 1761 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> SCALER_AVAILABLE_STREAM_CONFIGURATIONS = 1762 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.scaler.availableStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class); 1763 1764 /** 1765 * <p>This lists the minimum frame duration for each 1766 * format/size combination.</p> 1767 * <p>This should correspond to the frame duration when only that 1768 * stream is active, with all processing (typically in android.*.mode) 1769 * set to either OFF or FAST.</p> 1770 * <p>When multiple streams are used in a request, the minimum frame 1771 * duration will be max(individual stream min durations).</p> 1772 * <p>The minimum frame duration of a stream (of a particular format, size) 1773 * is the same regardless of whether the stream is input or output.</p> 1774 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and 1775 * android.scaler.availableStallDurations for more details about 1776 * calculating the max frame rate.</p> 1777 * <p>(Keep in sync with 1778 * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration })</p> 1779 * <p><b>Units</b>: (format, width, height, ns) x n</p> 1780 * <p>This key is available on all devices.</p> 1781 * 1782 * @see CaptureRequest#SENSOR_FRAME_DURATION 1783 * @hide 1784 */ 1785 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_MIN_FRAME_DURATIONS = 1786 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); 1787 1788 /** 1789 * <p>This lists the maximum stall duration for each 1790 * output format/size combination.</p> 1791 * <p>A stall duration is how much extra time would get added 1792 * to the normal minimum frame duration for a repeating request 1793 * that has streams with non-zero stall.</p> 1794 * <p>For example, consider JPEG captures which have the following 1795 * characteristics:</p> 1796 * <ul> 1797 * <li>JPEG streams act like processed YUV streams in requests for which 1798 * they are not included; in requests in which they are directly 1799 * referenced, they act as JPEG streams. This is because supporting a 1800 * JPEG stream requires the underlying YUV data to always be ready for 1801 * use by a JPEG encoder, but the encoder will only be used (and impact 1802 * frame duration) on requests that actually reference a JPEG stream.</li> 1803 * <li>The JPEG processor can run concurrently to the rest of the camera 1804 * pipeline, but cannot process more than 1 capture at a time.</li> 1805 * </ul> 1806 * <p>In other words, using a repeating YUV request would result 1807 * in a steady frame rate (let's say it's 30 FPS). If a single 1808 * JPEG request is submitted periodically, the frame rate will stay 1809 * at 30 FPS (as long as we wait for the previous JPEG to return each 1810 * time). If we try to submit a repeating YUV + JPEG request, then 1811 * the frame rate will drop from 30 FPS.</p> 1812 * <p>In general, submitting a new request with a non-0 stall time 1813 * stream will <em>not</em> cause a frame rate drop unless there are still 1814 * outstanding buffers for that stream from previous requests.</p> 1815 * <p>Submitting a repeating request with streams (call this <code>S</code>) 1816 * is the same as setting the minimum frame duration from 1817 * the normal minimum frame duration corresponding to <code>S</code>, added with 1818 * the maximum stall duration for <code>S</code>.</p> 1819 * <p>If interleaving requests with and without a stall duration, 1820 * a request will stall by the maximum of the remaining times 1821 * for each can-stall stream with outstanding buffers.</p> 1822 * <p>This means that a stalling request will not have an exposure start 1823 * until the stall has completed.</p> 1824 * <p>This should correspond to the stall duration when only that stream is 1825 * active, with all processing (typically in android.*.mode) set to FAST 1826 * or OFF. Setting any of the processing modes to HIGH_QUALITY 1827 * effectively results in an indeterminate stall duration for all 1828 * streams in a request (the regular stall calculation rules are 1829 * ignored).</p> 1830 * <p>The following formats may always have a stall duration:</p> 1831 * <ul> 1832 * <li>{@link android.graphics.ImageFormat#JPEG }</li> 1833 * <li>{@link android.graphics.ImageFormat#RAW_SENSOR }</li> 1834 * </ul> 1835 * <p>The following formats will never have a stall duration:</p> 1836 * <ul> 1837 * <li>{@link android.graphics.ImageFormat#YUV_420_888 }</li> 1838 * <li>{@link android.graphics.ImageFormat#RAW10 }</li> 1839 * </ul> 1840 * <p>All other formats may or may not have an allowed stall duration on 1841 * a per-capability basis; refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} 1842 * for more details.</p> 1843 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} for more information about 1844 * calculating the max frame rate (absent stalls).</p> 1845 * <p>(Keep up to date with 1846 * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } )</p> 1847 * <p><b>Units</b>: (format, width, height, ns) x n</p> 1848 * <p>This key is available on all devices.</p> 1849 * 1850 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1851 * @see CaptureRequest#SENSOR_FRAME_DURATION 1852 * @hide 1853 */ 1854 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_STALL_DURATIONS = 1855 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); 1856 1857 /** 1858 * <p>The available stream configurations that this 1859 * camera device supports; also includes the minimum frame durations 1860 * and the stall durations for each format/size combination.</p> 1861 * <p>All camera devices will support sensor maximum resolution (defined by 1862 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) for the JPEG format.</p> 1863 * <p>For a given use case, the actual maximum supported resolution 1864 * may be lower than what is listed here, depending on the destination 1865 * Surface for the image data. For example, for recording video, 1866 * the video encoder chosen may have a maximum size limit (e.g. 1080p) 1867 * smaller than what the camera (e.g. maximum resolution is 3264x2448) 1868 * can provide.</p> 1869 * <p>Please reference the documentation for the image data destination to 1870 * check if it limits the maximum size for image data.</p> 1871 * <p>The following table describes the minimum required output stream 1872 * configurations based on the hardware level 1873 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p> 1874 * <table> 1875 * <thead> 1876 * <tr> 1877 * <th align="center">Format</th> 1878 * <th align="center">Size</th> 1879 * <th align="center">Hardware Level</th> 1880 * <th align="center">Notes</th> 1881 * </tr> 1882 * </thead> 1883 * <tbody> 1884 * <tr> 1885 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td> 1886 * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td> 1887 * <td align="center">Any</td> 1888 * <td align="center"></td> 1889 * </tr> 1890 * <tr> 1891 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td> 1892 * <td align="center">1920x1080 (1080p)</td> 1893 * <td align="center">Any</td> 1894 * <td align="center">if 1080p <= activeArraySize</td> 1895 * </tr> 1896 * <tr> 1897 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td> 1898 * <td align="center">1280x720 (720)</td> 1899 * <td align="center">Any</td> 1900 * <td align="center">if 720p <= activeArraySize</td> 1901 * </tr> 1902 * <tr> 1903 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td> 1904 * <td align="center">640x480 (480p)</td> 1905 * <td align="center">Any</td> 1906 * <td align="center">if 480p <= activeArraySize</td> 1907 * </tr> 1908 * <tr> 1909 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td> 1910 * <td align="center">320x240 (240p)</td> 1911 * <td align="center">Any</td> 1912 * <td align="center">if 240p <= activeArraySize</td> 1913 * </tr> 1914 * <tr> 1915 * <td align="center">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 1916 * <td align="center">all output sizes available for JPEG</td> 1917 * <td align="center">FULL</td> 1918 * <td align="center"></td> 1919 * </tr> 1920 * <tr> 1921 * <td align="center">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 1922 * <td align="center">all output sizes available for JPEG, up to the maximum video size</td> 1923 * <td align="center">LIMITED</td> 1924 * <td align="center"></td> 1925 * </tr> 1926 * <tr> 1927 * <td align="center">{@link android.graphics.ImageFormat#PRIVATE }</td> 1928 * <td align="center">same as YUV_420_888</td> 1929 * <td align="center">Any</td> 1930 * <td align="center"></td> 1931 * </tr> 1932 * </tbody> 1933 * </table> 1934 * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} and {@link android.hardware.camera2.CameraDevice#createCaptureSession } for additional mandatory 1935 * stream configurations on a per-capability basis.</p> 1936 * <p>This key is available on all devices.</p> 1937 * 1938 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1939 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1940 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 1941 */ 1942 @PublicKey 1943 @SyntheticKey 1944 public static final Key<android.hardware.camera2.params.StreamConfigurationMap> SCALER_STREAM_CONFIGURATION_MAP = 1945 new Key<android.hardware.camera2.params.StreamConfigurationMap>("android.scaler.streamConfigurationMap", android.hardware.camera2.params.StreamConfigurationMap.class); 1946 1947 /** 1948 * <p>The crop type that this camera device supports.</p> 1949 * <p>When passing a non-centered crop region ({@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}) to a camera 1950 * device that only supports CENTER_ONLY cropping, the camera device will move the 1951 * crop region to the center of the sensor active array ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) 1952 * and keep the crop region width and height unchanged. The camera device will return the 1953 * final used crop region in metadata result {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p> 1954 * <p>Camera devices that support FREEFORM cropping will support any crop region that 1955 * is inside of the active array. The camera device will apply the same crop region and 1956 * return the final used crop region in capture result metadata {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p> 1957 * <p>FULL capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL) will support 1958 * FREEFORM cropping. LEGACY capability devices will only support CENTER_ONLY cropping.</p> 1959 * <p><b>Possible values:</b> 1960 * <ul> 1961 * <li>{@link #SCALER_CROPPING_TYPE_CENTER_ONLY CENTER_ONLY}</li> 1962 * <li>{@link #SCALER_CROPPING_TYPE_FREEFORM FREEFORM}</li> 1963 * </ul></p> 1964 * <p>This key is available on all devices.</p> 1965 * 1966 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1967 * @see CaptureRequest#SCALER_CROP_REGION 1968 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 1969 * @see #SCALER_CROPPING_TYPE_CENTER_ONLY 1970 * @see #SCALER_CROPPING_TYPE_FREEFORM 1971 */ 1972 @PublicKey 1973 public static final Key<Integer> SCALER_CROPPING_TYPE = 1974 new Key<Integer>("android.scaler.croppingType", int.class); 1975 1976 /** 1977 * <p>The area of the image sensor which corresponds to active pixels after any geometric 1978 * distortion correction has been applied.</p> 1979 * <p>This is the rectangle representing the size of the active region of the sensor (i.e. 1980 * the region that actually receives light from the scene) after any geometric correction 1981 * has been applied, and should be treated as the maximum size in pixels of any of the 1982 * image output formats aside from the raw formats.</p> 1983 * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of 1984 * the full pixel array, and the size of the full pixel array is given by 1985 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p> 1986 * <p>The coordinate system for most other keys that list pixel coordinates, including 1987 * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, is defined relative to the active array rectangle given in 1988 * this field, with <code>(0, 0)</code> being the top-left of this rectangle.</p> 1989 * <p>The active array may be smaller than the full pixel array, since the full array may 1990 * include black calibration pixels or other inactive regions, and geometric correction 1991 * resulting in scaling or cropping may have been applied.</p> 1992 * <p><b>Units</b>: Pixel coordinates on the image sensor</p> 1993 * <p>This key is available on all devices.</p> 1994 * 1995 * @see CaptureRequest#SCALER_CROP_REGION 1996 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE 1997 */ 1998 @PublicKey 1999 public static final Key<android.graphics.Rect> SENSOR_INFO_ACTIVE_ARRAY_SIZE = 2000 new Key<android.graphics.Rect>("android.sensor.info.activeArraySize", android.graphics.Rect.class); 2001 2002 /** 2003 * <p>The area of the image sensor which corresponds to active pixels prior to the 2004 * application of any geometric distortion correction.</p> 2005 * <p>This is the rectangle representing the size of the active region of the sensor (i.e. 2006 * the region that actually receives light from the scene) before any geometric correction 2007 * has been applied, and should be treated as the active region rectangle for any of the 2008 * raw formats. All metadata associated with raw processing (e.g. the lens shading 2009 * correction map, and radial distortion fields) treats the top, left of this rectangle as 2010 * the origin, (0,0).</p> 2011 * <p>The size of this region determines the maximum field of view and the maximum number of 2012 * pixels that an image from this sensor can contain, prior to the application of 2013 * geometric distortion correction. The effective maximum pixel dimensions of a 2014 * post-distortion-corrected image is given by the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} 2015 * field, and the effective maximum field of view for a post-distortion-corrected image 2016 * can be calculated by applying the geometric distortion correction fields to this 2017 * rectangle, and cropping to the rectangle given in {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p> 2018 * <p>E.g. to calculate position of a pixel, (x,y), in a processed YUV output image with the 2019 * dimensions in {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} given the position of a pixel, 2020 * (x', y'), in the raw pixel array with dimensions give in 2021 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}:</p> 2022 * <ol> 2023 * <li>Choose a pixel (x', y') within the active array region of the raw buffer given in 2024 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}, otherwise this pixel is considered 2025 * to be outside of the FOV, and will not be shown in the processed output image.</li> 2026 * <li>Apply geometric distortion correction to get the post-distortion pixel coordinate, 2027 * (x_i, y_i). When applying geometric correction metadata, note that metadata for raw 2028 * buffers is defined relative to the top, left of the 2029 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} rectangle.</li> 2030 * <li>If the resulting corrected pixel coordinate is within the region given in 2031 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, then the position of this pixel in the 2032 * processed output image buffer is <code>(x_i - activeArray.left, y_i - activeArray.top)</code>, 2033 * when the top, left coordinate of that buffer is treated as (0, 0).</li> 2034 * </ol> 2035 * <p>Thus, for pixel x',y' = (25, 25) on a sensor where {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize} 2036 * is (100,100), {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} is (10, 10, 100, 100), 2037 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} is (20, 20, 80, 80), and the geometric distortion 2038 * correction doesn't change the pixel coordinate, the resulting pixel selected in 2039 * pixel coordinates would be x,y = (25, 25) relative to the top,left of the raw buffer 2040 * with dimensions given in {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}, and would be (5, 5) 2041 * relative to the top,left of post-processed YUV output buffer with dimensions given in 2042 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p> 2043 * <p>The currently supported fields that correct for geometric distortion are:</p> 2044 * <ol> 2045 * <li>android.lens.radialDistortion.</li> 2046 * </ol> 2047 * <p>If all of the geometric distortion fields are no-ops, this rectangle will be the same 2048 * as the post-distortion-corrected rectangle given in 2049 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p> 2050 * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of 2051 * the full pixel array, and the size of the full pixel array is given by 2052 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p> 2053 * <p>The pre-correction active array may be smaller than the full pixel array, since the 2054 * full array may include black calibration pixels or other inactive regions.</p> 2055 * <p><b>Units</b>: Pixel coordinates on the image sensor</p> 2056 * <p>This key is available on all devices.</p> 2057 * 2058 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 2059 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE 2060 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE 2061 */ 2062 @PublicKey 2063 public static final Key<android.graphics.Rect> SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE = 2064 new Key<android.graphics.Rect>("android.sensor.info.preCorrectionActiveArraySize", android.graphics.Rect.class); 2065 2066 /** 2067 * <p>Range of sensitivities for {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} supported by this 2068 * camera device.</p> 2069 * <p>The values are the standard ISO sensitivity values, 2070 * as defined in ISO 12232:2006.</p> 2071 * <p><b>Range of valid values:</b><br> 2072 * Min <= 100, Max >= 800</p> 2073 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2074 * <p><b>Full capability</b> - 2075 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 2076 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2077 * 2078 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2079 * @see CaptureRequest#SENSOR_SENSITIVITY 2080 */ 2081 @PublicKey 2082 public static final Key<android.util.Range<Integer>> SENSOR_INFO_SENSITIVITY_RANGE = 2083 new Key<android.util.Range<Integer>>("android.sensor.info.sensitivityRange", new TypeReference<android.util.Range<Integer>>() {{ }}); 2084 2085 /** 2086 * <p>The arrangement of color filters on sensor; 2087 * represents the colors in the top-left 2x2 section of 2088 * the sensor, in reading order.</p> 2089 * <p><b>Possible values:</b> 2090 * <ul> 2091 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB RGGB}</li> 2092 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG GRBG}</li> 2093 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG GBRG}</li> 2094 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR BGGR}</li> 2095 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB RGB}</li> 2096 * </ul></p> 2097 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2098 * <p><b>Full capability</b> - 2099 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 2100 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2101 * 2102 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2103 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB 2104 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG 2105 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG 2106 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR 2107 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB 2108 */ 2109 @PublicKey 2110 public static final Key<Integer> SENSOR_INFO_COLOR_FILTER_ARRANGEMENT = 2111 new Key<Integer>("android.sensor.info.colorFilterArrangement", int.class); 2112 2113 /** 2114 * <p>The range of image exposure times for {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} supported 2115 * by this camera device.</p> 2116 * <p><b>Units</b>: Nanoseconds</p> 2117 * <p><b>Range of valid values:</b><br> 2118 * The minimum exposure time will be less than 100 us. For FULL 2119 * capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL), 2120 * the maximum exposure time will be greater than 100ms.</p> 2121 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2122 * <p><b>Full capability</b> - 2123 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 2124 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2125 * 2126 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2127 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 2128 */ 2129 @PublicKey 2130 public static final Key<android.util.Range<Long>> SENSOR_INFO_EXPOSURE_TIME_RANGE = 2131 new Key<android.util.Range<Long>>("android.sensor.info.exposureTimeRange", new TypeReference<android.util.Range<Long>>() {{ }}); 2132 2133 /** 2134 * <p>The maximum possible frame duration (minimum frame rate) for 2135 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} that is supported this camera device.</p> 2136 * <p>Attempting to use frame durations beyond the maximum will result in the frame 2137 * duration being clipped to the maximum. See that control for a full definition of frame 2138 * durations.</p> 2139 * <p>Refer to {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration } 2140 * for the minimum frame duration values.</p> 2141 * <p><b>Units</b>: Nanoseconds</p> 2142 * <p><b>Range of valid values:</b><br> 2143 * For FULL capability devices 2144 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL), at least 100ms.</p> 2145 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2146 * <p><b>Full capability</b> - 2147 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 2148 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2149 * 2150 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2151 * @see CaptureRequest#SENSOR_FRAME_DURATION 2152 */ 2153 @PublicKey 2154 public static final Key<Long> SENSOR_INFO_MAX_FRAME_DURATION = 2155 new Key<Long>("android.sensor.info.maxFrameDuration", long.class); 2156 2157 /** 2158 * <p>The physical dimensions of the full pixel 2159 * array.</p> 2160 * <p>This is the physical size of the sensor pixel 2161 * array defined by {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p> 2162 * <p><b>Units</b>: Millimeters</p> 2163 * <p>This key is available on all devices.</p> 2164 * 2165 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE 2166 */ 2167 @PublicKey 2168 public static final Key<android.util.SizeF> SENSOR_INFO_PHYSICAL_SIZE = 2169 new Key<android.util.SizeF>("android.sensor.info.physicalSize", android.util.SizeF.class); 2170 2171 /** 2172 * <p>Dimensions of the full pixel array, possibly 2173 * including black calibration pixels.</p> 2174 * <p>The pixel count of the full pixel array of the image sensor, which covers 2175 * {@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize} area. This represents the full pixel dimensions of 2176 * the raw buffers produced by this sensor.</p> 2177 * <p>If a camera device supports raw sensor formats, either this or 2178 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} is the maximum dimensions for the raw 2179 * output formats listed in {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} (this depends on 2180 * whether or not the image sensor returns buffers containing pixels that are not 2181 * part of the active array region for blacklevel calibration or other purposes).</p> 2182 * <p>Some parts of the full pixel array may not receive light from the scene, 2183 * or be otherwise inactive. The {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} key 2184 * defines the rectangle of active pixels that will be included in processed image 2185 * formats.</p> 2186 * <p><b>Units</b>: Pixels</p> 2187 * <p>This key is available on all devices.</p> 2188 * 2189 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP 2190 * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE 2191 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE 2192 */ 2193 @PublicKey 2194 public static final Key<android.util.Size> SENSOR_INFO_PIXEL_ARRAY_SIZE = 2195 new Key<android.util.Size>("android.sensor.info.pixelArraySize", android.util.Size.class); 2196 2197 /** 2198 * <p>Maximum raw value output by sensor.</p> 2199 * <p>This specifies the fully-saturated encoding level for the raw 2200 * sample values from the sensor. This is typically caused by the 2201 * sensor becoming highly non-linear or clipping. The minimum for 2202 * each channel is specified by the offset in the 2203 * {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} key.</p> 2204 * <p>The white level is typically determined either by sensor bit depth 2205 * (8-14 bits is expected), or by the point where the sensor response 2206 * becomes too non-linear to be useful. The default value for this is 2207 * maximum representable value for a 16-bit raw sample (2^16 - 1).</p> 2208 * <p><b>Range of valid values:</b><br> 2209 * > 255 (8-bit output)</p> 2210 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2211 * 2212 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN 2213 */ 2214 @PublicKey 2215 public static final Key<Integer> SENSOR_INFO_WHITE_LEVEL = 2216 new Key<Integer>("android.sensor.info.whiteLevel", int.class); 2217 2218 /** 2219 * <p>The time base source for sensor capture start timestamps.</p> 2220 * <p>The timestamps provided for captures are always in nanoseconds and monotonic, but 2221 * may not based on a time source that can be compared to other system time sources.</p> 2222 * <p>This characteristic defines the source for the timestamps, and therefore whether they 2223 * can be compared against other system time sources/timestamps.</p> 2224 * <p><b>Possible values:</b> 2225 * <ul> 2226 * <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN UNKNOWN}</li> 2227 * <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME REALTIME}</li> 2228 * </ul></p> 2229 * <p>This key is available on all devices.</p> 2230 * @see #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN 2231 * @see #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME 2232 */ 2233 @PublicKey 2234 public static final Key<Integer> SENSOR_INFO_TIMESTAMP_SOURCE = 2235 new Key<Integer>("android.sensor.info.timestampSource", int.class); 2236 2237 /** 2238 * <p>Whether the RAW images output from this camera device are subject to 2239 * lens shading correction.</p> 2240 * <p>If TRUE, all images produced by the camera device in the RAW image formats will 2241 * have lens shading correction already applied to it. If FALSE, the images will 2242 * not be adjusted for lens shading correction. 2243 * See {@link CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW android.request.maxNumOutputRaw} for a list of RAW image formats.</p> 2244 * <p>This key will be <code>null</code> for all devices do not report this information. 2245 * Devices with RAW capability will always report this information in this key.</p> 2246 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2247 * 2248 * @see CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW 2249 */ 2250 @PublicKey 2251 public static final Key<Boolean> SENSOR_INFO_LENS_SHADING_APPLIED = 2252 new Key<Boolean>("android.sensor.info.lensShadingApplied", boolean.class); 2253 2254 /** 2255 * <p>The standard reference illuminant used as the scene light source when 2256 * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1}, 2257 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and 2258 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} matrices.</p> 2259 * <p>The values in this key correspond to the values defined for the 2260 * EXIF LightSource tag. These illuminants are standard light sources 2261 * that are often used calibrating camera devices.</p> 2262 * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1}, 2263 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and 2264 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} will also be present.</p> 2265 * <p>Some devices may choose to provide a second set of calibration 2266 * information for improved quality, including 2267 * {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2} and its corresponding matrices.</p> 2268 * <p><b>Possible values:</b> 2269 * <ul> 2270 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT DAYLIGHT}</li> 2271 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT FLUORESCENT}</li> 2272 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN TUNGSTEN}</li> 2273 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLASH FLASH}</li> 2274 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER FINE_WEATHER}</li> 2275 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER CLOUDY_WEATHER}</li> 2276 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_SHADE SHADE}</li> 2277 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT DAYLIGHT_FLUORESCENT}</li> 2278 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT DAY_WHITE_FLUORESCENT}</li> 2279 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT COOL_WHITE_FLUORESCENT}</li> 2280 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT WHITE_FLUORESCENT}</li> 2281 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A STANDARD_A}</li> 2282 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B STANDARD_B}</li> 2283 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C STANDARD_C}</li> 2284 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D55 D55}</li> 2285 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D65 D65}</li> 2286 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D75 D75}</li> 2287 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D50 D50}</li> 2288 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN ISO_STUDIO_TUNGSTEN}</li> 2289 * </ul></p> 2290 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2291 * 2292 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 2293 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 2294 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX1 2295 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 2296 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT 2297 * @see #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT 2298 * @see #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN 2299 * @see #SENSOR_REFERENCE_ILLUMINANT1_FLASH 2300 * @see #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER 2301 * @see #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER 2302 * @see #SENSOR_REFERENCE_ILLUMINANT1_SHADE 2303 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT 2304 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT 2305 * @see #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT 2306 * @see #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT 2307 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A 2308 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B 2309 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C 2310 * @see #SENSOR_REFERENCE_ILLUMINANT1_D55 2311 * @see #SENSOR_REFERENCE_ILLUMINANT1_D65 2312 * @see #SENSOR_REFERENCE_ILLUMINANT1_D75 2313 * @see #SENSOR_REFERENCE_ILLUMINANT1_D50 2314 * @see #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN 2315 */ 2316 @PublicKey 2317 public static final Key<Integer> SENSOR_REFERENCE_ILLUMINANT1 = 2318 new Key<Integer>("android.sensor.referenceIlluminant1", int.class); 2319 2320 /** 2321 * <p>The standard reference illuminant used as the scene light source when 2322 * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2}, 2323 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and 2324 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} matrices.</p> 2325 * <p>See {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1} for more details.</p> 2326 * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2}, 2327 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and 2328 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} will also be present.</p> 2329 * <p><b>Range of valid values:</b><br> 2330 * Any value listed in {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}</p> 2331 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2332 * 2333 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 2334 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 2335 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX2 2336 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 2337 */ 2338 @PublicKey 2339 public static final Key<Byte> SENSOR_REFERENCE_ILLUMINANT2 = 2340 new Key<Byte>("android.sensor.referenceIlluminant2", byte.class); 2341 2342 /** 2343 * <p>A per-device calibration transform matrix that maps from the 2344 * reference sensor colorspace to the actual device sensor colorspace.</p> 2345 * <p>This matrix is used to correct for per-device variations in the 2346 * sensor colorspace, and is used for processing raw buffer data.</p> 2347 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and 2348 * contains a per-device calibration transform that maps colors 2349 * from reference sensor color space (i.e. the "golden module" 2350 * colorspace) into this camera device's native sensor color 2351 * space under the first reference illuminant 2352 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p> 2353 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2354 * 2355 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 2356 */ 2357 @PublicKey 2358 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM1 = 2359 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform1", android.hardware.camera2.params.ColorSpaceTransform.class); 2360 2361 /** 2362 * <p>A per-device calibration transform matrix that maps from the 2363 * reference sensor colorspace to the actual device sensor colorspace 2364 * (this is the colorspace of the raw buffer data).</p> 2365 * <p>This matrix is used to correct for per-device variations in the 2366 * sensor colorspace, and is used for processing raw buffer data.</p> 2367 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and 2368 * contains a per-device calibration transform that maps colors 2369 * from reference sensor color space (i.e. the "golden module" 2370 * colorspace) into this camera device's native sensor color 2371 * space under the second reference illuminant 2372 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p> 2373 * <p>This matrix will only be present if the second reference 2374 * illuminant is present.</p> 2375 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2376 * 2377 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 2378 */ 2379 @PublicKey 2380 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM2 = 2381 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform2", android.hardware.camera2.params.ColorSpaceTransform.class); 2382 2383 /** 2384 * <p>A matrix that transforms color values from CIE XYZ color space to 2385 * reference sensor color space.</p> 2386 * <p>This matrix is used to convert from the standard CIE XYZ color 2387 * space to the reference sensor colorspace, and is used when processing 2388 * raw buffer data.</p> 2389 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and 2390 * contains a color transform matrix that maps colors from the CIE 2391 * XYZ color space to the reference sensor color space (i.e. the 2392 * "golden module" colorspace) under the first reference illuminant 2393 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p> 2394 * <p>The white points chosen in both the reference sensor color space 2395 * and the CIE XYZ colorspace when calculating this transform will 2396 * match the standard white point for the first reference illuminant 2397 * (i.e. no chromatic adaptation will be applied by this transform).</p> 2398 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2399 * 2400 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 2401 */ 2402 @PublicKey 2403 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM1 = 2404 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform1", android.hardware.camera2.params.ColorSpaceTransform.class); 2405 2406 /** 2407 * <p>A matrix that transforms color values from CIE XYZ color space to 2408 * reference sensor color space.</p> 2409 * <p>This matrix is used to convert from the standard CIE XYZ color 2410 * space to the reference sensor colorspace, and is used when processing 2411 * raw buffer data.</p> 2412 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and 2413 * contains a color transform matrix that maps colors from the CIE 2414 * XYZ color space to the reference sensor color space (i.e. the 2415 * "golden module" colorspace) under the second reference illuminant 2416 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p> 2417 * <p>The white points chosen in both the reference sensor color space 2418 * and the CIE XYZ colorspace when calculating this transform will 2419 * match the standard white point for the second reference illuminant 2420 * (i.e. no chromatic adaptation will be applied by this transform).</p> 2421 * <p>This matrix will only be present if the second reference 2422 * illuminant is present.</p> 2423 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2424 * 2425 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 2426 */ 2427 @PublicKey 2428 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM2 = 2429 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform2", android.hardware.camera2.params.ColorSpaceTransform.class); 2430 2431 /** 2432 * <p>A matrix that transforms white balanced camera colors from the reference 2433 * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p> 2434 * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and 2435 * is used when processing raw buffer data.</p> 2436 * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains 2437 * a color transform matrix that maps white balanced colors from the 2438 * reference sensor color space to the CIE XYZ color space with a D50 white 2439 * point.</p> 2440 * <p>Under the first reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}) 2441 * this matrix is chosen so that the standard white point for this reference 2442 * illuminant in the reference sensor colorspace is mapped to D50 in the 2443 * CIE XYZ colorspace.</p> 2444 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2445 * 2446 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 2447 */ 2448 @PublicKey 2449 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX1 = 2450 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix1", android.hardware.camera2.params.ColorSpaceTransform.class); 2451 2452 /** 2453 * <p>A matrix that transforms white balanced camera colors from the reference 2454 * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p> 2455 * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and 2456 * is used when processing raw buffer data.</p> 2457 * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains 2458 * a color transform matrix that maps white balanced colors from the 2459 * reference sensor color space to the CIE XYZ color space with a D50 white 2460 * point.</p> 2461 * <p>Under the second reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}) 2462 * this matrix is chosen so that the standard white point for this reference 2463 * illuminant in the reference sensor colorspace is mapped to D50 in the 2464 * CIE XYZ colorspace.</p> 2465 * <p>This matrix will only be present if the second reference 2466 * illuminant is present.</p> 2467 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2468 * 2469 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 2470 */ 2471 @PublicKey 2472 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX2 = 2473 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix2", android.hardware.camera2.params.ColorSpaceTransform.class); 2474 2475 /** 2476 * <p>A fixed black level offset for each of the color filter arrangement 2477 * (CFA) mosaic channels.</p> 2478 * <p>This key specifies the zero light value for each of the CFA mosaic 2479 * channels in the camera sensor. The maximal value output by the 2480 * sensor is represented by the value in {@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}.</p> 2481 * <p>The values are given in the same order as channels listed for the CFA 2482 * layout key (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}), i.e. the 2483 * nth value given corresponds to the black level offset for the nth 2484 * color channel listed in the CFA.</p> 2485 * <p><b>Range of valid values:</b><br> 2486 * >= 0 for each.</p> 2487 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2488 * 2489 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT 2490 * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL 2491 */ 2492 @PublicKey 2493 public static final Key<android.hardware.camera2.params.BlackLevelPattern> SENSOR_BLACK_LEVEL_PATTERN = 2494 new Key<android.hardware.camera2.params.BlackLevelPattern>("android.sensor.blackLevelPattern", android.hardware.camera2.params.BlackLevelPattern.class); 2495 2496 /** 2497 * <p>Maximum sensitivity that is implemented 2498 * purely through analog gain.</p> 2499 * <p>For {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} values less than or 2500 * equal to this, all applied gain must be analog. For 2501 * values above this, the gain applied can be a mix of analog and 2502 * digital.</p> 2503 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2504 * <p><b>Full capability</b> - 2505 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 2506 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2507 * 2508 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2509 * @see CaptureRequest#SENSOR_SENSITIVITY 2510 */ 2511 @PublicKey 2512 public static final Key<Integer> SENSOR_MAX_ANALOG_SENSITIVITY = 2513 new Key<Integer>("android.sensor.maxAnalogSensitivity", int.class); 2514 2515 /** 2516 * <p>Clockwise angle through which the output image needs to be rotated to be 2517 * upright on the device screen in its native orientation.</p> 2518 * <p>Also defines the direction of rolling shutter readout, which is from top to bottom in 2519 * the sensor's coordinate system.</p> 2520 * <p><b>Units</b>: Degrees of clockwise rotation; always a multiple of 2521 * 90</p> 2522 * <p><b>Range of valid values:</b><br> 2523 * 0, 90, 180, 270</p> 2524 * <p>This key is available on all devices.</p> 2525 */ 2526 @PublicKey 2527 public static final Key<Integer> SENSOR_ORIENTATION = 2528 new Key<Integer>("android.sensor.orientation", int.class); 2529 2530 /** 2531 * <p>List of sensor test pattern modes for {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode} 2532 * supported by this camera device.</p> 2533 * <p>Defaults to OFF, and always includes OFF if defined.</p> 2534 * <p><b>Range of valid values:</b><br> 2535 * Any value listed in {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}</p> 2536 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2537 * 2538 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 2539 */ 2540 @PublicKey 2541 public static final Key<int[]> SENSOR_AVAILABLE_TEST_PATTERN_MODES = 2542 new Key<int[]>("android.sensor.availableTestPatternModes", int[].class); 2543 2544 /** 2545 * <p>List of lens shading modes for {@link CaptureRequest#SHADING_MODE android.shading.mode} that are supported by this camera device.</p> 2546 * <p>This list contains lens shading modes that can be set for the camera device. 2547 * Camera devices that support the MANUAL_POST_PROCESSING capability will always 2548 * list OFF and FAST mode. This includes all FULL level devices. 2549 * LEGACY devices will always only support FAST mode.</p> 2550 * <p><b>Range of valid values:</b><br> 2551 * Any value listed in {@link CaptureRequest#SHADING_MODE android.shading.mode}</p> 2552 * <p>This key is available on all devices.</p> 2553 * 2554 * @see CaptureRequest#SHADING_MODE 2555 */ 2556 @PublicKey 2557 public static final Key<int[]> SHADING_AVAILABLE_MODES = 2558 new Key<int[]>("android.shading.availableModes", int[].class); 2559 2560 /** 2561 * <p>List of face detection modes for {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} that are 2562 * supported by this camera device.</p> 2563 * <p>OFF is always supported.</p> 2564 * <p><b>Range of valid values:</b><br> 2565 * Any value listed in {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}</p> 2566 * <p>This key is available on all devices.</p> 2567 * 2568 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 2569 */ 2570 @PublicKey 2571 public static final Key<int[]> STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES = 2572 new Key<int[]>("android.statistics.info.availableFaceDetectModes", int[].class); 2573 2574 /** 2575 * <p>The maximum number of simultaneously detectable 2576 * faces.</p> 2577 * <p><b>Range of valid values:</b><br> 2578 * 0 for cameras without available face detection; otherwise: 2579 * <code>>=4</code> for LIMITED or FULL hwlevel devices or 2580 * <code>>0</code> for LEGACY devices.</p> 2581 * <p>This key is available on all devices.</p> 2582 */ 2583 @PublicKey 2584 public static final Key<Integer> STATISTICS_INFO_MAX_FACE_COUNT = 2585 new Key<Integer>("android.statistics.info.maxFaceCount", int.class); 2586 2587 /** 2588 * <p>List of hot pixel map output modes for {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode} that are 2589 * supported by this camera device.</p> 2590 * <p>If no hotpixel map output is available for this camera device, this will contain only 2591 * <code>false</code>.</p> 2592 * <p>ON is always supported on devices with the RAW capability.</p> 2593 * <p><b>Range of valid values:</b><br> 2594 * Any value listed in {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode}</p> 2595 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2596 * 2597 * @see CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE 2598 */ 2599 @PublicKey 2600 public static final Key<boolean[]> STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES = 2601 new Key<boolean[]>("android.statistics.info.availableHotPixelMapModes", boolean[].class); 2602 2603 /** 2604 * <p>List of lens shading map output modes for {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} that 2605 * are supported by this camera device.</p> 2606 * <p>If no lens shading map output is available for this camera device, this key will 2607 * contain only OFF.</p> 2608 * <p>ON is always supported on devices with the RAW capability. 2609 * LEGACY mode devices will always only support OFF.</p> 2610 * <p><b>Range of valid values:</b><br> 2611 * Any value listed in {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode}</p> 2612 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2613 * 2614 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 2615 */ 2616 @PublicKey 2617 public static final Key<int[]> STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES = 2618 new Key<int[]>("android.statistics.info.availableLensShadingMapModes", int[].class); 2619 2620 /** 2621 * <p>Maximum number of supported points in the 2622 * tonemap curve that can be used for {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p> 2623 * <p>If the actual number of points provided by the application (in {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}*) is 2624 * less than this maximum, the camera device will resample the curve to its internal 2625 * representation, using linear interpolation.</p> 2626 * <p>The output curves in the result metadata may have a different number 2627 * of points than the input curves, and will represent the actual 2628 * hardware curves used as closely as possible when linearly interpolated.</p> 2629 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2630 * <p><b>Full capability</b> - 2631 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 2632 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2633 * 2634 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2635 * @see CaptureRequest#TONEMAP_CURVE 2636 */ 2637 @PublicKey 2638 public static final Key<Integer> TONEMAP_MAX_CURVE_POINTS = 2639 new Key<Integer>("android.tonemap.maxCurvePoints", int.class); 2640 2641 /** 2642 * <p>List of tonemapping modes for {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} that are supported by this camera 2643 * device.</p> 2644 * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always contain 2645 * at least one of below mode combinations:</p> 2646 * <ul> 2647 * <li>CONTRAST_CURVE, FAST and HIGH_QUALITY</li> 2648 * <li>GAMMA_VALUE, PRESET_CURVE, FAST and HIGH_QUALITY</li> 2649 * </ul> 2650 * <p>This includes all FULL level devices.</p> 2651 * <p><b>Range of valid values:</b><br> 2652 * Any value listed in {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</p> 2653 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2654 * <p><b>Full capability</b> - 2655 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 2656 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2657 * 2658 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2659 * @see CaptureRequest#TONEMAP_MODE 2660 */ 2661 @PublicKey 2662 public static final Key<int[]> TONEMAP_AVAILABLE_TONE_MAP_MODES = 2663 new Key<int[]>("android.tonemap.availableToneMapModes", int[].class); 2664 2665 /** 2666 * <p>A list of camera LEDs that are available on this system.</p> 2667 * <p><b>Possible values:</b> 2668 * <ul> 2669 * <li>{@link #LED_AVAILABLE_LEDS_TRANSMIT TRANSMIT}</li> 2670 * </ul></p> 2671 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2672 * @see #LED_AVAILABLE_LEDS_TRANSMIT 2673 * @hide 2674 */ 2675 public static final Key<int[]> LED_AVAILABLE_LEDS = 2676 new Key<int[]>("android.led.availableLeds", int[].class); 2677 2678 /** 2679 * <p>Generally classifies the overall set of the camera device functionality.</p> 2680 * <p>Camera devices will come in three flavors: LEGACY, LIMITED and FULL.</p> 2681 * <p>A FULL device will support below capabilities:</p> 2682 * <ul> 2683 * <li>BURST_CAPTURE capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains BURST_CAPTURE)</li> 2684 * <li>Per frame control ({@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} <code>==</code> PER_FRAME_CONTROL)</li> 2685 * <li>Manual sensor control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains MANUAL_SENSOR)</li> 2686 * <li>Manual post-processing control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains 2687 * MANUAL_POST_PROCESSING)</li> 2688 * <li>Arbitrary cropping region ({@link CameraCharacteristics#SCALER_CROPPING_TYPE android.scaler.croppingType} <code>==</code> FREEFORM)</li> 2689 * <li>At least 3 processed (but not stalling) format output streams 2690 * ({@link CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_PROC android.request.maxNumOutputProc} <code>>=</code> 3)</li> 2691 * <li>The required stream configurations defined in android.scaler.availableStreamConfigurations</li> 2692 * <li>The required exposure time range defined in {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li> 2693 * <li>The required maxFrameDuration defined in {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li> 2694 * </ul> 2695 * <p>A LIMITED device may have some or none of the above characteristics. 2696 * To find out more refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p> 2697 * <p>Some features are not part of any particular hardware level or capability and must be 2698 * queried separately. These include:</p> 2699 * <ul> 2700 * <li>Calibrated timestamps ({@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} <code>==</code> REALTIME)</li> 2701 * <li>Precision lens control ({@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} <code>==</code> CALIBRATED)</li> 2702 * <li>Face detection ({@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes})</li> 2703 * <li>Optical or electrical image stabilization 2704 * ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization}, 2705 * {@link CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES android.control.availableVideoStabilizationModes})</li> 2706 * </ul> 2707 * <p>A LEGACY device does not support per-frame control, manual sensor control, manual 2708 * post-processing, arbitrary cropping regions, and has relaxed performance constraints.</p> 2709 * <p>Each higher level supports everything the lower level supports 2710 * in this order: FULL <code>></code> LIMITED <code>></code> LEGACY.</p> 2711 * <p><b>Possible values:</b> 2712 * <ul> 2713 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED}</li> 2714 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL}</li> 2715 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY LEGACY}</li> 2716 * </ul></p> 2717 * <p>This key is available on all devices.</p> 2718 * 2719 * @see CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES 2720 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION 2721 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION 2722 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 2723 * @see CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_PROC 2724 * @see CameraCharacteristics#SCALER_CROPPING_TYPE 2725 * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE 2726 * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION 2727 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE 2728 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES 2729 * @see CameraCharacteristics#SYNC_MAX_LATENCY 2730 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED 2731 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_FULL 2732 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY 2733 */ 2734 @PublicKey 2735 public static final Key<Integer> INFO_SUPPORTED_HARDWARE_LEVEL = 2736 new Key<Integer>("android.info.supportedHardwareLevel", int.class); 2737 2738 /** 2739 * <p>The maximum number of frames that can occur after a request 2740 * (different than the previous) has been submitted, and before the 2741 * result's state becomes synchronized (by setting 2742 * android.sync.frameNumber to a non-negative value).</p> 2743 * <p>This defines the maximum distance (in number of metadata results), 2744 * between android.sync.frameNumber and the equivalent 2745 * frame number for that result.</p> 2746 * <p>In other words this acts as an upper boundary for how many frames 2747 * must occur before the camera device knows for a fact that the new 2748 * submitted camera settings have been applied in outgoing frames.</p> 2749 * <p>For example if the distance was 2,</p> 2750 * <pre><code>initial request = X (repeating) 2751 * request1 = X 2752 * request2 = Y 2753 * request3 = Y 2754 * request4 = Y 2755 * 2756 * where requestN has frameNumber N, and the first of the repeating 2757 * initial request's has frameNumber F (and F < 1). 2758 * 2759 * initial result = X' + { android.sync.frameNumber == F } 2760 * result1 = X' + { android.sync.frameNumber == F } 2761 * result2 = X' + { android.sync.frameNumber == CONVERGING } 2762 * result3 = X' + { android.sync.frameNumber == CONVERGING } 2763 * result4 = X' + { android.sync.frameNumber == 2 } 2764 * 2765 * where resultN has frameNumber N. 2766 * </code></pre> 2767 * <p>Since <code>result4</code> has a <code>frameNumber == 4</code> and 2768 * <code>android.sync.frameNumber == 2</code>, the distance is clearly 2769 * <code>4 - 2 = 2</code>.</p> 2770 * <p><b>Units</b>: Frame counts</p> 2771 * <p><b>Possible values:</b> 2772 * <ul> 2773 * <li>{@link #SYNC_MAX_LATENCY_PER_FRAME_CONTROL PER_FRAME_CONTROL}</li> 2774 * <li>{@link #SYNC_MAX_LATENCY_UNKNOWN UNKNOWN}</li> 2775 * </ul></p> 2776 * <p><b>Available values for this device:</b><br> 2777 * A positive value, PER_FRAME_CONTROL, or UNKNOWN.</p> 2778 * <p>This key is available on all devices.</p> 2779 * @see #SYNC_MAX_LATENCY_PER_FRAME_CONTROL 2780 * @see #SYNC_MAX_LATENCY_UNKNOWN 2781 */ 2782 @PublicKey 2783 public static final Key<Integer> SYNC_MAX_LATENCY = 2784 new Key<Integer>("android.sync.maxLatency", int.class); 2785 2786 /** 2787 * <p>The maximal camera capture pipeline stall (in unit of frame count) introduced by a 2788 * reprocess capture request.</p> 2789 * <p>The key describes the maximal interference that one reprocess (input) request 2790 * can introduce to the camera simultaneous streaming of regular (output) capture 2791 * requests, including repeating requests.</p> 2792 * <p>When a reprocessing capture request is submitted while a camera output repeating request 2793 * (e.g. preview) is being served by the camera device, it may preempt the camera capture 2794 * pipeline for at least one frame duration so that the camera device is unable to process 2795 * the following capture request in time for the next sensor start of exposure boundary. 2796 * When this happens, the application may observe a capture time gap (longer than one frame 2797 * duration) between adjacent capture output frames, which usually exhibits as preview 2798 * glitch if the repeating request output targets include a preview surface. This key gives 2799 * the worst-case number of frame stall introduced by one reprocess request with any kind of 2800 * formats/sizes combination.</p> 2801 * <p>If this key reports 0, it means a reprocess request doesn't introduce any glitch to the 2802 * ongoing camera repeating request outputs, as if this reprocess request is never issued.</p> 2803 * <p>This key is supported if the camera device supports PRIVATE or YUV reprocessing ( 2804 * i.e. {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains PRIVATE_REPROCESSING or 2805 * YUV_REPROCESSING).</p> 2806 * <p><b>Units</b>: Number of frames.</p> 2807 * <p><b>Range of valid values:</b><br> 2808 * <= 4</p> 2809 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2810 * <p><b>Limited capability</b> - 2811 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 2812 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2813 * 2814 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2815 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 2816 */ 2817 @PublicKey 2818 public static final Key<Integer> REPROCESS_MAX_CAPTURE_STALL = 2819 new Key<Integer>("android.reprocess.maxCaptureStall", int.class); 2820 2821 /** 2822 * <p>The available depth dataspace stream 2823 * configurations that this camera device supports 2824 * (i.e. format, width, height, output/input stream).</p> 2825 * <p>These are output stream configurations for use with 2826 * dataSpace HAL_DATASPACE_DEPTH. The configurations are 2827 * listed as <code>(format, width, height, input?)</code> tuples.</p> 2828 * <p>Only devices that support depth output for at least 2829 * the HAL_PIXEL_FORMAT_Y16 dense depth map may include 2830 * this entry.</p> 2831 * <p>A device that also supports the HAL_PIXEL_FORMAT_BLOB 2832 * sparse depth point cloud must report a single entry for 2833 * the format in this list as <code>(HAL_PIXEL_FORMAT_BLOB, 2834 * android.depth.maxDepthSamples, 1, OUTPUT)</code> in addition to 2835 * the entries for HAL_PIXEL_FORMAT_Y16.</p> 2836 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2837 * <p><b>Limited capability</b> - 2838 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 2839 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2840 * 2841 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2842 * @hide 2843 */ 2844 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS = 2845 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.depth.availableDepthStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class); 2846 2847 /** 2848 * <p>This lists the minimum frame duration for each 2849 * format/size combination for depth output formats.</p> 2850 * <p>This should correspond to the frame duration when only that 2851 * stream is active, with all processing (typically in android.*.mode) 2852 * set to either OFF or FAST.</p> 2853 * <p>When multiple streams are used in a request, the minimum frame 2854 * duration will be max(individual stream min durations).</p> 2855 * <p>The minimum frame duration of a stream (of a particular format, size) 2856 * is the same regardless of whether the stream is input or output.</p> 2857 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and 2858 * android.scaler.availableStallDurations for more details about 2859 * calculating the max frame rate.</p> 2860 * <p>(Keep in sync with {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration })</p> 2861 * <p><b>Units</b>: (format, width, height, ns) x n</p> 2862 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2863 * <p><b>Limited capability</b> - 2864 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 2865 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2866 * 2867 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2868 * @see CaptureRequest#SENSOR_FRAME_DURATION 2869 * @hide 2870 */ 2871 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS = 2872 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); 2873 2874 /** 2875 * <p>This lists the maximum stall duration for each 2876 * output format/size combination for depth streams.</p> 2877 * <p>A stall duration is how much extra time would get added 2878 * to the normal minimum frame duration for a repeating request 2879 * that has streams with non-zero stall.</p> 2880 * <p>This functions similarly to 2881 * android.scaler.availableStallDurations for depth 2882 * streams.</p> 2883 * <p>All depth output stream formats may have a nonzero stall 2884 * duration.</p> 2885 * <p><b>Units</b>: (format, width, height, ns) x n</p> 2886 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2887 * <p><b>Limited capability</b> - 2888 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 2889 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2890 * 2891 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2892 * @hide 2893 */ 2894 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS = 2895 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); 2896 2897 /** 2898 * <p>Indicates whether a capture request may target both a 2899 * DEPTH16 / DEPTH_POINT_CLOUD output, and normal color outputs (such as 2900 * YUV_420_888, JPEG, or RAW) simultaneously.</p> 2901 * <p>If TRUE, including both depth and color outputs in a single 2902 * capture request is not supported. An application must interleave color 2903 * and depth requests. If FALSE, a single request can target both types 2904 * of output.</p> 2905 * <p>Typically, this restriction exists on camera devices that 2906 * need to emit a specific pattern or wavelength of light to 2907 * measure depth values, which causes the color image to be 2908 * corrupted during depth measurement.</p> 2909 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2910 * <p><b>Limited capability</b> - 2911 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 2912 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2913 * 2914 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2915 */ 2916 @PublicKey 2917 public static final Key<Boolean> DEPTH_DEPTH_IS_EXCLUSIVE = 2918 new Key<Boolean>("android.depth.depthIsExclusive", boolean.class); 2919 2920 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 2921 * End generated code 2922 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/ 2923 2924 2925 2926} 2927