CameraCharacteristics.java revision d3dbfb3f75cb1a6351e79d137c7ccfce498672cf
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 and fps range configurations 630 * supported by the camera device, in the format of (width, height, fps_min, fps_max).</p> 631 * <p>When HIGH_SPEED_VIDEO is supported in {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}, this metadata 632 * will list the supported high speed video size and fps range configurations. All the sizes 633 * listed in this configuration will be a subset of the sizes reported by {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } for processed 634 * non-stalling formats.</p> 635 * <p>For the high speed video use case, where the application will set 636 * {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} to HIGH_SPEED_VIDEO in capture requests, 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. Otherwise a request error might 644 * occur.</p> 645 * <p>For normal video recording use case, where some application will NOT set 646 * {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} to HIGH_SPEED_VIDEO in capture requests, the fps ranges 647 * reported in this metadata must not be used to setup capture requests, or it will cause 648 * request error.</p> 649 * <p><b>Range of valid values:</b><br></p> 650 * <p>For each configuration, the fps_max >= 60fps.</p> 651 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 652 * <p><b>Limited capability</b> - 653 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 654 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 655 * 656 * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES 657 * @see CaptureRequest#CONTROL_SCENE_MODE 658 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 659 * @hide 660 */ 661 public static final Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]> CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS = 662 new Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]>("android.control.availableHighSpeedVideoConfigurations", android.hardware.camera2.params.HighSpeedVideoConfiguration[].class); 663 664 /** 665 * <p>Whether the camera device supports {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</p> 666 * <p>Devices with MANUAL_SENSOR capability or BURST_CAPTURE capability will always 667 * list <code>true</code>. This includes FULL devices.</p> 668 * <p>This key is available on all devices.</p> 669 * 670 * @see CaptureRequest#CONTROL_AE_LOCK 671 */ 672 @PublicKey 673 public static final Key<Boolean> CONTROL_AE_LOCK_AVAILABLE = 674 new Key<Boolean>("android.control.aeLockAvailable", boolean.class); 675 676 /** 677 * <p>Whether the camera device supports {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</p> 678 * <p>Devices with MANUAL_POST_PROCESSING capability or BURST_CAPTURE capability will 679 * always list <code>true</code>. This includes FULL devices.</p> 680 * <p>This key is available on all devices.</p> 681 * 682 * @see CaptureRequest#CONTROL_AWB_LOCK 683 */ 684 @PublicKey 685 public static final Key<Boolean> CONTROL_AWB_LOCK_AVAILABLE = 686 new Key<Boolean>("android.control.awbLockAvailable", boolean.class); 687 688 /** 689 * <p>List of control modes for {@link CaptureRequest#CONTROL_MODE android.control.mode} that are supported by this camera 690 * device.</p> 691 * <p>This list contains control modes that can be set for the camera device. 692 * LEGACY mode devices will always support AUTO mode. LIMITED and FULL 693 * devices will always support OFF, AUTO modes.</p> 694 * <p><b>Range of valid values:</b><br> 695 * Any value listed in {@link CaptureRequest#CONTROL_MODE android.control.mode}</p> 696 * <p>This key is available on all devices.</p> 697 * 698 * @see CaptureRequest#CONTROL_MODE 699 */ 700 @PublicKey 701 public static final Key<int[]> CONTROL_AVAILABLE_MODES = 702 new Key<int[]>("android.control.availableModes", int[].class); 703 704 /** 705 * <p>List of edge enhancement modes for {@link CaptureRequest#EDGE_MODE android.edge.mode} that are supported by this camera 706 * device.</p> 707 * <p>Full-capability camera devices must always support OFF; all devices will list FAST.</p> 708 * <p><b>Range of valid values:</b><br> 709 * Any value listed in {@link CaptureRequest#EDGE_MODE android.edge.mode}</p> 710 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 711 * <p><b>Full capability</b> - 712 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 713 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 714 * 715 * @see CaptureRequest#EDGE_MODE 716 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 717 */ 718 @PublicKey 719 public static final Key<int[]> EDGE_AVAILABLE_EDGE_MODES = 720 new Key<int[]>("android.edge.availableEdgeModes", int[].class); 721 722 /** 723 * <p>Whether this camera device has a 724 * flash unit.</p> 725 * <p>Will be <code>false</code> if no flash is available.</p> 726 * <p>If there is no flash unit, none of the flash controls do 727 * anything. 728 * This key is available on all devices.</p> 729 */ 730 @PublicKey 731 public static final Key<Boolean> FLASH_INFO_AVAILABLE = 732 new Key<Boolean>("android.flash.info.available", boolean.class); 733 734 /** 735 * <p>List of hot pixel correction modes for {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode} that are supported by this 736 * camera device.</p> 737 * <p>FULL mode camera devices will always support FAST.</p> 738 * <p><b>Range of valid values:</b><br> 739 * Any value listed in {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode}</p> 740 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 741 * 742 * @see CaptureRequest#HOT_PIXEL_MODE 743 */ 744 @PublicKey 745 public static final Key<int[]> HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES = 746 new Key<int[]>("android.hotPixel.availableHotPixelModes", int[].class); 747 748 /** 749 * <p>List of JPEG thumbnail sizes for {@link CaptureRequest#JPEG_THUMBNAIL_SIZE android.jpeg.thumbnailSize} supported by this 750 * camera device.</p> 751 * <p>This list will include at least one non-zero resolution, plus <code>(0,0)</code> for indicating no 752 * thumbnail should be generated.</p> 753 * <p>Below condiditions will be satisfied for this size list:</p> 754 * <ul> 755 * <li>The sizes will be sorted by increasing pixel area (width x height). 756 * If several resolutions have the same area, they will be sorted by increasing width.</li> 757 * <li>The aspect ratio of the largest thumbnail size will be same as the 758 * aspect ratio of largest JPEG output size in android.scaler.availableStreamConfigurations. 759 * The largest size is defined as the size that has the largest pixel area 760 * in a given size list.</li> 761 * <li>Each output JPEG size in android.scaler.availableStreamConfigurations will have at least 762 * one corresponding size that has the same aspect ratio in availableThumbnailSizes, 763 * and vice versa.</li> 764 * <li>All non-<code>(0, 0)</code> sizes will have non-zero widths and heights. 765 * This key is available on all devices.</li> 766 * </ul> 767 * 768 * @see CaptureRequest#JPEG_THUMBNAIL_SIZE 769 */ 770 @PublicKey 771 public static final Key<android.util.Size[]> JPEG_AVAILABLE_THUMBNAIL_SIZES = 772 new Key<android.util.Size[]>("android.jpeg.availableThumbnailSizes", android.util.Size[].class); 773 774 /** 775 * <p>List of aperture size values for {@link CaptureRequest#LENS_APERTURE android.lens.aperture} that are 776 * supported by this camera device.</p> 777 * <p>If the camera device doesn't support a variable lens aperture, 778 * this list will contain only one value, which is the fixed aperture size.</p> 779 * <p>If the camera device supports a variable aperture, the aperture values 780 * in this list will be sorted in ascending order.</p> 781 * <p><b>Units</b>: The aperture f-number</p> 782 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 783 * <p><b>Full capability</b> - 784 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 785 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 786 * 787 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 788 * @see CaptureRequest#LENS_APERTURE 789 */ 790 @PublicKey 791 public static final Key<float[]> LENS_INFO_AVAILABLE_APERTURES = 792 new Key<float[]>("android.lens.info.availableApertures", float[].class); 793 794 /** 795 * <p>List of neutral density filter values for 796 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} that are supported by this camera device.</p> 797 * <p>If a neutral density filter is not supported by this camera device, 798 * this list will contain only 0. Otherwise, this list will include every 799 * filter density supported by the camera device, in ascending order.</p> 800 * <p><b>Units</b>: Exposure value (EV)</p> 801 * <p><b>Range of valid values:</b><br></p> 802 * <p>Values are >= 0</p> 803 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 804 * <p><b>Full capability</b> - 805 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 806 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 807 * 808 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 809 * @see CaptureRequest#LENS_FILTER_DENSITY 810 */ 811 @PublicKey 812 public static final Key<float[]> LENS_INFO_AVAILABLE_FILTER_DENSITIES = 813 new Key<float[]>("android.lens.info.availableFilterDensities", float[].class); 814 815 /** 816 * <p>List of focal lengths for {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength} that are supported by this camera 817 * device.</p> 818 * <p>If optical zoom is not supported, this list will only contain 819 * a single value corresponding to the fixed focal length of the 820 * device. Otherwise, this list will include every focal length supported 821 * by the camera device, in ascending order.</p> 822 * <p><b>Units</b>: Millimeters</p> 823 * <p><b>Range of valid values:</b><br></p> 824 * <p>Values are > 0</p> 825 * <p>This key is available on all devices.</p> 826 * 827 * @see CaptureRequest#LENS_FOCAL_LENGTH 828 */ 829 @PublicKey 830 public static final Key<float[]> LENS_INFO_AVAILABLE_FOCAL_LENGTHS = 831 new Key<float[]>("android.lens.info.availableFocalLengths", float[].class); 832 833 /** 834 * <p>List of optical image stabilization (OIS) modes for 835 * {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} that are supported by this camera device.</p> 836 * <p>If OIS is not supported by a given camera device, this list will 837 * contain only OFF.</p> 838 * <p><b>Range of valid values:</b><br> 839 * Any value listed in {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}</p> 840 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 841 * <p><b>Limited capability</b> - 842 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 843 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 844 * 845 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 846 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 847 */ 848 @PublicKey 849 public static final Key<int[]> LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION = 850 new Key<int[]>("android.lens.info.availableOpticalStabilization", int[].class); 851 852 /** 853 * <p>Hyperfocal distance for this lens.</p> 854 * <p>If the lens is not fixed focus, the camera device will report this 855 * field when {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} is APPROXIMATE or CALIBRATED.</p> 856 * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p> 857 * <p><b>Range of valid values:</b><br> 858 * If lens is fixed focus, >= 0. If lens has focuser unit, the value is 859 * within <code>(0.0f, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code></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 CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION 867 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 868 */ 869 @PublicKey 870 public static final Key<Float> LENS_INFO_HYPERFOCAL_DISTANCE = 871 new Key<Float>("android.lens.info.hyperfocalDistance", float.class); 872 873 /** 874 * <p>Shortest distance from frontmost surface 875 * of the lens that can be brought into sharp focus.</p> 876 * <p>If the lens is fixed-focus, this will be 877 * 0.</p> 878 * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p> 879 * <p><b>Range of valid values:</b><br> 880 * >= 0</p> 881 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 882 * <p><b>Limited capability</b> - 883 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 884 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 885 * 886 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 887 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION 888 */ 889 @PublicKey 890 public static final Key<Float> LENS_INFO_MINIMUM_FOCUS_DISTANCE = 891 new Key<Float>("android.lens.info.minimumFocusDistance", float.class); 892 893 /** 894 * <p>Dimensions of lens shading map.</p> 895 * <p>The map should be on the order of 30-40 rows and columns, and 896 * must be smaller than 64x64.</p> 897 * <p><b>Range of valid values:</b><br> 898 * Both values >= 1</p> 899 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 900 * <p><b>Full capability</b> - 901 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 902 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 903 * 904 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 905 * @hide 906 */ 907 public static final Key<android.util.Size> LENS_INFO_SHADING_MAP_SIZE = 908 new Key<android.util.Size>("android.lens.info.shadingMapSize", android.util.Size.class); 909 910 /** 911 * <p>The lens focus distance calibration quality.</p> 912 * <p>The lens focus distance calibration quality determines the reliability of 913 * focus related metadata entries, i.e. {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}, 914 * {@link CaptureResult#LENS_FOCUS_RANGE android.lens.focusRange}, {@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}, and 915 * {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}.</p> 916 * <p>APPROXIMATE and CALIBRATED devices report the focus metadata in 917 * units of diopters (1/meter), so <code>0.0f</code> represents focusing at infinity, 918 * and increasing positive numbers represent focusing closer and closer 919 * to the camera device. The focus distance control also uses diopters 920 * on these devices.</p> 921 * <p>UNCALIBRATED devices do not use units that are directly comparable 922 * to any real physical measurement, but <code>0.0f</code> still represents farthest 923 * focus, and {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} represents the 924 * nearest focus the device can achieve.</p> 925 * <p><b>Possible values:</b> 926 * <ul> 927 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED UNCALIBRATED}</li> 928 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE APPROXIMATE}</li> 929 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED CALIBRATED}</li> 930 * </ul></p> 931 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 932 * <p><b>Limited capability</b> - 933 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 934 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 935 * 936 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 937 * @see CaptureRequest#LENS_FOCUS_DISTANCE 938 * @see CaptureResult#LENS_FOCUS_RANGE 939 * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE 940 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 941 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED 942 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE 943 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED 944 */ 945 @PublicKey 946 public static final Key<Integer> LENS_INFO_FOCUS_DISTANCE_CALIBRATION = 947 new Key<Integer>("android.lens.info.focusDistanceCalibration", int.class); 948 949 /** 950 * <p>Direction the camera faces relative to 951 * device screen.</p> 952 * <p><b>Possible values:</b> 953 * <ul> 954 * <li>{@link #LENS_FACING_FRONT FRONT}</li> 955 * <li>{@link #LENS_FACING_BACK BACK}</li> 956 * <li>{@link #LENS_FACING_EXTERNAL EXTERNAL}</li> 957 * </ul></p> 958 * <p>This key is available on all devices.</p> 959 * @see #LENS_FACING_FRONT 960 * @see #LENS_FACING_BACK 961 * @see #LENS_FACING_EXTERNAL 962 */ 963 @PublicKey 964 public static final Key<Integer> LENS_FACING = 965 new Key<Integer>("android.lens.facing", int.class); 966 967 /** 968 * <p>The orientation of the camera relative to the sensor 969 * coordinate system.</p> 970 * <p>The four coefficients that describe the quarternion 971 * rotation from the Android sensor coordinate system to a 972 * camera-aligned coordinate system where the X-axis is 973 * aligned with the long side of the image sensor, the Y-axis 974 * is aligned with the short side of the image sensor, and 975 * the Z-axis is aligned with the optical axis of the sensor.</p> 976 * <p>To convert from the quarternion coefficients <code>(x,y,z,w)</code> 977 * to the axis of rotation <code>(a_x, a_y, a_z)</code> and rotation 978 * amount <code>theta</code>, the following formulas can be used:</p> 979 * <pre><code> theta = 2 * acos(w) 980 * a_x = x / sin(theta/2) 981 * a_y = y / sin(theta/2) 982 * a_z = z / sin(theta/2) 983 * </code></pre> 984 * <p>To create a 3x3 rotation matrix that applies the rotation 985 * defined by this quarternion, the following matrix can be 986 * used:</p> 987 * <pre><code>R = [ 1 - 2y^2 - 2z^2, 2xy - 2zw, 2xz + 2yw, 988 * 2xy + 2zw, 1 - 2x^2 - 2z^2, 2yz - 2xw, 989 * 2xz - 2yw, 2yz + 2xw, 1 - 2x^2 - 2y^2 ] 990 * </code></pre> 991 * <p>This matrix can then be used to apply the rotation to a 992 * column vector point with</p> 993 * <p><code>p' = Rp</code></p> 994 * <p>where <code>p</code> is in the device sensor coordinate system, and 995 * <code>p'</code> is in the camera-oriented coordinate system.</p> 996 * <p><b>Units</b>: 997 * Quarternion coefficients</p> 998 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 999 */ 1000 @PublicKey 1001 public static final Key<float[]> LENS_POSE_ROTATION = 1002 new Key<float[]>("android.lens.poseRotation", float[].class); 1003 1004 /** 1005 * <p>Position of the camera optical center.</p> 1006 * <p>The position of the camera device's lens optical center, 1007 * as a three-dimensional vector <code>(x,y,z)</code>, relative to the 1008 * optical center of the largest camera device facing in the 1009 * same direction as this camera, in the {@link android.hardware.SensorEvent Android sensor coordinate 1010 * axes}. Note that only the axis definitions are shared with 1011 * the sensor coordinate system, but not the origin.</p> 1012 * <p>If this device is the largest or only camera device with a 1013 * given facing, then this position will be <code>(0, 0, 0)</code>; a 1014 * camera device with a lens optical center located 3 cm from 1015 * the main sensor along the +X axis (to the right from the 1016 * user's perspective) will report <code>(0.03, 0, 0)</code>.</p> 1017 * <p>To transform a pixel coordinates between two cameras 1018 * facing the same direction, first the source camera 1019 * android.lens.radialDistortion must be corrected for. Then 1020 * the source camera android.lens.intrinsicCalibration needs 1021 * to be applied, followed by the {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} 1022 * of the source camera, the translation of the source camera 1023 * relative to the destination camera, the 1024 * {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the destination camera, and 1025 * finally the inverse of android.lens.intrinsicCalibration 1026 * of the destination camera. This obtains a 1027 * radial-distortion-free coordinate in the destination 1028 * camera pixel coordinates.</p> 1029 * <p>To compare this against a real image from the destination 1030 * camera, the destination camera image then needs to be 1031 * corrected for radial distortion before comparison or 1032 * sampling.</p> 1033 * <p><b>Units</b>: Meters</p> 1034 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1035 * 1036 * @see CameraCharacteristics#LENS_POSE_ROTATION 1037 */ 1038 @PublicKey 1039 public static final Key<float[]> LENS_POSE_TRANSLATION = 1040 new Key<float[]>("android.lens.poseTranslation", float[].class); 1041 1042 /** 1043 * <p>The parameters for this camera device's intrinsic 1044 * calibration.</p> 1045 * <p>The five calibration parameters that describe the 1046 * transform from camera-centric 3D coordinates to sensor 1047 * pixel coordinates:</p> 1048 * <pre><code>[f_x, f_y, c_x, c_y, s] 1049 * </code></pre> 1050 * <p>Where <code>f_x</code> and <code>f_y</code> are the horizontal and vertical 1051 * focal lengths, <code>[c_x, c_y]</code> is the position of the optical 1052 * axis, and <code>s</code> is a skew parameter for the sensor plane not 1053 * being aligned with the lens plane.</p> 1054 * <p>These are typically used within a transformation matrix K:</p> 1055 * <pre><code>K = [ f_x, s, c_x, 1056 * 0, f_y, c_y, 1057 * 0 0, 1 ] 1058 * </code></pre> 1059 * <p>which can then be combined with the camera pose rotation 1060 * <code>R</code> and translation <code>t</code> ({@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} and 1061 * {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}, respective) to calculate the 1062 * complete transform from world coordinates to pixel 1063 * coordinates:</p> 1064 * <pre><code>P = [ K 0 * [ R t 1065 * 0 1 ] 0 1 ] 1066 * </code></pre> 1067 * <p>and with <code>p_w</code> being a point in the world coordinate system 1068 * and <code>p_s</code> being a point in the camera active pixel array 1069 * coordinate system, and with the mapping including the 1070 * homogeneous division by z:</p> 1071 * <pre><code> p_h = (x_h, y_h, z_h) = P p_w 1072 * p_s = p_h / z_h 1073 * </code></pre> 1074 * <p>so <code>[x_s, y_s]</code> is the pixel coordinates of the world 1075 * point, <code>z_s = 1</code>, and <code>w_s</code> is a measurement of disparity 1076 * (depth) in pixel coordinates.</p> 1077 * <p><b>Units</b>: 1078 * Pixels in the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} coordinate 1079 * system.</p> 1080 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1081 * 1082 * @see CameraCharacteristics#LENS_POSE_ROTATION 1083 * @see CameraCharacteristics#LENS_POSE_TRANSLATION 1084 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 1085 */ 1086 @PublicKey 1087 public static final Key<float[]> LENS_INTRINSIC_CALIBRATION = 1088 new Key<float[]>("android.lens.intrinsicCalibration", float[].class); 1089 1090 /** 1091 * <p>The correction coefficients to correct for this camera device's 1092 * radial and tangential lens distortion.</p> 1093 * <p>Three radial distortion coefficients <code>[kappa_1, kappa_2, 1094 * kappa_3]</code> and two tangential distortion coefficients 1095 * <code>[kappa_4, kappa_5]</code> that can be used to correct the 1096 * lens's geometric distortion with the mapping equations:</p> 1097 * <pre><code> x_c = x_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + 1098 * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 ) 1099 * y_c = y_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + 1100 * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 ) 1101 * </code></pre> 1102 * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the 1103 * input image that correspond to the pixel values in the 1104 * corrected image at the coordinate <code>[x_i, y_i]</code>:</p> 1105 * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage) 1106 * </code></pre> 1107 * <p>The pixel coordinates are defined in a normalized 1108 * coordinate system related to the 1109 * android.lens.intrinsicCalibration calibration fields. 1110 * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code> have <code>(0,0)</code> at the 1111 * lens optical center <code>[c_x, c_y]</code>. The maximum magnitudes 1112 * of both x and y coordinates are normalized to be 1 at the 1113 * edge further from the optical center, so the range 1114 * for both dimensions is <code>-1 <= x <= 1</code>.</p> 1115 * <p>Finally, <code>r</code> represents the radial distance from the 1116 * optical center, <code>r^2 = x_i^2 + y_i^2</code>, and its magnitude 1117 * is therefore no larger than <code>|r| <= sqrt(2)</code>.</p> 1118 * <p>The distortion model used is the Brown-Conrady model.</p> 1119 * <p><b>Units</b>: 1120 * Unitless coefficients.</p> 1121 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1122 */ 1123 @PublicKey 1124 public static final Key<float[]> LENS_RADIAL_DISTORTION = 1125 new Key<float[]>("android.lens.radialDistortion", float[].class); 1126 1127 /** 1128 * <p>List of noise reduction modes for {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode} that are supported 1129 * by this camera device.</p> 1130 * <p>Full-capability camera devices will always support OFF and FAST.</p> 1131 * <p>Legacy-capability camera devices will only support FAST mode.</p> 1132 * <p><b>Range of valid values:</b><br> 1133 * Any value listed in {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</p> 1134 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1135 * <p><b>Limited capability</b> - 1136 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 1137 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1138 * 1139 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1140 * @see CaptureRequest#NOISE_REDUCTION_MODE 1141 */ 1142 @PublicKey 1143 public static final Key<int[]> NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES = 1144 new Key<int[]>("android.noiseReduction.availableNoiseReductionModes", int[].class); 1145 1146 /** 1147 * <p>If set to 1, the HAL will always split result 1148 * metadata for a single capture into multiple buffers, 1149 * returned using multiple process_capture_result calls.</p> 1150 * <p>Does not need to be listed in static 1151 * metadata. Support for partial results will be reworked in 1152 * future versions of camera service. This quirk will stop 1153 * working at that point; DO NOT USE without careful 1154 * consideration of future support.</p> 1155 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1156 * @deprecated 1157 * @hide 1158 */ 1159 @Deprecated 1160 public static final Key<Byte> QUIRKS_USE_PARTIAL_RESULT = 1161 new Key<Byte>("android.quirks.usePartialResult", byte.class); 1162 1163 /** 1164 * <p>The maximum numbers of different types of output streams 1165 * that can be configured and used simultaneously by a camera device.</p> 1166 * <p>This is a 3 element tuple that contains the max number of output simultaneous 1167 * streams for raw sensor, processed (but not stalling), and processed (and stalling) 1168 * formats respectively. For example, assuming that JPEG is typically a processed and 1169 * stalling stream, if max raw sensor format output stream number is 1, max YUV streams 1170 * number is 3, and max JPEG stream number is 2, then this tuple should be <code>(1, 3, 2)</code>.</p> 1171 * <p>This lists the upper bound of the number of output streams supported by 1172 * the camera device. Using more streams simultaneously may require more hardware and 1173 * CPU resources that will consume more power. The image format for an output stream can 1174 * be any supported format provided by android.scaler.availableStreamConfigurations. 1175 * The formats defined in android.scaler.availableStreamConfigurations can be catergorized 1176 * into the 3 stream types as below:</p> 1177 * <ul> 1178 * <li>Processed (but stalling): any non-RAW format with a stallDurations > 0. 1179 * Typically {@link android.graphics.ImageFormat#JPEG JPEG format}.</li> 1180 * <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> 1181 * <li>Processed (but not-stalling): any non-RAW format without a stall duration. 1182 * Typically {@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888}, 1183 * {@link android.graphics.ImageFormat#NV21 NV21}, or 1184 * {@link android.graphics.ImageFormat#YV12 YV12}.</li> 1185 * </ul> 1186 * <p><b>Range of valid values:</b><br></p> 1187 * <p>For processed (and stalling) format streams, >= 1.</p> 1188 * <p>For Raw format (either stalling or non-stalling) streams, >= 0.</p> 1189 * <p>For processed (but not stalling) format streams, >= 3 1190 * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>); 1191 * >= 2 for LIMITED mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == LIMITED</code>).</p> 1192 * <p>This key is available on all devices.</p> 1193 * 1194 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1195 * @hide 1196 */ 1197 public static final Key<int[]> REQUEST_MAX_NUM_OUTPUT_STREAMS = 1198 new Key<int[]>("android.request.maxNumOutputStreams", int[].class); 1199 1200 /** 1201 * <p>The maximum numbers of different types of output streams 1202 * that can be configured and used simultaneously by a camera device 1203 * for any <code>RAW</code> formats.</p> 1204 * <p>This value contains the max number of output simultaneous 1205 * streams from the raw sensor.</p> 1206 * <p>This lists the upper bound of the number of output streams supported by 1207 * the camera device. Using more streams simultaneously may require more hardware and 1208 * CPU resources that will consume more power. The image format for this kind of an output stream can 1209 * be any <code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p> 1210 * <p>In particular, a <code>RAW</code> format is typically one of:</p> 1211 * <ul> 1212 * <li>{@link android.graphics.ImageFormat#RAW_SENSOR RAW_SENSOR}</li> 1213 * <li>{@link android.graphics.ImageFormat#RAW10 RAW10}</li> 1214 * <li>{@link android.graphics.ImageFormat#RAW12 RAW12}</li> 1215 * </ul> 1216 * <p>LEGACY mode devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> LEGACY) 1217 * never support raw streams.</p> 1218 * <p><b>Range of valid values:</b><br></p> 1219 * <p>>= 0</p> 1220 * <p>This key is available on all devices.</p> 1221 * 1222 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1223 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP 1224 */ 1225 @PublicKey 1226 @SyntheticKey 1227 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_RAW = 1228 new Key<Integer>("android.request.maxNumOutputRaw", int.class); 1229 1230 /** 1231 * <p>The maximum numbers of different types of output streams 1232 * that can be configured and used simultaneously by a camera device 1233 * for any processed (but not-stalling) formats.</p> 1234 * <p>This value contains the max number of output simultaneous 1235 * streams for any processed (but not-stalling) formats.</p> 1236 * <p>This lists the upper bound of the number of output streams supported by 1237 * the camera device. Using more streams simultaneously may require more hardware and 1238 * CPU resources that will consume more power. The image format for this kind of an output stream can 1239 * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p> 1240 * <p>Processed (but not-stalling) is defined as any non-RAW format without a stall duration. 1241 * Typically:</p> 1242 * <ul> 1243 * <li>{@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888}</li> 1244 * <li>{@link android.graphics.ImageFormat#NV21 NV21}</li> 1245 * <li>{@link android.graphics.ImageFormat#YV12 YV12}</li> 1246 * <li>Implementation-defined formats, i.e. {@link android.hardware.camera2.params.StreamConfigurationMap#isOutputSupportedFor(Class) }</li> 1247 * </ul> 1248 * <p>For full guarantees, query {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } with a 1249 * processed format -- it will return 0 for a non-stalling stream.</p> 1250 * <p>LEGACY devices will support at least 2 processing/non-stalling streams.</p> 1251 * <p><b>Range of valid values:</b><br></p> 1252 * <p>>= 3 1253 * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>); 1254 * >= 2 for LIMITED mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == LIMITED</code>).</p> 1255 * <p>This key is available on all devices.</p> 1256 * 1257 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1258 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP 1259 */ 1260 @PublicKey 1261 @SyntheticKey 1262 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC = 1263 new Key<Integer>("android.request.maxNumOutputProc", int.class); 1264 1265 /** 1266 * <p>The maximum numbers of different types of output streams 1267 * that can be configured and used simultaneously by a camera device 1268 * for any processed (and stalling) formats.</p> 1269 * <p>This value contains the max number of output simultaneous 1270 * streams for any processed (but not-stalling) formats.</p> 1271 * <p>This lists the upper bound of the number of output streams supported by 1272 * the camera device. Using more streams simultaneously may require more hardware and 1273 * CPU resources that will consume more power. The image format for this kind of an output stream can 1274 * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p> 1275 * <p>A processed and stalling format is defined as any non-RAW format with a stallDurations 1276 * > 0. Typically only the {@link android.graphics.ImageFormat#JPEG JPEG format} is a 1277 * stalling format.</p> 1278 * <p>For full guarantees, query {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } with a 1279 * processed format -- it will return a non-0 value for a stalling stream.</p> 1280 * <p>LEGACY devices will support up to 1 processing/stalling stream.</p> 1281 * <p><b>Range of valid values:</b><br></p> 1282 * <p>>= 1</p> 1283 * <p>This key is available on all devices.</p> 1284 * 1285 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP 1286 */ 1287 @PublicKey 1288 @SyntheticKey 1289 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC_STALLING = 1290 new Key<Integer>("android.request.maxNumOutputProcStalling", int.class); 1291 1292 /** 1293 * <p>The maximum numbers of any type of input streams 1294 * that can be configured and used simultaneously by a camera device.</p> 1295 * <p>When set to 0, it means no input stream is supported.</p> 1296 * <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 1297 * input stream, there must be at least one output stream configured to to receive the 1298 * reprocessed images.</p> 1299 * <p>When an input stream and some output streams are used in a reprocessing request, 1300 * only the input buffer will be used to produce these output stream buffers, and a 1301 * new sensor image will not be captured.</p> 1302 * <p>For example, for Zero Shutter Lag (ZSL) still capture use case, the input 1303 * stream image format will be PRIVATE, the associated output stream image format 1304 * should be JPEG.</p> 1305 * <p><b>Range of valid values:</b><br></p> 1306 * <p>0 or 1.</p> 1307 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1308 * <p><b>Full capability</b> - 1309 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 1310 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1311 * 1312 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1313 */ 1314 @PublicKey 1315 public static final Key<Integer> REQUEST_MAX_NUM_INPUT_STREAMS = 1316 new Key<Integer>("android.request.maxNumInputStreams", int.class); 1317 1318 /** 1319 * <p>Specifies the number of maximum pipeline stages a frame 1320 * has to go through from when it's exposed to when it's available 1321 * to the framework.</p> 1322 * <p>A typical minimum value for this is 2 (one stage to expose, 1323 * one stage to readout) from the sensor. The ISP then usually adds 1324 * its own stages to do custom HW processing. Further stages may be 1325 * added by SW processing.</p> 1326 * <p>Depending on what settings are used (e.g. YUV, JPEG) and what 1327 * processing is enabled (e.g. face detection), the actual pipeline 1328 * depth (specified by {@link CaptureResult#REQUEST_PIPELINE_DEPTH android.request.pipelineDepth}) may be less than 1329 * the max pipeline depth.</p> 1330 * <p>A pipeline depth of X stages is equivalent to a pipeline latency of 1331 * X frame intervals.</p> 1332 * <p>This value will be 8 or less.</p> 1333 * <p>This key is available on all devices.</p> 1334 * 1335 * @see CaptureResult#REQUEST_PIPELINE_DEPTH 1336 */ 1337 @PublicKey 1338 public static final Key<Byte> REQUEST_PIPELINE_MAX_DEPTH = 1339 new Key<Byte>("android.request.pipelineMaxDepth", byte.class); 1340 1341 /** 1342 * <p>Defines how many sub-components 1343 * a result will be composed of.</p> 1344 * <p>In order to combat the pipeline latency, partial results 1345 * may be delivered to the application layer from the camera device as 1346 * soon as they are available.</p> 1347 * <p>Optional; defaults to 1. A value of 1 means that partial 1348 * results are not supported, and only the final TotalCaptureResult will 1349 * be produced by the camera device.</p> 1350 * <p>A typical use case for this might be: after requesting an 1351 * auto-focus (AF) lock the new AF state might be available 50% 1352 * of the way through the pipeline. The camera device could 1353 * then immediately dispatch this state via a partial result to 1354 * the application, and the rest of the metadata via later 1355 * partial results.</p> 1356 * <p><b>Range of valid values:</b><br> 1357 * >= 1</p> 1358 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1359 */ 1360 @PublicKey 1361 public static final Key<Integer> REQUEST_PARTIAL_RESULT_COUNT = 1362 new Key<Integer>("android.request.partialResultCount", int.class); 1363 1364 /** 1365 * <p>List of capabilities that this camera device 1366 * advertises as fully supporting.</p> 1367 * <p>A capability is a contract that the camera device makes in order 1368 * to be able to satisfy one or more use cases.</p> 1369 * <p>Listing a capability guarantees that the whole set of features 1370 * required to support a common use will all be available.</p> 1371 * <p>Using a subset of the functionality provided by an unsupported 1372 * capability may be possible on a specific camera device implementation; 1373 * to do this query each of android.request.availableRequestKeys, 1374 * android.request.availableResultKeys, 1375 * android.request.availableCharacteristicsKeys.</p> 1376 * <p>The following capabilities are guaranteed to be available on 1377 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL devices:</p> 1378 * <ul> 1379 * <li>MANUAL_SENSOR</li> 1380 * <li>MANUAL_POST_PROCESSING</li> 1381 * </ul> 1382 * <p>Other capabilities may be available on either FULL or LIMITED 1383 * devices, but the application should query this key to be sure.</p> 1384 * <p><b>Possible values:</b> 1385 * <ul> 1386 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE BACKWARD_COMPATIBLE}</li> 1387 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR MANUAL_SENSOR}</li> 1388 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING MANUAL_POST_PROCESSING}</li> 1389 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_RAW RAW}</li> 1390 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING PRIVATE_REPROCESSING}</li> 1391 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS READ_SENSOR_SETTINGS}</li> 1392 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE BURST_CAPTURE}</li> 1393 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING YUV_REPROCESSING}</li> 1394 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT DEPTH_OUTPUT}</li> 1395 * </ul></p> 1396 * <p>This key is available on all devices.</p> 1397 * 1398 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1399 * @see #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE 1400 * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR 1401 * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING 1402 * @see #REQUEST_AVAILABLE_CAPABILITIES_RAW 1403 * @see #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING 1404 * @see #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS 1405 * @see #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE 1406 * @see #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING 1407 * @see #REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT 1408 */ 1409 @PublicKey 1410 public static final Key<int[]> REQUEST_AVAILABLE_CAPABILITIES = 1411 new Key<int[]>("android.request.availableCapabilities", int[].class); 1412 1413 /** 1414 * <p>A list of all keys that the camera device has available 1415 * to use with {@link android.hardware.camera2.CaptureRequest }.</p> 1416 * <p>Attempting to set a key into a CaptureRequest that is not 1417 * listed here will result in an invalid request and will be rejected 1418 * by the camera device.</p> 1419 * <p>This field can be used to query the feature set of a camera device 1420 * at a more granular level than capabilities. This is especially 1421 * important for optional keys that are not listed under any capability 1422 * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p> 1423 * <p>This key is available on all devices.</p> 1424 * 1425 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1426 * @hide 1427 */ 1428 public static final Key<int[]> REQUEST_AVAILABLE_REQUEST_KEYS = 1429 new Key<int[]>("android.request.availableRequestKeys", int[].class); 1430 1431 /** 1432 * <p>A list of all keys that the camera device has available 1433 * to use with {@link android.hardware.camera2.CaptureResult }.</p> 1434 * <p>Attempting to get a key from a CaptureResult that is not 1435 * listed here will always return a <code>null</code> value. Getting a key from 1436 * a CaptureResult that is listed here will generally never return a <code>null</code> 1437 * value.</p> 1438 * <p>The following keys may return <code>null</code> unless they are enabled:</p> 1439 * <ul> 1440 * <li>android.statistics.lensShadingMap (non-null iff {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON)</li> 1441 * </ul> 1442 * <p>(Those sometimes-null keys will nevertheless be listed here 1443 * if they are available.)</p> 1444 * <p>This field can be used to query the feature set of a camera device 1445 * at a more granular level than capabilities. This is especially 1446 * important for optional keys that are not listed under any capability 1447 * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p> 1448 * <p>This key is available on all devices.</p> 1449 * 1450 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1451 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 1452 * @hide 1453 */ 1454 public static final Key<int[]> REQUEST_AVAILABLE_RESULT_KEYS = 1455 new Key<int[]>("android.request.availableResultKeys", int[].class); 1456 1457 /** 1458 * <p>A list of all keys that the camera device has available 1459 * to use with {@link android.hardware.camera2.CameraCharacteristics }.</p> 1460 * <p>This entry follows the same rules as 1461 * android.request.availableResultKeys (except that it applies for 1462 * CameraCharacteristics instead of CaptureResult). See above for more 1463 * details.</p> 1464 * <p>This key is available on all devices.</p> 1465 * @hide 1466 */ 1467 public static final Key<int[]> REQUEST_AVAILABLE_CHARACTERISTICS_KEYS = 1468 new Key<int[]>("android.request.availableCharacteristicsKeys", int[].class); 1469 1470 /** 1471 * <p>The list of image formats that are supported by this 1472 * camera device for output streams.</p> 1473 * <p>All camera devices will support JPEG and YUV_420_888 formats.</p> 1474 * <p>When set to YUV_420_888, application can access the YUV420 data directly.</p> 1475 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1476 * @deprecated 1477 * @hide 1478 */ 1479 @Deprecated 1480 public static final Key<int[]> SCALER_AVAILABLE_FORMATS = 1481 new Key<int[]>("android.scaler.availableFormats", int[].class); 1482 1483 /** 1484 * <p>The minimum frame duration that is supported 1485 * for each resolution in android.scaler.availableJpegSizes.</p> 1486 * <p>This corresponds to the minimum steady-state frame duration when only 1487 * that JPEG stream is active and captured in a burst, with all 1488 * processing (typically in android.*.mode) set to FAST.</p> 1489 * <p>When multiple streams are configured, the minimum 1490 * frame duration will be >= max(individual stream min 1491 * durations)</p> 1492 * <p><b>Units</b>: Nanoseconds</p> 1493 * <p><b>Range of valid values:</b><br> 1494 * TODO: Remove property.</p> 1495 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1496 * @deprecated 1497 * @hide 1498 */ 1499 @Deprecated 1500 public static final Key<long[]> SCALER_AVAILABLE_JPEG_MIN_DURATIONS = 1501 new Key<long[]>("android.scaler.availableJpegMinDurations", long[].class); 1502 1503 /** 1504 * <p>The JPEG resolutions that are supported by this camera device.</p> 1505 * <p>The resolutions are listed as <code>(width, height)</code> pairs. All camera devices will support 1506 * sensor maximum resolution (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}).</p> 1507 * <p><b>Range of valid values:</b><br> 1508 * TODO: Remove property.</p> 1509 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1510 * 1511 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 1512 * @deprecated 1513 * @hide 1514 */ 1515 @Deprecated 1516 public static final Key<android.util.Size[]> SCALER_AVAILABLE_JPEG_SIZES = 1517 new Key<android.util.Size[]>("android.scaler.availableJpegSizes", android.util.Size[].class); 1518 1519 /** 1520 * <p>The maximum ratio between both active area width 1521 * and crop region width, and active area height and 1522 * crop region height, for {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p> 1523 * <p>This represents the maximum amount of zooming possible by 1524 * the camera device, or equivalently, the minimum cropping 1525 * window size.</p> 1526 * <p>Crop regions that have a width or height that is smaller 1527 * than this ratio allows will be rounded up to the minimum 1528 * allowed size by the camera device.</p> 1529 * <p><b>Units</b>: Zoom scale factor</p> 1530 * <p><b>Range of valid values:</b><br> 1531 * >=1</p> 1532 * <p>This key is available on all devices.</p> 1533 * 1534 * @see CaptureRequest#SCALER_CROP_REGION 1535 */ 1536 @PublicKey 1537 public static final Key<Float> SCALER_AVAILABLE_MAX_DIGITAL_ZOOM = 1538 new Key<Float>("android.scaler.availableMaxDigitalZoom", float.class); 1539 1540 /** 1541 * <p>For each available processed output size (defined in 1542 * android.scaler.availableProcessedSizes), this property lists the 1543 * minimum supportable frame duration for that size.</p> 1544 * <p>This should correspond to the frame duration when only that processed 1545 * stream is active, with all processing (typically in android.*.mode) 1546 * set to FAST.</p> 1547 * <p>When multiple streams are configured, the minimum frame duration will 1548 * be >= max(individual stream min durations).</p> 1549 * <p><b>Units</b>: Nanoseconds</p> 1550 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1551 * @deprecated 1552 * @hide 1553 */ 1554 @Deprecated 1555 public static final Key<long[]> SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS = 1556 new Key<long[]>("android.scaler.availableProcessedMinDurations", long[].class); 1557 1558 /** 1559 * <p>The resolutions available for use with 1560 * processed output streams, such as YV12, NV12, and 1561 * platform opaque YUV/RGB streams to the GPU or video 1562 * encoders.</p> 1563 * <p>The resolutions are listed as <code>(width, height)</code> pairs.</p> 1564 * <p>For a given use case, the actual maximum supported resolution 1565 * may be lower than what is listed here, depending on the destination 1566 * Surface for the image data. For example, for recording video, 1567 * the video encoder chosen may have a maximum size limit (e.g. 1080p) 1568 * smaller than what the camera (e.g. maximum resolution is 3264x2448) 1569 * can provide.</p> 1570 * <p>Please reference the documentation for the image data destination to 1571 * check if it limits the maximum size for image data.</p> 1572 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1573 * @deprecated 1574 * @hide 1575 */ 1576 @Deprecated 1577 public static final Key<android.util.Size[]> SCALER_AVAILABLE_PROCESSED_SIZES = 1578 new Key<android.util.Size[]>("android.scaler.availableProcessedSizes", android.util.Size[].class); 1579 1580 /** 1581 * <p>The mapping of image formats that are supported by this 1582 * camera device for input streams, to their corresponding output formats.</p> 1583 * <p>All camera devices with at least 1 1584 * {@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} will have at least one 1585 * available input format.</p> 1586 * <p>The camera device will support the following map of formats, 1587 * if its dependent capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}) is supported:</p> 1588 * <table> 1589 * <thead> 1590 * <tr> 1591 * <th align="left">Input Format</th> 1592 * <th align="left">Output Format</th> 1593 * <th align="left">Capability</th> 1594 * </tr> 1595 * </thead> 1596 * <tbody> 1597 * <tr> 1598 * <td align="left">{@link android.graphics.ImageFormat#PRIVATE }</td> 1599 * <td align="left">{@link android.graphics.ImageFormat#JPEG }</td> 1600 * <td align="left">PRIVATE_REPROCESSING</td> 1601 * </tr> 1602 * <tr> 1603 * <td align="left">{@link android.graphics.ImageFormat#PRIVATE }</td> 1604 * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 1605 * <td align="left">PRIVATE_REPROCESSING</td> 1606 * </tr> 1607 * <tr> 1608 * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 1609 * <td align="left">{@link android.graphics.ImageFormat#JPEG }</td> 1610 * <td align="left">YUV_REPROCESSING</td> 1611 * </tr> 1612 * <tr> 1613 * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 1614 * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 1615 * <td align="left">YUV_REPROCESSING</td> 1616 * </tr> 1617 * </tbody> 1618 * </table> 1619 * <p>PRIVATE refers to a device-internal format that is not directly application-visible. A 1620 * PRIVATE input surface can be acquired by {@link android.media.ImageReader#newInstance } 1621 * with {@link android.graphics.ImageFormat#PRIVATE } as the format.</p> 1622 * <p>For a PRIVATE_REPROCESSING-capable camera device, using the PRIVATE format as either input 1623 * 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> 1624 * <p>Attempting to configure an input stream with output streams not 1625 * listed as available in this map is not valid.</p> 1626 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1627 * 1628 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1629 * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS 1630 * @hide 1631 */ 1632 public static final Key<android.hardware.camera2.params.ReprocessFormatsMap> SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP = 1633 new Key<android.hardware.camera2.params.ReprocessFormatsMap>("android.scaler.availableInputOutputFormatsMap", android.hardware.camera2.params.ReprocessFormatsMap.class); 1634 1635 /** 1636 * <p>The available stream configurations that this 1637 * camera device supports 1638 * (i.e. format, width, height, output/input stream).</p> 1639 * <p>The configurations are listed as <code>(format, width, height, input?)</code> 1640 * tuples.</p> 1641 * <p>For a given use case, the actual maximum supported resolution 1642 * may be lower than what is listed here, depending on the destination 1643 * Surface for the image data. For example, for recording video, 1644 * the video encoder chosen may have a maximum size limit (e.g. 1080p) 1645 * smaller than what the camera (e.g. maximum resolution is 3264x2448) 1646 * can provide.</p> 1647 * <p>Please reference the documentation for the image data destination to 1648 * check if it limits the maximum size for image data.</p> 1649 * <p>Not all output formats may be supported in a configuration with 1650 * an input stream of a particular format. For more details, see 1651 * android.scaler.availableInputOutputFormatsMap.</p> 1652 * <p>The following table describes the minimum required output stream 1653 * configurations based on the hardware level 1654 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p> 1655 * <table> 1656 * <thead> 1657 * <tr> 1658 * <th align="center">Format</th> 1659 * <th align="center">Size</th> 1660 * <th align="center">Hardware Level</th> 1661 * <th align="center">Notes</th> 1662 * </tr> 1663 * </thead> 1664 * <tbody> 1665 * <tr> 1666 * <td align="center">JPEG</td> 1667 * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td> 1668 * <td align="center">Any</td> 1669 * <td align="center"></td> 1670 * </tr> 1671 * <tr> 1672 * <td align="center">JPEG</td> 1673 * <td align="center">1920x1080 (1080p)</td> 1674 * <td align="center">Any</td> 1675 * <td align="center">if 1080p <= activeArraySize</td> 1676 * </tr> 1677 * <tr> 1678 * <td align="center">JPEG</td> 1679 * <td align="center">1280x720 (720)</td> 1680 * <td align="center">Any</td> 1681 * <td align="center">if 720p <= activeArraySize</td> 1682 * </tr> 1683 * <tr> 1684 * <td align="center">JPEG</td> 1685 * <td align="center">640x480 (480p)</td> 1686 * <td align="center">Any</td> 1687 * <td align="center">if 480p <= activeArraySize</td> 1688 * </tr> 1689 * <tr> 1690 * <td align="center">JPEG</td> 1691 * <td align="center">320x240 (240p)</td> 1692 * <td align="center">Any</td> 1693 * <td align="center">if 240p <= activeArraySize</td> 1694 * </tr> 1695 * <tr> 1696 * <td align="center">YUV_420_888</td> 1697 * <td align="center">all output sizes available for JPEG</td> 1698 * <td align="center">FULL</td> 1699 * <td align="center"></td> 1700 * </tr> 1701 * <tr> 1702 * <td align="center">YUV_420_888</td> 1703 * <td align="center">all output sizes available for JPEG, up to the maximum video size</td> 1704 * <td align="center">LIMITED</td> 1705 * <td align="center"></td> 1706 * </tr> 1707 * <tr> 1708 * <td align="center">IMPLEMENTATION_DEFINED</td> 1709 * <td align="center">same as YUV_420_888</td> 1710 * <td align="center">Any</td> 1711 * <td align="center"></td> 1712 * </tr> 1713 * </tbody> 1714 * </table> 1715 * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional 1716 * mandatory stream configurations on a per-capability basis.</p> 1717 * <p>This key is available on all devices.</p> 1718 * 1719 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1720 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1721 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 1722 * @hide 1723 */ 1724 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> SCALER_AVAILABLE_STREAM_CONFIGURATIONS = 1725 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.scaler.availableStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class); 1726 1727 /** 1728 * <p>This lists the minimum frame duration for each 1729 * format/size combination.</p> 1730 * <p>This should correspond to the frame duration when only that 1731 * stream is active, with all processing (typically in android.*.mode) 1732 * set to either OFF or FAST.</p> 1733 * <p>When multiple streams are used in a request, the minimum frame 1734 * duration will be max(individual stream min durations).</p> 1735 * <p>The minimum frame duration of a stream (of a particular format, size) 1736 * is the same regardless of whether the stream is input or output.</p> 1737 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and 1738 * android.scaler.availableStallDurations for more details about 1739 * calculating the max frame rate.</p> 1740 * <p>(Keep in sync with 1741 * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration })</p> 1742 * <p><b>Units</b>: (format, width, height, ns) x n</p> 1743 * <p>This key is available on all devices.</p> 1744 * 1745 * @see CaptureRequest#SENSOR_FRAME_DURATION 1746 * @hide 1747 */ 1748 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_MIN_FRAME_DURATIONS = 1749 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); 1750 1751 /** 1752 * <p>This lists the maximum stall duration for each 1753 * output format/size combination.</p> 1754 * <p>A stall duration is how much extra time would get added 1755 * to the normal minimum frame duration for a repeating request 1756 * that has streams with non-zero stall.</p> 1757 * <p>For example, consider JPEG captures which have the following 1758 * characteristics:</p> 1759 * <ul> 1760 * <li>JPEG streams act like processed YUV streams in requests for which 1761 * they are not included; in requests in which they are directly 1762 * referenced, they act as JPEG streams. This is because supporting a 1763 * JPEG stream requires the underlying YUV data to always be ready for 1764 * use by a JPEG encoder, but the encoder will only be used (and impact 1765 * frame duration) on requests that actually reference a JPEG stream.</li> 1766 * <li>The JPEG processor can run concurrently to the rest of the camera 1767 * pipeline, but cannot process more than 1 capture at a time.</li> 1768 * </ul> 1769 * <p>In other words, using a repeating YUV request would result 1770 * in a steady frame rate (let's say it's 30 FPS). If a single 1771 * JPEG request is submitted periodically, the frame rate will stay 1772 * at 30 FPS (as long as we wait for the previous JPEG to return each 1773 * time). If we try to submit a repeating YUV + JPEG request, then 1774 * the frame rate will drop from 30 FPS.</p> 1775 * <p>In general, submitting a new request with a non-0 stall time 1776 * stream will <em>not</em> cause a frame rate drop unless there are still 1777 * outstanding buffers for that stream from previous requests.</p> 1778 * <p>Submitting a repeating request with streams (call this <code>S</code>) 1779 * is the same as setting the minimum frame duration from 1780 * the normal minimum frame duration corresponding to <code>S</code>, added with 1781 * the maximum stall duration for <code>S</code>.</p> 1782 * <p>If interleaving requests with and without a stall duration, 1783 * a request will stall by the maximum of the remaining times 1784 * for each can-stall stream with outstanding buffers.</p> 1785 * <p>This means that a stalling request will not have an exposure start 1786 * until the stall has completed.</p> 1787 * <p>This should correspond to the stall duration when only that stream is 1788 * active, with all processing (typically in android.*.mode) set to FAST 1789 * or OFF. Setting any of the processing modes to HIGH_QUALITY 1790 * effectively results in an indeterminate stall duration for all 1791 * streams in a request (the regular stall calculation rules are 1792 * ignored).</p> 1793 * <p>The following formats may always have a stall duration:</p> 1794 * <ul> 1795 * <li>{@link android.graphics.ImageFormat#JPEG }</li> 1796 * <li>{@link android.graphics.ImageFormat#RAW_SENSOR }</li> 1797 * </ul> 1798 * <p>The following formats will never have a stall duration:</p> 1799 * <ul> 1800 * <li>{@link android.graphics.ImageFormat#YUV_420_888 }</li> 1801 * <li>{@link android.graphics.ImageFormat#RAW10 }</li> 1802 * </ul> 1803 * <p>All other formats may or may not have an allowed stall duration on 1804 * a per-capability basis; refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} 1805 * for more details.</p> 1806 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} for more information about 1807 * calculating the max frame rate (absent stalls).</p> 1808 * <p>(Keep up to date with 1809 * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } )</p> 1810 * <p><b>Units</b>: (format, width, height, ns) x n</p> 1811 * <p>This key is available on all devices.</p> 1812 * 1813 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1814 * @see CaptureRequest#SENSOR_FRAME_DURATION 1815 * @hide 1816 */ 1817 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_STALL_DURATIONS = 1818 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); 1819 1820 /** 1821 * <p>The available stream configurations that this 1822 * camera device supports; also includes the minimum frame durations 1823 * and the stall durations for each format/size combination.</p> 1824 * <p>All camera devices will support sensor maximum resolution (defined by 1825 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) for the JPEG format.</p> 1826 * <p>For a given use case, the actual maximum supported resolution 1827 * may be lower than what is listed here, depending on the destination 1828 * Surface for the image data. For example, for recording video, 1829 * the video encoder chosen may have a maximum size limit (e.g. 1080p) 1830 * smaller than what the camera (e.g. maximum resolution is 3264x2448) 1831 * can provide.</p> 1832 * <p>Please reference the documentation for the image data destination to 1833 * check if it limits the maximum size for image data.</p> 1834 * <p>The following table describes the minimum required output stream 1835 * configurations based on the hardware level 1836 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p> 1837 * <table> 1838 * <thead> 1839 * <tr> 1840 * <th align="center">Format</th> 1841 * <th align="center">Size</th> 1842 * <th align="center">Hardware Level</th> 1843 * <th align="center">Notes</th> 1844 * </tr> 1845 * </thead> 1846 * <tbody> 1847 * <tr> 1848 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td> 1849 * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td> 1850 * <td align="center">Any</td> 1851 * <td align="center"></td> 1852 * </tr> 1853 * <tr> 1854 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td> 1855 * <td align="center">1920x1080 (1080p)</td> 1856 * <td align="center">Any</td> 1857 * <td align="center">if 1080p <= activeArraySize</td> 1858 * </tr> 1859 * <tr> 1860 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td> 1861 * <td align="center">1280x720 (720)</td> 1862 * <td align="center">Any</td> 1863 * <td align="center">if 720p <= activeArraySize</td> 1864 * </tr> 1865 * <tr> 1866 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td> 1867 * <td align="center">640x480 (480p)</td> 1868 * <td align="center">Any</td> 1869 * <td align="center">if 480p <= activeArraySize</td> 1870 * </tr> 1871 * <tr> 1872 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td> 1873 * <td align="center">320x240 (240p)</td> 1874 * <td align="center">Any</td> 1875 * <td align="center">if 240p <= activeArraySize</td> 1876 * </tr> 1877 * <tr> 1878 * <td align="center">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 1879 * <td align="center">all output sizes available for JPEG</td> 1880 * <td align="center">FULL</td> 1881 * <td align="center"></td> 1882 * </tr> 1883 * <tr> 1884 * <td align="center">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 1885 * <td align="center">all output sizes available for JPEG, up to the maximum video size</td> 1886 * <td align="center">LIMITED</td> 1887 * <td align="center"></td> 1888 * </tr> 1889 * <tr> 1890 * <td align="center">{@link android.graphics.ImageFormat#PRIVATE }</td> 1891 * <td align="center">same as YUV_420_888</td> 1892 * <td align="center">Any</td> 1893 * <td align="center"></td> 1894 * </tr> 1895 * </tbody> 1896 * </table> 1897 * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} and {@link android.hardware.camera2.CameraDevice#createCaptureSession } for additional mandatory 1898 * stream configurations on a per-capability basis.</p> 1899 * <p>This key is available on all devices.</p> 1900 * 1901 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1902 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1903 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 1904 */ 1905 @PublicKey 1906 @SyntheticKey 1907 public static final Key<android.hardware.camera2.params.StreamConfigurationMap> SCALER_STREAM_CONFIGURATION_MAP = 1908 new Key<android.hardware.camera2.params.StreamConfigurationMap>("android.scaler.streamConfigurationMap", android.hardware.camera2.params.StreamConfigurationMap.class); 1909 1910 /** 1911 * <p>The crop type that this camera device supports.</p> 1912 * <p>When passing a non-centered crop region ({@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}) to a camera 1913 * device that only supports CENTER_ONLY cropping, the camera device will move the 1914 * crop region to the center of the sensor active array ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) 1915 * and keep the crop region width and height unchanged. The camera device will return the 1916 * final used crop region in metadata result {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p> 1917 * <p>Camera devices that support FREEFORM cropping will support any crop region that 1918 * is inside of the active array. The camera device will apply the same crop region and 1919 * return the final used crop region in capture result metadata {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p> 1920 * <p>FULL capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL) will support 1921 * FREEFORM cropping. LEGACY capability devices will only support CENTER_ONLY cropping.</p> 1922 * <p><b>Possible values:</b> 1923 * <ul> 1924 * <li>{@link #SCALER_CROPPING_TYPE_CENTER_ONLY CENTER_ONLY}</li> 1925 * <li>{@link #SCALER_CROPPING_TYPE_FREEFORM FREEFORM}</li> 1926 * </ul></p> 1927 * <p>This key is available on all devices.</p> 1928 * 1929 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1930 * @see CaptureRequest#SCALER_CROP_REGION 1931 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 1932 * @see #SCALER_CROPPING_TYPE_CENTER_ONLY 1933 * @see #SCALER_CROPPING_TYPE_FREEFORM 1934 */ 1935 @PublicKey 1936 public static final Key<Integer> SCALER_CROPPING_TYPE = 1937 new Key<Integer>("android.scaler.croppingType", int.class); 1938 1939 /** 1940 * <p>The area of the image sensor which corresponds to 1941 * active pixels.</p> 1942 * <p>This is the region of the sensor that actually receives light from the scene. 1943 * Therefore, the size of this region determines the maximum field of view and the maximum 1944 * number of pixels that an image from this sensor can contain.</p> 1945 * <p>The rectangle is defined in terms of the full pixel array; (0,0) is the top-left of the 1946 * full pixel array, and the size of the full pixel array is given by 1947 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p> 1948 * <p>Most other keys listing pixel coordinates have their coordinate systems based on the 1949 * active array, with <code>(0, 0)</code> being the top-left of the active array rectangle.</p> 1950 * <p>The active array may be smaller than the full pixel array, since the full array may 1951 * include black calibration pixels or other inactive regions.</p> 1952 * <p><b>Units</b>: Pixel coordinates on the image sensor</p> 1953 * <p><b>Range of valid values:</b><br></p> 1954 * <p>This key is available on all devices.</p> 1955 * 1956 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE 1957 */ 1958 @PublicKey 1959 public static final Key<android.graphics.Rect> SENSOR_INFO_ACTIVE_ARRAY_SIZE = 1960 new Key<android.graphics.Rect>("android.sensor.info.activeArraySize", android.graphics.Rect.class); 1961 1962 /** 1963 * <p>Range of sensitivities for {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} supported by this 1964 * camera device.</p> 1965 * <p>The values are the standard ISO sensitivity values, 1966 * as defined in ISO 12232:2006.</p> 1967 * <p><b>Range of valid values:</b><br> 1968 * Min <= 100, Max >= 800</p> 1969 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1970 * <p><b>Full capability</b> - 1971 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 1972 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1973 * 1974 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1975 * @see CaptureRequest#SENSOR_SENSITIVITY 1976 */ 1977 @PublicKey 1978 public static final Key<android.util.Range<Integer>> SENSOR_INFO_SENSITIVITY_RANGE = 1979 new Key<android.util.Range<Integer>>("android.sensor.info.sensitivityRange", new TypeReference<android.util.Range<Integer>>() {{ }}); 1980 1981 /** 1982 * <p>The arrangement of color filters on sensor; 1983 * represents the colors in the top-left 2x2 section of 1984 * the sensor, in reading order.</p> 1985 * <p><b>Possible values:</b> 1986 * <ul> 1987 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB RGGB}</li> 1988 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG GRBG}</li> 1989 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG GBRG}</li> 1990 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR BGGR}</li> 1991 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB RGB}</li> 1992 * </ul></p> 1993 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1994 * <p><b>Full capability</b> - 1995 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 1996 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1997 * 1998 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1999 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB 2000 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG 2001 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG 2002 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR 2003 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB 2004 */ 2005 @PublicKey 2006 public static final Key<Integer> SENSOR_INFO_COLOR_FILTER_ARRANGEMENT = 2007 new Key<Integer>("android.sensor.info.colorFilterArrangement", int.class); 2008 2009 /** 2010 * <p>The range of image exposure times for {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} supported 2011 * by this camera device.</p> 2012 * <p><b>Units</b>: Nanoseconds</p> 2013 * <p><b>Range of valid values:</b><br> 2014 * The minimum exposure time will be less than 100 us. For FULL 2015 * capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL), 2016 * the maximum exposure time will be greater than 100ms.</p> 2017 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2018 * <p><b>Full capability</b> - 2019 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 2020 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2021 * 2022 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2023 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 2024 */ 2025 @PublicKey 2026 public static final Key<android.util.Range<Long>> SENSOR_INFO_EXPOSURE_TIME_RANGE = 2027 new Key<android.util.Range<Long>>("android.sensor.info.exposureTimeRange", new TypeReference<android.util.Range<Long>>() {{ }}); 2028 2029 /** 2030 * <p>The maximum possible frame duration (minimum frame rate) for 2031 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} that is supported this camera device.</p> 2032 * <p>Attempting to use frame durations beyond the maximum will result in the frame 2033 * duration being clipped to the maximum. See that control for a full definition of frame 2034 * durations.</p> 2035 * <p>Refer to {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration } 2036 * for the minimum frame duration values.</p> 2037 * <p><b>Units</b>: Nanoseconds</p> 2038 * <p><b>Range of valid values:</b><br> 2039 * For FULL capability devices 2040 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL), at least 100ms.</p> 2041 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2042 * <p><b>Full capability</b> - 2043 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 2044 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2045 * 2046 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2047 * @see CaptureRequest#SENSOR_FRAME_DURATION 2048 */ 2049 @PublicKey 2050 public static final Key<Long> SENSOR_INFO_MAX_FRAME_DURATION = 2051 new Key<Long>("android.sensor.info.maxFrameDuration", long.class); 2052 2053 /** 2054 * <p>The physical dimensions of the full pixel 2055 * array.</p> 2056 * <p>This is the physical size of the sensor pixel 2057 * array defined by {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p> 2058 * <p><b>Units</b>: Millimeters</p> 2059 * <p>This key is available on all devices.</p> 2060 * 2061 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE 2062 */ 2063 @PublicKey 2064 public static final Key<android.util.SizeF> SENSOR_INFO_PHYSICAL_SIZE = 2065 new Key<android.util.SizeF>("android.sensor.info.physicalSize", android.util.SizeF.class); 2066 2067 /** 2068 * <p>Dimensions of the full pixel array, possibly 2069 * including black calibration pixels.</p> 2070 * <p>The pixel count of the full pixel array, 2071 * which covers {@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize} area.</p> 2072 * <p>If a camera device supports raw sensor formats, either this 2073 * or {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} is the maximum output 2074 * raw size listed in {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}. 2075 * If a size corresponding to pixelArraySize is listed, the resulting 2076 * raw sensor image will include black pixels.</p> 2077 * <p>Some parts of the full pixel array may not receive light from the scene, 2078 * or are otherwise inactive. The {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} key 2079 * defines the rectangle of active pixels that actually forms an image.</p> 2080 * <p><b>Units</b>: Pixels</p> 2081 * <p>This key is available on all devices.</p> 2082 * 2083 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP 2084 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 2085 * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE 2086 */ 2087 @PublicKey 2088 public static final Key<android.util.Size> SENSOR_INFO_PIXEL_ARRAY_SIZE = 2089 new Key<android.util.Size>("android.sensor.info.pixelArraySize", android.util.Size.class); 2090 2091 /** 2092 * <p>Maximum raw value output by sensor.</p> 2093 * <p>This specifies the fully-saturated encoding level for the raw 2094 * sample values from the sensor. This is typically caused by the 2095 * sensor becoming highly non-linear or clipping. The minimum for 2096 * each channel is specified by the offset in the 2097 * {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} key.</p> 2098 * <p>The white level is typically determined either by sensor bit depth 2099 * (8-14 bits is expected), or by the point where the sensor response 2100 * becomes too non-linear to be useful. The default value for this is 2101 * maximum representable value for a 16-bit raw sample (2^16 - 1).</p> 2102 * <p><b>Range of valid values:</b><br> 2103 * > 255 (8-bit output)</p> 2104 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2105 * 2106 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN 2107 */ 2108 @PublicKey 2109 public static final Key<Integer> SENSOR_INFO_WHITE_LEVEL = 2110 new Key<Integer>("android.sensor.info.whiteLevel", int.class); 2111 2112 /** 2113 * <p>The time base source for sensor capture start timestamps.</p> 2114 * <p>The timestamps provided for captures are always in nanoseconds and monotonic, but 2115 * may not based on a time source that can be compared to other system time sources.</p> 2116 * <p>This characteristic defines the source for the timestamps, and therefore whether they 2117 * can be compared against other system time sources/timestamps.</p> 2118 * <p><b>Possible values:</b> 2119 * <ul> 2120 * <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN UNKNOWN}</li> 2121 * <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME REALTIME}</li> 2122 * </ul></p> 2123 * <p>This key is available on all devices.</p> 2124 * @see #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN 2125 * @see #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME 2126 */ 2127 @PublicKey 2128 public static final Key<Integer> SENSOR_INFO_TIMESTAMP_SOURCE = 2129 new Key<Integer>("android.sensor.info.timestampSource", int.class); 2130 2131 /** 2132 * <p>Whether the RAW images output from this camera device are subject to 2133 * lens shading correction.</p> 2134 * <p>If TRUE, all images produced by the camera device in the RAW image formats will 2135 * have lens shading correction already applied to it. If FALSE, the images will 2136 * not be adjusted for lens shading correction. 2137 * See {@link CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW android.request.maxNumOutputRaw} for a list of RAW image formats.</p> 2138 * <p>This key will be <code>null</code> for all devices do not report this information. 2139 * Devices with RAW capability will always report this information in this key.</p> 2140 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2141 * 2142 * @see CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW 2143 */ 2144 @PublicKey 2145 public static final Key<Boolean> SENSOR_INFO_LENS_SHADING_APPLIED = 2146 new Key<Boolean>("android.sensor.info.lensShadingApplied", boolean.class); 2147 2148 /** 2149 * <p>The standard reference illuminant used as the scene light source when 2150 * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1}, 2151 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and 2152 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} matrices.</p> 2153 * <p>The values in this key correspond to the values defined for the 2154 * EXIF LightSource tag. These illuminants are standard light sources 2155 * that are often used calibrating camera devices.</p> 2156 * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1}, 2157 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and 2158 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} will also be present.</p> 2159 * <p>Some devices may choose to provide a second set of calibration 2160 * information for improved quality, including 2161 * {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2} and its corresponding matrices.</p> 2162 * <p><b>Possible values:</b> 2163 * <ul> 2164 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT DAYLIGHT}</li> 2165 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT FLUORESCENT}</li> 2166 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN TUNGSTEN}</li> 2167 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLASH FLASH}</li> 2168 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER FINE_WEATHER}</li> 2169 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER CLOUDY_WEATHER}</li> 2170 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_SHADE SHADE}</li> 2171 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT DAYLIGHT_FLUORESCENT}</li> 2172 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT DAY_WHITE_FLUORESCENT}</li> 2173 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT COOL_WHITE_FLUORESCENT}</li> 2174 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT WHITE_FLUORESCENT}</li> 2175 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A STANDARD_A}</li> 2176 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B STANDARD_B}</li> 2177 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C STANDARD_C}</li> 2178 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D55 D55}</li> 2179 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D65 D65}</li> 2180 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D75 D75}</li> 2181 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D50 D50}</li> 2182 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN ISO_STUDIO_TUNGSTEN}</li> 2183 * </ul></p> 2184 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2185 * 2186 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 2187 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 2188 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX1 2189 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 2190 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT 2191 * @see #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT 2192 * @see #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN 2193 * @see #SENSOR_REFERENCE_ILLUMINANT1_FLASH 2194 * @see #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER 2195 * @see #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER 2196 * @see #SENSOR_REFERENCE_ILLUMINANT1_SHADE 2197 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT 2198 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT 2199 * @see #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT 2200 * @see #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT 2201 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A 2202 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B 2203 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C 2204 * @see #SENSOR_REFERENCE_ILLUMINANT1_D55 2205 * @see #SENSOR_REFERENCE_ILLUMINANT1_D65 2206 * @see #SENSOR_REFERENCE_ILLUMINANT1_D75 2207 * @see #SENSOR_REFERENCE_ILLUMINANT1_D50 2208 * @see #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN 2209 */ 2210 @PublicKey 2211 public static final Key<Integer> SENSOR_REFERENCE_ILLUMINANT1 = 2212 new Key<Integer>("android.sensor.referenceIlluminant1", int.class); 2213 2214 /** 2215 * <p>The standard reference illuminant used as the scene light source when 2216 * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2}, 2217 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and 2218 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} matrices.</p> 2219 * <p>See {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1} for more details.</p> 2220 * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2}, 2221 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and 2222 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} will also be present.</p> 2223 * <p><b>Range of valid values:</b><br> 2224 * Any value listed in {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}</p> 2225 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2226 * 2227 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 2228 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 2229 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX2 2230 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 2231 */ 2232 @PublicKey 2233 public static final Key<Byte> SENSOR_REFERENCE_ILLUMINANT2 = 2234 new Key<Byte>("android.sensor.referenceIlluminant2", byte.class); 2235 2236 /** 2237 * <p>A per-device calibration transform matrix that maps from the 2238 * reference sensor colorspace to the actual device sensor colorspace.</p> 2239 * <p>This matrix is used to correct for per-device variations in the 2240 * sensor colorspace, and is used for processing raw buffer data.</p> 2241 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and 2242 * contains a per-device calibration transform that maps colors 2243 * from reference sensor color space (i.e. the "golden module" 2244 * colorspace) into this camera device's native sensor color 2245 * space under the first reference illuminant 2246 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p> 2247 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2248 * 2249 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 2250 */ 2251 @PublicKey 2252 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM1 = 2253 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform1", android.hardware.camera2.params.ColorSpaceTransform.class); 2254 2255 /** 2256 * <p>A per-device calibration transform matrix that maps from the 2257 * reference sensor colorspace to the actual device sensor colorspace 2258 * (this is the colorspace of the raw buffer data).</p> 2259 * <p>This matrix is used to correct for per-device variations in the 2260 * sensor colorspace, and is used for processing raw buffer data.</p> 2261 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and 2262 * contains a per-device calibration transform that maps colors 2263 * from reference sensor color space (i.e. the "golden module" 2264 * colorspace) into this camera device's native sensor color 2265 * space under the second reference illuminant 2266 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p> 2267 * <p>This matrix will only be present if the second reference 2268 * illuminant is present.</p> 2269 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2270 * 2271 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 2272 */ 2273 @PublicKey 2274 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM2 = 2275 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform2", android.hardware.camera2.params.ColorSpaceTransform.class); 2276 2277 /** 2278 * <p>A matrix that transforms color values from CIE XYZ color space to 2279 * reference sensor color space.</p> 2280 * <p>This matrix is used to convert from the standard CIE XYZ color 2281 * space to the reference sensor colorspace, and is used when processing 2282 * raw buffer data.</p> 2283 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and 2284 * contains a color transform matrix that maps colors from the CIE 2285 * XYZ color space to the reference sensor color space (i.e. the 2286 * "golden module" colorspace) under the first reference illuminant 2287 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p> 2288 * <p>The white points chosen in both the reference sensor color space 2289 * and the CIE XYZ colorspace when calculating this transform will 2290 * match the standard white point for the first reference illuminant 2291 * (i.e. no chromatic adaptation will be applied by this transform).</p> 2292 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2293 * 2294 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 2295 */ 2296 @PublicKey 2297 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM1 = 2298 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform1", android.hardware.camera2.params.ColorSpaceTransform.class); 2299 2300 /** 2301 * <p>A matrix that transforms color values from CIE XYZ color space to 2302 * reference sensor color space.</p> 2303 * <p>This matrix is used to convert from the standard CIE XYZ color 2304 * space to the reference sensor colorspace, and is used when processing 2305 * raw buffer data.</p> 2306 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and 2307 * contains a color transform matrix that maps colors from the CIE 2308 * XYZ color space to the reference sensor color space (i.e. the 2309 * "golden module" colorspace) under the second reference illuminant 2310 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p> 2311 * <p>The white points chosen in both the reference sensor color space 2312 * and the CIE XYZ colorspace when calculating this transform will 2313 * match the standard white point for the second reference illuminant 2314 * (i.e. no chromatic adaptation will be applied by this transform).</p> 2315 * <p>This matrix will only be present if the second reference 2316 * illuminant is present.</p> 2317 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2318 * 2319 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 2320 */ 2321 @PublicKey 2322 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM2 = 2323 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform2", android.hardware.camera2.params.ColorSpaceTransform.class); 2324 2325 /** 2326 * <p>A matrix that transforms white balanced camera colors from the reference 2327 * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p> 2328 * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and 2329 * is used when processing raw buffer data.</p> 2330 * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains 2331 * a color transform matrix that maps white balanced colors from the 2332 * reference sensor color space to the CIE XYZ color space with a D50 white 2333 * point.</p> 2334 * <p>Under the first reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}) 2335 * this matrix is chosen so that the standard white point for this reference 2336 * illuminant in the reference sensor colorspace is mapped to D50 in the 2337 * CIE XYZ colorspace.</p> 2338 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2339 * 2340 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 2341 */ 2342 @PublicKey 2343 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX1 = 2344 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix1", android.hardware.camera2.params.ColorSpaceTransform.class); 2345 2346 /** 2347 * <p>A matrix that transforms white balanced camera colors from the reference 2348 * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p> 2349 * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and 2350 * is used when processing raw buffer data.</p> 2351 * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains 2352 * a color transform matrix that maps white balanced colors from the 2353 * reference sensor color space to the CIE XYZ color space with a D50 white 2354 * point.</p> 2355 * <p>Under the second reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}) 2356 * this matrix is chosen so that the standard white point for this reference 2357 * illuminant in the reference sensor colorspace is mapped to D50 in the 2358 * CIE XYZ colorspace.</p> 2359 * <p>This matrix will only be present if the second reference 2360 * illuminant is present.</p> 2361 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2362 * 2363 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 2364 */ 2365 @PublicKey 2366 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX2 = 2367 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix2", android.hardware.camera2.params.ColorSpaceTransform.class); 2368 2369 /** 2370 * <p>A fixed black level offset for each of the color filter arrangement 2371 * (CFA) mosaic channels.</p> 2372 * <p>This key specifies the zero light value for each of the CFA mosaic 2373 * channels in the camera sensor. The maximal value output by the 2374 * sensor is represented by the value in {@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}.</p> 2375 * <p>The values are given in the same order as channels listed for the CFA 2376 * layout key (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}), i.e. the 2377 * nth value given corresponds to the black level offset for the nth 2378 * color channel listed in the CFA.</p> 2379 * <p><b>Range of valid values:</b><br> 2380 * >= 0 for each.</p> 2381 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2382 * 2383 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT 2384 * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL 2385 */ 2386 @PublicKey 2387 public static final Key<android.hardware.camera2.params.BlackLevelPattern> SENSOR_BLACK_LEVEL_PATTERN = 2388 new Key<android.hardware.camera2.params.BlackLevelPattern>("android.sensor.blackLevelPattern", android.hardware.camera2.params.BlackLevelPattern.class); 2389 2390 /** 2391 * <p>Maximum sensitivity that is implemented 2392 * purely through analog gain.</p> 2393 * <p>For {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} values less than or 2394 * equal to this, all applied gain must be analog. For 2395 * values above this, the gain applied can be a mix of analog and 2396 * digital.</p> 2397 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2398 * <p><b>Full capability</b> - 2399 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 2400 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2401 * 2402 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2403 * @see CaptureRequest#SENSOR_SENSITIVITY 2404 */ 2405 @PublicKey 2406 public static final Key<Integer> SENSOR_MAX_ANALOG_SENSITIVITY = 2407 new Key<Integer>("android.sensor.maxAnalogSensitivity", int.class); 2408 2409 /** 2410 * <p>Clockwise angle through which the output image needs to be rotated to be 2411 * upright on the device screen in its native orientation.</p> 2412 * <p>Also defines the direction of rolling shutter readout, which is from top to bottom in 2413 * the sensor's coordinate system.</p> 2414 * <p><b>Units</b>: Degrees of clockwise rotation; always a multiple of 2415 * 90</p> 2416 * <p><b>Range of valid values:</b><br> 2417 * 0, 90, 180, 270</p> 2418 * <p>This key is available on all devices.</p> 2419 */ 2420 @PublicKey 2421 public static final Key<Integer> SENSOR_ORIENTATION = 2422 new Key<Integer>("android.sensor.orientation", int.class); 2423 2424 /** 2425 * <p>List of sensor test pattern modes for {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode} 2426 * supported by this camera device.</p> 2427 * <p>Defaults to OFF, and always includes OFF if defined.</p> 2428 * <p><b>Range of valid values:</b><br> 2429 * Any value listed in {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}</p> 2430 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2431 * 2432 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 2433 */ 2434 @PublicKey 2435 public static final Key<int[]> SENSOR_AVAILABLE_TEST_PATTERN_MODES = 2436 new Key<int[]>("android.sensor.availableTestPatternModes", int[].class); 2437 2438 /** 2439 * <p>List of lens shading modes for {@link CaptureRequest#SHADING_MODE android.shading.mode} that are supported by this camera device.</p> 2440 * <p>This list contains lens shading modes that can be set for the camera device. 2441 * Camera devices that support the MANUAL_POST_PROCESSING capability will always 2442 * list OFF and FAST mode. This includes all FULL level devices. 2443 * LEGACY devices will always only support FAST mode.</p> 2444 * <p><b>Range of valid values:</b><br> 2445 * Any value listed in {@link CaptureRequest#SHADING_MODE android.shading.mode}</p> 2446 * <p>This key is available on all devices.</p> 2447 * 2448 * @see CaptureRequest#SHADING_MODE 2449 */ 2450 @PublicKey 2451 public static final Key<int[]> SHADING_AVAILABLE_MODES = 2452 new Key<int[]>("android.shading.availableModes", int[].class); 2453 2454 /** 2455 * <p>List of face detection modes for {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} that are 2456 * supported by this camera device.</p> 2457 * <p>OFF is always supported.</p> 2458 * <p><b>Range of valid values:</b><br> 2459 * Any value listed in {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}</p> 2460 * <p>This key is available on all devices.</p> 2461 * 2462 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 2463 */ 2464 @PublicKey 2465 public static final Key<int[]> STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES = 2466 new Key<int[]>("android.statistics.info.availableFaceDetectModes", int[].class); 2467 2468 /** 2469 * <p>The maximum number of simultaneously detectable 2470 * faces.</p> 2471 * <p><b>Range of valid values:</b><br> 2472 * 0 for cameras without available face detection; otherwise: 2473 * <code>>=4</code> for LIMITED or FULL hwlevel devices or 2474 * <code>>0</code> for LEGACY devices.</p> 2475 * <p>This key is available on all devices.</p> 2476 */ 2477 @PublicKey 2478 public static final Key<Integer> STATISTICS_INFO_MAX_FACE_COUNT = 2479 new Key<Integer>("android.statistics.info.maxFaceCount", int.class); 2480 2481 /** 2482 * <p>List of hot pixel map output modes for {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode} that are 2483 * supported by this camera device.</p> 2484 * <p>If no hotpixel map output is available for this camera device, this will contain only 2485 * <code>false</code>.</p> 2486 * <p>ON is always supported on devices with the RAW capability.</p> 2487 * <p><b>Range of valid values:</b><br> 2488 * Any value listed in {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode}</p> 2489 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2490 * 2491 * @see CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE 2492 */ 2493 @PublicKey 2494 public static final Key<boolean[]> STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES = 2495 new Key<boolean[]>("android.statistics.info.availableHotPixelMapModes", boolean[].class); 2496 2497 /** 2498 * <p>List of lens shading map output modes for {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} that 2499 * are supported by this camera device.</p> 2500 * <p>If no lens shading map output is available for this camera device, this key will 2501 * contain only OFF.</p> 2502 * <p>ON is always supported on devices with the RAW capability. 2503 * LEGACY mode devices will always only support OFF.</p> 2504 * <p><b>Range of valid values:</b><br> 2505 * Any value listed in {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode}</p> 2506 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2507 * 2508 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 2509 */ 2510 @PublicKey 2511 public static final Key<int[]> STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES = 2512 new Key<int[]>("android.statistics.info.availableLensShadingMapModes", int[].class); 2513 2514 /** 2515 * <p>Maximum number of supported points in the 2516 * tonemap curve that can be used for {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p> 2517 * <p>If the actual number of points provided by the application (in {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}*) is 2518 * less than this maximum, the camera device will resample the curve to its internal 2519 * representation, using linear interpolation.</p> 2520 * <p>The output curves in the result metadata may have a different number 2521 * of points than the input curves, and will represent the actual 2522 * hardware curves used as closely as possible when linearly interpolated.</p> 2523 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2524 * <p><b>Full capability</b> - 2525 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 2526 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2527 * 2528 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2529 * @see CaptureRequest#TONEMAP_CURVE 2530 */ 2531 @PublicKey 2532 public static final Key<Integer> TONEMAP_MAX_CURVE_POINTS = 2533 new Key<Integer>("android.tonemap.maxCurvePoints", int.class); 2534 2535 /** 2536 * <p>List of tonemapping modes for {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} that are supported by this camera 2537 * device.</p> 2538 * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always contain 2539 * at least one of below mode combinations:</p> 2540 * <ul> 2541 * <li>CONTRAST_CURVE, FAST and HIGH_QUALITY</li> 2542 * <li>GAMMA_VALUE, PRESET_CURVE, FAST and HIGH_QUALITY</li> 2543 * </ul> 2544 * <p>This includes all FULL level devices.</p> 2545 * <p><b>Range of valid values:</b><br> 2546 * Any value listed in {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</p> 2547 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2548 * <p><b>Full capability</b> - 2549 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 2550 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2551 * 2552 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2553 * @see CaptureRequest#TONEMAP_MODE 2554 */ 2555 @PublicKey 2556 public static final Key<int[]> TONEMAP_AVAILABLE_TONE_MAP_MODES = 2557 new Key<int[]>("android.tonemap.availableToneMapModes", int[].class); 2558 2559 /** 2560 * <p>A list of camera LEDs that are available on this system.</p> 2561 * <p><b>Possible values:</b> 2562 * <ul> 2563 * <li>{@link #LED_AVAILABLE_LEDS_TRANSMIT TRANSMIT}</li> 2564 * </ul></p> 2565 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2566 * @see #LED_AVAILABLE_LEDS_TRANSMIT 2567 * @hide 2568 */ 2569 public static final Key<int[]> LED_AVAILABLE_LEDS = 2570 new Key<int[]>("android.led.availableLeds", int[].class); 2571 2572 /** 2573 * <p>Generally classifies the overall set of the camera device functionality.</p> 2574 * <p>Camera devices will come in three flavors: LEGACY, LIMITED and FULL.</p> 2575 * <p>A FULL device will support below capabilities:</p> 2576 * <ul> 2577 * <li>30fps operation at maximum resolution (== sensor resolution) is preferred, more than 2578 * 20fps is required, for at least uncompressed YUV 2579 * output. ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains BURST_CAPTURE)</li> 2580 * <li>Per frame control ({@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} <code>==</code> PER_FRAME_CONTROL)</li> 2581 * <li>Manual sensor control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains MANUAL_SENSOR)</li> 2582 * <li>Manual post-processing control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains 2583 * MANUAL_POST_PROCESSING)</li> 2584 * <li>Arbitrary cropping region ({@link CameraCharacteristics#SCALER_CROPPING_TYPE android.scaler.croppingType} <code>==</code> FREEFORM)</li> 2585 * <li>At least 3 processed (but not stalling) format output streams 2586 * ({@link CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_PROC android.request.maxNumOutputProc} <code>>=</code> 3)</li> 2587 * <li>The required stream configuration defined in android.scaler.availableStreamConfigurations</li> 2588 * <li>The required exposure time range defined in {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li> 2589 * <li>The required maxFrameDuration defined in {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li> 2590 * </ul> 2591 * <p>A LIMITED device may have some or none of the above characteristics. 2592 * To find out more refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p> 2593 * <p>Some features are not part of any particular hardware level or capability and must be 2594 * queried separately. These include:</p> 2595 * <ul> 2596 * <li>Calibrated timestamps ({@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} <code>==</code> REALTIME)</li> 2597 * <li>Precision lens control ({@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} <code>==</code> CALIBRATED)</li> 2598 * <li>Face detection ({@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes})</li> 2599 * <li>Optical or electrical image stabilization 2600 * ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization}, 2601 * {@link CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES android.control.availableVideoStabilizationModes})</li> 2602 * </ul> 2603 * <p>A LEGACY device does not support per-frame control, manual sensor control, manual 2604 * post-processing, arbitrary cropping regions, and has relaxed performance constraints.</p> 2605 * <p>Each higher level supports everything the lower level supports 2606 * in this order: FULL <code>></code> LIMITED <code>></code> LEGACY.</p> 2607 * <p>A HIGH_RESOLUTION device is equivalent to a FULL device, except that:</p> 2608 * <ul> 2609 * <li>At least one output resolution of 8 megapixels or higher in uncompressed YUV is 2610 * supported at <code>>=</code> 20 fps.</li> 2611 * <li>Maximum-size (sensor resolution) uncompressed YUV is supported at <code>>=</code> 10 2612 * fps.</li> 2613 * <li>For devices that list the RAW capability and support either RAW10 or RAW12 output, 2614 * maximum-resolution RAW10 or RAW12 capture will operate at least at the rate of 2615 * maximum-resolution YUV capture, and at least one supported output resolution of 2616 * 8 megapixels or higher in RAW10 or RAW12 is supported <code>>=</code> 20 fps.</li> 2617 * </ul> 2618 * <p><b>Possible values:</b> 2619 * <ul> 2620 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED}</li> 2621 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL}</li> 2622 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY LEGACY}</li> 2623 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_HIGH_RESOLUTION HIGH_RESOLUTION}</li> 2624 * </ul></p> 2625 * <p>This key is available on all devices.</p> 2626 * 2627 * @see CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES 2628 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION 2629 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION 2630 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 2631 * @see CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_PROC 2632 * @see CameraCharacteristics#SCALER_CROPPING_TYPE 2633 * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE 2634 * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION 2635 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE 2636 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES 2637 * @see CameraCharacteristics#SYNC_MAX_LATENCY 2638 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED 2639 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_FULL 2640 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY 2641 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_HIGH_RESOLUTION 2642 */ 2643 @PublicKey 2644 public static final Key<Integer> INFO_SUPPORTED_HARDWARE_LEVEL = 2645 new Key<Integer>("android.info.supportedHardwareLevel", int.class); 2646 2647 /** 2648 * <p>The maximum number of frames that can occur after a request 2649 * (different than the previous) has been submitted, and before the 2650 * result's state becomes synchronized (by setting 2651 * android.sync.frameNumber to a non-negative value).</p> 2652 * <p>This defines the maximum distance (in number of metadata results), 2653 * between android.sync.frameNumber and the equivalent 2654 * frame number for that result.</p> 2655 * <p>In other words this acts as an upper boundary for how many frames 2656 * must occur before the camera device knows for a fact that the new 2657 * submitted camera settings have been applied in outgoing frames.</p> 2658 * <p>For example if the distance was 2,</p> 2659 * <pre><code>initial request = X (repeating) 2660 * request1 = X 2661 * request2 = Y 2662 * request3 = Y 2663 * request4 = Y 2664 * 2665 * where requestN has frameNumber N, and the first of the repeating 2666 * initial request's has frameNumber F (and F < 1). 2667 * 2668 * initial result = X' + { android.sync.frameNumber == F } 2669 * result1 = X' + { android.sync.frameNumber == F } 2670 * result2 = X' + { android.sync.frameNumber == CONVERGING } 2671 * result3 = X' + { android.sync.frameNumber == CONVERGING } 2672 * result4 = X' + { android.sync.frameNumber == 2 } 2673 * 2674 * where resultN has frameNumber N. 2675 * </code></pre> 2676 * <p>Since <code>result4</code> has a <code>frameNumber == 4</code> and 2677 * <code>android.sync.frameNumber == 2</code>, the distance is clearly 2678 * <code>4 - 2 = 2</code>.</p> 2679 * <p><b>Units</b>: Frame counts</p> 2680 * <p><b>Possible values:</b> 2681 * <ul> 2682 * <li>{@link #SYNC_MAX_LATENCY_PER_FRAME_CONTROL PER_FRAME_CONTROL}</li> 2683 * <li>{@link #SYNC_MAX_LATENCY_UNKNOWN UNKNOWN}</li> 2684 * </ul></p> 2685 * <p><b>Available values for this device:</b><br> 2686 * A positive value, PER_FRAME_CONTROL, or UNKNOWN.</p> 2687 * <p>This key is available on all devices.</p> 2688 * @see #SYNC_MAX_LATENCY_PER_FRAME_CONTROL 2689 * @see #SYNC_MAX_LATENCY_UNKNOWN 2690 */ 2691 @PublicKey 2692 public static final Key<Integer> SYNC_MAX_LATENCY = 2693 new Key<Integer>("android.sync.maxLatency", int.class); 2694 2695 /** 2696 * <p>The maximal camera capture pipeline stall (in unit of frame count) introduced by a 2697 * reprocess capture request.</p> 2698 * <p>The key describes the maximal interference that one reprocess (input) request 2699 * can introduce to the camera simultaneous streaming of regular (output) capture 2700 * requests, including repeating requests.</p> 2701 * <p>When a reprocessing capture request is submitted while a camera output repeating request 2702 * (e.g. preview) is being served by the camera device, it may preempt the camera capture 2703 * pipeline for at least one frame duration so that the camera device is unable to process 2704 * the following capture request in time for the next sensor start of exposure boundary. 2705 * When this happens, the application may observe a capture time gap (longer than one frame 2706 * duration) between adjacent capture output frames, which usually exhibits as preview 2707 * glitch if the repeating request output targets include a preview surface. This key gives 2708 * the worst-case number of frame stall introduced by one reprocess request with any kind of 2709 * formats/sizes combination.</p> 2710 * <p>If this key reports 0, it means a reprocess request doesn't introduce any glitch to the 2711 * ongoing camera repeating request outputs, as if this reprocess request is never issued.</p> 2712 * <p>This key is supported if the camera device supports PRIVATE or YUV reprocessing ( 2713 * i.e. {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains PRIVATE_REPROCESSING or 2714 * YUV_REPROCESSING).</p> 2715 * <p><b>Units</b>: Number of frames.</p> 2716 * <p><b>Range of valid values:</b><br> 2717 * <= 4</p> 2718 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2719 * <p><b>Limited capability</b> - 2720 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 2721 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2722 * 2723 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2724 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 2725 */ 2726 @PublicKey 2727 public static final Key<Integer> REPROCESS_MAX_CAPTURE_STALL = 2728 new Key<Integer>("android.reprocess.maxCaptureStall", int.class); 2729 2730 /** 2731 * <p>The available depth dataspace stream 2732 * configurations that this camera device supports 2733 * (i.e. format, width, height, output/input stream).</p> 2734 * <p>These are output stream configurations for use with 2735 * dataSpace HAL_DATASPACE_DEPTH. The configurations are 2736 * listed as <code>(format, width, height, input?)</code> tuples.</p> 2737 * <p>Only devices that support depth output for at least 2738 * the HAL_PIXEL_FORMAT_Y16 dense depth map may include 2739 * this entry.</p> 2740 * <p>A device that also supports the HAL_PIXEL_FORMAT_BLOB 2741 * sparse depth point cloud must report a single entry for 2742 * the format in this list as <code>(HAL_PIXEL_FORMAT_BLOB, 2743 * android.depth.maxDepthSamples, 1, OUTPUT)</code> in addition to 2744 * the entries for HAL_PIXEL_FORMAT_Y16.</p> 2745 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2746 * <p><b>Limited capability</b> - 2747 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 2748 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2749 * 2750 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2751 * @hide 2752 */ 2753 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS = 2754 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.depth.availableDepthStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class); 2755 2756 /** 2757 * <p>This lists the minimum frame duration for each 2758 * format/size combination for depth output formats.</p> 2759 * <p>This should correspond to the frame duration when only that 2760 * stream is active, with all processing (typically in android.*.mode) 2761 * set to either OFF or FAST.</p> 2762 * <p>When multiple streams are used in a request, the minimum frame 2763 * duration will be max(individual stream min durations).</p> 2764 * <p>The minimum frame duration of a stream (of a particular format, size) 2765 * is the same regardless of whether the stream is input or output.</p> 2766 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and 2767 * android.scaler.availableStallDurations for more details about 2768 * calculating the max frame rate.</p> 2769 * <p>(Keep in sync with {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration })</p> 2770 * <p><b>Units</b>: (format, width, height, ns) x n</p> 2771 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2772 * <p><b>Limited capability</b> - 2773 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 2774 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2775 * 2776 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2777 * @see CaptureRequest#SENSOR_FRAME_DURATION 2778 * @hide 2779 */ 2780 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS = 2781 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); 2782 2783 /** 2784 * <p>This lists the maximum stall duration for each 2785 * output format/size combination for depth streams.</p> 2786 * <p>A stall duration is how much extra time would get added 2787 * to the normal minimum frame duration for a repeating request 2788 * that has streams with non-zero stall.</p> 2789 * <p>This functions similarly to 2790 * android.scaler.availableStallDurations for depth 2791 * streams.</p> 2792 * <p>All depth output stream formats may have a nonzero stall 2793 * duration.</p> 2794 * <p><b>Units</b>: (format, width, height, ns) x n</p> 2795 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2796 * <p><b>Limited capability</b> - 2797 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 2798 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2799 * 2800 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2801 * @hide 2802 */ 2803 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS = 2804 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); 2805 2806 /** 2807 * <p>Indicates whether a capture request may target both a 2808 * DEPTH16 / DEPTH_POINT_CLOUD output, and normal color outputs (such as 2809 * YUV_420_888, JPEG, or RAW) simultaneously.</p> 2810 * <p>If TRUE, including both depth and color outputs in a single 2811 * capture request is not supported. An application must interleave color 2812 * and depth requests. If FALSE, a single request can target both types 2813 * of output.</p> 2814 * <p>Typically, this restriction exists on camera devices that 2815 * need to emit a specific pattern or wavelength of light to 2816 * measure depth values, which causes the color image to be 2817 * corrupted during depth measurement.</p> 2818 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2819 * <p><b>Limited capability</b> - 2820 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 2821 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2822 * 2823 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2824 */ 2825 @PublicKey 2826 public static final Key<Boolean> DEPTH_DEPTH_IS_EXCLUSIVE = 2827 new Key<Boolean>("android.depth.depthIsExclusive", boolean.class); 2828 2829 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 2830 * End generated code 2831 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/ 2832 2833 2834 2835} 2836