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