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