Debian Codegraph @

core/java/android/hardware/camera2/CameraCharacteristics.java

raw symbols SCIP
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)
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 */
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 */
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
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
134 public String getName() {
135 return mKey.getName();
136 }
137
138 /**
139 * Return vendor tag id.
140 *
141 * @hide
142 */
143 public long getVendorId() {
144 return mKey.getVendorId();
145 }
146
147 /**
148 * {@inheritDoc}
149 */
150 @Override
151 public final int hashCode() {
152 return mKey.hashCode();
153 }
154
155 /**
156 * {@inheritDoc}
157 */
158 @SuppressWarnings("unchecked")
159 @Override
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
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
186 public CameraMetadataNative.Key<T> getNativeKey() {
187 return mKey;
188 }
189
190 @SuppressWarnings({
191 "unused", "unchecked"
192 })
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 */
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 */
238 public CameraMetadataNative getNativeCopy() {
239 return new CameraMetadataNative(mProperties);
240 }
241
242 /**
243 * Return the device state listener for this Camera characteristics instance
244 */
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
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
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
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
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
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 */
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() &gt; 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) &amp;&amp; (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 */
461 public @Nullable RecommendedStreamConfigurationMap getRecommendedStreamConfigurationMap(
462 @RecommendedStreamConfigurationMap.RecommendedUsecase int usecase) {
463 if (((usecase >= RecommendedStreamConfigurationMap.USECASE_PREVIEW) &&
464 (usecase <= RecommendedStreamConfigurationMap.USECASE_10BIT_OUTPUT)) ||
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"})
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"})
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
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
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 <TKey> List<TKey>
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
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> &gt;= 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> &lt;= 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} &lt;= -2 EV</code></p>
828 * <p><code>Max.exposure compensation * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} &gt;= 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} &gt; 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} &gt;
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 &gt;= 0 for each element. For full-capability devices
979 * this value must be &gt;= 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 &gt;= 0. For FULL-capability devices, this
998 * value will be &gt;= 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 &gt;= 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 &gt;= 0. For FULL-capability devices, this
1032 * value will be &gt;= 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 pressure 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 &gt;= 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 controlling
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 &gt;= 1.0 &gt;= 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 &gt;= 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>Maximum flashlight brightness level.</p>
1324 * <p>If this value is greater than 1, then the device supports controlling the
1325 * flashlight brightness level via
1326 * {@link android.hardware.camera2.CameraManager#turnOnTorchWithStrengthLevel }.
1327 * If this value is equal to 1, flashlight brightness control is not supported.
1328 * The value for this key will be null for devices with no flash unit.</p>
1329 * <p>The maximum value is guaranteed to be safe to use for an indefinite duration in
1330 * terms of device flashlight lifespan, but may be too bright for comfort for many
1331 * use cases. Use the default torch brightness value to avoid problems with an
1332 * over-bright flashlight.</p>
1333 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
1334 */
1335 @PublicKey
1336 @NonNull
1337 public static final Key<Integer> FLASH_INFO_STRENGTH_MAXIMUM_LEVEL =
1338 new Key<Integer>("android.flash.info.strengthMaximumLevel", int.class);
1339
1340 /**
1341 * <p>Default flashlight brightness level to be set via
1342 * {@link android.hardware.camera2.CameraManager#turnOnTorchWithStrengthLevel }.</p>
1343 * <p>If flash unit is available this will be greater than or equal to 1 and less
1344 * or equal to <code>{@link CameraCharacteristics#FLASH_INFO_STRENGTH_MAXIMUM_LEVEL android.flash.info.strengthMaximumLevel}</code>.</p>
1345 * <p>Setting flashlight brightness above the default level
1346 * (i.e.<code>{@link CameraCharacteristics#FLASH_INFO_STRENGTH_DEFAULT_LEVEL android.flash.info.strengthDefaultLevel}</code>) may make the device more
1347 * likely to reach thermal throttling conditions and slow down, or drain the
1348 * battery quicker than normal. To minimize such issues, it is recommended to
1349 * start the flashlight at this default brightness until a user explicitly requests
1350 * a brighter level.
1351 * Note that the value for this key will be null for devices with no flash unit.
1352 * The default level should always be &gt; 0.</p>
1353 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
1354 *
1355 * @see CameraCharacteristics#FLASH_INFO_STRENGTH_DEFAULT_LEVEL
1356 * @see CameraCharacteristics#FLASH_INFO_STRENGTH_MAXIMUM_LEVEL
1357 */
1358 @PublicKey
1359 @NonNull
1360 public static final Key<Integer> FLASH_INFO_STRENGTH_DEFAULT_LEVEL =
1361 new Key<Integer>("android.flash.info.strengthDefaultLevel", int.class);
1362
1363 /**
1364 * <p>List of hot pixel correction modes for {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode} that are supported by this
1365 * camera device.</p>
1366 * <p>FULL mode camera devices will always support FAST.</p>
1367 * <p><b>Range of valid values:</b><br>
1368 * Any value listed in {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode}</p>
1369 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
1370 *
1371 * @see CaptureRequest#HOT_PIXEL_MODE
1372 */
1373 @PublicKey
1374 @NonNull
1375 public static final Key<int[]> HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES =
1376 new Key<int[]>("android.hotPixel.availableHotPixelModes", int[].class);
1377
1378 /**
1379 * <p>List of JPEG thumbnail sizes for {@link CaptureRequest#JPEG_THUMBNAIL_SIZE android.jpeg.thumbnailSize} supported by this
1380 * camera device.</p>
1381 * <p>This list will include at least one non-zero resolution, plus <code>(0,0)</code> for indicating no
1382 * thumbnail should be generated.</p>
1383 * <p>Below conditions will be satisfied for this size list:</p>
1384 * <ul>
1385 * <li>The sizes will be sorted by increasing pixel area (width x height).
1386 * If several resolutions have the same area, they will be sorted by increasing width.</li>
1387 * <li>The aspect ratio of the largest thumbnail size will be same as the
1388 * aspect ratio of largest JPEG output size in android.scaler.availableStreamConfigurations.
1389 * The largest size is defined as the size that has the largest pixel area
1390 * in a given size list.</li>
1391 * <li>Each output JPEG size in android.scaler.availableStreamConfigurations will have at least
1392 * one corresponding size that has the same aspect ratio in availableThumbnailSizes,
1393 * and vice versa.</li>
1394 * <li>All non-<code>(0, 0)</code> sizes will have non-zero widths and heights.</li>
1395 * </ul>
1396 * <p>This list is also used as supported thumbnail sizes for HEIC image format capture.</p>
1397 * <p>This key is available on all devices.</p>
1398 *
1399 * @see CaptureRequest#JPEG_THUMBNAIL_SIZE
1400 */
1401 @PublicKey
1402 @NonNull
1403 public static final Key<android.util.Size[]> JPEG_AVAILABLE_THUMBNAIL_SIZES =
1404 new Key<android.util.Size[]>("android.jpeg.availableThumbnailSizes", android.util.Size[].class);
1405
1406 /**
1407 * <p>List of aperture size values for {@link CaptureRequest#LENS_APERTURE android.lens.aperture} that are
1408 * supported by this camera device.</p>
1409 * <p>If the camera device doesn't support a variable lens aperture,
1410 * this list will contain only one value, which is the fixed aperture size.</p>
1411 * <p>If the camera device supports a variable aperture, the aperture values
1412 * in this list will be sorted in ascending order.</p>
1413 * <p><b>Units</b>: The aperture f-number</p>
1414 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
1415 * <p><b>Full capability</b> -
1416 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1417 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1418 *
1419 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1420 * @see CaptureRequest#LENS_APERTURE
1421 */
1422 @PublicKey
1423 @NonNull
1424 public static final Key<float[]> LENS_INFO_AVAILABLE_APERTURES =
1425 new Key<float[]>("android.lens.info.availableApertures", float[].class);
1426
1427 /**
1428 * <p>List of neutral density filter values for
1429 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} that are supported by this camera device.</p>
1430 * <p>If a neutral density filter is not supported by this camera device,
1431 * this list will contain only 0. Otherwise, this list will include every
1432 * filter density supported by the camera device, in ascending order.</p>
1433 * <p><b>Units</b>: Exposure value (EV)</p>
1434 * <p><b>Range of valid values:</b><br></p>
1435 * <p>Values are &gt;= 0</p>
1436 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
1437 * <p><b>Full capability</b> -
1438 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1439 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1440 *
1441 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1442 * @see CaptureRequest#LENS_FILTER_DENSITY
1443 */
1444 @PublicKey
1445 @NonNull
1446 public static final Key<float[]> LENS_INFO_AVAILABLE_FILTER_DENSITIES =
1447 new Key<float[]>("android.lens.info.availableFilterDensities", float[].class);
1448
1449 /**
1450 * <p>List of focal lengths for {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength} that are supported by this camera
1451 * device.</p>
1452 * <p>If optical zoom is not supported, this list will only contain
1453 * a single value corresponding to the fixed focal length of the
1454 * device. Otherwise, this list will include every focal length supported
1455 * by the camera device, in ascending order.</p>
1456 * <p><b>Units</b>: Millimeters</p>
1457 * <p><b>Range of valid values:</b><br></p>
1458 * <p>Values are &gt; 0</p>
1459 * <p>This key is available on all devices.</p>
1460 *
1461 * @see CaptureRequest#LENS_FOCAL_LENGTH
1462 */
1463 @PublicKey
1464 @NonNull
1465 public static final Key<float[]> LENS_INFO_AVAILABLE_FOCAL_LENGTHS =
1466 new Key<float[]>("android.lens.info.availableFocalLengths", float[].class);
1467
1468 /**
1469 * <p>List of optical image stabilization (OIS) modes for
1470 * {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} that are supported by this camera device.</p>
1471 * <p>If OIS is not supported by a given camera device, this list will
1472 * contain only OFF.</p>
1473 * <p><b>Range of valid values:</b><br>
1474 * Any value listed in {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}</p>
1475 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
1476 * <p><b>Limited capability</b> -
1477 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1478 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1479 *
1480 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1481 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
1482 */
1483 @PublicKey
1484 @NonNull
1485 public static final Key<int[]> LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION =
1486 new Key<int[]>("android.lens.info.availableOpticalStabilization", int[].class);
1487
1488 /**
1489 * <p>Hyperfocal distance for this lens.</p>
1490 * <p>If the lens is not fixed focus, the camera device will report this
1491 * field when {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} is APPROXIMATE or CALIBRATED.</p>
1492 * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p>
1493 * <p><b>Range of valid values:</b><br>
1494 * If lens is fixed focus, &gt;= 0. If lens has focuser unit, the value is
1495 * within <code>(0.0f, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code></p>
1496 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
1497 * <p><b>Limited capability</b> -
1498 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1499 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1500 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
1501 *
1502 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1503 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
1504 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
1505 */
1506 @PublicKey
1507 @NonNull
1508 public static final Key<Float> LENS_INFO_HYPERFOCAL_DISTANCE =
1509 new Key<Float>("android.lens.info.hyperfocalDistance", float.class);
1510
1511 /**
1512 * <p>Shortest distance from frontmost surface
1513 * of the lens that can be brought into sharp focus.</p>
1514 * <p>If the lens is fixed-focus, this will be
1515 * 0.</p>
1516 * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p>
1517 * <p><b>Range of valid values:</b><br>
1518 * &gt;= 0</p>
1519 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
1520 * <p><b>Limited capability</b> -
1521 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1522 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1523 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
1524 *
1525 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1526 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
1527 */
1528 @PublicKey
1529 @NonNull
1530 public static final Key<Float> LENS_INFO_MINIMUM_FOCUS_DISTANCE =
1531 new Key<Float>("android.lens.info.minimumFocusDistance", float.class);
1532
1533 /**
1534 * <p>Dimensions of lens shading map.</p>
1535 * <p>The map should be on the order of 30-40 rows and columns, and
1536 * must be smaller than 64x64.</p>
1537 * <p><b>Range of valid values:</b><br>
1538 * Both values &gt;= 1</p>
1539 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
1540 * <p><b>Full capability</b> -
1541 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1542 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1543 *
1544 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1545 * @hide
1546 */
1547 public static final Key<android.util.Size> LENS_INFO_SHADING_MAP_SIZE =
1548 new Key<android.util.Size>("android.lens.info.shadingMapSize", android.util.Size.class);
1549
1550 /**
1551 * <p>The lens focus distance calibration quality.</p>
1552 * <p>The lens focus distance calibration quality determines the reliability of
1553 * focus related metadata entries, i.e. {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
1554 * {@link CaptureResult#LENS_FOCUS_RANGE android.lens.focusRange}, {@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}, and
1555 * {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}.</p>
1556 * <p>APPROXIMATE and CALIBRATED devices report the focus metadata in
1557 * units of diopters (1/meter), so <code>0.0f</code> represents focusing at infinity,
1558 * and increasing positive numbers represent focusing closer and closer
1559 * to the camera device. The focus distance control also uses diopters
1560 * on these devices.</p>
1561 * <p>UNCALIBRATED devices do not use units that are directly comparable
1562 * to any real physical measurement, but <code>0.0f</code> still represents farthest
1563 * focus, and {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} represents the
1564 * nearest focus the device can achieve.</p>
1565 * <p><b>Possible values:</b></p>
1566 * <ul>
1567 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED UNCALIBRATED}</li>
1568 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE APPROXIMATE}</li>
1569 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED CALIBRATED}</li>
1570 * </ul>
1571 *
1572 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
1573 * <p><b>Limited capability</b> -
1574 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1575 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1576 *
1577 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1578 * @see CaptureRequest#LENS_FOCUS_DISTANCE
1579 * @see CaptureResult#LENS_FOCUS_RANGE
1580 * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE
1581 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
1582 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED
1583 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE
1584 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED
1585 */
1586 @PublicKey
1587 @NonNull
1588 public static final Key<Integer> LENS_INFO_FOCUS_DISTANCE_CALIBRATION =
1589 new Key<Integer>("android.lens.info.focusDistanceCalibration", int.class);
1590
1591 /**
1592 * <p>Direction the camera faces relative to
1593 * device screen.</p>
1594 * <p><b>Possible values:</b></p>
1595 * <ul>
1596 * <li>{@link #LENS_FACING_FRONT FRONT}</li>
1597 * <li>{@link #LENS_FACING_BACK BACK}</li>
1598 * <li>{@link #LENS_FACING_EXTERNAL EXTERNAL}</li>
1599 * </ul>
1600 *
1601 * <p>This key is available on all devices.</p>
1602 * @see #LENS_FACING_FRONT
1603 * @see #LENS_FACING_BACK
1604 * @see #LENS_FACING_EXTERNAL
1605 */
1606 @PublicKey
1607 @NonNull
1608 public static final Key<Integer> LENS_FACING =
1609 new Key<Integer>("android.lens.facing", int.class);
1610
1611 /**
1612 * <p>The orientation of the camera relative to the sensor
1613 * coordinate system.</p>
1614 * <p>The four coefficients that describe the quaternion
1615 * rotation from the Android sensor coordinate system to a
1616 * camera-aligned coordinate system where the X-axis is
1617 * aligned with the long side of the image sensor, the Y-axis
1618 * is aligned with the short side of the image sensor, and
1619 * the Z-axis is aligned with the optical axis of the sensor.</p>
1620 * <p>To convert from the quaternion coefficients <code>(x,y,z,w)</code>
1621 * to the axis of rotation <code>(a_x, a_y, a_z)</code> and rotation
1622 * amount <code>theta</code>, the following formulas can be used:</p>
1623 * <pre><code> theta = 2 * acos(w)
1624 * a_x = x / sin(theta/2)
1625 * a_y = y / sin(theta/2)
1626 * a_z = z / sin(theta/2)
1627 * </code></pre>
1628 * <p>To create a 3x3 rotation matrix that applies the rotation
1629 * defined by this quaternion, the following matrix can be
1630 * used:</p>
1631 * <pre><code>R = [ 1 - 2y^2 - 2z^2, 2xy - 2zw, 2xz + 2yw,
1632 * 2xy + 2zw, 1 - 2x^2 - 2z^2, 2yz - 2xw,
1633 * 2xz - 2yw, 2yz + 2xw, 1 - 2x^2 - 2y^2 ]
1634 * </code></pre>
1635 * <p>This matrix can then be used to apply the rotation to a
1636 * column vector point with</p>
1637 * <p><code>p' = Rp</code></p>
1638 * <p>where <code>p</code> is in the device sensor coordinate system, and
1639 * <code>p'</code> is in the camera-oriented coordinate system.</p>
1640 * <p>If {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is UNDEFINED, the quaternion rotation cannot
1641 * be accurately represented by the camera device, and will be represented by
1642 * default values matching its default facing.</p>
1643 * <p><b>Units</b>:
1644 * Quaternion coefficients</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_POSE_REFERENCE
1649 */
1650 @PublicKey
1651 @NonNull
1652 public static final Key<float[]> LENS_POSE_ROTATION =
1653 new Key<float[]>("android.lens.poseRotation", float[].class);
1654
1655 /**
1656 * <p>Position of the camera optical center.</p>
1657 * <p>The position of the camera device's lens optical center,
1658 * as a three-dimensional vector <code>(x,y,z)</code>.</p>
1659 * <p>Prior to Android P, or when {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is PRIMARY_CAMERA, this position
1660 * is relative to the optical center of the largest camera device facing in the same
1661 * direction as this camera, in the {@link android.hardware.SensorEvent Android sensor
1662 * coordinate axes}. Note that only the axis definitions are shared with the sensor
1663 * coordinate system, but not the origin.</p>
1664 * <p>If this device is the largest or only camera device with a given facing, then this
1665 * position will be <code>(0, 0, 0)</code>; a camera device with a lens optical center located 3 cm
1666 * from the main sensor along the +X axis (to the right from the user's perspective) will
1667 * report <code>(0.03, 0, 0)</code>. Note that this means that, for many computer vision
1668 * applications, the position needs to be negated to convert it to a translation from the
1669 * camera to the origin.</p>
1670 * <p>To transform a pixel coordinates between two cameras facing the same direction, first
1671 * the source camera {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} must be corrected for. Then the source
1672 * camera {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} needs to be applied, followed by the
1673 * {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the source camera, the translation of the source camera
1674 * relative to the destination camera, the {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the destination
1675 * camera, and finally the inverse of {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} of the destination
1676 * camera. This obtains a radial-distortion-free coordinate in the destination camera pixel
1677 * coordinates.</p>
1678 * <p>To compare this against a real image from the destination camera, the destination camera
1679 * image then needs to be corrected for radial distortion before comparison or sampling.</p>
1680 * <p>When {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is GYROSCOPE, then this position is relative to
1681 * the center of the primary gyroscope on the device. The axis definitions are the same as
1682 * with PRIMARY_CAMERA.</p>
1683 * <p>When {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is UNDEFINED, this position cannot be accurately
1684 * represented by the camera device, and will be represented as <code>(0, 0, 0)</code>.</p>
1685 * <p>When {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is AUTOMOTIVE, then this position is relative to the
1686 * origin of the automotive sensor coordinate system, which is at the center of the rear
1687 * axle.</p>
1688 * <p><b>Units</b>: Meters</p>
1689 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
1690 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
1691 *
1692 * @see CameraCharacteristics#LENS_DISTORTION
1693 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
1694 * @see CameraCharacteristics#LENS_POSE_REFERENCE
1695 * @see CameraCharacteristics#LENS_POSE_ROTATION
1696 */
1697 @PublicKey
1698 @NonNull
1699 public static final Key<float[]> LENS_POSE_TRANSLATION =
1700 new Key<float[]>("android.lens.poseTranslation", float[].class);
1701
1702 /**
1703 * <p>The parameters for this camera device's intrinsic
1704 * calibration.</p>
1705 * <p>The five calibration parameters that describe the
1706 * transform from camera-centric 3D coordinates to sensor
1707 * pixel coordinates:</p>
1708 * <pre><code>[f_x, f_y, c_x, c_y, s]
1709 * </code></pre>
1710 * <p>Where <code>f_x</code> and <code>f_y</code> are the horizontal and vertical
1711 * focal lengths, <code>[c_x, c_y]</code> is the position of the optical
1712 * axis, and <code>s</code> is a skew parameter for the sensor plane not
1713 * being aligned with the lens plane.</p>
1714 * <p>These are typically used within a transformation matrix K:</p>
1715 * <pre><code>K = [ f_x, s, c_x,
1716 * 0, f_y, c_y,
1717 * 0 0, 1 ]
1718 * </code></pre>
1719 * <p>which can then be combined with the camera pose rotation
1720 * <code>R</code> and translation <code>t</code> ({@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} and
1721 * {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}, respectively) to calculate the
1722 * complete transform from world coordinates to pixel
1723 * coordinates:</p>
1724 * <pre><code>P = [ K 0 * [ R -Rt
1725 * 0 1 ] 0 1 ]
1726 * </code></pre>
1727 * <p>(Note the negation of poseTranslation when mapping from camera
1728 * to world coordinates, and multiplication by the rotation).</p>
1729 * <p>With <code>p_w</code> being a point in the world coordinate system
1730 * and <code>p_s</code> being a point in the camera active pixel array
1731 * coordinate system, and with the mapping including the
1732 * homogeneous division by z:</p>
1733 * <pre><code> p_h = (x_h, y_h, z_h) = P p_w
1734 * p_s = p_h / z_h
1735 * </code></pre>
1736 * <p>so <code>[x_s, y_s]</code> is the pixel coordinates of the world
1737 * point, <code>z_s = 1</code>, and <code>w_s</code> is a measurement of disparity
1738 * (depth) in pixel coordinates.</p>
1739 * <p>Note that the coordinate system for this transform is the
1740 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} system,
1741 * where <code>(0,0)</code> is the top-left of the
1742 * preCorrectionActiveArraySize rectangle. Once the pose and
1743 * intrinsic calibration transforms have been applied to a
1744 * world point, then the {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}
1745 * transform needs to be applied, and the result adjusted to
1746 * be in the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} coordinate
1747 * system (where <code>(0, 0)</code> is the top-left of the
1748 * activeArraySize rectangle), to determine the final pixel
1749 * coordinate of the world point for processed (non-RAW)
1750 * output buffers.</p>
1751 * <p>For camera devices, the center of pixel <code>(x,y)</code> is located at
1752 * coordinate <code>(x + 0.5, y + 0.5)</code>. So on a device with a
1753 * precorrection active array of size <code>(10,10)</code>, the valid pixel
1754 * indices go from <code>(0,0)-(9,9)</code>, and an perfectly-built camera would
1755 * have an optical center at the exact center of the pixel grid, at
1756 * coordinates <code>(5.0, 5.0)</code>, which is the top-left corner of pixel
1757 * <code>(5,5)</code>.</p>
1758 * <p><b>Units</b>:
1759 * Pixels in the
1760 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}
1761 * coordinate system.</p>
1762 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
1763 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
1764 *
1765 * @see CameraCharacteristics#LENS_DISTORTION
1766 * @see CameraCharacteristics#LENS_POSE_ROTATION
1767 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
1768 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
1769 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
1770 */
1771 @PublicKey
1772 @NonNull
1773 public static final Key<float[]> LENS_INTRINSIC_CALIBRATION =
1774 new Key<float[]>("android.lens.intrinsicCalibration", float[].class);
1775
1776 /**
1777 * <p>The correction coefficients to correct for this camera device's
1778 * radial and tangential lens distortion.</p>
1779 * <p>Four radial distortion coefficients <code>[kappa_0, kappa_1, kappa_2,
1780 * kappa_3]</code> and two tangential distortion coefficients
1781 * <code>[kappa_4, kappa_5]</code> that can be used to correct the
1782 * lens's geometric distortion with the mapping equations:</p>
1783 * <pre><code> x_c = x_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
1784 * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
1785 * y_c = y_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
1786 * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
1787 * </code></pre>
1788 * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the
1789 * input image that correspond to the pixel values in the
1790 * corrected image at the coordinate <code>[x_i, y_i]</code>:</p>
1791 * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
1792 * </code></pre>
1793 * <p>The pixel coordinates are defined in a normalized
1794 * coordinate system related to the
1795 * {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} calibration fields.
1796 * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code> have <code>(0,0)</code> at the
1797 * lens optical center <code>[c_x, c_y]</code>. The maximum magnitudes
1798 * of both x and y coordinates are normalized to be 1 at the
1799 * edge further from the optical center, so the range
1800 * for both dimensions is <code>-1 &lt;= x &lt;= 1</code>.</p>
1801 * <p>Finally, <code>r</code> represents the radial distance from the
1802 * optical center, <code>r^2 = x_i^2 + y_i^2</code>, and its magnitude
1803 * is therefore no larger than <code>|r| &lt;= sqrt(2)</code>.</p>
1804 * <p>The distortion model used is the Brown-Conrady model.</p>
1805 * <p><b>Units</b>:
1806 * Unitless coefficients.</p>
1807 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
1808 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
1809 *
1810 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
1811 * @deprecated
1812 * <p>This field was inconsistently defined in terms of its
1813 * normalization. Use {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} instead.</p>
1814 *
1815 * @see CameraCharacteristics#LENS_DISTORTION
1816
1817 */
1818 @Deprecated
1819 @PublicKey
1820 @NonNull
1821 public static final Key<float[]> LENS_RADIAL_DISTORTION =
1822 new Key<float[]>("android.lens.radialDistortion", float[].class);
1823
1824 /**
1825 * <p>The origin for {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}, and the accuracy of
1826 * {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation} and {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}.</p>
1827 * <p>Different calibration methods and use cases can produce better or worse results
1828 * depending on the selected coordinate origin.</p>
1829 * <p><b>Possible values:</b></p>
1830 * <ul>
1831 * <li>{@link #LENS_POSE_REFERENCE_PRIMARY_CAMERA PRIMARY_CAMERA}</li>
1832 * <li>{@link #LENS_POSE_REFERENCE_GYROSCOPE GYROSCOPE}</li>
1833 * <li>{@link #LENS_POSE_REFERENCE_UNDEFINED UNDEFINED}</li>
1834 * <li>{@link #LENS_POSE_REFERENCE_AUTOMOTIVE AUTOMOTIVE}</li>
1835 * </ul>
1836 *
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_POSE_ROTATION
1841 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
1842 * @see #LENS_POSE_REFERENCE_PRIMARY_CAMERA
1843 * @see #LENS_POSE_REFERENCE_GYROSCOPE
1844 * @see #LENS_POSE_REFERENCE_UNDEFINED
1845 * @see #LENS_POSE_REFERENCE_AUTOMOTIVE
1846 */
1847 @PublicKey
1848 @NonNull
1849 public static final Key<Integer> LENS_POSE_REFERENCE =
1850 new Key<Integer>("android.lens.poseReference", int.class);
1851
1852 /**
1853 * <p>The correction coefficients to correct for this camera device's
1854 * radial and tangential lens distortion.</p>
1855 * <p>Replaces the deprecated {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion} field, which was
1856 * inconsistently defined.</p>
1857 * <p>Three radial distortion coefficients <code>[kappa_1, kappa_2,
1858 * kappa_3]</code> and two tangential distortion coefficients
1859 * <code>[kappa_4, kappa_5]</code> that can be used to correct the
1860 * lens's geometric distortion with the mapping equations:</p>
1861 * <pre><code> x_c = x_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
1862 * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
1863 * y_c = y_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
1864 * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
1865 * </code></pre>
1866 * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the
1867 * input image that correspond to the pixel values in the
1868 * corrected image at the coordinate <code>[x_i, y_i]</code>:</p>
1869 * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
1870 * </code></pre>
1871 * <p>The pixel coordinates are defined in a coordinate system
1872 * related to the {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}
1873 * calibration fields; see that entry for details of the mapping stages.
1874 * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code>
1875 * have <code>(0,0)</code> at the lens optical center <code>[c_x, c_y]</code>, and
1876 * the range of the coordinates depends on the focal length
1877 * terms of the intrinsic calibration.</p>
1878 * <p>Finally, <code>r</code> represents the radial distance from the
1879 * optical center, <code>r^2 = x_i^2 + y_i^2</code>.</p>
1880 * <p>The distortion model used is the Brown-Conrady model.</p>
1881 * <p><b>Units</b>:
1882 * Unitless coefficients.</p>
1883 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
1884 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
1885 *
1886 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
1887 * @see CameraCharacteristics#LENS_RADIAL_DISTORTION
1888 */
1889 @PublicKey
1890 @NonNull
1891 public static final Key<float[]> LENS_DISTORTION =
1892 new Key<float[]>("android.lens.distortion", float[].class);
1893
1894 /**
1895 * <p>The correction coefficients to correct for this camera device's
1896 * radial and tangential lens distortion for a
1897 * CaptureRequest with {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} set to
1898 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
1899 * <p>Analogous to {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}, when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
1900 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
1901 * <p><b>Units</b>:
1902 * Unitless coefficients.</p>
1903 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
1904 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
1905 *
1906 * @see CameraCharacteristics#LENS_DISTORTION
1907 * @see CaptureRequest#SENSOR_PIXEL_MODE
1908 */
1909 @PublicKey
1910 @NonNull
1911 public static final Key<float[]> LENS_DISTORTION_MAXIMUM_RESOLUTION =
1912 new Key<float[]>("android.lens.distortionMaximumResolution", float[].class);
1913
1914 /**
1915 * <p>The parameters for this camera device's intrinsic
1916 * calibration when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
1917 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
1918 * <p>Analogous to {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}, when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
1919 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
1920 * <p><b>Units</b>:
1921 * Pixels in the
1922 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION android.sensor.info.preCorrectionActiveArraySizeMaximumResolution}
1923 * coordinate system.</p>
1924 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
1925 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
1926 *
1927 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
1928 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
1929 * @see CaptureRequest#SENSOR_PIXEL_MODE
1930 */
1931 @PublicKey
1932 @NonNull
1933 public static final Key<float[]> LENS_INTRINSIC_CALIBRATION_MAXIMUM_RESOLUTION =
1934 new Key<float[]>("android.lens.intrinsicCalibrationMaximumResolution", float[].class);
1935
1936 /**
1937 * <p>List of noise reduction modes for {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode} that are supported
1938 * by this camera device.</p>
1939 * <p>Full-capability camera devices will always support OFF and FAST.</p>
1940 * <p>Camera devices that support YUV_REPROCESSING or PRIVATE_REPROCESSING will support
1941 * ZERO_SHUTTER_LAG.</p>
1942 * <p>Legacy-capability camera devices will only support FAST mode.</p>
1943 * <p><b>Range of valid values:</b><br>
1944 * Any value listed in {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</p>
1945 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
1946 * <p><b>Limited capability</b> -
1947 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1948 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1949 *
1950 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1951 * @see CaptureRequest#NOISE_REDUCTION_MODE
1952 */
1953 @PublicKey
1954 @NonNull
1955 public static final Key<int[]> NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES =
1956 new Key<int[]>("android.noiseReduction.availableNoiseReductionModes", int[].class);
1957
1958 /**
1959 * <p>If set to 1, the HAL will always split result
1960 * metadata for a single capture into multiple buffers,
1961 * returned using multiple process_capture_result calls.</p>
1962 * <p>Does not need to be listed in static
1963 * metadata. Support for partial results will be reworked in
1964 * future versions of camera service. This quirk will stop
1965 * working at that point; DO NOT USE without careful
1966 * consideration of future support.</p>
1967 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
1968 * @deprecated
1969 * <p>Not used in HALv3 or newer; replaced by better partials mechanism</p>
1970
1971 * @hide
1972 */
1973 @Deprecated
1974 public static final Key<Byte> QUIRKS_USE_PARTIAL_RESULT =
1975 new Key<Byte>("android.quirks.usePartialResult", byte.class);
1976
1977 /**
1978 * <p>The maximum numbers of different types of output streams
1979 * that can be configured and used simultaneously by a camera device.</p>
1980 * <p>This is a 3 element tuple that contains the max number of output simultaneous
1981 * streams for raw sensor, processed (but not stalling), and processed (and stalling)
1982 * formats respectively. For example, assuming that JPEG is typically a processed and
1983 * stalling stream, if max raw sensor format output stream number is 1, max YUV streams
1984 * number is 3, and max JPEG stream number is 2, then this tuple should be <code>(1, 3, 2)</code>.</p>
1985 * <p>This lists the upper bound of the number of output streams supported by
1986 * the camera device. Using more streams simultaneously may require more hardware and
1987 * CPU resources that will consume more power. The image format for an output stream can
1988 * be any supported format provided by android.scaler.availableStreamConfigurations.
1989 * The formats defined in android.scaler.availableStreamConfigurations can be categorized
1990 * into the 3 stream types as below:</p>
1991 * <ul>
1992 * <li>Processed (but stalling): any non-RAW format with a stallDurations &gt; 0.
1993 * Typically {@link android.graphics.ImageFormat#JPEG JPEG format}.</li>
1994 * <li>Raw formats: {@link android.graphics.ImageFormat#RAW_SENSOR RAW_SENSOR}, {@link android.graphics.ImageFormat#RAW10 RAW10}, or
1995 * {@link android.graphics.ImageFormat#RAW12 RAW12}.</li>
1996 * <li>Processed (but not-stalling): any non-RAW format without a stall duration. Typically
1997 * {@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888},
1998 * {@link android.graphics.ImageFormat#NV21 NV21}, {@link android.graphics.ImageFormat#YV12 YV12}, or {@link android.graphics.ImageFormat#Y8 Y8} .</li>
1999 * </ul>
2000 * <p><b>Range of valid values:</b><br></p>
2001 * <p>For processed (and stalling) format streams, &gt;= 1.</p>
2002 * <p>For Raw format (either stalling or non-stalling) streams, &gt;= 0.</p>
2003 * <p>For processed (but not stalling) format streams, &gt;= 3
2004 * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>);
2005 * &gt;= 2 for LIMITED mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == LIMITED</code>).</p>
2006 * <p>This key is available on all devices.</p>
2007 *
2008 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2009 * @hide
2010 */
2011 public static final Key<int[]> REQUEST_MAX_NUM_OUTPUT_STREAMS =
2012 new Key<int[]>("android.request.maxNumOutputStreams", int[].class);
2013
2014 /**
2015 * <p>The maximum numbers of different types of output streams
2016 * that can be configured and used simultaneously by a camera device
2017 * for any <code>RAW</code> formats.</p>
2018 * <p>This value contains the max number of output simultaneous
2019 * streams from the raw sensor.</p>
2020 * <p>This lists the upper bound of the number of output streams supported by
2021 * the camera device. Using more streams simultaneously may require more hardware and
2022 * CPU resources that will consume more power. The image format for this kind of an output stream can
2023 * be any <code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p>
2024 * <p>In particular, a <code>RAW</code> format is typically one of:</p>
2025 * <ul>
2026 * <li>{@link android.graphics.ImageFormat#RAW_SENSOR RAW_SENSOR}</li>
2027 * <li>{@link android.graphics.ImageFormat#RAW10 RAW10}</li>
2028 * <li>{@link android.graphics.ImageFormat#RAW12 RAW12}</li>
2029 * </ul>
2030 * <p>LEGACY mode devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> LEGACY)
2031 * never support raw streams.</p>
2032 * <p><b>Range of valid values:</b><br></p>
2033 * <p>&gt;= 0</p>
2034 * <p>This key is available on all devices.</p>
2035 *
2036 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2037 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
2038 */
2039 @PublicKey
2040 @NonNull
2041 @SyntheticKey
2042 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_RAW =
2043 new Key<Integer>("android.request.maxNumOutputRaw", int.class);
2044
2045 /**
2046 * <p>The maximum numbers of different types of output streams
2047 * that can be configured and used simultaneously by a camera device
2048 * for any processed (but not-stalling) formats.</p>
2049 * <p>This value contains the max number of output simultaneous
2050 * streams for any processed (but not-stalling) formats.</p>
2051 * <p>This lists the upper bound of the number of output streams supported by
2052 * the camera device. Using more streams simultaneously may require more hardware and
2053 * CPU resources that will consume more power. The image format for this kind of an output stream can
2054 * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p>
2055 * <p>Processed (but not-stalling) is defined as any non-RAW format without a stall duration.
2056 * Typically:</p>
2057 * <ul>
2058 * <li>{@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888}</li>
2059 * <li>{@link android.graphics.ImageFormat#NV21 NV21}</li>
2060 * <li>{@link android.graphics.ImageFormat#YV12 YV12}</li>
2061 * <li>Implementation-defined formats, i.e. {@link android.hardware.camera2.params.StreamConfigurationMap#isOutputSupportedFor(Class) }</li>
2062 * <li>{@link android.graphics.ImageFormat#Y8 Y8}</li>
2063 * </ul>
2064 * <p>For full guarantees, query {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } with a
2065 * processed format -- it will return 0 for a non-stalling stream.</p>
2066 * <p>LEGACY devices will support at least 2 processing/non-stalling streams.</p>
2067 * <p><b>Range of valid values:</b><br></p>
2068 * <p>&gt;= 3
2069 * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>);
2070 * &gt;= 2 for LIMITED mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == LIMITED</code>).</p>
2071 * <p>This key is available on all devices.</p>
2072 *
2073 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2074 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
2075 */
2076 @PublicKey
2077 @NonNull
2078 @SyntheticKey
2079 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC =
2080 new Key<Integer>("android.request.maxNumOutputProc", int.class);
2081
2082 /**
2083 * <p>The maximum numbers of different types of output streams
2084 * that can be configured and used simultaneously by a camera device
2085 * for any processed (and stalling) formats.</p>
2086 * <p>This value contains the max number of output simultaneous
2087 * streams for any processed (but not-stalling) formats.</p>
2088 * <p>This lists the upper bound of the number of output streams supported by
2089 * the camera device. Using more streams simultaneously may require more hardware and
2090 * CPU resources that will consume more power. The image format for this kind of an output stream can
2091 * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p>
2092 * <p>A processed and stalling format is defined as any non-RAW format with a stallDurations
2093 * &gt; 0. Typically only the {@link android.graphics.ImageFormat#JPEG JPEG format} is a stalling format.</p>
2094 * <p>For full guarantees, query {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } with a
2095 * processed format -- it will return a non-0 value for a stalling stream.</p>
2096 * <p>LEGACY devices will support up to 1 processing/stalling stream.</p>
2097 * <p><b>Range of valid values:</b><br></p>
2098 * <p>&gt;= 1</p>
2099 * <p>This key is available on all devices.</p>
2100 *
2101 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
2102 */
2103 @PublicKey
2104 @NonNull
2105 @SyntheticKey
2106 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC_STALLING =
2107 new Key<Integer>("android.request.maxNumOutputProcStalling", int.class);
2108
2109 /**
2110 * <p>The maximum numbers of any type of input streams
2111 * that can be configured and used simultaneously by a camera device.</p>
2112 * <p>When set to 0, it means no input stream is supported.</p>
2113 * <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
2114 * input stream, there must be at least one output stream configured to to receive the
2115 * reprocessed images.</p>
2116 * <p>When an input stream and some output streams are used in a reprocessing request,
2117 * only the input buffer will be used to produce these output stream buffers, and a
2118 * new sensor image will not be captured.</p>
2119 * <p>For example, for Zero Shutter Lag (ZSL) still capture use case, the input
2120 * stream image format will be PRIVATE, the associated output stream image format
2121 * should be JPEG.</p>
2122 * <p><b>Range of valid values:</b><br></p>
2123 * <p>0 or 1.</p>
2124 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
2125 * <p><b>Full capability</b> -
2126 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2127 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
2128 *
2129 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2130 */
2131 @PublicKey
2132 @NonNull
2133 public static final Key<Integer> REQUEST_MAX_NUM_INPUT_STREAMS =
2134 new Key<Integer>("android.request.maxNumInputStreams", int.class);
2135
2136 /**
2137 * <p>Specifies the number of maximum pipeline stages a frame
2138 * has to go through from when it's exposed to when it's available
2139 * to the framework.</p>
2140 * <p>A typical minimum value for this is 2 (one stage to expose,
2141 * one stage to readout) from the sensor. The ISP then usually adds
2142 * its own stages to do custom HW processing. Further stages may be
2143 * added by SW processing.</p>
2144 * <p>Depending on what settings are used (e.g. YUV, JPEG) and what
2145 * processing is enabled (e.g. face detection), the actual pipeline
2146 * depth (specified by {@link CaptureResult#REQUEST_PIPELINE_DEPTH android.request.pipelineDepth}) may be less than
2147 * the max pipeline depth.</p>
2148 * <p>A pipeline depth of X stages is equivalent to a pipeline latency of
2149 * X frame intervals.</p>
2150 * <p>This value will normally be 8 or less, however, for high speed capture session,
2151 * the max pipeline depth will be up to 8 x size of high speed capture request list.</p>
2152 * <p>This key is available on all devices.</p>
2153 *
2154 * @see CaptureResult#REQUEST_PIPELINE_DEPTH
2155 */
2156 @PublicKey
2157 @NonNull
2158 public static final Key<Byte> REQUEST_PIPELINE_MAX_DEPTH =
2159 new Key<Byte>("android.request.pipelineMaxDepth", byte.class);
2160
2161 /**
2162 * <p>Defines how many sub-components
2163 * a result will be composed of.</p>
2164 * <p>In order to combat the pipeline latency, partial results
2165 * may be delivered to the application layer from the camera device as
2166 * soon as they are available.</p>
2167 * <p>Optional; defaults to 1. A value of 1 means that partial
2168 * results are not supported, and only the final TotalCaptureResult will
2169 * be produced by the camera device.</p>
2170 * <p>A typical use case for this might be: after requesting an
2171 * auto-focus (AF) lock the new AF state might be available 50%
2172 * of the way through the pipeline. The camera device could
2173 * then immediately dispatch this state via a partial result to
2174 * the application, and the rest of the metadata via later
2175 * partial results.</p>
2176 * <p><b>Range of valid values:</b><br>
2177 * &gt;= 1</p>
2178 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
2179 */
2180 @PublicKey
2181 @NonNull
2182 public static final Key<Integer> REQUEST_PARTIAL_RESULT_COUNT =
2183 new Key<Integer>("android.request.partialResultCount", int.class);
2184
2185 /**
2186 * <p>List of capabilities that this camera device
2187 * advertises as fully supporting.</p>
2188 * <p>A capability is a contract that the camera device makes in order
2189 * to be able to satisfy one or more use cases.</p>
2190 * <p>Listing a capability guarantees that the whole set of features
2191 * required to support a common use will all be available.</p>
2192 * <p>Using a subset of the functionality provided by an unsupported
2193 * capability may be possible on a specific camera device implementation;
2194 * to do this query each of android.request.availableRequestKeys,
2195 * android.request.availableResultKeys,
2196 * android.request.availableCharacteristicsKeys.</p>
2197 * <p>The following capabilities are guaranteed to be available on
2198 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL devices:</p>
2199 * <ul>
2200 * <li>MANUAL_SENSOR</li>
2201 * <li>MANUAL_POST_PROCESSING</li>
2202 * </ul>
2203 * <p>Other capabilities may be available on either FULL or LIMITED
2204 * devices, but the application should query this key to be sure.</p>
2205 * <p><b>Possible values:</b></p>
2206 * <ul>
2207 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE BACKWARD_COMPATIBLE}</li>
2208 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR MANUAL_SENSOR}</li>
2209 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING MANUAL_POST_PROCESSING}</li>
2210 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_RAW RAW}</li>
2211 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING PRIVATE_REPROCESSING}</li>
2212 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS READ_SENSOR_SETTINGS}</li>
2213 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE BURST_CAPTURE}</li>
2214 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING YUV_REPROCESSING}</li>
2215 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT DEPTH_OUTPUT}</li>
2216 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO CONSTRAINED_HIGH_SPEED_VIDEO}</li>
2217 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING MOTION_TRACKING}</li>
2218 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA LOGICAL_MULTI_CAMERA}</li>
2219 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME MONOCHROME}</li>
2220 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA SECURE_IMAGE_DATA}</li>
2221 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_SYSTEM_CAMERA SYSTEM_CAMERA}</li>
2222 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_OFFLINE_PROCESSING OFFLINE_PROCESSING}</li>
2223 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR ULTRA_HIGH_RESOLUTION_SENSOR}</li>
2224 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_REMOSAIC_REPROCESSING REMOSAIC_REPROCESSING}</li>
2225 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT DYNAMIC_RANGE_TEN_BIT}</li>
2226 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE STREAM_USE_CASE}</li>
2227 * </ul>
2228 *
2229 * <p>This key is available on all devices.</p>
2230 *
2231 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2232 * @see #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE
2233 * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR
2234 * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING
2235 * @see #REQUEST_AVAILABLE_CAPABILITIES_RAW
2236 * @see #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING
2237 * @see #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS
2238 * @see #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE
2239 * @see #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING
2240 * @see #REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT
2241 * @see #REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO
2242 * @see #REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING
2243 * @see #REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA
2244 * @see #REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME
2245 * @see #REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA
2246 * @see #REQUEST_AVAILABLE_CAPABILITIES_SYSTEM_CAMERA
2247 * @see #REQUEST_AVAILABLE_CAPABILITIES_OFFLINE_PROCESSING
2248 * @see #REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR
2249 * @see #REQUEST_AVAILABLE_CAPABILITIES_REMOSAIC_REPROCESSING
2250 * @see #REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT
2251 * @see #REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE
2252 */
2253 @PublicKey
2254 @NonNull
2255 public static final Key<int[]> REQUEST_AVAILABLE_CAPABILITIES =
2256 new Key<int[]>("android.request.availableCapabilities", int[].class);
2257
2258 /**
2259 * <p>A list of all keys that the camera device has available
2260 * to use with {@link android.hardware.camera2.CaptureRequest }.</p>
2261 * <p>Attempting to set a key into a CaptureRequest that is not
2262 * listed here will result in an invalid request and will be rejected
2263 * by the camera device.</p>
2264 * <p>This field can be used to query the feature set of a camera device
2265 * at a more granular level than capabilities. This is especially
2266 * important for optional keys that are not listed under any capability
2267 * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
2268 * <p>This key is available on all devices.</p>
2269 *
2270 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2271 * @hide
2272 */
2273 public static final Key<int[]> REQUEST_AVAILABLE_REQUEST_KEYS =
2274 new Key<int[]>("android.request.availableRequestKeys", int[].class);
2275
2276 /**
2277 * <p>A list of all keys that the camera device has available to use with {@link android.hardware.camera2.CaptureResult }.</p>
2278 * <p>Attempting to get a key from a CaptureResult that is not
2279 * listed here will always return a <code>null</code> value. Getting a key from
2280 * a CaptureResult that is listed here will generally never return a <code>null</code>
2281 * value.</p>
2282 * <p>The following keys may return <code>null</code> unless they are enabled:</p>
2283 * <ul>
2284 * <li>android.statistics.lensShadingMap (non-null iff {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON)</li>
2285 * </ul>
2286 * <p>(Those sometimes-null keys will nevertheless be listed here
2287 * if they are available.)</p>
2288 * <p>This field can be used to query the feature set of a camera device
2289 * at a more granular level than capabilities. This is especially
2290 * important for optional keys that are not listed under any capability
2291 * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
2292 * <p>This key is available on all devices.</p>
2293 *
2294 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2295 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
2296 * @hide
2297 */
2298 public static final Key<int[]> REQUEST_AVAILABLE_RESULT_KEYS =
2299 new Key<int[]>("android.request.availableResultKeys", int[].class);
2300
2301 /**
2302 * <p>A list of all keys that the camera device has available to use with {@link android.hardware.camera2.CameraCharacteristics }.</p>
2303 * <p>This entry follows the same rules as
2304 * android.request.availableResultKeys (except that it applies for
2305 * CameraCharacteristics instead of CaptureResult). See above for more
2306 * details.</p>
2307 * <p>This key is available on all devices.</p>
2308 * @hide
2309 */
2310 public static final Key<int[]> REQUEST_AVAILABLE_CHARACTERISTICS_KEYS =
2311 new Key<int[]>("android.request.availableCharacteristicsKeys", int[].class);
2312
2313 /**
2314 * <p>A subset of the available request keys that the camera device
2315 * can pass as part of the capture session initialization.</p>
2316 * <p>This is a subset of android.request.availableRequestKeys which
2317 * contains a list of keys that are difficult to apply per-frame and
2318 * can result in unexpected delays when modified during the capture session
2319 * lifetime. Typical examples include parameters that require a
2320 * time-consuming hardware re-configuration or internal camera pipeline
2321 * change. For performance reasons we advise clients to pass their initial
2322 * values as part of
2323 * {@link SessionConfiguration#setSessionParameters }.
2324 * Once the camera capture session is enabled it is also recommended to avoid
2325 * changing them from their initial values set in
2326 * {@link SessionConfiguration#setSessionParameters }.
2327 * Control over session parameters can still be exerted in capture requests
2328 * but clients should be aware and expect delays during their application.
2329 * An example usage scenario could look like this:</p>
2330 * <ul>
2331 * <li>The camera client starts by querying the session parameter key list via
2332 * {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys }.</li>
2333 * <li>Before triggering the capture session create sequence, a capture request
2334 * must be built via
2335 * {@link CameraDevice#createCaptureRequest }
2336 * using an appropriate template matching the particular use case.</li>
2337 * <li>The client should go over the list of session parameters and check
2338 * whether some of the keys listed matches with the parameters that
2339 * they intend to modify as part of the first capture request.</li>
2340 * <li>If there is no such match, the capture request can be passed
2341 * unmodified to
2342 * {@link SessionConfiguration#setSessionParameters }.</li>
2343 * <li>If matches do exist, the client should update the respective values
2344 * and pass the request to
2345 * {@link SessionConfiguration#setSessionParameters }.</li>
2346 * <li>After the capture session initialization completes the session parameter
2347 * key list can continue to serve as reference when posting or updating
2348 * further requests. As mentioned above further changes to session
2349 * parameters should ideally be avoided, if updates are necessary
2350 * however clients could expect a delay/glitch during the
2351 * parameter switch.</li>
2352 * </ul>
2353 * <p>This key is available on all devices.</p>
2354 * @hide
2355 */
2356 public static final Key<int[]> REQUEST_AVAILABLE_SESSION_KEYS =
2357 new Key<int[]>("android.request.availableSessionKeys", int[].class);
2358
2359 /**
2360 * <p>A subset of the available request keys that can be overridden for
2361 * physical devices backing a logical multi-camera.</p>
2362 * <p>This is a subset of android.request.availableRequestKeys which contains a list
2363 * of keys that can be overridden using
2364 * {@link android.hardware.camera2.CaptureRequest.Builder#setPhysicalCameraKey }.
2365 * The respective value of such request key can be obtained by calling
2366 * {@link android.hardware.camera2.CaptureRequest.Builder#getPhysicalCameraKey }.
2367 * Capture requests that contain individual physical device requests must be built via
2368 * {@link android.hardware.camera2.CameraDevice#createCaptureRequest(int, Set)}.</p>
2369 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
2370 * <p><b>Limited capability</b> -
2371 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
2372 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
2373 *
2374 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2375 * @hide
2376 */
2377 public static final Key<int[]> REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS =
2378 new Key<int[]>("android.request.availablePhysicalCameraRequestKeys", int[].class);
2379
2380 /**
2381 * <p>A list of camera characteristics keys that are only available
2382 * in case the camera client has camera permission.</p>
2383 * <p>The entry contains a subset of
2384 * {@link android.hardware.camera2.CameraCharacteristics#getKeys } that require camera clients
2385 * to acquire the {@link android.Manifest.permission#CAMERA } permission before calling
2386 * {@link android.hardware.camera2.CameraManager#getCameraCharacteristics }. If the
2387 * permission is not held by the camera client, then the values of the respective properties
2388 * will not be present in {@link android.hardware.camera2.CameraCharacteristics }.</p>
2389 * <p>This key is available on all devices.</p>
2390 * @hide
2391 */
2392 public static final Key<int[]> REQUEST_CHARACTERISTIC_KEYS_NEEDING_PERMISSION =
2393 new Key<int[]>("android.request.characteristicKeysNeedingPermission", int[].class);
2394
2395 /**
2396 * <p>Devices supporting the 10-bit output capability
2397 * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT }
2398 * must list their supported dynamic range profiles along with capture request
2399 * constraints for specific profile combinations.</p>
2400 * <p>Camera clients can retrieve the list of supported 10-bit dynamic range profiles by calling
2401 * {@link android.hardware.camera2.params.DynamicRangeProfiles#getSupportedProfiles }.
2402 * Any of them can be configured by setting OutputConfiguration dynamic range profile in
2403 * {@link android.hardware.camera2.params.OutputConfiguration#setDynamicRangeProfile }.
2404 * Clients can also check if there are any constraints that limit the combination
2405 * of supported profiles that can be referenced within a single capture request by calling
2406 * {@link android.hardware.camera2.params.DynamicRangeProfiles#getProfileCaptureRequestConstraints }.</p>
2407 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
2408 */
2409 @PublicKey
2410 @NonNull
2411 @SyntheticKey
2412 public static final Key<android.hardware.camera2.params.DynamicRangeProfiles> REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES =
2413 new Key<android.hardware.camera2.params.DynamicRangeProfiles>("android.request.availableDynamicRangeProfiles", android.hardware.camera2.params.DynamicRangeProfiles.class);
2414
2415 /**
2416 * <p>A map of all available 10-bit dynamic range profiles along with their
2417 * capture request constraints.</p>
2418 * <p>Devices supporting the 10-bit output capability
2419 * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT }
2420 * must list their supported dynamic range profiles. In case the camera is not able to
2421 * support every possible profile combination within a single capture request, then the
2422 * constraints must be listed here as well.</p>
2423 * <p><b>Possible values:</b></p>
2424 * <ul>
2425 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD STANDARD}</li>
2426 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HLG10 HLG10}</li>
2427 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10 HDR10}</li>
2428 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10_PLUS HDR10_PLUS}</li>
2429 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF DOLBY_VISION_10B_HDR_REF}</li>
2430 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF_PO DOLBY_VISION_10B_HDR_REF_PO}</li>
2431 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM DOLBY_VISION_10B_HDR_OEM}</li>
2432 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM_PO DOLBY_VISION_10B_HDR_OEM_PO}</li>
2433 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF DOLBY_VISION_8B_HDR_REF}</li>
2434 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF_PO DOLBY_VISION_8B_HDR_REF_PO}</li>
2435 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM DOLBY_VISION_8B_HDR_OEM}</li>
2436 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM_PO DOLBY_VISION_8B_HDR_OEM_PO}</li>
2437 * <li>{@link #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_MAX MAX}</li>
2438 * </ul>
2439 *
2440 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
2441 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD
2442 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HLG10
2443 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10
2444 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10_PLUS
2445 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF
2446 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF_PO
2447 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM
2448 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM_PO
2449 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF
2450 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF_PO
2451 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM
2452 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM_PO
2453 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_MAX
2454 * @hide
2455 */
2456 public static final Key<long[]> REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP =
2457 new Key<long[]>("android.request.availableDynamicRangeProfilesMap", long[].class);
2458
2459 /**
2460 * <p>Recommended 10-bit dynamic range profile.</p>
2461 * <p>Devices supporting the 10-bit output capability
2462 * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT }
2463 * must list a 10-bit supported dynamic range profile that is expected to perform
2464 * optimally in terms of image quality, power and performance.
2465 * The value advertised can be used as a hint by camera clients when configuring the dynamic
2466 * range profile when calling
2467 * {@link android.hardware.camera2.params.OutputConfiguration#setDynamicRangeProfile }.</p>
2468 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
2469 */
2470 @PublicKey
2471 @NonNull
2472 public static final Key<Long> REQUEST_RECOMMENDED_TEN_BIT_DYNAMIC_RANGE_PROFILE =
2473 new Key<Long>("android.request.recommendedTenBitDynamicRangeProfile", long.class);
2474
2475 /**
2476 * <p>The list of image formats that are supported by this
2477 * camera device for output streams.</p>
2478 * <p>All camera devices will support JPEG and YUV_420_888 formats.</p>
2479 * <p>When set to YUV_420_888, application can access the YUV420 data directly.</p>
2480 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
2481 * @deprecated
2482 * <p>Not used in HALv3 or newer</p>
2483
2484 * @hide
2485 */
2486 @Deprecated
2487 public static final Key<int[]> SCALER_AVAILABLE_FORMATS =
2488 new Key<int[]>("android.scaler.availableFormats", int[].class);
2489
2490 /**
2491 * <p>The minimum frame duration that is supported
2492 * for each resolution in android.scaler.availableJpegSizes.</p>
2493 * <p>This corresponds to the minimum steady-state frame duration when only
2494 * that JPEG stream is active and captured in a burst, with all
2495 * processing (typically in android.*.mode) set to FAST.</p>
2496 * <p>When multiple streams are configured, the minimum
2497 * frame duration will be &gt;= max(individual stream min
2498 * durations)</p>
2499 * <p><b>Units</b>: Nanoseconds</p>
2500 * <p><b>Range of valid values:</b><br>
2501 * TODO: Remove property.</p>
2502 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
2503 * @deprecated
2504 * <p>Not used in HALv3 or newer</p>
2505
2506 * @hide
2507 */
2508 @Deprecated
2509 public static final Key<long[]> SCALER_AVAILABLE_JPEG_MIN_DURATIONS =
2510 new Key<long[]>("android.scaler.availableJpegMinDurations", long[].class);
2511
2512 /**
2513 * <p>The JPEG resolutions that are supported by this camera device.</p>
2514 * <p>The resolutions are listed as <code>(width, height)</code> pairs. All camera devices will support
2515 * sensor maximum resolution (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}).</p>
2516 * <p><b>Range of valid values:</b><br>
2517 * TODO: Remove property.</p>
2518 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
2519 *
2520 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
2521 * @deprecated
2522 * <p>Not used in HALv3 or newer</p>
2523
2524 * @hide
2525 */
2526 @Deprecated
2527 public static final Key<android.util.Size[]> SCALER_AVAILABLE_JPEG_SIZES =
2528 new Key<android.util.Size[]>("android.scaler.availableJpegSizes", android.util.Size[].class);
2529
2530 /**
2531 * <p>The maximum ratio between both active area width
2532 * and crop region width, and active area height and
2533 * crop region height, for {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
2534 * <p>This represents the maximum amount of zooming possible by
2535 * the camera device, or equivalently, the minimum cropping
2536 * window size.</p>
2537 * <p>Crop regions that have a width or height that is smaller
2538 * than this ratio allows will be rounded up to the minimum
2539 * allowed size by the camera device.</p>
2540 * <p>Starting from API level 30, when using {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} to zoom in or out,
2541 * the application must use {@link CameraCharacteristics#CONTROL_ZOOM_RATIO_RANGE android.control.zoomRatioRange} to query both the minimum and
2542 * maximum zoom ratio.</p>
2543 * <p><b>Units</b>: Zoom scale factor</p>
2544 * <p><b>Range of valid values:</b><br>
2545 * &gt;=1</p>
2546 * <p>This key is available on all devices.</p>
2547 *
2548 * @see CaptureRequest#CONTROL_ZOOM_RATIO
2549 * @see CameraCharacteristics#CONTROL_ZOOM_RATIO_RANGE
2550 * @see CaptureRequest#SCALER_CROP_REGION
2551 */
2552 @PublicKey
2553 @NonNull
2554 public static final Key<Float> SCALER_AVAILABLE_MAX_DIGITAL_ZOOM =
2555 new Key<Float>("android.scaler.availableMaxDigitalZoom", float.class);
2556
2557 /**
2558 * <p>For each available processed output size (defined in
2559 * android.scaler.availableProcessedSizes), this property lists the
2560 * minimum supportable frame duration for that size.</p>
2561 * <p>This should correspond to the frame duration when only that processed
2562 * stream is active, with all processing (typically in android.*.mode)
2563 * set to FAST.</p>
2564 * <p>When multiple streams are configured, the minimum frame duration will
2565 * be &gt;= max(individual stream min durations).</p>
2566 * <p><b>Units</b>: Nanoseconds</p>
2567 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
2568 * @deprecated
2569 * <p>Not used in HALv3 or newer</p>
2570
2571 * @hide
2572 */
2573 @Deprecated
2574 public static final Key<long[]> SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS =
2575 new Key<long[]>("android.scaler.availableProcessedMinDurations", long[].class);
2576
2577 /**
2578 * <p>The resolutions available for use with
2579 * processed output streams, such as YV12, NV12, and
2580 * platform opaque YUV/RGB streams to the GPU or video
2581 * encoders.</p>
2582 * <p>The resolutions are listed as <code>(width, height)</code> pairs.</p>
2583 * <p>For a given use case, the actual maximum supported resolution
2584 * may be lower than what is listed here, depending on the destination
2585 * Surface for the image data. For example, for recording video,
2586 * the video encoder chosen may have a maximum size limit (e.g. 1080p)
2587 * smaller than what the camera (e.g. maximum resolution is 3264x2448)
2588 * can provide.</p>
2589 * <p>Please reference the documentation for the image data destination to
2590 * check if it limits the maximum size for image data.</p>
2591 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
2592 * @deprecated
2593 * <p>Not used in HALv3 or newer</p>
2594
2595 * @hide
2596 */
2597 @Deprecated
2598 public static final Key<android.util.Size[]> SCALER_AVAILABLE_PROCESSED_SIZES =
2599 new Key<android.util.Size[]>("android.scaler.availableProcessedSizes", android.util.Size[].class);
2600
2601 /**
2602 * <p>The mapping of image formats that are supported by this
2603 * camera device for input streams, to their corresponding output formats.</p>
2604 * <p>All camera devices with at least 1
2605 * {@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} will have at least one
2606 * available input format.</p>
2607 * <p>The camera device will support the following map of formats,
2608 * if its dependent capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}) is supported:</p>
2609 * <table>
2610 * <thead>
2611 * <tr>
2612 * <th style="text-align: left;">Input Format</th>
2613 * <th style="text-align: left;">Output Format</th>
2614 * <th style="text-align: left;">Capability</th>
2615 * </tr>
2616 * </thead>
2617 * <tbody>
2618 * <tr>
2619 * <td style="text-align: left;">{@link android.graphics.ImageFormat#PRIVATE }</td>
2620 * <td style="text-align: left;">{@link android.graphics.ImageFormat#JPEG }</td>
2621 * <td style="text-align: left;">PRIVATE_REPROCESSING</td>
2622 * </tr>
2623 * <tr>
2624 * <td style="text-align: left;">{@link android.graphics.ImageFormat#PRIVATE }</td>
2625 * <td style="text-align: left;">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
2626 * <td style="text-align: left;">PRIVATE_REPROCESSING</td>
2627 * </tr>
2628 * <tr>
2629 * <td style="text-align: left;">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
2630 * <td style="text-align: left;">{@link android.graphics.ImageFormat#JPEG }</td>
2631 * <td style="text-align: left;">YUV_REPROCESSING</td>
2632 * </tr>
2633 * <tr>
2634 * <td style="text-align: left;">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
2635 * <td style="text-align: left;">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
2636 * <td style="text-align: left;">YUV_REPROCESSING</td>
2637 * </tr>
2638 * </tbody>
2639 * </table>
2640 * <p>PRIVATE refers to a device-internal format that is not directly application-visible. A
2641 * PRIVATE input surface can be acquired by {@link android.media.ImageReader#newInstance }
2642 * with {@link android.graphics.ImageFormat#PRIVATE } as the format.</p>
2643 * <p>For a PRIVATE_REPROCESSING-capable camera device, using the PRIVATE format as either input
2644 * 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>
2645 * <p>Attempting to configure an input stream with output streams not
2646 * listed as available in this map is not valid.</p>
2647 * <p>Additionally, if the camera device is MONOCHROME with Y8 support, it will also support
2648 * the following map of formats if its dependent capability
2649 * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}) is supported:</p>
2650 * <table>
2651 * <thead>
2652 * <tr>
2653 * <th style="text-align: left;">Input Format</th>
2654 * <th style="text-align: left;">Output Format</th>
2655 * <th style="text-align: left;">Capability</th>
2656 * </tr>
2657 * </thead>
2658 * <tbody>
2659 * <tr>
2660 * <td style="text-align: left;">{@link android.graphics.ImageFormat#PRIVATE }</td>
2661 * <td style="text-align: left;">{@link android.graphics.ImageFormat#Y8 }</td>
2662 * <td style="text-align: left;">PRIVATE_REPROCESSING</td>
2663 * </tr>
2664 * <tr>
2665 * <td style="text-align: left;">{@link android.graphics.ImageFormat#Y8 }</td>
2666 * <td style="text-align: left;">{@link android.graphics.ImageFormat#JPEG }</td>
2667 * <td style="text-align: left;">YUV_REPROCESSING</td>
2668 * </tr>
2669 * <tr>
2670 * <td style="text-align: left;">{@link android.graphics.ImageFormat#Y8 }</td>
2671 * <td style="text-align: left;">{@link android.graphics.ImageFormat#Y8 }</td>
2672 * <td style="text-align: left;">YUV_REPROCESSING</td>
2673 * </tr>
2674 * </tbody>
2675 * </table>
2676 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
2677 *
2678 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2679 * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
2680 * @hide
2681 */
2682 public static final Key<android.hardware.camera2.params.ReprocessFormatsMap> SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP =
2683 new Key<android.hardware.camera2.params.ReprocessFormatsMap>("android.scaler.availableInputOutputFormatsMap", android.hardware.camera2.params.ReprocessFormatsMap.class);
2684
2685 /**
2686 * <p>The available stream configurations that this
2687 * camera device supports
2688 * (i.e. format, width, height, output/input stream).</p>
2689 * <p>The configurations are listed as <code>(format, width, height, input?)</code>
2690 * tuples.</p>
2691 * <p>For a given use case, the actual maximum supported resolution
2692 * may be lower than what is listed here, depending on the destination
2693 * Surface for the image data. For example, for recording video,
2694 * the video encoder chosen may have a maximum size limit (e.g. 1080p)
2695 * smaller than what the camera (e.g. maximum resolution is 3264x2448)
2696 * can provide.</p>
2697 * <p>Please reference the documentation for the image data destination to
2698 * check if it limits the maximum size for image data.</p>
2699 * <p>Not all output formats may be supported in a configuration with
2700 * an input stream of a particular format. For more details, see
2701 * android.scaler.availableInputOutputFormatsMap.</p>
2702 * <p>For applications targeting SDK version older than 31, the following table
2703 * describes the minimum required output stream configurations based on the hardware level
2704 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p>
2705 * <table>
2706 * <thead>
2707 * <tr>
2708 * <th style="text-align: center;">Format</th>
2709 * <th style="text-align: center;">Size</th>
2710 * <th style="text-align: center;">Hardware Level</th>
2711 * <th style="text-align: center;">Notes</th>
2712 * </tr>
2713 * </thead>
2714 * <tbody>
2715 * <tr>
2716 * <td style="text-align: center;">JPEG</td>
2717 * <td style="text-align: center;">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td>
2718 * <td style="text-align: center;">Any</td>
2719 * <td style="text-align: center;"></td>
2720 * </tr>
2721 * <tr>
2722 * <td style="text-align: center;">JPEG</td>
2723 * <td style="text-align: center;">1920x1080 (1080p)</td>
2724 * <td style="text-align: center;">Any</td>
2725 * <td style="text-align: center;">if 1080p &lt;= activeArraySize</td>
2726 * </tr>
2727 * <tr>
2728 * <td style="text-align: center;">JPEG</td>
2729 * <td style="text-align: center;">1280x720 (720)</td>
2730 * <td style="text-align: center;">Any</td>
2731 * <td style="text-align: center;">if 720p &lt;= activeArraySize</td>
2732 * </tr>
2733 * <tr>
2734 * <td style="text-align: center;">JPEG</td>
2735 * <td style="text-align: center;">640x480 (480p)</td>
2736 * <td style="text-align: center;">Any</td>
2737 * <td style="text-align: center;">if 480p &lt;= activeArraySize</td>
2738 * </tr>
2739 * <tr>
2740 * <td style="text-align: center;">JPEG</td>
2741 * <td style="text-align: center;">320x240 (240p)</td>
2742 * <td style="text-align: center;">Any</td>
2743 * <td style="text-align: center;">if 240p &lt;= activeArraySize</td>
2744 * </tr>
2745 * <tr>
2746 * <td style="text-align: center;">YUV_420_888</td>
2747 * <td style="text-align: center;">all output sizes available for JPEG</td>
2748 * <td style="text-align: center;">FULL</td>
2749 * <td style="text-align: center;"></td>
2750 * </tr>
2751 * <tr>
2752 * <td style="text-align: center;">YUV_420_888</td>
2753 * <td style="text-align: center;">all output sizes available for JPEG, up to the maximum video size</td>
2754 * <td style="text-align: center;">LIMITED</td>
2755 * <td style="text-align: center;"></td>
2756 * </tr>
2757 * <tr>
2758 * <td style="text-align: center;">IMPLEMENTATION_DEFINED</td>
2759 * <td style="text-align: center;">same as YUV_420_888</td>
2760 * <td style="text-align: center;">Any</td>
2761 * <td style="text-align: center;"></td>
2762 * </tr>
2763 * </tbody>
2764 * </table>
2765 * <p>For applications targeting SDK version 31 or newer, if the mobile device declares to be
2766 * media performance class 12 or higher by setting
2767 * {@link android.os.Build.VERSION#MEDIA_PERFORMANCE_CLASS } to be 31 or larger,
2768 * the primary camera devices (first rear/front camera in the camera ID list) will not
2769 * support JPEG sizes smaller than 1080p. If the application configures a JPEG stream
2770 * smaller than 1080p, the camera device will round up the JPEG image size to at least
2771 * 1080p. The requirements for IMPLEMENTATION_DEFINED and YUV_420_888 stay the same.
2772 * This new minimum required output stream configurations are illustrated by the table below:</p>
2773 * <table>
2774 * <thead>
2775 * <tr>
2776 * <th style="text-align: center;">Format</th>
2777 * <th style="text-align: center;">Size</th>
2778 * <th style="text-align: center;">Hardware Level</th>
2779 * <th style="text-align: center;">Notes</th>
2780 * </tr>
2781 * </thead>
2782 * <tbody>
2783 * <tr>
2784 * <td style="text-align: center;">JPEG</td>
2785 * <td style="text-align: center;">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td>
2786 * <td style="text-align: center;">Any</td>
2787 * <td style="text-align: center;"></td>
2788 * </tr>
2789 * <tr>
2790 * <td style="text-align: center;">JPEG</td>
2791 * <td style="text-align: center;">1920x1080 (1080p)</td>
2792 * <td style="text-align: center;">Any</td>
2793 * <td style="text-align: center;">if 1080p &lt;= activeArraySize</td>
2794 * </tr>
2795 * <tr>
2796 * <td style="text-align: center;">YUV_420_888</td>
2797 * <td style="text-align: center;">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td>
2798 * <td style="text-align: center;">FULL</td>
2799 * <td style="text-align: center;"></td>
2800 * </tr>
2801 * <tr>
2802 * <td style="text-align: center;">YUV_420_888</td>
2803 * <td style="text-align: center;">1920x1080 (1080p)</td>
2804 * <td style="text-align: center;">FULL</td>
2805 * <td style="text-align: center;">if 1080p &lt;= activeArraySize</td>
2806 * </tr>
2807 * <tr>
2808 * <td style="text-align: center;">YUV_420_888</td>
2809 * <td style="text-align: center;">1280x720 (720)</td>
2810 * <td style="text-align: center;">FULL</td>
2811 * <td style="text-align: center;">if 720p &lt;= activeArraySize</td>
2812 * </tr>
2813 * <tr>
2814 * <td style="text-align: center;">YUV_420_888</td>
2815 * <td style="text-align: center;">640x480 (480p)</td>
2816 * <td style="text-align: center;">FULL</td>
2817 * <td style="text-align: center;">if 480p &lt;= activeArraySize</td>
2818 * </tr>
2819 * <tr>
2820 * <td style="text-align: center;">YUV_420_888</td>
2821 * <td style="text-align: center;">320x240 (240p)</td>
2822 * <td style="text-align: center;">FULL</td>
2823 * <td style="text-align: center;">if 240p &lt;= activeArraySize</td>
2824 * </tr>
2825 * <tr>
2826 * <td style="text-align: center;">YUV_420_888</td>
2827 * <td style="text-align: center;">all output sizes available for FULL hardware level, up to the maximum video size</td>
2828 * <td style="text-align: center;">LIMITED</td>
2829 * <td style="text-align: center;"></td>
2830 * </tr>
2831 * <tr>
2832 * <td style="text-align: center;">IMPLEMENTATION_DEFINED</td>
2833 * <td style="text-align: center;">same as YUV_420_888</td>
2834 * <td style="text-align: center;">Any</td>
2835 * <td style="text-align: center;"></td>
2836 * </tr>
2837 * </tbody>
2838 * </table>
2839 * <p>For applications targeting SDK version 31 or newer, if the mobile device doesn't declare
2840 * to be media performance class 12 or better by setting
2841 * {@link android.os.Build.VERSION#MEDIA_PERFORMANCE_CLASS } to be 31 or larger,
2842 * or if the camera device isn't a primary rear/front camera, the minimum required output
2843 * stream configurations are the same as for applications targeting SDK version older than
2844 * 31.</p>
2845 * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional
2846 * mandatory stream configurations on a per-capability basis.</p>
2847 * <p>Exception on 176x144 (QCIF) resolution: camera devices usually have a fixed capability for
2848 * downscaling from larger resolution to smaller, and the QCIF resolution sometimes is not
2849 * fully supported due to this limitation on devices with high-resolution image sensors.
2850 * Therefore, trying to configure a QCIF resolution stream together with any other
2851 * stream larger than 1920x1080 resolution (either width or height) might not be supported,
2852 * and capture session creation will fail if it is not.</p>
2853 * <p>This key is available on all devices.</p>
2854 *
2855 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2856 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2857 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
2858 * @hide
2859 */
2860 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> SCALER_AVAILABLE_STREAM_CONFIGURATIONS =
2861 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.scaler.availableStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
2862
2863 /**
2864 * <p>This lists the minimum frame duration for each
2865 * format/size combination.</p>
2866 * <p>This should correspond to the frame duration when only that
2867 * stream is active, with all processing (typically in android.*.mode)
2868 * set to either OFF or FAST.</p>
2869 * <p>When multiple streams are used in a request, the minimum frame
2870 * duration will be max(individual stream min durations).</p>
2871 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and
2872 * android.scaler.availableStallDurations for more details about
2873 * calculating the max frame rate.</p>
2874 * <p><b>Units</b>: (format, width, height, ns) x n</p>
2875 * <p>This key is available on all devices.</p>
2876 *
2877 * @see CaptureRequest#SENSOR_FRAME_DURATION
2878 * @hide
2879 */
2880 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_MIN_FRAME_DURATIONS =
2881 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
2882
2883 /**
2884 * <p>This lists the maximum stall duration for each
2885 * output format/size combination.</p>
2886 * <p>A stall duration is how much extra time would get added
2887 * to the normal minimum frame duration for a repeating request
2888 * that has streams with non-zero stall.</p>
2889 * <p>For example, consider JPEG captures which have the following
2890 * characteristics:</p>
2891 * <ul>
2892 * <li>JPEG streams act like processed YUV streams in requests for which
2893 * they are not included; in requests in which they are directly
2894 * referenced, they act as JPEG streams. This is because supporting a
2895 * JPEG stream requires the underlying YUV data to always be ready for
2896 * use by a JPEG encoder, but the encoder will only be used (and impact
2897 * frame duration) on requests that actually reference a JPEG stream.</li>
2898 * <li>The JPEG processor can run concurrently to the rest of the camera
2899 * pipeline, but cannot process more than 1 capture at a time.</li>
2900 * </ul>
2901 * <p>In other words, using a repeating YUV request would result
2902 * in a steady frame rate (let's say it's 30 FPS). If a single
2903 * JPEG request is submitted periodically, the frame rate will stay
2904 * at 30 FPS (as long as we wait for the previous JPEG to return each
2905 * time). If we try to submit a repeating YUV + JPEG request, then
2906 * the frame rate will drop from 30 FPS.</p>
2907 * <p>In general, submitting a new request with a non-0 stall time
2908 * stream will <em>not</em> cause a frame rate drop unless there are still
2909 * outstanding buffers for that stream from previous requests.</p>
2910 * <p>Submitting a repeating request with streams (call this <code>S</code>)
2911 * is the same as setting the minimum frame duration from
2912 * the normal minimum frame duration corresponding to <code>S</code>, added with
2913 * the maximum stall duration for <code>S</code>.</p>
2914 * <p>If interleaving requests with and without a stall duration,
2915 * a request will stall by the maximum of the remaining times
2916 * for each can-stall stream with outstanding buffers.</p>
2917 * <p>This means that a stalling request will not have an exposure start
2918 * until the stall has completed.</p>
2919 * <p>This should correspond to the stall duration when only that stream is
2920 * active, with all processing (typically in android.*.mode) set to FAST
2921 * or OFF. Setting any of the processing modes to HIGH_QUALITY
2922 * effectively results in an indeterminate stall duration for all
2923 * streams in a request (the regular stall calculation rules are
2924 * ignored).</p>
2925 * <p>The following formats may always have a stall duration:</p>
2926 * <ul>
2927 * <li>{@link android.graphics.ImageFormat#JPEG }</li>
2928 * <li>{@link android.graphics.ImageFormat#RAW_SENSOR }</li>
2929 * </ul>
2930 * <p>The following formats will never have a stall duration:</p>
2931 * <ul>
2932 * <li>{@link android.graphics.ImageFormat#YUV_420_888 }</li>
2933 * <li>{@link android.graphics.ImageFormat#RAW10 }</li>
2934 * <li>{@link android.graphics.ImageFormat#RAW12 }</li>
2935 * <li>{@link android.graphics.ImageFormat#Y8 }</li>
2936 * </ul>
2937 * <p>All other formats may or may not have an allowed stall duration on
2938 * a per-capability basis; refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
2939 * for more details.</p>
2940 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} for more information about
2941 * calculating the max frame rate (absent stalls).</p>
2942 * <p><b>Units</b>: (format, width, height, ns) x n</p>
2943 * <p>This key is available on all devices.</p>
2944 *
2945 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2946 * @see CaptureRequest#SENSOR_FRAME_DURATION
2947 * @hide
2948 */
2949 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_STALL_DURATIONS =
2950 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
2951
2952 /**
2953 * <p>The available stream configurations that this
2954 * camera device supports; also includes the minimum frame durations
2955 * and the stall durations for each format/size combination.</p>
2956 * <p>All camera devices will support sensor maximum resolution (defined by
2957 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) for the JPEG format.</p>
2958 * <p>For a given use case, the actual maximum supported resolution
2959 * may be lower than what is listed here, depending on the destination
2960 * Surface for the image data. For example, for recording video,
2961 * the video encoder chosen may have a maximum size limit (e.g. 1080p)
2962 * smaller than what the camera (e.g. maximum resolution is 3264x2448)
2963 * can provide.</p>
2964 * <p>Please reference the documentation for the image data destination to
2965 * check if it limits the maximum size for image data.</p>
2966 * <p>For applications targeting SDK version older than 31, the following table
2967 * describes the minimum required output stream configurations based on the
2968 * hardware level ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p>
2969 * <table>
2970 * <thead>
2971 * <tr>
2972 * <th style="text-align: center;">Format</th>
2973 * <th style="text-align: center;">Size</th>
2974 * <th style="text-align: center;">Hardware Level</th>
2975 * <th style="text-align: center;">Notes</th>
2976 * </tr>
2977 * </thead>
2978 * <tbody>
2979 * <tr>
2980 * <td style="text-align: center;">{@link android.graphics.ImageFormat#JPEG }</td>
2981 * <td style="text-align: center;">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} (*1)</td>
2982 * <td style="text-align: center;">Any</td>
2983 * <td style="text-align: center;"></td>
2984 * </tr>
2985 * <tr>
2986 * <td style="text-align: center;">{@link android.graphics.ImageFormat#JPEG }</td>
2987 * <td style="text-align: center;">1920x1080 (1080p)</td>
2988 * <td style="text-align: center;">Any</td>
2989 * <td style="text-align: center;">if 1080p &lt;= activeArraySize</td>
2990 * </tr>
2991 * <tr>
2992 * <td style="text-align: center;">{@link android.graphics.ImageFormat#JPEG }</td>
2993 * <td style="text-align: center;">1280x720 (720p)</td>
2994 * <td style="text-align: center;">Any</td>
2995 * <td style="text-align: center;">if 720p &lt;= activeArraySize</td>
2996 * </tr>
2997 * <tr>
2998 * <td style="text-align: center;">{@link android.graphics.ImageFormat#JPEG }</td>
2999 * <td style="text-align: center;">640x480 (480p)</td>
3000 * <td style="text-align: center;">Any</td>
3001 * <td style="text-align: center;">if 480p &lt;= activeArraySize</td>
3002 * </tr>
3003 * <tr>
3004 * <td style="text-align: center;">{@link android.graphics.ImageFormat#JPEG }</td>
3005 * <td style="text-align: center;">320x240 (240p)</td>
3006 * <td style="text-align: center;">Any</td>
3007 * <td style="text-align: center;">if 240p &lt;= activeArraySize</td>
3008 * </tr>
3009 * <tr>
3010 * <td style="text-align: center;">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
3011 * <td style="text-align: center;">all output sizes available for JPEG</td>
3012 * <td style="text-align: center;">FULL</td>
3013 * <td style="text-align: center;"></td>
3014 * </tr>
3015 * <tr>
3016 * <td style="text-align: center;">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
3017 * <td style="text-align: center;">all output sizes available for JPEG, up to the maximum video size</td>
3018 * <td style="text-align: center;">LIMITED</td>
3019 * <td style="text-align: center;"></td>
3020 * </tr>
3021 * <tr>
3022 * <td style="text-align: center;">{@link android.graphics.ImageFormat#PRIVATE }</td>
3023 * <td style="text-align: center;">same as YUV_420_888</td>
3024 * <td style="text-align: center;">Any</td>
3025 * <td style="text-align: center;"></td>
3026 * </tr>
3027 * </tbody>
3028 * </table>
3029 * <p>For applications targeting SDK version 31 or newer, if the mobile device declares to be
3030 * media performance class 12 or higher by setting
3031 * {@link android.os.Build.VERSION#MEDIA_PERFORMANCE_CLASS } to be 31 or larger,
3032 * the primary camera devices (first rear/front camera in the camera ID list) will not
3033 * support JPEG sizes smaller than 1080p. If the application configures a JPEG stream
3034 * smaller than 1080p, the camera device will round up the JPEG image size to at least
3035 * 1080p. The requirements for IMPLEMENTATION_DEFINED and YUV_420_888 stay the same.
3036 * This new minimum required output stream configurations are illustrated by the table below:</p>
3037 * <table>
3038 * <thead>
3039 * <tr>
3040 * <th style="text-align: center;">Format</th>
3041 * <th style="text-align: center;">Size</th>
3042 * <th style="text-align: center;">Hardware Level</th>
3043 * <th style="text-align: center;">Notes</th>
3044 * </tr>
3045 * </thead>
3046 * <tbody>
3047 * <tr>
3048 * <td style="text-align: center;">{@link android.graphics.ImageFormat#JPEG }</td>
3049 * <td style="text-align: center;">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} (*1)</td>
3050 * <td style="text-align: center;">Any</td>
3051 * <td style="text-align: center;"></td>
3052 * </tr>
3053 * <tr>
3054 * <td style="text-align: center;">{@link android.graphics.ImageFormat#JPEG }</td>
3055 * <td style="text-align: center;">1920x1080 (1080p)</td>
3056 * <td style="text-align: center;">Any</td>
3057 * <td style="text-align: center;">if 1080p &lt;= activeArraySize</td>
3058 * </tr>
3059 * <tr>
3060 * <td style="text-align: center;">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
3061 * <td style="text-align: center;">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td>
3062 * <td style="text-align: center;">FULL</td>
3063 * <td style="text-align: center;"></td>
3064 * </tr>
3065 * <tr>
3066 * <td style="text-align: center;">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
3067 * <td style="text-align: center;">1920x1080 (1080p)</td>
3068 * <td style="text-align: center;">FULL</td>
3069 * <td style="text-align: center;">if 1080p &lt;= activeArraySize</td>
3070 * </tr>
3071 * <tr>
3072 * <td style="text-align: center;">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
3073 * <td style="text-align: center;">1280x720 (720)</td>
3074 * <td style="text-align: center;">FULL</td>
3075 * <td style="text-align: center;">if 720p &lt;= activeArraySize</td>
3076 * </tr>
3077 * <tr>
3078 * <td style="text-align: center;">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
3079 * <td style="text-align: center;">640x480 (480p)</td>
3080 * <td style="text-align: center;">FULL</td>
3081 * <td style="text-align: center;">if 480p &lt;= activeArraySize</td>
3082 * </tr>
3083 * <tr>
3084 * <td style="text-align: center;">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
3085 * <td style="text-align: center;">320x240 (240p)</td>
3086 * <td style="text-align: center;">FULL</td>
3087 * <td style="text-align: center;">if 240p &lt;= activeArraySize</td>
3088 * </tr>
3089 * <tr>
3090 * <td style="text-align: center;">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
3091 * <td style="text-align: center;">all output sizes available for FULL hardware level, up to the maximum video size</td>
3092 * <td style="text-align: center;">LIMITED</td>
3093 * <td style="text-align: center;"></td>
3094 * </tr>
3095 * <tr>
3096 * <td style="text-align: center;">{@link android.graphics.ImageFormat#PRIVATE }</td>
3097 * <td style="text-align: center;">same as YUV_420_888</td>
3098 * <td style="text-align: center;">Any</td>
3099 * <td style="text-align: center;"></td>
3100 * </tr>
3101 * </tbody>
3102 * </table>
3103 * <p>For applications targeting SDK version 31 or newer, if the mobile device doesn't declare
3104 * to be media performance class 12 or better by setting
3105 * {@link android.os.Build.VERSION#MEDIA_PERFORMANCE_CLASS } to be 31 or larger,
3106 * or if the camera device isn't a primary rear/front camera, the minimum required output
3107 * stream configurations are the same as for applications targeting SDK version older than
3108 * 31.</p>
3109 * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} and {@link android.hardware.camera2.CameraDevice#createCaptureSession } for additional mandatory
3110 * stream configurations on a per-capability basis.</p>
3111 * <p>*1: For JPEG format, the sizes may be restricted by below conditions:</p>
3112 * <ul>
3113 * <li>The HAL may choose the aspect ratio of each Jpeg size to be one of well known ones
3114 * (e.g. 4:3, 16:9, 3:2 etc.). If the sensor maximum resolution
3115 * (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) has an aspect ratio other than these,
3116 * it does not have to be included in the supported JPEG sizes.</li>
3117 * <li>Some hardware JPEG encoders may have pixel boundary alignment requirements, such as
3118 * the dimensions being a multiple of 16.
3119 * Therefore, the maximum JPEG size may be smaller than sensor maximum resolution.
3120 * However, the largest JPEG size will be as close as possible to the sensor maximum
3121 * resolution given above constraints. It is required that after aspect ratio adjustments,
3122 * additional size reduction due to other issues must be less than 3% in area. For example,
3123 * if the sensor maximum resolution is 3280x2464, if the maximum JPEG size has aspect
3124 * ratio 4:3, and the JPEG encoder alignment requirement is 16, the maximum JPEG size will be
3125 * 3264x2448.</li>
3126 * </ul>
3127 * <p>Exception on 176x144 (QCIF) resolution: camera devices usually have a fixed capability on
3128 * downscaling from larger resolution to smaller ones, and the QCIF resolution can sometimes
3129 * not be fully supported due to this limitation on devices with high-resolution image
3130 * sensors. Therefore, trying to configure a QCIF resolution stream together with any other
3131 * stream larger than 1920x1080 resolution (either width or height) might not be supported,
3132 * and capture session creation will fail if it is not.</p>
3133 * <p>This key is available on all devices.</p>
3134 *
3135 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3136 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
3137 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
3138 */
3139 @PublicKey
3140 @NonNull
3141 @SyntheticKey
3142 public static final Key<android.hardware.camera2.params.StreamConfigurationMap> SCALER_STREAM_CONFIGURATION_MAP =
3143 new Key<android.hardware.camera2.params.StreamConfigurationMap>("android.scaler.streamConfigurationMap", android.hardware.camera2.params.StreamConfigurationMap.class);
3144
3145 /**
3146 * <p>The crop type that this camera device supports.</p>
3147 * <p>When passing a non-centered crop region ({@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}) to a camera
3148 * device that only supports CENTER_ONLY cropping, the camera device will move the
3149 * crop region to the center of the sensor active array ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize})
3150 * and keep the crop region width and height unchanged. The camera device will return the
3151 * final used crop region in metadata result {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
3152 * <p>Camera devices that support FREEFORM cropping will support any crop region that
3153 * is inside of the active array. The camera device will apply the same crop region and
3154 * return the final used crop region in capture result metadata {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
3155 * <p>Starting from API level 30,</p>
3156 * <ul>
3157 * <li>If the camera device supports FREEFORM cropping, in order to do FREEFORM cropping, the
3158 * application must set {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} to 1.0, and use {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}
3159 * for zoom.</li>
3160 * <li>To do CENTER_ONLY zoom, the application has below 2 options:<ol>
3161 * <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>
3162 * <li>Adjust zoom by {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio}; use {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to crop
3163 * the field of view vertically (letterboxing) or horizontally (pillarboxing), but not
3164 * windowboxing.</li>
3165 * </ol>
3166 * </li>
3167 * <li>Setting {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} to values different than 1.0 and
3168 * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to be windowboxing at the same time are not supported. In this
3169 * case, the camera framework will override the {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to be the active
3170 * array.</li>
3171 * </ul>
3172 * <p>LEGACY capability devices will only support CENTER_ONLY cropping.</p>
3173 * <p><b>Possible values:</b></p>
3174 * <ul>
3175 * <li>{@link #SCALER_CROPPING_TYPE_CENTER_ONLY CENTER_ONLY}</li>
3176 * <li>{@link #SCALER_CROPPING_TYPE_FREEFORM FREEFORM}</li>
3177 * </ul>
3178 *
3179 * <p>This key is available on all devices.</p>
3180 *
3181 * @see CaptureRequest#CONTROL_ZOOM_RATIO
3182 * @see CaptureRequest#SCALER_CROP_REGION
3183 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
3184 * @see #SCALER_CROPPING_TYPE_CENTER_ONLY
3185 * @see #SCALER_CROPPING_TYPE_FREEFORM
3186 */
3187 @PublicKey
3188 @NonNull
3189 public static final Key<Integer> SCALER_CROPPING_TYPE =
3190 new Key<Integer>("android.scaler.croppingType", int.class);
3191
3192 /**
3193 * <p>Recommended stream configurations for common client use cases.</p>
3194 * <p>Optional subset of the android.scaler.availableStreamConfigurations that contains
3195 * similar tuples listed as
3196 * (i.e. width, height, format, output/input stream, usecase bit field).
3197 * Camera devices will be able to suggest particular stream configurations which are
3198 * power and performance efficient for specific use cases. For more information about
3199 * retrieving the suggestions see
3200 * {@link android.hardware.camera2.CameraCharacteristics#getRecommendedStreamConfigurationMap }.</p>
3201 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3202 * @hide
3203 */
3204 public static final Key<android.hardware.camera2.params.RecommendedStreamConfiguration[]> SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS =
3205 new Key<android.hardware.camera2.params.RecommendedStreamConfiguration[]>("android.scaler.availableRecommendedStreamConfigurations", android.hardware.camera2.params.RecommendedStreamConfiguration[].class);
3206
3207 /**
3208 * <p>Recommended mappings of image formats that are supported by this
3209 * camera device for input streams, to their corresponding output formats.</p>
3210 * <p>This is a recommended subset of the complete list of mappings found in
3211 * android.scaler.availableInputOutputFormatsMap. The same requirements apply here as well.
3212 * The list however doesn't need to contain all available and supported mappings. Instead of
3213 * this developers must list only recommended and efficient entries.
3214 * If set, the information will be available in the ZERO_SHUTTER_LAG recommended stream
3215 * configuration see
3216 * {@link android.hardware.camera2.CameraCharacteristics#getRecommendedStreamConfigurationMap }.</p>
3217 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3218 * @hide
3219 */
3220 public static final Key<android.hardware.camera2.params.ReprocessFormatsMap> SCALER_AVAILABLE_RECOMMENDED_INPUT_OUTPUT_FORMATS_MAP =
3221 new Key<android.hardware.camera2.params.ReprocessFormatsMap>("android.scaler.availableRecommendedInputOutputFormatsMap", android.hardware.camera2.params.ReprocessFormatsMap.class);
3222
3223 /**
3224 * <p>An array of mandatory stream combinations generated according to the camera device
3225 * {@link android.hardware.camera2.CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL }
3226 * and {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES }.
3227 * This is an app-readable conversion of the mandatory stream combination
3228 * {@link android.hardware.camera2.CameraDevice#createCaptureSession tables}.</p>
3229 * <p>The array of
3230 * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is
3231 * generated according to the documented
3232 * {@link android.hardware.camera2.CameraDevice#createCaptureSession guideline} based on
3233 * specific device level and capabilities.
3234 * Clients can use the array as a quick reference to find an appropriate camera stream
3235 * combination.
3236 * As per documentation, the stream combinations with given PREVIEW, RECORD and
3237 * MAXIMUM resolutions and anything smaller from the list given by
3238 * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } are
3239 * guaranteed to work.
3240 * For a physical camera not independently exposed in
3241 * {@link android.hardware.camera2.CameraManager#getCameraIdList }, the mandatory stream
3242 * combinations for that physical camera Id are also generated, so that the application can
3243 * configure them as physical streams via the logical camera.
3244 * The mandatory stream combination array will be {@code null} in case the device is not
3245 * backward compatible.</p>
3246 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3247 * <p><b>Limited capability</b> -
3248 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3249 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3250 *
3251 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3252 */
3253 @PublicKey
3254 @NonNull
3255 @SyntheticKey
3256 public static final Key<android.hardware.camera2.params.MandatoryStreamCombination[]> SCALER_MANDATORY_STREAM_COMBINATIONS =
3257 new Key<android.hardware.camera2.params.MandatoryStreamCombination[]>("android.scaler.mandatoryStreamCombinations", android.hardware.camera2.params.MandatoryStreamCombination[].class);
3258
3259 /**
3260 * <p>An array of mandatory concurrent stream combinations.
3261 * This is an app-readable conversion of the concurrent mandatory stream combination
3262 * {@link android.hardware.camera2.CameraDevice#createCaptureSession tables}.</p>
3263 * <p>The array of
3264 * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is
3265 * generated according to the documented
3266 * {@link android.hardware.camera2.CameraDevice#createCaptureSession guideline} for each
3267 * device which has its Id present in the set returned by
3268 * {@link android.hardware.camera2.CameraManager#getConcurrentCameraIds }.
3269 * Clients can use the array as a quick reference to find an appropriate camera stream
3270 * combination.
3271 * The mandatory stream combination array will be {@code null} in case the device is not a
3272 * part of at least one set of combinations returned by
3273 * {@link android.hardware.camera2.CameraManager#getConcurrentCameraIds }.</p>
3274 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3275 */
3276 @PublicKey
3277 @NonNull
3278 @SyntheticKey
3279 public static final Key<android.hardware.camera2.params.MandatoryStreamCombination[]> SCALER_MANDATORY_CONCURRENT_STREAM_COMBINATIONS =
3280 new Key<android.hardware.camera2.params.MandatoryStreamCombination[]>("android.scaler.mandatoryConcurrentStreamCombinations", android.hardware.camera2.params.MandatoryStreamCombination[].class);
3281
3282 /**
3283 * <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>
3284 * <p>This entry lists the valid modes for {@link CaptureRequest#SCALER_ROTATE_AND_CROP android.scaler.rotateAndCrop} for this camera device.</p>
3285 * <p>Starting with API level 30, all devices will list at least <code>ROTATE_AND_CROP_NONE</code>.
3286 * Devices with support for rotate-and-crop will additionally list at least
3287 * <code>ROTATE_AND_CROP_AUTO</code> and <code>ROTATE_AND_CROP_90</code>.</p>
3288 * <p><b>Range of valid values:</b><br>
3289 * Any value listed in {@link CaptureRequest#SCALER_ROTATE_AND_CROP android.scaler.rotateAndCrop}</p>
3290 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3291 *
3292 * @see CaptureRequest#SCALER_ROTATE_AND_CROP
3293 */
3294 @PublicKey
3295 @NonNull
3296 public static final Key<int[]> SCALER_AVAILABLE_ROTATE_AND_CROP_MODES =
3297 new Key<int[]>("android.scaler.availableRotateAndCropModes", int[].class);
3298
3299 /**
3300 * <p>Default YUV/PRIVATE size to use for requesting secure image buffers.</p>
3301 * <p>This entry lists the default size supported in the secure camera mode. This entry is
3302 * optional on devices support the SECURE_IMAGE_DATA capability. This entry will be null
3303 * if the camera device does not list SECURE_IMAGE_DATA capability.</p>
3304 * <p>When the key is present, only a PRIVATE/YUV output of the specified size is guaranteed
3305 * to be supported by the camera HAL in the secure camera mode. Any other format or
3306 * resolutions might not be supported. Use
3307 * {@link CameraDevice#isSessionConfigurationSupported }
3308 * API to query if a secure session configuration is supported if the device supports this
3309 * API.</p>
3310 * <p>If this key returns null on a device with SECURE_IMAGE_DATA capability, the application
3311 * can assume all output sizes listed in the
3312 * {@link android.hardware.camera2.params.StreamConfigurationMap }
3313 * are supported.</p>
3314 * <p><b>Units</b>: Pixels</p>
3315 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3316 */
3317 @PublicKey
3318 @NonNull
3319 public static final Key<android.util.Size> SCALER_DEFAULT_SECURE_IMAGE_SIZE =
3320 new Key<android.util.Size>("android.scaler.defaultSecureImageSize", android.util.Size.class);
3321
3322 /**
3323 * <p>The available multi-resolution stream configurations that this
3324 * physical camera device supports
3325 * (i.e. format, width, height, output/input stream).</p>
3326 * <p>This list contains a subset of the parent logical camera's multi-resolution stream
3327 * configurations which belong to this physical camera, and it will advertise and will only
3328 * advertise the maximum supported resolutions for a particular format.</p>
3329 * <p>If this camera device isn't a physical camera device constituting a logical camera,
3330 * but a standalone {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR }
3331 * camera, this field represents the multi-resolution input/output stream configurations of
3332 * default mode and max resolution modes. The sizes will be the maximum resolution of a
3333 * particular format for default mode and max resolution mode.</p>
3334 * <p>This field will only be advertised if the device is a physical camera of a
3335 * logical multi-camera device or an ultra high resolution sensor camera. For a logical
3336 * multi-camera, the camera API will derive the logical camera’s multi-resolution stream
3337 * configurations from all physical cameras. For an ultra high resolution sensor camera, this
3338 * is used directly as the camera’s multi-resolution stream configurations.</p>
3339 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3340 * <p><b>Limited capability</b> -
3341 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3342 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3343 *
3344 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3345 * @hide
3346 */
3347 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS =
3348 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.scaler.physicalCameraMultiResolutionStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
3349
3350 /**
3351 * <p>The multi-resolution stream configurations supported by this logical camera
3352 * or ultra high resolution sensor camera device.</p>
3353 * <p>Multi-resolution streams can be used by a LOGICAL_MULTI_CAMERA or an
3354 * ULTRA_HIGH_RESOLUTION_SENSOR camera where the images sent or received can vary in
3355 * resolution per frame. This is useful in cases where the camera device's effective full
3356 * resolution changes depending on factors such as the current zoom level, lighting
3357 * condition, focus distance, or pixel mode.</p>
3358 * <ul>
3359 * <li>For a logical multi-camera implementing optical zoom, at different zoom level, a
3360 * different physical camera may be active, resulting in different full-resolution image
3361 * sizes.</li>
3362 * <li>For an ultra high resolution camera, depending on whether the camera operates in default
3363 * mode, or maximum resolution mode, the output full-size images may be of either binned
3364 * resolution or maximum resolution.</li>
3365 * </ul>
3366 * <p>To use multi-resolution output streams, the supported formats can be queried by {@link android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getOutputFormats }.
3367 * A {@link android.hardware.camera2.MultiResolutionImageReader } can then be created for a
3368 * supported format with the MultiResolutionStreamInfo group queried by {@link android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getOutputInfo }.</p>
3369 * <p>If a camera device supports multi-resolution output streams for a particular format, for
3370 * each of its mandatory stream combinations, the camera device will support using a
3371 * MultiResolutionImageReader for the MAXIMUM stream of supported formats. Refer to
3372 * {@link android.hardware.camera2.CameraDevice#createCaptureSession } for additional details.</p>
3373 * <p>To use multi-resolution input streams, the supported formats can be queried by {@link android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getInputFormats }.
3374 * A reprocessable CameraCaptureSession can then be created using an {@link android.hardware.camera2.params.InputConfiguration InputConfiguration} constructed with
3375 * the input MultiResolutionStreamInfo group, queried by {@link android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getInputInfo }.</p>
3376 * <p>If a camera device supports multi-resolution {@code YUV} input and multi-resolution
3377 * {@code YUV} output, or multi-resolution {@code PRIVATE} input and multi-resolution
3378 * {@code PRIVATE} output, {@code JPEG} and {@code YUV} are guaranteed to be supported
3379 * multi-resolution output stream formats. Refer to
3380 * {@link android.hardware.camera2.CameraDevice#createCaptureSession } for
3381 * details about the additional mandatory stream combinations in this case.</p>
3382 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3383 */
3384 @PublicKey
3385 @NonNull
3386 @SyntheticKey
3387 public static final Key<android.hardware.camera2.params.MultiResolutionStreamConfigurationMap> SCALER_MULTI_RESOLUTION_STREAM_CONFIGURATION_MAP =
3388 new Key<android.hardware.camera2.params.MultiResolutionStreamConfigurationMap>("android.scaler.multiResolutionStreamConfigurationMap", android.hardware.camera2.params.MultiResolutionStreamConfigurationMap.class);
3389
3390 /**
3391 * <p>The available stream configurations that this
3392 * camera device supports (i.e. format, width, height, output/input stream) for a
3393 * CaptureRequest with {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} set to
3394 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
3395 * <p>Analogous to android.scaler.availableStreamConfigurations, for configurations
3396 * which are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
3397 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
3398 * <p>Not all output formats may be supported in a configuration with
3399 * an input stream of a particular format. For more details, see
3400 * android.scaler.availableInputOutputFormatsMapMaximumResolution.</p>
3401 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3402 *
3403 * @see CaptureRequest#SENSOR_PIXEL_MODE
3404 * @hide
3405 */
3406 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION =
3407 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.scaler.availableStreamConfigurationsMaximumResolution", android.hardware.camera2.params.StreamConfiguration[].class);
3408
3409 /**
3410 * <p>This lists the minimum frame duration for each
3411 * format/size combination when the camera device is sent a CaptureRequest with
3412 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} set to
3413 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
3414 * <p>Analogous to android.scaler.availableMinFrameDurations, for configurations
3415 * which are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
3416 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
3417 * <p>When multiple streams are used in a request (if supported, when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode}
3418 * is set to
3419 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }), the
3420 * minimum frame duration will be max(individual stream min durations).</p>
3421 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and
3422 * android.scaler.availableStallDurationsMaximumResolution for more details about
3423 * calculating the max frame rate.</p>
3424 * <p><b>Units</b>: (format, width, height, ns) x n</p>
3425 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3426 *
3427 * @see CaptureRequest#SENSOR_FRAME_DURATION
3428 * @see CaptureRequest#SENSOR_PIXEL_MODE
3429 * @hide
3430 */
3431 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION =
3432 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableMinFrameDurationsMaximumResolution", android.hardware.camera2.params.StreamConfigurationDuration[].class);
3433
3434 /**
3435 * <p>This lists the maximum stall duration for each
3436 * output format/size combination when CaptureRequests are submitted with
3437 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} set to
3438 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }</p>
3439 * <p>Analogous to android.scaler.availableMinFrameDurations, for configurations
3440 * which are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
3441 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
3442 * <p><b>Units</b>: (format, width, height, ns) x n</p>
3443 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3444 *
3445 * @see CaptureRequest#SENSOR_PIXEL_MODE
3446 * @hide
3447 */
3448 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION =
3449 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableStallDurationsMaximumResolution", android.hardware.camera2.params.StreamConfigurationDuration[].class);
3450
3451 /**
3452 * <p>The available stream configurations that this
3453 * camera device supports when given a CaptureRequest with {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode}
3454 * set to
3455 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION };
3456 * also includes the minimum frame durations
3457 * and the stall durations for each format/size combination.</p>
3458 * <p>Analogous to {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} for CaptureRequests where
3459 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is
3460 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
3461 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3462 *
3463 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
3464 * @see CaptureRequest#SENSOR_PIXEL_MODE
3465 */
3466 @PublicKey
3467 @NonNull
3468 @SyntheticKey
3469 public static final Key<android.hardware.camera2.params.StreamConfigurationMap> SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION =
3470 new Key<android.hardware.camera2.params.StreamConfigurationMap>("android.scaler.streamConfigurationMapMaximumResolution", android.hardware.camera2.params.StreamConfigurationMap.class);
3471
3472 /**
3473 * <p>The mapping of image formats that are supported by this
3474 * camera device for input streams, to their corresponding output formats, when
3475 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
3476 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
3477 * <p>Analogous to android.scaler.availableInputOutputFormatsMap for CaptureRequests where
3478 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is
3479 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
3480 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3481 *
3482 * @see CaptureRequest#SENSOR_PIXEL_MODE
3483 * @hide
3484 */
3485 public static final Key<android.hardware.camera2.params.ReprocessFormatsMap> SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP_MAXIMUM_RESOLUTION =
3486 new Key<android.hardware.camera2.params.ReprocessFormatsMap>("android.scaler.availableInputOutputFormatsMapMaximumResolution", android.hardware.camera2.params.ReprocessFormatsMap.class);
3487
3488 /**
3489 * <p>An array of mandatory stream combinations which are applicable when
3490 * {@link android.hardware.camera2.CaptureRequest } has {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} set
3491 * to {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.
3492 * This is an app-readable conversion of the maximum resolution mandatory stream combination
3493 * {@link android.hardware.camera2.CameraDevice#createCaptureSession tables}.</p>
3494 * <p>The array of
3495 * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is
3496 * generated according to the documented
3497 * {@link android.hardware.camera2.CameraDevice#createCaptureSession guideline} for each
3498 * device which has the
3499 * {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR }
3500 * capability.
3501 * Clients can use the array as a quick reference to find an appropriate camera stream
3502 * combination.
3503 * The mandatory stream combination array will be {@code null} in case the device is not an
3504 * {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR }
3505 * device.</p>
3506 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3507 *
3508 * @see CaptureRequest#SENSOR_PIXEL_MODE
3509 */
3510 @PublicKey
3511 @NonNull
3512 @SyntheticKey
3513 public static final Key<android.hardware.camera2.params.MandatoryStreamCombination[]> SCALER_MANDATORY_MAXIMUM_RESOLUTION_STREAM_COMBINATIONS =
3514 new Key<android.hardware.camera2.params.MandatoryStreamCombination[]>("android.scaler.mandatoryMaximumResolutionStreamCombinations", android.hardware.camera2.params.MandatoryStreamCombination[].class);
3515
3516 /**
3517 * <p>An array of mandatory stream combinations which are applicable when device support the
3518 * 10-bit output capability
3519 * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT }
3520 * This is an app-readable conversion of the 10 bit output mandatory stream combination
3521 * {@link android.hardware.camera2.CameraDevice#createCaptureSession tables}.</p>
3522 * <p>The array of
3523 * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is
3524 * generated according to the documented
3525 * {@link android.hardware.camera2.CameraDevice#createCaptureSession guideline} for each
3526 * device which has the
3527 * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT }
3528 * capability.
3529 * Clients can use the array as a quick reference to find an appropriate camera stream
3530 * combination.
3531 * The mandatory stream combination array will be {@code null} in case the device is not an
3532 * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT }
3533 * device.</p>
3534 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3535 */
3536 @PublicKey
3537 @NonNull
3538 @SyntheticKey
3539 public static final Key<android.hardware.camera2.params.MandatoryStreamCombination[]> SCALER_MANDATORY_TEN_BIT_OUTPUT_STREAM_COMBINATIONS =
3540 new Key<android.hardware.camera2.params.MandatoryStreamCombination[]>("android.scaler.mandatoryTenBitOutputStreamCombinations", android.hardware.camera2.params.MandatoryStreamCombination[].class);
3541
3542 /**
3543 * <p>An array of mandatory stream combinations which are applicable when device lists
3544 * {@code PREVIEW_STABILIZATION} in {@link CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES android.control.availableVideoStabilizationModes}.
3545 * This is an app-readable conversion of the preview stabilization mandatory stream
3546 * combination {@link android.hardware.camera2.CameraDevice#createCaptureSession tables}.</p>
3547 * <p>The array of
3548 * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is
3549 * generated according to the documented
3550 * {@link android.hardware.camera2.CameraDevice#createCaptureSession guideline} for each
3551 * device which supports {@code PREVIEW_STABILIZATION}
3552 * Clients can use the array as a quick reference to find an appropriate camera stream
3553 * combination.
3554 * The mandatory stream combination array will be {@code null} in case the device does not
3555 * list {@code PREVIEW_STABILIZATION} in {@link CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES android.control.availableVideoStabilizationModes}.</p>
3556 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3557 *
3558 * @see CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES
3559 */
3560 @PublicKey
3561 @NonNull
3562 @SyntheticKey
3563 public static final Key<android.hardware.camera2.params.MandatoryStreamCombination[]> SCALER_MANDATORY_PREVIEW_STABILIZATION_OUTPUT_STREAM_COMBINATIONS =
3564 new Key<android.hardware.camera2.params.MandatoryStreamCombination[]>("android.scaler.mandatoryPreviewStabilizationOutputStreamCombinations", android.hardware.camera2.params.MandatoryStreamCombination[].class);
3565
3566 /**
3567 * <p>Whether the camera device supports multi-resolution input or output streams</p>
3568 * <p>A logical multi-camera or an ultra high resolution camera may support multi-resolution
3569 * input or output streams. With multi-resolution output streams, the camera device is able
3570 * to output different resolution images depending on the current active physical camera or
3571 * pixel mode. With multi-resolution input streams, the camera device can reprocess images
3572 * of different resolutions from different physical cameras or sensor pixel modes.</p>
3573 * <p>When set to TRUE:</p>
3574 * <ul>
3575 * <li>For a logical multi-camera, the camera framework derives
3576 * {@link CameraCharacteristics#SCALER_MULTI_RESOLUTION_STREAM_CONFIGURATION_MAP android.scaler.multiResolutionStreamConfigurationMap} by combining the
3577 * android.scaler.physicalCameraMultiResolutionStreamConfigurations from its physical
3578 * cameras.</li>
3579 * <li>For an ultra-high resolution sensor camera, the camera framework directly copies
3580 * the value of android.scaler.physicalCameraMultiResolutionStreamConfigurations to
3581 * {@link CameraCharacteristics#SCALER_MULTI_RESOLUTION_STREAM_CONFIGURATION_MAP android.scaler.multiResolutionStreamConfigurationMap}.</li>
3582 * </ul>
3583 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3584 * <p><b>Limited capability</b> -
3585 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3586 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3587 *
3588 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3589 * @see CameraCharacteristics#SCALER_MULTI_RESOLUTION_STREAM_CONFIGURATION_MAP
3590 * @hide
3591 */
3592 public static final Key<Boolean> SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED =
3593 new Key<Boolean>("android.scaler.multiResolutionStreamSupported", boolean.class);
3594
3595 /**
3596 * <p>The stream use cases supported by this camera device.</p>
3597 * <p>The stream use case indicates the purpose of a particular camera stream from
3598 * the end-user perspective. Some examples of camera use cases are: preview stream for
3599 * live viewfinder shown to the user, still capture for generating high quality photo
3600 * capture, video record for encoding the camera output for the purpose of future playback,
3601 * and video call for live realtime video conferencing.</p>
3602 * <p>With this flag, the camera device can optimize the image processing pipeline
3603 * parameters, such as tuning, sensor mode, and ISP settings, independent of
3604 * the properties of the immediate camera output surface. For example, if the output
3605 * surface is a SurfaceTexture, the stream use case flag can be used to indicate whether
3606 * the camera frames eventually go to display, video encoder,
3607 * still image capture, or all of them combined.</p>
3608 * <p>The application sets the use case of a camera stream by calling
3609 * {@link android.hardware.camera2.params.OutputConfiguration#setStreamUseCase }.</p>
3610 * <p>A camera device with
3611 * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE }
3612 * capability must support the following stream use cases:</p>
3613 * <ul>
3614 * <li>DEFAULT</li>
3615 * <li>PREVIEW</li>
3616 * <li>STILL_CAPTURE</li>
3617 * <li>VIDEO_RECORD</li>
3618 * <li>PREVIEW_VIDEO_STILL</li>
3619 * <li>VIDEO_CALL</li>
3620 * </ul>
3621 * <p>The guaranteed stream combinations related to stream use case for a camera device with
3622 * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE }
3623 * capability is documented in the camera device
3624 * {@link android.hardware.camera2.CameraDevice#createCaptureSession guideline}. The
3625 * application is strongly recommended to use one of the guaranteed stream combinations.
3626 * If the application creates a session with a stream combination not in the guaranteed
3627 * list, or with mixed DEFAULT and non-DEFAULT use cases within the same session,
3628 * the camera device may ignore some stream use cases due to hardware constraints
3629 * and implementation details.</p>
3630 * <p>For stream combinations not covered by the stream use case mandatory lists, such as
3631 * reprocessable session, constrained high speed session, or RAW stream combinations, the
3632 * application should leave stream use cases within the session as DEFAULT.</p>
3633 * <p><b>Possible values:</b></p>
3634 * <ul>
3635 * <li>{@link #SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT DEFAULT}</li>
3636 * <li>{@link #SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW PREVIEW}</li>
3637 * <li>{@link #SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE STILL_CAPTURE}</li>
3638 * <li>{@link #SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD VIDEO_RECORD}</li>
3639 * <li>{@link #SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW_VIDEO_STILL PREVIEW_VIDEO_STILL}</li>
3640 * <li>{@link #SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_CALL VIDEO_CALL}</li>
3641 * </ul>
3642 *
3643 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3644 * @see #SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT
3645 * @see #SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW
3646 * @see #SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE
3647 * @see #SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD
3648 * @see #SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW_VIDEO_STILL
3649 * @see #SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_CALL
3650 */
3651 @PublicKey
3652 @NonNull
3653 public static final Key<long[]> SCALER_AVAILABLE_STREAM_USE_CASES =
3654 new Key<long[]>("android.scaler.availableStreamUseCases", long[].class);
3655
3656 /**
3657 * <p>An array of mandatory stream combinations with stream use cases.
3658 * This is an app-readable conversion of the mandatory stream combination
3659 * {@link android.hardware.camera2.CameraDevice#createCaptureSession tables} with
3660 * each stream's use case being set.</p>
3661 * <p>The array of
3662 * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is
3663 * generated according to the documented
3664 * {@link android.hardware.camera2.CameraDevice#createCaptureSession guideline} for a
3665 * camera device with
3666 * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE }
3667 * capability.
3668 * The mandatory stream combination array will be {@code null} in case the device doesn't
3669 * have {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE }
3670 * capability.</p>
3671 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3672 */
3673 @PublicKey
3674 @NonNull
3675 @SyntheticKey
3676 public static final Key<android.hardware.camera2.params.MandatoryStreamCombination[]> SCALER_MANDATORY_USE_CASE_STREAM_COMBINATIONS =
3677 new Key<android.hardware.camera2.params.MandatoryStreamCombination[]>("android.scaler.mandatoryUseCaseStreamCombinations", android.hardware.camera2.params.MandatoryStreamCombination[].class);
3678
3679 /**
3680 * <p>The area of the image sensor which corresponds to active pixels after any geometric
3681 * distortion correction has been applied.</p>
3682 * <p>This is the rectangle representing the size of the active region of the sensor (i.e.
3683 * the region that actually receives light from the scene) after any geometric correction
3684 * has been applied, and should be treated as the maximum size in pixels of any of the
3685 * image output formats aside from the raw formats.</p>
3686 * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of
3687 * the full pixel array, and the size of the full pixel array is given by
3688 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
3689 * <p>The coordinate system for most other keys that list pixel coordinates, including
3690 * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, is defined relative to the active array rectangle given in
3691 * this field, with <code>(0, 0)</code> being the top-left of this rectangle.</p>
3692 * <p>The active array may be smaller than the full pixel array, since the full array may
3693 * include black calibration pixels or other inactive regions.</p>
3694 * <p>For devices that do not support {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the active
3695 * array must be the same as {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.</p>
3696 * <p>For devices that support {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the active array must
3697 * be enclosed by {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}. The difference between
3698 * pre-correction active array and active array accounts for scaling or cropping caused
3699 * by lens geometric distortion correction.</p>
3700 * <p>In general, application should always refer to active array size for controls like
3701 * metering regions or crop region. Two exceptions are when the application is dealing with
3702 * RAW image buffers (RAW_SENSOR, RAW10, RAW12 etc), or when application explicitly set
3703 * {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} to OFF. In these cases, application should refer
3704 * to {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.</p>
3705 * <p><b>Units</b>: Pixel coordinates on the image sensor</p>
3706 * <p>This key is available on all devices.</p>
3707 *
3708 * @see CaptureRequest#DISTORTION_CORRECTION_MODE
3709 * @see CaptureRequest#SCALER_CROP_REGION
3710 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
3711 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
3712 */
3713 @PublicKey
3714 @NonNull
3715 public static final Key<android.graphics.Rect> SENSOR_INFO_ACTIVE_ARRAY_SIZE =
3716 new Key<android.graphics.Rect>("android.sensor.info.activeArraySize", android.graphics.Rect.class);
3717
3718 /**
3719 * <p>Range of sensitivities for {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} supported by this
3720 * camera device.</p>
3721 * <p>The values are the standard ISO sensitivity values,
3722 * as defined in ISO 12232:2006.</p>
3723 * <p><b>Range of valid values:</b><br>
3724 * Min &lt;= 100, Max &gt;= 800</p>
3725 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3726 * <p><b>Full capability</b> -
3727 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3728 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3729 *
3730 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3731 * @see CaptureRequest#SENSOR_SENSITIVITY
3732 */
3733 @PublicKey
3734 @NonNull
3735 public static final Key<android.util.Range<Integer>> SENSOR_INFO_SENSITIVITY_RANGE =
3736 new Key<android.util.Range<Integer>>("android.sensor.info.sensitivityRange", new TypeReference<android.util.Range<Integer>>() {{ }});
3737
3738 /**
3739 * <p>The arrangement of color filters on sensor;
3740 * represents the colors in the top-left 2x2 section of
3741 * the sensor, in reading order, for a Bayer camera, or the
3742 * light spectrum it captures for MONOCHROME camera.</p>
3743 * <p><b>Possible values:</b></p>
3744 * <ul>
3745 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB RGGB}</li>
3746 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG GRBG}</li>
3747 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG GBRG}</li>
3748 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR BGGR}</li>
3749 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB RGB}</li>
3750 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_MONO MONO}</li>
3751 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR NIR}</li>
3752 * </ul>
3753 *
3754 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3755 * <p><b>Full capability</b> -
3756 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3757 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3758 *
3759 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3760 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB
3761 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG
3762 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG
3763 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR
3764 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB
3765 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_MONO
3766 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR
3767 */
3768 @PublicKey
3769 @NonNull
3770 public static final Key<Integer> SENSOR_INFO_COLOR_FILTER_ARRANGEMENT =
3771 new Key<Integer>("android.sensor.info.colorFilterArrangement", int.class);
3772
3773 /**
3774 * <p>The range of image exposure times for {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} supported
3775 * by this camera device.</p>
3776 * <p><b>Units</b>: Nanoseconds</p>
3777 * <p><b>Range of valid values:</b><br>
3778 * The minimum exposure time will be less than 100 us. For FULL
3779 * capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL),
3780 * the maximum exposure time will be greater than 100ms.</p>
3781 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3782 * <p><b>Full capability</b> -
3783 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3784 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3785 *
3786 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3787 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
3788 */
3789 @PublicKey
3790 @NonNull
3791 public static final Key<android.util.Range<Long>> SENSOR_INFO_EXPOSURE_TIME_RANGE =
3792 new Key<android.util.Range<Long>>("android.sensor.info.exposureTimeRange", new TypeReference<android.util.Range<Long>>() {{ }});
3793
3794 /**
3795 * <p>The maximum possible frame duration (minimum frame rate) for
3796 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} that is supported this camera device.</p>
3797 * <p>Attempting to use frame durations beyond the maximum will result in the frame
3798 * duration being clipped to the maximum. See that control for a full definition of frame
3799 * durations.</p>
3800 * <p>Refer to {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration }
3801 * for the minimum frame duration values.</p>
3802 * <p><b>Units</b>: Nanoseconds</p>
3803 * <p><b>Range of valid values:</b><br>
3804 * For FULL capability devices
3805 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL), at least 100ms.</p>
3806 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3807 * <p><b>Full capability</b> -
3808 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3809 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3810 *
3811 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3812 * @see CaptureRequest#SENSOR_FRAME_DURATION
3813 */
3814 @PublicKey
3815 @NonNull
3816 public static final Key<Long> SENSOR_INFO_MAX_FRAME_DURATION =
3817 new Key<Long>("android.sensor.info.maxFrameDuration", long.class);
3818
3819 /**
3820 * <p>The physical dimensions of the full pixel
3821 * array.</p>
3822 * <p>This is the physical size of the sensor pixel
3823 * array defined by {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
3824 * <p><b>Units</b>: Millimeters</p>
3825 * <p>This key is available on all devices.</p>
3826 *
3827 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
3828 */
3829 @PublicKey
3830 @NonNull
3831 public static final Key<android.util.SizeF> SENSOR_INFO_PHYSICAL_SIZE =
3832 new Key<android.util.SizeF>("android.sensor.info.physicalSize", android.util.SizeF.class);
3833
3834 /**
3835 * <p>Dimensions of the full pixel array, possibly
3836 * including black calibration pixels.</p>
3837 * <p>The pixel count of the full pixel array of the image sensor, which covers
3838 * {@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize} area. This represents the full pixel dimensions of
3839 * the raw buffers produced by this sensor.</p>
3840 * <p>If a camera device supports raw sensor formats, either this or
3841 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} is the maximum dimensions for the raw
3842 * output formats listed in {@link android.hardware.camera2.params.StreamConfigurationMap }
3843 * (this depends on whether or not the image sensor returns buffers containing pixels that
3844 * are not part of the active array region for blacklevel calibration or other purposes).</p>
3845 * <p>Some parts of the full pixel array may not receive light from the scene,
3846 * or be otherwise inactive. The {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} key
3847 * defines the rectangle of active pixels that will be included in processed image
3848 * formats.</p>
3849 * <p><b>Units</b>: Pixels</p>
3850 * <p>This key is available on all devices.</p>
3851 *
3852 * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE
3853 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
3854 */
3855 @PublicKey
3856 @NonNull
3857 public static final Key<android.util.Size> SENSOR_INFO_PIXEL_ARRAY_SIZE =
3858 new Key<android.util.Size>("android.sensor.info.pixelArraySize", android.util.Size.class);
3859
3860 /**
3861 * <p>Maximum raw value output by sensor.</p>
3862 * <p>This specifies the fully-saturated encoding level for the raw
3863 * sample values from the sensor. This is typically caused by the
3864 * sensor becoming highly non-linear or clipping. The minimum for
3865 * each channel is specified by the offset in the
3866 * {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} key.</p>
3867 * <p>The white level is typically determined either by sensor bit depth
3868 * (8-14 bits is expected), or by the point where the sensor response
3869 * becomes too non-linear to be useful. The default value for this is
3870 * maximum representable value for a 16-bit raw sample (2^16 - 1).</p>
3871 * <p>The white level values of captured images may vary for different
3872 * capture settings (e.g., {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}). This key
3873 * represents a coarse approximation for such case. It is recommended
3874 * to use {@link CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL android.sensor.dynamicWhiteLevel} for captures when supported
3875 * by the camera device, which provides more accurate white level values.</p>
3876 * <p><b>Range of valid values:</b><br>
3877 * &gt; 255 (8-bit output)</p>
3878 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3879 *
3880 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
3881 * @see CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL
3882 * @see CaptureRequest#SENSOR_SENSITIVITY
3883 */
3884 @PublicKey
3885 @NonNull
3886 public static final Key<Integer> SENSOR_INFO_WHITE_LEVEL =
3887 new Key<Integer>("android.sensor.info.whiteLevel", int.class);
3888
3889 /**
3890 * <p>The time base source for sensor capture start timestamps.</p>
3891 * <p>The timestamps provided for captures are always in nanoseconds and monotonic, but
3892 * may not based on a time source that can be compared to other system time sources.</p>
3893 * <p>This characteristic defines the source for the timestamps, and therefore whether they
3894 * can be compared against other system time sources/timestamps.</p>
3895 * <p><b>Possible values:</b></p>
3896 * <ul>
3897 * <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN UNKNOWN}</li>
3898 * <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME REALTIME}</li>
3899 * </ul>
3900 *
3901 * <p>This key is available on all devices.</p>
3902 * @see #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN
3903 * @see #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME
3904 */
3905 @PublicKey
3906 @NonNull
3907 public static final Key<Integer> SENSOR_INFO_TIMESTAMP_SOURCE =
3908 new Key<Integer>("android.sensor.info.timestampSource", int.class);
3909
3910 /**
3911 * <p>Whether the RAW images output from this camera device are subject to
3912 * lens shading correction.</p>
3913 * <p>If TRUE, all images produced by the camera device in the RAW image formats will
3914 * have lens shading correction already applied to it. If FALSE, the images will
3915 * not be adjusted for lens shading correction.
3916 * See {@link CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW android.request.maxNumOutputRaw} for a list of RAW image formats.</p>
3917 * <p>This key will be <code>null</code> for all devices do not report this information.
3918 * Devices with RAW capability will always report this information in this key.</p>
3919 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
3920 *
3921 * @see CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW
3922 */
3923 @PublicKey
3924 @NonNull
3925 public static final Key<Boolean> SENSOR_INFO_LENS_SHADING_APPLIED =
3926 new Key<Boolean>("android.sensor.info.lensShadingApplied", boolean.class);
3927
3928 /**
3929 * <p>The area of the image sensor which corresponds to active pixels prior to the
3930 * application of any geometric distortion correction.</p>
3931 * <p>This is the rectangle representing the size of the active region of the sensor (i.e.
3932 * the region that actually receives light from the scene) before any geometric correction
3933 * has been applied, and should be treated as the active region rectangle for any of the
3934 * raw formats. All metadata associated with raw processing (e.g. the lens shading
3935 * correction map, and radial distortion fields) treats the top, left of this rectangle as
3936 * the origin, (0,0).</p>
3937 * <p>The size of this region determines the maximum field of view and the maximum number of
3938 * pixels that an image from this sensor can contain, prior to the application of
3939 * geometric distortion correction. The effective maximum pixel dimensions of a
3940 * post-distortion-corrected image is given by the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}
3941 * field, and the effective maximum field of view for a post-distortion-corrected image
3942 * can be calculated by applying the geometric distortion correction fields to this
3943 * rectangle, and cropping to the rectangle given in {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
3944 * <p>E.g. to calculate position of a pixel, (x,y), in a processed YUV output image with the
3945 * dimensions in {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} given the position of a pixel,
3946 * (x', y'), in the raw pixel array with dimensions given in
3947 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}:</p>
3948 * <ol>
3949 * <li>Choose a pixel (x', y') within the active array region of the raw buffer given in
3950 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}, otherwise this pixel is considered
3951 * to be outside of the FOV, and will not be shown in the processed output image.</li>
3952 * <li>Apply geometric distortion correction to get the post-distortion pixel coordinate,
3953 * (x_i, y_i). When applying geometric correction metadata, note that metadata for raw
3954 * buffers is defined relative to the top, left of the
3955 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} rectangle.</li>
3956 * <li>If the resulting corrected pixel coordinate is within the region given in
3957 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, then the position of this pixel in the
3958 * processed output image buffer is <code>(x_i - activeArray.left, y_i - activeArray.top)</code>,
3959 * when the top, left coordinate of that buffer is treated as (0, 0).</li>
3960 * </ol>
3961 * <p>Thus, for pixel x',y' = (25, 25) on a sensor where {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}
3962 * is (100,100), {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} is (10, 10, 100, 100),
3963 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} is (20, 20, 80, 80), and the geometric distortion
3964 * correction doesn't change the pixel coordinate, the resulting pixel selected in
3965 * pixel coordinates would be x,y = (25, 25) relative to the top,left of the raw buffer
3966 * with dimensions given in {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}, and would be (5, 5)
3967 * relative to the top,left of post-processed YUV output buffer with dimensions given in
3968 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
3969 * <p>The currently supported fields that correct for geometric distortion are:</p>
3970 * <ol>
3971 * <li>{@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}.</li>
3972 * </ol>
3973 * <p>If the camera device doesn't support geometric distortion correction, or all of the
3974 * geometric distortion fields are no-ops, this rectangle will be the same as the
3975 * post-distortion-corrected rectangle given in {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
3976 * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of
3977 * the full pixel array, and the size of the full pixel array is given by
3978 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
3979 * <p>The pre-correction active array may be smaller than the full pixel array, since the
3980 * full array may include black calibration pixels or other inactive regions.</p>
3981 * <p><b>Units</b>: Pixel coordinates on the image sensor</p>
3982 * <p>This key is available on all devices.</p>
3983 *
3984 * @see CameraCharacteristics#LENS_DISTORTION
3985 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
3986 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
3987 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
3988 */
3989 @PublicKey
3990 @NonNull
3991 public static final Key<android.graphics.Rect> SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE =
3992 new Key<android.graphics.Rect>("android.sensor.info.preCorrectionActiveArraySize", android.graphics.Rect.class);
3993
3994 /**
3995 * <p>The area of the image sensor which corresponds to active pixels after any geometric
3996 * distortion correction has been applied, when the sensor runs in maximum resolution mode.</p>
3997 * <p>Analogous to {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode}
3998 * is set to
3999 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.
4000 * Refer to {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} for details, with sensor array related keys
4001 * replaced with their
4002 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }
4003 * counterparts.
4004 * This key will only be present for devices which advertise the
4005 * {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR }
4006 * capability.</p>
4007 * <p><b>Units</b>: Pixel coordinates on the image sensor</p>
4008 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4009 *
4010 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
4011 * @see CaptureRequest#SENSOR_PIXEL_MODE
4012 */
4013 @PublicKey
4014 @NonNull
4015 public static final Key<android.graphics.Rect> SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION =
4016 new Key<android.graphics.Rect>("android.sensor.info.activeArraySizeMaximumResolution", android.graphics.Rect.class);
4017
4018 /**
4019 * <p>Dimensions of the full pixel array, possibly
4020 * including black calibration pixels, when the sensor runs in maximum resolution mode.
4021 * Analogous to {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}, when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is
4022 * set to
4023 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
4024 * <p>The pixel count of the full pixel array of the image sensor, which covers
4025 * {@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize} area. This represents the full pixel dimensions of
4026 * the raw buffers produced by this sensor, when it runs in maximum resolution mode. That
4027 * is, when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
4028 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.
4029 * This key will only be present for devices which advertise the
4030 * {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR }
4031 * capability.</p>
4032 * <p><b>Units</b>: Pixels</p>
4033 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4034 *
4035 * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE
4036 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
4037 * @see CaptureRequest#SENSOR_PIXEL_MODE
4038 */
4039 @PublicKey
4040 @NonNull
4041 public static final Key<android.util.Size> SENSOR_INFO_PIXEL_ARRAY_SIZE_MAXIMUM_RESOLUTION =
4042 new Key<android.util.Size>("android.sensor.info.pixelArraySizeMaximumResolution", android.util.Size.class);
4043
4044 /**
4045 * <p>The area of the image sensor which corresponds to active pixels prior to the
4046 * application of any geometric distortion correction, when the sensor runs in maximum
4047 * resolution mode. This key must be used for crop / metering regions, only when
4048 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
4049 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
4050 * <p>Analogous to {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize},
4051 * when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
4052 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.
4053 * This key will only be present for devices which advertise the
4054 * {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR }
4055 * capability.</p>
4056 * <p><b>Units</b>: Pixel coordinates on the image sensor</p>
4057 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4058 *
4059 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
4060 * @see CaptureRequest#SENSOR_PIXEL_MODE
4061 */
4062 @PublicKey
4063 @NonNull
4064 public static final Key<android.graphics.Rect> SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION =
4065 new Key<android.graphics.Rect>("android.sensor.info.preCorrectionActiveArraySizeMaximumResolution", android.graphics.Rect.class);
4066
4067 /**
4068 * <p>Dimensions of the group of pixels which are under the same color filter.
4069 * This specifies the width and height (pair of integers) of the group of pixels which fall
4070 * under the same color filter for ULTRA_HIGH_RESOLUTION sensors.</p>
4071 * <p>Sensors can have pixels grouped together under the same color filter in order
4072 * to improve various aspects of imaging such as noise reduction, low light
4073 * performance etc. These groups can be of various sizes such as 2X2 (quad bayer),
4074 * 3X3 (nona-bayer). This key specifies the length and width of the pixels grouped under
4075 * the same color filter.</p>
4076 * <p>This key will not be present if REMOSAIC_REPROCESSING is not supported, since RAW images
4077 * will have a regular bayer pattern.</p>
4078 * <p>This key will not be present for sensors which don't have the
4079 * {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR }
4080 * capability.</p>
4081 * <p><b>Units</b>: Pixels</p>
4082 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4083 */
4084 @PublicKey
4085 @NonNull
4086 public static final Key<android.util.Size> SENSOR_INFO_BINNING_FACTOR =
4087 new Key<android.util.Size>("android.sensor.info.binningFactor", android.util.Size.class);
4088
4089 /**
4090 * <p>The standard reference illuminant used as the scene light source when
4091 * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1},
4092 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and
4093 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} matrices.</p>
4094 * <p>The values in this key correspond to the values defined for the
4095 * EXIF LightSource tag. These illuminants are standard light sources
4096 * that are often used calibrating camera devices.</p>
4097 * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1},
4098 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and
4099 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} will also be present.</p>
4100 * <p>Some devices may choose to provide a second set of calibration
4101 * information for improved quality, including
4102 * {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2} and its corresponding matrices.</p>
4103 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4104 * the camera device has RAW capability.</p>
4105 * <p><b>Possible values:</b></p>
4106 * <ul>
4107 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT DAYLIGHT}</li>
4108 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT FLUORESCENT}</li>
4109 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN TUNGSTEN}</li>
4110 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLASH FLASH}</li>
4111 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER FINE_WEATHER}</li>
4112 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER CLOUDY_WEATHER}</li>
4113 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_SHADE SHADE}</li>
4114 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT DAYLIGHT_FLUORESCENT}</li>
4115 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT DAY_WHITE_FLUORESCENT}</li>
4116 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT COOL_WHITE_FLUORESCENT}</li>
4117 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT WHITE_FLUORESCENT}</li>
4118 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A STANDARD_A}</li>
4119 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B STANDARD_B}</li>
4120 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C STANDARD_C}</li>
4121 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D55 D55}</li>
4122 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D65 D65}</li>
4123 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D75 D75}</li>
4124 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D50 D50}</li>
4125 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN ISO_STUDIO_TUNGSTEN}</li>
4126 * </ul>
4127 *
4128 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4129 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
4130 *
4131 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1
4132 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM1
4133 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX1
4134 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
4135 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT
4136 * @see #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT
4137 * @see #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN
4138 * @see #SENSOR_REFERENCE_ILLUMINANT1_FLASH
4139 * @see #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER
4140 * @see #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER
4141 * @see #SENSOR_REFERENCE_ILLUMINANT1_SHADE
4142 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT
4143 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT
4144 * @see #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT
4145 * @see #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT
4146 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A
4147 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B
4148 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C
4149 * @see #SENSOR_REFERENCE_ILLUMINANT1_D55
4150 * @see #SENSOR_REFERENCE_ILLUMINANT1_D65
4151 * @see #SENSOR_REFERENCE_ILLUMINANT1_D75
4152 * @see #SENSOR_REFERENCE_ILLUMINANT1_D50
4153 * @see #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN
4154 */
4155 @PublicKey
4156 @NonNull
4157 public static final Key<Integer> SENSOR_REFERENCE_ILLUMINANT1 =
4158 new Key<Integer>("android.sensor.referenceIlluminant1", int.class);
4159
4160 /**
4161 * <p>The standard reference illuminant used as the scene light source when
4162 * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2},
4163 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and
4164 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} matrices.</p>
4165 * <p>See {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1} for more details.</p>
4166 * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2},
4167 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and
4168 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} will also be present.</p>
4169 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4170 * the camera device has RAW capability.</p>
4171 * <p><b>Range of valid values:</b><br>
4172 * Any value listed in {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}</p>
4173 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4174 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
4175 *
4176 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2
4177 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM2
4178 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX2
4179 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
4180 */
4181 @PublicKey
4182 @NonNull
4183 public static final Key<Byte> SENSOR_REFERENCE_ILLUMINANT2 =
4184 new Key<Byte>("android.sensor.referenceIlluminant2", byte.class);
4185
4186 /**
4187 * <p>A per-device calibration transform matrix that maps from the
4188 * reference sensor colorspace to the actual device sensor colorspace.</p>
4189 * <p>This matrix is used to correct for per-device variations in the
4190 * sensor colorspace, and is used for processing raw buffer data.</p>
4191 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
4192 * contains a per-device calibration transform that maps colors
4193 * from reference sensor color space (i.e. the "golden module"
4194 * colorspace) into this camera device's native sensor color
4195 * space under the first reference illuminant
4196 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p>
4197 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4198 * the camera device has RAW capability.</p>
4199 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4200 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
4201 *
4202 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
4203 */
4204 @PublicKey
4205 @NonNull
4206 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM1 =
4207 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform1", android.hardware.camera2.params.ColorSpaceTransform.class);
4208
4209 /**
4210 * <p>A per-device calibration transform matrix that maps from the
4211 * reference sensor colorspace to the actual device sensor colorspace
4212 * (this is the colorspace of the raw buffer data).</p>
4213 * <p>This matrix is used to correct for per-device variations in the
4214 * sensor colorspace, and is used for processing raw buffer data.</p>
4215 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
4216 * contains a per-device calibration transform that maps colors
4217 * from reference sensor color space (i.e. the "golden module"
4218 * colorspace) into this camera device's native sensor color
4219 * space under the second reference illuminant
4220 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p>
4221 * <p>This matrix will only be present if the second reference
4222 * illuminant is present.</p>
4223 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4224 * the camera device has RAW capability.</p>
4225 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4226 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
4227 *
4228 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
4229 */
4230 @PublicKey
4231 @NonNull
4232 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM2 =
4233 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform2", android.hardware.camera2.params.ColorSpaceTransform.class);
4234
4235 /**
4236 * <p>A matrix that transforms color values from CIE XYZ color space to
4237 * reference sensor color space.</p>
4238 * <p>This matrix is used to convert from the standard CIE XYZ color
4239 * space to the reference sensor colorspace, and is used when processing
4240 * raw buffer data.</p>
4241 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
4242 * contains a color transform matrix that maps colors from the CIE
4243 * XYZ color space to the reference sensor color space (i.e. the
4244 * "golden module" colorspace) under the first reference illuminant
4245 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p>
4246 * <p>The white points chosen in both the reference sensor color space
4247 * and the CIE XYZ colorspace when calculating this transform will
4248 * match the standard white point for the first reference illuminant
4249 * (i.e. no chromatic adaptation will be applied by this transform).</p>
4250 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4251 * the camera device has RAW capability.</p>
4252 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4253 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
4254 *
4255 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
4256 */
4257 @PublicKey
4258 @NonNull
4259 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM1 =
4260 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform1", android.hardware.camera2.params.ColorSpaceTransform.class);
4261
4262 /**
4263 * <p>A matrix that transforms color values from CIE XYZ color space to
4264 * reference sensor color space.</p>
4265 * <p>This matrix is used to convert from the standard CIE XYZ color
4266 * space to the reference sensor colorspace, and is used when processing
4267 * raw buffer data.</p>
4268 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
4269 * contains a color transform matrix that maps colors from the CIE
4270 * XYZ color space to the reference sensor color space (i.e. the
4271 * "golden module" colorspace) under the second reference illuminant
4272 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p>
4273 * <p>The white points chosen in both the reference sensor color space
4274 * and the CIE XYZ colorspace when calculating this transform will
4275 * match the standard white point for the second reference illuminant
4276 * (i.e. no chromatic adaptation will be applied by this transform).</p>
4277 * <p>This matrix will only be present if the second reference
4278 * illuminant is present.</p>
4279 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4280 * the camera device has RAW capability.</p>
4281 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4282 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
4283 *
4284 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
4285 */
4286 @PublicKey
4287 @NonNull
4288 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM2 =
4289 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform2", android.hardware.camera2.params.ColorSpaceTransform.class);
4290
4291 /**
4292 * <p>A matrix that transforms white balanced camera colors from the reference
4293 * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
4294 * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
4295 * is used when processing raw buffer data.</p>
4296 * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
4297 * a color transform matrix that maps white balanced colors from the
4298 * reference sensor color space to the CIE XYZ color space with a D50 white
4299 * point.</p>
4300 * <p>Under the first reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1})
4301 * this matrix is chosen so that the standard white point for this reference
4302 * illuminant in the reference sensor colorspace is mapped to D50 in the
4303 * CIE XYZ colorspace.</p>
4304 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4305 * the camera device has RAW capability.</p>
4306 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4307 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
4308 *
4309 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
4310 */
4311 @PublicKey
4312 @NonNull
4313 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX1 =
4314 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix1", android.hardware.camera2.params.ColorSpaceTransform.class);
4315
4316 /**
4317 * <p>A matrix that transforms white balanced camera colors from the reference
4318 * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
4319 * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
4320 * is used when processing raw buffer data.</p>
4321 * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
4322 * a color transform matrix that maps white balanced colors from the
4323 * reference sensor color space to the CIE XYZ color space with a D50 white
4324 * point.</p>
4325 * <p>Under the second reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2})
4326 * this matrix is chosen so that the standard white point for this reference
4327 * illuminant in the reference sensor colorspace is mapped to D50 in the
4328 * CIE XYZ colorspace.</p>
4329 * <p>This matrix will only be present if the second reference
4330 * illuminant is present.</p>
4331 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4332 * the camera device has RAW capability.</p>
4333 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4334 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
4335 *
4336 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
4337 */
4338 @PublicKey
4339 @NonNull
4340 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX2 =
4341 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix2", android.hardware.camera2.params.ColorSpaceTransform.class);
4342
4343 /**
4344 * <p>A fixed black level offset for each of the color filter arrangement
4345 * (CFA) mosaic channels.</p>
4346 * <p>This key specifies the zero light value for each of the CFA mosaic
4347 * channels in the camera sensor. The maximal value output by the
4348 * sensor is represented by the value in {@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}.</p>
4349 * <p>The values are given in the same order as channels listed for the CFA
4350 * layout key (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}), i.e. the
4351 * nth value given corresponds to the black level offset for the nth
4352 * color channel listed in the CFA.</p>
4353 * <p>The black level values of captured images may vary for different
4354 * capture settings (e.g., {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}). This key
4355 * represents a coarse approximation for such case. It is recommended to
4356 * use {@link CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL android.sensor.dynamicBlackLevel} or use pixels from
4357 * {@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions} directly for captures when
4358 * supported by the camera device, which provides more accurate black
4359 * level values. For raw capture in particular, it is recommended to use
4360 * pixels from {@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions} to calculate black
4361 * level values for each frame.</p>
4362 * <p>For a MONOCHROME camera device, all of the 2x2 channels must have the same values.</p>
4363 * <p><b>Range of valid values:</b><br>
4364 * &gt;= 0 for each.</p>
4365 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4366 *
4367 * @see CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL
4368 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
4369 * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL
4370 * @see CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS
4371 * @see CaptureRequest#SENSOR_SENSITIVITY
4372 */
4373 @PublicKey
4374 @NonNull
4375 public static final Key<android.hardware.camera2.params.BlackLevelPattern> SENSOR_BLACK_LEVEL_PATTERN =
4376 new Key<android.hardware.camera2.params.BlackLevelPattern>("android.sensor.blackLevelPattern", android.hardware.camera2.params.BlackLevelPattern.class);
4377
4378 /**
4379 * <p>Maximum sensitivity that is implemented
4380 * purely through analog gain.</p>
4381 * <p>For {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} values less than or
4382 * equal to this, all applied gain must be analog. For
4383 * values above this, the gain applied can be a mix of analog and
4384 * digital.</p>
4385 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4386 * <p><b>Full capability</b> -
4387 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
4388 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
4389 *
4390 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
4391 * @see CaptureRequest#SENSOR_SENSITIVITY
4392 */
4393 @PublicKey
4394 @NonNull
4395 public static final Key<Integer> SENSOR_MAX_ANALOG_SENSITIVITY =
4396 new Key<Integer>("android.sensor.maxAnalogSensitivity", int.class);
4397
4398 /**
4399 * <p>Clockwise angle through which the output image needs to be rotated to be
4400 * upright on the device screen in its native orientation.</p>
4401 * <p>Also defines the direction of rolling shutter readout, which is from top to bottom in
4402 * the sensor's coordinate system.</p>
4403 * <p>Starting with Android API level 32, camera clients that query the orientation via
4404 * {@link android.hardware.camera2.CameraCharacteristics#get } on foldable devices which
4405 * include logical cameras can receive a value that can dynamically change depending on the
4406 * device/fold state.
4407 * Clients are advised to not cache or store the orientation value of such logical sensors.
4408 * In case repeated queries to CameraCharacteristics are not preferred, then clients can
4409 * also access the entire mapping from device state to sensor orientation in
4410 * {@link android.hardware.camera2.params.DeviceStateSensorOrientationMap }.
4411 * Do note that a dynamically changing sensor orientation value in camera characteristics
4412 * will not be the best way to establish the orientation per frame. Clients that want to
4413 * know the sensor orientation of a particular captured frame should query the
4414 * {@link CaptureResult#LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID android.logicalMultiCamera.activePhysicalId} from the corresponding capture result and
4415 * check the respective physical camera orientation.</p>
4416 * <p><b>Units</b>: Degrees of clockwise rotation; always a multiple of
4417 * 90</p>
4418 * <p><b>Range of valid values:</b><br>
4419 * 0, 90, 180, 270</p>
4420 * <p>This key is available on all devices.</p>
4421 *
4422 * @see CaptureResult#LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID
4423 */
4424 @PublicKey
4425 @NonNull
4426 public static final Key<Integer> SENSOR_ORIENTATION =
4427 new Key<Integer>("android.sensor.orientation", int.class);
4428
4429 /**
4430 * <p>List of sensor test pattern modes for {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}
4431 * supported by this camera device.</p>
4432 * <p>Defaults to OFF, and always includes OFF if defined.</p>
4433 * <p><b>Range of valid values:</b><br>
4434 * Any value listed in {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}</p>
4435 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4436 *
4437 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
4438 */
4439 @PublicKey
4440 @NonNull
4441 public static final Key<int[]> SENSOR_AVAILABLE_TEST_PATTERN_MODES =
4442 new Key<int[]>("android.sensor.availableTestPatternModes", int[].class);
4443
4444 /**
4445 * <p>List of disjoint rectangles indicating the sensor
4446 * optically shielded black pixel regions.</p>
4447 * <p>In most camera sensors, the active array is surrounded by some
4448 * optically shielded pixel areas. By blocking light, these pixels
4449 * provides a reliable black reference for black level compensation
4450 * in active array region.</p>
4451 * <p>This key provides a list of disjoint rectangles specifying the
4452 * regions of optically shielded (with metal shield) black pixel
4453 * regions if the camera device is capable of reading out these black
4454 * pixels in the output raw images. In comparison to the fixed black
4455 * level values reported by {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern}, this key
4456 * may provide a more accurate way for the application to calculate
4457 * black level of each captured raw images.</p>
4458 * <p>When this key is reported, the {@link CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL android.sensor.dynamicBlackLevel} and
4459 * {@link CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL android.sensor.dynamicWhiteLevel} will also be reported.</p>
4460 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4461 *
4462 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
4463 * @see CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL
4464 * @see CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL
4465 */
4466 @PublicKey
4467 @NonNull
4468 public static final Key<android.graphics.Rect[]> SENSOR_OPTICAL_BLACK_REGIONS =
4469 new Key<android.graphics.Rect[]>("android.sensor.opticalBlackRegions", android.graphics.Rect[].class);
4470
4471 /**
4472 * <p>Whether or not the camera device supports readout timestamp and
4473 * onReadoutStarted callback.</p>
4474 * <p>If this tag is HARDWARE, the camera device calls onReadoutStarted in addition to the
4475 * onCaptureStarted callback for each capture. The timestamp passed into the callback
4476 * is the start of camera image readout rather than the start of the exposure. In
4477 * addition, the application can configure an
4478 * {@link android.hardware.camera2.params.OutputConfiguration } with
4479 * TIMESTAMP_BASE_READOUT_SENSOR timestamp base, in which case, the timestamp of the
4480 * output surface matches the timestamp from the corresponding onReadoutStarted callback.</p>
4481 * <p>The readout timestamp is beneficial for video recording, because the encoder favors
4482 * uniform timestamps, and the readout timestamps better reflect the cadence camera sensors
4483 * output data.</p>
4484 * <p>If this tag is HARDWARE, the camera device produces the start-of-exposure and
4485 * start-of-readout together. As a result, the onReadoutStarted is called right after
4486 * onCaptureStarted. The difference in start-of-readout and start-of-exposure is the sensor
4487 * exposure time, plus certain constant offset. The offset is usually due to camera sensor
4488 * level crop, and it remains constant for a given camera sensor mode.</p>
4489 * <p><b>Possible values:</b></p>
4490 * <ul>
4491 * <li>{@link #SENSOR_READOUT_TIMESTAMP_NOT_SUPPORTED NOT_SUPPORTED}</li>
4492 * <li>{@link #SENSOR_READOUT_TIMESTAMP_HARDWARE HARDWARE}</li>
4493 * </ul>
4494 *
4495 * <p>This key is available on all devices.</p>
4496 * @see #SENSOR_READOUT_TIMESTAMP_NOT_SUPPORTED
4497 * @see #SENSOR_READOUT_TIMESTAMP_HARDWARE
4498 * @hide
4499 */
4500 @PublicKey
4501 @NonNull
4502 public static final Key<Integer> SENSOR_READOUT_TIMESTAMP =
4503 new Key<Integer>("android.sensor.readoutTimestamp", int.class);
4504
4505 /**
4506 * <p>List of lens shading modes for {@link CaptureRequest#SHADING_MODE android.shading.mode} that are supported by this camera device.</p>
4507 * <p>This list contains lens shading modes that can be set for the camera device.
4508 * Camera devices that support the MANUAL_POST_PROCESSING capability will always
4509 * list OFF and FAST mode. This includes all FULL level devices.
4510 * LEGACY devices will always only support FAST mode.</p>
4511 * <p><b>Range of valid values:</b><br>
4512 * Any value listed in {@link CaptureRequest#SHADING_MODE android.shading.mode}</p>
4513 * <p>This key is available on all devices.</p>
4514 *
4515 * @see CaptureRequest#SHADING_MODE
4516 */
4517 @PublicKey
4518 @NonNull
4519 public static final Key<int[]> SHADING_AVAILABLE_MODES =
4520 new Key<int[]>("android.shading.availableModes", int[].class);
4521
4522 /**
4523 * <p>List of face detection modes for {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} that are
4524 * supported by this camera device.</p>
4525 * <p>OFF is always supported.</p>
4526 * <p><b>Range of valid values:</b><br>
4527 * Any value listed in {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}</p>
4528 * <p>This key is available on all devices.</p>
4529 *
4530 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
4531 */
4532 @PublicKey
4533 @NonNull
4534 public static final Key<int[]> STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES =
4535 new Key<int[]>("android.statistics.info.availableFaceDetectModes", int[].class);
4536
4537 /**
4538 * <p>The maximum number of simultaneously detectable
4539 * faces.</p>
4540 * <p><b>Range of valid values:</b><br>
4541 * 0 for cameras without available face detection; otherwise:
4542 * <code>&gt;=4</code> for LIMITED or FULL hwlevel devices or
4543 * <code>&gt;0</code> for LEGACY devices.</p>
4544 * <p>This key is available on all devices.</p>
4545 */
4546 @PublicKey
4547 @NonNull
4548 public static final Key<Integer> STATISTICS_INFO_MAX_FACE_COUNT =
4549 new Key<Integer>("android.statistics.info.maxFaceCount", int.class);
4550
4551 /**
4552 * <p>List of hot pixel map output modes for {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode} that are
4553 * supported by this camera device.</p>
4554 * <p>If no hotpixel map output is available for this camera device, this will contain only
4555 * <code>false</code>.</p>
4556 * <p>ON is always supported on devices with the RAW capability.</p>
4557 * <p><b>Range of valid values:</b><br>
4558 * Any value listed in {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode}</p>
4559 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4560 *
4561 * @see CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE
4562 */
4563 @PublicKey
4564 @NonNull
4565 public static final Key<boolean[]> STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES =
4566 new Key<boolean[]>("android.statistics.info.availableHotPixelMapModes", boolean[].class);
4567
4568 /**
4569 * <p>List of lens shading map output modes for {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} that
4570 * are supported by this camera device.</p>
4571 * <p>If no lens shading map output is available for this camera device, this key will
4572 * contain only OFF.</p>
4573 * <p>ON is always supported on devices with the RAW capability.
4574 * LEGACY mode devices will always only support OFF.</p>
4575 * <p><b>Range of valid values:</b><br>
4576 * Any value listed in {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode}</p>
4577 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4578 *
4579 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
4580 */
4581 @PublicKey
4582 @NonNull
4583 public static final Key<int[]> STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES =
4584 new Key<int[]>("android.statistics.info.availableLensShadingMapModes", int[].class);
4585
4586 /**
4587 * <p>List of OIS data output modes for {@link CaptureRequest#STATISTICS_OIS_DATA_MODE android.statistics.oisDataMode} that
4588 * are supported by this camera device.</p>
4589 * <p>If no OIS data output is available for this camera device, this key will
4590 * contain only OFF.</p>
4591 * <p><b>Range of valid values:</b><br>
4592 * Any value listed in {@link CaptureRequest#STATISTICS_OIS_DATA_MODE android.statistics.oisDataMode}</p>
4593 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4594 *
4595 * @see CaptureRequest#STATISTICS_OIS_DATA_MODE
4596 */
4597 @PublicKey
4598 @NonNull
4599 public static final Key<int[]> STATISTICS_INFO_AVAILABLE_OIS_DATA_MODES =
4600 new Key<int[]>("android.statistics.info.availableOisDataModes", int[].class);
4601
4602 /**
4603 * <p>Maximum number of supported points in the
4604 * tonemap curve that can be used for {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p>
4605 * <p>If the actual number of points provided by the application (in {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}*) is
4606 * less than this maximum, the camera device will resample the curve to its internal
4607 * representation, using linear interpolation.</p>
4608 * <p>The output curves in the result metadata may have a different number
4609 * of points than the input curves, and will represent the actual
4610 * hardware curves used as closely as possible when linearly interpolated.</p>
4611 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4612 * <p><b>Full capability</b> -
4613 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
4614 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
4615 *
4616 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
4617 * @see CaptureRequest#TONEMAP_CURVE
4618 */
4619 @PublicKey
4620 @NonNull
4621 public static final Key<Integer> TONEMAP_MAX_CURVE_POINTS =
4622 new Key<Integer>("android.tonemap.maxCurvePoints", int.class);
4623
4624 /**
4625 * <p>List of tonemapping modes for {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} that are supported by this camera
4626 * device.</p>
4627 * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always contain
4628 * at least one of below mode combinations:</p>
4629 * <ul>
4630 * <li>CONTRAST_CURVE, FAST and HIGH_QUALITY</li>
4631 * <li>GAMMA_VALUE, PRESET_CURVE, FAST and HIGH_QUALITY</li>
4632 * </ul>
4633 * <p>This includes all FULL level devices.</p>
4634 * <p><b>Range of valid values:</b><br>
4635 * Any value listed in {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</p>
4636 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4637 * <p><b>Full capability</b> -
4638 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
4639 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
4640 *
4641 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
4642 * @see CaptureRequest#TONEMAP_MODE
4643 */
4644 @PublicKey
4645 @NonNull
4646 public static final Key<int[]> TONEMAP_AVAILABLE_TONE_MAP_MODES =
4647 new Key<int[]>("android.tonemap.availableToneMapModes", int[].class);
4648
4649 /**
4650 * <p>A list of camera LEDs that are available on this system.</p>
4651 * <p><b>Possible values:</b></p>
4652 * <ul>
4653 * <li>{@link #LED_AVAILABLE_LEDS_TRANSMIT TRANSMIT}</li>
4654 * </ul>
4655 *
4656 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4657 * @see #LED_AVAILABLE_LEDS_TRANSMIT
4658 * @hide
4659 */
4660 public static final Key<int[]> LED_AVAILABLE_LEDS =
4661 new Key<int[]>("android.led.availableLeds", int[].class);
4662
4663 /**
4664 * <p>Generally classifies the overall set of the camera device functionality.</p>
4665 * <p>The supported hardware level is a high-level description of the camera device's
4666 * capabilities, summarizing several capabilities into one field. Each level adds additional
4667 * features to the previous one, and is always a strict superset of the previous level.
4668 * The ordering is <code>LEGACY &lt; LIMITED &lt; FULL &lt; LEVEL_3</code>.</p>
4669 * <p>Starting from <code>LEVEL_3</code>, the level enumerations are guaranteed to be in increasing
4670 * numerical value as well. To check if a given device is at least at a given hardware level,
4671 * the following code snippet can be used:</p>
4672 * <pre><code>// Returns true if the device supports the required hardware level, or better.
4673 * boolean isHardwareLevelSupported(CameraCharacteristics c, int requiredLevel) {
4674 * final int[] sortedHwLevels = {
4675 * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY,
4676 * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL,
4677 * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED,
4678 * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL,
4679 * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_3
4680 * };
4681 * int deviceLevel = c.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
4682 * if (requiredLevel == deviceLevel) {
4683 * return true;
4684 * }
4685 *
4686 * for (int sortedlevel : sortedHwLevels) {
4687 * if (sortedlevel == requiredLevel) {
4688 * return true;
4689 * } else if (sortedlevel == deviceLevel) {
4690 * return false;
4691 * }
4692 * }
4693 * return false; // Should never reach here
4694 * }
4695 * </code></pre>
4696 * <p>At a high level, the levels are:</p>
4697 * <ul>
4698 * <li><code>LEGACY</code> devices operate in a backwards-compatibility mode for older
4699 * Android devices, and have very limited capabilities.</li>
4700 * <li><code>LIMITED</code> devices represent the
4701 * baseline feature set, and may also include additional capabilities that are
4702 * subsets of <code>FULL</code>.</li>
4703 * <li><code>FULL</code> devices additionally support per-frame manual control of sensor, flash, lens and
4704 * post-processing settings, and image capture at a high rate.</li>
4705 * <li><code>LEVEL_3</code> devices additionally support YUV reprocessing and RAW image capture, along
4706 * with additional output stream configurations.</li>
4707 * <li><code>EXTERNAL</code> devices are similar to <code>LIMITED</code> devices with exceptions like some sensor or
4708 * lens information not reported or less stable framerates.</li>
4709 * </ul>
4710 * <p>See the individual level enums for full descriptions of the supported capabilities. The
4711 * {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} entry describes the device's capabilities at a
4712 * finer-grain level, if needed. In addition, many controls have their available settings or
4713 * ranges defined in individual entries from {@link android.hardware.camera2.CameraCharacteristics }.</p>
4714 * <p>Some features are not part of any particular hardware level or capability and must be
4715 * queried separately. These include:</p>
4716 * <ul>
4717 * <li>Calibrated timestamps ({@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} <code>==</code> REALTIME)</li>
4718 * <li>Precision lens control ({@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} <code>==</code> CALIBRATED)</li>
4719 * <li>Face detection ({@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes})</li>
4720 * <li>Optical or electrical image stabilization
4721 * ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization},
4722 * {@link CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES android.control.availableVideoStabilizationModes})</li>
4723 * </ul>
4724 * <p><b>Possible values:</b></p>
4725 * <ul>
4726 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED}</li>
4727 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL}</li>
4728 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY LEGACY}</li>
4729 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_3 3}</li>
4730 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL EXTERNAL}</li>
4731 * </ul>
4732 *
4733 * <p>This key is available on all devices.</p>
4734 *
4735 * @see CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES
4736 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
4737 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
4738 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
4739 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
4740 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
4741 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED
4742 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_FULL
4743 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY
4744 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_3
4745 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL
4746 */
4747 @PublicKey
4748 @NonNull
4749 public static final Key<Integer> INFO_SUPPORTED_HARDWARE_LEVEL =
4750 new Key<Integer>("android.info.supportedHardwareLevel", int.class);
4751
4752 /**
4753 * <p>A short string for manufacturer version information about the camera device, such as
4754 * ISP hardware, sensors, etc.</p>
4755 * <p>This can be used in {@link android.media.ExifInterface#TAG_IMAGE_DESCRIPTION TAG_IMAGE_DESCRIPTION}
4756 * in jpeg EXIF. This key may be absent if no version information is available on the
4757 * device.</p>
4758 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4759 */
4760 @PublicKey
4761 @NonNull
4762 public static final Key<String> INFO_VERSION =
4763 new Key<String>("android.info.version", String.class);
4764
4765 /**
4766 * <p>This lists the mapping between a device folding state and
4767 * specific camera sensor orientation for logical cameras on a foldable device.</p>
4768 * <p>Logical cameras on foldable devices can support sensors with different orientation
4769 * values. The orientation value may need to change depending on the specific folding
4770 * state. Information about the mapping between the device folding state and the
4771 * sensor orientation can be obtained in
4772 * {@link android.hardware.camera2.params.DeviceStateSensorOrientationMap }.
4773 * Device state orientation maps are optional and maybe present on devices that support
4774 * {@link CaptureRequest#SCALER_ROTATE_AND_CROP android.scaler.rotateAndCrop}.</p>
4775 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4776 * <p><b>Limited capability</b> -
4777 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
4778 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
4779 *
4780 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
4781 * @see CaptureRequest#SCALER_ROTATE_AND_CROP
4782 */
4783 @PublicKey
4784 @NonNull
4785 @SyntheticKey
4786 public static final Key<android.hardware.camera2.params.DeviceStateSensorOrientationMap> INFO_DEVICE_STATE_SENSOR_ORIENTATION_MAP =
4787 new Key<android.hardware.camera2.params.DeviceStateSensorOrientationMap>("android.info.deviceStateSensorOrientationMap", android.hardware.camera2.params.DeviceStateSensorOrientationMap.class);
4788
4789 /**
4790 * <p>HAL must populate the array with
4791 * (hardware::camera::provider::V2_5::DeviceState, sensorOrientation) pairs for each
4792 * supported device state bitwise combination.</p>
4793 * <p><b>Units</b>: (device fold state, sensor orientation) x n</p>
4794 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4795 * <p><b>Limited capability</b> -
4796 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
4797 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
4798 *
4799 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
4800 * @hide
4801 */
4802 public static final Key<long[]> INFO_DEVICE_STATE_ORIENTATIONS =
4803 new Key<long[]>("android.info.deviceStateOrientations", long[].class);
4804
4805 /**
4806 * <p>The maximum number of frames that can occur after a request
4807 * (different than the previous) has been submitted, and before the
4808 * result's state becomes synchronized.</p>
4809 * <p>This defines the maximum distance (in number of metadata results),
4810 * between the frame number of the request that has new controls to apply
4811 * and the frame number of the result that has all the controls applied.</p>
4812 * <p>In other words this acts as an upper boundary for how many frames
4813 * must occur before the camera device knows for a fact that the new
4814 * submitted camera settings have been applied in outgoing frames.</p>
4815 * <p><b>Units</b>: Frame counts</p>
4816 * <p><b>Possible values:</b></p>
4817 * <ul>
4818 * <li>{@link #SYNC_MAX_LATENCY_PER_FRAME_CONTROL PER_FRAME_CONTROL}</li>
4819 * <li>{@link #SYNC_MAX_LATENCY_UNKNOWN UNKNOWN}</li>
4820 * </ul>
4821 *
4822 * <p><b>Available values for this device:</b><br>
4823 * A positive value, PER_FRAME_CONTROL, or UNKNOWN.</p>
4824 * <p>This key is available on all devices.</p>
4825 * @see #SYNC_MAX_LATENCY_PER_FRAME_CONTROL
4826 * @see #SYNC_MAX_LATENCY_UNKNOWN
4827 */
4828 @PublicKey
4829 @NonNull
4830 public static final Key<Integer> SYNC_MAX_LATENCY =
4831 new Key<Integer>("android.sync.maxLatency", int.class);
4832
4833 /**
4834 * <p>The maximal camera capture pipeline stall (in unit of frame count) introduced by a
4835 * reprocess capture request.</p>
4836 * <p>The key describes the maximal interference that one reprocess (input) request
4837 * can introduce to the camera simultaneous streaming of regular (output) capture
4838 * requests, including repeating requests.</p>
4839 * <p>When a reprocessing capture request is submitted while a camera output repeating request
4840 * (e.g. preview) is being served by the camera device, it may preempt the camera capture
4841 * pipeline for at least one frame duration so that the camera device is unable to process
4842 * the following capture request in time for the next sensor start of exposure boundary.
4843 * When this happens, the application may observe a capture time gap (longer than one frame
4844 * duration) between adjacent capture output frames, which usually exhibits as preview
4845 * glitch if the repeating request output targets include a preview surface. This key gives
4846 * the worst-case number of frame stall introduced by one reprocess request with any kind of
4847 * formats/sizes combination.</p>
4848 * <p>If this key reports 0, it means a reprocess request doesn't introduce any glitch to the
4849 * ongoing camera repeating request outputs, as if this reprocess request is never issued.</p>
4850 * <p>This key is supported if the camera device supports PRIVATE or YUV reprocessing (
4851 * i.e. {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains PRIVATE_REPROCESSING or
4852 * YUV_REPROCESSING).</p>
4853 * <p><b>Units</b>: Number of frames.</p>
4854 * <p><b>Range of valid values:</b><br>
4855 * &lt;= 4</p>
4856 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4857 * <p><b>Limited capability</b> -
4858 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
4859 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
4860 *
4861 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
4862 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
4863 */
4864 @PublicKey
4865 @NonNull
4866 public static final Key<Integer> REPROCESS_MAX_CAPTURE_STALL =
4867 new Key<Integer>("android.reprocess.maxCaptureStall", int.class);
4868
4869 /**
4870 * <p>The available depth dataspace stream
4871 * configurations that this camera device supports
4872 * (i.e. format, width, height, output/input stream).</p>
4873 * <p>These are output stream configurations for use with
4874 * dataSpace HAL_DATASPACE_DEPTH. The configurations are
4875 * listed as <code>(format, width, height, input?)</code> tuples.</p>
4876 * <p>Only devices that support depth output for at least
4877 * the HAL_PIXEL_FORMAT_Y16 dense depth map may include
4878 * this entry.</p>
4879 * <p>A device that also supports the HAL_PIXEL_FORMAT_BLOB
4880 * sparse depth point cloud must report a single entry for
4881 * the format in this list as <code>(HAL_PIXEL_FORMAT_BLOB,
4882 * android.depth.maxDepthSamples, 1, OUTPUT)</code> in addition to
4883 * the entries for HAL_PIXEL_FORMAT_Y16.</p>
4884 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4885 * <p><b>Limited capability</b> -
4886 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
4887 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
4888 *
4889 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
4890 * @hide
4891 */
4892 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS =
4893 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.depth.availableDepthStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
4894
4895 /**
4896 * <p>This lists the minimum frame duration for each
4897 * format/size combination for depth output formats.</p>
4898 * <p>This should correspond to the frame duration when only that
4899 * stream is active, with all processing (typically in android.*.mode)
4900 * set to either OFF or FAST.</p>
4901 * <p>When multiple streams are used in a request, the minimum frame
4902 * duration will be max(individual stream min durations).</p>
4903 * <p>The minimum frame duration of a stream (of a particular format, size)
4904 * is the same regardless of whether the stream is input or output.</p>
4905 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and
4906 * android.scaler.availableStallDurations for more details about
4907 * calculating the max frame rate.</p>
4908 * <p><b>Units</b>: (format, width, height, ns) x n</p>
4909 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4910 * <p><b>Limited capability</b> -
4911 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
4912 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
4913 *
4914 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
4915 * @see CaptureRequest#SENSOR_FRAME_DURATION
4916 * @hide
4917 */
4918 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS =
4919 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
4920
4921 /**
4922 * <p>This lists the maximum stall duration for each
4923 * output format/size combination for depth streams.</p>
4924 * <p>A stall duration is how much extra time would get added
4925 * to the normal minimum frame duration for a repeating request
4926 * that has streams with non-zero stall.</p>
4927 * <p>This functions similarly to
4928 * android.scaler.availableStallDurations for depth
4929 * streams.</p>
4930 * <p>All depth output stream formats may have a nonzero stall
4931 * duration.</p>
4932 * <p><b>Units</b>: (format, width, height, ns) x n</p>
4933 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4934 * <p><b>Limited capability</b> -
4935 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
4936 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
4937 *
4938 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
4939 * @hide
4940 */
4941 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS =
4942 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
4943
4944 /**
4945 * <p>Indicates whether a capture request may target both a
4946 * DEPTH16 / DEPTH_POINT_CLOUD output, and normal color outputs (such as
4947 * YUV_420_888, JPEG, or RAW) simultaneously.</p>
4948 * <p>If TRUE, including both depth and color outputs in a single
4949 * capture request is not supported. An application must interleave color
4950 * and depth requests. If FALSE, a single request can target both types
4951 * of output.</p>
4952 * <p>Typically, this restriction exists on camera devices that
4953 * need to emit a specific pattern or wavelength of light to
4954 * measure depth values, which causes the color image to be
4955 * corrupted during depth measurement.</p>
4956 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4957 * <p><b>Limited capability</b> -
4958 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
4959 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
4960 *
4961 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
4962 */
4963 @PublicKey
4964 @NonNull
4965 public static final Key<Boolean> DEPTH_DEPTH_IS_EXCLUSIVE =
4966 new Key<Boolean>("android.depth.depthIsExclusive", boolean.class);
4967
4968 /**
4969 * <p>Recommended depth stream configurations for common client use cases.</p>
4970 * <p>Optional subset of the android.depth.availableDepthStreamConfigurations that
4971 * contains similar tuples listed as
4972 * (i.e. width, height, format, output/input stream, usecase bit field).
4973 * Camera devices will be able to suggest particular depth stream configurations which are
4974 * power and performance efficient for specific use cases. For more information about
4975 * retrieving the suggestions see
4976 * {@link android.hardware.camera2.CameraCharacteristics#getRecommendedStreamConfigurationMap }.</p>
4977 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4978 * @hide
4979 */
4980 public static final Key<android.hardware.camera2.params.RecommendedStreamConfiguration[]> DEPTH_AVAILABLE_RECOMMENDED_DEPTH_STREAM_CONFIGURATIONS =
4981 new Key<android.hardware.camera2.params.RecommendedStreamConfiguration[]>("android.depth.availableRecommendedDepthStreamConfigurations", android.hardware.camera2.params.RecommendedStreamConfiguration[].class);
4982
4983 /**
4984 * <p>The available dynamic depth dataspace stream
4985 * configurations that this camera device supports
4986 * (i.e. format, width, height, output/input stream).</p>
4987 * <p>These are output stream configurations for use with
4988 * dataSpace DYNAMIC_DEPTH. The configurations are
4989 * listed as <code>(format, width, height, input?)</code> tuples.</p>
4990 * <p>Only devices that support depth output for at least
4991 * the HAL_PIXEL_FORMAT_Y16 dense depth map along with
4992 * HAL_PIXEL_FORMAT_BLOB with the same size or size with
4993 * the same aspect ratio can have dynamic depth dataspace
4994 * stream configuration. {@link CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE android.depth.depthIsExclusive} also
4995 * needs to be set to FALSE.</p>
4996 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
4997 *
4998 * @see CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE
4999 * @hide
5000 */
5001 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS =
5002 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.depth.availableDynamicDepthStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
5003
5004 /**
5005 * <p>This lists the minimum frame duration for each
5006 * format/size combination for dynamic depth output streams.</p>
5007 * <p>This should correspond to the frame duration when only that
5008 * stream is active, with all processing (typically in android.*.mode)
5009 * set to either OFF or FAST.</p>
5010 * <p>When multiple streams are used in a request, the minimum frame
5011 * duration will be max(individual stream min durations).</p>
5012 * <p>The minimum frame duration of a stream (of a particular format, size)
5013 * is the same regardless of whether the stream is input or output.</p>
5014 * <p><b>Units</b>: (format, width, height, ns) x n</p>
5015 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
5016 * @hide
5017 */
5018 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS =
5019 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDynamicDepthMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
5020
5021 /**
5022 * <p>This lists the maximum stall duration for each
5023 * output format/size combination for dynamic depth streams.</p>
5024 * <p>A stall duration is how much extra time would get added
5025 * to the normal minimum frame duration for a repeating request
5026 * that has streams with non-zero stall.</p>
5027 * <p>All dynamic depth output streams may have a nonzero stall
5028 * duration.</p>
5029 * <p><b>Units</b>: (format, width, height, ns) x n</p>
5030 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
5031 * @hide
5032 */
5033 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS =
5034 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDynamicDepthStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
5035
5036 /**
5037 * <p>The available depth dataspace stream
5038 * configurations that this camera device supports
5039 * (i.e. format, width, height, output/input stream) when a CaptureRequest is submitted with
5040 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} set to
5041 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
5042 * <p>Analogous to android.depth.availableDepthStreamConfigurations, for configurations which
5043 * are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
5044 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
5045 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
5046 *
5047 * @see CaptureRequest#SENSOR_PIXEL_MODE
5048 * @hide
5049 */
5050 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION =
5051 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.depth.availableDepthStreamConfigurationsMaximumResolution", android.hardware.camera2.params.StreamConfiguration[].class);
5052
5053 /**
5054 * <p>This lists the minimum frame duration for each
5055 * format/size combination for depth output formats when a CaptureRequest is submitted with
5056 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} set to
5057 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
5058 * <p>Analogous to android.depth.availableDepthMinFrameDurations, for configurations which
5059 * are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
5060 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
5061 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and
5062 * android.scaler.availableStallDurationsMaximumResolution for more details about
5063 * calculating the max frame rate.</p>
5064 * <p><b>Units</b>: (format, width, height, ns) x n</p>
5065 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
5066 *
5067 * @see CaptureRequest#SENSOR_FRAME_DURATION
5068 * @see CaptureRequest#SENSOR_PIXEL_MODE
5069 * @hide
5070 */
5071 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION =
5072 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthMinFrameDurationsMaximumResolution", android.hardware.camera2.params.StreamConfigurationDuration[].class);
5073
5074 /**
5075 * <p>This lists the maximum stall duration for each
5076 * output format/size combination for depth streams for CaptureRequests where
5077 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
5078 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
5079 * <p>Analogous to android.depth.availableDepthStallDurations, for configurations which
5080 * are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
5081 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
5082 * <p><b>Units</b>: (format, width, height, ns) x n</p>
5083 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
5084 *
5085 * @see CaptureRequest#SENSOR_PIXEL_MODE
5086 * @hide
5087 */
5088 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION =
5089 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthStallDurationsMaximumResolution", android.hardware.camera2.params.StreamConfigurationDuration[].class);
5090
5091 /**
5092 * <p>The available dynamic depth dataspace stream
5093 * configurations that this camera device supports (i.e. format, width, height,
5094 * output/input stream) for CaptureRequests where {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
5095 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
5096 * <p>Analogous to android.depth.availableDynamicDepthStreamConfigurations, for configurations
5097 * which are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
5098 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
5099 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
5100 *
5101 * @see CaptureRequest#SENSOR_PIXEL_MODE
5102 * @hide
5103 */
5104 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION =
5105 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.depth.availableDynamicDepthStreamConfigurationsMaximumResolution", android.hardware.camera2.params.StreamConfiguration[].class);
5106
5107 /**
5108 * <p>This lists the minimum frame duration for each
5109 * format/size combination for dynamic depth output streams for CaptureRequests where
5110 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
5111 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
5112 * <p>Analogous to android.depth.availableDynamicDepthMinFrameDurations, for configurations
5113 * which are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
5114 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
5115 * <p><b>Units</b>: (format, width, height, ns) x n</p>
5116 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
5117 *
5118 * @see CaptureRequest#SENSOR_PIXEL_MODE
5119 * @hide
5120 */
5121 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION =
5122 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDynamicDepthMinFrameDurationsMaximumResolution", android.hardware.camera2.params.StreamConfigurationDuration[].class);
5123
5124 /**
5125 * <p>This lists the maximum stall duration for each
5126 * output format/size combination for dynamic depth streams for CaptureRequests where
5127 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
5128 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
5129 * <p>Analogous to android.depth.availableDynamicDepthStallDurations, for configurations
5130 * which are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
5131 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
5132 * <p><b>Units</b>: (format, width, height, ns) x n</p>
5133 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
5134 *
5135 * @see CaptureRequest#SENSOR_PIXEL_MODE
5136 * @hide
5137 */
5138 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION =
5139 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDynamicDepthStallDurationsMaximumResolution", android.hardware.camera2.params.StreamConfigurationDuration[].class);
5140
5141 /**
5142 * <p>String containing the ids of the underlying physical cameras.</p>
5143 * <p>For a logical camera, this is concatenation of all underlying physical camera IDs.
5144 * The null terminator for physical camera ID must be preserved so that the whole string
5145 * can be tokenized using '\0' to generate list of physical camera IDs.</p>
5146 * <p>For example, if the physical camera IDs of the logical camera are "2" and "3", the
5147 * value of this tag will be ['2', '\0', '3', '\0'].</p>
5148 * <p>The number of physical camera IDs must be no less than 2.</p>
5149 * <p><b>Units</b>: UTF-8 null-terminated string</p>
5150 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
5151 * <p><b>Limited capability</b> -
5152 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
5153 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
5154 *
5155 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
5156 * @hide
5157 */
5158 public static final Key<byte[]> LOGICAL_MULTI_CAMERA_PHYSICAL_IDS =
5159 new Key<byte[]>("android.logicalMultiCamera.physicalIds", byte[].class);
5160
5161 /**
5162 * <p>The accuracy of frame timestamp synchronization between physical cameras</p>
5163 * <p>The accuracy of the frame timestamp synchronization determines the physical cameras'
5164 * ability to start exposure at the same time. If the sensorSyncType is CALIBRATED, the
5165 * physical camera sensors usually run in leader/follower mode where one sensor generates a
5166 * timing signal for the other, so that their shutter time is synchronized. For APPROXIMATE
5167 * sensorSyncType, the camera sensors usually run in leader/leader mode, where both sensors
5168 * use their own timing generator, and there could be offset between their start of exposure.</p>
5169 * <p>In both cases, all images generated for a particular capture request still carry the same
5170 * timestamps, so that they can be used to look up the matching frame number and
5171 * onCaptureStarted callback.</p>
5172 * <p>This tag is only applicable if the logical camera device supports concurrent physical
5173 * streams from different physical cameras.</p>
5174 * <p><b>Possible values:</b></p>
5175 * <ul>
5176 * <li>{@link #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE APPROXIMATE}</li>
5177 * <li>{@link #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED CALIBRATED}</li>
5178 * </ul>
5179 *
5180 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
5181 * <p><b>Limited capability</b> -
5182 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
5183 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
5184 *
5185 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
5186 * @see #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE
5187 * @see #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED
5188 */
5189 @PublicKey
5190 @NonNull
5191 public static final Key<Integer> LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE =
5192 new Key<Integer>("android.logicalMultiCamera.sensorSyncType", int.class);
5193
5194 /**
5195 * <p>List of distortion correction modes for {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} that are
5196 * supported by this camera device.</p>
5197 * <p>No device is required to support this API; such devices will always list only 'OFF'.
5198 * All devices that support this API will list both FAST and HIGH_QUALITY.</p>
5199 * <p><b>Range of valid values:</b><br>
5200 * Any value listed in {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode}</p>
5201 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
5202 *
5203 * @see CaptureRequest#DISTORTION_CORRECTION_MODE
5204 */
5205 @PublicKey
5206 @NonNull
5207 public static final Key<int[]> DISTORTION_CORRECTION_AVAILABLE_MODES =
5208 new Key<int[]>("android.distortionCorrection.availableModes", int[].class);
5209
5210 /**
5211 * <p>The available HEIC (ISO/IEC 23008-12) stream
5212 * configurations that this camera device supports
5213 * (i.e. format, width, height, output/input stream).</p>
5214 * <p>The configurations are listed as <code>(format, width, height, input?)</code> tuples.</p>
5215 * <p>If the camera device supports HEIC image format, it will support identical set of stream
5216 * combinations involving HEIC image format, compared to the combinations involving JPEG
5217 * image format as required by the device's hardware level and capabilities.</p>
5218 * <p>All the static, control, and dynamic metadata tags related to JPEG apply to HEIC formats.
5219 * Configuring JPEG and HEIC streams at the same time is not supported.</p>
5220 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
5221 * <p><b>Limited capability</b> -
5222 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
5223 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
5224 *
5225 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
5226 * @hide
5227 */
5228 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS =
5229 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.heic.availableHeicStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
5230
5231 /**
5232 * <p>This lists the minimum frame duration for each
5233 * format/size combination for HEIC output formats.</p>
5234 * <p>This should correspond to the frame duration when only that
5235 * stream is active, with all processing (typically in android.*.mode)
5236 * set to either OFF or FAST.</p>
5237 * <p>When multiple streams are used in a request, the minimum frame
5238 * duration will be max(individual stream min durations).</p>
5239 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and
5240 * android.scaler.availableStallDurations for more details about
5241 * calculating the max frame rate.</p>
5242 * <p><b>Units</b>: (format, width, height, ns) x n</p>
5243 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
5244 * <p><b>Limited capability</b> -
5245 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
5246 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
5247 *
5248 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
5249 * @see CaptureRequest#SENSOR_FRAME_DURATION
5250 * @hide
5251 */
5252 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS =
5253 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.heic.availableHeicMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
5254
5255 /**
5256 * <p>This lists the maximum stall duration for each
5257 * output format/size combination for HEIC streams.</p>
5258 * <p>A stall duration is how much extra time would get added
5259 * to the normal minimum frame duration for a repeating request
5260 * that has streams with non-zero stall.</p>
5261 * <p>This functions similarly to
5262 * android.scaler.availableStallDurations for HEIC
5263 * streams.</p>
5264 * <p>All HEIC output stream formats may have a nonzero stall
5265 * duration.</p>
5266 * <p><b>Units</b>: (format, width, height, ns) x n</p>
5267 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
5268 * <p><b>Limited capability</b> -
5269 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
5270 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
5271 *
5272 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
5273 * @hide
5274 */
5275 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> HEIC_AVAILABLE_HEIC_STALL_DURATIONS =
5276 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.heic.availableHeicStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
5277
5278 /**
5279 * <p>The available HEIC (ISO/IEC 23008-12) stream
5280 * configurations that this camera device supports
5281 * (i.e. format, width, height, output/input stream).</p>
5282 * <p>Refer to android.heic.availableHeicStreamConfigurations for details.</p>
5283 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
5284 * @hide
5285 */
5286 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION =
5287 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.heic.availableHeicStreamConfigurationsMaximumResolution", android.hardware.camera2.params.StreamConfiguration[].class);
5288
5289 /**
5290 * <p>This lists the minimum frame duration for each
5291 * format/size combination for HEIC output formats for CaptureRequests where
5292 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
5293 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
5294 * <p>Refer to android.heic.availableHeicMinFrameDurations for details.</p>
5295 * <p><b>Units</b>: (format, width, height, ns) x n</p>
5296 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
5297 *
5298 * @see CaptureRequest#SENSOR_PIXEL_MODE
5299 * @hide
5300 */
5301 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION =
5302 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.heic.availableHeicMinFrameDurationsMaximumResolution", android.hardware.camera2.params.StreamConfigurationDuration[].class);
5303
5304 /**
5305 * <p>This lists the maximum stall duration for each
5306 * output format/size combination for HEIC streams for CaptureRequests where
5307 * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
5308 * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.</p>
5309 * <p>Refer to android.heic.availableHeicStallDurations for details.</p>
5310 * <p><b>Units</b>: (format, width, height, ns) x n</p>
5311 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
5312 *
5313 * @see CaptureRequest#SENSOR_PIXEL_MODE
5314 * @hide
5315 */
5316 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> HEIC_AVAILABLE_HEIC_STALL_DURATIONS_MAXIMUM_RESOLUTION =
5317 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.heic.availableHeicStallDurationsMaximumResolution", android.hardware.camera2.params.StreamConfigurationDuration[].class);
5318
5319 /**
5320 * <p>The direction of the camera faces relative to the vehicle body frame and the
5321 * passenger seats.</p>
5322 * <p>This enum defines the lens facing characteristic of the cameras on the automotive
5323 * devices with locations {@link CameraCharacteristics#AUTOMOTIVE_LOCATION android.automotive.location} defines. If the system has
5324 * FEATURE_AUTOMOTIVE, the camera will have this entry in its static metadata.</p>
5325 * <p>When {@link CameraCharacteristics#AUTOMOTIVE_LOCATION android.automotive.location} is INTERIOR, this has one or more INTERIOR_*
5326 * values or a single EXTERIOR_* value. When this has more than one INTERIOR_*,
5327 * the first value must be the one for the seat closest to the optical axis. If this
5328 * contains INTERIOR_OTHER, all other values will be ineffective.</p>
5329 * <p>When {@link CameraCharacteristics#AUTOMOTIVE_LOCATION android.automotive.location} is EXTERIOR_* or EXTRA, this has a single
5330 * EXTERIOR_* value.</p>
5331 * <p>If a camera has INTERIOR_OTHER or EXTERIOR_OTHER, or more than one camera is at the
5332 * same location and facing the same direction, their static metadata will list the
5333 * following entries, so that applications can determine their lenses' exact facing
5334 * directions:</p>
5335 * <ul>
5336 * <li>{@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference}</li>
5337 * <li>{@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}</li>
5338 * <li>{@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}</li>
5339 * </ul>
5340 * <p><b>Possible values:</b></p>
5341 * <ul>
5342 * <li>{@link #AUTOMOTIVE_LENS_FACING_EXTERIOR_OTHER EXTERIOR_OTHER}</li>
5343 * <li>{@link #AUTOMOTIVE_LENS_FACING_EXTERIOR_FRONT EXTERIOR_FRONT}</li>
5344 * <li>{@link #AUTOMOTIVE_LENS_FACING_EXTERIOR_REAR EXTERIOR_REAR}</li>
5345 * <li>{@link #AUTOMOTIVE_LENS_FACING_EXTERIOR_LEFT EXTERIOR_LEFT}</li>
5346 * <li>{@link #AUTOMOTIVE_LENS_FACING_EXTERIOR_RIGHT EXTERIOR_RIGHT}</li>
5347 * <li>{@link #AUTOMOTIVE_LENS_FACING_INTERIOR_OTHER INTERIOR_OTHER}</li>
5348 * <li>{@link #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_LEFT INTERIOR_SEAT_ROW_1_LEFT}</li>
5349 * <li>{@link #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_CENTER INTERIOR_SEAT_ROW_1_CENTER}</li>
5350 * <li>{@link #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_RIGHT INTERIOR_SEAT_ROW_1_RIGHT}</li>
5351 * <li>{@link #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_LEFT INTERIOR_SEAT_ROW_2_LEFT}</li>
5352 * <li>{@link #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_CENTER INTERIOR_SEAT_ROW_2_CENTER}</li>
5353 * <li>{@link #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_RIGHT INTERIOR_SEAT_ROW_2_RIGHT}</li>
5354 * <li>{@link #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_LEFT INTERIOR_SEAT_ROW_3_LEFT}</li>
5355 * <li>{@link #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_CENTER INTERIOR_SEAT_ROW_3_CENTER}</li>
5356 * <li>{@link #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_RIGHT INTERIOR_SEAT_ROW_3_RIGHT}</li>
5357 * </ul>
5358 *
5359 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
5360 *
5361 * @see CameraCharacteristics#AUTOMOTIVE_LOCATION
5362 * @see CameraCharacteristics#LENS_POSE_REFERENCE
5363 * @see CameraCharacteristics#LENS_POSE_ROTATION
5364 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
5365 * @see #AUTOMOTIVE_LENS_FACING_EXTERIOR_OTHER
5366 * @see #AUTOMOTIVE_LENS_FACING_EXTERIOR_FRONT
5367 * @see #AUTOMOTIVE_LENS_FACING_EXTERIOR_REAR
5368 * @see #AUTOMOTIVE_LENS_FACING_EXTERIOR_LEFT
5369 * @see #AUTOMOTIVE_LENS_FACING_EXTERIOR_RIGHT
5370 * @see #AUTOMOTIVE_LENS_FACING_INTERIOR_OTHER
5371 * @see #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_LEFT
5372 * @see #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_CENTER
5373 * @see #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_RIGHT
5374 * @see #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_LEFT
5375 * @see #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_CENTER
5376 * @see #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_RIGHT
5377 * @see #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_LEFT
5378 * @see #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_CENTER
5379 * @see #AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_RIGHT
5380 */
5381 @PublicKey
5382 @NonNull
5383 public static final Key<int[]> AUTOMOTIVE_LENS_FACING =
5384 new Key<int[]>("android.automotive.lens.facing", int[].class);
5385
5386 /**
5387 * <p>Location of the cameras on the automotive devices.</p>
5388 * <p>This enum defines the locations of the cameras relative to the vehicle body frame on
5389 * <a href="https://source.android.com/devices/sensors/sensor-types#auto_axes">the automotive sensor coordinate system</a>.
5390 * If the system has FEATURE_AUTOMOTIVE, the camera will have this entry in its static
5391 * metadata.</p>
5392 * <ul>
5393 * <li>INTERIOR is the inside of the vehicle body frame (or the passenger cabin).</li>
5394 * <li>EXTERIOR is the outside of the vehicle body frame.</li>
5395 * <li>EXTRA is the extra vehicle such as a trailer.</li>
5396 * </ul>
5397 * <p>Each side of the vehicle body frame on this coordinate system is defined as below:</p>
5398 * <ul>
5399 * <li>FRONT is where the Y-axis increases toward.</li>
5400 * <li>REAR is where the Y-axis decreases toward.</li>
5401 * <li>LEFT is where the X-axis decreases toward.</li>
5402 * <li>RIGHT is where the X-axis increases toward.</li>
5403 * </ul>
5404 * <p>If the camera has either EXTERIOR_OTHER or EXTRA_OTHER, its static metadata will list
5405 * the following entries, so that applications can determine the camera's exact location:</p>
5406 * <ul>
5407 * <li>{@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference}</li>
5408 * <li>{@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}</li>
5409 * <li>{@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}</li>
5410 * </ul>
5411 * <p><b>Possible values:</b></p>
5412 * <ul>
5413 * <li>{@link #AUTOMOTIVE_LOCATION_INTERIOR INTERIOR}</li>
5414 * <li>{@link #AUTOMOTIVE_LOCATION_EXTERIOR_OTHER EXTERIOR_OTHER}</li>
5415 * <li>{@link #AUTOMOTIVE_LOCATION_EXTERIOR_FRONT EXTERIOR_FRONT}</li>
5416 * <li>{@link #AUTOMOTIVE_LOCATION_EXTERIOR_REAR EXTERIOR_REAR}</li>
5417 * <li>{@link #AUTOMOTIVE_LOCATION_EXTERIOR_LEFT EXTERIOR_LEFT}</li>
5418 * <li>{@link #AUTOMOTIVE_LOCATION_EXTERIOR_RIGHT EXTERIOR_RIGHT}</li>
5419 * <li>{@link #AUTOMOTIVE_LOCATION_EXTRA_OTHER EXTRA_OTHER}</li>
5420 * <li>{@link #AUTOMOTIVE_LOCATION_EXTRA_FRONT EXTRA_FRONT}</li>
5421 * <li>{@link #AUTOMOTIVE_LOCATION_EXTRA_REAR EXTRA_REAR}</li>
5422 * <li>{@link #AUTOMOTIVE_LOCATION_EXTRA_LEFT EXTRA_LEFT}</li>
5423 * <li>{@link #AUTOMOTIVE_LOCATION_EXTRA_RIGHT EXTRA_RIGHT}</li>
5424 * </ul>
5425 *
5426 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
5427 *
5428 * @see CameraCharacteristics#LENS_POSE_REFERENCE
5429 * @see CameraCharacteristics#LENS_POSE_ROTATION
5430 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
5431 * @see #AUTOMOTIVE_LOCATION_INTERIOR
5432 * @see #AUTOMOTIVE_LOCATION_EXTERIOR_OTHER
5433 * @see #AUTOMOTIVE_LOCATION_EXTERIOR_FRONT
5434 * @see #AUTOMOTIVE_LOCATION_EXTERIOR_REAR
5435 * @see #AUTOMOTIVE_LOCATION_EXTERIOR_LEFT
5436 * @see #AUTOMOTIVE_LOCATION_EXTERIOR_RIGHT
5437 * @see #AUTOMOTIVE_LOCATION_EXTRA_OTHER
5438 * @see #AUTOMOTIVE_LOCATION_EXTRA_FRONT
5439 * @see #AUTOMOTIVE_LOCATION_EXTRA_REAR
5440 * @see #AUTOMOTIVE_LOCATION_EXTRA_LEFT
5441 * @see #AUTOMOTIVE_LOCATION_EXTRA_RIGHT
5442 */
5443 @PublicKey
5444 @NonNull
5445 public static final Key<Integer> AUTOMOTIVE_LOCATION =
5446 new Key<Integer>("android.automotive.location", int.class);
5447
5448 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
5449 * End generated code
5450 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
5451
5452
5453
5454
5455
5456
5457 }