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