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