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.compat.annotation.UnsupportedAppUsage; 22 import android.hardware.camera2.impl.CameraMetadataNative; 23 import android.hardware.camera2.impl.PublicKey; 24 import android.hardware.camera2.impl.SyntheticKey; 25 import android.hardware.camera2.params.DeviceStateSensorOrientationMap; 26 import android.hardware.camera2.params.RecommendedStreamConfigurationMap; 27 import android.hardware.camera2.params.SessionConfiguration; 28 import android.hardware.camera2.utils.TypeReference; 29 import android.os.Build; 30 import android.util.Log; 31 import android.util.Rational; 32 33 import com.android.internal.annotations.GuardedBy; 34 35 import java.util.ArrayList; 36 import java.util.Collections; 37 import java.util.List; 38 import java.util.Set; 39 40 /** 41 * <p>The properties describing a 42 * {@link CameraDevice CameraDevice}.</p> 43 * 44 * <p>These properties are primarily fixed for a given CameraDevice, and can be queried 45 * through the {@link CameraManager CameraManager} 46 * interface with {@link CameraManager#getCameraCharacteristics}. Beginning with API level 32, some 47 * properties such as {@link #SENSOR_ORIENTATION} may change dynamically based on the state of the 48 * device. For information on whether a specific value is fixed, see the documentation for its key. 49 * </p> 50 * 51 * <p>When obtained by a client that does not hold the CAMERA permission, some metadata values are 52 * not included. The list of keys that require the permission is given by 53 * {@link #getKeysNeedingPermission}.</p> 54 * 55 * <p>{@link CameraCharacteristics} objects are immutable.</p> 56 * 57 * @see CameraDevice 58 * @see CameraManager 59 */ 60 public final class CameraCharacteristics extends CameraMetadata<CameraCharacteristics.Key<?>> { 61 62 /** 63 * A {@code Key} is used to do camera characteristics field lookups with 64 * {@link CameraCharacteristics#get}. 65 * 66 * <p>For example, to get the stream configuration map: 67 * <code><pre> 68 * StreamConfigurationMap map = cameraCharacteristics.get( 69 * CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP); 70 * </pre></code> 71 * </p> 72 * 73 * <p>To enumerate over all possible keys for {@link CameraCharacteristics}, see 74 * {@link CameraCharacteristics#getKeys()}.</p> 75 * 76 * @see CameraCharacteristics#get 77 * @see CameraCharacteristics#getKeys() 78 */ 79 public static final class Key<T> { 80 private final CameraMetadataNative.Key<T> mKey; 81 82 /** 83 * Visible for testing and vendor extensions only. 84 * 85 * @hide 86 */ 87 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) Key(String name, Class<T> type, long vendorId)88 public Key(String name, Class<T> type, long vendorId) { 89 mKey = new CameraMetadataNative.Key<T>(name, type, vendorId); 90 } 91 92 /** 93 * Visible for testing and vendor extensions only. 94 * 95 * @hide 96 */ Key(String name, String fallbackName, Class<T> type)97 public Key(String name, String fallbackName, Class<T> type) { 98 mKey = new CameraMetadataNative.Key<T>(name, fallbackName, type); 99 } 100 101 /** 102 * Construct a new Key with a given name and type. 103 * 104 * <p>Normally, applications should use the existing Key definitions in 105 * {@link CameraCharacteristics}, and not need to construct their own Key objects. However, 106 * they may be useful for testing purposes and for defining custom camera 107 * characteristics.</p> 108 */ Key(@onNull String name, @NonNull Class<T> type)109 public Key(@NonNull String name, @NonNull Class<T> type) { 110 mKey = new CameraMetadataNative.Key<T>(name, type); 111 } 112 113 /** 114 * Visible for testing and vendor extensions only. 115 * 116 * @hide 117 */ 118 @UnsupportedAppUsage Key(String name, TypeReference<T> typeReference)119 public Key(String name, TypeReference<T> typeReference) { 120 mKey = new CameraMetadataNative.Key<T>(name, typeReference); 121 } 122 123 /** 124 * Return a camelCase, period separated name formatted like: 125 * {@code "root.section[.subsections].name"}. 126 * 127 * <p>Built-in keys exposed by the Android SDK are always prefixed with {@code "android."}; 128 * keys that are device/platform-specific are prefixed with {@code "com."}.</p> 129 * 130 * <p>For example, {@code CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP} would 131 * have a name of {@code "android.scaler.streamConfigurationMap"}; whereas a device 132 * specific key might look like {@code "com.google.nexus.data.private"}.</p> 133 * 134 * @return String representation of the key name 135 */ 136 @NonNull getName()137 public String getName() { 138 return mKey.getName(); 139 } 140 141 /** 142 * Return vendor tag id. 143 * 144 * @hide 145 */ getVendorId()146 public long getVendorId() { 147 return mKey.getVendorId(); 148 } 149 150 /** 151 * {@inheritDoc} 152 */ 153 @Override hashCode()154 public final int hashCode() { 155 return mKey.hashCode(); 156 } 157 158 /** 159 * {@inheritDoc} 160 */ 161 @SuppressWarnings("unchecked") 162 @Override equals(Object o)163 public final boolean equals(Object o) { 164 return o instanceof Key && ((Key<T>)o).mKey.equals(mKey); 165 } 166 167 /** 168 * Return this {@link Key} as a string representation. 169 * 170 * <p>{@code "CameraCharacteristics.Key(%s)"}, where {@code %s} represents 171 * the name of this key as returned by {@link #getName}.</p> 172 * 173 * @return string representation of {@link Key} 174 */ 175 @NonNull 176 @Override toString()177 public String toString() { 178 return String.format("CameraCharacteristics.Key(%s)", mKey.getName()); 179 } 180 181 /** 182 * Visible for CameraMetadataNative implementation only; do not use. 183 * 184 * TODO: Make this private or remove it altogether. 185 * 186 * @hide 187 */ 188 @UnsupportedAppUsage getNativeKey()189 public CameraMetadataNative.Key<T> getNativeKey() { 190 return mKey; 191 } 192 193 @SuppressWarnings({ 194 "unused", "unchecked" 195 }) Key(CameraMetadataNative.Key<?> nativeKey)196 private Key(CameraMetadataNative.Key<?> nativeKey) { 197 mKey = (CameraMetadataNative.Key<T>) nativeKey; 198 } 199 } 200 201 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 202 private final CameraMetadataNative mProperties; 203 private List<CameraCharacteristics.Key<?>> mKeys; 204 private List<CameraCharacteristics.Key<?>> mKeysNeedingPermission; 205 private List<CaptureRequest.Key<?>> mAvailableRequestKeys; 206 private List<CaptureRequest.Key<?>> mAvailableSessionKeys; 207 private List<CaptureRequest.Key<?>> mAvailablePhysicalRequestKeys; 208 private List<CaptureResult.Key<?>> mAvailableResultKeys; 209 private ArrayList<RecommendedStreamConfigurationMap> mRecommendedConfigurations; 210 211 private final Object mLock = new Object(); 212 @GuardedBy("mLock") 213 private boolean mFoldedDeviceState; 214 215 private CameraManager.DeviceStateListener mFoldStateListener; 216 217 private static final String TAG = "CameraCharacteristics"; 218 219 /** 220 * Takes ownership of the passed-in properties object 221 * 222 * @param properties Camera properties. 223 * @hide 224 */ CameraCharacteristics(CameraMetadataNative properties)225 public CameraCharacteristics(CameraMetadataNative properties) { 226 mProperties = CameraMetadataNative.move(properties); 227 setNativeInstance(mProperties); 228 } 229 230 /** 231 * Returns a copy of the underlying {@link CameraMetadataNative}. 232 * @hide 233 */ getNativeCopy()234 public CameraMetadataNative getNativeCopy() { 235 return new CameraMetadataNative(mProperties); 236 } 237 238 /** 239 * Return the device state listener for this Camera characteristics instance 240 */ getDeviceStateListener()241 CameraManager.DeviceStateListener getDeviceStateListener() { 242 if (mFoldStateListener == null) { 243 mFoldStateListener = new CameraManager.DeviceStateListener() { 244 @Override 245 public final void onDeviceStateChanged(boolean folded) { 246 synchronized (mLock) { 247 mFoldedDeviceState = folded; 248 } 249 }}; 250 } 251 return mFoldStateListener; 252 } 253 254 /** 255 * Overrides the property value 256 * 257 * <p>Check whether a given property value needs to be overridden in some specific 258 * case.</p> 259 * 260 * @param key The characteristics field to override. 261 * @return The value of overridden property, or {@code null} if the property doesn't need an 262 * override. 263 */ 264 @Nullable overrideProperty(Key<T> key)265 private <T> T overrideProperty(Key<T> key) { 266 if (CameraCharacteristics.SENSOR_ORIENTATION.equals(key) && (mFoldStateListener != null) && 267 (mProperties.get(CameraCharacteristics.INFO_DEVICE_STATE_ORIENTATIONS) != null)) { 268 DeviceStateSensorOrientationMap deviceStateSensorOrientationMap = 269 mProperties.get(CameraCharacteristics.INFO_DEVICE_STATE_SENSOR_ORIENTATION_MAP); 270 synchronized (mLock) { 271 Integer ret = deviceStateSensorOrientationMap.getSensorOrientation( 272 mFoldedDeviceState ? DeviceStateSensorOrientationMap.FOLDED : 273 DeviceStateSensorOrientationMap.NORMAL); 274 if (ret >= 0) { 275 return (T) ret; 276 } else { 277 Log.w(TAG, "No valid device state to orientation mapping! Using default!"); 278 } 279 } 280 } 281 282 return null; 283 } 284 285 /** 286 * Get a camera characteristics field value. 287 * 288 * <p>The field definitions can be 289 * found in {@link CameraCharacteristics}.</p> 290 * 291 * @throws IllegalArgumentException if the key was not valid 292 * 293 * @param key The characteristics field to read. 294 * @return The value of that key, or {@code null} if the field is not set. 295 */ 296 @Nullable get(Key<T> key)297 public <T> T get(Key<T> key) { 298 T propertyOverride = overrideProperty(key); 299 return (propertyOverride != null) ? propertyOverride : mProperties.get(key); 300 } 301 302 /** 303 * {@inheritDoc} 304 * @hide 305 */ 306 @SuppressWarnings("unchecked") 307 @Override getProtected(Key<?> key)308 protected <T> T getProtected(Key<?> key) { 309 return (T) mProperties.get(key); 310 } 311 312 /** 313 * {@inheritDoc} 314 * @hide 315 */ 316 @SuppressWarnings("unchecked") 317 @Override getKeyClass()318 protected Class<Key<?>> getKeyClass() { 319 Object thisClass = Key.class; 320 return (Class<Key<?>>)thisClass; 321 } 322 323 /** 324 * {@inheritDoc} 325 */ 326 @NonNull 327 @Override getKeys()328 public List<Key<?>> getKeys() { 329 // List of keys is immutable; cache the results after we calculate them 330 if (mKeys != null) { 331 return mKeys; 332 } 333 334 int[] filterTags = get(REQUEST_AVAILABLE_CHARACTERISTICS_KEYS); 335 if (filterTags == null) { 336 throw new AssertionError("android.request.availableCharacteristicsKeys must be non-null" 337 + " in the characteristics"); 338 } 339 340 mKeys = Collections.unmodifiableList( 341 getKeys(getClass(), getKeyClass(), this, filterTags, true)); 342 return mKeys; 343 } 344 345 /** 346 * <p>Returns a subset of the list returned by {@link #getKeys} with all keys that 347 * require camera clients to obtain the {@link android.Manifest.permission#CAMERA} permission. 348 * </p> 349 * 350 * <p>If an application calls {@link CameraManager#getCameraCharacteristics} without holding the 351 * {@link android.Manifest.permission#CAMERA} permission, 352 * all keys in this list will not be available, and calling {@link #get} will 353 * return null for those keys. If the application obtains the 354 * {@link android.Manifest.permission#CAMERA} permission, then the 355 * CameraCharacteristics from a call to a subsequent 356 * {@link CameraManager#getCameraCharacteristics} will have the keys available.</p> 357 * 358 * <p>The list returned is not modifiable, so any attempts to modify it will throw 359 * a {@code UnsupportedOperationException}.</p> 360 * 361 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> 362 * 363 * @return List of camera characteristic keys that require the 364 * {@link android.Manifest.permission#CAMERA} permission. The list can be empty in case 365 * there are no currently present keys that need additional permission. 366 */ getKeysNeedingPermission()367 public @NonNull List<Key<?>> getKeysNeedingPermission() { 368 if (mKeysNeedingPermission == null) { 369 Object crKey = CameraCharacteristics.Key.class; 370 Class<CameraCharacteristics.Key<?>> crKeyTyped = 371 (Class<CameraCharacteristics.Key<?>>)crKey; 372 373 int[] filterTags = get(REQUEST_CHARACTERISTIC_KEYS_NEEDING_PERMISSION); 374 if (filterTags == null) { 375 mKeysNeedingPermission = Collections.unmodifiableList( 376 new ArrayList<CameraCharacteristics.Key<?>> ()); 377 return mKeysNeedingPermission; 378 } 379 mKeysNeedingPermission = 380 getAvailableKeyList(CameraCharacteristics.class, crKeyTyped, filterTags, 381 /*includeSynthetic*/ false); 382 } 383 return mKeysNeedingPermission; 384 } 385 386 /** 387 * <p>Retrieve camera device recommended stream configuration map 388 * {@link RecommendedStreamConfigurationMap} for a given use case.</p> 389 * 390 * <p>The stream configurations advertised here are efficient in terms of power and performance 391 * for common use cases like preview, video, snapshot, etc. The recommended maps are usually 392 * only small subsets of the exhaustive list provided in 393 * {@link #SCALER_STREAM_CONFIGURATION_MAP} and suggested for a particular use case by the 394 * camera device implementation. For further information about the expected configurations in 395 * various scenarios please refer to: 396 * <ul> 397 * <li>{@link RecommendedStreamConfigurationMap#USECASE_PREVIEW}</li> 398 * <li>{@link RecommendedStreamConfigurationMap#USECASE_RECORD}</li> 399 * <li>{@link RecommendedStreamConfigurationMap#USECASE_VIDEO_SNAPSHOT}</li> 400 * <li>{@link RecommendedStreamConfigurationMap#USECASE_SNAPSHOT}</li> 401 * <li>{@link RecommendedStreamConfigurationMap#USECASE_RAW}</li> 402 * <li>{@link RecommendedStreamConfigurationMap#USECASE_ZSL}</li> 403 * <li>{@link RecommendedStreamConfigurationMap#USECASE_LOW_LATENCY_SNAPSHOT}</li> 404 * </ul> 405 * </p> 406 * 407 * <p>For example on how this can be used by camera clients to find out the maximum recommended 408 * preview and snapshot resolution, consider the following pseudo-code: 409 * </p> 410 * <pre><code> 411 * public static Size getMaxSize(Size... sizes) { 412 * if (sizes == null || sizes.length == 0) { 413 * throw new IllegalArgumentException("sizes was empty"); 414 * } 415 * 416 * Size sz = sizes[0]; 417 * for (Size size : sizes) { 418 * if (size.getWidth() * size.getHeight() > sz.getWidth() * sz.getHeight()) { 419 * sz = size; 420 * } 421 * } 422 * 423 * return sz; 424 * } 425 * 426 * CameraCharacteristics characteristics = 427 * cameraManager.getCameraCharacteristics(cameraId); 428 * RecommendedStreamConfigurationMap previewConfig = 429 * characteristics.getRecommendedStreamConfigurationMap( 430 * RecommendedStreamConfigurationMap.USECASE_PREVIEW); 431 * RecommendedStreamConfigurationMap snapshotConfig = 432 * characteristics.getRecommendedStreamConfigurationMap( 433 * RecommendedStreamConfigurationMap.USECASE_SNAPSHOT); 434 * 435 * if ((previewConfig != null) && (snapshotConfig != null)) { 436 * 437 * Set<Size> snapshotSizeSet = snapshotConfig.getOutputSizes( 438 * ImageFormat.JPEG); 439 * Size[] snapshotSizes = new Size[snapshotSizeSet.size()]; 440 * snapshotSizes = snapshotSizeSet.toArray(snapshotSizes); 441 * Size suggestedMaxJpegSize = getMaxSize(snapshotSizes); 442 * 443 * Set<Size> previewSizeSet = snapshotConfig.getOutputSizes( 444 * ImageFormat.PRIVATE); 445 * Size[] previewSizes = new Size[previewSizeSet.size()]; 446 * previewSizes = previewSizeSet.toArray(previewSizes); 447 * Size suggestedMaxPreviewSize = getMaxSize(previewSizes); 448 * } 449 * 450 * </code></pre> 451 * 452 * <p>Similar logic can be used for other use cases as well.</p> 453 * 454 * <p>Support for recommended stream configurations is optional. In case there a no 455 * suggested configurations for the particular use case, please refer to 456 * {@link #SCALER_STREAM_CONFIGURATION_MAP} for the exhaustive available list.</p> 457 * 458 * @param usecase Use case id. 459 * 460 * @throws IllegalArgumentException In case the use case argument is invalid. 461 * @return Valid {@link RecommendedStreamConfigurationMap} or null in case the camera device 462 * doesn't have any recommendation for this use case or the recommended configurations 463 * are invalid. 464 */ getRecommendedStreamConfigurationMap( @ecommendedStreamConfigurationMap.RecommendedUsecase int usecase)465 public @Nullable RecommendedStreamConfigurationMap getRecommendedStreamConfigurationMap( 466 @RecommendedStreamConfigurationMap.RecommendedUsecase int usecase) { 467 if (((usecase >= RecommendedStreamConfigurationMap.USECASE_PREVIEW) && 468 (usecase <= RecommendedStreamConfigurationMap.USECASE_10BIT_OUTPUT)) || 469 ((usecase >= RecommendedStreamConfigurationMap.USECASE_VENDOR_START) && 470 (usecase < RecommendedStreamConfigurationMap.MAX_USECASE_COUNT))) { 471 if (mRecommendedConfigurations == null) { 472 mRecommendedConfigurations = mProperties.getRecommendedStreamConfigurations(); 473 if (mRecommendedConfigurations == null) { 474 return null; 475 } 476 } 477 478 return mRecommendedConfigurations.get(usecase); 479 } 480 481 throw new IllegalArgumentException(String.format("Invalid use case: %d", usecase)); 482 } 483 484 /** 485 * <p>Returns a subset of {@link #getAvailableCaptureRequestKeys} keys that the 486 * camera device can pass as part of the capture session initialization.</p> 487 * 488 * <p>This list includes keys that are difficult to apply per-frame and 489 * can result in unexpected delays when modified during the capture session 490 * lifetime. Typical examples include parameters that require a 491 * time-consuming hardware re-configuration or internal camera pipeline 492 * change. For performance reasons we suggest clients to pass their initial 493 * values as part of {@link SessionConfiguration#setSessionParameters}. Once 494 * the camera capture session is enabled it is also recommended to avoid 495 * changing them from their initial values set in 496 * {@link SessionConfiguration#setSessionParameters }. 497 * Control over session parameters can still be exerted in capture requests 498 * but clients should be aware and expect delays during their application. 499 * An example usage scenario could look like this:</p> 500 * <ul> 501 * <li>The camera client starts by querying the session parameter key list via 502 * {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys }.</li> 503 * <li>Before triggering the capture session create sequence, a capture request 504 * must be built via {@link CameraDevice#createCaptureRequest } using an 505 * appropriate template matching the particular use case.</li> 506 * <li>The client should go over the list of session parameters and check 507 * whether some of the keys listed matches with the parameters that 508 * they intend to modify as part of the first capture request.</li> 509 * <li>If there is no such match, the capture request can be passed 510 * unmodified to {@link SessionConfiguration#setSessionParameters }.</li> 511 * <li>If matches do exist, the client should update the respective values 512 * and pass the request to {@link SessionConfiguration#setSessionParameters }.</li> 513 * <li>After the capture session initialization completes the session parameter 514 * key list can continue to serve as reference when posting or updating 515 * further requests. As mentioned above further changes to session 516 * parameters should ideally be avoided, if updates are necessary 517 * however clients could expect a delay/glitch during the 518 * parameter switch.</li> 519 * </ul> 520 * 521 * <p>The list returned is not modifiable, so any attempts to modify it will throw 522 * a {@code UnsupportedOperationException}.</p> 523 * 524 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> 525 * 526 * @return List of keys that can be passed during capture session initialization. In case the 527 * camera device doesn't support such keys the list can be null. 528 */ 529 @SuppressWarnings({"unchecked"}) getAvailableSessionKeys()530 public List<CaptureRequest.Key<?>> getAvailableSessionKeys() { 531 if (mAvailableSessionKeys == null) { 532 Object crKey = CaptureRequest.Key.class; 533 Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey; 534 535 int[] filterTags = get(REQUEST_AVAILABLE_SESSION_KEYS); 536 if (filterTags == null) { 537 return null; 538 } 539 mAvailableSessionKeys = 540 getAvailableKeyList(CaptureRequest.class, crKeyTyped, filterTags, 541 /*includeSynthetic*/ false); 542 } 543 return mAvailableSessionKeys; 544 } 545 546 /** 547 * <p>Returns a subset of {@link #getAvailableCaptureRequestKeys} keys that can 548 * be overridden for physical devices backing a logical multi-camera.</p> 549 * 550 * <p>This is a subset of android.request.availableRequestKeys which contains a list 551 * of keys that can be overridden using {@link CaptureRequest.Builder#setPhysicalCameraKey }. 552 * The respective value of such request key can be obtained by calling 553 * {@link CaptureRequest.Builder#getPhysicalCameraKey }. Capture requests that contain 554 * individual physical device requests must be built via 555 * {@link android.hardware.camera2.CameraDevice#createCaptureRequest(int, Set)}.</p> 556 * 557 * <p>The list returned is not modifiable, so any attempts to modify it will throw 558 * a {@code UnsupportedOperationException}.</p> 559 * 560 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> 561 * 562 * @return List of keys that can be overridden in individual physical device requests. 563 * In case the camera device doesn't support such keys the list can be null. 564 */ 565 @SuppressWarnings({"unchecked"}) getAvailablePhysicalCameraRequestKeys()566 public List<CaptureRequest.Key<?>> getAvailablePhysicalCameraRequestKeys() { 567 if (mAvailablePhysicalRequestKeys == null) { 568 Object crKey = CaptureRequest.Key.class; 569 Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey; 570 571 int[] filterTags = get(REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS); 572 if (filterTags == null) { 573 return null; 574 } 575 mAvailablePhysicalRequestKeys = 576 getAvailableKeyList(CaptureRequest.class, crKeyTyped, filterTags, 577 /*includeSynthetic*/ false); 578 } 579 return mAvailablePhysicalRequestKeys; 580 } 581 582 /** 583 * Returns the list of keys supported by this {@link CameraDevice} for querying 584 * with a {@link CaptureRequest}. 585 * 586 * <p>The list returned is not modifiable, so any attempts to modify it will throw 587 * a {@code UnsupportedOperationException}.</p> 588 * 589 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> 590 * 591 * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use 592 * {@link #getKeys()} instead.</p> 593 * 594 * @return List of keys supported by this CameraDevice for CaptureRequests. 595 */ 596 @SuppressWarnings({"unchecked"}) 597 @NonNull getAvailableCaptureRequestKeys()598 public List<CaptureRequest.Key<?>> getAvailableCaptureRequestKeys() { 599 if (mAvailableRequestKeys == null) { 600 Object crKey = CaptureRequest.Key.class; 601 Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey; 602 603 int[] filterTags = get(REQUEST_AVAILABLE_REQUEST_KEYS); 604 if (filterTags == null) { 605 throw new AssertionError("android.request.availableRequestKeys must be non-null " 606 + "in the characteristics"); 607 } 608 mAvailableRequestKeys = 609 getAvailableKeyList(CaptureRequest.class, crKeyTyped, filterTags, 610 /*includeSynthetic*/ true); 611 } 612 return mAvailableRequestKeys; 613 } 614 615 /** 616 * Returns the list of keys supported by this {@link CameraDevice} for querying 617 * with a {@link CaptureResult}. 618 * 619 * <p>The list returned is not modifiable, so any attempts to modify it will throw 620 * a {@code UnsupportedOperationException}.</p> 621 * 622 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> 623 * 624 * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use 625 * {@link #getKeys()} instead.</p> 626 * 627 * @return List of keys supported by this CameraDevice for CaptureResults. 628 */ 629 @SuppressWarnings({"unchecked"}) 630 @NonNull getAvailableCaptureResultKeys()631 public List<CaptureResult.Key<?>> getAvailableCaptureResultKeys() { 632 if (mAvailableResultKeys == null) { 633 Object crKey = CaptureResult.Key.class; 634 Class<CaptureResult.Key<?>> crKeyTyped = (Class<CaptureResult.Key<?>>)crKey; 635 636 int[] filterTags = get(REQUEST_AVAILABLE_RESULT_KEYS); 637 if (filterTags == null) { 638 throw new AssertionError("android.request.availableResultKeys must be non-null " 639 + "in the characteristics"); 640 } 641 mAvailableResultKeys = getAvailableKeyList(CaptureResult.class, crKeyTyped, filterTags, 642 /*includeSynthetic*/ true); 643 } 644 return mAvailableResultKeys; 645 } 646 647 /** 648 * Returns the list of keys supported by this {@link CameraDevice} by metadataClass. 649 * 650 * <p>The list returned is not modifiable, so any attempts to modify it will throw 651 * a {@code UnsupportedOperationException}.</p> 652 * 653 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> 654 * 655 * @param metadataClass The subclass of CameraMetadata that you want to get the keys for. 656 * @param keyClass The class of the metadata key, e.g. CaptureRequest.Key.class 657 * @param filterTags An array of tags to be used for filtering 658 * @param includeSynthetic Include public synthetic tag by default. 659 * 660 * @return List of keys supported by this CameraDevice for metadataClass. 661 * 662 * @throws IllegalArgumentException if metadataClass is not a subclass of CameraMetadata 663 */ 664 <TKey> List<TKey> getAvailableKeyList(Class<?> metadataClass, Class<TKey> keyClass, int[] filterTags, boolean includeSynthetic)665 getAvailableKeyList(Class<?> metadataClass, Class<TKey> keyClass, int[] filterTags, 666 boolean includeSynthetic) { 667 668 if (metadataClass.equals(CameraMetadata.class)) { 669 throw new AssertionError( 670 "metadataClass must be a strict subclass of CameraMetadata"); 671 } else if (!CameraMetadata.class.isAssignableFrom(metadataClass)) { 672 throw new AssertionError( 673 "metadataClass must be a subclass of CameraMetadata"); 674 } 675 676 List<TKey> staticKeyList = getKeys( 677 metadataClass, keyClass, /*instance*/null, filterTags, includeSynthetic); 678 return Collections.unmodifiableList(staticKeyList); 679 } 680 681 /** 682 * Returns the set of physical camera ids that this logical {@link CameraDevice} is 683 * made up of. 684 * 685 * <p>A camera device is a logical camera if it has 686 * REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA capability. If the camera device 687 * doesn't have the capability, the return value will be an empty set. </p> 688 * 689 * <p>Prior to API level 29, all returned IDs are guaranteed to be returned by {@link 690 * CameraManager#getCameraIdList}, and can be opened directly by 691 * {@link CameraManager#openCamera}. Starting from API level 29, for each of the returned ID, 692 * if it's also returned by {@link CameraManager#getCameraIdList}, it can be used as a 693 * standalone camera by {@link CameraManager#openCamera}. Otherwise, the camera ID can only be 694 * used as part of the current logical camera.</p> 695 * 696 * <p>The set returned is not modifiable, so any attempts to modify it will throw 697 * a {@code UnsupportedOperationException}.</p> 698 * 699 * @return Set of physical camera ids for this logical camera device. 700 */ 701 @NonNull getPhysicalCameraIds()702 public Set<String> getPhysicalCameraIds() { 703 return mProperties.getPhysicalCameraIds(); 704 } 705 706 /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 707 * The key entries below this point are generated from metadata 708 * definitions in /system/media/camera/docs. Do not modify by hand or 709 * modify the comment blocks at the start or end. 710 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/ 711 712 /** 713 * <p>List of aberration correction modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode} that are 714 * supported by this camera device.</p> 715 * <p>This key lists the valid modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}. If no 716 * aberration correction modes are available for a device, this list will solely include 717 * OFF mode. All camera devices will support either OFF or FAST mode.</p> 718 * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always list 719 * OFF mode. This includes all FULL level devices.</p> 720 * <p>LEGACY devices will always only support FAST mode.</p> 721 * <p><b>Range of valid values:</b><br> 722 * Any value listed in {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}</p> 723 * <p>This key is available on all devices.</p> 724 * 725 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE 726 */ 727 @PublicKey 728 @NonNull 729 public static final Key<int[]> COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES = 730 new Key<int[]>("android.colorCorrection.availableAberrationModes", int[].class); 731 732 /** 733 * <p>List of auto-exposure antibanding modes for {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} that are 734 * supported by this camera device.</p> 735 * <p>Not all of the auto-exposure anti-banding modes may be 736 * supported by a given camera device. This field lists the 737 * valid anti-banding modes that the application may request 738 * for this camera device with the 739 * {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} control.</p> 740 * <p><b>Range of valid values:</b><br> 741 * Any value listed in {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode}</p> 742 * <p>This key is available on all devices.</p> 743 * 744 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE 745 */ 746 @PublicKey 747 @NonNull 748 public static final Key<int[]> CONTROL_AE_AVAILABLE_ANTIBANDING_MODES = 749 new Key<int[]>("android.control.aeAvailableAntibandingModes", int[].class); 750 751 /** 752 * <p>List of auto-exposure modes for {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} that are supported by this camera 753 * device.</p> 754 * <p>Not all the auto-exposure modes may be supported by a 755 * given camera device, especially if no flash unit is 756 * available. This entry lists the valid modes for 757 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} for this camera device.</p> 758 * <p>All camera devices support ON, and all camera devices with flash 759 * units support ON_AUTO_FLASH and ON_ALWAYS_FLASH.</p> 760 * <p>FULL mode camera devices always support OFF mode, 761 * which enables application control of camera exposure time, 762 * sensitivity, and frame duration.</p> 763 * <p>LEGACY mode camera devices never support OFF mode. 764 * LIMITED mode devices support OFF if they support the MANUAL_SENSOR 765 * capability.</p> 766 * <p><b>Range of valid values:</b><br> 767 * Any value listed in {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}</p> 768 * <p>This key is available on all devices.</p> 769 * 770 * @see CaptureRequest#CONTROL_AE_MODE 771 */ 772 @PublicKey 773 @NonNull 774 public static final Key<int[]> CONTROL_AE_AVAILABLE_MODES = 775 new Key<int[]>("android.control.aeAvailableModes", int[].class); 776 777 /** 778 * <p>List of frame rate ranges for {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} supported by 779 * this camera device.</p> 780 * <p>For devices at the LEGACY level or above:</p> 781 * <ul> 782 * <li> 783 * <p>For constant-framerate recording, for each normal 784 * {@link android.media.CamcorderProfile CamcorderProfile}, that is, a 785 * {@link android.media.CamcorderProfile CamcorderProfile} that has 786 * {@link android.media.CamcorderProfile#quality quality} in 787 * the range [{@link android.media.CamcorderProfile#QUALITY_LOW QUALITY_LOW}, 788 * {@link android.media.CamcorderProfile#QUALITY_2160P QUALITY_2160P}], if the profile is 789 * supported by the device and has 790 * {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} <code>x</code>, this list will 791 * always include (<code>x</code>,<code>x</code>).</p> 792 * </li> 793 * <li> 794 * <p>Also, a camera device must either not support any 795 * {@link android.media.CamcorderProfile CamcorderProfile}, 796 * or support at least one 797 * normal {@link android.media.CamcorderProfile CamcorderProfile} that has 798 * {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} <code>x</code> >= 24.</p> 799 * </li> 800 * </ul> 801 * <p>For devices at the LIMITED level or above:</p> 802 * <ul> 803 * <li>For devices that advertise NIR color filter arrangement in 804 * {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}, this list will always include 805 * (<code>max</code>, <code>max</code>) where <code>max</code> = the maximum output frame rate of the maximum YUV_420_888 806 * output size.</li> 807 * <li>For devices advertising any color filter arrangement other than NIR, or devices not 808 * advertising color filter arrangement, this list will always include (<code>min</code>, <code>max</code>) and 809 * (<code>max</code>, <code>max</code>) where <code>min</code> <= 15 and <code>max</code> = the maximum output frame rate of the 810 * maximum YUV_420_888 output size.</li> 811 * </ul> 812 * <p><b>Units</b>: Frames per second (FPS)</p> 813 * <p>This key is available on all devices.</p> 814 * 815 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE 816 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT 817 */ 818 @PublicKey 819 @NonNull 820 public static final Key<android.util.Range<Integer>[]> CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES = 821 new Key<android.util.Range<Integer>[]>("android.control.aeAvailableTargetFpsRanges", new TypeReference<android.util.Range<Integer>[]>() {{ }}); 822 823 /** 824 * <p>Maximum and minimum exposure compensation values for 825 * {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}, in counts of {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep}, 826 * that are supported by this camera device.</p> 827 * <p><b>Range of valid values:</b><br></p> 828 * <p>Range [0,0] indicates that exposure compensation is not supported.</p> 829 * <p>For LIMITED and FULL devices, range must follow below requirements if exposure 830 * compensation is supported (<code>range != [0, 0]</code>):</p> 831 * <p><code>Min.exposure compensation * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} <= -2 EV</code></p> 832 * <p><code>Max.exposure compensation * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} >= 2 EV</code></p> 833 * <p>LEGACY devices may support a smaller range than this.</p> 834 * <p>This key is available on all devices.</p> 835 * 836 * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP 837 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION 838 */ 839 @PublicKey 840 @NonNull 841 public static final Key<android.util.Range<Integer>> CONTROL_AE_COMPENSATION_RANGE = 842 new Key<android.util.Range<Integer>>("android.control.aeCompensationRange", new TypeReference<android.util.Range<Integer>>() {{ }}); 843 844 /** 845 * <p>Smallest step by which the exposure compensation 846 * can be changed.</p> 847 * <p>This is the unit for {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}. For example, if this key has 848 * 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 849 * that the target EV offset for the auto-exposure routine is -1 EV.</p> 850 * <p>One unit of EV compensation changes the brightness of the captured image by a factor 851 * of two. +1 EV doubles the image brightness, while -1 EV halves the image brightness.</p> 852 * <p><b>Units</b>: Exposure Value (EV)</p> 853 * <p>This key is available on all devices.</p> 854 * 855 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION 856 */ 857 @PublicKey 858 @NonNull 859 public static final Key<Rational> CONTROL_AE_COMPENSATION_STEP = 860 new Key<Rational>("android.control.aeCompensationStep", Rational.class); 861 862 /** 863 * <p>List of auto-focus (AF) modes for {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} that are 864 * supported by this camera device.</p> 865 * <p>Not all the auto-focus modes may be supported by a 866 * given camera device. This entry lists the valid modes for 867 * {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} for this camera device.</p> 868 * <p>All LIMITED and FULL mode camera devices will support OFF mode, and all 869 * camera devices with adjustable focuser units 870 * (<code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} > 0</code>) will support AUTO mode.</p> 871 * <p>LEGACY devices will support OFF mode only if they support 872 * focusing to infinity (by also setting {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} to 873 * <code>0.0f</code>).</p> 874 * <p><b>Range of valid values:</b><br> 875 * Any value listed in {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}</p> 876 * <p>This key is available on all devices.</p> 877 * 878 * @see CaptureRequest#CONTROL_AF_MODE 879 * @see CaptureRequest#LENS_FOCUS_DISTANCE 880 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 881 */ 882 @PublicKey 883 @NonNull 884 public static final Key<int[]> CONTROL_AF_AVAILABLE_MODES = 885 new Key<int[]>("android.control.afAvailableModes", int[].class); 886 887 /** 888 * <p>List of color effects for {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode} that are supported by this camera 889 * device.</p> 890 * <p>This list contains the color effect modes that can be applied to 891 * images produced by the camera device. 892 * Implementations are not expected to be consistent across all devices. 893 * If no color effect modes are available for a device, this will only list 894 * OFF.</p> 895 * <p>A color effect will only be applied if 896 * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF. OFF is always included in this list.</p> 897 * <p>This control has no effect on the operation of other control routines such 898 * as auto-exposure, white balance, or focus.</p> 899 * <p><b>Range of valid values:</b><br> 900 * Any value listed in {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</p> 901 * <p>This key is available on all devices.</p> 902 * 903 * @see CaptureRequest#CONTROL_EFFECT_MODE 904 * @see CaptureRequest#CONTROL_MODE 905 */ 906 @PublicKey 907 @NonNull 908 public static final Key<int[]> CONTROL_AVAILABLE_EFFECTS = 909 new Key<int[]>("android.control.availableEffects", int[].class); 910 911 /** 912 * <p>List of scene modes for {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} that are supported by this camera 913 * device.</p> 914 * <p>This list contains scene modes that can be set for the camera device. 915 * Only scene modes that have been fully implemented for the 916 * camera device may be included here. Implementations are not expected 917 * to be consistent across all devices.</p> 918 * <p>If no scene modes are supported by the camera device, this 919 * will be set to DISABLED. Otherwise DISABLED will not be listed.</p> 920 * <p>FACE_PRIORITY is always listed if face detection is 921 * supported (i.e.<code>{@link CameraCharacteristics#STATISTICS_INFO_MAX_FACE_COUNT android.statistics.info.maxFaceCount} > 922 * 0</code>).</p> 923 * <p><b>Range of valid values:</b><br> 924 * Any value listed in {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode}</p> 925 * <p>This key is available on all devices.</p> 926 * 927 * @see CaptureRequest#CONTROL_SCENE_MODE 928 * @see CameraCharacteristics#STATISTICS_INFO_MAX_FACE_COUNT 929 */ 930 @PublicKey 931 @NonNull 932 public static final Key<int[]> CONTROL_AVAILABLE_SCENE_MODES = 933 new Key<int[]>("android.control.availableSceneModes", int[].class); 934 935 /** 936 * <p>List of video stabilization modes for {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode} 937 * that are supported by this camera device.</p> 938 * <p>OFF will always be listed.</p> 939 * <p><b>Range of valid values:</b><br> 940 * Any value listed in {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}</p> 941 * <p>This key is available on all devices.</p> 942 * 943 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE 944 */ 945 @PublicKey 946 @NonNull 947 public static final Key<int[]> CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES = 948 new Key<int[]>("android.control.availableVideoStabilizationModes", int[].class); 949 950 /** 951 * <p>List of auto-white-balance modes for {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} that are supported by this 952 * camera device.</p> 953 * <p>Not all the auto-white-balance modes may be supported by a 954 * given camera device. This entry lists the valid modes for 955 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} for this camera device.</p> 956 * <p>All camera devices will support ON mode.</p> 957 * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always support OFF 958 * mode, which enables application control of white balance, by using 959 * {@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 960 * mode camera devices.</p> 961 * <p><b>Range of valid values:</b><br> 962 * Any value listed in {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}</p> 963 * <p>This key is available on all devices.</p> 964 * 965 * @see CaptureRequest#COLOR_CORRECTION_GAINS 966 * @see CaptureRequest#COLOR_CORRECTION_MODE 967 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 968 * @see CaptureRequest#CONTROL_AWB_MODE 969 */ 970 @PublicKey 971 @NonNull 972 public static final Key<int[]> CONTROL_AWB_AVAILABLE_MODES = 973 new Key<int[]>("android.control.awbAvailableModes", int[].class); 974 975 /** 976 * <p>List of the maximum number of regions that can be used for metering in 977 * auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF); 978 * this corresponds to the maximum number of elements in 979 * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}, {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}, 980 * and {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p> 981 * <p><b>Range of valid values:</b><br></p> 982 * <p>Value must be >= 0 for each element. For full-capability devices 983 * this value must be >= 1 for AE and AF. The order of the elements is: 984 * <code>(AE, AWB, AF)</code>.</p> 985 * <p>This key is available on all devices.</p> 986 * 987 * @see CaptureRequest#CONTROL_AE_REGIONS 988 * @see CaptureRequest#CONTROL_AF_REGIONS 989 * @see CaptureRequest#CONTROL_AWB_REGIONS 990 * @hide 991 */ 992 public static final Key<int[]> CONTROL_MAX_REGIONS = 993 new Key<int[]>("android.control.maxRegions", int[].class); 994 995 /** 996 * <p>The maximum number of metering regions that can be used by the auto-exposure (AE) 997 * routine.</p> 998 * <p>This corresponds to the maximum allowed number of elements in 999 * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}.</p> 1000 * <p><b>Range of valid values:</b><br> 1001 * Value will be >= 0. For FULL-capability devices, this 1002 * value will be >= 1.</p> 1003 * <p>This key is available on all devices.</p> 1004 * 1005 * @see CaptureRequest#CONTROL_AE_REGIONS 1006 */ 1007 @PublicKey 1008 @NonNull 1009 @SyntheticKey 1010 public static final Key<Integer> CONTROL_MAX_REGIONS_AE = 1011 new Key<Integer>("android.control.maxRegionsAe", int.class); 1012 1013 /** 1014 * <p>The maximum number of metering regions that can be used by the auto-white balance (AWB) 1015 * routine.</p> 1016 * <p>This corresponds to the maximum allowed number of elements in 1017 * {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}.</p> 1018 * <p><b>Range of valid values:</b><br> 1019 * Value will be >= 0.</p> 1020 * <p>This key is available on all devices.</p> 1021 * 1022 * @see CaptureRequest#CONTROL_AWB_REGIONS 1023 */ 1024 @PublicKey 1025 @NonNull 1026 @SyntheticKey 1027 public static final Key<Integer> CONTROL_MAX_REGIONS_AWB = 1028 new Key<Integer>("android.control.maxRegionsAwb", int.class); 1029 1030 /** 1031 * <p>The maximum number of metering regions that can be used by the auto-focus (AF) routine.</p> 1032 * <p>This corresponds to the maximum allowed number of elements in 1033 * {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p> 1034 * <p><b>Range of valid values:</b><br> 1035 * Value will be >= 0. For FULL-capability devices, this 1036 * value will be >= 1.</p> 1037 * <p>This key is available on all devices.</p> 1038 * 1039 * @see CaptureRequest#CONTROL_AF_REGIONS 1040 */ 1041 @PublicKey 1042 @NonNull 1043 @SyntheticKey 1044 public static final Key<Integer> CONTROL_MAX_REGIONS_AF = 1045 new Key<Integer>("android.control.maxRegionsAf", int.class); 1046 1047 /** 1048 * <p>List of available high speed video size, fps range and max batch size configurations 1049 * supported by the camera device, in the format of (width, height, fps_min, fps_max, batch_size_max).</p> 1050 * <p>When CONSTRAINED_HIGH_SPEED_VIDEO is supported in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}, 1051 * this metadata will list the supported high speed video size, fps range and max batch size 1052 * configurations. All the sizes listed in this configuration will be a subset of the sizes 1053 * reported by {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } 1054 * for processed non-stalling formats.</p> 1055 * <p>For the high speed video use case, the application must 1056 * select the video size and fps range from this metadata to configure the recording and 1057 * preview streams and setup the recording requests. For example, if the application intends 1058 * to do high speed recording, it can select the maximum size reported by this metadata to 1059 * configure output streams. Once the size is selected, application can filter this metadata 1060 * by selected size and get the supported fps ranges, and use these fps ranges to setup the 1061 * recording requests. Note that for the use case of multiple output streams, application 1062 * must select one unique size from this metadata to use (e.g., preview and recording streams 1063 * must have the same size). Otherwise, the high speed capture session creation will fail.</p> 1064 * <p>The min and max fps will be multiple times of 30fps.</p> 1065 * <p>High speed video streaming extends significant performance pressure to camera hardware, 1066 * to achieve efficient high speed streaming, the camera device may have to aggregate 1067 * multiple frames together and send to camera device for processing where the request 1068 * controls are same for all the frames in this batch. Max batch size indicates 1069 * the max possible number of frames the camera device will group together for this high 1070 * speed stream configuration. This max batch size will be used to generate a high speed 1071 * recording request list by 1072 * {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList }. 1073 * The max batch size for each configuration will satisfy below conditions:</p> 1074 * <ul> 1075 * <li>Each max batch size will be a divisor of its corresponding fps_max / 30. For example, 1076 * if max_fps is 300, max batch size will only be 1, 2, 5, or 10.</li> 1077 * <li>The camera device may choose smaller internal batch size for each configuration, but 1078 * the actual batch size will be a divisor of max batch size. For example, if the max batch 1079 * size is 8, the actual batch size used by camera device will only be 1, 2, 4, or 8.</li> 1080 * <li>The max batch size in each configuration entry must be no larger than 32.</li> 1081 * </ul> 1082 * <p>The camera device doesn't have to support batch mode to achieve high speed video recording, 1083 * in such case, batch_size_max will be reported as 1 in each configuration entry.</p> 1084 * <p>This fps ranges in this configuration list can only be used to create requests 1085 * that are submitted to a high speed camera capture session created by 1086 * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }. 1087 * The fps ranges reported in this metadata must not be used to setup capture requests for 1088 * normal capture session, or it will cause request error.</p> 1089 * <p><b>Range of valid values:</b><br></p> 1090 * <p>For each configuration, the fps_max >= 120fps.</p> 1091 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1092 * <p><b>Limited capability</b> - 1093 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 1094 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1095 * 1096 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1097 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1098 * @hide 1099 */ 1100 public static final Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]> CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS = 1101 new Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]>("android.control.availableHighSpeedVideoConfigurations", android.hardware.camera2.params.HighSpeedVideoConfiguration[].class); 1102 1103 /** 1104 * <p>Whether the camera device supports {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</p> 1105 * <p>Devices with MANUAL_SENSOR capability or BURST_CAPTURE capability will always 1106 * list <code>true</code>. This includes FULL devices.</p> 1107 * <p>This key is available on all devices.</p> 1108 * 1109 * @see CaptureRequest#CONTROL_AE_LOCK 1110 */ 1111 @PublicKey 1112 @NonNull 1113 public static final Key<Boolean> CONTROL_AE_LOCK_AVAILABLE = 1114 new Key<Boolean>("android.control.aeLockAvailable", boolean.class); 1115 1116 /** 1117 * <p>Whether the camera device supports {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</p> 1118 * <p>Devices with MANUAL_POST_PROCESSING capability or BURST_CAPTURE capability will 1119 * always list <code>true</code>. This includes FULL devices.</p> 1120 * <p>This key is available on all devices.</p> 1121 * 1122 * @see CaptureRequest#CONTROL_AWB_LOCK 1123 */ 1124 @PublicKey 1125 @NonNull 1126 public static final Key<Boolean> CONTROL_AWB_LOCK_AVAILABLE = 1127 new Key<Boolean>("android.control.awbLockAvailable", boolean.class); 1128 1129 /** 1130 * <p>List of control modes for {@link CaptureRequest#CONTROL_MODE android.control.mode} that are supported by this camera 1131 * device.</p> 1132 * <p>This list contains control modes that can be set for the camera device. 1133 * LEGACY mode devices will always support AUTO mode. LIMITED and FULL 1134 * devices will always support OFF, AUTO modes.</p> 1135 * <p><b>Range of valid values:</b><br> 1136 * Any value listed in {@link CaptureRequest#CONTROL_MODE android.control.mode}</p> 1137 * <p>This key is available on all devices.</p> 1138 * 1139 * @see CaptureRequest#CONTROL_MODE 1140 */ 1141 @PublicKey 1142 @NonNull 1143 public static final Key<int[]> CONTROL_AVAILABLE_MODES = 1144 new Key<int[]>("android.control.availableModes", int[].class); 1145 1146 /** 1147 * <p>Range of boosts for {@link CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST android.control.postRawSensitivityBoost} supported 1148 * by this camera device.</p> 1149 * <p>Devices support post RAW sensitivity boost will advertise 1150 * {@link CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST android.control.postRawSensitivityBoost} key for controlling 1151 * post RAW sensitivity boost.</p> 1152 * <p>This key will be <code>null</code> for devices that do not support any RAW format 1153 * outputs. For devices that do support RAW format outputs, this key will always 1154 * present, and if a device does not support post RAW sensitivity boost, it will 1155 * list <code>(100, 100)</code> in this key.</p> 1156 * <p><b>Units</b>: ISO arithmetic units, the same as {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</p> 1157 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1158 * 1159 * @see CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST 1160 * @see CaptureRequest#SENSOR_SENSITIVITY 1161 */ 1162 @PublicKey 1163 @NonNull 1164 public static final Key<android.util.Range<Integer>> CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE = 1165 new Key<android.util.Range<Integer>>("android.control.postRawSensitivityBoostRange", new TypeReference<android.util.Range<Integer>>() {{ }}); 1166 1167 /** 1168 * <p>The list of extended scene modes for {@link CaptureRequest#CONTROL_EXTENDED_SCENE_MODE android.control.extendedSceneMode} that are supported 1169 * by this camera device, and each extended scene mode's maximum streaming (non-stall) size 1170 * with effect.</p> 1171 * <p>For DISABLED mode, the camera behaves normally with no extended scene mode enabled.</p> 1172 * <p>For BOKEH_STILL_CAPTURE mode, the maximum streaming dimension specifies the limit 1173 * under which bokeh is effective when capture intent is PREVIEW. Note that when capture 1174 * intent is PREVIEW, the bokeh effect may not be as high in quality compared to 1175 * STILL_CAPTURE intent in order to maintain reasonable frame rate. The maximum streaming 1176 * dimension must be one of the YUV_420_888 or PRIVATE resolutions in 1177 * availableStreamConfigurations, or (0, 0) if preview bokeh is not supported. If the 1178 * application configures a stream larger than the maximum streaming dimension, bokeh 1179 * effect may not be applied for this stream for PREVIEW intent.</p> 1180 * <p>For BOKEH_CONTINUOUS mode, the maximum streaming dimension specifies the limit under 1181 * which bokeh is effective. This dimension must be one of the YUV_420_888 or PRIVATE 1182 * resolutions in availableStreamConfigurations, and if the sensor maximum resolution is 1183 * larger than or equal to 1080p, the maximum streaming dimension must be at least 1080p. 1184 * If the application configures a stream with larger dimension, the stream may not have 1185 * bokeh effect applied.</p> 1186 * <p><b>Units</b>: (mode, width, height)</p> 1187 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1188 * <p><b>Limited capability</b> - 1189 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 1190 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1191 * 1192 * @see CaptureRequest#CONTROL_EXTENDED_SCENE_MODE 1193 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1194 * @hide 1195 */ 1196 public static final Key<int[]> CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_MAX_SIZES = 1197 new Key<int[]>("android.control.availableExtendedSceneModeMaxSizes", int[].class); 1198 1199 /** 1200 * <p>The ranges of supported zoom ratio for non-DISABLED {@link CaptureRequest#CONTROL_EXTENDED_SCENE_MODE android.control.extendedSceneMode}.</p> 1201 * <p>When extended scene mode is set, the camera device may have limited range of zoom ratios 1202 * compared to when extended scene mode is DISABLED. This tag lists the zoom ratio ranges 1203 * for all supported non-DISABLED extended scene modes, in the same order as in 1204 * android.control.availableExtended.</p> 1205 * <p>Range [1.0, 1.0] means that no zoom (optical or digital) is supported.</p> 1206 * <p><b>Units</b>: (minZoom, maxZoom)</p> 1207 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1208 * <p><b>Limited capability</b> - 1209 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 1210 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1211 * 1212 * @see CaptureRequest#CONTROL_EXTENDED_SCENE_MODE 1213 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1214 * @hide 1215 */ 1216 public static final Key<float[]> CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_ZOOM_RATIO_RANGES = 1217 new Key<float[]>("android.control.availableExtendedSceneModeZoomRatioRanges", float[].class); 1218 1219 /** 1220 * <p>The list of extended scene modes for {@link CaptureRequest#CONTROL_EXTENDED_SCENE_MODE android.control.extendedSceneMode} that 1221 * are supported by this camera device, and each extended scene mode's capabilities such 1222 * as maximum streaming size, and supported zoom ratio ranges.</p> 1223 * <p>For DISABLED mode, the camera behaves normally with no extended scene mode enabled.</p> 1224 * <p>For BOKEH_STILL_CAPTURE mode, the maximum streaming dimension specifies the limit 1225 * under which bokeh is effective when capture intent is PREVIEW. Note that when capture 1226 * intent is PREVIEW, the bokeh effect may not be as high quality compared to STILL_CAPTURE 1227 * intent in order to maintain reasonable frame rate. The maximum streaming dimension must 1228 * be one of the YUV_420_888 or PRIVATE resolutions in availableStreamConfigurations, or 1229 * (0, 0) if preview bokeh is not supported. If the application configures a stream 1230 * larger than the maximum streaming dimension, bokeh effect may not be applied for this 1231 * stream for PREVIEW intent.</p> 1232 * <p>For BOKEH_CONTINUOUS mode, the maximum streaming dimension specifies the limit under 1233 * which bokeh is effective. This dimension must be one of the YUV_420_888 or PRIVATE 1234 * resolutions in availableStreamConfigurations, and if the sensor maximum resolution is 1235 * larger than or equal to 1080p, the maximum streaming dimension must be at least 1080p. 1236 * If the application configures a stream with larger dimension, the stream may not have 1237 * bokeh effect applied.</p> 1238 * <p>When extended scene mode is set, the camera device may have limited range of zoom ratios 1239 * compared to when the mode is DISABLED. availableExtendedSceneModeCapabilities lists the 1240 * zoom ranges for all supported extended modes. A range of (1.0, 1.0) means that no zoom 1241 * (optical or digital) is supported.</p> 1242 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1243 * 1244 * @see CaptureRequest#CONTROL_EXTENDED_SCENE_MODE 1245 */ 1246 @PublicKey 1247 @NonNull 1248 @SyntheticKey 1249 public static final Key<android.hardware.camera2.params.Capability[]> CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_CAPABILITIES = 1250 new Key<android.hardware.camera2.params.Capability[]>("android.control.availableExtendedSceneModeCapabilities", android.hardware.camera2.params.Capability[].class); 1251 1252 /** 1253 * <p>Minimum and maximum zoom ratios supported by this camera device.</p> 1254 * <p>If the camera device supports zoom-out from 1x zoom, minZoom will be less than 1.0, and 1255 * setting {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} to values less than 1.0 increases the camera's field 1256 * of view.</p> 1257 * <p><b>Units</b>: A pair of zoom ratio in floating-points: (minZoom, maxZoom)</p> 1258 * <p><b>Range of valid values:</b><br></p> 1259 * <p>maxZoom >= 1.0 >= minZoom</p> 1260 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1261 * <p><b>Limited capability</b> - 1262 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 1263 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1264 * 1265 * @see CaptureRequest#CONTROL_ZOOM_RATIO 1266 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1267 */ 1268 @PublicKey 1269 @NonNull 1270 public static final Key<android.util.Range<Float>> CONTROL_ZOOM_RATIO_RANGE = 1271 new Key<android.util.Range<Float>>("android.control.zoomRatioRange", new TypeReference<android.util.Range<Float>>() {{ }}); 1272 1273 /** 1274 * <p>List of available high speed video size, fps range and max batch size configurations 1275 * supported by the camera device, in the format of 1276 * (width, height, fps_min, fps_max, batch_size_max), 1277 * when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 1278 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 1279 * <p>Analogous to android.control.availableHighSpeedVideoConfigurations, for configurations 1280 * which are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 1281 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 1282 * <p><b>Range of valid values:</b><br></p> 1283 * <p>For each configuration, the fps_max >= 120fps.</p> 1284 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1285 * 1286 * @see CaptureRequest#SENSOR_PIXEL_MODE 1287 * @hide 1288 */ 1289 public static final Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]> CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS_MAXIMUM_RESOLUTION = 1290 new Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]>("android.control.availableHighSpeedVideoConfigurationsMaximumResolution", android.hardware.camera2.params.HighSpeedVideoConfiguration[].class); 1291 1292 /** 1293 * <p>List of available settings overrides supported by the camera device that can 1294 * be used to speed up certain controls.</p> 1295 * <p>When not all controls within a CaptureRequest are required to take effect 1296 * at the same time on the outputs, the camera device may apply certain request keys sooner 1297 * to improve latency. This list contains such supported settings overrides. Each settings 1298 * override corresponds to a set of CaptureRequest keys that can be sped up when applying.</p> 1299 * <p>A supported settings override can be passed in via 1300 * {@link android.hardware.camera2.CaptureRequest#CONTROL_SETTINGS_OVERRIDE }, and the 1301 * CaptureRequest keys corresponding to the override are applied as soon as possible, not 1302 * bound by per-frame synchronization. See {@link CaptureRequest#CONTROL_SETTINGS_OVERRIDE android.control.settingsOverride} for the 1303 * CaptureRequest keys for each override.</p> 1304 * <p>OFF is always included in this list.</p> 1305 * <p><b>Range of valid values:</b><br> 1306 * Any value listed in {@link CaptureRequest#CONTROL_SETTINGS_OVERRIDE android.control.settingsOverride}</p> 1307 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1308 * 1309 * @see CaptureRequest#CONTROL_SETTINGS_OVERRIDE 1310 */ 1311 @PublicKey 1312 @NonNull 1313 public static final Key<int[]> CONTROL_AVAILABLE_SETTINGS_OVERRIDES = 1314 new Key<int[]>("android.control.availableSettingsOverrides", int[].class); 1315 1316 /** 1317 * <p>Whether the camera device supports {@link CaptureRequest#CONTROL_AUTOFRAMING android.control.autoframing}.</p> 1318 * <p>Will be <code>false</code> if auto-framing is not available.</p> 1319 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1320 * <p><b>Limited capability</b> - 1321 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 1322 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1323 * 1324 * @see CaptureRequest#CONTROL_AUTOFRAMING 1325 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1326 */ 1327 @PublicKey 1328 @NonNull 1329 public static final Key<Boolean> CONTROL_AUTOFRAMING_AVAILABLE = 1330 new Key<Boolean>("android.control.autoframingAvailable", boolean.class); 1331 1332 /** 1333 * <p>List of edge enhancement modes for {@link CaptureRequest#EDGE_MODE android.edge.mode} that are supported by this camera 1334 * device.</p> 1335 * <p>Full-capability camera devices must always support OFF; camera devices that support 1336 * YUV_REPROCESSING or PRIVATE_REPROCESSING will list ZERO_SHUTTER_LAG; all devices will 1337 * list FAST.</p> 1338 * <p><b>Range of valid values:</b><br> 1339 * Any value listed in {@link CaptureRequest#EDGE_MODE android.edge.mode}</p> 1340 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1341 * <p><b>Full capability</b> - 1342 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 1343 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1344 * 1345 * @see CaptureRequest#EDGE_MODE 1346 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1347 */ 1348 @PublicKey 1349 @NonNull 1350 public static final Key<int[]> EDGE_AVAILABLE_EDGE_MODES = 1351 new Key<int[]>("android.edge.availableEdgeModes", int[].class); 1352 1353 /** 1354 * <p>Whether this camera device has a 1355 * flash unit.</p> 1356 * <p>Will be <code>false</code> if no flash is available.</p> 1357 * <p>If there is no flash unit, none of the flash controls do 1358 * anything. 1359 * This key is available on all devices.</p> 1360 */ 1361 @PublicKey 1362 @NonNull 1363 public static final Key<Boolean> FLASH_INFO_AVAILABLE = 1364 new Key<Boolean>("android.flash.info.available", boolean.class); 1365 1366 /** 1367 * <p>Maximum flashlight brightness level.</p> 1368 * <p>If this value is greater than 1, then the device supports controlling the 1369 * flashlight brightness level via 1370 * {@link android.hardware.camera2.CameraManager#turnOnTorchWithStrengthLevel }. 1371 * If this value is equal to 1, flashlight brightness control is not supported. 1372 * The value for this key will be null for devices with no flash unit.</p> 1373 * <p>The maximum value is guaranteed to be safe to use for an indefinite duration in 1374 * terms of device flashlight lifespan, but may be too bright for comfort for many 1375 * use cases. Use the default torch brightness value to avoid problems with an 1376 * over-bright flashlight.</p> 1377 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1378 */ 1379 @PublicKey 1380 @NonNull 1381 public static final Key<Integer> FLASH_INFO_STRENGTH_MAXIMUM_LEVEL = 1382 new Key<Integer>("android.flash.info.strengthMaximumLevel", int.class); 1383 1384 /** 1385 * <p>Default flashlight brightness level to be set via 1386 * {@link android.hardware.camera2.CameraManager#turnOnTorchWithStrengthLevel }.</p> 1387 * <p>If flash unit is available this will be greater than or equal to 1 and less 1388 * or equal to <code>{@link CameraCharacteristics#FLASH_INFO_STRENGTH_MAXIMUM_LEVEL android.flash.info.strengthMaximumLevel}</code>.</p> 1389 * <p>Setting flashlight brightness above the default level 1390 * (i.e.<code>{@link CameraCharacteristics#FLASH_INFO_STRENGTH_DEFAULT_LEVEL android.flash.info.strengthDefaultLevel}</code>) may make the device more 1391 * likely to reach thermal throttling conditions and slow down, or drain the 1392 * battery quicker than normal. To minimize such issues, it is recommended to 1393 * start the flashlight at this default brightness until a user explicitly requests 1394 * a brighter level. 1395 * Note that the value for this key will be null for devices with no flash unit. 1396 * The default level should always be > 0.</p> 1397 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1398 * 1399 * @see CameraCharacteristics#FLASH_INFO_STRENGTH_DEFAULT_LEVEL 1400 * @see CameraCharacteristics#FLASH_INFO_STRENGTH_MAXIMUM_LEVEL 1401 */ 1402 @PublicKey 1403 @NonNull 1404 public static final Key<Integer> FLASH_INFO_STRENGTH_DEFAULT_LEVEL = 1405 new Key<Integer>("android.flash.info.strengthDefaultLevel", int.class); 1406 1407 /** 1408 * <p>List of hot pixel correction modes for {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode} that are supported by this 1409 * camera device.</p> 1410 * <p>FULL mode camera devices will always support FAST.</p> 1411 * <p><b>Range of valid values:</b><br> 1412 * Any value listed in {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode}</p> 1413 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1414 * 1415 * @see CaptureRequest#HOT_PIXEL_MODE 1416 */ 1417 @PublicKey 1418 @NonNull 1419 public static final Key<int[]> HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES = 1420 new Key<int[]>("android.hotPixel.availableHotPixelModes", int[].class); 1421 1422 /** 1423 * <p>List of JPEG thumbnail sizes for {@link CaptureRequest#JPEG_THUMBNAIL_SIZE android.jpeg.thumbnailSize} supported by this 1424 * camera device.</p> 1425 * <p>This list will include at least one non-zero resolution, plus <code>(0,0)</code> for indicating no 1426 * thumbnail should be generated.</p> 1427 * <p>Below conditions will be satisfied for this size list:</p> 1428 * <ul> 1429 * <li>The sizes will be sorted by increasing pixel area (width x height). 1430 * If several resolutions have the same area, they will be sorted by increasing width.</li> 1431 * <li>The aspect ratio of the largest thumbnail size will be same as the 1432 * aspect ratio of largest JPEG output size in android.scaler.availableStreamConfigurations. 1433 * The largest size is defined as the size that has the largest pixel area 1434 * in a given size list.</li> 1435 * <li>Each output JPEG size in android.scaler.availableStreamConfigurations will have at least 1436 * one corresponding size that has the same aspect ratio in availableThumbnailSizes, 1437 * and vice versa.</li> 1438 * <li>All non-<code>(0, 0)</code> sizes will have non-zero widths and heights.</li> 1439 * </ul> 1440 * <p>This list is also used as supported thumbnail sizes for HEIC image format capture.</p> 1441 * <p>This key is available on all devices.</p> 1442 * 1443 * @see CaptureRequest#JPEG_THUMBNAIL_SIZE 1444 */ 1445 @PublicKey 1446 @NonNull 1447 public static final Key<android.util.Size[]> JPEG_AVAILABLE_THUMBNAIL_SIZES = 1448 new Key<android.util.Size[]>("android.jpeg.availableThumbnailSizes", android.util.Size[].class); 1449 1450 /** 1451 * <p>List of aperture size values for {@link CaptureRequest#LENS_APERTURE android.lens.aperture} that are 1452 * supported by this camera device.</p> 1453 * <p>If the camera device doesn't support a variable lens aperture, 1454 * this list will contain only one value, which is the fixed aperture size.</p> 1455 * <p>If the camera device supports a variable aperture, the aperture values 1456 * in this list will be sorted in ascending order.</p> 1457 * <p><b>Units</b>: The aperture f-number</p> 1458 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1459 * <p><b>Full capability</b> - 1460 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 1461 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1462 * 1463 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1464 * @see CaptureRequest#LENS_APERTURE 1465 */ 1466 @PublicKey 1467 @NonNull 1468 public static final Key<float[]> LENS_INFO_AVAILABLE_APERTURES = 1469 new Key<float[]>("android.lens.info.availableApertures", float[].class); 1470 1471 /** 1472 * <p>List of neutral density filter values for 1473 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} that are supported by this camera device.</p> 1474 * <p>If a neutral density filter is not supported by this camera device, 1475 * this list will contain only 0. Otherwise, this list will include every 1476 * filter density supported by the camera device, in ascending order.</p> 1477 * <p><b>Units</b>: Exposure value (EV)</p> 1478 * <p><b>Range of valid values:</b><br></p> 1479 * <p>Values are >= 0</p> 1480 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1481 * <p><b>Full capability</b> - 1482 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 1483 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1484 * 1485 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1486 * @see CaptureRequest#LENS_FILTER_DENSITY 1487 */ 1488 @PublicKey 1489 @NonNull 1490 public static final Key<float[]> LENS_INFO_AVAILABLE_FILTER_DENSITIES = 1491 new Key<float[]>("android.lens.info.availableFilterDensities", float[].class); 1492 1493 /** 1494 * <p>List of focal lengths for {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength} that are supported by this camera 1495 * device.</p> 1496 * <p>If optical zoom is not supported, this list will only contain 1497 * a single value corresponding to the fixed focal length of the 1498 * device. Otherwise, this list will include every focal length supported 1499 * by the camera device, in ascending order.</p> 1500 * <p><b>Units</b>: Millimeters</p> 1501 * <p><b>Range of valid values:</b><br></p> 1502 * <p>Values are > 0</p> 1503 * <p>This key is available on all devices.</p> 1504 * 1505 * @see CaptureRequest#LENS_FOCAL_LENGTH 1506 */ 1507 @PublicKey 1508 @NonNull 1509 public static final Key<float[]> LENS_INFO_AVAILABLE_FOCAL_LENGTHS = 1510 new Key<float[]>("android.lens.info.availableFocalLengths", float[].class); 1511 1512 /** 1513 * <p>List of optical image stabilization (OIS) modes for 1514 * {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} that are supported by this camera device.</p> 1515 * <p>If OIS is not supported by a given camera device, this list will 1516 * contain only OFF.</p> 1517 * <p><b>Range of valid values:</b><br> 1518 * Any value listed in {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}</p> 1519 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1520 * <p><b>Limited capability</b> - 1521 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 1522 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1523 * 1524 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1525 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 1526 */ 1527 @PublicKey 1528 @NonNull 1529 public static final Key<int[]> LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION = 1530 new Key<int[]>("android.lens.info.availableOpticalStabilization", int[].class); 1531 1532 /** 1533 * <p>Hyperfocal distance for this lens.</p> 1534 * <p>If the lens is not fixed focus, the camera device will report this 1535 * field when {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} is APPROXIMATE or CALIBRATED.</p> 1536 * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p> 1537 * <p><b>Range of valid values:</b><br> 1538 * If lens is fixed focus, >= 0. If lens has focuser unit, the value is 1539 * within <code>(0.0f, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code></p> 1540 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1541 * <p><b>Limited capability</b> - 1542 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 1543 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1544 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p> 1545 * 1546 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1547 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION 1548 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 1549 */ 1550 @PublicKey 1551 @NonNull 1552 public static final Key<Float> LENS_INFO_HYPERFOCAL_DISTANCE = 1553 new Key<Float>("android.lens.info.hyperfocalDistance", float.class); 1554 1555 /** 1556 * <p>Shortest distance from frontmost surface 1557 * of the lens that can be brought into sharp focus.</p> 1558 * <p>If the lens is fixed-focus, this will be 1559 * 0.</p> 1560 * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p> 1561 * <p><b>Range of valid values:</b><br> 1562 * >= 0</p> 1563 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1564 * <p><b>Limited capability</b> - 1565 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 1566 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1567 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p> 1568 * 1569 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1570 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION 1571 */ 1572 @PublicKey 1573 @NonNull 1574 public static final Key<Float> LENS_INFO_MINIMUM_FOCUS_DISTANCE = 1575 new Key<Float>("android.lens.info.minimumFocusDistance", float.class); 1576 1577 /** 1578 * <p>Dimensions of lens shading map.</p> 1579 * <p>The map should be on the order of 30-40 rows and columns, and 1580 * must be smaller than 64x64.</p> 1581 * <p><b>Range of valid values:</b><br> 1582 * Both values >= 1</p> 1583 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1584 * <p><b>Full capability</b> - 1585 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 1586 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1587 * 1588 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1589 * @hide 1590 */ 1591 public static final Key<android.util.Size> LENS_INFO_SHADING_MAP_SIZE = 1592 new Key<android.util.Size>("android.lens.info.shadingMapSize", android.util.Size.class); 1593 1594 /** 1595 * <p>The lens focus distance calibration quality.</p> 1596 * <p>The lens focus distance calibration quality determines the reliability of 1597 * focus related metadata entries, i.e. {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}, 1598 * {@link CaptureResult#LENS_FOCUS_RANGE android.lens.focusRange}, {@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}, and 1599 * {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}.</p> 1600 * <p>APPROXIMATE and CALIBRATED devices report the focus metadata in 1601 * units of diopters (1/meter), so <code>0.0f</code> represents focusing at infinity, 1602 * and increasing positive numbers represent focusing closer and closer 1603 * to the camera device. The focus distance control also uses diopters 1604 * on these devices.</p> 1605 * <p>UNCALIBRATED devices do not use units that are directly comparable 1606 * to any real physical measurement, but <code>0.0f</code> still represents farthest 1607 * focus, and {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} represents the 1608 * nearest focus the device can achieve.</p> 1609 * <p><b>Possible values:</b></p> 1610 * <ul> 1611 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED UNCALIBRATED}</li> 1612 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE APPROXIMATE}</li> 1613 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED CALIBRATED}</li> 1614 * </ul> 1615 * 1616 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1617 * <p><b>Limited capability</b> - 1618 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 1619 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1620 * 1621 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1622 * @see CaptureRequest#LENS_FOCUS_DISTANCE 1623 * @see CaptureResult#LENS_FOCUS_RANGE 1624 * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE 1625 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 1626 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED 1627 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE 1628 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED 1629 */ 1630 @PublicKey 1631 @NonNull 1632 public static final Key<Integer> LENS_INFO_FOCUS_DISTANCE_CALIBRATION = 1633 new Key<Integer>("android.lens.info.focusDistanceCalibration", int.class); 1634 1635 /** 1636 * <p>Direction the camera faces relative to 1637 * device screen.</p> 1638 * <p><b>Possible values:</b></p> 1639 * <ul> 1640 * <li>{@link #LENS_FACING_FRONT FRONT}</li> 1641 * <li>{@link #LENS_FACING_BACK BACK}</li> 1642 * <li>{@link #LENS_FACING_EXTERNAL EXTERNAL}</li> 1643 * </ul> 1644 * 1645 * <p>This key is available on all devices.</p> 1646 * @see #LENS_FACING_FRONT 1647 * @see #LENS_FACING_BACK 1648 * @see #LENS_FACING_EXTERNAL 1649 */ 1650 @PublicKey 1651 @NonNull 1652 public static final Key<Integer> LENS_FACING = 1653 new Key<Integer>("android.lens.facing", int.class); 1654 1655 /** 1656 * <p>The orientation of the camera relative to the sensor 1657 * coordinate system.</p> 1658 * <p>The four coefficients that describe the quaternion 1659 * rotation from the Android sensor coordinate system to a 1660 * camera-aligned coordinate system where the X-axis is 1661 * aligned with the long side of the image sensor, the Y-axis 1662 * is aligned with the short side of the image sensor, and 1663 * the Z-axis is aligned with the optical axis of the sensor.</p> 1664 * <p>To convert from the quaternion coefficients <code>(x,y,z,w)</code> 1665 * to the axis of rotation <code>(a_x, a_y, a_z)</code> and rotation 1666 * amount <code>theta</code>, the following formulas can be used:</p> 1667 * <pre><code> theta = 2 * acos(w) 1668 * a_x = x / sin(theta/2) 1669 * a_y = y / sin(theta/2) 1670 * a_z = z / sin(theta/2) 1671 * </code></pre> 1672 * <p>To create a 3x3 rotation matrix that applies the rotation 1673 * defined by this quaternion, the following matrix can be 1674 * used:</p> 1675 * <pre><code>R = [ 1 - 2y^2 - 2z^2, 2xy - 2zw, 2xz + 2yw, 1676 * 2xy + 2zw, 1 - 2x^2 - 2z^2, 2yz - 2xw, 1677 * 2xz - 2yw, 2yz + 2xw, 1 - 2x^2 - 2y^2 ] 1678 * </code></pre> 1679 * <p>This matrix can then be used to apply the rotation to a 1680 * column vector point with</p> 1681 * <p><code>p' = Rp</code></p> 1682 * <p>where <code>p</code> is in the device sensor coordinate system, and 1683 * <code>p'</code> is in the camera-oriented coordinate system.</p> 1684 * <p>If {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is UNDEFINED, the quaternion rotation cannot 1685 * be accurately represented by the camera device, and will be represented by 1686 * default values matching its default facing.</p> 1687 * <p><b>Units</b>: 1688 * Quaternion coefficients</p> 1689 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1690 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p> 1691 * 1692 * @see CameraCharacteristics#LENS_POSE_REFERENCE 1693 */ 1694 @PublicKey 1695 @NonNull 1696 public static final Key<float[]> LENS_POSE_ROTATION = 1697 new Key<float[]>("android.lens.poseRotation", float[].class); 1698 1699 /** 1700 * <p>Position of the camera optical center.</p> 1701 * <p>The position of the camera device's lens optical center, 1702 * as a three-dimensional vector <code>(x,y,z)</code>.</p> 1703 * <p>Prior to Android P, or when {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is PRIMARY_CAMERA, this position 1704 * is relative to the optical center of the largest camera device facing in the same 1705 * direction as this camera, in the {@link android.hardware.SensorEvent Android sensor 1706 * coordinate axes}. Note that only the axis definitions are shared with the sensor 1707 * coordinate system, but not the origin.</p> 1708 * <p>If this device is the largest or only camera device with a given facing, then this 1709 * position will be <code>(0, 0, 0)</code>; a camera device with a lens optical center located 3 cm 1710 * from the main sensor along the +X axis (to the right from the user's perspective) will 1711 * report <code>(0.03, 0, 0)</code>. Note that this means that, for many computer vision 1712 * applications, the position needs to be negated to convert it to a translation from the 1713 * camera to the origin.</p> 1714 * <p>To transform a pixel coordinates between two cameras facing the same direction, first 1715 * the source camera {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} must be corrected for. Then the source 1716 * camera {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} needs to be applied, followed by the 1717 * {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the source camera, the translation of the source camera 1718 * relative to the destination camera, the {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the destination 1719 * camera, and finally the inverse of {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} of the destination 1720 * camera. This obtains a radial-distortion-free coordinate in the destination camera pixel 1721 * coordinates.</p> 1722 * <p>To compare this against a real image from the destination camera, the destination camera 1723 * image then needs to be corrected for radial distortion before comparison or sampling.</p> 1724 * <p>When {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is GYROSCOPE, then this position is relative to 1725 * the center of the primary gyroscope on the device. The axis definitions are the same as 1726 * with PRIMARY_CAMERA.</p> 1727 * <p>When {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is UNDEFINED, this position cannot be accurately 1728 * represented by the camera device, and will be represented as <code>(0, 0, 0)</code>.</p> 1729 * <p>When {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is AUTOMOTIVE, then this position is relative to the 1730 * origin of the automotive sensor coordinate system, which is at the center of the rear 1731 * axle.</p> 1732 * <p><b>Units</b>: Meters</p> 1733 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1734 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p> 1735 * 1736 * @see CameraCharacteristics#LENS_DISTORTION 1737 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION 1738 * @see CameraCharacteristics#LENS_POSE_REFERENCE 1739 * @see CameraCharacteristics#LENS_POSE_ROTATION 1740 */ 1741 @PublicKey 1742 @NonNull 1743 public static final Key<float[]> LENS_POSE_TRANSLATION = 1744 new Key<float[]>("android.lens.poseTranslation", float[].class); 1745 1746 /** 1747 * <p>The parameters for this camera device's intrinsic 1748 * calibration.</p> 1749 * <p>The five calibration parameters that describe the 1750 * transform from camera-centric 3D coordinates to sensor 1751 * pixel coordinates:</p> 1752 * <pre><code>[f_x, f_y, c_x, c_y, s] 1753 * </code></pre> 1754 * <p>Where <code>f_x</code> and <code>f_y</code> are the horizontal and vertical 1755 * focal lengths, <code>[c_x, c_y]</code> is the position of the optical 1756 * axis, and <code>s</code> is a skew parameter for the sensor plane not 1757 * being aligned with the lens plane.</p> 1758 * <p>These are typically used within a transformation matrix K:</p> 1759 * <pre><code>K = [ f_x, s, c_x, 1760 * 0, f_y, c_y, 1761 * 0 0, 1 ] 1762 * </code></pre> 1763 * <p>which can then be combined with the camera pose rotation 1764 * <code>R</code> and translation <code>t</code> ({@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} and 1765 * {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}, respectively) to calculate the 1766 * complete transform from world coordinates to pixel 1767 * coordinates:</p> 1768 * <pre><code>P = [ K 0 * [ R -Rt 1769 * 0 1 ] 0 1 ] 1770 * </code></pre> 1771 * <p>(Note the negation of poseTranslation when mapping from camera 1772 * to world coordinates, and multiplication by the rotation).</p> 1773 * <p>With <code>p_w</code> being a point in the world coordinate system 1774 * and <code>p_s</code> being a point in the camera active pixel array 1775 * coordinate system, and with the mapping including the 1776 * homogeneous division by z:</p> 1777 * <pre><code> p_h = (x_h, y_h, z_h) = P p_w 1778 * p_s = p_h / z_h 1779 * </code></pre> 1780 * <p>so <code>[x_s, y_s]</code> is the pixel coordinates of the world 1781 * point, <code>z_s = 1</code>, and <code>w_s</code> is a measurement of disparity 1782 * (depth) in pixel coordinates.</p> 1783 * <p>Note that the coordinate system for this transform is the 1784 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} system, 1785 * where <code>(0,0)</code> is the top-left of the 1786 * preCorrectionActiveArraySize rectangle. Once the pose and 1787 * intrinsic calibration transforms have been applied to a 1788 * world point, then the {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} 1789 * transform needs to be applied, and the result adjusted to 1790 * be in the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} coordinate 1791 * system (where <code>(0, 0)</code> is the top-left of the 1792 * activeArraySize rectangle), to determine the final pixel 1793 * coordinate of the world point for processed (non-RAW) 1794 * output buffers.</p> 1795 * <p>For camera devices, the center of pixel <code>(x,y)</code> is located at 1796 * coordinate <code>(x + 0.5, y + 0.5)</code>. So on a device with a 1797 * precorrection active array of size <code>(10,10)</code>, the valid pixel 1798 * indices go from <code>(0,0)-(9,9)</code>, and an perfectly-built camera would 1799 * have an optical center at the exact center of the pixel grid, at 1800 * coordinates <code>(5.0, 5.0)</code>, which is the top-left corner of pixel 1801 * <code>(5,5)</code>.</p> 1802 * <p><b>Units</b>: 1803 * Pixels in the 1804 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} 1805 * coordinate system.</p> 1806 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1807 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p> 1808 * 1809 * @see CameraCharacteristics#LENS_DISTORTION 1810 * @see CameraCharacteristics#LENS_POSE_ROTATION 1811 * @see CameraCharacteristics#LENS_POSE_TRANSLATION 1812 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 1813 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE 1814 */ 1815 @PublicKey 1816 @NonNull 1817 public static final Key<float[]> LENS_INTRINSIC_CALIBRATION = 1818 new Key<float[]>("android.lens.intrinsicCalibration", float[].class); 1819 1820 /** 1821 * <p>The correction coefficients to correct for this camera device's 1822 * radial and tangential lens distortion.</p> 1823 * <p>Four radial distortion coefficients <code>[kappa_0, kappa_1, kappa_2, 1824 * kappa_3]</code> and two tangential distortion coefficients 1825 * <code>[kappa_4, kappa_5]</code> that can be used to correct the 1826 * lens's geometric distortion with the mapping equations:</p> 1827 * <pre><code> x_c = x_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + 1828 * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 ) 1829 * y_c = y_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + 1830 * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 ) 1831 * </code></pre> 1832 * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the 1833 * input image that correspond to the pixel values in the 1834 * corrected image at the coordinate <code>[x_i, y_i]</code>:</p> 1835 * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage) 1836 * </code></pre> 1837 * <p>The pixel coordinates are defined in a normalized 1838 * coordinate system related to the 1839 * {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} calibration fields. 1840 * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code> have <code>(0,0)</code> at the 1841 * lens optical center <code>[c_x, c_y]</code>. The maximum magnitudes 1842 * of both x and y coordinates are normalized to be 1 at the 1843 * edge further from the optical center, so the range 1844 * for both dimensions is <code>-1 <= x <= 1</code>.</p> 1845 * <p>Finally, <code>r</code> represents the radial distance from the 1846 * optical center, <code>r^2 = x_i^2 + y_i^2</code>, and its magnitude 1847 * is therefore no larger than <code>|r| <= sqrt(2)</code>.</p> 1848 * <p>The distortion model used is the Brown-Conrady model.</p> 1849 * <p><b>Units</b>: 1850 * Unitless coefficients.</p> 1851 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1852 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p> 1853 * 1854 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION 1855 * @deprecated 1856 * <p>This field was inconsistently defined in terms of its 1857 * normalization. Use {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} instead.</p> 1858 * 1859 * @see CameraCharacteristics#LENS_DISTORTION 1860 1861 */ 1862 @Deprecated 1863 @PublicKey 1864 @NonNull 1865 public static final Key<float[]> LENS_RADIAL_DISTORTION = 1866 new Key<float[]>("android.lens.radialDistortion", float[].class); 1867 1868 /** 1869 * <p>The origin for {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}, and the accuracy of 1870 * {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation} and {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}.</p> 1871 * <p>Different calibration methods and use cases can produce better or worse results 1872 * depending on the selected coordinate origin.</p> 1873 * <p><b>Possible values:</b></p> 1874 * <ul> 1875 * <li>{@link #LENS_POSE_REFERENCE_PRIMARY_CAMERA PRIMARY_CAMERA}</li> 1876 * <li>{@link #LENS_POSE_REFERENCE_GYROSCOPE GYROSCOPE}</li> 1877 * <li>{@link #LENS_POSE_REFERENCE_UNDEFINED UNDEFINED}</li> 1878 * <li>{@link #LENS_POSE_REFERENCE_AUTOMOTIVE AUTOMOTIVE}</li> 1879 * </ul> 1880 * 1881 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1882 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p> 1883 * 1884 * @see CameraCharacteristics#LENS_POSE_ROTATION 1885 * @see CameraCharacteristics#LENS_POSE_TRANSLATION 1886 * @see #LENS_POSE_REFERENCE_PRIMARY_CAMERA 1887 * @see #LENS_POSE_REFERENCE_GYROSCOPE 1888 * @see #LENS_POSE_REFERENCE_UNDEFINED 1889 * @see #LENS_POSE_REFERENCE_AUTOMOTIVE 1890 */ 1891 @PublicKey 1892 @NonNull 1893 public static final Key<Integer> LENS_POSE_REFERENCE = 1894 new Key<Integer>("android.lens.poseReference", int.class); 1895 1896 /** 1897 * <p>The correction coefficients to correct for this camera device's 1898 * radial and tangential lens distortion.</p> 1899 * <p>Replaces the deprecated {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion} field, which was 1900 * inconsistently defined.</p> 1901 * <p>Three radial distortion coefficients <code>[kappa_1, kappa_2, 1902 * kappa_3]</code> and two tangential distortion coefficients 1903 * <code>[kappa_4, kappa_5]</code> that can be used to correct the 1904 * lens's geometric distortion with the mapping equations:</p> 1905 * <pre><code> x_c = x_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + 1906 * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 ) 1907 * y_c = y_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + 1908 * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 ) 1909 * </code></pre> 1910 * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the 1911 * input image that correspond to the pixel values in the 1912 * corrected image at the coordinate <code>[x_i, y_i]</code>:</p> 1913 * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage) 1914 * </code></pre> 1915 * <p>The pixel coordinates are defined in a coordinate system 1916 * related to the {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} 1917 * calibration fields; see that entry for details of the mapping stages. 1918 * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code> 1919 * have <code>(0,0)</code> at the lens optical center <code>[c_x, c_y]</code>, and 1920 * the range of the coordinates depends on the focal length 1921 * terms of the intrinsic calibration.</p> 1922 * <p>Finally, <code>r</code> represents the radial distance from the 1923 * optical center, <code>r^2 = x_i^2 + y_i^2</code>.</p> 1924 * <p>The distortion model used is the Brown-Conrady model.</p> 1925 * <p><b>Units</b>: 1926 * Unitless coefficients.</p> 1927 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1928 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p> 1929 * 1930 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION 1931 * @see CameraCharacteristics#LENS_RADIAL_DISTORTION 1932 */ 1933 @PublicKey 1934 @NonNull 1935 public static final Key<float[]> LENS_DISTORTION = 1936 new Key<float[]>("android.lens.distortion", float[].class); 1937 1938 /** 1939 * <p>The correction coefficients to correct for this camera device's 1940 * radial and tangential lens distortion for a 1941 * CaptureRequest with {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} set to 1942 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 1943 * <p>Analogous to {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}, when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 1944 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 1945 * <p><b>Units</b>: 1946 * Unitless coefficients.</p> 1947 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1948 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p> 1949 * 1950 * @see CameraCharacteristics#LENS_DISTORTION 1951 * @see CaptureRequest#SENSOR_PIXEL_MODE 1952 */ 1953 @PublicKey 1954 @NonNull 1955 public static final Key<float[]> LENS_DISTORTION_MAXIMUM_RESOLUTION = 1956 new Key<float[]>("android.lens.distortionMaximumResolution", float[].class); 1957 1958 /** 1959 * <p>The parameters for this camera device's intrinsic 1960 * calibration when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 1961 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 1962 * <p>Analogous to {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}, when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 1963 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 1964 * <p><b>Units</b>: 1965 * Pixels in the 1966 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION android.sensor.info.preCorrectionActiveArraySizeMaximumResolution} 1967 * coordinate system.</p> 1968 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1969 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p> 1970 * 1971 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION 1972 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION 1973 * @see CaptureRequest#SENSOR_PIXEL_MODE 1974 */ 1975 @PublicKey 1976 @NonNull 1977 public static final Key<float[]> LENS_INTRINSIC_CALIBRATION_MAXIMUM_RESOLUTION = 1978 new Key<float[]>("android.lens.intrinsicCalibrationMaximumResolution", float[].class); 1979 1980 /** 1981 * <p>List of noise reduction modes for {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode} that are supported 1982 * by this camera device.</p> 1983 * <p>Full-capability camera devices will always support OFF and FAST.</p> 1984 * <p>Camera devices that support YUV_REPROCESSING or PRIVATE_REPROCESSING will support 1985 * ZERO_SHUTTER_LAG.</p> 1986 * <p>Legacy-capability camera devices will only support FAST mode.</p> 1987 * <p><b>Range of valid values:</b><br> 1988 * Any value listed in {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</p> 1989 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 1990 * <p><b>Limited capability</b> - 1991 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 1992 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1993 * 1994 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1995 * @see CaptureRequest#NOISE_REDUCTION_MODE 1996 */ 1997 @PublicKey 1998 @NonNull 1999 public static final Key<int[]> NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES = 2000 new Key<int[]>("android.noiseReduction.availableNoiseReductionModes", int[].class); 2001 2002 /** 2003 * <p>If set to 1, the HAL will always split result 2004 * metadata for a single capture into multiple buffers, 2005 * returned using multiple process_capture_result calls.</p> 2006 * <p>Does not need to be listed in static 2007 * metadata. Support for partial results will be reworked in 2008 * future versions of camera service. This quirk will stop 2009 * working at that point; DO NOT USE without careful 2010 * consideration of future support.</p> 2011 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 2012 * @deprecated 2013 * <p>Not used in HALv3 or newer; replaced by better partials mechanism</p> 2014 2015 * @hide 2016 */ 2017 @Deprecated 2018 public static final Key<Byte> QUIRKS_USE_PARTIAL_RESULT = 2019 new Key<Byte>("android.quirks.usePartialResult", byte.class); 2020 2021 /** 2022 * <p>The maximum numbers of different types of output streams 2023 * that can be configured and used simultaneously by a camera device.</p> 2024 * <p>This is a 3 element tuple that contains the max number of output simultaneous 2025 * streams for raw sensor, processed (but not stalling), and processed (and stalling) 2026 * formats respectively. For example, assuming that JPEG is typically a processed and 2027 * stalling stream, if max raw sensor format output stream number is 1, max YUV streams 2028 * number is 3, and max JPEG stream number is 2, then this tuple should be <code>(1, 3, 2)</code>.</p> 2029 * <p>This lists the upper bound of the number of output streams supported by 2030 * the camera device. Using more streams simultaneously may require more hardware and 2031 * CPU resources that will consume more power. The image format for an output stream can 2032 * be any supported format provided by android.scaler.availableStreamConfigurations. 2033 * The formats defined in android.scaler.availableStreamConfigurations can be categorized 2034 * into the 3 stream types as below:</p> 2035 * <ul> 2036 * <li>Processed (but stalling): any non-RAW format with a stallDurations > 0. 2037 * Typically {@link android.graphics.ImageFormat#JPEG JPEG format}.</li> 2038 * <li>Raw formats: {@link android.graphics.ImageFormat#RAW_SENSOR RAW_SENSOR}, {@link android.graphics.ImageFormat#RAW10 RAW10}, or 2039 * {@link android.graphics.ImageFormat#RAW12 RAW12}.</li> 2040 * <li>Processed (but not-stalling): any non-RAW format without a stall duration. Typically 2041 * {@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888}, 2042 * {@link android.graphics.ImageFormat#NV21 NV21}, {@link android.graphics.ImageFormat#YV12 YV12}, or {@link android.graphics.ImageFormat#Y8 Y8} .</li> 2043 * </ul> 2044 * <p><b>Range of valid values:</b><br></p> 2045 * <p>For processed (and stalling) format streams, >= 1.</p> 2046 * <p>For Raw format (either stalling or non-stalling) streams, >= 0.</p> 2047 * <p>For processed (but not stalling) format streams, >= 3 2048 * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>); 2049 * >= 2 for LIMITED mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == LIMITED</code>).</p> 2050 * <p>This key is available on all devices.</p> 2051 * 2052 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2053 * @hide 2054 */ 2055 public static final Key<int[]> REQUEST_MAX_NUM_OUTPUT_STREAMS = 2056 new Key<int[]>("android.request.maxNumOutputStreams", int[].class); 2057 2058 /** 2059 * <p>The maximum numbers of different types of output streams 2060 * that can be configured and used simultaneously by a camera device 2061 * for any <code>RAW</code> formats.</p> 2062 * <p>This value contains the max number of output simultaneous 2063 * streams from the raw sensor.</p> 2064 * <p>This lists the upper bound of the number of output streams supported by 2065 * the camera device. Using more streams simultaneously may require more hardware and 2066 * CPU resources that will consume more power. The image format for this kind of an output stream can 2067 * be any <code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p> 2068 * <p>In particular, a <code>RAW</code> format is typically one of:</p> 2069 * <ul> 2070 * <li>{@link android.graphics.ImageFormat#RAW_SENSOR RAW_SENSOR}</li> 2071 * <li>{@link android.graphics.ImageFormat#RAW10 RAW10}</li> 2072 * <li>{@link android.graphics.ImageFormat#RAW12 RAW12}</li> 2073 * </ul> 2074 * <p>LEGACY mode devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> LEGACY) 2075 * never support raw streams.</p> 2076 * <p><b>Range of valid values:</b><br></p> 2077 * <p>>= 0</p> 2078 * <p>This key is available on all devices.</p> 2079 * 2080 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2081 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP 2082 */ 2083 @PublicKey 2084 @NonNull 2085 @SyntheticKey 2086 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_RAW = 2087 new Key<Integer>("android.request.maxNumOutputRaw", int.class); 2088 2089 /** 2090 * <p>The maximum numbers of different types of output streams 2091 * that can be configured and used simultaneously by a camera device 2092 * for any processed (but not-stalling) formats.</p> 2093 * <p>This value contains the max number of output simultaneous 2094 * streams for any processed (but not-stalling) formats.</p> 2095 * <p>This lists the upper bound of the number of output streams supported by 2096 * the camera device. Using more streams simultaneously may require more hardware and 2097 * CPU resources that will consume more power. The image format for this kind of an output stream can 2098 * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p> 2099 * <p>Processed (but not-stalling) is defined as any non-RAW format without a stall duration. 2100 * Typically:</p> 2101 * <ul> 2102 * <li>{@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888}</li> 2103 * <li>{@link android.graphics.ImageFormat#NV21 NV21}</li> 2104 * <li>{@link android.graphics.ImageFormat#YV12 YV12}</li> 2105 * <li>Implementation-defined formats, i.e. {@link android.hardware.camera2.params.StreamConfigurationMap#isOutputSupportedFor(Class) }</li> 2106 * <li>{@link android.graphics.ImageFormat#Y8 Y8}</li> 2107 * </ul> 2108 * <p>For full guarantees, query {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } with a 2109 * processed format -- it will return 0 for a non-stalling stream.</p> 2110 * <p>LEGACY devices will support at least 2 processing/non-stalling streams.</p> 2111 * <p><b>Range of valid values:</b><br></p> 2112 * <p>>= 3 2113 * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>); 2114 * >= 2 for LIMITED mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == LIMITED</code>).</p> 2115 * <p>This key is available on all devices.</p> 2116 * 2117 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2118 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP 2119 */ 2120 @PublicKey 2121 @NonNull 2122 @SyntheticKey 2123 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC = 2124 new Key<Integer>("android.request.maxNumOutputProc", int.class); 2125 2126 /** 2127 * <p>The maximum numbers of different types of output streams 2128 * that can be configured and used simultaneously by a camera device 2129 * for any processed (and stalling) formats.</p> 2130 * <p>This value contains the max number of output simultaneous 2131 * streams for any processed (but not-stalling) formats.</p> 2132 * <p>This lists the upper bound of the number of output streams supported by 2133 * the camera device. Using more streams simultaneously may require more hardware and 2134 * CPU resources that will consume more power. The image format for this kind of an output stream can 2135 * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p> 2136 * <p>A processed and stalling format is defined as any non-RAW format with a stallDurations 2137 * > 0. Typically only the {@link android.graphics.ImageFormat#JPEG JPEG format} is a stalling format.</p> 2138 * <p>For full guarantees, query {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } with a 2139 * processed format -- it will return a non-0 value for a stalling stream.</p> 2140 * <p>LEGACY devices will support up to 1 processing/stalling stream.</p> 2141 * <p><b>Range of valid values:</b><br></p> 2142 * <p>>= 1</p> 2143 * <p>This key is available on all devices.</p> 2144 * 2145 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP 2146 */ 2147 @PublicKey 2148 @NonNull 2149 @SyntheticKey 2150 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC_STALLING = 2151 new Key<Integer>("android.request.maxNumOutputProcStalling", int.class); 2152 2153 /** 2154 * <p>The maximum numbers of any type of input streams 2155 * that can be configured and used simultaneously by a camera device.</p> 2156 * <p>When set to 0, it means no input stream is supported.</p> 2157 * <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 2158 * input stream, there must be at least one output stream configured to to receive the 2159 * reprocessed images.</p> 2160 * <p>When an input stream and some output streams are used in a reprocessing request, 2161 * only the input buffer will be used to produce these output stream buffers, and a 2162 * new sensor image will not be captured.</p> 2163 * <p>For example, for Zero Shutter Lag (ZSL) still capture use case, the input 2164 * stream image format will be PRIVATE, the associated output stream image format 2165 * should be JPEG.</p> 2166 * <p><b>Range of valid values:</b><br></p> 2167 * <p>0 or 1.</p> 2168 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 2169 * <p><b>Full capability</b> - 2170 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 2171 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2172 * 2173 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2174 */ 2175 @PublicKey 2176 @NonNull 2177 public static final Key<Integer> REQUEST_MAX_NUM_INPUT_STREAMS = 2178 new Key<Integer>("android.request.maxNumInputStreams", int.class); 2179 2180 /** 2181 * <p>Specifies the number of maximum pipeline stages a frame 2182 * has to go through from when it's exposed to when it's available 2183 * to the framework.</p> 2184 * <p>A typical minimum value for this is 2 (one stage to expose, 2185 * one stage to readout) from the sensor. The ISP then usually adds 2186 * its own stages to do custom HW processing. Further stages may be 2187 * added by SW processing.</p> 2188 * <p>Depending on what settings are used (e.g. YUV, JPEG) and what 2189 * processing is enabled (e.g. face detection), the actual pipeline 2190 * depth (specified by {@link CaptureResult#REQUEST_PIPELINE_DEPTH android.request.pipelineDepth}) may be less than 2191 * the max pipeline depth.</p> 2192 * <p>A pipeline depth of X stages is equivalent to a pipeline latency of 2193 * X frame intervals.</p> 2194 * <p>This value will normally be 8 or less, however, for high speed capture session, 2195 * the max pipeline depth will be up to 8 x size of high speed capture request list.</p> 2196 * <p>This key is available on all devices.</p> 2197 * 2198 * @see CaptureResult#REQUEST_PIPELINE_DEPTH 2199 */ 2200 @PublicKey 2201 @NonNull 2202 public static final Key<Byte> REQUEST_PIPELINE_MAX_DEPTH = 2203 new Key<Byte>("android.request.pipelineMaxDepth", byte.class); 2204 2205 /** 2206 * <p>Defines how many sub-components 2207 * a result will be composed of.</p> 2208 * <p>In order to combat the pipeline latency, partial results 2209 * may be delivered to the application layer from the camera device as 2210 * soon as they are available.</p> 2211 * <p>Optional; defaults to 1. A value of 1 means that partial 2212 * results are not supported, and only the final TotalCaptureResult will 2213 * be produced by the camera device.</p> 2214 * <p>A typical use case for this might be: after requesting an 2215 * auto-focus (AF) lock the new AF state might be available 50% 2216 * of the way through the pipeline. The camera device could 2217 * then immediately dispatch this state via a partial result to 2218 * the application, and the rest of the metadata via later 2219 * partial results.</p> 2220 * <p><b>Range of valid values:</b><br> 2221 * >= 1</p> 2222 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 2223 */ 2224 @PublicKey 2225 @NonNull 2226 public static final Key<Integer> REQUEST_PARTIAL_RESULT_COUNT = 2227 new Key<Integer>("android.request.partialResultCount", int.class); 2228 2229 /** 2230 * <p>List of capabilities that this camera device 2231 * advertises as fully supporting.</p> 2232 * <p>A capability is a contract that the camera device makes in order 2233 * to be able to satisfy one or more use cases.</p> 2234 * <p>Listing a capability guarantees that the whole set of features 2235 * required to support a common use will all be available.</p> 2236 * <p>Using a subset of the functionality provided by an unsupported 2237 * capability may be possible on a specific camera device implementation; 2238 * to do this query each of android.request.availableRequestKeys, 2239 * android.request.availableResultKeys, 2240 * android.request.availableCharacteristicsKeys.</p> 2241 * <p>The following capabilities are guaranteed to be available on 2242 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL devices:</p> 2243 * <ul> 2244 * <li>MANUAL_SENSOR</li> 2245 * <li>MANUAL_POST_PROCESSING</li> 2246 * </ul> 2247 * <p>Other capabilities may be available on either FULL or LIMITED 2248 * devices, but the application should query this key to be sure.</p> 2249 * <p><b>Possible values:</b></p> 2250 * <ul> 2251 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE BACKWARD_COMPATIBLE}</li> 2252 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR MANUAL_SENSOR}</li> 2253 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING MANUAL_POST_PROCESSING}</li> 2254 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_RAW RAW}</li> 2255 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING PRIVATE_REPROCESSING}</li> 2256 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS READ_SENSOR_SETTINGS}</li> 2257 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE BURST_CAPTURE}</li> 2258 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING YUV_REPROCESSING}</li> 2259 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT DEPTH_OUTPUT}</li> 2260 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO CONSTRAINED_HIGH_SPEED_VIDEO}</li> 2261 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING MOTION_TRACKING}</li> 2262 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA LOGICAL_MULTI_CAMERA}</li> 2263 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME MONOCHROME}</li> 2264 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA SECURE_IMAGE_DATA}</li> 2265 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_SYSTEM_CAMERA SYSTEM_CAMERA}</li> 2266 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_OFFLINE_PROCESSING OFFLINE_PROCESSING}</li> 2267 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR ULTRA_HIGH_RESOLUTION_SENSOR}</li> 2268 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_REMOSAIC_REPROCESSING REMOSAIC_REPROCESSING}</li> 2269 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT DYNAMIC_RANGE_TEN_BIT}</li> 2270 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE STREAM_USE_CASE}</li> 2271 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_COLOR_SPACE_PROFILES COLOR_SPACE_PROFILES}</li> 2272 * </ul> 2273 * 2274 * <p>This key is available on all devices.</p> 2275 * 2276 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2277 * @see #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE 2278 * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR 2279 * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING 2280 * @see #REQUEST_AVAILABLE_CAPABILITIES_RAW 2281 * @see #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING 2282 * @see #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS 2283 * @see #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE 2284 * @see #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING 2285 * @see #REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT 2286 * @see #REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO 2287 * @see #REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING 2288 * @see #REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA 2289 * @see #REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME 2290 * @see #REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA 2291 * @see #REQUEST_AVAILABLE_CAPABILITIES_SYSTEM_CAMERA 2292 * @see #REQUEST_AVAILABLE_CAPABILITIES_OFFLINE_PROCESSING 2293 * @see #REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR 2294 * @see #REQUEST_AVAILABLE_CAPABILITIES_REMOSAIC_REPROCESSING 2295 * @see #REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT 2296 * @see #REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE 2297 * @see #REQUEST_AVAILABLE_CAPABILITIES_COLOR_SPACE_PROFILES 2298 */ 2299 @PublicKey 2300 @NonNull 2301 public static final Key<int[]> REQUEST_AVAILABLE_CAPABILITIES = 2302 new Key<int[]>("android.request.availableCapabilities", int[].class); 2303 2304 /** 2305 * <p>A list of all keys that the camera device has available 2306 * to use with {@link android.hardware.camera2.CaptureRequest }.</p> 2307 * <p>Attempting to set a key into a CaptureRequest that is not 2308 * listed here will result in an invalid request and will be rejected 2309 * by the camera device.</p> 2310 * <p>This field can be used to query the feature set of a camera device 2311 * at a more granular level than capabilities. This is especially 2312 * important for optional keys that are not listed under any capability 2313 * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p> 2314 * <p>This key is available on all devices.</p> 2315 * 2316 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 2317 * @hide 2318 */ 2319 public static final Key<int[]> REQUEST_AVAILABLE_REQUEST_KEYS = 2320 new Key<int[]>("android.request.availableRequestKeys", int[].class); 2321 2322 /** 2323 * <p>A list of all keys that the camera device has available to use with {@link android.hardware.camera2.CaptureResult }.</p> 2324 * <p>Attempting to get a key from a CaptureResult that is not 2325 * listed here will always return a <code>null</code> value. Getting a key from 2326 * a CaptureResult that is listed here will generally never return a <code>null</code> 2327 * value.</p> 2328 * <p>The following keys may return <code>null</code> unless they are enabled:</p> 2329 * <ul> 2330 * <li>android.statistics.lensShadingMap (non-null iff {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON)</li> 2331 * </ul> 2332 * <p>(Those sometimes-null keys will nevertheless be listed here 2333 * if they are available.)</p> 2334 * <p>This field can be used to query the feature set of a camera device 2335 * at a more granular level than capabilities. This is especially 2336 * important for optional keys that are not listed under any capability 2337 * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p> 2338 * <p>This key is available on all devices.</p> 2339 * 2340 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 2341 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 2342 * @hide 2343 */ 2344 public static final Key<int[]> REQUEST_AVAILABLE_RESULT_KEYS = 2345 new Key<int[]>("android.request.availableResultKeys", int[].class); 2346 2347 /** 2348 * <p>A list of all keys that the camera device has available to use with {@link android.hardware.camera2.CameraCharacteristics }.</p> 2349 * <p>This entry follows the same rules as 2350 * android.request.availableResultKeys (except that it applies for 2351 * CameraCharacteristics instead of CaptureResult). See above for more 2352 * details.</p> 2353 * <p>This key is available on all devices.</p> 2354 * @hide 2355 */ 2356 public static final Key<int[]> REQUEST_AVAILABLE_CHARACTERISTICS_KEYS = 2357 new Key<int[]>("android.request.availableCharacteristicsKeys", int[].class); 2358 2359 /** 2360 * <p>A subset of the available request keys that the camera device 2361 * can pass as part of the capture session initialization.</p> 2362 * <p>This is a subset of android.request.availableRequestKeys which 2363 * contains a list of keys that are difficult to apply per-frame and 2364 * can result in unexpected delays when modified during the capture session 2365 * lifetime. Typical examples include parameters that require a 2366 * time-consuming hardware re-configuration or internal camera pipeline 2367 * change. For performance reasons we advise clients to pass their initial 2368 * values as part of 2369 * {@link SessionConfiguration#setSessionParameters }. 2370 * Once the camera capture session is enabled it is also recommended to avoid 2371 * changing them from their initial values set in 2372 * {@link SessionConfiguration#setSessionParameters }. 2373 * Control over session parameters can still be exerted in capture requests 2374 * but clients should be aware and expect delays during their application. 2375 * An example usage scenario could look like this:</p> 2376 * <ul> 2377 * <li>The camera client starts by querying the session parameter key list via 2378 * {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys }.</li> 2379 * <li>Before triggering the capture session create sequence, a capture request 2380 * must be built via 2381 * {@link CameraDevice#createCaptureRequest } 2382 * using an appropriate template matching the particular use case.</li> 2383 * <li>The client should go over the list of session parameters and check 2384 * whether some of the keys listed matches with the parameters that 2385 * they intend to modify as part of the first capture request.</li> 2386 * <li>If there is no such match, the capture request can be passed 2387 * unmodified to 2388 * {@link SessionConfiguration#setSessionParameters }.</li> 2389 * <li>If matches do exist, the client should update the respective values 2390 * and pass the request to 2391 * {@link SessionConfiguration#setSessionParameters }.</li> 2392 * <li>After the capture session initialization completes the session parameter 2393 * key list can continue to serve as reference when posting or updating 2394 * further requests. As mentioned above further changes to session 2395 * parameters should ideally be avoided, if updates are necessary 2396 * however clients could expect a delay/glitch during the 2397 * parameter switch.</li> 2398 * </ul> 2399 * <p>This key is available on all devices.</p> 2400 * @hide 2401 */ 2402 public static final Key<int[]> REQUEST_AVAILABLE_SESSION_KEYS = 2403 new Key<int[]>("android.request.availableSessionKeys", int[].class); 2404 2405 /** 2406 * <p>A subset of the available request keys that can be overridden for 2407 * physical devices backing a logical multi-camera.</p> 2408 * <p>This is a subset of android.request.availableRequestKeys which contains a list 2409 * of keys that can be overridden using 2410 * {@link android.hardware.camera2.CaptureRequest.Builder#setPhysicalCameraKey }. 2411 * The respective value of such request key can be obtained by calling 2412 * {@link android.hardware.camera2.CaptureRequest.Builder#getPhysicalCameraKey }. 2413 * Capture requests that contain individual physical device requests must be built via 2414 * {@link android.hardware.camera2.CameraDevice#createCaptureRequest(int, Set)}.</p> 2415 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 2416 * <p><b>Limited capability</b> - 2417 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 2418 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2419 * 2420 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2421 * @hide 2422 */ 2423 public static final Key<int[]> REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS = 2424 new Key<int[]>("android.request.availablePhysicalCameraRequestKeys", int[].class); 2425 2426 /** 2427 * <p>A list of camera characteristics keys that are only available 2428 * in case the camera client has camera permission.</p> 2429 * <p>The entry contains a subset of 2430 * {@link android.hardware.camera2.CameraCharacteristics#getKeys } that require camera clients 2431 * to acquire the {@link android.Manifest.permission#CAMERA } permission before calling 2432 * {@link android.hardware.camera2.CameraManager#getCameraCharacteristics }. If the 2433 * permission is not held by the camera client, then the values of the respective properties 2434 * will not be present in {@link android.hardware.camera2.CameraCharacteristics }.</p> 2435 * <p>This key is available on all devices.</p> 2436 * @hide 2437 */ 2438 public static final Key<int[]> REQUEST_CHARACTERISTIC_KEYS_NEEDING_PERMISSION = 2439 new Key<int[]>("android.request.characteristicKeysNeedingPermission", int[].class); 2440 2441 /** 2442 * <p>Devices supporting the 10-bit output capability 2443 * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT } 2444 * must list their supported dynamic range profiles along with capture request 2445 * constraints for specific profile combinations.</p> 2446 * <p>Camera clients can retrieve the list of supported 10-bit dynamic range profiles by calling 2447 * {@link android.hardware.camera2.params.DynamicRangeProfiles#getSupportedProfiles }. 2448 * Any of them can be configured by setting OutputConfiguration dynamic range profile in 2449 * {@link android.hardware.camera2.params.OutputConfiguration#setDynamicRangeProfile }. 2450 * Clients can also check if there are any constraints that limit the combination 2451 * of supported profiles that can be referenced within a single capture request by calling 2452 * {@link android.hardware.camera2.params.DynamicRangeProfiles#getProfileCaptureRequestConstraints }.</p> 2453 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 2454 */ 2455 @PublicKey 2456 @NonNull 2457 @SyntheticKey 2458 public static final Key<android.hardware.camera2.params.DynamicRangeProfiles> REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES = 2459 new Key<android.hardware.camera2.params.DynamicRangeProfiles>("android.request.availableDynamicRangeProfiles", android.hardware.camera2.params.DynamicRangeProfiles.class); 2460 2461 /** 2462 * <p>A map of all available 10-bit dynamic range profiles along with their 2463 * capture request constraints.</p> 2464 * <p>Devices supporting the 10-bit output capability 2465 * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT } 2466 * must list their supported dynamic range profiles. In case the camera is not able to 2467 * support every possible profile combination within a single capture request, then the 2468 * constraints must be listed here as well.</p> 2469 * <p><b>Possible values:</b></p> 2470 * <ul> 2471 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD STANDARD}</li> 2472 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HLG10 HLG10}</li> 2473 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10 HDR10}</li> 2474 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10_PLUS HDR10_PLUS}</li> 2475 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF DOLBY_VISION_10B_HDR_REF}</li> 2476 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF_PO DOLBY_VISION_10B_HDR_REF_PO}</li> 2477 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM DOLBY_VISION_10B_HDR_OEM}</li> 2478 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM_PO DOLBY_VISION_10B_HDR_OEM_PO}</li> 2479 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF DOLBY_VISION_8B_HDR_REF}</li> 2480 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF_PO DOLBY_VISION_8B_HDR_REF_PO}</li> 2481 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM DOLBY_VISION_8B_HDR_OEM}</li> 2482 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM_PO DOLBY_VISION_8B_HDR_OEM_PO}</li> 2483 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_MAX MAX}</li> 2484 * </ul> 2485 * 2486 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 2487 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD 2488 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HLG10 2489 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10 2490 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10_PLUS 2491 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF 2492 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF_PO 2493 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM 2494 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM_PO 2495 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF 2496 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF_PO 2497 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM 2498 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM_PO 2499 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_MAX 2500 * @hide 2501 */ 2502 public static final Key<long[]> REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP = 2503 new Key<long[]>("android.request.availableDynamicRangeProfilesMap", long[].class); 2504 2505 /** 2506 * <p>Recommended 10-bit dynamic range profile.</p> 2507 * <p>Devices supporting the 10-bit output capability 2508 * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT } 2509 * must list a 10-bit supported dynamic range profile that is expected to perform 2510 * optimally in terms of image quality, power and performance. 2511 * The value advertised can be used as a hint by camera clients when configuring the dynamic 2512 * range profile when calling 2513 * {@link android.hardware.camera2.params.OutputConfiguration#setDynamicRangeProfile }.</p> 2514 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 2515 */ 2516 @PublicKey 2517 @NonNull 2518 public static final Key<Long> REQUEST_RECOMMENDED_TEN_BIT_DYNAMIC_RANGE_PROFILE = 2519 new Key<Long>("android.request.recommendedTenBitDynamicRangeProfile", long.class); 2520 2521 /** 2522 * <p>An interface for querying the color space profiles supported by a camera device.</p> 2523 * <p>A color space profile is a combination of a color space, an image format, and a dynamic 2524 * range profile. Camera clients can retrieve the list of supported color spaces by calling 2525 * {@link android.hardware.camera2.params.ColorSpaceProfiles#getSupportedColorSpaces } or 2526 * {@link android.hardware.camera2.params.ColorSpaceProfiles#getSupportedColorSpacesForDynamicRange }. 2527 * If a camera does not support the 2528 * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT } 2529 * capability, the dynamic range profile will always be 2530 * {@link android.hardware.camera2.params.DynamicRangeProfiles#STANDARD }. Color space 2531 * capabilities are queried in combination with an {@link android.graphics.ImageFormat }. 2532 * If a camera client wants to know the general color space capabilities of a camera device 2533 * regardless of image format, it can specify {@link android.graphics.ImageFormat#UNKNOWN }. 2534 * The color space for a session can be configured by setting the SessionConfiguration 2535 * color space via {@link android.hardware.camera2.params.SessionConfiguration#setColorSpace }.</p> 2536 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 2537 */ 2538 @PublicKey 2539 @NonNull 2540 @SyntheticKey 2541 public static final Key<android.hardware.camera2.params.ColorSpaceProfiles> REQUEST_AVAILABLE_COLOR_SPACE_PROFILES = 2542 new Key<android.hardware.camera2.params.ColorSpaceProfiles>("android.request.availableColorSpaceProfiles", android.hardware.camera2.params.ColorSpaceProfiles.class); 2543 2544 /** 2545 * <p>A list of all possible color space profiles supported by a camera device.</p> 2546 * <p>A color space profile is a combination of a color space, an image format, and a dynamic range 2547 * profile. If a camera does not support the 2548 * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT } 2549 * capability, the dynamic range profile will always be 2550 * {@link android.hardware.camera2.params.DynamicRangeProfiles#STANDARD }. Camera clients can 2551 * use {@link android.hardware.camera2.params.SessionConfiguration#setColorSpace } to select 2552 * a color space.</p> 2553 * <p><b>Possible values:</b></p> 2554 * <ul> 2555 * <li>{@link #REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_UNSPECIFIED UNSPECIFIED}</li> 2556 * <li>{@link #REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_SRGB SRGB}</li> 2557 * <li>{@link #REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_DISPLAY_P3 DISPLAY_P3}</li> 2558 * <li>{@link #REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_BT2020_HLG BT2020_HLG}</li> 2559 * </ul> 2560 * 2561 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 2562 * @see #REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_UNSPECIFIED 2563 * @see #REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_SRGB 2564 * @see #REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_DISPLAY_P3 2565 * @see #REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_BT2020_HLG 2566 * @hide 2567 */ 2568 public static final Key<long[]> REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP = 2569 new Key<long[]>("android.request.availableColorSpaceProfilesMap", long[].class); 2570 2571 /** 2572 * <p>The list of image formats that are supported by this 2573 * camera device for output streams.</p> 2574 * <p>All camera devices will support JPEG and YUV_420_888 formats.</p> 2575 * <p>When set to YUV_420_888, application can access the YUV420 data directly.</p> 2576 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 2577 * @deprecated 2578 * <p>Not used in HALv3 or newer</p> 2579 2580 * @hide 2581 */ 2582 @Deprecated 2583 public static final Key<int[]> SCALER_AVAILABLE_FORMATS = 2584 new Key<int[]>("android.scaler.availableFormats", int[].class); 2585 2586 /** 2587 * <p>The minimum frame duration that is supported 2588 * for each resolution in android.scaler.availableJpegSizes.</p> 2589 * <p>This corresponds to the minimum steady-state frame duration when only 2590 * that JPEG stream is active and captured in a burst, with all 2591 * processing (typically in android.*.mode) set to FAST.</p> 2592 * <p>When multiple streams are configured, the minimum 2593 * frame duration will be >= max(individual stream min 2594 * durations)</p> 2595 * <p><b>Units</b>: Nanoseconds</p> 2596 * <p><b>Range of valid values:</b><br> 2597 * TODO: Remove property.</p> 2598 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 2599 * @deprecated 2600 * <p>Not used in HALv3 or newer</p> 2601 2602 * @hide 2603 */ 2604 @Deprecated 2605 public static final Key<long[]> SCALER_AVAILABLE_JPEG_MIN_DURATIONS = 2606 new Key<long[]>("android.scaler.availableJpegMinDurations", long[].class); 2607 2608 /** 2609 * <p>The JPEG resolutions that are supported by this camera device.</p> 2610 * <p>The resolutions are listed as <code>(width, height)</code> pairs. All camera devices will support 2611 * sensor maximum resolution (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}).</p> 2612 * <p><b>Range of valid values:</b><br> 2613 * TODO: Remove property.</p> 2614 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 2615 * 2616 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 2617 * @deprecated 2618 * <p>Not used in HALv3 or newer</p> 2619 2620 * @hide 2621 */ 2622 @Deprecated 2623 public static final Key<android.util.Size[]> SCALER_AVAILABLE_JPEG_SIZES = 2624 new Key<android.util.Size[]>("android.scaler.availableJpegSizes", android.util.Size[].class); 2625 2626 /** 2627 * <p>The maximum ratio between both active area width 2628 * and crop region width, and active area height and 2629 * crop region height, for {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p> 2630 * <p>This represents the maximum amount of zooming possible by 2631 * the camera device, or equivalently, the minimum cropping 2632 * window size.</p> 2633 * <p>Crop regions that have a width or height that is smaller 2634 * than this ratio allows will be rounded up to the minimum 2635 * allowed size by the camera device.</p> 2636 * <p>Starting from API level 30, when using {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} to zoom in or out, 2637 * the application must use {@link CameraCharacteristics#CONTROL_ZOOM_RATIO_RANGE android.control.zoomRatioRange} to query both the minimum and 2638 * maximum zoom ratio.</p> 2639 * <p><b>Units</b>: Zoom scale factor</p> 2640 * <p><b>Range of valid values:</b><br> 2641 * >=1</p> 2642 * <p>This key is available on all devices.</p> 2643 * 2644 * @see CaptureRequest#CONTROL_ZOOM_RATIO 2645 * @see CameraCharacteristics#CONTROL_ZOOM_RATIO_RANGE 2646 * @see CaptureRequest#SCALER_CROP_REGION 2647 */ 2648 @PublicKey 2649 @NonNull 2650 public static final Key<Float> SCALER_AVAILABLE_MAX_DIGITAL_ZOOM = 2651 new Key<Float>("android.scaler.availableMaxDigitalZoom", float.class); 2652 2653 /** 2654 * <p>For each available processed output size (defined in 2655 * android.scaler.availableProcessedSizes), this property lists the 2656 * minimum supportable frame duration for that size.</p> 2657 * <p>This should correspond to the frame duration when only that processed 2658 * stream is active, with all processing (typically in android.*.mode) 2659 * set to FAST.</p> 2660 * <p>When multiple streams are configured, the minimum frame duration will 2661 * be >= max(individual stream min durations).</p> 2662 * <p><b>Units</b>: Nanoseconds</p> 2663 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 2664 * @deprecated 2665 * <p>Not used in HALv3 or newer</p> 2666 2667 * @hide 2668 */ 2669 @Deprecated 2670 public static final Key<long[]> SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS = 2671 new Key<long[]>("android.scaler.availableProcessedMinDurations", long[].class); 2672 2673 /** 2674 * <p>The resolutions available for use with 2675 * processed output streams, such as YV12, NV12, and 2676 * platform opaque YUV/RGB streams to the GPU or video 2677 * encoders.</p> 2678 * <p>The resolutions are listed as <code>(width, height)</code> pairs.</p> 2679 * <p>For a given use case, the actual maximum supported resolution 2680 * may be lower than what is listed here, depending on the destination 2681 * Surface for the image data. For example, for recording video, 2682 * the video encoder chosen may have a maximum size limit (e.g. 1080p) 2683 * smaller than what the camera (e.g. maximum resolution is 3264x2448) 2684 * can provide.</p> 2685 * <p>Please reference the documentation for the image data destination to 2686 * check if it limits the maximum size for image data.</p> 2687 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 2688 * @deprecated 2689 * <p>Not used in HALv3 or newer</p> 2690 2691 * @hide 2692 */ 2693 @Deprecated 2694 public static final Key<android.util.Size[]> SCALER_AVAILABLE_PROCESSED_SIZES = 2695 new Key<android.util.Size[]>("android.scaler.availableProcessedSizes", android.util.Size[].class); 2696 2697 /** 2698 * <p>The mapping of image formats that are supported by this 2699 * camera device for input streams, to their corresponding output formats.</p> 2700 * <p>All camera devices with at least 1 2701 * {@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} will have at least one 2702 * available input format.</p> 2703 * <p>The camera device will support the following map of formats, 2704 * if its dependent capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}) is supported:</p> 2705 * <table> 2706 * <thead> 2707 * <tr> 2708 * <th style="text-align: left;">Input Format</th> 2709 * <th style="text-align: left;">Output Format</th> 2710 * <th style="text-align: left;">Capability</th> 2711 * </tr> 2712 * </thead> 2713 * <tbody> 2714 * <tr> 2715 * <td style="text-align: left;">{@link android.graphics.ImageFormat#PRIVATE }</td> 2716 * <td style="text-align: left;">{@link android.graphics.ImageFormat#JPEG }</td> 2717 * <td style="text-align: left;">PRIVATE_REPROCESSING</td> 2718 * </tr> 2719 * <tr> 2720 * <td style="text-align: left;">{@link android.graphics.ImageFormat#PRIVATE }</td> 2721 * <td style="text-align: left;">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 2722 * <td style="text-align: left;">PRIVATE_REPROCESSING</td> 2723 * </tr> 2724 * <tr> 2725 * <td style="text-align: left;">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 2726 * <td style="text-align: left;">{@link android.graphics.ImageFormat#JPEG }</td> 2727 * <td style="text-align: left;">YUV_REPROCESSING</td> 2728 * </tr> 2729 * <tr> 2730 * <td style="text-align: left;">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 2731 * <td style="text-align: left;">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 2732 * <td style="text-align: left;">YUV_REPROCESSING</td> 2733 * </tr> 2734 * </tbody> 2735 * </table> 2736 * <p>PRIVATE refers to a device-internal format that is not directly application-visible. A 2737 * PRIVATE input surface can be acquired by {@link android.media.ImageReader#newInstance } 2738 * with {@link android.graphics.ImageFormat#PRIVATE } as the format.</p> 2739 * <p>For a PRIVATE_REPROCESSING-capable camera device, using the PRIVATE format as either input 2740 * 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> 2741 * <p>Attempting to configure an input stream with output streams not 2742 * listed as available in this map is not valid.</p> 2743 * <p>Additionally, if the camera device is MONOCHROME with Y8 support, it will also support 2744 * the following map of formats if its dependent capability 2745 * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}) is supported:</p> 2746 * <table> 2747 * <thead> 2748 * <tr> 2749 * <th style="text-align: left;">Input Format</th> 2750 * <th style="text-align: left;">Output Format</th> 2751 * <th style="text-align: left;">Capability</th> 2752 * </tr> 2753 * </thead> 2754 * <tbody> 2755 * <tr> 2756 * <td style="text-align: left;">{@link android.graphics.ImageFormat#PRIVATE }</td> 2757 * <td style="text-align: left;">{@link android.graphics.ImageFormat#Y8 }</td> 2758 * <td style="text-align: left;">PRIVATE_REPROCESSING</td> 2759 * </tr> 2760 * <tr> 2761 * <td style="text-align: left;">{@link android.graphics.ImageFormat#Y8 }</td> 2762 * <td style="text-align: left;">{@link android.graphics.ImageFormat#JPEG }</td> 2763 * <td style="text-align: left;">YUV_REPROCESSING</td> 2764 * </tr> 2765 * <tr> 2766 * <td style="text-align: left;">{@link android.graphics.ImageFormat#Y8 }</td> 2767 * <td style="text-align: left;">{@link android.graphics.ImageFormat#Y8 }</td> 2768 * <td style="text-align: left;">YUV_REPROCESSING</td> 2769 * </tr> 2770 * </tbody> 2771 * </table> 2772 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 2773 * 2774 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 2775 * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS 2776 * @hide 2777 */ 2778 public static final Key<android.hardware.camera2.params.ReprocessFormatsMap> SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP = 2779 new Key<android.hardware.camera2.params.ReprocessFormatsMap>("android.scaler.availableInputOutputFormatsMap", android.hardware.camera2.params.ReprocessFormatsMap.class); 2780 2781 /** 2782 * <p>The available stream configurations that this 2783 * camera device supports 2784 * (i.e. format, width, height, output/input stream).</p> 2785 * <p>The configurations are listed as <code>(format, width, height, input?)</code> 2786 * tuples.</p> 2787 * <p>For a given use case, the actual maximum supported resolution 2788 * may be lower than what is listed here, depending on the destination 2789 * Surface for the image data. For example, for recording video, 2790 * the video encoder chosen may have a maximum size limit (e.g. 1080p) 2791 * smaller than what the camera (e.g. maximum resolution is 3264x2448) 2792 * can provide.</p> 2793 * <p>Please reference the documentation for the image data destination to 2794 * check if it limits the maximum size for image data.</p> 2795 * <p>Not all output formats may be supported in a configuration with 2796 * an input stream of a particular format. For more details, see 2797 * android.scaler.availableInputOutputFormatsMap.</p> 2798 * <p>For applications targeting SDK version older than 31, the following table 2799 * describes the minimum required output stream configurations based on the hardware level 2800 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p> 2801 * <table> 2802 * <thead> 2803 * <tr> 2804 * <th style="text-align: center;">Format</th> 2805 * <th style="text-align: center;">Size</th> 2806 * <th style="text-align: center;">Hardware Level</th> 2807 * <th style="text-align: center;">Notes</th> 2808 * </tr> 2809 * </thead> 2810 * <tbody> 2811 * <tr> 2812 * <td style="text-align: center;">JPEG</td> 2813 * <td style="text-align: center;">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td> 2814 * <td style="text-align: center;">Any</td> 2815 * <td style="text-align: center;"></td> 2816 * </tr> 2817 * <tr> 2818 * <td style="text-align: center;">JPEG</td> 2819 * <td style="text-align: center;">1920x1080 (1080p)</td> 2820 * <td style="text-align: center;">Any</td> 2821 * <td style="text-align: center;">if 1080p <= activeArraySize</td> 2822 * </tr> 2823 * <tr> 2824 * <td style="text-align: center;">JPEG</td> 2825 * <td style="text-align: center;">1280x720 (720)</td> 2826 * <td style="text-align: center;">Any</td> 2827 * <td style="text-align: center;">if 720p <= activeArraySize</td> 2828 * </tr> 2829 * <tr> 2830 * <td style="text-align: center;">JPEG</td> 2831 * <td style="text-align: center;">640x480 (480p)</td> 2832 * <td style="text-align: center;">Any</td> 2833 * <td style="text-align: center;">if 480p <= activeArraySize</td> 2834 * </tr> 2835 * <tr> 2836 * <td style="text-align: center;">JPEG</td> 2837 * <td style="text-align: center;">320x240 (240p)</td> 2838 * <td style="text-align: center;">Any</td> 2839 * <td style="text-align: center;">if 240p <= activeArraySize</td> 2840 * </tr> 2841 * <tr> 2842 * <td style="text-align: center;">YUV_420_888</td> 2843 * <td style="text-align: center;">all output sizes available for JPEG</td> 2844 * <td style="text-align: center;">FULL</td> 2845 * <td style="text-align: center;"></td> 2846 * </tr> 2847 * <tr> 2848 * <td style="text-align: center;">YUV_420_888</td> 2849 * <td style="text-align: center;">all output sizes available for JPEG, up to the maximum video size</td> 2850 * <td style="text-align: center;">LIMITED</td> 2851 * <td style="text-align: center;"></td> 2852 * </tr> 2853 * <tr> 2854 * <td style="text-align: center;">IMPLEMENTATION_DEFINED</td> 2855 * <td style="text-align: center;">same as YUV_420_888</td> 2856 * <td style="text-align: center;">Any</td> 2857 * <td style="text-align: center;"></td> 2858 * </tr> 2859 * </tbody> 2860 * </table> 2861 * <p>For applications targeting SDK version 31 or newer, if the mobile device declares to be 2862 * media performance class 12 or higher by setting 2863 * {@link android.os.Build.VERSION#MEDIA_PERFORMANCE_CLASS } to be 31 or larger, 2864 * the primary camera devices (first rear/front camera in the camera ID list) will not 2865 * support JPEG sizes smaller than 1080p. If the application configures a JPEG stream 2866 * smaller than 1080p, the camera device will round up the JPEG image size to at least 2867 * 1080p. The requirements for IMPLEMENTATION_DEFINED and YUV_420_888 stay the same. 2868 * This new minimum required output stream configurations are illustrated by the table below:</p> 2869 * <table> 2870 * <thead> 2871 * <tr> 2872 * <th style="text-align: center;">Format</th> 2873 * <th style="text-align: center;">Size</th> 2874 * <th style="text-align: center;">Hardware Level</th> 2875 * <th style="text-align: center;">Notes</th> 2876 * </tr> 2877 * </thead> 2878 * <tbody> 2879 * <tr> 2880 * <td style="text-align: center;">JPEG</td> 2881 * <td style="text-align: center;">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td> 2882 * <td style="text-align: center;">Any</td> 2883 * <td style="text-align: center;"></td> 2884 * </tr> 2885 * <tr> 2886 * <td style="text-align: center;">JPEG</td> 2887 * <td style="text-align: center;">1920x1080 (1080p)</td> 2888 * <td style="text-align: center;">Any</td> 2889 * <td style="text-align: center;">if 1080p <= activeArraySize</td> 2890 * </tr> 2891 * <tr> 2892 * <td style="text-align: center;">YUV_420_888</td> 2893 * <td style="text-align: center;">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td> 2894 * <td style="text-align: center;">FULL</td> 2895 * <td style="text-align: center;"></td> 2896 * </tr> 2897 * <tr> 2898 * <td style="text-align: center;">YUV_420_888</td> 2899 * <td style="text-align: center;">1920x1080 (1080p)</td> 2900 * <td style="text-align: center;">FULL</td> 2901 * <td style="text-align: center;">if 1080p <= activeArraySize</td> 2902 * </tr> 2903 * <tr> 2904 * <td style="text-align: center;">YUV_420_888</td> 2905 * <td style="text-align: center;">1280x720 (720)</td> 2906 * <td style="text-align: center;">FULL</td> 2907 * <td style="text-align: center;">if 720p <= activeArraySize</td> 2908 * </tr> 2909 * <tr> 2910 * <td style="text-align: center;">YUV_420_888</td> 2911 * <td style="text-align: center;">640x480 (480p)</td> 2912 * <td style="text-align: center;">FULL</td> 2913 * <td style="text-align: center;">if 480p <= activeArraySize</td> 2914 * </tr> 2915 * <tr> 2916 * <td style="text-align: center;">YUV_420_888</td> 2917 * <td style="text-align: center;">320x240 (240p)</td> 2918 * <td style="text-align: center;">FULL</td> 2919 * <td style="text-align: center;">if 240p <= activeArraySize</td> 2920 * </tr> 2921 * <tr> 2922 * <td style="text-align: center;">YUV_420_888</td> 2923 * <td style="text-align: center;">all output sizes available for FULL hardware level, up to the maximum video size</td> 2924 * <td style="text-align: center;">LIMITED</td> 2925 * <td style="text-align: center;"></td> 2926 * </tr> 2927 * <tr> 2928 * <td style="text-align: center;">IMPLEMENTATION_DEFINED</td> 2929 * <td style="text-align: center;">same as YUV_420_888</td> 2930 * <td style="text-align: center;">Any</td> 2931 * <td style="text-align: center;"></td> 2932 * </tr> 2933 * </tbody> 2934 * </table> 2935 * <p>For applications targeting SDK version 31 or newer, if the mobile device doesn't declare 2936 * to be media performance class 12 or better by setting 2937 * {@link android.os.Build.VERSION#MEDIA_PERFORMANCE_CLASS } to be 31 or larger, 2938 * or if the camera device isn't a primary rear/front camera, the minimum required output 2939 * stream configurations are the same as for applications targeting SDK version older than 2940 * 31.</p> 2941 * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional 2942 * mandatory stream configurations on a per-capability basis.</p> 2943 * <p>Exception on 176x144 (QCIF) resolution: camera devices usually have a fixed capability for 2944 * downscaling from larger resolution to smaller, and the QCIF resolution sometimes is not 2945 * fully supported due to this limitation on devices with high-resolution image sensors. 2946 * Therefore, trying to configure a QCIF resolution stream together with any other 2947 * stream larger than 1920x1080 resolution (either width or height) might not be supported, 2948 * and capture session creation will fail if it is not.</p> 2949 * <p>This key is available on all devices.</p> 2950 * 2951 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2952 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 2953 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 2954 * @hide 2955 */ 2956 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> SCALER_AVAILABLE_STREAM_CONFIGURATIONS = 2957 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.scaler.availableStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class); 2958 2959 /** 2960 * <p>This lists the minimum frame duration for each 2961 * format/size combination.</p> 2962 * <p>This should correspond to the frame duration when only that 2963 * stream is active, with all processing (typically in android.*.mode) 2964 * set to either OFF or FAST.</p> 2965 * <p>When multiple streams are used in a request, the minimum frame 2966 * duration will be max(individual stream min durations).</p> 2967 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and 2968 * android.scaler.availableStallDurations for more details about 2969 * calculating the max frame rate.</p> 2970 * <p><b>Units</b>: (format, width, height, ns) x n</p> 2971 * <p>This key is available on all devices.</p> 2972 * 2973 * @see CaptureRequest#SENSOR_FRAME_DURATION 2974 * @hide 2975 */ 2976 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_MIN_FRAME_DURATIONS = 2977 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); 2978 2979 /** 2980 * <p>This lists the maximum stall duration for each 2981 * output format/size combination.</p> 2982 * <p>A stall duration is how much extra time would get added 2983 * to the normal minimum frame duration for a repeating request 2984 * that has streams with non-zero stall.</p> 2985 * <p>For example, consider JPEG captures which have the following 2986 * characteristics:</p> 2987 * <ul> 2988 * <li>JPEG streams act like processed YUV streams in requests for which 2989 * they are not included; in requests in which they are directly 2990 * referenced, they act as JPEG streams. This is because supporting a 2991 * JPEG stream requires the underlying YUV data to always be ready for 2992 * use by a JPEG encoder, but the encoder will only be used (and impact 2993 * frame duration) on requests that actually reference a JPEG stream.</li> 2994 * <li>The JPEG processor can run concurrently to the rest of the camera 2995 * pipeline, but cannot process more than 1 capture at a time.</li> 2996 * </ul> 2997 * <p>In other words, using a repeating YUV request would result 2998 * in a steady frame rate (let's say it's 30 FPS). If a single 2999 * JPEG request is submitted periodically, the frame rate will stay 3000 * at 30 FPS (as long as we wait for the previous JPEG to return each 3001 * time). If we try to submit a repeating YUV + JPEG request, then 3002 * the frame rate will drop from 30 FPS.</p> 3003 * <p>In general, submitting a new request with a non-0 stall time 3004 * stream will <em>not</em> cause a frame rate drop unless there are still 3005 * outstanding buffers for that stream from previous requests.</p> 3006 * <p>Submitting a repeating request with streams (call this <code>S</code>) 3007 * is the same as setting the minimum frame duration from 3008 * the normal minimum frame duration corresponding to <code>S</code>, added with 3009 * the maximum stall duration for <code>S</code>.</p> 3010 * <p>If interleaving requests with and without a stall duration, 3011 * a request will stall by the maximum of the remaining times 3012 * for each can-stall stream with outstanding buffers.</p> 3013 * <p>This means that a stalling request will not have an exposure start 3014 * until the stall has completed.</p> 3015 * <p>This should correspond to the stall duration when only that stream is 3016 * active, with all processing (typically in android.*.mode) set to FAST 3017 * or OFF. Setting any of the processing modes to HIGH_QUALITY 3018 * effectively results in an indeterminate stall duration for all 3019 * streams in a request (the regular stall calculation rules are 3020 * ignored).</p> 3021 * <p>The following formats may always have a stall duration:</p> 3022 * <ul> 3023 * <li>{@link android.graphics.ImageFormat#JPEG }</li> 3024 * <li>{@link android.graphics.ImageFormat#RAW_SENSOR }</li> 3025 * </ul> 3026 * <p>The following formats will never have a stall duration:</p> 3027 * <ul> 3028 * <li>{@link android.graphics.ImageFormat#YUV_420_888 }</li> 3029 * <li>{@link android.graphics.ImageFormat#RAW10 }</li> 3030 * <li>{@link android.graphics.ImageFormat#RAW12 }</li> 3031 * <li>{@link android.graphics.ImageFormat#Y8 }</li> 3032 * </ul> 3033 * <p>All other formats may or may not have an allowed stall duration on 3034 * a per-capability basis; refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} 3035 * for more details.</p> 3036 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} for more information about 3037 * calculating the max frame rate (absent stalls).</p> 3038 * <p><b>Units</b>: (format, width, height, ns) x n</p> 3039 * <p>This key is available on all devices.</p> 3040 * 3041 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 3042 * @see CaptureRequest#SENSOR_FRAME_DURATION 3043 * @hide 3044 */ 3045 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_STALL_DURATIONS = 3046 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); 3047 3048 /** 3049 * <p>The available stream configurations that this 3050 * camera device supports; also includes the minimum frame durations 3051 * and the stall durations for each format/size combination.</p> 3052 * <p>All camera devices will support sensor maximum resolution (defined by 3053 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) for the JPEG format.</p> 3054 * <p>For a given use case, the actual maximum supported resolution 3055 * may be lower than what is listed here, depending on the destination 3056 * Surface for the image data. For example, for recording video, 3057 * the video encoder chosen may have a maximum size limit (e.g. 1080p) 3058 * smaller than what the camera (e.g. maximum resolution is 3264x2448) 3059 * can provide.</p> 3060 * <p>Please reference the documentation for the image data destination to 3061 * check if it limits the maximum size for image data.</p> 3062 * <p>For applications targeting SDK version older than 31, the following table 3063 * describes the minimum required output stream configurations based on the 3064 * hardware level ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p> 3065 * <table> 3066 * <thead> 3067 * <tr> 3068 * <th style="text-align: center;">Format</th> 3069 * <th style="text-align: center;">Size</th> 3070 * <th style="text-align: center;">Hardware Level</th> 3071 * <th style="text-align: center;">Notes</th> 3072 * </tr> 3073 * </thead> 3074 * <tbody> 3075 * <tr> 3076 * <td style="text-align: center;">{@link android.graphics.ImageFormat#JPEG }</td> 3077 * <td style="text-align: center;">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} (*1)</td> 3078 * <td style="text-align: center;">Any</td> 3079 * <td style="text-align: center;"></td> 3080 * </tr> 3081 * <tr> 3082 * <td style="text-align: center;">{@link android.graphics.ImageFormat#JPEG }</td> 3083 * <td style="text-align: center;">1920x1080 (1080p)</td> 3084 * <td style="text-align: center;">Any</td> 3085 * <td style="text-align: center;">if 1080p <= activeArraySize</td> 3086 * </tr> 3087 * <tr> 3088 * <td style="text-align: center;">{@link android.graphics.ImageFormat#JPEG }</td> 3089 * <td style="text-align: center;">1280x720 (720p)</td> 3090 * <td style="text-align: center;">Any</td> 3091 * <td style="text-align: center;">if 720p <= activeArraySize</td> 3092 * </tr> 3093 * <tr> 3094 * <td style="text-align: center;">{@link android.graphics.ImageFormat#JPEG }</td> 3095 * <td style="text-align: center;">640x480 (480p)</td> 3096 * <td style="text-align: center;">Any</td> 3097 * <td style="text-align: center;">if 480p <= activeArraySize</td> 3098 * </tr> 3099 * <tr> 3100 * <td style="text-align: center;">{@link android.graphics.ImageFormat#JPEG }</td> 3101 * <td style="text-align: center;">320x240 (240p)</td> 3102 * <td style="text-align: center;">Any</td> 3103 * <td style="text-align: center;">if 240p <= activeArraySize</td> 3104 * </tr> 3105 * <tr> 3106 * <td style="text-align: center;">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 3107 * <td style="text-align: center;">all output sizes available for JPEG</td> 3108 * <td style="text-align: center;">FULL</td> 3109 * <td style="text-align: center;"></td> 3110 * </tr> 3111 * <tr> 3112 * <td style="text-align: center;">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 3113 * <td style="text-align: center;">all output sizes available for JPEG, up to the maximum video size</td> 3114 * <td style="text-align: center;">LIMITED</td> 3115 * <td style="text-align: center;"></td> 3116 * </tr> 3117 * <tr> 3118 * <td style="text-align: center;">{@link android.graphics.ImageFormat#PRIVATE }</td> 3119 * <td style="text-align: center;">same as YUV_420_888</td> 3120 * <td style="text-align: center;">Any</td> 3121 * <td style="text-align: center;"></td> 3122 * </tr> 3123 * </tbody> 3124 * </table> 3125 * <p>For applications targeting SDK version 31 or newer, if the mobile device declares to be 3126 * media performance class 12 or higher by setting 3127 * {@link android.os.Build.VERSION#MEDIA_PERFORMANCE_CLASS } to be 31 or larger, 3128 * the primary camera devices (first rear/front camera in the camera ID list) will not 3129 * support JPEG sizes smaller than 1080p. If the application configures a JPEG stream 3130 * smaller than 1080p, the camera device will round up the JPEG image size to at least 3131 * 1080p. The requirements for IMPLEMENTATION_DEFINED and YUV_420_888 stay the same. 3132 * This new minimum required output stream configurations are illustrated by the table below:</p> 3133 * <table> 3134 * <thead> 3135 * <tr> 3136 * <th style="text-align: center;">Format</th> 3137 * <th style="text-align: center;">Size</th> 3138 * <th style="text-align: center;">Hardware Level</th> 3139 * <th style="text-align: center;">Notes</th> 3140 * </tr> 3141 * </thead> 3142 * <tbody> 3143 * <tr> 3144 * <td style="text-align: center;">{@link android.graphics.ImageFormat#JPEG }</td> 3145 * <td style="text-align: center;">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} (*1)</td> 3146 * <td style="text-align: center;">Any</td> 3147 * <td style="text-align: center;"></td> 3148 * </tr> 3149 * <tr> 3150 * <td style="text-align: center;">{@link android.graphics.ImageFormat#JPEG }</td> 3151 * <td style="text-align: center;">1920x1080 (1080p)</td> 3152 * <td style="text-align: center;">Any</td> 3153 * <td style="text-align: center;">if 1080p <= activeArraySize</td> 3154 * </tr> 3155 * <tr> 3156 * <td style="text-align: center;">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 3157 * <td style="text-align: center;">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td> 3158 * <td style="text-align: center;">FULL</td> 3159 * <td style="text-align: center;"></td> 3160 * </tr> 3161 * <tr> 3162 * <td style="text-align: center;">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 3163 * <td style="text-align: center;">1920x1080 (1080p)</td> 3164 * <td style="text-align: center;">FULL</td> 3165 * <td style="text-align: center;">if 1080p <= activeArraySize</td> 3166 * </tr> 3167 * <tr> 3168 * <td style="text-align: center;">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 3169 * <td style="text-align: center;">1280x720 (720)</td> 3170 * <td style="text-align: center;">FULL</td> 3171 * <td style="text-align: center;">if 720p <= activeArraySize</td> 3172 * </tr> 3173 * <tr> 3174 * <td style="text-align: center;">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 3175 * <td style="text-align: center;">640x480 (480p)</td> 3176 * <td style="text-align: center;">FULL</td> 3177 * <td style="text-align: center;">if 480p <= activeArraySize</td> 3178 * </tr> 3179 * <tr> 3180 * <td style="text-align: center;">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 3181 * <td style="text-align: center;">320x240 (240p)</td> 3182 * <td style="text-align: center;">FULL</td> 3183 * <td style="text-align: center;">if 240p <= activeArraySize</td> 3184 * </tr> 3185 * <tr> 3186 * <td style="text-align: center;">{@link android.graphics.ImageFormat#YUV_420_888 }</td> 3187 * <td style="text-align: center;">all output sizes available for FULL hardware level, up to the maximum video size</td> 3188 * <td style="text-align: center;">LIMITED</td> 3189 * <td style="text-align: center;"></td> 3190 * </tr> 3191 * <tr> 3192 * <td style="text-align: center;">{@link android.graphics.ImageFormat#PRIVATE }</td> 3193 * <td style="text-align: center;">same as YUV_420_888</td> 3194 * <td style="text-align: center;">Any</td> 3195 * <td style="text-align: center;"></td> 3196 * </tr> 3197 * </tbody> 3198 * </table> 3199 * <p>For applications targeting SDK version 31 or newer, if the mobile device doesn't declare 3200 * to be media performance class 12 or better by setting 3201 * {@link android.os.Build.VERSION#MEDIA_PERFORMANCE_CLASS } to be 31 or larger, 3202 * or if the camera device isn't a primary rear/front camera, the minimum required output 3203 * stream configurations are the same as for applications targeting SDK version older than 3204 * 31.</p> 3205 * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} and 3206 * {@link android.hardware.camera2.CameraDevice#legacy-level-guaranteed-configurations } 3207 * for additional mandatory stream configurations on a per-capability basis.</p> 3208 * <p>*1: For JPEG format, the sizes may be restricted by below conditions:</p> 3209 * <ul> 3210 * <li>The HAL may choose the aspect ratio of each Jpeg size to be one of well known ones 3211 * (e.g. 4:3, 16:9, 3:2 etc.). If the sensor maximum resolution 3212 * (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) has an aspect ratio other than these, 3213 * it does not have to be included in the supported JPEG sizes.</li> 3214 * <li>Some hardware JPEG encoders may have pixel boundary alignment requirements, such as 3215 * the dimensions being a multiple of 16. 3216 * Therefore, the maximum JPEG size may be smaller than sensor maximum resolution. 3217 * However, the largest JPEG size will be as close as possible to the sensor maximum 3218 * resolution given above constraints. It is required that after aspect ratio adjustments, 3219 * additional size reduction due to other issues must be less than 3% in area. For example, 3220 * if the sensor maximum resolution is 3280x2464, if the maximum JPEG size has aspect 3221 * ratio 4:3, and the JPEG encoder alignment requirement is 16, the maximum JPEG size will be 3222 * 3264x2448.</li> 3223 * </ul> 3224 * <p>Exception on 176x144 (QCIF) resolution: camera devices usually have a fixed capability on 3225 * downscaling from larger resolution to smaller ones, and the QCIF resolution can sometimes 3226 * not be fully supported due to this limitation on devices with high-resolution image 3227 * sensors. Therefore, trying to configure a QCIF resolution stream together with any other 3228 * stream larger than 1920x1080 resolution (either width or height) might not be supported, 3229 * and capture session creation will fail if it is not.</p> 3230 * <p>This key is available on all devices.</p> 3231 * 3232 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 3233 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 3234 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 3235 */ 3236 @PublicKey 3237 @NonNull 3238 @SyntheticKey 3239 public static final Key<android.hardware.camera2.params.StreamConfigurationMap> SCALER_STREAM_CONFIGURATION_MAP = 3240 new Key<android.hardware.camera2.params.StreamConfigurationMap>("android.scaler.streamConfigurationMap", android.hardware.camera2.params.StreamConfigurationMap.class); 3241 3242 /** 3243 * <p>The crop type that this camera device supports.</p> 3244 * <p>When passing a non-centered crop region ({@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}) to a camera 3245 * device that only supports CENTER_ONLY cropping, the camera device will move the 3246 * crop region to the center of the sensor active array ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) 3247 * and keep the crop region width and height unchanged. The camera device will return the 3248 * final used crop region in metadata result {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p> 3249 * <p>Camera devices that support FREEFORM cropping will support any crop region that 3250 * is inside of the active array. The camera device will apply the same crop region and 3251 * return the final used crop region in capture result metadata {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p> 3252 * <p>Starting from API level 30,</p> 3253 * <ul> 3254 * <li>If the camera device supports FREEFORM cropping, in order to do FREEFORM cropping, the 3255 * application must set {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} to 1.0, and use {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} 3256 * for zoom.</li> 3257 * <li>To do CENTER_ONLY zoom, the application has below 2 options:<ol> 3258 * <li>Set {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} to 1.0; adjust zoom by {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</li> 3259 * <li>Adjust zoom by {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio}; use {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to crop 3260 * the field of view vertically (letterboxing) or horizontally (pillarboxing), but not 3261 * windowboxing.</li> 3262 * </ol> 3263 * </li> 3264 * <li>Setting {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} to values different than 1.0 and 3265 * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to be windowboxing at the same time are not supported. In this 3266 * case, the camera framework will override the {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to be the active 3267 * array.</li> 3268 * </ul> 3269 * <p>LEGACY capability devices will only support CENTER_ONLY cropping.</p> 3270 * <p><b>Possible values:</b></p> 3271 * <ul> 3272 * <li>{@link #SCALER_CROPPING_TYPE_CENTER_ONLY CENTER_ONLY}</li> 3273 * <li>{@link #SCALER_CROPPING_TYPE_FREEFORM FREEFORM}</li> 3274 * </ul> 3275 * 3276 * <p>This key is available on all devices.</p> 3277 * 3278 * @see CaptureRequest#CONTROL_ZOOM_RATIO 3279 * @see CaptureRequest#SCALER_CROP_REGION 3280 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 3281 * @see #SCALER_CROPPING_TYPE_CENTER_ONLY 3282 * @see #SCALER_CROPPING_TYPE_FREEFORM 3283 */ 3284 @PublicKey 3285 @NonNull 3286 public static final Key<Integer> SCALER_CROPPING_TYPE = 3287 new Key<Integer>("android.scaler.croppingType", int.class); 3288 3289 /** 3290 * <p>Recommended stream configurations for common client use cases.</p> 3291 * <p>Optional subset of the android.scaler.availableStreamConfigurations that contains 3292 * similar tuples listed as 3293 * (i.e. width, height, format, output/input stream, usecase bit field). 3294 * Camera devices will be able to suggest particular stream configurations which are 3295 * power and performance efficient for specific use cases. For more information about 3296 * retrieving the suggestions see 3297 * {@link android.hardware.camera2.CameraCharacteristics#getRecommendedStreamConfigurationMap }.</p> 3298 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3299 * @hide 3300 */ 3301 public static final Key<android.hardware.camera2.params.RecommendedStreamConfiguration[]> SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS = 3302 new Key<android.hardware.camera2.params.RecommendedStreamConfiguration[]>("android.scaler.availableRecommendedStreamConfigurations", android.hardware.camera2.params.RecommendedStreamConfiguration[].class); 3303 3304 /** 3305 * <p>Recommended mappings of image formats that are supported by this 3306 * camera device for input streams, to their corresponding output formats.</p> 3307 * <p>This is a recommended subset of the complete list of mappings found in 3308 * android.scaler.availableInputOutputFormatsMap. The same requirements apply here as well. 3309 * The list however doesn't need to contain all available and supported mappings. Instead of 3310 * this developers must list only recommended and efficient entries. 3311 * If set, the information will be available in the ZERO_SHUTTER_LAG recommended stream 3312 * configuration see 3313 * {@link android.hardware.camera2.CameraCharacteristics#getRecommendedStreamConfigurationMap }.</p> 3314 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3315 * @hide 3316 */ 3317 public static final Key<android.hardware.camera2.params.ReprocessFormatsMap> SCALER_AVAILABLE_RECOMMENDED_INPUT_OUTPUT_FORMATS_MAP = 3318 new Key<android.hardware.camera2.params.ReprocessFormatsMap>("android.scaler.availableRecommendedInputOutputFormatsMap", android.hardware.camera2.params.ReprocessFormatsMap.class); 3319 3320 /** 3321 * <p>An array of mandatory stream combinations generated according to the camera device 3322 * {@link android.hardware.camera2.CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL } 3323 * and {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES }. 3324 * This is an app-readable conversion of the mandatory stream combination 3325 * {@link android.hardware.camera2.CameraDevice#legacy-level-guaranteed-configurations tables}.</p> 3326 * <p>The array of 3327 * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is 3328 * generated according to the documented 3329 * {@link android.hardware.camera2.CameraDevice#legacy-level-guaranteed-configurations guideline} based on specific device level and capabilities. 3330 * Clients can use the array as a quick reference to find an appropriate camera stream 3331 * combination. 3332 * As per documentation, the stream combinations with given PREVIEW, RECORD and 3333 * MAXIMUM resolutions and anything smaller from the list given by 3334 * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } are 3335 * guaranteed to work. 3336 * For a physical camera not independently exposed in 3337 * {@link android.hardware.camera2.CameraManager#getCameraIdList }, the mandatory stream 3338 * combinations for that physical camera Id are also generated, so that the application can 3339 * configure them as physical streams via the logical camera. 3340 * The mandatory stream combination array will be {@code null} in case the device is not 3341 * backward compatible.</p> 3342 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3343 * <p><b>Limited capability</b> - 3344 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 3345 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 3346 * 3347 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 3348 */ 3349 @PublicKey 3350 @NonNull 3351 @SyntheticKey 3352 public static final Key<android.hardware.camera2.params.MandatoryStreamCombination[]> SCALER_MANDATORY_STREAM_COMBINATIONS = 3353 new Key<android.hardware.camera2.params.MandatoryStreamCombination[]>("android.scaler.mandatoryStreamCombinations", android.hardware.camera2.params.MandatoryStreamCombination[].class); 3354 3355 /** 3356 * <p>An array of mandatory concurrent stream combinations. 3357 * This is an app-readable conversion of the concurrent mandatory stream combination 3358 * {@link android.hardware.camera2.CameraDevice#concurrent-stream-guaranteed-configurations tables}.</p> 3359 * <p>The array of 3360 * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is 3361 * generated according to the documented 3362 * {@link android.hardware.camera2.CameraDevice#concurrent-stream-guaranteed-configurations guideline} for each device which has its Id present in the set returned by 3363 * {@link android.hardware.camera2.CameraManager#getConcurrentCameraIds }. 3364 * Clients can use the array as a quick reference to find an appropriate camera stream 3365 * combination. 3366 * The mandatory stream combination array will be {@code null} in case the device is not a 3367 * part of at least one set of combinations returned by 3368 * {@link android.hardware.camera2.CameraManager#getConcurrentCameraIds }.</p> 3369 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3370 */ 3371 @PublicKey 3372 @NonNull 3373 @SyntheticKey 3374 public static final Key<android.hardware.camera2.params.MandatoryStreamCombination[]> SCALER_MANDATORY_CONCURRENT_STREAM_COMBINATIONS = 3375 new Key<android.hardware.camera2.params.MandatoryStreamCombination[]>("android.scaler.mandatoryConcurrentStreamCombinations", android.hardware.camera2.params.MandatoryStreamCombination[].class); 3376 3377 /** 3378 * <p>List of rotate-and-crop modes for {@link CaptureRequest#SCALER_ROTATE_AND_CROP android.scaler.rotateAndCrop} that are supported by this camera device.</p> 3379 * <p>This entry lists the valid modes for {@link CaptureRequest#SCALER_ROTATE_AND_CROP android.scaler.rotateAndCrop} for this camera device.</p> 3380 * <p>Starting with API level 30, all devices will list at least <code>ROTATE_AND_CROP_NONE</code>. 3381 * Devices with support for rotate-and-crop will additionally list at least 3382 * <code>ROTATE_AND_CROP_AUTO</code> and <code>ROTATE_AND_CROP_90</code>.</p> 3383 * <p><b>Range of valid values:</b><br> 3384 * Any value listed in {@link CaptureRequest#SCALER_ROTATE_AND_CROP android.scaler.rotateAndCrop}</p> 3385 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3386 * 3387 * @see CaptureRequest#SCALER_ROTATE_AND_CROP 3388 */ 3389 @PublicKey 3390 @NonNull 3391 public static final Key<int[]> SCALER_AVAILABLE_ROTATE_AND_CROP_MODES = 3392 new Key<int[]>("android.scaler.availableRotateAndCropModes", int[].class); 3393 3394 /** 3395 * <p>Default YUV/PRIVATE size to use for requesting secure image buffers.</p> 3396 * <p>This entry lists the default size supported in the secure camera mode. This entry is 3397 * optional on devices support the SECURE_IMAGE_DATA capability. This entry will be null 3398 * if the camera device does not list SECURE_IMAGE_DATA capability.</p> 3399 * <p>When the key is present, only a PRIVATE/YUV output of the specified size is guaranteed 3400 * to be supported by the camera HAL in the secure camera mode. Any other format or 3401 * resolutions might not be supported. Use 3402 * {@link CameraDevice#isSessionConfigurationSupported } 3403 * API to query if a secure session configuration is supported if the device supports this 3404 * API.</p> 3405 * <p>If this key returns null on a device with SECURE_IMAGE_DATA capability, the application 3406 * can assume all output sizes listed in the 3407 * {@link android.hardware.camera2.params.StreamConfigurationMap } 3408 * are supported.</p> 3409 * <p><b>Units</b>: Pixels</p> 3410 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3411 */ 3412 @PublicKey 3413 @NonNull 3414 public static final Key<android.util.Size> SCALER_DEFAULT_SECURE_IMAGE_SIZE = 3415 new Key<android.util.Size>("android.scaler.defaultSecureImageSize", android.util.Size.class); 3416 3417 /** 3418 * <p>The available multi-resolution stream configurations that this 3419 * physical camera device supports 3420 * (i.e. format, width, height, output/input stream).</p> 3421 * <p>This list contains a subset of the parent logical camera's multi-resolution stream 3422 * configurations which belong to this physical camera, and it will advertise and will only 3423 * advertise the maximum supported resolutions for a particular format.</p> 3424 * <p>If this camera device isn't a physical camera device constituting a logical camera, 3425 * but a standalone {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR } 3426 * camera, this field represents the multi-resolution input/output stream configurations of 3427 * default mode and max resolution modes. The sizes will be the maximum resolution of a 3428 * particular format for default mode and max resolution mode.</p> 3429 * <p>This field will only be advertised if the device is a physical camera of a 3430 * logical multi-camera device or an ultra high resolution sensor camera. For a logical 3431 * multi-camera, the camera API will derive the logical camera’s multi-resolution stream 3432 * configurations from all physical cameras. For an ultra high resolution sensor camera, this 3433 * is used directly as the camera’s multi-resolution stream configurations.</p> 3434 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3435 * <p><b>Limited capability</b> - 3436 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 3437 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 3438 * 3439 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 3440 * @hide 3441 */ 3442 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS = 3443 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.scaler.physicalCameraMultiResolutionStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class); 3444 3445 /** 3446 * <p>The multi-resolution stream configurations supported by this logical camera 3447 * or ultra high resolution sensor camera device.</p> 3448 * <p>Multi-resolution streams can be used by a LOGICAL_MULTI_CAMERA or an 3449 * ULTRA_HIGH_RESOLUTION_SENSOR camera where the images sent or received can vary in 3450 * resolution per frame. This is useful in cases where the camera device's effective full 3451 * resolution changes depending on factors such as the current zoom level, lighting 3452 * condition, focus distance, or pixel mode.</p> 3453 * <ul> 3454 * <li>For a logical multi-camera implementing optical zoom, at different zoom level, a 3455 * different physical camera may be active, resulting in different full-resolution image 3456 * sizes.</li> 3457 * <li>For an ultra high resolution camera, depending on whether the camera operates in default 3458 * mode, or maximum resolution mode, the output full-size images may be of either binned 3459 * resolution or maximum resolution.</li> 3460 * </ul> 3461 * <p>To use multi-resolution output streams, the supported formats can be queried by {@link android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getOutputFormats }. 3462 * A {@link android.hardware.camera2.MultiResolutionImageReader } can then be created for a 3463 * supported format with the MultiResolutionStreamInfo group queried by {@link android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getOutputInfo }.</p> 3464 * <p>If a camera device supports multi-resolution output streams for a particular format, for 3465 * each of its mandatory stream combinations, the camera device will support using a 3466 * MultiResolutionImageReader for the MAXIMUM stream of supported formats. Refer to 3467 * {@link android.hardware.camera2.CameraDevice#legacy-level-additional-guaranteed-combinations-with-multiresolutionoutputs } 3468 * for additional details.</p> 3469 * <p>To use multi-resolution input streams, the supported formats can be queried by {@link android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getInputFormats }. 3470 * A reprocessable CameraCaptureSession can then be created using an {@link android.hardware.camera2.params.InputConfiguration InputConfiguration} constructed with 3471 * the input MultiResolutionStreamInfo group, queried by {@link android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getInputInfo }.</p> 3472 * <p>If a camera device supports multi-resolution {@code YUV} input and multi-resolution 3473 * {@code YUV} output, or multi-resolution {@code PRIVATE} input and multi-resolution 3474 * {@code PRIVATE} output, {@code JPEG} and {@code YUV} are guaranteed to be supported 3475 * multi-resolution output stream formats. Refer to 3476 * {@link android.hardware.camera2.CameraDevice#legacy-level-additional-guaranteed-combinations-with-multiresolutionoutputs }} 3477 * for details about the additional mandatory stream combinations in this case.</p> 3478 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3479 */ 3480 @PublicKey 3481 @NonNull 3482 @SyntheticKey 3483 public static final Key<android.hardware.camera2.params.MultiResolutionStreamConfigurationMap> SCALER_MULTI_RESOLUTION_STREAM_CONFIGURATION_MAP = 3484 new Key<android.hardware.camera2.params.MultiResolutionStreamConfigurationMap>("android.scaler.multiResolutionStreamConfigurationMap", android.hardware.camera2.params.MultiResolutionStreamConfigurationMap.class); 3485 3486 /** 3487 * <p>The available stream configurations that this 3488 * camera device supports (i.e. format, width, height, output/input stream) for a 3489 * CaptureRequest with {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} set to 3490 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 3491 * <p>Analogous to android.scaler.availableStreamConfigurations, for configurations 3492 * which are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 3493 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 3494 * <p>Not all output formats may be supported in a configuration with 3495 * an input stream of a particular format. For more details, see 3496 * android.scaler.availableInputOutputFormatsMapMaximumResolution.</p> 3497 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3498 * 3499 * @see CaptureRequest#SENSOR_PIXEL_MODE 3500 * @hide 3501 */ 3502 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION = 3503 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.scaler.availableStreamConfigurationsMaximumResolution", android.hardware.camera2.params.StreamConfiguration[].class); 3504 3505 /** 3506 * <p>This lists the minimum frame duration for each 3507 * format/size combination when the camera device is sent a CaptureRequest with 3508 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} set to 3509 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 3510 * <p>Analogous to android.scaler.availableMinFrameDurations, for configurations 3511 * which are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 3512 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 3513 * <p>When multiple streams are used in a request (if supported, when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} 3514 * is set to 3515 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }), the 3516 * minimum frame duration will be max(individual stream min durations).</p> 3517 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and 3518 * android.scaler.availableStallDurationsMaximumResolution for more details about 3519 * calculating the max frame rate.</p> 3520 * <p><b>Units</b>: (format, width, height, ns) x n</p> 3521 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3522 * 3523 * @see CaptureRequest#SENSOR_FRAME_DURATION 3524 * @see CaptureRequest#SENSOR_PIXEL_MODE 3525 * @hide 3526 */ 3527 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION = 3528 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableMinFrameDurationsMaximumResolution", android.hardware.camera2.params.StreamConfigurationDuration[].class); 3529 3530 /** 3531 * <p>This lists the maximum stall duration for each 3532 * output format/size combination when CaptureRequests are submitted with 3533 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} set to 3534 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }</p> 3535 * <p>Analogous to android.scaler.availableMinFrameDurations, for configurations 3536 * which are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 3537 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 3538 * <p><b>Units</b>: (format, width, height, ns) x n</p> 3539 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3540 * 3541 * @see CaptureRequest#SENSOR_PIXEL_MODE 3542 * @hide 3543 */ 3544 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION = 3545 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableStallDurationsMaximumResolution", android.hardware.camera2.params.StreamConfigurationDuration[].class); 3546 3547 /** 3548 * <p>The available stream configurations that this 3549 * camera device supports when given a CaptureRequest with {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} 3550 * set to 3551 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }; 3552 * also includes the minimum frame durations 3553 * and the stall durations for each format/size combination.</p> 3554 * <p>Analogous to {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} for CaptureRequests where 3555 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is 3556 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 3557 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3558 * 3559 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP 3560 * @see CaptureRequest#SENSOR_PIXEL_MODE 3561 */ 3562 @PublicKey 3563 @NonNull 3564 @SyntheticKey 3565 public static final Key<android.hardware.camera2.params.StreamConfigurationMap> SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION = 3566 new Key<android.hardware.camera2.params.StreamConfigurationMap>("android.scaler.streamConfigurationMapMaximumResolution", android.hardware.camera2.params.StreamConfigurationMap.class); 3567 3568 /** 3569 * <p>The mapping of image formats that are supported by this 3570 * camera device for input streams, to their corresponding output formats, when 3571 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 3572 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 3573 * <p>Analogous to android.scaler.availableInputOutputFormatsMap for CaptureRequests where 3574 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is 3575 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 3576 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3577 * 3578 * @see CaptureRequest#SENSOR_PIXEL_MODE 3579 * @hide 3580 */ 3581 public static final Key<android.hardware.camera2.params.ReprocessFormatsMap> SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP_MAXIMUM_RESOLUTION = 3582 new Key<android.hardware.camera2.params.ReprocessFormatsMap>("android.scaler.availableInputOutputFormatsMapMaximumResolution", android.hardware.camera2.params.ReprocessFormatsMap.class); 3583 3584 /** 3585 * <p>An array of mandatory stream combinations which are applicable when 3586 * {@link android.hardware.camera2.CaptureRequest } has {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} set 3587 * to {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }. 3588 * This is an app-readable conversion of the maximum resolution mandatory stream combination 3589 * {@link android.hardware.camera2.CameraDevice#additional-guaranteed-combinations-for-ultra-high-resolution-sensors tables}.</p> 3590 * <p>The array of 3591 * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is 3592 * generated according to the documented 3593 * {@link android.hardware.camera2.CameraDevice#additional-guaranteed-combinations-for-ultra-high-resolution-sensors guideline} for each device which has the 3594 * {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR } 3595 * capability. 3596 * Clients can use the array as a quick reference to find an appropriate camera stream 3597 * combination. 3598 * The mandatory stream combination array will be {@code null} in case the device is not an 3599 * {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR } 3600 * device.</p> 3601 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3602 * 3603 * @see CaptureRequest#SENSOR_PIXEL_MODE 3604 */ 3605 @PublicKey 3606 @NonNull 3607 @SyntheticKey 3608 public static final Key<android.hardware.camera2.params.MandatoryStreamCombination[]> SCALER_MANDATORY_MAXIMUM_RESOLUTION_STREAM_COMBINATIONS = 3609 new Key<android.hardware.camera2.params.MandatoryStreamCombination[]>("android.scaler.mandatoryMaximumResolutionStreamCombinations", android.hardware.camera2.params.MandatoryStreamCombination[].class); 3610 3611 /** 3612 * <p>An array of mandatory stream combinations which are applicable when device support the 3613 * 10-bit output capability 3614 * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT } 3615 * This is an app-readable conversion of the 10 bit output mandatory stream combination 3616 * {@link android.hardware.camera2.CameraDevice#10-bit-output-additional-guaranteed-configurations tables}.</p> 3617 * <p>The array of 3618 * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is 3619 * generated according to the documented 3620 * {@link android.hardware.camera2.CameraDevice#10-bit-output-additional-guaranteed-configurations guideline} for each device which has the 3621 * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT } 3622 * capability. 3623 * Clients can use the array as a quick reference to find an appropriate camera stream 3624 * combination. 3625 * The mandatory stream combination array will be {@code null} in case the device is not an 3626 * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT } 3627 * device.</p> 3628 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3629 */ 3630 @PublicKey 3631 @NonNull 3632 @SyntheticKey 3633 public static final Key<android.hardware.camera2.params.MandatoryStreamCombination[]> SCALER_MANDATORY_TEN_BIT_OUTPUT_STREAM_COMBINATIONS = 3634 new Key<android.hardware.camera2.params.MandatoryStreamCombination[]>("android.scaler.mandatoryTenBitOutputStreamCombinations", android.hardware.camera2.params.MandatoryStreamCombination[].class); 3635 3636 /** 3637 * <p>An array of mandatory stream combinations which are applicable when device lists 3638 * {@code PREVIEW_STABILIZATION} in {@link CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES android.control.availableVideoStabilizationModes}. 3639 * This is an app-readable conversion of the preview stabilization mandatory stream 3640 * combination 3641 * {@link android.hardware.camera2.CameraDevice#preview-stabilization-guaranteed-stream-configurations tables}.</p> 3642 * <p>The array of 3643 * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is 3644 * generated according to the documented 3645 * {@link android.hardware.camera2.CameraDevice#preview-stabilization-guaranteed-stream-configurations guideline} for each device which supports {@code PREVIEW_STABILIZATION} 3646 * Clients can use the array as a quick reference to find an appropriate camera stream 3647 * combination. 3648 * The mandatory stream combination array will be {@code null} in case the device does not 3649 * list {@code PREVIEW_STABILIZATION} in {@link CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES android.control.availableVideoStabilizationModes}.</p> 3650 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3651 * 3652 * @see CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES 3653 */ 3654 @PublicKey 3655 @NonNull 3656 @SyntheticKey 3657 public static final Key<android.hardware.camera2.params.MandatoryStreamCombination[]> SCALER_MANDATORY_PREVIEW_STABILIZATION_OUTPUT_STREAM_COMBINATIONS = 3658 new Key<android.hardware.camera2.params.MandatoryStreamCombination[]>("android.scaler.mandatoryPreviewStabilizationOutputStreamCombinations", android.hardware.camera2.params.MandatoryStreamCombination[].class); 3659 3660 /** 3661 * <p>Whether the camera device supports multi-resolution input or output streams</p> 3662 * <p>A logical multi-camera or an ultra high resolution camera may support multi-resolution 3663 * input or output streams. With multi-resolution output streams, the camera device is able 3664 * to output different resolution images depending on the current active physical camera or 3665 * pixel mode. With multi-resolution input streams, the camera device can reprocess images 3666 * of different resolutions from different physical cameras or sensor pixel modes.</p> 3667 * <p>When set to TRUE:</p> 3668 * <ul> 3669 * <li>For a logical multi-camera, the camera framework derives 3670 * {@link CameraCharacteristics#SCALER_MULTI_RESOLUTION_STREAM_CONFIGURATION_MAP android.scaler.multiResolutionStreamConfigurationMap} by combining the 3671 * android.scaler.physicalCameraMultiResolutionStreamConfigurations from its physical 3672 * cameras.</li> 3673 * <li>For an ultra-high resolution sensor camera, the camera framework directly copies 3674 * the value of android.scaler.physicalCameraMultiResolutionStreamConfigurations to 3675 * {@link CameraCharacteristics#SCALER_MULTI_RESOLUTION_STREAM_CONFIGURATION_MAP android.scaler.multiResolutionStreamConfigurationMap}.</li> 3676 * </ul> 3677 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3678 * <p><b>Limited capability</b> - 3679 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 3680 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 3681 * 3682 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 3683 * @see CameraCharacteristics#SCALER_MULTI_RESOLUTION_STREAM_CONFIGURATION_MAP 3684 * @hide 3685 */ 3686 public static final Key<Boolean> SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED = 3687 new Key<Boolean>("android.scaler.multiResolutionStreamSupported", boolean.class); 3688 3689 /** 3690 * <p>The stream use cases supported by this camera device.</p> 3691 * <p>The stream use case indicates the purpose of a particular camera stream from 3692 * the end-user perspective. Some examples of camera use cases are: preview stream for 3693 * live viewfinder shown to the user, still capture for generating high quality photo 3694 * capture, video record for encoding the camera output for the purpose of future playback, 3695 * and video call for live realtime video conferencing.</p> 3696 * <p>With this flag, the camera device can optimize the image processing pipeline 3697 * parameters, such as tuning, sensor mode, and ISP settings, independent of 3698 * the properties of the immediate camera output surface. For example, if the output 3699 * surface is a SurfaceTexture, the stream use case flag can be used to indicate whether 3700 * the camera frames eventually go to display, video encoder, 3701 * still image capture, or all of them combined.</p> 3702 * <p>The application sets the use case of a camera stream by calling 3703 * {@link android.hardware.camera2.params.OutputConfiguration#setStreamUseCase }.</p> 3704 * <p>A camera device with 3705 * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE } 3706 * capability must support the following stream use cases:</p> 3707 * <ul> 3708 * <li>DEFAULT</li> 3709 * <li>PREVIEW</li> 3710 * <li>STILL_CAPTURE</li> 3711 * <li>VIDEO_RECORD</li> 3712 * <li>PREVIEW_VIDEO_STILL</li> 3713 * <li>VIDEO_CALL</li> 3714 * </ul> 3715 * <p>The guaranteed stream combinations related to stream use case for a camera device with 3716 * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE } 3717 * capability is documented in the camera device 3718 * {@link android.hardware.camera2.CameraDevice#stream-use-case-capability-additional-guaranteed-configurations guideline}. The application is strongly recommended to use one of the guaranteed stream 3719 * combinations. 3720 * If the application creates a session with a stream combination not in the guaranteed 3721 * list, or with mixed DEFAULT and non-DEFAULT use cases within the same session, 3722 * the camera device may ignore some stream use cases due to hardware constraints 3723 * and implementation details.</p> 3724 * <p>For stream combinations not covered by the stream use case mandatory lists, such as 3725 * reprocessable session, constrained high speed session, or RAW stream combinations, the 3726 * application should leave stream use cases within the session as DEFAULT.</p> 3727 * <p><b>Possible values:</b></p> 3728 * <ul> 3729 * <li>{@link #SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT DEFAULT}</li> 3730 * <li>{@link #SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW PREVIEW}</li> 3731 * <li>{@link #SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE STILL_CAPTURE}</li> 3732 * <li>{@link #SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD VIDEO_RECORD}</li> 3733 * <li>{@link #SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW_VIDEO_STILL PREVIEW_VIDEO_STILL}</li> 3734 * <li>{@link #SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_CALL VIDEO_CALL}</li> 3735 * <li>{@link #SCALER_AVAILABLE_STREAM_USE_CASES_CROPPED_RAW CROPPED_RAW}</li> 3736 * </ul> 3737 * 3738 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3739 * @see #SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT 3740 * @see #SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW 3741 * @see #SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE 3742 * @see #SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD 3743 * @see #SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW_VIDEO_STILL 3744 * @see #SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_CALL 3745 * @see #SCALER_AVAILABLE_STREAM_USE_CASES_CROPPED_RAW 3746 */ 3747 @PublicKey 3748 @NonNull 3749 public static final Key<long[]> SCALER_AVAILABLE_STREAM_USE_CASES = 3750 new Key<long[]>("android.scaler.availableStreamUseCases", long[].class); 3751 3752 /** 3753 * <p>An array of mandatory stream combinations with stream use cases. 3754 * This is an app-readable conversion of the mandatory stream combination 3755 * {@link android.hardware.camera2.CameraDevice#stream-use-case-capability-additional-guaranteed-configurations tables} with each stream's use case being set.</p> 3756 * <p>The array of 3757 * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is 3758 * generated according to the documented 3759 * {@link android.hardware.camera2.CameraDevice#stream-use-case-capability-additional-guaranteed-configurations guideline} for a camera device with 3760 * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE } 3761 * capability. 3762 * The mandatory stream combination array will be {@code null} in case the device doesn't 3763 * have {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE } 3764 * capability.</p> 3765 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3766 */ 3767 @PublicKey 3768 @NonNull 3769 @SyntheticKey 3770 public static final Key<android.hardware.camera2.params.MandatoryStreamCombination[]> SCALER_MANDATORY_USE_CASE_STREAM_COMBINATIONS = 3771 new Key<android.hardware.camera2.params.MandatoryStreamCombination[]>("android.scaler.mandatoryUseCaseStreamCombinations", android.hardware.camera2.params.MandatoryStreamCombination[].class); 3772 3773 /** 3774 * <p>The area of the image sensor which corresponds to active pixels after any geometric 3775 * distortion correction has been applied.</p> 3776 * <p>This is the rectangle representing the size of the active region of the sensor (i.e. 3777 * the region that actually receives light from the scene) after any geometric correction 3778 * has been applied, and should be treated as the maximum size in pixels of any of the 3779 * image output formats aside from the raw formats.</p> 3780 * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of 3781 * the full pixel array, and the size of the full pixel array is given by 3782 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p> 3783 * <p>The coordinate system for most other keys that list pixel coordinates, including 3784 * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, is defined relative to the active array rectangle given in 3785 * this field, with <code>(0, 0)</code> being the top-left of this rectangle.</p> 3786 * <p>The active array may be smaller than the full pixel array, since the full array may 3787 * include black calibration pixels or other inactive regions.</p> 3788 * <p>For devices that do not support {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the active 3789 * array must be the same as {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.</p> 3790 * <p>For devices that support {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the active array must 3791 * be enclosed by {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}. The difference between 3792 * pre-correction active array and active array accounts for scaling or cropping caused 3793 * by lens geometric distortion correction.</p> 3794 * <p>In general, application should always refer to active array size for controls like 3795 * metering regions or crop region. Two exceptions are when the application is dealing with 3796 * RAW image buffers (RAW_SENSOR, RAW10, RAW12 etc), or when application explicitly set 3797 * {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} to OFF. In these cases, application should refer 3798 * to {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.</p> 3799 * <p><b>Units</b>: Pixel coordinates on the image sensor</p> 3800 * <p>This key is available on all devices.</p> 3801 * 3802 * @see CaptureRequest#DISTORTION_CORRECTION_MODE 3803 * @see CaptureRequest#SCALER_CROP_REGION 3804 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE 3805 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE 3806 */ 3807 @PublicKey 3808 @NonNull 3809 public static final Key<android.graphics.Rect> SENSOR_INFO_ACTIVE_ARRAY_SIZE = 3810 new Key<android.graphics.Rect>("android.sensor.info.activeArraySize", android.graphics.Rect.class); 3811 3812 /** 3813 * <p>Range of sensitivities for {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} supported by this 3814 * camera device.</p> 3815 * <p>The values are the standard ISO sensitivity values, 3816 * as defined in ISO 12232:2006.</p> 3817 * <p><b>Range of valid values:</b><br> 3818 * Min <= 100, Max >= 800</p> 3819 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3820 * <p><b>Full capability</b> - 3821 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 3822 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 3823 * 3824 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 3825 * @see CaptureRequest#SENSOR_SENSITIVITY 3826 */ 3827 @PublicKey 3828 @NonNull 3829 public static final Key<android.util.Range<Integer>> SENSOR_INFO_SENSITIVITY_RANGE = 3830 new Key<android.util.Range<Integer>>("android.sensor.info.sensitivityRange", new TypeReference<android.util.Range<Integer>>() {{ }}); 3831 3832 /** 3833 * <p>The arrangement of color filters on sensor; 3834 * represents the colors in the top-left 2x2 section of 3835 * the sensor, in reading order, for a Bayer camera, or the 3836 * light spectrum it captures for MONOCHROME camera.</p> 3837 * <p><b>Possible values:</b></p> 3838 * <ul> 3839 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB RGGB}</li> 3840 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG GRBG}</li> 3841 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG GBRG}</li> 3842 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR BGGR}</li> 3843 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB RGB}</li> 3844 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_MONO MONO}</li> 3845 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR NIR}</li> 3846 * </ul> 3847 * 3848 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3849 * <p><b>Full capability</b> - 3850 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 3851 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 3852 * 3853 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 3854 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB 3855 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG 3856 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG 3857 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR 3858 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB 3859 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_MONO 3860 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR 3861 */ 3862 @PublicKey 3863 @NonNull 3864 public static final Key<Integer> SENSOR_INFO_COLOR_FILTER_ARRANGEMENT = 3865 new Key<Integer>("android.sensor.info.colorFilterArrangement", int.class); 3866 3867 /** 3868 * <p>The range of image exposure times for {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} supported 3869 * by this camera device.</p> 3870 * <p><b>Units</b>: Nanoseconds</p> 3871 * <p><b>Range of valid values:</b><br> 3872 * The minimum exposure time will be less than 100 us. For FULL 3873 * capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL), 3874 * the maximum exposure time will be greater than 100ms.</p> 3875 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3876 * <p><b>Full capability</b> - 3877 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 3878 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 3879 * 3880 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 3881 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 3882 */ 3883 @PublicKey 3884 @NonNull 3885 public static final Key<android.util.Range<Long>> SENSOR_INFO_EXPOSURE_TIME_RANGE = 3886 new Key<android.util.Range<Long>>("android.sensor.info.exposureTimeRange", new TypeReference<android.util.Range<Long>>() {{ }}); 3887 3888 /** 3889 * <p>The maximum possible frame duration (minimum frame rate) for 3890 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} that is supported this camera device.</p> 3891 * <p>Attempting to use frame durations beyond the maximum will result in the frame 3892 * duration being clipped to the maximum. See that control for a full definition of frame 3893 * durations.</p> 3894 * <p>Refer to {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration } 3895 * for the minimum frame duration values.</p> 3896 * <p><b>Units</b>: Nanoseconds</p> 3897 * <p><b>Range of valid values:</b><br> 3898 * For FULL capability devices 3899 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL), at least 100ms.</p> 3900 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3901 * <p><b>Full capability</b> - 3902 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 3903 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 3904 * 3905 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 3906 * @see CaptureRequest#SENSOR_FRAME_DURATION 3907 */ 3908 @PublicKey 3909 @NonNull 3910 public static final Key<Long> SENSOR_INFO_MAX_FRAME_DURATION = 3911 new Key<Long>("android.sensor.info.maxFrameDuration", long.class); 3912 3913 /** 3914 * <p>The physical dimensions of the full pixel 3915 * array.</p> 3916 * <p>This is the physical size of the sensor pixel 3917 * array defined by {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p> 3918 * <p><b>Units</b>: Millimeters</p> 3919 * <p>This key is available on all devices.</p> 3920 * 3921 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE 3922 */ 3923 @PublicKey 3924 @NonNull 3925 public static final Key<android.util.SizeF> SENSOR_INFO_PHYSICAL_SIZE = 3926 new Key<android.util.SizeF>("android.sensor.info.physicalSize", android.util.SizeF.class); 3927 3928 /** 3929 * <p>Dimensions of the full pixel array, possibly 3930 * including black calibration pixels.</p> 3931 * <p>The pixel count of the full pixel array of the image sensor, which covers 3932 * {@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize} area. This represents the full pixel dimensions of 3933 * the raw buffers produced by this sensor.</p> 3934 * <p>If a camera device supports raw sensor formats, either this or 3935 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} is the maximum dimensions for the raw 3936 * output formats listed in {@link android.hardware.camera2.params.StreamConfigurationMap } 3937 * (this depends on whether or not the image sensor returns buffers containing pixels that 3938 * are not part of the active array region for blacklevel calibration or other purposes).</p> 3939 * <p>Some parts of the full pixel array may not receive light from the scene, 3940 * or be otherwise inactive. The {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} key 3941 * defines the rectangle of active pixels that will be included in processed image 3942 * formats.</p> 3943 * <p><b>Units</b>: Pixels</p> 3944 * <p>This key is available on all devices.</p> 3945 * 3946 * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE 3947 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE 3948 */ 3949 @PublicKey 3950 @NonNull 3951 public static final Key<android.util.Size> SENSOR_INFO_PIXEL_ARRAY_SIZE = 3952 new Key<android.util.Size>("android.sensor.info.pixelArraySize", android.util.Size.class); 3953 3954 /** 3955 * <p>Maximum raw value output by sensor.</p> 3956 * <p>This specifies the fully-saturated encoding level for the raw 3957 * sample values from the sensor. This is typically caused by the 3958 * sensor becoming highly non-linear or clipping. The minimum for 3959 * each channel is specified by the offset in the 3960 * {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} key.</p> 3961 * <p>The white level is typically determined either by sensor bit depth 3962 * (8-14 bits is expected), or by the point where the sensor response 3963 * becomes too non-linear to be useful. The default value for this is 3964 * maximum representable value for a 16-bit raw sample (2^16 - 1).</p> 3965 * <p>The white level values of captured images may vary for different 3966 * capture settings (e.g., {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}). This key 3967 * represents a coarse approximation for such case. It is recommended 3968 * to use {@link CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL android.sensor.dynamicWhiteLevel} for captures when supported 3969 * by the camera device, which provides more accurate white level values.</p> 3970 * <p><b>Range of valid values:</b><br> 3971 * > 255 (8-bit output)</p> 3972 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 3973 * 3974 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN 3975 * @see CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL 3976 * @see CaptureRequest#SENSOR_SENSITIVITY 3977 */ 3978 @PublicKey 3979 @NonNull 3980 public static final Key<Integer> SENSOR_INFO_WHITE_LEVEL = 3981 new Key<Integer>("android.sensor.info.whiteLevel", int.class); 3982 3983 /** 3984 * <p>The time base source for sensor capture start timestamps.</p> 3985 * <p>The timestamps provided for captures are always in nanoseconds and monotonic, but 3986 * may not based on a time source that can be compared to other system time sources.</p> 3987 * <p>This characteristic defines the source for the timestamps, and therefore whether they 3988 * can be compared against other system time sources/timestamps.</p> 3989 * <p><b>Possible values:</b></p> 3990 * <ul> 3991 * <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN UNKNOWN}</li> 3992 * <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME REALTIME}</li> 3993 * </ul> 3994 * 3995 * <p>This key is available on all devices.</p> 3996 * @see #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN 3997 * @see #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME 3998 */ 3999 @PublicKey 4000 @NonNull 4001 public static final Key<Integer> SENSOR_INFO_TIMESTAMP_SOURCE = 4002 new Key<Integer>("android.sensor.info.timestampSource", int.class); 4003 4004 /** 4005 * <p>Whether the RAW images output from this camera device are subject to 4006 * lens shading correction.</p> 4007 * <p>If TRUE, all images produced by the camera device in the RAW image formats will 4008 * have lens shading correction already applied to it. If FALSE, the images will 4009 * not be adjusted for lens shading correction. 4010 * See {@link CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW android.request.maxNumOutputRaw} for a list of RAW image formats.</p> 4011 * <p>This key will be <code>null</code> for all devices do not report this information. 4012 * Devices with RAW capability will always report this information in this key.</p> 4013 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4014 * 4015 * @see CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW 4016 */ 4017 @PublicKey 4018 @NonNull 4019 public static final Key<Boolean> SENSOR_INFO_LENS_SHADING_APPLIED = 4020 new Key<Boolean>("android.sensor.info.lensShadingApplied", boolean.class); 4021 4022 /** 4023 * <p>The area of the image sensor which corresponds to active pixels prior to the 4024 * application of any geometric distortion correction.</p> 4025 * <p>This is the rectangle representing the size of the active region of the sensor (i.e. 4026 * the region that actually receives light from the scene) before any geometric correction 4027 * has been applied, and should be treated as the active region rectangle for any of the 4028 * raw formats. All metadata associated with raw processing (e.g. the lens shading 4029 * correction map, and radial distortion fields) treats the top, left of this rectangle as 4030 * the origin, (0,0).</p> 4031 * <p>The size of this region determines the maximum field of view and the maximum number of 4032 * pixels that an image from this sensor can contain, prior to the application of 4033 * geometric distortion correction. The effective maximum pixel dimensions of a 4034 * post-distortion-corrected image is given by the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} 4035 * field, and the effective maximum field of view for a post-distortion-corrected image 4036 * can be calculated by applying the geometric distortion correction fields to this 4037 * rectangle, and cropping to the rectangle given in {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p> 4038 * <p>E.g. to calculate position of a pixel, (x,y), in a processed YUV output image with the 4039 * dimensions in {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} given the position of a pixel, 4040 * (x', y'), in the raw pixel array with dimensions given in 4041 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}:</p> 4042 * <ol> 4043 * <li>Choose a pixel (x', y') within the active array region of the raw buffer given in 4044 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}, otherwise this pixel is considered 4045 * to be outside of the FOV, and will not be shown in the processed output image.</li> 4046 * <li>Apply geometric distortion correction to get the post-distortion pixel coordinate, 4047 * (x_i, y_i). When applying geometric correction metadata, note that metadata for raw 4048 * buffers is defined relative to the top, left of the 4049 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} rectangle.</li> 4050 * <li>If the resulting corrected pixel coordinate is within the region given in 4051 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, then the position of this pixel in the 4052 * processed output image buffer is <code>(x_i - activeArray.left, y_i - activeArray.top)</code>, 4053 * when the top, left coordinate of that buffer is treated as (0, 0).</li> 4054 * </ol> 4055 * <p>Thus, for pixel x',y' = (25, 25) on a sensor where {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize} 4056 * is (100,100), {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} is (10, 10, 100, 100), 4057 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} is (20, 20, 80, 80), and the geometric distortion 4058 * correction doesn't change the pixel coordinate, the resulting pixel selected in 4059 * pixel coordinates would be x,y = (25, 25) relative to the top,left of the raw buffer 4060 * with dimensions given in {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}, and would be (5, 5) 4061 * relative to the top,left of post-processed YUV output buffer with dimensions given in 4062 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p> 4063 * <p>The currently supported fields that correct for geometric distortion are:</p> 4064 * <ol> 4065 * <li>{@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}.</li> 4066 * </ol> 4067 * <p>If the camera device doesn't support geometric distortion correction, or all of the 4068 * geometric distortion fields are no-ops, this rectangle will be the same as the 4069 * post-distortion-corrected rectangle given in {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p> 4070 * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of 4071 * the full pixel array, and the size of the full pixel array is given by 4072 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p> 4073 * <p>The pre-correction active array may be smaller than the full pixel array, since the 4074 * full array may include black calibration pixels or other inactive regions.</p> 4075 * <p><b>Units</b>: Pixel coordinates on the image sensor</p> 4076 * <p>This key is available on all devices.</p> 4077 * 4078 * @see CameraCharacteristics#LENS_DISTORTION 4079 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 4080 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE 4081 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE 4082 */ 4083 @PublicKey 4084 @NonNull 4085 public static final Key<android.graphics.Rect> SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE = 4086 new Key<android.graphics.Rect>("android.sensor.info.preCorrectionActiveArraySize", android.graphics.Rect.class); 4087 4088 /** 4089 * <p>The area of the image sensor which corresponds to active pixels after any geometric 4090 * distortion correction has been applied, when the sensor runs in maximum resolution mode.</p> 4091 * <p>Analogous to {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} 4092 * is set to 4093 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }. 4094 * Refer to {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} for details, with sensor array related keys 4095 * replaced with their 4096 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION } 4097 * counterparts. 4098 * This key will only be present for devices which advertise the 4099 * {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR } 4100 * capability or devices where {@link CameraCharacteristics#getAvailableCaptureRequestKeys } 4101 * lists {@link CaptureRequest#SENSOR_PIXEL_MODE {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode}}</p> 4102 * <p><b>Units</b>: Pixel coordinates on the image sensor</p> 4103 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4104 * 4105 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 4106 * @see CaptureRequest#SENSOR_PIXEL_MODE 4107 */ 4108 @PublicKey 4109 @NonNull 4110 public static final Key<android.graphics.Rect> SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION = 4111 new Key<android.graphics.Rect>("android.sensor.info.activeArraySizeMaximumResolution", android.graphics.Rect.class); 4112 4113 /** 4114 * <p>Dimensions of the full pixel array, possibly 4115 * including black calibration pixels, when the sensor runs in maximum resolution mode. 4116 * Analogous to {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}, when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is 4117 * set to 4118 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 4119 * <p>The pixel count of the full pixel array of the image sensor, which covers 4120 * {@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize} area. This represents the full pixel dimensions of 4121 * the raw buffers produced by this sensor, when it runs in maximum resolution mode. That 4122 * is, when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 4123 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }. 4124 * This key will only be present for devices which advertise the 4125 * {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR } 4126 * capability or devices where {@link CameraCharacteristics#getAvailableCaptureRequestKeys } 4127 * lists {@link CaptureRequest#SENSOR_PIXEL_MODE {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode}}</p> 4128 * <p><b>Units</b>: Pixels</p> 4129 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4130 * 4131 * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE 4132 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE 4133 * @see CaptureRequest#SENSOR_PIXEL_MODE 4134 */ 4135 @PublicKey 4136 @NonNull 4137 public static final Key<android.util.Size> SENSOR_INFO_PIXEL_ARRAY_SIZE_MAXIMUM_RESOLUTION = 4138 new Key<android.util.Size>("android.sensor.info.pixelArraySizeMaximumResolution", android.util.Size.class); 4139 4140 /** 4141 * <p>The area of the image sensor which corresponds to active pixels prior to the 4142 * application of any geometric distortion correction, when the sensor runs in maximum 4143 * resolution mode. This key must be used for crop / metering regions, only when 4144 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 4145 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 4146 * <p>Analogous to {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}, 4147 * when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 4148 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }. 4149 * This key will only be present for devices which advertise the 4150 * {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR } 4151 * capability or devices where {@link CameraCharacteristics#getAvailableCaptureRequestKeys } 4152 * lists {@link CaptureRequest#SENSOR_PIXEL_MODE {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode}}</p> 4153 * <p><b>Units</b>: Pixel coordinates on the image sensor</p> 4154 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4155 * 4156 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE 4157 * @see CaptureRequest#SENSOR_PIXEL_MODE 4158 */ 4159 @PublicKey 4160 @NonNull 4161 public static final Key<android.graphics.Rect> SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION = 4162 new Key<android.graphics.Rect>("android.sensor.info.preCorrectionActiveArraySizeMaximumResolution", android.graphics.Rect.class); 4163 4164 /** 4165 * <p>Dimensions of the group of pixels which are under the same color filter. 4166 * This specifies the width and height (pair of integers) of the group of pixels which fall 4167 * under the same color filter for ULTRA_HIGH_RESOLUTION sensors.</p> 4168 * <p>Sensors can have pixels grouped together under the same color filter in order 4169 * to improve various aspects of imaging such as noise reduction, low light 4170 * performance etc. These groups can be of various sizes such as 2X2 (quad bayer), 4171 * 3X3 (nona-bayer). This key specifies the length and width of the pixels grouped under 4172 * the same color filter. 4173 * In case the device has the 4174 * {@link CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR } 4175 * capability :</p> 4176 * <ul> 4177 * <li>This key will not be present if REMOSAIC_REPROCESSING is not supported, since RAW 4178 * images will have a regular bayer pattern.</li> 4179 * </ul> 4180 * <p>In case the device does not have the 4181 * {@link CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR } 4182 * capability :</p> 4183 * <ul> 4184 * <li>This key will be present if 4185 * {@link CameraCharacteristics#getAvailableCaptureRequestKeys } 4186 * lists {@link CaptureRequest#SENSOR_PIXEL_MODE {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode}}, since RAW 4187 * images may not necessarily have a regular bayer pattern when 4188 * {@link CaptureRequest#SENSOR_PIXEL_MODE {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode}} is set to 4189 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</li> 4190 * </ul> 4191 * <p><b>Units</b>: Pixels</p> 4192 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4193 * 4194 * @see CaptureRequest#SENSOR_PIXEL_MODE 4195 */ 4196 @PublicKey 4197 @NonNull 4198 public static final Key<android.util.Size> SENSOR_INFO_BINNING_FACTOR = 4199 new Key<android.util.Size>("android.sensor.info.binningFactor", android.util.Size.class); 4200 4201 /** 4202 * <p>The standard reference illuminant used as the scene light source when 4203 * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1}, 4204 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and 4205 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} matrices.</p> 4206 * <p>The values in this key correspond to the values defined for the 4207 * EXIF LightSource tag. These illuminants are standard light sources 4208 * that are often used calibrating camera devices.</p> 4209 * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1}, 4210 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and 4211 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} will also be present.</p> 4212 * <p>Some devices may choose to provide a second set of calibration 4213 * information for improved quality, including 4214 * {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2} and its corresponding matrices.</p> 4215 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if 4216 * the camera device has RAW capability.</p> 4217 * <p><b>Possible values:</b></p> 4218 * <ul> 4219 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT DAYLIGHT}</li> 4220 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT FLUORESCENT}</li> 4221 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN TUNGSTEN}</li> 4222 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLASH FLASH}</li> 4223 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER FINE_WEATHER}</li> 4224 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER CLOUDY_WEATHER}</li> 4225 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_SHADE SHADE}</li> 4226 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT DAYLIGHT_FLUORESCENT}</li> 4227 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT DAY_WHITE_FLUORESCENT}</li> 4228 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT COOL_WHITE_FLUORESCENT}</li> 4229 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT WHITE_FLUORESCENT}</li> 4230 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A STANDARD_A}</li> 4231 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B STANDARD_B}</li> 4232 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C STANDARD_C}</li> 4233 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D55 D55}</li> 4234 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D65 D65}</li> 4235 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D75 D75}</li> 4236 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D50 D50}</li> 4237 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN ISO_STUDIO_TUNGSTEN}</li> 4238 * </ul> 4239 * 4240 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4241 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p> 4242 * 4243 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 4244 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 4245 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX1 4246 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 4247 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT 4248 * @see #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT 4249 * @see #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN 4250 * @see #SENSOR_REFERENCE_ILLUMINANT1_FLASH 4251 * @see #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER 4252 * @see #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER 4253 * @see #SENSOR_REFERENCE_ILLUMINANT1_SHADE 4254 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT 4255 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT 4256 * @see #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT 4257 * @see #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT 4258 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A 4259 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B 4260 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C 4261 * @see #SENSOR_REFERENCE_ILLUMINANT1_D55 4262 * @see #SENSOR_REFERENCE_ILLUMINANT1_D65 4263 * @see #SENSOR_REFERENCE_ILLUMINANT1_D75 4264 * @see #SENSOR_REFERENCE_ILLUMINANT1_D50 4265 * @see #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN 4266 */ 4267 @PublicKey 4268 @NonNull 4269 public static final Key<Integer> SENSOR_REFERENCE_ILLUMINANT1 = 4270 new Key<Integer>("android.sensor.referenceIlluminant1", int.class); 4271 4272 /** 4273 * <p>The standard reference illuminant used as the scene light source when 4274 * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2}, 4275 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and 4276 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} matrices.</p> 4277 * <p>See {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1} for more details.</p> 4278 * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2}, 4279 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and 4280 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} will also be present.</p> 4281 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if 4282 * the camera device has RAW capability.</p> 4283 * <p><b>Range of valid values:</b><br> 4284 * Any value listed in {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}</p> 4285 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4286 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p> 4287 * 4288 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 4289 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 4290 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX2 4291 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 4292 */ 4293 @PublicKey 4294 @NonNull 4295 public static final Key<Byte> SENSOR_REFERENCE_ILLUMINANT2 = 4296 new Key<Byte>("android.sensor.referenceIlluminant2", byte.class); 4297 4298 /** 4299 * <p>A per-device calibration transform matrix that maps from the 4300 * reference sensor colorspace to the actual device sensor colorspace.</p> 4301 * <p>This matrix is used to correct for per-device variations in the 4302 * sensor colorspace, and is used for processing raw buffer data.</p> 4303 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and 4304 * contains a per-device calibration transform that maps colors 4305 * from reference sensor color space (i.e. the "golden module" 4306 * colorspace) into this camera device's native sensor color 4307 * space under the first reference illuminant 4308 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p> 4309 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if 4310 * the camera device has RAW capability.</p> 4311 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4312 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p> 4313 * 4314 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 4315 */ 4316 @PublicKey 4317 @NonNull 4318 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM1 = 4319 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform1", android.hardware.camera2.params.ColorSpaceTransform.class); 4320 4321 /** 4322 * <p>A per-device calibration transform matrix that maps from the 4323 * reference sensor colorspace to the actual device sensor colorspace 4324 * (this is the colorspace of the raw buffer data).</p> 4325 * <p>This matrix is used to correct for per-device variations in the 4326 * sensor colorspace, and is used for processing raw buffer data.</p> 4327 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and 4328 * contains a per-device calibration transform that maps colors 4329 * from reference sensor color space (i.e. the "golden module" 4330 * colorspace) into this camera device's native sensor color 4331 * space under the second reference illuminant 4332 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p> 4333 * <p>This matrix will only be present if the second reference 4334 * illuminant is present.</p> 4335 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if 4336 * the camera device has RAW capability.</p> 4337 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4338 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p> 4339 * 4340 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 4341 */ 4342 @PublicKey 4343 @NonNull 4344 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM2 = 4345 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform2", android.hardware.camera2.params.ColorSpaceTransform.class); 4346 4347 /** 4348 * <p>A matrix that transforms color values from CIE XYZ color space to 4349 * reference sensor color space.</p> 4350 * <p>This matrix is used to convert from the standard CIE XYZ color 4351 * space to the reference sensor colorspace, and is used when processing 4352 * raw buffer data.</p> 4353 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and 4354 * contains a color transform matrix that maps colors from the CIE 4355 * XYZ color space to the reference sensor color space (i.e. the 4356 * "golden module" colorspace) under the first reference illuminant 4357 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p> 4358 * <p>The white points chosen in both the reference sensor color space 4359 * and the CIE XYZ colorspace when calculating this transform will 4360 * match the standard white point for the first reference illuminant 4361 * (i.e. no chromatic adaptation will be applied by this transform).</p> 4362 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if 4363 * the camera device has RAW capability.</p> 4364 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4365 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p> 4366 * 4367 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 4368 */ 4369 @PublicKey 4370 @NonNull 4371 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM1 = 4372 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform1", android.hardware.camera2.params.ColorSpaceTransform.class); 4373 4374 /** 4375 * <p>A matrix that transforms color values from CIE XYZ color space to 4376 * reference sensor color space.</p> 4377 * <p>This matrix is used to convert from the standard CIE XYZ color 4378 * space to the reference sensor colorspace, and is used when processing 4379 * raw buffer data.</p> 4380 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and 4381 * contains a color transform matrix that maps colors from the CIE 4382 * XYZ color space to the reference sensor color space (i.e. the 4383 * "golden module" colorspace) under the second reference illuminant 4384 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p> 4385 * <p>The white points chosen in both the reference sensor color space 4386 * and the CIE XYZ colorspace when calculating this transform will 4387 * match the standard white point for the second reference illuminant 4388 * (i.e. no chromatic adaptation will be applied by this transform).</p> 4389 * <p>This matrix will only be present if the second reference 4390 * illuminant is present.</p> 4391 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if 4392 * the camera device has RAW capability.</p> 4393 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4394 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p> 4395 * 4396 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 4397 */ 4398 @PublicKey 4399 @NonNull 4400 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM2 = 4401 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform2", android.hardware.camera2.params.ColorSpaceTransform.class); 4402 4403 /** 4404 * <p>A matrix that transforms white balanced camera colors from the reference 4405 * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p> 4406 * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and 4407 * is used when processing raw buffer data.</p> 4408 * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains 4409 * a color transform matrix that maps white balanced colors from the 4410 * reference sensor color space to the CIE XYZ color space with a D50 white 4411 * point.</p> 4412 * <p>Under the first reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}) 4413 * this matrix is chosen so that the standard white point for this reference 4414 * illuminant in the reference sensor colorspace is mapped to D50 in the 4415 * CIE XYZ colorspace.</p> 4416 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if 4417 * the camera device has RAW capability.</p> 4418 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4419 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p> 4420 * 4421 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 4422 */ 4423 @PublicKey 4424 @NonNull 4425 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX1 = 4426 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix1", android.hardware.camera2.params.ColorSpaceTransform.class); 4427 4428 /** 4429 * <p>A matrix that transforms white balanced camera colors from the reference 4430 * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p> 4431 * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and 4432 * is used when processing raw buffer data.</p> 4433 * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains 4434 * a color transform matrix that maps white balanced colors from the 4435 * reference sensor color space to the CIE XYZ color space with a D50 white 4436 * point.</p> 4437 * <p>Under the second reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}) 4438 * this matrix is chosen so that the standard white point for this reference 4439 * illuminant in the reference sensor colorspace is mapped to D50 in the 4440 * CIE XYZ colorspace.</p> 4441 * <p>This matrix will only be present if the second reference 4442 * illuminant is present.</p> 4443 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if 4444 * the camera device has RAW capability.</p> 4445 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4446 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p> 4447 * 4448 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 4449 */ 4450 @PublicKey 4451 @NonNull 4452 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX2 = 4453 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix2", android.hardware.camera2.params.ColorSpaceTransform.class); 4454 4455 /** 4456 * <p>A fixed black level offset for each of the color filter arrangement 4457 * (CFA) mosaic channels.</p> 4458 * <p>This key specifies the zero light value for each of the CFA mosaic 4459 * channels in the camera sensor. The maximal value output by the 4460 * sensor is represented by the value in {@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}.</p> 4461 * <p>The values are given in the same order as channels listed for the CFA 4462 * layout key (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}), i.e. the 4463 * nth value given corresponds to the black level offset for the nth 4464 * color channel listed in the CFA.</p> 4465 * <p>The black level values of captured images may vary for different 4466 * capture settings (e.g., {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}). This key 4467 * represents a coarse approximation for such case. It is recommended to 4468 * use {@link CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL android.sensor.dynamicBlackLevel} or use pixels from 4469 * {@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions} directly for captures when 4470 * supported by the camera device, which provides more accurate black 4471 * level values. For raw capture in particular, it is recommended to use 4472 * pixels from {@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions} to calculate black 4473 * level values for each frame.</p> 4474 * <p>For a MONOCHROME camera device, all of the 2x2 channels must have the same values.</p> 4475 * <p><b>Range of valid values:</b><br> 4476 * >= 0 for each.</p> 4477 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4478 * 4479 * @see CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL 4480 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT 4481 * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL 4482 * @see CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS 4483 * @see CaptureRequest#SENSOR_SENSITIVITY 4484 */ 4485 @PublicKey 4486 @NonNull 4487 public static final Key<android.hardware.camera2.params.BlackLevelPattern> SENSOR_BLACK_LEVEL_PATTERN = 4488 new Key<android.hardware.camera2.params.BlackLevelPattern>("android.sensor.blackLevelPattern", android.hardware.camera2.params.BlackLevelPattern.class); 4489 4490 /** 4491 * <p>Maximum sensitivity that is implemented 4492 * purely through analog gain.</p> 4493 * <p>For {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} values less than or 4494 * equal to this, all applied gain must be analog. For 4495 * values above this, the gain applied can be a mix of analog and 4496 * digital.</p> 4497 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4498 * <p><b>Full capability</b> - 4499 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 4500 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 4501 * 4502 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 4503 * @see CaptureRequest#SENSOR_SENSITIVITY 4504 */ 4505 @PublicKey 4506 @NonNull 4507 public static final Key<Integer> SENSOR_MAX_ANALOG_SENSITIVITY = 4508 new Key<Integer>("android.sensor.maxAnalogSensitivity", int.class); 4509 4510 /** 4511 * <p>Clockwise angle through which the output image needs to be rotated to be 4512 * upright on the device screen in its native orientation.</p> 4513 * <p>Also defines the direction of rolling shutter readout, which is from top to bottom in 4514 * the sensor's coordinate system.</p> 4515 * <p>Starting with Android API level 32, camera clients that query the orientation via 4516 * {@link android.hardware.camera2.CameraCharacteristics#get } on foldable devices which 4517 * include logical cameras can receive a value that can dynamically change depending on the 4518 * device/fold state. 4519 * Clients are advised to not cache or store the orientation value of such logical sensors. 4520 * In case repeated queries to CameraCharacteristics are not preferred, then clients can 4521 * also access the entire mapping from device state to sensor orientation in 4522 * {@link android.hardware.camera2.params.DeviceStateSensorOrientationMap }. 4523 * Do note that a dynamically changing sensor orientation value in camera characteristics 4524 * will not be the best way to establish the orientation per frame. Clients that want to 4525 * know the sensor orientation of a particular captured frame should query the 4526 * {@link CaptureResult#LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID android.logicalMultiCamera.activePhysicalId} from the corresponding capture result and 4527 * check the respective physical camera orientation.</p> 4528 * <p><b>Units</b>: Degrees of clockwise rotation; always a multiple of 4529 * 90</p> 4530 * <p><b>Range of valid values:</b><br> 4531 * 0, 90, 180, 270</p> 4532 * <p>This key is available on all devices.</p> 4533 * 4534 * @see CaptureResult#LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID 4535 */ 4536 @PublicKey 4537 @NonNull 4538 public static final Key<Integer> SENSOR_ORIENTATION = 4539 new Key<Integer>("android.sensor.orientation", int.class); 4540 4541 /** 4542 * <p>List of sensor test pattern modes for {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode} 4543 * supported by this camera device.</p> 4544 * <p>Defaults to OFF, and always includes OFF if defined.</p> 4545 * <p><b>Range of valid values:</b><br> 4546 * Any value listed in {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}</p> 4547 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4548 * 4549 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 4550 */ 4551 @PublicKey 4552 @NonNull 4553 public static final Key<int[]> SENSOR_AVAILABLE_TEST_PATTERN_MODES = 4554 new Key<int[]>("android.sensor.availableTestPatternModes", int[].class); 4555 4556 /** 4557 * <p>List of disjoint rectangles indicating the sensor 4558 * optically shielded black pixel regions.</p> 4559 * <p>In most camera sensors, the active array is surrounded by some 4560 * optically shielded pixel areas. By blocking light, these pixels 4561 * provides a reliable black reference for black level compensation 4562 * in active array region.</p> 4563 * <p>This key provides a list of disjoint rectangles specifying the 4564 * regions of optically shielded (with metal shield) black pixel 4565 * regions if the camera device is capable of reading out these black 4566 * pixels in the output raw images. In comparison to the fixed black 4567 * level values reported by {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern}, this key 4568 * may provide a more accurate way for the application to calculate 4569 * black level of each captured raw images.</p> 4570 * <p>When this key is reported, the {@link CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL android.sensor.dynamicBlackLevel} and 4571 * {@link CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL android.sensor.dynamicWhiteLevel} will also be reported.</p> 4572 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4573 * 4574 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN 4575 * @see CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL 4576 * @see CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL 4577 */ 4578 @PublicKey 4579 @NonNull 4580 public static final Key<android.graphics.Rect[]> SENSOR_OPTICAL_BLACK_REGIONS = 4581 new Key<android.graphics.Rect[]>("android.sensor.opticalBlackRegions", android.graphics.Rect[].class); 4582 4583 /** 4584 * <p>Whether or not the camera device supports readout timestamp and 4585 * {@code onReadoutStarted} callback.</p> 4586 * <p>If this tag is {@code HARDWARE}, the camera device calls 4587 * {@link CameraCaptureSession.CaptureCallback#onReadoutStarted } in addition to the 4588 * {@link CameraCaptureSession.CaptureCallback#onCaptureStarted } callback for each capture. 4589 * The timestamp passed into the callback is the start of camera image readout rather than 4590 * the start of the exposure. The timestamp source of 4591 * {@link CameraCaptureSession.CaptureCallback#onReadoutStarted } is the same as that of 4592 * {@link CameraCaptureSession.CaptureCallback#onCaptureStarted }.</p> 4593 * <p>In addition, the application can switch an output surface's timestamp from start of 4594 * exposure to start of readout by calling 4595 * {@link android.hardware.camera2.params.OutputConfiguration#setReadoutTimestampEnabled }.</p> 4596 * <p>The readout timestamp is beneficial for video recording, because the encoder favors 4597 * uniform timestamps, and the readout timestamps better reflect the cadence camera sensors 4598 * output data.</p> 4599 * <p>Note that the camera device produces the start-of-exposure and start-of-readout callbacks 4600 * together. As a result, the {@link CameraCaptureSession.CaptureCallback#onReadoutStarted } 4601 * is called right after {@link CameraCaptureSession.CaptureCallback#onCaptureStarted }. The 4602 * difference in start-of-readout and start-of-exposure is the sensor exposure time, plus 4603 * certain constant offset. The offset is usually due to camera sensor level crop, and it is 4604 * generally constant over time for the same set of output resolutions and capture settings.</p> 4605 * <p><b>Possible values:</b></p> 4606 * <ul> 4607 * <li>{@link #SENSOR_READOUT_TIMESTAMP_NOT_SUPPORTED NOT_SUPPORTED}</li> 4608 * <li>{@link #SENSOR_READOUT_TIMESTAMP_HARDWARE HARDWARE}</li> 4609 * </ul> 4610 * 4611 * <p>This key is available on all devices.</p> 4612 * @see #SENSOR_READOUT_TIMESTAMP_NOT_SUPPORTED 4613 * @see #SENSOR_READOUT_TIMESTAMP_HARDWARE 4614 */ 4615 @PublicKey 4616 @NonNull 4617 public static final Key<Integer> SENSOR_READOUT_TIMESTAMP = 4618 new Key<Integer>("android.sensor.readoutTimestamp", int.class); 4619 4620 /** 4621 * <p>List of lens shading modes for {@link CaptureRequest#SHADING_MODE android.shading.mode} that are supported by this camera device.</p> 4622 * <p>This list contains lens shading modes that can be set for the camera device. 4623 * Camera devices that support the MANUAL_POST_PROCESSING capability will always 4624 * list OFF and FAST mode. This includes all FULL level devices. 4625 * LEGACY devices will always only support FAST mode.</p> 4626 * <p><b>Range of valid values:</b><br> 4627 * Any value listed in {@link CaptureRequest#SHADING_MODE android.shading.mode}</p> 4628 * <p>This key is available on all devices.</p> 4629 * 4630 * @see CaptureRequest#SHADING_MODE 4631 */ 4632 @PublicKey 4633 @NonNull 4634 public static final Key<int[]> SHADING_AVAILABLE_MODES = 4635 new Key<int[]>("android.shading.availableModes", int[].class); 4636 4637 /** 4638 * <p>List of face detection modes for {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} that are 4639 * supported by this camera device.</p> 4640 * <p>OFF is always supported.</p> 4641 * <p><b>Range of valid values:</b><br> 4642 * Any value listed in {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}</p> 4643 * <p>This key is available on all devices.</p> 4644 * 4645 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE 4646 */ 4647 @PublicKey 4648 @NonNull 4649 public static final Key<int[]> STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES = 4650 new Key<int[]>("android.statistics.info.availableFaceDetectModes", int[].class); 4651 4652 /** 4653 * <p>The maximum number of simultaneously detectable 4654 * faces.</p> 4655 * <p><b>Range of valid values:</b><br> 4656 * 0 for cameras without available face detection; otherwise: 4657 * <code>>=4</code> for LIMITED or FULL hwlevel devices or 4658 * <code>>0</code> for LEGACY devices.</p> 4659 * <p>This key is available on all devices.</p> 4660 */ 4661 @PublicKey 4662 @NonNull 4663 public static final Key<Integer> STATISTICS_INFO_MAX_FACE_COUNT = 4664 new Key<Integer>("android.statistics.info.maxFaceCount", int.class); 4665 4666 /** 4667 * <p>List of hot pixel map output modes for {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode} that are 4668 * supported by this camera device.</p> 4669 * <p>If no hotpixel map output is available for this camera device, this will contain only 4670 * <code>false</code>.</p> 4671 * <p>ON is always supported on devices with the RAW capability.</p> 4672 * <p><b>Range of valid values:</b><br> 4673 * Any value listed in {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode}</p> 4674 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4675 * 4676 * @see CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE 4677 */ 4678 @PublicKey 4679 @NonNull 4680 public static final Key<boolean[]> STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES = 4681 new Key<boolean[]>("android.statistics.info.availableHotPixelMapModes", boolean[].class); 4682 4683 /** 4684 * <p>List of lens shading map output modes for {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} that 4685 * are supported by this camera device.</p> 4686 * <p>If no lens shading map output is available for this camera device, this key will 4687 * contain only OFF.</p> 4688 * <p>ON is always supported on devices with the RAW capability. 4689 * LEGACY mode devices will always only support OFF.</p> 4690 * <p><b>Range of valid values:</b><br> 4691 * Any value listed in {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode}</p> 4692 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4693 * 4694 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 4695 */ 4696 @PublicKey 4697 @NonNull 4698 public static final Key<int[]> STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES = 4699 new Key<int[]>("android.statistics.info.availableLensShadingMapModes", int[].class); 4700 4701 /** 4702 * <p>List of OIS data output modes for {@link CaptureRequest#STATISTICS_OIS_DATA_MODE android.statistics.oisDataMode} that 4703 * are supported by this camera device.</p> 4704 * <p>If no OIS data output is available for this camera device, this key will 4705 * contain only OFF.</p> 4706 * <p><b>Range of valid values:</b><br> 4707 * Any value listed in {@link CaptureRequest#STATISTICS_OIS_DATA_MODE android.statistics.oisDataMode}</p> 4708 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4709 * 4710 * @see CaptureRequest#STATISTICS_OIS_DATA_MODE 4711 */ 4712 @PublicKey 4713 @NonNull 4714 public static final Key<int[]> STATISTICS_INFO_AVAILABLE_OIS_DATA_MODES = 4715 new Key<int[]>("android.statistics.info.availableOisDataModes", int[].class); 4716 4717 /** 4718 * <p>Maximum number of supported points in the 4719 * tonemap curve that can be used for {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p> 4720 * <p>If the actual number of points provided by the application (in {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}*) is 4721 * less than this maximum, the camera device will resample the curve to its internal 4722 * representation, using linear interpolation.</p> 4723 * <p>The output curves in the result metadata may have a different number 4724 * of points than the input curves, and will represent the actual 4725 * hardware curves used as closely as possible when linearly interpolated.</p> 4726 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4727 * <p><b>Full capability</b> - 4728 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 4729 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 4730 * 4731 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 4732 * @see CaptureRequest#TONEMAP_CURVE 4733 */ 4734 @PublicKey 4735 @NonNull 4736 public static final Key<Integer> TONEMAP_MAX_CURVE_POINTS = 4737 new Key<Integer>("android.tonemap.maxCurvePoints", int.class); 4738 4739 /** 4740 * <p>List of tonemapping modes for {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} that are supported by this camera 4741 * device.</p> 4742 * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always contain 4743 * at least one of below mode combinations:</p> 4744 * <ul> 4745 * <li>CONTRAST_CURVE, FAST and HIGH_QUALITY</li> 4746 * <li>GAMMA_VALUE, PRESET_CURVE, FAST and HIGH_QUALITY</li> 4747 * </ul> 4748 * <p>This includes all FULL level devices.</p> 4749 * <p><b>Range of valid values:</b><br> 4750 * Any value listed in {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</p> 4751 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4752 * <p><b>Full capability</b> - 4753 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 4754 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 4755 * 4756 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 4757 * @see CaptureRequest#TONEMAP_MODE 4758 */ 4759 @PublicKey 4760 @NonNull 4761 public static final Key<int[]> TONEMAP_AVAILABLE_TONE_MAP_MODES = 4762 new Key<int[]>("android.tonemap.availableToneMapModes", int[].class); 4763 4764 /** 4765 * <p>A list of camera LEDs that are available on this system.</p> 4766 * <p><b>Possible values:</b></p> 4767 * <ul> 4768 * <li>{@link #LED_AVAILABLE_LEDS_TRANSMIT TRANSMIT}</li> 4769 * </ul> 4770 * 4771 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4772 * @see #LED_AVAILABLE_LEDS_TRANSMIT 4773 * @hide 4774 */ 4775 public static final Key<int[]> LED_AVAILABLE_LEDS = 4776 new Key<int[]>("android.led.availableLeds", int[].class); 4777 4778 /** 4779 * <p>Generally classifies the overall set of the camera device functionality.</p> 4780 * <p>The supported hardware level is a high-level description of the camera device's 4781 * capabilities, summarizing several capabilities into one field. Each level adds additional 4782 * features to the previous one, and is always a strict superset of the previous level. 4783 * The ordering is <code>LEGACY < LIMITED < FULL < LEVEL_3</code>.</p> 4784 * <p>Starting from <code>LEVEL_3</code>, the level enumerations are guaranteed to be in increasing 4785 * numerical value as well. To check if a given device is at least at a given hardware level, 4786 * the following code snippet can be used:</p> 4787 * <pre><code>// Returns true if the device supports the required hardware level, or better. 4788 * boolean isHardwareLevelSupported(CameraCharacteristics c, int requiredLevel) { 4789 * final int[] sortedHwLevels = { 4790 * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY, 4791 * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL, 4792 * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED, 4793 * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL, 4794 * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_3 4795 * }; 4796 * int deviceLevel = c.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL); 4797 * if (requiredLevel == deviceLevel) { 4798 * return true; 4799 * } 4800 * 4801 * for (int sortedlevel : sortedHwLevels) { 4802 * if (sortedlevel == requiredLevel) { 4803 * return true; 4804 * } else if (sortedlevel == deviceLevel) { 4805 * return false; 4806 * } 4807 * } 4808 * return false; // Should never reach here 4809 * } 4810 * </code></pre> 4811 * <p>At a high level, the levels are:</p> 4812 * <ul> 4813 * <li><code>LEGACY</code> devices operate in a backwards-compatibility mode for older 4814 * Android devices, and have very limited capabilities.</li> 4815 * <li><code>LIMITED</code> devices represent the 4816 * baseline feature set, and may also include additional capabilities that are 4817 * subsets of <code>FULL</code>.</li> 4818 * <li><code>FULL</code> devices additionally support per-frame manual control of sensor, flash, lens and 4819 * post-processing settings, and image capture at a high rate.</li> 4820 * <li><code>LEVEL_3</code> devices additionally support YUV reprocessing and RAW image capture, along 4821 * with additional output stream configurations.</li> 4822 * <li><code>EXTERNAL</code> devices are similar to <code>LIMITED</code> devices with exceptions like some sensor or 4823 * lens information not reported or less stable framerates.</li> 4824 * </ul> 4825 * <p>See the individual level enums for full descriptions of the supported capabilities. The 4826 * {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} entry describes the device's capabilities at a 4827 * finer-grain level, if needed. In addition, many controls have their available settings or 4828 * ranges defined in individual entries from {@link android.hardware.camera2.CameraCharacteristics }.</p> 4829 * <p>Some features are not part of any particular hardware level or capability and must be 4830 * queried separately. These include:</p> 4831 * <ul> 4832 * <li>Calibrated timestamps ({@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} <code>==</code> REALTIME)</li> 4833 * <li>Precision lens control ({@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} <code>==</code> CALIBRATED)</li> 4834 * <li>Face detection ({@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes})</li> 4835 * <li>Optical or electrical image stabilization 4836 * ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization}, 4837 * {@link CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES android.control.availableVideoStabilizationModes})</li> 4838 * </ul> 4839 * <p><b>Possible values:</b></p> 4840 * <ul> 4841 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED}</li> 4842 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL}</li> 4843 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY LEGACY}</li> 4844 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_3 3}</li> 4845 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL EXTERNAL}</li> 4846 * </ul> 4847 * 4848 * <p>This key is available on all devices.</p> 4849 * 4850 * @see CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES 4851 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION 4852 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION 4853 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 4854 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE 4855 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES 4856 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED 4857 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_FULL 4858 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY 4859 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_3 4860 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL 4861 */ 4862 @PublicKey 4863 @NonNull 4864 public static final Key<Integer> INFO_SUPPORTED_HARDWARE_LEVEL = 4865 new Key<Integer>("android.info.supportedHardwareLevel", int.class); 4866 4867 /** 4868 * <p>A short string for manufacturer version information about the camera device, such as 4869 * ISP hardware, sensors, etc.</p> 4870 * <p>This can be used in {@link android.media.ExifInterface#TAG_IMAGE_DESCRIPTION TAG_IMAGE_DESCRIPTION} 4871 * in jpeg EXIF. This key may be absent if no version information is available on the 4872 * device.</p> 4873 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4874 */ 4875 @PublicKey 4876 @NonNull 4877 public static final Key<String> INFO_VERSION = 4878 new Key<String>("android.info.version", String.class); 4879 4880 /** 4881 * <p>This lists the mapping between a device folding state and 4882 * specific camera sensor orientation for logical cameras on a foldable device.</p> 4883 * <p>Logical cameras on foldable devices can support sensors with different orientation 4884 * values. The orientation value may need to change depending on the specific folding 4885 * state. Information about the mapping between the device folding state and the 4886 * sensor orientation can be obtained in 4887 * {@link android.hardware.camera2.params.DeviceStateSensorOrientationMap }. 4888 * Device state orientation maps are optional and maybe present on devices that support 4889 * {@link CaptureRequest#SCALER_ROTATE_AND_CROP android.scaler.rotateAndCrop}.</p> 4890 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4891 * <p><b>Limited capability</b> - 4892 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 4893 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 4894 * 4895 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 4896 * @see CaptureRequest#SCALER_ROTATE_AND_CROP 4897 */ 4898 @PublicKey 4899 @NonNull 4900 @SyntheticKey 4901 public static final Key<android.hardware.camera2.params.DeviceStateSensorOrientationMap> INFO_DEVICE_STATE_SENSOR_ORIENTATION_MAP = 4902 new Key<android.hardware.camera2.params.DeviceStateSensorOrientationMap>("android.info.deviceStateSensorOrientationMap", android.hardware.camera2.params.DeviceStateSensorOrientationMap.class); 4903 4904 /** 4905 * <p>HAL must populate the array with 4906 * (hardware::camera::provider::V2_5::DeviceState, sensorOrientation) pairs for each 4907 * supported device state bitwise combination.</p> 4908 * <p><b>Units</b>: (device fold state, sensor orientation) x n</p> 4909 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4910 * <p><b>Limited capability</b> - 4911 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 4912 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 4913 * 4914 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 4915 * @hide 4916 */ 4917 public static final Key<long[]> INFO_DEVICE_STATE_ORIENTATIONS = 4918 new Key<long[]>("android.info.deviceStateOrientations", long[].class); 4919 4920 /** 4921 * <p>The maximum number of frames that can occur after a request 4922 * (different than the previous) has been submitted, and before the 4923 * result's state becomes synchronized.</p> 4924 * <p>This defines the maximum distance (in number of metadata results), 4925 * between the frame number of the request that has new controls to apply 4926 * and the frame number of the result that has all the controls applied.</p> 4927 * <p>In other words this acts as an upper boundary for how many frames 4928 * must occur before the camera device knows for a fact that the new 4929 * submitted camera settings have been applied in outgoing frames.</p> 4930 * <p><b>Units</b>: Frame counts</p> 4931 * <p><b>Possible values:</b></p> 4932 * <ul> 4933 * <li>{@link #SYNC_MAX_LATENCY_PER_FRAME_CONTROL PER_FRAME_CONTROL}</li> 4934 * <li>{@link #SYNC_MAX_LATENCY_UNKNOWN UNKNOWN}</li> 4935 * </ul> 4936 * 4937 * <p><b>Available values for this device:</b><br> 4938 * A positive value, PER_FRAME_CONTROL, or UNKNOWN.</p> 4939 * <p>This key is available on all devices.</p> 4940 * @see #SYNC_MAX_LATENCY_PER_FRAME_CONTROL 4941 * @see #SYNC_MAX_LATENCY_UNKNOWN 4942 */ 4943 @PublicKey 4944 @NonNull 4945 public static final Key<Integer> SYNC_MAX_LATENCY = 4946 new Key<Integer>("android.sync.maxLatency", int.class); 4947 4948 /** 4949 * <p>The maximal camera capture pipeline stall (in unit of frame count) introduced by a 4950 * reprocess capture request.</p> 4951 * <p>The key describes the maximal interference that one reprocess (input) request 4952 * can introduce to the camera simultaneous streaming of regular (output) capture 4953 * requests, including repeating requests.</p> 4954 * <p>When a reprocessing capture request is submitted while a camera output repeating request 4955 * (e.g. preview) is being served by the camera device, it may preempt the camera capture 4956 * pipeline for at least one frame duration so that the camera device is unable to process 4957 * the following capture request in time for the next sensor start of exposure boundary. 4958 * When this happens, the application may observe a capture time gap (longer than one frame 4959 * duration) between adjacent capture output frames, which usually exhibits as preview 4960 * glitch if the repeating request output targets include a preview surface. This key gives 4961 * the worst-case number of frame stall introduced by one reprocess request with any kind of 4962 * formats/sizes combination.</p> 4963 * <p>If this key reports 0, it means a reprocess request doesn't introduce any glitch to the 4964 * ongoing camera repeating request outputs, as if this reprocess request is never issued.</p> 4965 * <p>This key is supported if the camera device supports PRIVATE or YUV reprocessing ( 4966 * i.e. {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains PRIVATE_REPROCESSING or 4967 * YUV_REPROCESSING).</p> 4968 * <p><b>Units</b>: Number of frames.</p> 4969 * <p><b>Range of valid values:</b><br> 4970 * <= 4</p> 4971 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 4972 * <p><b>Limited capability</b> - 4973 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 4974 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 4975 * 4976 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 4977 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 4978 */ 4979 @PublicKey 4980 @NonNull 4981 public static final Key<Integer> REPROCESS_MAX_CAPTURE_STALL = 4982 new Key<Integer>("android.reprocess.maxCaptureStall", int.class); 4983 4984 /** 4985 * <p>The available depth dataspace stream 4986 * configurations that this camera device supports 4987 * (i.e. format, width, height, output/input stream).</p> 4988 * <p>These are output stream configurations for use with 4989 * dataSpace HAL_DATASPACE_DEPTH. The configurations are 4990 * listed as <code>(format, width, height, input?)</code> tuples.</p> 4991 * <p>Only devices that support depth output for at least 4992 * the HAL_PIXEL_FORMAT_Y16 dense depth map may include 4993 * this entry.</p> 4994 * <p>A device that also supports the HAL_PIXEL_FORMAT_BLOB 4995 * sparse depth point cloud must report a single entry for 4996 * the format in this list as <code>(HAL_PIXEL_FORMAT_BLOB, 4997 * android.depth.maxDepthSamples, 1, OUTPUT)</code> in addition to 4998 * the entries for HAL_PIXEL_FORMAT_Y16.</p> 4999 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5000 * <p><b>Limited capability</b> - 5001 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 5002 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 5003 * 5004 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 5005 * @hide 5006 */ 5007 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS = 5008 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.depth.availableDepthStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class); 5009 5010 /** 5011 * <p>This lists the minimum frame duration for each 5012 * format/size combination for depth output formats.</p> 5013 * <p>This should correspond to the frame duration when only that 5014 * stream is active, with all processing (typically in android.*.mode) 5015 * set to either OFF or FAST.</p> 5016 * <p>When multiple streams are used in a request, the minimum frame 5017 * duration will be max(individual stream min durations).</p> 5018 * <p>The minimum frame duration of a stream (of a particular format, size) 5019 * is the same regardless of whether the stream is input or output.</p> 5020 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and 5021 * android.scaler.availableStallDurations for more details about 5022 * calculating the max frame rate.</p> 5023 * <p><b>Units</b>: (format, width, height, ns) x n</p> 5024 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5025 * <p><b>Limited capability</b> - 5026 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 5027 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 5028 * 5029 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 5030 * @see CaptureRequest#SENSOR_FRAME_DURATION 5031 * @hide 5032 */ 5033 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS = 5034 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); 5035 5036 /** 5037 * <p>This lists the maximum stall duration for each 5038 * output format/size combination for depth streams.</p> 5039 * <p>A stall duration is how much extra time would get added 5040 * to the normal minimum frame duration for a repeating request 5041 * that has streams with non-zero stall.</p> 5042 * <p>This functions similarly to 5043 * android.scaler.availableStallDurations for depth 5044 * streams.</p> 5045 * <p>All depth output stream formats may have a nonzero stall 5046 * duration.</p> 5047 * <p><b>Units</b>: (format, width, height, ns) x n</p> 5048 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5049 * <p><b>Limited capability</b> - 5050 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 5051 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 5052 * 5053 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 5054 * @hide 5055 */ 5056 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS = 5057 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); 5058 5059 /** 5060 * <p>Indicates whether a capture request may target both a 5061 * DEPTH16 / DEPTH_POINT_CLOUD output, and normal color outputs (such as 5062 * YUV_420_888, JPEG, or RAW) simultaneously.</p> 5063 * <p>If TRUE, including both depth and color outputs in a single 5064 * capture request is not supported. An application must interleave color 5065 * and depth requests. If FALSE, a single request can target both types 5066 * of output.</p> 5067 * <p>Typically, this restriction exists on camera devices that 5068 * need to emit a specific pattern or wavelength of light to 5069 * measure depth values, which causes the color image to be 5070 * corrupted during depth measurement.</p> 5071 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5072 * <p><b>Limited capability</b> - 5073 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 5074 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 5075 * 5076 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 5077 */ 5078 @PublicKey 5079 @NonNull 5080 public static final Key<Boolean> DEPTH_DEPTH_IS_EXCLUSIVE = 5081 new Key<Boolean>("android.depth.depthIsExclusive", boolean.class); 5082 5083 /** 5084 * <p>Recommended depth stream configurations for common client use cases.</p> 5085 * <p>Optional subset of the android.depth.availableDepthStreamConfigurations that 5086 * contains similar tuples listed as 5087 * (i.e. width, height, format, output/input stream, usecase bit field). 5088 * Camera devices will be able to suggest particular depth stream configurations which are 5089 * power and performance efficient for specific use cases. For more information about 5090 * retrieving the suggestions see 5091 * {@link android.hardware.camera2.CameraCharacteristics#getRecommendedStreamConfigurationMap }.</p> 5092 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5093 * @hide 5094 */ 5095 public static final Key<android.hardware.camera2.params.RecommendedStreamConfiguration[]> DEPTH_AVAILABLE_RECOMMENDED_DEPTH_STREAM_CONFIGURATIONS = 5096 new Key<android.hardware.camera2.params.RecommendedStreamConfiguration[]>("android.depth.availableRecommendedDepthStreamConfigurations", android.hardware.camera2.params.RecommendedStreamConfiguration[].class); 5097 5098 /** 5099 * <p>The available dynamic depth dataspace stream 5100 * configurations that this camera device supports 5101 * (i.e. format, width, height, output/input stream).</p> 5102 * <p>These are output stream configurations for use with 5103 * dataSpace DYNAMIC_DEPTH. The configurations are 5104 * listed as <code>(format, width, height, input?)</code> tuples.</p> 5105 * <p>Only devices that support depth output for at least 5106 * the HAL_PIXEL_FORMAT_Y16 dense depth map along with 5107 * HAL_PIXEL_FORMAT_BLOB with the same size or size with 5108 * the same aspect ratio can have dynamic depth dataspace 5109 * stream configuration. {@link CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE android.depth.depthIsExclusive} also 5110 * needs to be set to FALSE.</p> 5111 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5112 * 5113 * @see CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE 5114 * @hide 5115 */ 5116 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS = 5117 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.depth.availableDynamicDepthStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class); 5118 5119 /** 5120 * <p>This lists the minimum frame duration for each 5121 * format/size combination for dynamic depth output streams.</p> 5122 * <p>This should correspond to the frame duration when only that 5123 * stream is active, with all processing (typically in android.*.mode) 5124 * set to either OFF or FAST.</p> 5125 * <p>When multiple streams are used in a request, the minimum frame 5126 * duration will be max(individual stream min durations).</p> 5127 * <p>The minimum frame duration of a stream (of a particular format, size) 5128 * is the same regardless of whether the stream is input or output.</p> 5129 * <p><b>Units</b>: (format, width, height, ns) x n</p> 5130 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5131 * @hide 5132 */ 5133 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS = 5134 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDynamicDepthMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); 5135 5136 /** 5137 * <p>This lists the maximum stall duration for each 5138 * output format/size combination for dynamic depth streams.</p> 5139 * <p>A stall duration is how much extra time would get added 5140 * to the normal minimum frame duration for a repeating request 5141 * that has streams with non-zero stall.</p> 5142 * <p>All dynamic depth output streams may have a nonzero stall 5143 * duration.</p> 5144 * <p><b>Units</b>: (format, width, height, ns) x n</p> 5145 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5146 * @hide 5147 */ 5148 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS = 5149 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDynamicDepthStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); 5150 5151 /** 5152 * <p>The available depth dataspace stream 5153 * configurations that this camera device supports 5154 * (i.e. format, width, height, output/input stream) when a CaptureRequest is submitted with 5155 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} set to 5156 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 5157 * <p>Analogous to android.depth.availableDepthStreamConfigurations, for configurations which 5158 * are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 5159 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 5160 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5161 * 5162 * @see CaptureRequest#SENSOR_PIXEL_MODE 5163 * @hide 5164 */ 5165 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION = 5166 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.depth.availableDepthStreamConfigurationsMaximumResolution", android.hardware.camera2.params.StreamConfiguration[].class); 5167 5168 /** 5169 * <p>This lists the minimum frame duration for each 5170 * format/size combination for depth output formats when a CaptureRequest is submitted with 5171 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} set to 5172 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 5173 * <p>Analogous to android.depth.availableDepthMinFrameDurations, for configurations which 5174 * are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 5175 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 5176 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and 5177 * android.scaler.availableStallDurationsMaximumResolution for more details about 5178 * calculating the max frame rate.</p> 5179 * <p><b>Units</b>: (format, width, height, ns) x n</p> 5180 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5181 * 5182 * @see CaptureRequest#SENSOR_FRAME_DURATION 5183 * @see CaptureRequest#SENSOR_PIXEL_MODE 5184 * @hide 5185 */ 5186 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION = 5187 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthMinFrameDurationsMaximumResolution", android.hardware.camera2.params.StreamConfigurationDuration[].class); 5188 5189 /** 5190 * <p>This lists the maximum stall duration for each 5191 * output format/size combination for depth streams for CaptureRequests where 5192 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 5193 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 5194 * <p>Analogous to android.depth.availableDepthStallDurations, for configurations which 5195 * are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 5196 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 5197 * <p><b>Units</b>: (format, width, height, ns) x n</p> 5198 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5199 * 5200 * @see CaptureRequest#SENSOR_PIXEL_MODE 5201 * @hide 5202 */ 5203 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION = 5204 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthStallDurationsMaximumResolution", android.hardware.camera2.params.StreamConfigurationDuration[].class); 5205 5206 /** 5207 * <p>The available dynamic depth dataspace stream 5208 * configurations that this camera device supports (i.e. format, width, height, 5209 * output/input stream) for CaptureRequests where {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 5210 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 5211 * <p>Analogous to android.depth.availableDynamicDepthStreamConfigurations, for configurations 5212 * which are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 5213 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 5214 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5215 * 5216 * @see CaptureRequest#SENSOR_PIXEL_MODE 5217 * @hide 5218 */ 5219 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION = 5220 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.depth.availableDynamicDepthStreamConfigurationsMaximumResolution", android.hardware.camera2.params.StreamConfiguration[].class); 5221 5222 /** 5223 * <p>This lists the minimum frame duration for each 5224 * format/size combination for dynamic depth output streams for CaptureRequests where 5225 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 5226 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 5227 * <p>Analogous to android.depth.availableDynamicDepthMinFrameDurations, for configurations 5228 * which are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 5229 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 5230 * <p><b>Units</b>: (format, width, height, ns) x n</p> 5231 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5232 * 5233 * @see CaptureRequest#SENSOR_PIXEL_MODE 5234 * @hide 5235 */ 5236 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION = 5237 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDynamicDepthMinFrameDurationsMaximumResolution", android.hardware.camera2.params.StreamConfigurationDuration[].class); 5238 5239 /** 5240 * <p>This lists the maximum stall duration for each 5241 * output format/size combination for dynamic depth streams for CaptureRequests where 5242 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 5243 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 5244 * <p>Analogous to android.depth.availableDynamicDepthStallDurations, for configurations 5245 * which are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 5246 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 5247 * <p><b>Units</b>: (format, width, height, ns) x n</p> 5248 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5249 * 5250 * @see CaptureRequest#SENSOR_PIXEL_MODE 5251 * @hide 5252 */ 5253 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION = 5254 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDynamicDepthStallDurationsMaximumResolution", android.hardware.camera2.params.StreamConfigurationDuration[].class); 5255 5256 /** 5257 * <p>String containing the ids of the underlying physical cameras.</p> 5258 * <p>For a logical camera, this is concatenation of all underlying physical camera IDs. 5259 * The null terminator for physical camera ID must be preserved so that the whole string 5260 * can be tokenized using '\0' to generate list of physical camera IDs.</p> 5261 * <p>For example, if the physical camera IDs of the logical camera are "2" and "3", the 5262 * value of this tag will be ['2', '\0', '3', '\0'].</p> 5263 * <p>The number of physical camera IDs must be no less than 2.</p> 5264 * <p><b>Units</b>: UTF-8 null-terminated string</p> 5265 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5266 * <p><b>Limited capability</b> - 5267 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 5268 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 5269 * 5270 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 5271 * @hide 5272 */ 5273 public static final Key<byte[]> LOGICAL_MULTI_CAMERA_PHYSICAL_IDS = 5274 new Key<byte[]>("android.logicalMultiCamera.physicalIds", byte[].class); 5275 5276 /** 5277 * <p>The accuracy of frame timestamp synchronization between physical cameras</p> 5278 * <p>The accuracy of the frame timestamp synchronization determines the physical cameras' 5279 * ability to start exposure at the same time. If the sensorSyncType is CALIBRATED, the 5280 * physical camera sensors usually run in leader/follower mode where one sensor generates a 5281 * timing signal for the other, so that their shutter time is synchronized. For APPROXIMATE 5282 * sensorSyncType, the camera sensors usually run in leader/leader mode, where both sensors 5283 * use their own timing generator, and there could be offset between their start of exposure.</p> 5284 * <p>In both cases, all images generated for a particular capture request still carry the same 5285 * timestamps, so that they can be used to look up the matching frame number and 5286 * onCaptureStarted callback.</p> 5287 * <p>This tag is only applicable if the logical camera device supports concurrent physical 5288 * streams from different physical cameras.</p> 5289 * <p><b>Possible values:</b></p> 5290 * <ul> 5291 * <li>{@link #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE APPROXIMATE}</li> 5292 * <li>{@link #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED CALIBRATED}</li> 5293 * </ul> 5294 * 5295 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5296 * <p><b>Limited capability</b> - 5297 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 5298 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 5299 * 5300 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 5301 * @see #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE 5302 * @see #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED 5303 */ 5304 @PublicKey 5305 @NonNull 5306 public static final Key<Integer> LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE = 5307 new Key<Integer>("android.logicalMultiCamera.sensorSyncType", int.class); 5308 5309 /** 5310 * <p>List of distortion correction modes for {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} that are 5311 * supported by this camera device.</p> 5312 * <p>No device is required to support this API; such devices will always list only 'OFF'. 5313 * All devices that support this API will list both FAST and HIGH_QUALITY.</p> 5314 * <p><b>Range of valid values:</b><br> 5315 * Any value listed in {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode}</p> 5316 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5317 * 5318 * @see CaptureRequest#DISTORTION_CORRECTION_MODE 5319 */ 5320 @PublicKey 5321 @NonNull 5322 public static final Key<int[]> DISTORTION_CORRECTION_AVAILABLE_MODES = 5323 new Key<int[]>("android.distortionCorrection.availableModes", int[].class); 5324 5325 /** 5326 * <p>The available HEIC (ISO/IEC 23008-12) stream 5327 * configurations that this camera device supports 5328 * (i.e. format, width, height, output/input stream).</p> 5329 * <p>The configurations are listed as <code>(format, width, height, input?)</code> tuples.</p> 5330 * <p>If the camera device supports HEIC image format, it will support identical set of stream 5331 * combinations involving HEIC image format, compared to the combinations involving JPEG 5332 * image format as required by the device's hardware level and capabilities.</p> 5333 * <p>All the static, control, and dynamic metadata tags related to JPEG apply to HEIC formats. 5334 * Configuring JPEG and HEIC streams at the same time is not supported.</p> 5335 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5336 * <p><b>Limited capability</b> - 5337 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 5338 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 5339 * 5340 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 5341 * @hide 5342 */ 5343 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS = 5344 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.heic.availableHeicStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class); 5345 5346 /** 5347 * <p>This lists the minimum frame duration for each 5348 * format/size combination for HEIC output formats.</p> 5349 * <p>This should correspond to the frame duration when only that 5350 * stream is active, with all processing (typically in android.*.mode) 5351 * set to either OFF or FAST.</p> 5352 * <p>When multiple streams are used in a request, the minimum frame 5353 * duration will be max(individual stream min durations).</p> 5354 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and 5355 * android.scaler.availableStallDurations for more details about 5356 * calculating the max frame rate.</p> 5357 * <p><b>Units</b>: (format, width, height, ns) x n</p> 5358 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5359 * <p><b>Limited capability</b> - 5360 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 5361 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 5362 * 5363 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 5364 * @see CaptureRequest#SENSOR_FRAME_DURATION 5365 * @hide 5366 */ 5367 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS = 5368 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.heic.availableHeicMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); 5369 5370 /** 5371 * <p>This lists the maximum stall duration for each 5372 * output format/size combination for HEIC streams.</p> 5373 * <p>A stall duration is how much extra time would get added 5374 * to the normal minimum frame duration for a repeating request 5375 * that has streams with non-zero stall.</p> 5376 * <p>This functions similarly to 5377 * android.scaler.availableStallDurations for HEIC 5378 * streams.</p> 5379 * <p>All HEIC output stream formats may have a nonzero stall 5380 * duration.</p> 5381 * <p><b>Units</b>: (format, width, height, ns) x n</p> 5382 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5383 * <p><b>Limited capability</b> - 5384 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 5385 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 5386 * 5387 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 5388 * @hide 5389 */ 5390 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> HEIC_AVAILABLE_HEIC_STALL_DURATIONS = 5391 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.heic.availableHeicStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); 5392 5393 /** 5394 * <p>The available HEIC (ISO/IEC 23008-12) stream 5395 * configurations that this camera device supports 5396 * (i.e. format, width, height, output/input stream).</p> 5397 * <p>Refer to android.heic.availableHeicStreamConfigurations for details.</p> 5398 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5399 * @hide 5400 */ 5401 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION = 5402 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.heic.availableHeicStreamConfigurationsMaximumResolution", android.hardware.camera2.params.StreamConfiguration[].class); 5403 5404 /** 5405 * <p>This lists the minimum frame duration for each 5406 * format/size combination for HEIC output formats for CaptureRequests where 5407 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 5408 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 5409 * <p>Refer to android.heic.availableHeicMinFrameDurations for details.</p> 5410 * <p><b>Units</b>: (format, width, height, ns) x n</p> 5411 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5412 * 5413 * @see CaptureRequest#SENSOR_PIXEL_MODE 5414 * @hide 5415 */ 5416 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION = 5417 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.heic.availableHeicMinFrameDurationsMaximumResolution", android.hardware.camera2.params.StreamConfigurationDuration[].class); 5418 5419 /** 5420 * <p>This lists the maximum stall duration for each 5421 * output format/size combination for HEIC streams for CaptureRequests where 5422 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 5423 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 5424 * <p>Refer to android.heic.availableHeicStallDurations for details.</p> 5425 * <p><b>Units</b>: (format, width, height, ns) x n</p> 5426 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5427 * 5428 * @see CaptureRequest#SENSOR_PIXEL_MODE 5429 * @hide 5430 */ 5431 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> HEIC_AVAILABLE_HEIC_STALL_DURATIONS_MAXIMUM_RESOLUTION = 5432 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.heic.availableHeicStallDurationsMaximumResolution", android.hardware.camera2.params.StreamConfigurationDuration[].class); 5433 5434 /** 5435 * <p>The direction of the camera faces relative to the vehicle body frame and the 5436 * passenger seats.</p> 5437 * <p>This enum defines the lens facing characteristic of the cameras on the automotive 5438 * devices with locations {@link CameraCharacteristics#AUTOMOTIVE_LOCATION android.automotive.location} defines. If the system has 5439 * FEATURE_AUTOMOTIVE, the camera will have this entry in its static metadata.</p> 5440 * <p>When {@link CameraCharacteristics#AUTOMOTIVE_LOCATION android.automotive.location} is INTERIOR, this has one or more INTERIOR_* 5441 * values or a single EXTERIOR_* value. When this has more than one INTERIOR_*, 5442 * the first value must be the one for the seat closest to the optical axis. If this 5443 * contains INTERIOR_OTHER, all other values will be ineffective.</p> 5444 * <p>When {@link CameraCharacteristics#AUTOMOTIVE_LOCATION android.automotive.location} is EXTERIOR_* or EXTRA, this has a single 5445 * EXTERIOR_* value.</p> 5446 * <p>If a camera has INTERIOR_OTHER or EXTERIOR_OTHER, or more than one camera is at the 5447 * same location and facing the same direction, their static metadata will list the 5448 * following entries, so that applications can determine their lenses' exact facing 5449 * directions:</p> 5450 * <ul> 5451 * <li>{@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference}</li> 5452 * <li>{@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}</li> 5453 * <li>{@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}</li> 5454 * </ul> 5455 * <p><b>Possible values:</b></p> 5456 * <ul> 5457 * <li>{@link #AUTOMOTIVE_LENS_FACING_EXTERIOR_OTHER EXTERIOR_OTHER}</li> 5458 * <li>{@link #AUTOMOTIVE_LENS_FACING_EXTERIOR_FRONT EXTERIOR_FRONT}</li> 5459 * <li>{@link #AUTOMOTIVE_LENS_FACING_EXTERIOR_REAR EXTERIOR_REAR}</li> 5460 * <li>{@link #AUTOMOTIVE_LENS_FACING_EXTERIOR_LEFT EXTERIOR_LEFT}</li> 5461 * <li>{@link #AUTOMOTIVE_LENS_FACING_EXTERIOR_RIGHT EXTERIOR_RIGHT}</li> 5462 * <li>{@link #AUTOMOTIVE_LENS_FACING_INTERIOR_OTHER INTERIOR_OTHER}</li> 5463 * <li>{@link #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_LEFT INTERIOR_SEAT_ROW_1_LEFT}</li> 5464 * <li>{@link #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_CENTER INTERIOR_SEAT_ROW_1_CENTER}</li> 5465 * <li>{@link #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_RIGHT INTERIOR_SEAT_ROW_1_RIGHT}</li> 5466 * <li>{@link #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_LEFT INTERIOR_SEAT_ROW_2_LEFT}</li> 5467 * <li>{@link #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_CENTER INTERIOR_SEAT_ROW_2_CENTER}</li> 5468 * <li>{@link #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_RIGHT INTERIOR_SEAT_ROW_2_RIGHT}</li> 5469 * <li>{@link #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_LEFT INTERIOR_SEAT_ROW_3_LEFT}</li> 5470 * <li>{@link #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_CENTER INTERIOR_SEAT_ROW_3_CENTER}</li> 5471 * <li>{@link #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_RIGHT INTERIOR_SEAT_ROW_3_RIGHT}</li> 5472 * </ul> 5473 * 5474 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5475 * 5476 * @see CameraCharacteristics#AUTOMOTIVE_LOCATION 5477 * @see CameraCharacteristics#LENS_POSE_REFERENCE 5478 * @see CameraCharacteristics#LENS_POSE_ROTATION 5479 * @see CameraCharacteristics#LENS_POSE_TRANSLATION 5480 * @see #AUTOMOTIVE_LENS_FACING_EXTERIOR_OTHER 5481 * @see #AUTOMOTIVE_LENS_FACING_EXTERIOR_FRONT 5482 * @see #AUTOMOTIVE_LENS_FACING_EXTERIOR_REAR 5483 * @see #AUTOMOTIVE_LENS_FACING_EXTERIOR_LEFT 5484 * @see #AUTOMOTIVE_LENS_FACING_EXTERIOR_RIGHT 5485 * @see #AUTOMOTIVE_LENS_FACING_INTERIOR_OTHER 5486 * @see #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_LEFT 5487 * @see #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_CENTER 5488 * @see #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_RIGHT 5489 * @see #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_LEFT 5490 * @see #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_CENTER 5491 * @see #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_RIGHT 5492 * @see #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_LEFT 5493 * @see #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_CENTER 5494 * @see #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_RIGHT 5495 */ 5496 @PublicKey 5497 @NonNull 5498 public static final Key<int[]> AUTOMOTIVE_LENS_FACING = 5499 new Key<int[]>("android.automotive.lens.facing", int[].class); 5500 5501 /** 5502 * <p>Location of the cameras on the automotive devices.</p> 5503 * <p>This enum defines the locations of the cameras relative to the vehicle body frame on 5504 * <a href="https://source.android.com/devices/sensors/sensor-types#auto_axes">the automotive sensor coordinate system</a>. 5505 * If the system has FEATURE_AUTOMOTIVE, the camera will have this entry in its static 5506 * metadata.</p> 5507 * <ul> 5508 * <li>INTERIOR is the inside of the vehicle body frame (or the passenger cabin).</li> 5509 * <li>EXTERIOR is the outside of the vehicle body frame.</li> 5510 * <li>EXTRA is the extra vehicle such as a trailer.</li> 5511 * </ul> 5512 * <p>Each side of the vehicle body frame on this coordinate system is defined as below:</p> 5513 * <ul> 5514 * <li>FRONT is where the Y-axis increases toward.</li> 5515 * <li>REAR is where the Y-axis decreases toward.</li> 5516 * <li>LEFT is where the X-axis decreases toward.</li> 5517 * <li>RIGHT is where the X-axis increases toward.</li> 5518 * </ul> 5519 * <p>If the camera has either EXTERIOR_OTHER or EXTRA_OTHER, its static metadata will list 5520 * the following entries, so that applications can determine the camera's exact location:</p> 5521 * <ul> 5522 * <li>{@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference}</li> 5523 * <li>{@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}</li> 5524 * <li>{@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}</li> 5525 * </ul> 5526 * <p><b>Possible values:</b></p> 5527 * <ul> 5528 * <li>{@link #AUTOMOTIVE_LOCATION_INTERIOR INTERIOR}</li> 5529 * <li>{@link #AUTOMOTIVE_LOCATION_EXTERIOR_OTHER EXTERIOR_OTHER}</li> 5530 * <li>{@link #AUTOMOTIVE_LOCATION_EXTERIOR_FRONT EXTERIOR_FRONT}</li> 5531 * <li>{@link #AUTOMOTIVE_LOCATION_EXTERIOR_REAR EXTERIOR_REAR}</li> 5532 * <li>{@link #AUTOMOTIVE_LOCATION_EXTERIOR_LEFT EXTERIOR_LEFT}</li> 5533 * <li>{@link #AUTOMOTIVE_LOCATION_EXTERIOR_RIGHT EXTERIOR_RIGHT}</li> 5534 * <li>{@link #AUTOMOTIVE_LOCATION_EXTRA_OTHER EXTRA_OTHER}</li> 5535 * <li>{@link #AUTOMOTIVE_LOCATION_EXTRA_FRONT EXTRA_FRONT}</li> 5536 * <li>{@link #AUTOMOTIVE_LOCATION_EXTRA_REAR EXTRA_REAR}</li> 5537 * <li>{@link #AUTOMOTIVE_LOCATION_EXTRA_LEFT EXTRA_LEFT}</li> 5538 * <li>{@link #AUTOMOTIVE_LOCATION_EXTRA_RIGHT EXTRA_RIGHT}</li> 5539 * </ul> 5540 * 5541 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5542 * 5543 * @see CameraCharacteristics#LENS_POSE_REFERENCE 5544 * @see CameraCharacteristics#LENS_POSE_ROTATION 5545 * @see CameraCharacteristics#LENS_POSE_TRANSLATION 5546 * @see #AUTOMOTIVE_LOCATION_INTERIOR 5547 * @see #AUTOMOTIVE_LOCATION_EXTERIOR_OTHER 5548 * @see #AUTOMOTIVE_LOCATION_EXTERIOR_FRONT 5549 * @see #AUTOMOTIVE_LOCATION_EXTERIOR_REAR 5550 * @see #AUTOMOTIVE_LOCATION_EXTERIOR_LEFT 5551 * @see #AUTOMOTIVE_LOCATION_EXTERIOR_RIGHT 5552 * @see #AUTOMOTIVE_LOCATION_EXTRA_OTHER 5553 * @see #AUTOMOTIVE_LOCATION_EXTRA_FRONT 5554 * @see #AUTOMOTIVE_LOCATION_EXTRA_REAR 5555 * @see #AUTOMOTIVE_LOCATION_EXTRA_LEFT 5556 * @see #AUTOMOTIVE_LOCATION_EXTRA_RIGHT 5557 */ 5558 @PublicKey 5559 @NonNull 5560 public static final Key<Integer> AUTOMOTIVE_LOCATION = 5561 new Key<Integer>("android.automotive.location", int.class); 5562 5563 /** 5564 * <p>The available Jpeg/R stream 5565 * configurations that this camera device supports 5566 * (i.e. format, width, height, output/input stream).</p> 5567 * <p>The configurations are listed as <code>(format, width, height, input?)</code> tuples.</p> 5568 * <p>If the camera device supports Jpeg/R, it will support the same stream combinations with 5569 * Jpeg/R as it does with P010. The stream combinations with Jpeg/R (or P010) supported 5570 * by the device is determined by the device's hardware level and capabilities.</p> 5571 * <p>All the static, control, and dynamic metadata tags related to JPEG apply to Jpeg/R formats. 5572 * Configuring JPEG and Jpeg/R streams at the same time is not supported.</p> 5573 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5574 * <p><b>Limited capability</b> - 5575 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 5576 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 5577 * 5578 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 5579 * @hide 5580 */ 5581 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS = 5582 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.jpegr.availableJpegRStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class); 5583 5584 /** 5585 * <p>This lists the minimum frame duration for each 5586 * format/size combination for Jpeg/R output formats.</p> 5587 * <p>This should correspond to the frame duration when only that 5588 * stream is active, with all processing (typically in android.*.mode) 5589 * set to either OFF or FAST.</p> 5590 * <p>When multiple streams are used in a request, the minimum frame 5591 * duration will be max(individual stream min durations).</p> 5592 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and 5593 * android.scaler.availableStallDurations for more details about 5594 * calculating the max frame rate.</p> 5595 * <p><b>Units</b>: (format, width, height, ns) x n</p> 5596 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5597 * <p><b>Limited capability</b> - 5598 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 5599 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 5600 * 5601 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 5602 * @see CaptureRequest#SENSOR_FRAME_DURATION 5603 * @hide 5604 */ 5605 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> JPEGR_AVAILABLE_JPEG_R_MIN_FRAME_DURATIONS = 5606 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.jpegr.availableJpegRMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); 5607 5608 /** 5609 * <p>This lists the maximum stall duration for each 5610 * output format/size combination for Jpeg/R streams.</p> 5611 * <p>A stall duration is how much extra time would get added 5612 * to the normal minimum frame duration for a repeating request 5613 * that has streams with non-zero stall.</p> 5614 * <p>This functions similarly to 5615 * android.scaler.availableStallDurations for Jpeg/R 5616 * streams.</p> 5617 * <p>All Jpeg/R output stream formats may have a nonzero stall 5618 * duration.</p> 5619 * <p><b>Units</b>: (format, width, height, ns) x n</p> 5620 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5621 * <p><b>Limited capability</b> - 5622 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 5623 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 5624 * 5625 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 5626 * @hide 5627 */ 5628 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> JPEGR_AVAILABLE_JPEG_R_STALL_DURATIONS = 5629 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.jpegr.availableJpegRStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); 5630 5631 /** 5632 * <p>The available Jpeg/R stream 5633 * configurations that this camera device supports 5634 * (i.e. format, width, height, output/input stream).</p> 5635 * <p>Refer to android.jpegr.availableJpegRStreamConfigurations for details.</p> 5636 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5637 * @hide 5638 */ 5639 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION = 5640 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.jpegr.availableJpegRStreamConfigurationsMaximumResolution", android.hardware.camera2.params.StreamConfiguration[].class); 5641 5642 /** 5643 * <p>This lists the minimum frame duration for each 5644 * format/size combination for Jpeg/R output formats for CaptureRequests where 5645 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 5646 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 5647 * <p>Refer to android.jpegr.availableJpegRMinFrameDurations for details.</p> 5648 * <p><b>Units</b>: (format, width, height, ns) x n</p> 5649 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5650 * 5651 * @see CaptureRequest#SENSOR_PIXEL_MODE 5652 * @hide 5653 */ 5654 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> JPEGR_AVAILABLE_JPEG_R_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION = 5655 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.jpegr.availableJpegRMinFrameDurationsMaximumResolution", android.hardware.camera2.params.StreamConfigurationDuration[].class); 5656 5657 /** 5658 * <p>This lists the maximum stall duration for each 5659 * output format/size combination for Jpeg/R streams for CaptureRequests where 5660 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to 5661 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p> 5662 * <p>Refer to android.jpegr.availableJpegRStallDurations for details.</p> 5663 * <p><b>Units</b>: (format, width, height, ns) x n</p> 5664 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p> 5665 * 5666 * @see CaptureRequest#SENSOR_PIXEL_MODE 5667 * @hide 5668 */ 5669 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> JPEGR_AVAILABLE_JPEG_R_STALL_DURATIONS_MAXIMUM_RESOLUTION = 5670 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.jpegr.availableJpegRStallDurationsMaximumResolution", android.hardware.camera2.params.StreamConfigurationDuration[].class); 5671 5672 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 5673 * End generated code 5674 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/ 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 } 5685