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