blob: a45648f060937d837b0a96f9271a7e329cb9173b [file] [log] [blame]
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001/*
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
Eino-Ville Talvala2f1a2e42013-07-25 17:12:05 -070017package android.hardware.camera2;
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080018
Eino-Ville Talvala8b905572015-05-14 15:43:01 -070019import android.annotation.NonNull;
20import android.annotation.Nullable;
Artur Satayev26958002019-12-10 17:47:52 +000021import android.compat.annotation.UnsupportedAppUsage;
Eino-Ville Talvala70c22072013-08-27 12:09:04 -070022import android.hardware.camera2.impl.CameraMetadataNative;
Igor Murashkin6c76f582014-07-15 17:19:49 -070023import android.hardware.camera2.impl.PublicKey;
24import android.hardware.camera2.impl.SyntheticKey;
Emilian Peev2776ca32018-09-18 14:00:39 +010025import android.hardware.camera2.params.RecommendedStreamConfigurationMap;
Emilian Peev75a55702017-11-07 16:09:59 +000026import android.hardware.camera2.params.SessionConfiguration;
Shuzhen Wang23d29382017-11-26 17:24:56 -080027import android.hardware.camera2.utils.ArrayUtils;
Igor Murashkind6d65152014-05-19 16:31:02 -070028import android.hardware.camera2.utils.TypeReference;
Igor Murashkin72f9f0a2014-05-14 15:46:10 -070029import android.util.Rational;
Eino-Ville Talvala70c22072013-08-27 12:09:04 -070030
Emilian Peev2776ca32018-09-18 14:00:39 +010031import java.util.ArrayList;
Shuzhen Wanga8d36032018-10-15 12:01:53 -070032import java.util.Arrays;
Igor Murashkin7a36a0f2013-09-10 18:13:09 -070033import java.util.Collections;
Shuzhen Wangbde13972018-03-19 10:30:45 -070034import java.util.HashSet;
Igor Murashkin7a36a0f2013-09-10 18:13:09 -070035import java.util.List;
Shuzhen Wangbde13972018-03-19 10:30:45 -070036import java.util.Set;
Igor Murashkin7a36a0f2013-09-10 18:13:09 -070037
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080038/**
39 * <p>The properties describing a
40 * {@link CameraDevice CameraDevice}.</p>
41 *
42 * <p>These properties are fixed for a given CameraDevice, and can be queried
43 * through the {@link CameraManager CameraManager}
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -070044 * interface with {@link CameraManager#getCameraCharacteristics}.</p>
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080045 *
Ruben Brunkf967a542014-04-28 16:31:11 -070046 * <p>{@link CameraCharacteristics} objects are immutable.</p>
47 *
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080048 * @see CameraDevice
49 * @see CameraManager
50 */
Igor Murashkind6d65152014-05-19 16:31:02 -070051public final class CameraCharacteristics extends CameraMetadata<CameraCharacteristics.Key<?>> {
52
53 /**
54 * A {@code Key} is used to do camera characteristics field lookups with
55 * {@link CameraCharacteristics#get}.
56 *
57 * <p>For example, to get the stream configuration map:
58 * <code><pre>
59 * StreamConfigurationMap map = cameraCharacteristics.get(
60 * CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);
61 * </pre></code>
62 * </p>
63 *
64 * <p>To enumerate over all possible keys for {@link CameraCharacteristics}, see
65 * {@link CameraCharacteristics#getKeys()}.</p>
66 *
67 * @see CameraCharacteristics#get
68 * @see CameraCharacteristics#getKeys()
69 */
70 public static final class Key<T> {
71 private final CameraMetadataNative.Key<T> mKey;
72
73 /**
74 * Visible for testing and vendor extensions only.
75 *
76 * @hide
77 */
Mathew Inwoodbcbe4402018-08-08 15:42:59 +010078 @UnsupportedAppUsage
Emilian Peevde62d842017-03-23 19:20:40 +000079 public Key(String name, Class<T> type, long vendorId) {
80 mKey = new CameraMetadataNative.Key<T>(name, type, vendorId);
81 }
82
83 /**
84 * Visible for testing and vendor extensions only.
85 *
86 * @hide
87 */
David Brazdil67e37d62019-03-08 11:26:46 +000088 public Key(String name, String fallbackName, Class<T> type) {
Justin Yunf01e40c2018-05-18 20:39:45 +090089 mKey = new CameraMetadataNative.Key<T>(name, fallbackName, type);
90 }
91
92 /**
Eino-Ville Talvala1cf59fd2019-01-25 17:33:05 -080093 * Construct a new Key with a given name and type.
Justin Yunf01e40c2018-05-18 20:39:45 +090094 *
Eino-Ville Talvala1cf59fd2019-01-25 17:33:05 -080095 * <p>Normally, applications should use the existing Key definitions in
96 * {@link CameraCharacteristics}, and not need to construct their own Key objects. However,
97 * they may be useful for testing purposes and for defining custom camera
98 * characteristics.</p>
Justin Yunf01e40c2018-05-18 20:39:45 +090099 */
Eino-Ville Talvala79d4aac2019-03-06 14:26:10 -0800100 public Key(@NonNull String name, @NonNull Class<T> type) {
Igor Murashkind6d65152014-05-19 16:31:02 -0700101 mKey = new CameraMetadataNative.Key<T>(name, type);
102 }
103
104 /**
105 * Visible for testing and vendor extensions only.
106 *
107 * @hide
108 */
Mathew Inwoodbcbe4402018-08-08 15:42:59 +0100109 @UnsupportedAppUsage
Igor Murashkind6d65152014-05-19 16:31:02 -0700110 public Key(String name, TypeReference<T> typeReference) {
111 mKey = new CameraMetadataNative.Key<T>(name, typeReference);
112 }
113
114 /**
115 * Return a camelCase, period separated name formatted like:
116 * {@code "root.section[.subsections].name"}.
117 *
118 * <p>Built-in keys exposed by the Android SDK are always prefixed with {@code "android."};
119 * keys that are device/platform-specific are prefixed with {@code "com."}.</p>
120 *
121 * <p>For example, {@code CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP} would
122 * have a name of {@code "android.scaler.streamConfigurationMap"}; whereas a device
123 * specific key might look like {@code "com.google.nexus.data.private"}.</p>
124 *
125 * @return String representation of the key name
126 */
Eino-Ville Talvala8b905572015-05-14 15:43:01 -0700127 @NonNull
Igor Murashkind6d65152014-05-19 16:31:02 -0700128 public String getName() {
129 return mKey.getName();
130 }
131
132 /**
Emilian Peevde62d842017-03-23 19:20:40 +0000133 * Return vendor tag id.
134 *
135 * @hide
136 */
137 public long getVendorId() {
138 return mKey.getVendorId();
139 }
140
141 /**
Igor Murashkind6d65152014-05-19 16:31:02 -0700142 * {@inheritDoc}
143 */
144 @Override
145 public final int hashCode() {
146 return mKey.hashCode();
147 }
148
149 /**
150 * {@inheritDoc}
151 */
152 @SuppressWarnings("unchecked")
153 @Override
154 public final boolean equals(Object o) {
155 return o instanceof Key && ((Key<T>)o).mKey.equals(mKey);
156 }
157
158 /**
Chien-Yu Chen12a83852015-07-07 12:17:22 -0700159 * Return this {@link Key} as a string representation.
160 *
161 * <p>{@code "CameraCharacteristics.Key(%s)"}, where {@code %s} represents
162 * the name of this key as returned by {@link #getName}.</p>
163 *
164 * @return string representation of {@link Key}
165 */
166 @NonNull
167 @Override
168 public String toString() {
169 return String.format("CameraCharacteristics.Key(%s)", mKey.getName());
170 }
171
172 /**
Igor Murashkind6d65152014-05-19 16:31:02 -0700173 * Visible for CameraMetadataNative implementation only; do not use.
174 *
175 * TODO: Make this private or remove it altogether.
176 *
177 * @hide
178 */
Mathew Inwoodbcbe4402018-08-08 15:42:59 +0100179 @UnsupportedAppUsage
Igor Murashkind6d65152014-05-19 16:31:02 -0700180 public CameraMetadataNative.Key<T> getNativeKey() {
181 return mKey;
182 }
183
184 @SuppressWarnings({
185 "unused", "unchecked"
186 })
187 private Key(CameraMetadataNative.Key<?> nativeKey) {
188 mKey = (CameraMetadataNative.Key<T>) nativeKey;
189 }
190 }
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700191
Mathew Inwoodbcbe4402018-08-08 15:42:59 +0100192 @UnsupportedAppUsage
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700193 private final CameraMetadataNative mProperties;
Igor Murashkincc542a42014-06-25 11:52:23 -0700194 private List<CameraCharacteristics.Key<?>> mKeys;
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100195 private List<CameraCharacteristics.Key<?>> mKeysNeedingPermission;
Igor Murashkind6d65152014-05-19 16:31:02 -0700196 private List<CaptureRequest.Key<?>> mAvailableRequestKeys;
Emilian Peev75a55702017-11-07 16:09:59 +0000197 private List<CaptureRequest.Key<?>> mAvailableSessionKeys;
Emilian Peev2100ae72018-01-12 16:56:25 +0000198 private List<CaptureRequest.Key<?>> mAvailablePhysicalRequestKeys;
Igor Murashkind6d65152014-05-19 16:31:02 -0700199 private List<CaptureResult.Key<?>> mAvailableResultKeys;
Emilian Peev2776ca32018-09-18 14:00:39 +0100200 private ArrayList<RecommendedStreamConfigurationMap> mRecommendedConfigurations;
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700201
202 /**
203 * Takes ownership of the passed-in properties object
204 * @hide
205 */
Igor Murashkin68f40062013-09-10 12:15:54 -0700206 public CameraCharacteristics(CameraMetadataNative properties) {
Igor Murashkind6d65152014-05-19 16:31:02 -0700207 mProperties = CameraMetadataNative.move(properties);
Emilian Peevde62d842017-03-23 19:20:40 +0000208 setNativeInstance(mProperties);
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700209 }
210
Ruben Brunkf967a542014-04-28 16:31:11 -0700211 /**
212 * Returns a copy of the underlying {@link CameraMetadataNative}.
213 * @hide
214 */
215 public CameraMetadataNative getNativeCopy() {
216 return new CameraMetadataNative(mProperties);
217 }
218
Igor Murashkind6d65152014-05-19 16:31:02 -0700219 /**
220 * Get a camera characteristics field value.
221 *
222 * <p>The field definitions can be
223 * found in {@link CameraCharacteristics}.</p>
224 *
225 * <p>Querying the value for the same key more than once will return a value
226 * which is equal to the previous queried value.</p>
227 *
228 * @throws IllegalArgumentException if the key was not valid
229 *
230 * @param key The characteristics field to read.
231 * @return The value of that key, or {@code null} if the field is not set.
232 */
Eino-Ville Talvala8b905572015-05-14 15:43:01 -0700233 @Nullable
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700234 public <T> T get(Key<T> key) {
235 return mProperties.get(key);
236 }
237
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700238 /**
Igor Murashkind6d65152014-05-19 16:31:02 -0700239 * {@inheritDoc}
240 * @hide
241 */
242 @SuppressWarnings("unchecked")
243 @Override
244 protected <T> T getProtected(Key<?> key) {
245 return (T) mProperties.get(key);
246 }
247
248 /**
249 * {@inheritDoc}
250 * @hide
251 */
252 @SuppressWarnings("unchecked")
253 @Override
254 protected Class<Key<?>> getKeyClass() {
255 Object thisClass = Key.class;
256 return (Class<Key<?>>)thisClass;
257 }
258
259 /**
260 * {@inheritDoc}
261 */
Eino-Ville Talvala8b905572015-05-14 15:43:01 -0700262 @NonNull
Igor Murashkind6d65152014-05-19 16:31:02 -0700263 @Override
264 public List<Key<?>> getKeys() {
Igor Murashkincc542a42014-06-25 11:52:23 -0700265 // List of keys is immutable; cache the results after we calculate them
266 if (mKeys != null) {
267 return mKeys;
268 }
269
270 int[] filterTags = get(REQUEST_AVAILABLE_CHARACTERISTICS_KEYS);
271 if (filterTags == null) {
272 throw new AssertionError("android.request.availableCharacteristicsKeys must be non-null"
273 + " in the characteristics");
274 }
275
276 mKeys = Collections.unmodifiableList(
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100277 getKeys(getClass(), getKeyClass(), this, filterTags, true));
Igor Murashkincc542a42014-06-25 11:52:23 -0700278 return mKeys;
Igor Murashkind6d65152014-05-19 16:31:02 -0700279 }
280
281 /**
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100282 * <p>Returns a subset of the list returned by {@link #getKeys} with all keys that
283 * require camera clients to obtain the {@link android.Manifest.permission#CAMERA} permission.
284 * </p>
285 *
286 * <p>If an application calls {@link CameraManager#getCameraCharacteristics} without holding the
287 * {@link android.Manifest.permission#CAMERA} permission,
288 * all keys in this list will not be available, and calling {@link #get} will
289 * return null for those keys. If the application obtains the
290 * {@link android.Manifest.permission#CAMERA} permission, then the
291 * CameraCharacteristics from a call to a subsequent
292 * {@link CameraManager#getCameraCharacteristics} will have the keys available.</p>
293 *
294 * <p>The list returned is not modifiable, so any attempts to modify it will throw
295 * a {@code UnsupportedOperationException}.</p>
296 *
297 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
298 *
299 * @return List of camera characteristic keys that require the
Emilian Peev5389f1a2019-02-28 10:13:39 -0800300 * {@link android.Manifest.permission#CAMERA} permission. The list can be empty in case
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100301 * there are no currently present keys that need additional permission.
302 */
Emilian Peev5389f1a2019-02-28 10:13:39 -0800303 public @NonNull List<Key<?>> getKeysNeedingPermission() {
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100304 if (mKeysNeedingPermission == null) {
305 Object crKey = CameraCharacteristics.Key.class;
306 Class<CameraCharacteristics.Key<?>> crKeyTyped =
307 (Class<CameraCharacteristics.Key<?>>)crKey;
308
309 int[] filterTags = get(REQUEST_CHARACTERISTIC_KEYS_NEEDING_PERMISSION);
310 if (filterTags == null) {
Emilian Peev5389f1a2019-02-28 10:13:39 -0800311 mKeysNeedingPermission = Collections.unmodifiableList(
312 new ArrayList<CameraCharacteristics.Key<?>> ());
313 return mKeysNeedingPermission;
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100314 }
315 mKeysNeedingPermission =
316 getAvailableKeyList(CameraCharacteristics.class, crKeyTyped, filterTags,
317 /*includeSynthetic*/ false);
318 }
319 return mKeysNeedingPermission;
320 }
321
322 /**
Emilian Peev2776ca32018-09-18 14:00:39 +0100323 * <p>Retrieve camera device recommended stream configuration map
324 * {@link RecommendedStreamConfigurationMap} for a given use case.</p>
325 *
326 * <p>The stream configurations advertised here are efficient in terms of power and performance
327 * for common use cases like preview, video, snapshot, etc. The recommended maps are usually
328 * only small subsets of the exhaustive list provided in
329 * {@link #SCALER_STREAM_CONFIGURATION_MAP} and suggested for a particular use case by the
330 * camera device implementation. For further information about the expected configurations in
331 * various scenarios please refer to:
332 * <ul>
333 * <li>{@link RecommendedStreamConfigurationMap#USECASE_PREVIEW}</li>
334 * <li>{@link RecommendedStreamConfigurationMap#USECASE_RECORD}</li>
335 * <li>{@link RecommendedStreamConfigurationMap#USECASE_VIDEO_SNAPSHOT}</li>
336 * <li>{@link RecommendedStreamConfigurationMap#USECASE_SNAPSHOT}</li>
337 * <li>{@link RecommendedStreamConfigurationMap#USECASE_RAW}</li>
338 * <li>{@link RecommendedStreamConfigurationMap#USECASE_ZSL}</li>
Emilian Peev506acca2019-03-12 18:00:42 -0700339 * <li>{@link RecommendedStreamConfigurationMap#USECASE_LOW_LATENCY_SNAPSHOT}</li>
Emilian Peev2776ca32018-09-18 14:00:39 +0100340 * </ul>
341 * </p>
342 *
343 * <p>For example on how this can be used by camera clients to find out the maximum recommended
344 * preview and snapshot resolution, consider the following pseudo-code:
345 * </p>
346 * <pre><code>
347 * public static Size getMaxSize(Size... sizes) {
348 * if (sizes == null || sizes.length == 0) {
349 * throw new IllegalArgumentException("sizes was empty");
350 * }
351 *
352 * Size sz = sizes[0];
353 * for (Size size : sizes) {
354 * if (size.getWidth() * size.getHeight() &gt; sz.getWidth() * sz.getHeight()) {
355 * sz = size;
356 * }
357 * }
358 *
359 * return sz;
360 * }
361 *
362 * CameraCharacteristics characteristics =
363 * cameraManager.getCameraCharacteristics(cameraId);
364 * RecommendedStreamConfigurationMap previewConfig =
365 * characteristics.getRecommendedStreamConfigurationMap(
366 * RecommendedStreamConfigurationMap.USECASE_PREVIEW);
367 * RecommendedStreamConfigurationMap snapshotConfig =
368 * characteristics.getRecommendedStreamConfigurationMap(
369 * RecommendedStreamConfigurationMap.USECASE_SNAPSHOT);
370 *
371 * if ((previewConfig != null) &amp;&amp; (snapshotConfig != null)) {
372 *
373 * Set<Size> snapshotSizeSet = snapshotConfig.getOutputSizes(
374 * ImageFormat.JPEG);
375 * Size[] snapshotSizes = new Size[snapshotSizeSet.size()];
376 * snapshotSizes = snapshotSizeSet.toArray(snapshotSizes);
377 * Size suggestedMaxJpegSize = getMaxSize(snapshotSizes);
378 *
379 * Set<Size> previewSizeSet = snapshotConfig.getOutputSizes(
380 * ImageFormat.PRIVATE);
381 * Size[] previewSizes = new Size[previewSizeSet.size()];
382 * previewSizes = previewSizeSet.toArray(previewSizes);
383 * Size suggestedMaxPreviewSize = getMaxSize(previewSizes);
384 * }
385 *
386 * </code></pre>
387 *
388 * <p>Similar logic can be used for other use cases as well.</p>
389 *
390 * <p>Support for recommended stream configurations is optional. In case there a no
391 * suggested configurations for the particular use case, please refer to
392 * {@link #SCALER_STREAM_CONFIGURATION_MAP} for the exhaustive available list.</p>
393 *
394 * @param usecase Use case id.
395 *
396 * @throws IllegalArgumentException In case the use case argument is invalid.
397 * @return Valid {@link RecommendedStreamConfigurationMap} or null in case the camera device
398 * doesn't have any recommendation for this use case or the recommended configurations
399 * are invalid.
400 */
Emilian Peevae4a3412018-11-27 16:47:19 +0000401 public @Nullable RecommendedStreamConfigurationMap getRecommendedStreamConfigurationMap(
Emilian Peev2776ca32018-09-18 14:00:39 +0100402 @RecommendedStreamConfigurationMap.RecommendedUsecase int usecase) {
403 if (((usecase >= RecommendedStreamConfigurationMap.USECASE_PREVIEW) &&
Emilian Peev506acca2019-03-12 18:00:42 -0700404 (usecase <= RecommendedStreamConfigurationMap.USECASE_LOW_LATENCY_SNAPSHOT)) ||
Emilian Peev2776ca32018-09-18 14:00:39 +0100405 ((usecase >= RecommendedStreamConfigurationMap.USECASE_VENDOR_START) &&
406 (usecase < RecommendedStreamConfigurationMap.MAX_USECASE_COUNT))) {
407 if (mRecommendedConfigurations == null) {
408 mRecommendedConfigurations = mProperties.getRecommendedStreamConfigurations();
409 if (mRecommendedConfigurations == null) {
410 return null;
411 }
412 }
413
414 return mRecommendedConfigurations.get(usecase);
415 }
416
417 throw new IllegalArgumentException(String.format("Invalid use case: %d", usecase));
418 }
419
420 /**
Emilian Peev75a55702017-11-07 16:09:59 +0000421 * <p>Returns a subset of {@link #getAvailableCaptureRequestKeys} keys that the
422 * camera device can pass as part of the capture session initialization.</p>
423 *
424 * <p>This list includes keys that are difficult to apply per-frame and
425 * can result in unexpected delays when modified during the capture session
426 * lifetime. Typical examples include parameters that require a
427 * time-consuming hardware re-configuration or internal camera pipeline
428 * change. For performance reasons we suggest clients to pass their initial
429 * values as part of {@link SessionConfiguration#setSessionParameters}. Once
430 * the camera capture session is enabled it is also recommended to avoid
431 * changing them from their initial values set in
432 * {@link SessionConfiguration#setSessionParameters }.
433 * Control over session parameters can still be exerted in capture requests
434 * but clients should be aware and expect delays during their application.
435 * An example usage scenario could look like this:</p>
436 * <ul>
Emilian Peev2776ca32018-09-18 14:00:39 +0100437 * <li>The camera client starts by querying the session parameter key list via
Emilian Peev75a55702017-11-07 16:09:59 +0000438 * {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys }.</li>
439 * <li>Before triggering the capture session create sequence, a capture request
440 * must be built via {@link CameraDevice#createCaptureRequest } using an
441 * appropriate template matching the particular use case.</li>
442 * <li>The client should go over the list of session parameters and check
443 * whether some of the keys listed matches with the parameters that
444 * they intend to modify as part of the first capture request.</li>
445 * <li>If there is no such match, the capture request can be passed
446 * unmodified to {@link SessionConfiguration#setSessionParameters }.</li>
447 * <li>If matches do exist, the client should update the respective values
448 * and pass the request to {@link SessionConfiguration#setSessionParameters }.</li>
449 * <li>After the capture session initialization completes the session parameter
450 * key list can continue to serve as reference when posting or updating
451 * further requests. As mentioned above further changes to session
452 * parameters should ideally be avoided, if updates are necessary
453 * however clients could expect a delay/glitch during the
454 * parameter switch.</li>
455 * </ul>
456 *
457 * <p>The list returned is not modifiable, so any attempts to modify it will throw
458 * a {@code UnsupportedOperationException}.</p>
459 *
460 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
461 *
462 * @return List of keys that can be passed during capture session initialization. In case the
463 * camera device doesn't support such keys the list can be null.
464 */
465 @SuppressWarnings({"unchecked"})
466 public List<CaptureRequest.Key<?>> getAvailableSessionKeys() {
467 if (mAvailableSessionKeys == null) {
468 Object crKey = CaptureRequest.Key.class;
469 Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey;
470
471 int[] filterTags = get(REQUEST_AVAILABLE_SESSION_KEYS);
472 if (filterTags == null) {
473 return null;
474 }
475 mAvailableSessionKeys =
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100476 getAvailableKeyList(CaptureRequest.class, crKeyTyped, filterTags,
477 /*includeSynthetic*/ false);
Emilian Peev75a55702017-11-07 16:09:59 +0000478 }
479 return mAvailableSessionKeys;
480 }
481
482 /**
Emilian Peev2100ae72018-01-12 16:56:25 +0000483 * <p>Returns a subset of {@link #getAvailableCaptureRequestKeys} keys that can
koprivadebd4ee2018-09-13 10:59:46 -0700484 * be overridden for physical devices backing a logical multi-camera.</p>
Emilian Peev2100ae72018-01-12 16:56:25 +0000485 *
486 * <p>This is a subset of android.request.availableRequestKeys which contains a list
koprivadebd4ee2018-09-13 10:59:46 -0700487 * of keys that can be overridden using {@link CaptureRequest.Builder#setPhysicalCameraKey }.
Emilian Peev2100ae72018-01-12 16:56:25 +0000488 * The respective value of such request key can be obtained by calling
489 * {@link CaptureRequest.Builder#getPhysicalCameraKey }. Capture requests that contain
490 * individual physical device requests must be built via
491 * {@link android.hardware.camera2.CameraDevice#createCaptureRequest(int, Set)}.
492 * Such extended capture requests can be passed only to
493 * {@link CameraCaptureSession#capture } or {@link CameraCaptureSession#captureBurst } and
494 * not to {@link CameraCaptureSession#setRepeatingRequest } or
495 * {@link CameraCaptureSession#setRepeatingBurst }.</p>
496 *
497 * <p>The list returned is not modifiable, so any attempts to modify it will throw
498 * a {@code UnsupportedOperationException}.</p>
499 *
500 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
501 *
koprivadebd4ee2018-09-13 10:59:46 -0700502 * @return List of keys that can be overridden in individual physical device requests.
Emilian Peev2100ae72018-01-12 16:56:25 +0000503 * In case the camera device doesn't support such keys the list can be null.
504 */
505 @SuppressWarnings({"unchecked"})
506 public List<CaptureRequest.Key<?>> getAvailablePhysicalCameraRequestKeys() {
Emilian Peevf60f4fb2018-02-08 17:40:48 +0000507 if (mAvailablePhysicalRequestKeys == null) {
Emilian Peev2100ae72018-01-12 16:56:25 +0000508 Object crKey = CaptureRequest.Key.class;
509 Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey;
510
511 int[] filterTags = get(REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS);
512 if (filterTags == null) {
513 return null;
514 }
515 mAvailablePhysicalRequestKeys =
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100516 getAvailableKeyList(CaptureRequest.class, crKeyTyped, filterTags,
517 /*includeSynthetic*/ false);
Emilian Peev2100ae72018-01-12 16:56:25 +0000518 }
519 return mAvailablePhysicalRequestKeys;
520 }
521
522 /**
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700523 * Returns the list of keys supported by this {@link CameraDevice} for querying
524 * with a {@link CaptureRequest}.
525 *
526 * <p>The list returned is not modifiable, so any attempts to modify it will throw
527 * a {@code UnsupportedOperationException}.</p>
528 *
529 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
530 *
Igor Murashkin68f40062013-09-10 12:15:54 -0700531 * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700532 * {@link #getKeys()} instead.</p>
533 *
534 * @return List of keys supported by this CameraDevice for CaptureRequests.
535 */
Igor Murashkind6d65152014-05-19 16:31:02 -0700536 @SuppressWarnings({"unchecked"})
Eino-Ville Talvala8b905572015-05-14 15:43:01 -0700537 @NonNull
Igor Murashkind6d65152014-05-19 16:31:02 -0700538 public List<CaptureRequest.Key<?>> getAvailableCaptureRequestKeys() {
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700539 if (mAvailableRequestKeys == null) {
Igor Murashkind6d65152014-05-19 16:31:02 -0700540 Object crKey = CaptureRequest.Key.class;
541 Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey;
542
Igor Murashkincc542a42014-06-25 11:52:23 -0700543 int[] filterTags = get(REQUEST_AVAILABLE_REQUEST_KEYS);
544 if (filterTags == null) {
545 throw new AssertionError("android.request.availableRequestKeys must be non-null "
546 + "in the characteristics");
547 }
548 mAvailableRequestKeys =
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100549 getAvailableKeyList(CaptureRequest.class, crKeyTyped, filterTags,
550 /*includeSynthetic*/ true);
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700551 }
552 return mAvailableRequestKeys;
553 }
554
555 /**
556 * Returns the list of keys supported by this {@link CameraDevice} for querying
557 * with a {@link CaptureResult}.
558 *
559 * <p>The list returned is not modifiable, so any attempts to modify it will throw
560 * a {@code UnsupportedOperationException}.</p>
561 *
562 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
563 *
Igor Murashkin68f40062013-09-10 12:15:54 -0700564 * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700565 * {@link #getKeys()} instead.</p>
566 *
567 * @return List of keys supported by this CameraDevice for CaptureResults.
568 */
Igor Murashkind6d65152014-05-19 16:31:02 -0700569 @SuppressWarnings({"unchecked"})
Eino-Ville Talvala8b905572015-05-14 15:43:01 -0700570 @NonNull
Igor Murashkind6d65152014-05-19 16:31:02 -0700571 public List<CaptureResult.Key<?>> getAvailableCaptureResultKeys() {
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700572 if (mAvailableResultKeys == null) {
Igor Murashkind6d65152014-05-19 16:31:02 -0700573 Object crKey = CaptureResult.Key.class;
574 Class<CaptureResult.Key<?>> crKeyTyped = (Class<CaptureResult.Key<?>>)crKey;
575
Igor Murashkincc542a42014-06-25 11:52:23 -0700576 int[] filterTags = get(REQUEST_AVAILABLE_RESULT_KEYS);
577 if (filterTags == null) {
578 throw new AssertionError("android.request.availableResultKeys must be non-null "
579 + "in the characteristics");
580 }
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100581 mAvailableResultKeys = getAvailableKeyList(CaptureResult.class, crKeyTyped, filterTags,
582 /*includeSynthetic*/ true);
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700583 }
584 return mAvailableResultKeys;
585 }
586
587 /**
588 * Returns the list of keys supported by this {@link CameraDevice} by metadataClass.
589 *
590 * <p>The list returned is not modifiable, so any attempts to modify it will throw
591 * a {@code UnsupportedOperationException}.</p>
592 *
593 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
594 *
595 * @param metadataClass The subclass of CameraMetadata that you want to get the keys for.
Igor Murashkind6d65152014-05-19 16:31:02 -0700596 * @param keyClass The class of the metadata key, e.g. CaptureRequest.Key.class
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100597 * @param filterTags An array of tags to be used for filtering
598 * @param includeSynthetic Include public syntethic tag by default.
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700599 *
600 * @return List of keys supported by this CameraDevice for metadataClass.
601 *
602 * @throws IllegalArgumentException if metadataClass is not a subclass of CameraMetadata
603 */
Igor Murashkind6d65152014-05-19 16:31:02 -0700604 private <TKey> List<TKey>
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100605 getAvailableKeyList(Class<?> metadataClass, Class<TKey> keyClass, int[] filterTags,
606 boolean includeSynthetic) {
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700607
608 if (metadataClass.equals(CameraMetadata.class)) {
609 throw new AssertionError(
610 "metadataClass must be a strict subclass of CameraMetadata");
611 } else if (!CameraMetadata.class.isAssignableFrom(metadataClass)) {
612 throw new AssertionError(
613 "metadataClass must be a subclass of CameraMetadata");
614 }
615
Emilian Peevde62d842017-03-23 19:20:40 +0000616 List<TKey> staticKeyList = getKeys(
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100617 metadataClass, keyClass, /*instance*/null, filterTags, includeSynthetic);
Igor Murashkind6d65152014-05-19 16:31:02 -0700618 return Collections.unmodifiableList(staticKeyList);
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700619 }
620
Shuzhen Wang23d29382017-11-26 17:24:56 -0800621 /**
Shuzhen Wangbde13972018-03-19 10:30:45 -0700622 * Returns the set of physical camera ids that this logical {@link CameraDevice} is
Shuzhen Wang23d29382017-11-26 17:24:56 -0800623 * made up of.
624 *
625 * <p>A camera device is a logical camera if it has
626 * REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA capability. If the camera device
Shuzhen Wangbde13972018-03-19 10:30:45 -0700627 * doesn't have the capability, the return value will be an empty set. </p>
Shuzhen Wang23d29382017-11-26 17:24:56 -0800628 *
Shuzhen Wang123deefc2018-08-20 12:00:05 -0700629 * <p>Prior to API level 29, all returned IDs are guaranteed to be returned by {@link
630 * CameraManager#getCameraIdList}, and can be opened directly by
631 * {@link CameraManager#openCamera}. Starting from API level 29, for each of the returned ID,
632 * if it's also returned by {@link CameraManager#getCameraIdList}, it can be used as a
633 * standalone camera by {@link CameraManager#openCamera}. Otherwise, the camera ID can only be
634 * used as part of the current logical camera.</p>
635 *
Shuzhen Wangbde13972018-03-19 10:30:45 -0700636 * <p>The set returned is not modifiable, so any attempts to modify it will throw
Shuzhen Wang23d29382017-11-26 17:24:56 -0800637 * a {@code UnsupportedOperationException}.</p>
638 *
Shuzhen Wangbde13972018-03-19 10:30:45 -0700639 * @return Set of physical camera ids for this logical camera device.
Shuzhen Wang23d29382017-11-26 17:24:56 -0800640 */
641 @NonNull
Shuzhen Wangbde13972018-03-19 10:30:45 -0700642 public Set<String> getPhysicalCameraIds() {
Shuzhen Wang23d29382017-11-26 17:24:56 -0800643 int[] availableCapabilities = get(REQUEST_AVAILABLE_CAPABILITIES);
644 if (availableCapabilities == null) {
645 throw new AssertionError("android.request.availableCapabilities must be non-null "
646 + "in the characteristics");
647 }
648
649 if (!ArrayUtils.contains(availableCapabilities,
650 REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA)) {
Shuzhen Wangbde13972018-03-19 10:30:45 -0700651 return Collections.emptySet();
Shuzhen Wang23d29382017-11-26 17:24:56 -0800652 }
653 byte[] physicalCamIds = get(LOGICAL_MULTI_CAMERA_PHYSICAL_IDS);
654
655 String physicalCamIdString = null;
656 try {
657 physicalCamIdString = new String(physicalCamIds, "UTF-8");
658 } catch (java.io.UnsupportedEncodingException e) {
659 throw new AssertionError("android.logicalCam.physicalIds must be UTF-8 string");
660 }
Shuzhen Wangbde13972018-03-19 10:30:45 -0700661 String[] physicalCameraIdArray = physicalCamIdString.split("\0");
Shuzhen Wang23d29382017-11-26 17:24:56 -0800662
Shuzhen Wangbde13972018-03-19 10:30:45 -0700663 return Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(physicalCameraIdArray)));
Shuzhen Wang23d29382017-11-26 17:24:56 -0800664 }
665
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700666 /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
667 * The key entries below this point are generated from metadata
668 * definitions in /system/media/camera/docs. Do not modify by hand or
669 * modify the comment blocks at the start or end.
670 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800671
672 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700673 * <p>List of aberration correction modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode} that are
674 * supported by this camera device.</p>
675 * <p>This key lists the valid modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}. If no
676 * aberration correction modes are available for a device, this list will solely include
Yin-Chia Yeh941aac02015-01-06 10:32:47 -0800677 * OFF mode. All camera devices will support either OFF or FAST mode.</p>
678 * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always list
679 * OFF mode. This includes all FULL level devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700680 * <p>LEGACY devices will always only support FAST mode.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700681 * <p><b>Range of valid values:</b><br>
682 * Any value listed in {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700683 * <p>This key is available on all devices.</p>
Zhijun Hea05e59d2014-07-08 18:27:47 -0700684 *
Zhijun He9e4e4392014-08-18 11:12:32 -0700685 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
Zhijun Hea05e59d2014-07-08 18:27:47 -0700686 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700687 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -0800688 @NonNull
Zhijun He9e4e4392014-08-18 11:12:32 -0700689 public static final Key<int[]> COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES =
690 new Key<int[]>("android.colorCorrection.availableAberrationModes", int[].class);
Zhijun Hea05e59d2014-07-08 18:27:47 -0700691
692 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700693 * <p>List of auto-exposure antibanding modes for {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} that are
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800694 * supported by this camera device.</p>
695 * <p>Not all of the auto-exposure anti-banding modes may be
696 * supported by a given camera device. This field lists the
697 * valid anti-banding modes that the application may request
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700698 * for this camera device with the
Yin-Chia Yeh7b2cae62014-11-25 11:54:18 -0800699 * {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} control.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700700 * <p><b>Range of valid values:</b><br>
701 * Any value listed in {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700702 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700703 *
704 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800705 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700706 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -0800707 @NonNull
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700708 public static final Key<int[]> CONTROL_AE_AVAILABLE_ANTIBANDING_MODES =
709 new Key<int[]>("android.control.aeAvailableAntibandingModes", int[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800710
711 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700712 * <p>List of auto-exposure modes for {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} that are supported by this camera
713 * device.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800714 * <p>Not all the auto-exposure modes may be supported by a
715 * given camera device, especially if no flash unit is
716 * available. This entry lists the valid modes for
717 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} for this camera device.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700718 * <p>All camera devices support ON, and all camera devices with flash
719 * units support ON_AUTO_FLASH and ON_ALWAYS_FLASH.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -0800720 * <p>FULL mode camera devices always support OFF mode,
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800721 * which enables application control of camera exposure time,
722 * sensitivity, and frame duration.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700723 * <p>LEGACY mode camera devices never support OFF mode.
724 * LIMITED mode devices support OFF if they support the MANUAL_SENSOR
725 * capability.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700726 * <p><b>Range of valid values:</b><br>
727 * Any value listed in {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700728 * <p>This key is available on all devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800729 *
730 * @see CaptureRequest#CONTROL_AE_MODE
731 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700732 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -0800733 @NonNull
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700734 public static final Key<int[]> CONTROL_AE_AVAILABLE_MODES =
735 new Key<int[]>("android.control.aeAvailableModes", int[].class);
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800736
737 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700738 * <p>List of frame rate ranges for {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} supported by
739 * this camera device.</p>
Yin-Chia Yeh58551622015-05-21 11:27:06 -0700740 * <p>For devices at the LEGACY level or above:</p>
741 * <ul>
Yin-Chia Yeh5fdf0a12015-11-20 15:39:36 -0800742 * <li>
743 * <p>For constant-framerate recording, for each normal
744 * {@link android.media.CamcorderProfile CamcorderProfile}, that is, a
Yin-Chia Yeh58551622015-05-21 11:27:06 -0700745 * {@link android.media.CamcorderProfile CamcorderProfile} that has
746 * {@link android.media.CamcorderProfile#quality quality} in
747 * the range [{@link android.media.CamcorderProfile#QUALITY_LOW QUALITY_LOW},
748 * {@link android.media.CamcorderProfile#QUALITY_2160P QUALITY_2160P}], if the profile is
749 * supported by the device and has
750 * {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} <code>x</code>, this list will
Yin-Chia Yeh5fdf0a12015-11-20 15:39:36 -0800751 * always include (<code>x</code>,<code>x</code>).</p>
752 * </li>
753 * <li>
754 * <p>Also, a camera device must either not support any
755 * {@link android.media.CamcorderProfile CamcorderProfile},
756 * or support at least one
757 * normal {@link android.media.CamcorderProfile CamcorderProfile} that has
758 * {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} <code>x</code> &gt;= 24.</p>
759 * </li>
Yin-Chia Yeh58551622015-05-21 11:27:06 -0700760 * </ul>
761 * <p>For devices at the LIMITED level or above:</p>
762 * <ul>
Yin-Chia Yehae092f22019-06-12 14:46:58 -0700763 * <li>For devices that advertise NIR color filter arrangement in
764 * {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}, this list will always include
765 * (<code>max</code>, <code>max</code>) where <code>max</code> = the maximum output frame rate of the maximum YUV_420_888
766 * output size.</li>
767 * <li>For devices advertising any color filter arrangement other than NIR, or devices not
768 * advertising color filter arrangement, this list will always include (<code>min</code>, <code>max</code>) and
769 * (<code>max</code>, <code>max</code>) where <code>min</code> &lt;= 15 and <code>max</code> = the maximum output frame rate of the
Yin-Chia Yeh58551622015-05-21 11:27:06 -0700770 * maximum YUV_420_888 output size.</li>
771 * </ul>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700772 * <p><b>Units</b>: Frames per second (FPS)</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700773 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700774 *
775 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
Yin-Chia Yehae092f22019-06-12 14:46:58 -0700776 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800777 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700778 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -0800779 @NonNull
Igor Murashkin78712a82014-05-27 18:32:18 -0700780 public static final Key<android.util.Range<Integer>[]> CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES =
781 new Key<android.util.Range<Integer>[]>("android.control.aeAvailableTargetFpsRanges", new TypeReference<android.util.Range<Integer>[]>() {{ }});
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800782
783 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700784 * <p>Maximum and minimum exposure compensation values for
785 * {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}, in counts of {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep},
786 * that are supported by this camera device.</p>
787 * <p><b>Range of valid values:</b><br></p>
Zhijun Hef1745ce2015-02-04 13:55:14 -0800788 * <p>Range [0,0] indicates that exposure compensation is not supported.</p>
789 * <p>For LIMITED and FULL devices, range must follow below requirements if exposure
790 * compensation is supported (<code>range != [0, 0]</code>):</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700791 * <p><code>Min.exposure compensation * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} &lt;= -2 EV</code></p>
792 * <p><code>Max.exposure compensation * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} &gt;= 2 EV</code></p>
Zhijun Hef1745ce2015-02-04 13:55:14 -0800793 * <p>LEGACY devices may support a smaller range than this.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700794 * <p>This key is available on all devices.</p>
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -0800795 *
796 * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700797 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800798 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700799 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -0800800 @NonNull
Igor Murashkin78712a82014-05-27 18:32:18 -0700801 public static final Key<android.util.Range<Integer>> CONTROL_AE_COMPENSATION_RANGE =
802 new Key<android.util.Range<Integer>>("android.control.aeCompensationRange", new TypeReference<android.util.Range<Integer>>() {{ }});
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800803
804 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700805 * <p>Smallest step by which the exposure compensation
806 * can be changed.</p>
807 * <p>This is the unit for {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}. For example, if this key has
808 * 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
809 * that the target EV offset for the auto-exposure routine is -1 EV.</p>
810 * <p>One unit of EV compensation changes the brightness of the captured image by a factor
811 * of two. +1 EV doubles the image brightness, while -1 EV halves the image brightness.</p>
812 * <p><b>Units</b>: Exposure Value (EV)</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700813 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700814 *
815 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800816 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700817 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -0800818 @NonNull
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700819 public static final Key<Rational> CONTROL_AE_COMPENSATION_STEP =
820 new Key<Rational>("android.control.aeCompensationStep", Rational.class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800821
822 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700823 * <p>List of auto-focus (AF) modes for {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} that are
824 * supported by this camera device.</p>
Zhijun He78146ec2014-01-14 18:12:13 -0800825 * <p>Not all the auto-focus modes may be supported by a
826 * given camera device. This entry lists the valid modes for
827 * {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} for this camera device.</p>
Ruben Brunk6f387092014-09-22 16:13:54 -0700828 * <p>All LIMITED and FULL mode camera devices will support OFF mode, and all
829 * camera devices with adjustable focuser units
830 * (<code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} &gt; 0</code>) will support AUTO mode.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700831 * <p>LEGACY devices will support OFF mode only if they support
832 * focusing to infinity (by also setting {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} to
833 * <code>0.0f</code>).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700834 * <p><b>Range of valid values:</b><br>
835 * Any value listed in {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700836 * <p>This key is available on all devices.</p>
Zhijun He78146ec2014-01-14 18:12:13 -0800837 *
838 * @see CaptureRequest#CONTROL_AF_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700839 * @see CaptureRequest#LENS_FOCUS_DISTANCE
Zhijun He78146ec2014-01-14 18:12:13 -0800840 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800841 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700842 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -0800843 @NonNull
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700844 public static final Key<int[]> CONTROL_AF_AVAILABLE_MODES =
845 new Key<int[]>("android.control.afAvailableModes", int[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800846
847 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700848 * <p>List of color effects for {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode} that are supported by this camera
849 * device.</p>
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -0800850 * <p>This list contains the color effect modes that can be applied to
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700851 * images produced by the camera device.
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -0800852 * Implementations are not expected to be consistent across all devices.
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700853 * If no color effect modes are available for a device, this will only list
854 * OFF.</p>
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -0800855 * <p>A color effect will only be applied if
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700856 * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF. OFF is always included in this list.</p>
857 * <p>This control has no effect on the operation of other control routines such
858 * as auto-exposure, white balance, or focus.</p>
859 * <p><b>Range of valid values:</b><br>
860 * Any value listed in {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700861 * <p>This key is available on all devices.</p>
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -0800862 *
863 * @see CaptureRequest#CONTROL_EFFECT_MODE
864 * @see CaptureRequest#CONTROL_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700865 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700866 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -0800867 @NonNull
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700868 public static final Key<int[]> CONTROL_AVAILABLE_EFFECTS =
869 new Key<int[]>("android.control.availableEffects", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700870
871 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700872 * <p>List of scene modes for {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} that are supported by this camera
873 * device.</p>
Ruben Brunk8237d342014-01-17 15:33:02 -0800874 * <p>This list contains scene modes that can be set for the camera device.
875 * Only scene modes that have been fully implemented for the
876 * camera device may be included here. Implementations are not expected
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700877 * to be consistent across all devices.</p>
878 * <p>If no scene modes are supported by the camera device, this
879 * will be set to DISABLED. Otherwise DISABLED will not be listed.</p>
880 * <p>FACE_PRIORITY is always listed if face detection is
881 * supported (i.e.<code>{@link CameraCharacteristics#STATISTICS_INFO_MAX_FACE_COUNT android.statistics.info.maxFaceCount} &gt;
882 * 0</code>).</p>
883 * <p><b>Range of valid values:</b><br>
884 * Any value listed in {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700885 * <p>This key is available on all devices.</p>
Ruben Brunk8237d342014-01-17 15:33:02 -0800886 *
887 * @see CaptureRequest#CONTROL_SCENE_MODE
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700888 * @see CameraCharacteristics#STATISTICS_INFO_MAX_FACE_COUNT
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700889 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700890 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -0800891 @NonNull
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700892 public static final Key<int[]> CONTROL_AVAILABLE_SCENE_MODES =
893 new Key<int[]>("android.control.availableSceneModes", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700894
895 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700896 * <p>List of video stabilization modes for {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}
897 * that are supported by this camera device.</p>
898 * <p>OFF will always be listed.</p>
899 * <p><b>Range of valid values:</b><br>
900 * Any value listed in {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700901 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700902 *
903 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700904 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700905 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -0800906 @NonNull
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700907 public static final Key<int[]> CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES =
908 new Key<int[]>("android.control.availableVideoStabilizationModes", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700909
910 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700911 * <p>List of auto-white-balance modes for {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} that are supported by this
912 * camera device.</p>
Zhijun He399f05d2014-01-15 11:31:30 -0800913 * <p>Not all the auto-white-balance modes may be supported by a
914 * given camera device. This entry lists the valid modes for
915 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} for this camera device.</p>
916 * <p>All camera devices will support ON mode.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700917 * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always support OFF
918 * mode, which enables application control of white balance, by using
919 * {@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
920 * mode camera devices.</p>
921 * <p><b>Range of valid values:</b><br>
922 * Any value listed in {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700923 * <p>This key is available on all devices.</p>
Zhijun He399f05d2014-01-15 11:31:30 -0800924 *
Zhijun He399f05d2014-01-15 11:31:30 -0800925 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -0800926 * @see CaptureRequest#COLOR_CORRECTION_MODE
927 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
928 * @see CaptureRequest#CONTROL_AWB_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700929 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700930 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -0800931 @NonNull
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700932 public static final Key<int[]> CONTROL_AWB_AVAILABLE_MODES =
933 new Key<int[]>("android.control.awbAvailableModes", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700934
935 /**
Ruben Brunk90bc34e2014-02-03 17:54:24 -0800936 * <p>List of the maximum number of regions that can be used for metering in
937 * auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF);
Yin-Chia Yeh440ee262019-10-07 15:14:51 -0700938 * this corresponds to the maximum number of elements in
Ruben Brunk90bc34e2014-02-03 17:54:24 -0800939 * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}, {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions},
940 * and {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700941 * <p><b>Range of valid values:</b><br></p>
942 * <p>Value must be &gt;= 0 for each element. For full-capability devices
943 * this value must be &gt;= 1 for AE and AF. The order of the elements is:
944 * <code>(AE, AWB, AF)</code>.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700945 * <p>This key is available on all devices.</p>
Ruben Brunk90bc34e2014-02-03 17:54:24 -0800946 *
947 * @see CaptureRequest#CONTROL_AE_REGIONS
948 * @see CaptureRequest#CONTROL_AF_REGIONS
949 * @see CaptureRequest#CONTROL_AWB_REGIONS
Igor Murashkin78712a82014-05-27 18:32:18 -0700950 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700951 */
Ruben Brunk90bc34e2014-02-03 17:54:24 -0800952 public static final Key<int[]> CONTROL_MAX_REGIONS =
953 new Key<int[]>("android.control.maxRegions", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700954
955 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700956 * <p>The maximum number of metering regions that can be used by the auto-exposure (AE)
957 * routine.</p>
Yin-Chia Yeh440ee262019-10-07 15:14:51 -0700958 * <p>This corresponds to the maximum allowed number of elements in
Igor Murashkin78712a82014-05-27 18:32:18 -0700959 * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700960 * <p><b>Range of valid values:</b><br>
961 * Value will be &gt;= 0. For FULL-capability devices, this
962 * value will be &gt;= 1.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700963 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -0700964 *
965 * @see CaptureRequest#CONTROL_AE_REGIONS
966 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700967 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -0800968 @NonNull
Igor Murashkin6c76f582014-07-15 17:19:49 -0700969 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -0700970 public static final Key<Integer> CONTROL_MAX_REGIONS_AE =
971 new Key<Integer>("android.control.maxRegionsAe", int.class);
972
973 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700974 * <p>The maximum number of metering regions that can be used by the auto-white balance (AWB)
975 * routine.</p>
Yin-Chia Yeh440ee262019-10-07 15:14:51 -0700976 * <p>This corresponds to the maximum allowed number of elements in
Igor Murashkin78712a82014-05-27 18:32:18 -0700977 * {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700978 * <p><b>Range of valid values:</b><br>
979 * Value will be &gt;= 0.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700980 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -0700981 *
982 * @see CaptureRequest#CONTROL_AWB_REGIONS
983 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700984 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -0800985 @NonNull
Igor Murashkin6c76f582014-07-15 17:19:49 -0700986 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -0700987 public static final Key<Integer> CONTROL_MAX_REGIONS_AWB =
988 new Key<Integer>("android.control.maxRegionsAwb", int.class);
989
990 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700991 * <p>The maximum number of metering regions that can be used by the auto-focus (AF) routine.</p>
Yin-Chia Yeh440ee262019-10-07 15:14:51 -0700992 * <p>This corresponds to the maximum allowed number of elements in
Igor Murashkin78712a82014-05-27 18:32:18 -0700993 * {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700994 * <p><b>Range of valid values:</b><br>
995 * Value will be &gt;= 0. For FULL-capability devices, this
996 * value will be &gt;= 1.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700997 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -0700998 *
999 * @see CaptureRequest#CONTROL_AF_REGIONS
1000 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001001 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001002 @NonNull
Igor Murashkin6c76f582014-07-15 17:19:49 -07001003 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -07001004 public static final Key<Integer> CONTROL_MAX_REGIONS_AF =
1005 new Key<Integer>("android.control.maxRegionsAf", int.class);
1006
1007 /**
Zhijun Hefab663e2015-05-26 19:46:31 -07001008 * <p>List of available high speed video size, fps range and max batch size configurations
1009 * supported by the camera device, in the format of (width, height, fps_min, fps_max, batch_size_max).</p>
Zhijun He3c1ff682015-06-23 09:21:43 -07001010 * <p>When CONSTRAINED_HIGH_SPEED_VIDEO is supported in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities},
Zhijun Hefab663e2015-05-26 19:46:31 -07001011 * this metadata will list the supported high speed video size, fps range and max batch size
1012 * configurations. All the sizes listed in this configuration will be a subset of the sizes
1013 * reported by {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes }
1014 * for processed non-stalling formats.</p>
1015 * <p>For the high speed video use case, the application must
Zhijun Hee0404182014-06-26 13:17:09 -07001016 * select the video size and fps range from this metadata to configure the recording and
1017 * preview streams and setup the recording requests. For example, if the application intends
1018 * to do high speed recording, it can select the maximum size reported by this metadata to
1019 * configure output streams. Once the size is selected, application can filter this metadata
1020 * by selected size and get the supported fps ranges, and use these fps ranges to setup the
Yin-Chia Yeh12da1402014-07-15 10:37:31 -07001021 * recording requests. Note that for the use case of multiple output streams, application
Zhijun Hefab663e2015-05-26 19:46:31 -07001022 * must select one unique size from this metadata to use (e.g., preview and recording streams
1023 * must have the same size). Otherwise, the high speed capture session creation will fail.</p>
1024 * <p>The min and max fps will be multiple times of 30fps.</p>
1025 * <p>High speed video streaming extends significant performance pressue to camera hardware,
1026 * to achieve efficient high speed streaming, the camera device may have to aggregate
1027 * multiple frames together and send to camera device for processing where the request
1028 * controls are same for all the frames in this batch. Max batch size indicates
1029 * the max possible number of frames the camera device will group together for this high
1030 * speed stream configuration. This max batch size will be used to generate a high speed
1031 * recording request list by
Eino-Ville Talvala639fffe2015-06-30 10:34:48 -07001032 * {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList }.
Zhijun Hefab663e2015-05-26 19:46:31 -07001033 * The max batch size for each configuration will satisfy below conditions:</p>
1034 * <ul>
1035 * <li>Each max batch size will be a divisor of its corresponding fps_max / 30. For example,
1036 * if max_fps is 300, max batch size will only be 1, 2, 5, or 10.</li>
1037 * <li>The camera device may choose smaller internal batch size for each configuration, but
1038 * the actual batch size will be a divisor of max batch size. For example, if the max batch
1039 * size is 8, the actual batch size used by camera device will only be 1, 2, 4, or 8.</li>
1040 * <li>The max batch size in each configuration entry must be no larger than 32.</li>
1041 * </ul>
1042 * <p>The camera device doesn't have to support batch mode to achieve high speed video recording,
1043 * in such case, batch_size_max will be reported as 1 in each configuration entry.</p>
1044 * <p>This fps ranges in this configuration list can only be used to create requests
1045 * that are submitted to a high speed camera capture session created by
1046 * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }.
1047 * The fps ranges reported in this metadata must not be used to setup capture requests for
1048 * normal capture session, or it will cause request error.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001049 * <p><b>Range of valid values:</b><br></p>
Zhijun Hefab663e2015-05-26 19:46:31 -07001050 * <p>For each configuration, the fps_max &gt;= 120fps.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001051 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001052 * <p><b>Limited capability</b> -
1053 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1054 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun Hee0404182014-06-26 13:17:09 -07001055 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001056 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He3c1ff682015-06-23 09:21:43 -07001057 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Zhijun Hee0404182014-06-26 13:17:09 -07001058 * @hide
1059 */
Yin-Chia Yeh12da1402014-07-15 10:37:31 -07001060 public static final Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]> CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS =
1061 new Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]>("android.control.availableHighSpeedVideoConfigurations", android.hardware.camera2.params.HighSpeedVideoConfiguration[].class);
Zhijun Hee0404182014-06-26 13:17:09 -07001062
1063 /**
Yin-Chia Yehdc0ba092015-02-20 15:52:06 -08001064 * <p>Whether the camera device supports {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</p>
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -07001065 * <p>Devices with MANUAL_SENSOR capability or BURST_CAPTURE capability will always
1066 * list <code>true</code>. This includes FULL devices.</p>
Yin-Chia Yehdc0ba092015-02-20 15:52:06 -08001067 * <p>This key is available on all devices.</p>
1068 *
1069 * @see CaptureRequest#CONTROL_AE_LOCK
1070 */
1071 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001072 @NonNull
Yin-Chia Yehdc0ba092015-02-20 15:52:06 -08001073 public static final Key<Boolean> CONTROL_AE_LOCK_AVAILABLE =
1074 new Key<Boolean>("android.control.aeLockAvailable", boolean.class);
1075
1076 /**
1077 * <p>Whether the camera device supports {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</p>
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -07001078 * <p>Devices with MANUAL_POST_PROCESSING capability or BURST_CAPTURE capability will
1079 * always list <code>true</code>. This includes FULL devices.</p>
Yin-Chia Yehdc0ba092015-02-20 15:52:06 -08001080 * <p>This key is available on all devices.</p>
1081 *
1082 * @see CaptureRequest#CONTROL_AWB_LOCK
1083 */
1084 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001085 @NonNull
Yin-Chia Yehdc0ba092015-02-20 15:52:06 -08001086 public static final Key<Boolean> CONTROL_AWB_LOCK_AVAILABLE =
1087 new Key<Boolean>("android.control.awbLockAvailable", boolean.class);
1088
1089 /**
1090 * <p>List of control modes for {@link CaptureRequest#CONTROL_MODE android.control.mode} that are supported by this camera
1091 * device.</p>
1092 * <p>This list contains control modes that can be set for the camera device.
1093 * LEGACY mode devices will always support AUTO mode. LIMITED and FULL
1094 * devices will always support OFF, AUTO modes.</p>
1095 * <p><b>Range of valid values:</b><br>
1096 * Any value listed in {@link CaptureRequest#CONTROL_MODE android.control.mode}</p>
1097 * <p>This key is available on all devices.</p>
1098 *
1099 * @see CaptureRequest#CONTROL_MODE
1100 */
1101 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001102 @NonNull
Yin-Chia Yehdc0ba092015-02-20 15:52:06 -08001103 public static final Key<int[]> CONTROL_AVAILABLE_MODES =
1104 new Key<int[]>("android.control.availableModes", int[].class);
1105
1106 /**
Yin-Chia Yeh1ee1a0a2016-01-18 19:13:47 -08001107 * <p>Range of boosts for {@link CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST android.control.postRawSensitivityBoost} supported
1108 * by this camera device.</p>
1109 * <p>Devices support post RAW sensitivity boost will advertise
1110 * {@link CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST android.control.postRawSensitivityBoost} key for controling
1111 * post RAW sensitivity boost.</p>
1112 * <p>This key will be <code>null</code> for devices that do not support any RAW format
1113 * outputs. For devices that do support RAW format outputs, this key will always
1114 * present, and if a device does not support post RAW sensitivity boost, it will
1115 * list <code>(100, 100)</code> in this key.</p>
1116 * <p><b>Units</b>: ISO arithmetic units, the same as {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001117 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Yin-Chia Yeh1ee1a0a2016-01-18 19:13:47 -08001118 *
1119 * @see CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST
1120 * @see CaptureRequest#SENSOR_SENSITIVITY
1121 */
1122 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001123 @NonNull
Yin-Chia Yeh1ee1a0a2016-01-18 19:13:47 -08001124 public static final Key<android.util.Range<Integer>> CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE =
1125 new Key<android.util.Range<Integer>>("android.control.postRawSensitivityBoostRange", new TypeReference<android.util.Range<Integer>>() {{ }});
1126
1127 /**
Shuzhen Wang55c1c3f2019-11-13 11:25:20 -08001128 * <p>The list of bokeh modes for {@link CaptureRequest#CONTROL_BOKEH_MODE android.control.bokehMode} that are supported by this camera
1129 * device, and each bokeh mode's maximum streaming (non-stall) size with bokeh effect.</p>
Shuzhen Wang1ab85142019-07-08 15:14:16 -07001130 * <p>For OFF mode, the camera behaves normally with no bokeh effect.</p>
1131 * <p>For STILL_CAPTURE mode, the maximum streaming dimension specifies the limit under which
1132 * bokeh is effective when capture intent is PREVIEW. Note that when capture intent is
1133 * PREVIEW, the bokeh effect may not be as high quality compared to STILL_CAPTURE intent
1134 * in order to maintain reasonable frame rate. The maximum streaming dimension must be one
1135 * of the YUV_420_888 or PRIVATE resolutions in availableStreamConfigurations, or (0, 0)
1136 * if preview bokeh is not supported. If the application configures a stream larger than
1137 * the maximum streaming dimension, bokeh effect may not be applied for this stream for
1138 * PREVIEW intent.</p>
1139 * <p>For CONTINUOUS mode, the maximum streaming dimension specifies the limit under which
1140 * bokeh is effective. This dimension must be one of the YUV_420_888 or PRIVATE resolutions
1141 * in availableStreamConfigurations, and if the sensor maximum resolution is larger than or
1142 * equal to 1080p, the maximum streaming dimension must be at least 1080p. If the
1143 * application configures a stream with larger dimension, the stream may not have bokeh
1144 * effect applied.</p>
1145 * <p><b>Units</b>: (mode, width, height)</p>
1146 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
1147 * <p><b>Limited capability</b> -
1148 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1149 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1150 *
Shuzhen Wang55c1c3f2019-11-13 11:25:20 -08001151 * @see CaptureRequest#CONTROL_BOKEH_MODE
1152 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1153 * @hide
1154 */
1155 public static final Key<int[]> CONTROL_AVAILABLE_BOKEH_MAX_SIZES =
1156 new Key<int[]>("android.control.availableBokehMaxSizes", int[].class);
1157
1158 /**
1159 * <p>The ranges of supported zoom ratio for non-OFF {@link CaptureRequest#CONTROL_BOKEH_MODE android.control.bokehMode}.</p>
1160 * <p>When bokeh mode is enabled, the camera device may have limited range of zoom ratios
1161 * compared to when bokeh mode is disabled. This tag lists the zoom ratio ranges for all
1162 * supported non-OFF bokeh modes, in the same order as in
1163 * {@link CameraCharacteristics#CONTROL_AVAILABLE_BOKEH_CAPABILITIES android.control.availableBokehCapabilities}.</p>
1164 * <p>Range [1.0, 1.0] means that no zoom (optical or digital) is supported.</p>
1165 * <p><b>Units</b>: (minZoom, maxZoom)</p>
1166 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
1167 * <p><b>Limited capability</b> -
1168 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1169 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1170 *
1171 * @see CameraCharacteristics#CONTROL_AVAILABLE_BOKEH_CAPABILITIES
1172 * @see CaptureRequest#CONTROL_BOKEH_MODE
1173 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1174 * @hide
1175 */
1176 public static final Key<float[]> CONTROL_AVAILABLE_BOKEH_ZOOM_RATIO_RANGES =
1177 new Key<float[]>("android.control.availableBokehZoomRatioRanges", float[].class);
1178
1179 /**
1180 * <p>The list of bokeh modes for {@link CaptureRequest#CONTROL_BOKEH_MODE android.control.bokehMode} that are supported by
1181 * this camera device, and each bokeh mode's capabilities such as maximum streaming size
1182 * with bokeh effect, and supported zoom ratio ranges.</p>
1183 * <p>For OFF mode, the camera behaves normally with no bokeh effect.</p>
1184 * <p>For STILL_CAPTURE mode, the maximum streaming dimension specifies the limit under which
1185 * bokeh is effective when capture intent is PREVIEW. Note that when capture intent is
1186 * PREVIEW, the bokeh effect may not be as high quality compared to STILL_CAPTURE intent
1187 * in order to maintain reasonable frame rate. The maximum streaming dimension must be one
1188 * of the YUV_420_888 or PRIVATE resolutions in availableStreamConfigurations, or (0, 0)
1189 * if preview bokeh is not supported. If the application configures a stream larger than
1190 * the maximum streaming dimension, bokeh effect may not be applied for this stream for
1191 * PREVIEW intent.</p>
1192 * <p>For CONTINUOUS mode, the maximum streaming dimension specifies the limit under which
1193 * bokeh is effective. This dimension must be one of the YUV_420_888 or PRIVATE resolutions
1194 * in availableStreamConfigurations, and if the sensor maximum resolution is larger than or
1195 * equal to 1080p, the maximum streaming dimension must be at least 1080p. If the
1196 * application configures a stream with larger dimension, the stream may not have bokeh
1197 * effect applied.</p>
1198 * <p>When bokeh mode is enabled, the camera device may have limited range of zoom ratios
1199 * compared to when bokeh mode is disabled. availableBokehCapabilities lists the zoom
1200 * ranges for all supported bokeh modes. A range of (1.0, 1.0) means that no zoom
1201 * (optical or digital) is supported.</p>
1202 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
1203 *
1204 * @see CaptureRequest#CONTROL_BOKEH_MODE
1205 */
1206 @PublicKey
1207 @NonNull
1208 @SyntheticKey
1209 public static final Key<android.hardware.camera2.params.Capability[]> CONTROL_AVAILABLE_BOKEH_CAPABILITIES =
1210 new Key<android.hardware.camera2.params.Capability[]>("android.control.availableBokehCapabilities", android.hardware.camera2.params.Capability[].class);
1211
1212 /**
1213 * <p>Minimum and maximum zoom ratios supported by this camera device.</p>
1214 * <p>If the camera device supports zoom-out from 1x zoom, minZoom will be less than 1.0, and
Eino-Ville Talvalad2d749a2020-01-06 16:10:29 -08001215 * setting {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} to values less than 1.0 increases the camera's field
Shuzhen Wang55c1c3f2019-11-13 11:25:20 -08001216 * of view.</p>
1217 * <p><b>Units</b>: A pair of zoom ratio in floating points: (minZoom, maxZoom)</p>
1218 * <p><b>Range of valid values:</b><br></p>
1219 * <p>maxZoom &gt;= 1.0 &gt;= minZoom</p>
1220 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
1221 * <p><b>Limited capability</b> -
1222 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1223 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1224 *
Eino-Ville Talvalad2d749a2020-01-06 16:10:29 -08001225 * @see CaptureRequest#CONTROL_ZOOM_RATIO
Shuzhen Wang1ab85142019-07-08 15:14:16 -07001226 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1227 */
1228 @PublicKey
1229 @NonNull
Shuzhen Wang55c1c3f2019-11-13 11:25:20 -08001230 public static final Key<android.util.Range<Float>> CONTROL_ZOOM_RATIO_RANGE =
1231 new Key<android.util.Range<Float>>("android.control.zoomRatioRange", new TypeReference<android.util.Range<Float>>() {{ }});
Shuzhen Wang1ab85142019-07-08 15:14:16 -07001232
1233 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001234 * <p>List of edge enhancement modes for {@link CaptureRequest#EDGE_MODE android.edge.mode} that are supported by this camera
1235 * device.</p>
Chien-Yu Chen72333912015-07-08 11:55:19 -07001236 * <p>Full-capability camera devices must always support OFF; camera devices that support
1237 * YUV_REPROCESSING or PRIVATE_REPROCESSING will list ZERO_SHUTTER_LAG; all devices will
1238 * list FAST.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001239 * <p><b>Range of valid values:</b><br>
1240 * Any value listed in {@link CaptureRequest#EDGE_MODE android.edge.mode}</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001241 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001242 * <p><b>Full capability</b> -
1243 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1244 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001245 *
1246 * @see CaptureRequest#EDGE_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001247 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001248 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001249 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001250 @NonNull
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07001251 public static final Key<int[]> EDGE_AVAILABLE_EDGE_MODES =
1252 new Key<int[]>("android.edge.availableEdgeModes", int[].class);
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001253
1254 /**
Zhijun Heca1b73a2014-02-03 12:39:53 -08001255 * <p>Whether this camera device has a
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001256 * flash unit.</p>
1257 * <p>Will be <code>false</code> if no flash is available.</p>
1258 * <p>If there is no flash unit, none of the flash controls do
1259 * anything.
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001260 * This key is available on all devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001261 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001262 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001263 @NonNull
Zhijun Heca1b73a2014-02-03 12:39:53 -08001264 public static final Key<Boolean> FLASH_INFO_AVAILABLE =
1265 new Key<Boolean>("android.flash.info.available", boolean.class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001266
1267 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001268 * <p>List of hot pixel correction modes for {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode} that are supported by this
Ruben Brunk9d454fd2014-03-04 14:11:52 -08001269 * camera device.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08001270 * <p>FULL mode camera devices will always support FAST.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001271 * <p><b>Range of valid values:</b><br>
1272 * Any value listed in {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode}</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001273 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08001274 *
1275 * @see CaptureRequest#HOT_PIXEL_MODE
1276 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001277 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001278 @NonNull
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07001279 public static final Key<int[]> HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES =
1280 new Key<int[]>("android.hotPixel.availableHotPixelModes", int[].class);
Ruben Brunk9d454fd2014-03-04 14:11:52 -08001281
1282 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001283 * <p>List of JPEG thumbnail sizes for {@link CaptureRequest#JPEG_THUMBNAIL_SIZE android.jpeg.thumbnailSize} supported by this
1284 * camera device.</p>
1285 * <p>This list will include at least one non-zero resolution, plus <code>(0,0)</code> for indicating no
1286 * thumbnail should be generated.</p>
Zhijun He5f2a47f2014-01-16 15:44:41 -08001287 * <p>Below condiditions will be satisfied for this size list:</p>
Zhijun He5a9ff372013-12-26 11:49:09 -08001288 * <ul>
Zhijun He5f2a47f2014-01-16 15:44:41 -08001289 * <li>The sizes will be sorted by increasing pixel area (width x height).
1290 * If several resolutions have the same area, they will be sorted by increasing width.</li>
1291 * <li>The aspect ratio of the largest thumbnail size will be same as the
Igor Murashkin9c595172014-05-12 13:56:20 -07001292 * aspect ratio of largest JPEG output size in android.scaler.availableStreamConfigurations.
Zhijun He5a9ff372013-12-26 11:49:09 -08001293 * The largest size is defined as the size that has the largest pixel area
1294 * in a given size list.</li>
Igor Murashkin9c595172014-05-12 13:56:20 -07001295 * <li>Each output JPEG size in android.scaler.availableStreamConfigurations will have at least
Zhijun He5a9ff372013-12-26 11:49:09 -08001296 * one corresponding size that has the same aspect ratio in availableThumbnailSizes,
1297 * and vice versa.</li>
Shuzhen Wangf655b1c2018-12-28 15:40:36 -08001298 * <li>All non-<code>(0, 0)</code> sizes will have non-zero widths and heights.</li>
Zhijun He5a9ff372013-12-26 11:49:09 -08001299 * </ul>
Shuzhen Wangf655b1c2018-12-28 15:40:36 -08001300 * <p>This list is also used as supported thumbnail sizes for HEIC image format capture.</p>
1301 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001302 *
1303 * @see CaptureRequest#JPEG_THUMBNAIL_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001304 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001305 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001306 @NonNull
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07001307 public static final Key<android.util.Size[]> JPEG_AVAILABLE_THUMBNAIL_SIZES =
1308 new Key<android.util.Size[]>("android.jpeg.availableThumbnailSizes", android.util.Size[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001309
1310 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001311 * <p>List of aperture size values for {@link CaptureRequest#LENS_APERTURE android.lens.aperture} that are
1312 * supported by this camera device.</p>
1313 * <p>If the camera device doesn't support a variable lens aperture,
1314 * this list will contain only one value, which is the fixed aperture size.</p>
1315 * <p>If the camera device supports a variable aperture, the aperture values
Zhijun Hefb46c642014-01-14 17:57:23 -08001316 * in this list will be sorted in ascending order.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001317 * <p><b>Units</b>: The aperture f-number</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001318 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001319 * <p><b>Full capability</b> -
1320 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1321 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1322 *
1323 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001324 * @see CaptureRequest#LENS_APERTURE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001325 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001326 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001327 @NonNull
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001328 public static final Key<float[]> LENS_INFO_AVAILABLE_APERTURES =
1329 new Key<float[]>("android.lens.info.availableApertures", float[].class);
1330
1331 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001332 * <p>List of neutral density filter values for
1333 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} that are supported by this camera device.</p>
1334 * <p>If a neutral density filter is not supported by this camera device,
1335 * this list will contain only 0. Otherwise, this list will include every
1336 * filter density supported by the camera device, in ascending order.</p>
1337 * <p><b>Units</b>: Exposure value (EV)</p>
1338 * <p><b>Range of valid values:</b><br></p>
1339 * <p>Values are &gt;= 0</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001340 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001341 * <p><b>Full capability</b> -
1342 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1343 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk855bae42014-01-17 10:30:32 -08001344 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001345 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk855bae42014-01-17 10:30:32 -08001346 * @see CaptureRequest#LENS_FILTER_DENSITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001347 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001348 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001349 @NonNull
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001350 public static final Key<float[]> LENS_INFO_AVAILABLE_FILTER_DENSITIES =
1351 new Key<float[]>("android.lens.info.availableFilterDensities", float[].class);
1352
1353 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001354 * <p>List of focal lengths for {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength} that are supported by this camera
1355 * device.</p>
1356 * <p>If optical zoom is not supported, this list will only contain
1357 * a single value corresponding to the fixed focal length of the
1358 * device. Otherwise, this list will include every focal length supported
1359 * by the camera device, in ascending order.</p>
1360 * <p><b>Units</b>: Millimeters</p>
1361 * <p><b>Range of valid values:</b><br></p>
1362 * <p>Values are &gt; 0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001363 * <p>This key is available on all devices.</p>
Ruben Brunka20f4c22014-01-17 15:21:13 -08001364 *
1365 * @see CaptureRequest#LENS_FOCAL_LENGTH
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001366 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001367 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001368 @NonNull
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001369 public static final Key<float[]> LENS_INFO_AVAILABLE_FOCAL_LENGTHS =
1370 new Key<float[]>("android.lens.info.availableFocalLengths", float[].class);
1371
1372 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001373 * <p>List of optical image stabilization (OIS) modes for
1374 * {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} that are supported by this camera device.</p>
1375 * <p>If OIS is not supported by a given camera device, this list will
Ruben Brunk00849b32014-01-17 18:30:23 -08001376 * contain only OFF.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001377 * <p><b>Range of valid values:</b><br>
1378 * Any value listed in {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001379 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001380 * <p><b>Limited capability</b> -
1381 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1382 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk00849b32014-01-17 18:30:23 -08001383 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001384 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk00849b32014-01-17 18:30:23 -08001385 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001386 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001387 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001388 @NonNull
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07001389 public static final Key<int[]> LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION =
1390 new Key<int[]>("android.lens.info.availableOpticalStabilization", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001391
1392 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001393 * <p>Hyperfocal distance for this lens.</p>
Zhijun Heff413932014-02-07 15:44:30 -08001394 * <p>If the lens is not fixed focus, the camera device will report this
1395 * field when {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} is APPROXIMATE or CALIBRATED.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001396 * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p>
1397 * <p><b>Range of valid values:</b><br>
1398 * If lens is fixed focus, &gt;= 0. If lens has focuser unit, the value is
1399 * within <code>(0.0f, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code></p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001400 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001401 * <p><b>Limited capability</b> -
1402 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1403 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01001404 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001405 *
1406 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1407 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
1408 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
1409 */
1410 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001411 @NonNull
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001412 public static final Key<Float> LENS_INFO_HYPERFOCAL_DISTANCE =
1413 new Key<Float>("android.lens.info.hyperfocalDistance", float.class);
1414
1415 /**
1416 * <p>Shortest distance from frontmost surface
1417 * of the lens that can be brought into sharp focus.</p>
1418 * <p>If the lens is fixed-focus, this will be
1419 * 0.</p>
1420 * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p>
1421 * <p><b>Range of valid values:</b><br>
1422 * &gt;= 0</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001423 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001424 * <p><b>Limited capability</b> -
1425 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1426 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01001427 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Zhijun Heff413932014-02-07 15:44:30 -08001428 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001429 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun Heff413932014-02-07 15:44:30 -08001430 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001431 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001432 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001433 @NonNull
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001434 public static final Key<Float> LENS_INFO_MINIMUM_FOCUS_DISTANCE =
1435 new Key<Float>("android.lens.info.minimumFocusDistance", float.class);
1436
1437 /**
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08001438 * <p>Dimensions of lens shading map.</p>
1439 * <p>The map should be on the order of 30-40 rows and columns, and
1440 * must be smaller than 64x64.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001441 * <p><b>Range of valid values:</b><br>
1442 * Both values &gt;= 1</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001443 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001444 * <p><b>Full capability</b> -
1445 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1446 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1447 *
1448 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk57493682014-05-27 18:58:08 -07001449 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001450 */
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07001451 public static final Key<android.util.Size> LENS_INFO_SHADING_MAP_SIZE =
1452 new Key<android.util.Size>("android.lens.info.shadingMapSize", android.util.Size.class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001453
1454 /**
Zhijun Heff413932014-02-07 15:44:30 -08001455 * <p>The lens focus distance calibration quality.</p>
1456 * <p>The lens focus distance calibration quality determines the reliability of
1457 * focus related metadata entries, i.e. {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
1458 * {@link CaptureResult#LENS_FOCUS_RANGE android.lens.focusRange}, {@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}, and
1459 * {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001460 * <p>APPROXIMATE and CALIBRATED devices report the focus metadata in
1461 * units of diopters (1/meter), so <code>0.0f</code> represents focusing at infinity,
1462 * and increasing positive numbers represent focusing closer and closer
1463 * to the camera device. The focus distance control also uses diopters
1464 * on these devices.</p>
1465 * <p>UNCALIBRATED devices do not use units that are directly comparable
1466 * to any real physical measurement, but <code>0.0f</code> still represents farthest
1467 * focus, and {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} represents the
1468 * nearest focus the device can achieve.</p>
1469 * <p><b>Possible values:</b>
1470 * <ul>
1471 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED UNCALIBRATED}</li>
1472 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE APPROXIMATE}</li>
1473 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED CALIBRATED}</li>
1474 * </ul></p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001475 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001476 * <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>
Zhijun Heff413932014-02-07 15:44:30 -08001479 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001480 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun Heff413932014-02-07 15:44:30 -08001481 * @see CaptureRequest#LENS_FOCUS_DISTANCE
1482 * @see CaptureResult#LENS_FOCUS_RANGE
1483 * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE
1484 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
1485 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED
1486 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE
1487 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED
1488 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001489 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001490 @NonNull
Zhijun Heff413932014-02-07 15:44:30 -08001491 public static final Key<Integer> LENS_INFO_FOCUS_DISTANCE_CALIBRATION =
1492 new Key<Integer>("android.lens.info.focusDistanceCalibration", int.class);
1493
1494 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001495 * <p>Direction the camera faces relative to
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001496 * device screen.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001497 * <p><b>Possible values:</b>
1498 * <ul>
1499 * <li>{@link #LENS_FACING_FRONT FRONT}</li>
1500 * <li>{@link #LENS_FACING_BACK BACK}</li>
Zhijun He503e8152015-01-12 15:16:56 -08001501 * <li>{@link #LENS_FACING_EXTERNAL EXTERNAL}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001502 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001503 * <p>This key is available on all devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001504 * @see #LENS_FACING_FRONT
1505 * @see #LENS_FACING_BACK
Zhijun He503e8152015-01-12 15:16:56 -08001506 * @see #LENS_FACING_EXTERNAL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001507 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001508 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001509 @NonNull
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001510 public static final Key<Integer> LENS_FACING =
1511 new Key<Integer>("android.lens.facing", int.class);
1512
1513 /**
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001514 * <p>The orientation of the camera relative to the sensor
1515 * coordinate system.</p>
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07001516 * <p>The four coefficients that describe the quaternion
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001517 * rotation from the Android sensor coordinate system to a
1518 * camera-aligned coordinate system where the X-axis is
1519 * aligned with the long side of the image sensor, the Y-axis
1520 * is aligned with the short side of the image sensor, and
1521 * the Z-axis is aligned with the optical axis of the sensor.</p>
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07001522 * <p>To convert from the quaternion coefficients <code>(x,y,z,w)</code>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001523 * to the axis of rotation <code>(a_x, a_y, a_z)</code> and rotation
1524 * amount <code>theta</code>, the following formulas can be used:</p>
1525 * <pre><code> theta = 2 * acos(w)
1526 * a_x = x / sin(theta/2)
1527 * a_y = y / sin(theta/2)
1528 * a_z = z / sin(theta/2)
1529 * </code></pre>
1530 * <p>To create a 3x3 rotation matrix that applies the rotation
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07001531 * defined by this quaternion, the following matrix can be
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001532 * used:</p>
1533 * <pre><code>R = [ 1 - 2y^2 - 2z^2, 2xy - 2zw, 2xz + 2yw,
1534 * 2xy + 2zw, 1 - 2x^2 - 2z^2, 2yz - 2xw,
1535 * 2xz - 2yw, 2yz + 2xw, 1 - 2x^2 - 2y^2 ]
1536 * </code></pre>
1537 * <p>This matrix can then be used to apply the rotation to a
1538 * column vector point with</p>
1539 * <p><code>p' = Rp</code></p>
1540 * <p>where <code>p</code> is in the device sensor coordinate system, and
1541 * <code>p'</code> is in the camera-oriented coordinate system.</p>
1542 * <p><b>Units</b>:
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07001543 * Quaternion coefficients</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001544 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01001545 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001546 */
1547 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001548 @NonNull
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001549 public static final Key<float[]> LENS_POSE_ROTATION =
1550 new Key<float[]>("android.lens.poseRotation", float[].class);
1551
1552 /**
1553 * <p>Position of the camera optical center.</p>
Eino-Ville Talvalad3dbfb32015-05-29 17:17:04 -07001554 * <p>The position of the camera device's lens optical center,
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001555 * as a three-dimensional vector <code>(x,y,z)</code>.</p>
1556 * <p>Prior to Android P, or when {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is PRIMARY_CAMERA, this position
1557 * is relative to the optical center of the largest camera device facing in the same
1558 * direction as this camera, in the {@link android.hardware.SensorEvent Android sensor
1559 * coordinate axes}. Note that only the axis definitions are shared with the sensor
1560 * coordinate system, but not the origin.</p>
1561 * <p>If this device is the largest or only camera device with a given facing, then this
1562 * position will be <code>(0, 0, 0)</code>; a camera device with a lens optical center located 3 cm
1563 * from the main sensor along the +X axis (to the right from the user's perspective) will
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07001564 * report <code>(0.03, 0, 0)</code>. Note that this means that, for many computer vision
1565 * applications, the position needs to be negated to convert it to a translation from the
1566 * camera to the origin.</p>
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001567 * <p>To transform a pixel coordinates between two cameras facing the same direction, first
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001568 * the source camera {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} must be corrected for. Then the source
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001569 * camera {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} needs to be applied, followed by the
1570 * {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the source camera, the translation of the source camera
1571 * relative to the destination camera, the {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the destination
1572 * camera, and finally the inverse of {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} of the destination
1573 * camera. This obtains a radial-distortion-free coordinate in the destination camera pixel
1574 * coordinates.</p>
1575 * <p>To compare this against a real image from the destination camera, the destination camera
1576 * image then needs to be corrected for radial distortion before comparison or sampling.</p>
1577 * <p>When {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is GYROSCOPE, then this position is relative to
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07001578 * the center of the primary gyroscope on the device. The axis definitions are the same as
1579 * with PRIMARY_CAMERA.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001580 * <p><b>Units</b>: Meters</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001581 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01001582 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001583 *
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001584 * @see CameraCharacteristics#LENS_DISTORTION
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07001585 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001586 * @see CameraCharacteristics#LENS_POSE_REFERENCE
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001587 * @see CameraCharacteristics#LENS_POSE_ROTATION
1588 */
1589 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001590 @NonNull
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001591 public static final Key<float[]> LENS_POSE_TRANSLATION =
1592 new Key<float[]>("android.lens.poseTranslation", float[].class);
1593
1594 /**
1595 * <p>The parameters for this camera device's intrinsic
1596 * calibration.</p>
1597 * <p>The five calibration parameters that describe the
1598 * transform from camera-centric 3D coordinates to sensor
1599 * pixel coordinates:</p>
1600 * <pre><code>[f_x, f_y, c_x, c_y, s]
1601 * </code></pre>
1602 * <p>Where <code>f_x</code> and <code>f_y</code> are the horizontal and vertical
1603 * focal lengths, <code>[c_x, c_y]</code> is the position of the optical
1604 * axis, and <code>s</code> is a skew parameter for the sensor plane not
1605 * being aligned with the lens plane.</p>
1606 * <p>These are typically used within a transformation matrix K:</p>
1607 * <pre><code>K = [ f_x, s, c_x,
1608 * 0, f_y, c_y,
1609 * 0 0, 1 ]
1610 * </code></pre>
1611 * <p>which can then be combined with the camera pose rotation
1612 * <code>R</code> and translation <code>t</code> ({@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} and
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07001613 * {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}, respectively) to calculate the
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001614 * complete transform from world coordinates to pixel
1615 * coordinates:</p>
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07001616 * <pre><code>P = [ K 0 * [ R -Rt
1617 * 0 1 ] 0 1 ]
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001618 * </code></pre>
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07001619 * <p>(Note the negation of poseTranslation when mapping from camera
1620 * to world coordinates, and multiplication by the rotation).</p>
1621 * <p>With <code>p_w</code> being a point in the world coordinate system
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001622 * and <code>p_s</code> being a point in the camera active pixel array
1623 * coordinate system, and with the mapping including the
1624 * homogeneous division by z:</p>
1625 * <pre><code> p_h = (x_h, y_h, z_h) = P p_w
1626 * p_s = p_h / z_h
1627 * </code></pre>
1628 * <p>so <code>[x_s, y_s]</code> is the pixel coordinates of the world
1629 * point, <code>z_s = 1</code>, and <code>w_s</code> is a measurement of disparity
1630 * (depth) in pixel coordinates.</p>
Eino-Ville Talvalab8bd8ab2015-06-16 11:44:10 -07001631 * <p>Note that the coordinate system for this transform is the
1632 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} system,
1633 * where <code>(0,0)</code> is the top-left of the
1634 * preCorrectionActiveArraySize rectangle. Once the pose and
1635 * intrinsic calibration transforms have been applied to a
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001636 * world point, then the {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}
Eino-Ville Talvalab8bd8ab2015-06-16 11:44:10 -07001637 * transform needs to be applied, and the result adjusted to
1638 * be in the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} coordinate
1639 * system (where <code>(0, 0)</code> is the top-left of the
1640 * activeArraySize rectangle), to determine the final pixel
1641 * coordinate of the world point for processed (non-RAW)
1642 * output buffers.</p>
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07001643 * <p>For camera devices, the center of pixel <code>(x,y)</code> is located at
1644 * coordinate <code>(x + 0.5, y + 0.5)</code>. So on a device with a
1645 * precorrection active array of size <code>(10,10)</code>, the valid pixel
1646 * indices go from <code>(0,0)-(9,9)</code>, and an perfectly-built camera would
1647 * have an optical center at the exact center of the pixel grid, at
1648 * coordinates <code>(5.0, 5.0)</code>, which is the top-left corner of pixel
1649 * <code>(5,5)</code>.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001650 * <p><b>Units</b>:
Eino-Ville Talvalab8bd8ab2015-06-16 11:44:10 -07001651 * Pixels in the
1652 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}
1653 * coordinate system.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001654 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01001655 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001656 *
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001657 * @see CameraCharacteristics#LENS_DISTORTION
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001658 * @see CameraCharacteristics#LENS_POSE_ROTATION
1659 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -07001660 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Eino-Ville Talvalab8bd8ab2015-06-16 11:44:10 -07001661 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001662 */
1663 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001664 @NonNull
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001665 public static final Key<float[]> LENS_INTRINSIC_CALIBRATION =
1666 new Key<float[]>("android.lens.intrinsicCalibration", float[].class);
1667
1668 /**
1669 * <p>The correction coefficients to correct for this camera device's
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07001670 * radial and tangential lens distortion.</p>
Ruben Brunk02cd8cb2015-06-15 15:33:09 -07001671 * <p>Four radial distortion coefficients <code>[kappa_0, kappa_1, kappa_2,
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07001672 * kappa_3]</code> and two tangential distortion coefficients
1673 * <code>[kappa_4, kappa_5]</code> that can be used to correct the
1674 * lens's geometric distortion with the mapping equations:</p>
Ruben Brunk02cd8cb2015-06-15 15:33:09 -07001675 * <pre><code> x_c = x_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07001676 * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
Ruben Brunk02cd8cb2015-06-15 15:33:09 -07001677 * y_c = y_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07001678 * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001679 * </code></pre>
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07001680 * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the
1681 * input image that correspond to the pixel values in the
1682 * corrected image at the coordinate <code>[x_i, y_i]</code>:</p>
1683 * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
1684 * </code></pre>
1685 * <p>The pixel coordinates are defined in a normalized
1686 * coordinate system related to the
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07001687 * {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} calibration fields.
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07001688 * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code> have <code>(0,0)</code> at the
1689 * lens optical center <code>[c_x, c_y]</code>. The maximum magnitudes
1690 * of both x and y coordinates are normalized to be 1 at the
1691 * edge further from the optical center, so the range
1692 * for both dimensions is <code>-1 &lt;= x &lt;= 1</code>.</p>
1693 * <p>Finally, <code>r</code> represents the radial distance from the
1694 * optical center, <code>r^2 = x_i^2 + y_i^2</code>, and its magnitude
1695 * is therefore no larger than <code>|r| &lt;= sqrt(2)</code>.</p>
1696 * <p>The distortion model used is the Brown-Conrady model.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001697 * <p><b>Units</b>:
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07001698 * Unitless coefficients.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001699 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01001700 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07001701 *
1702 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001703 * @deprecated
1704 * <p>This field was inconsistently defined in terms of its
1705 * normalization. Use {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} instead.</p>
1706 *
1707 * @see CameraCharacteristics#LENS_DISTORTION
1708
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001709 */
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001710 @Deprecated
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001711 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001712 @NonNull
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001713 public static final Key<float[]> LENS_RADIAL_DISTORTION =
1714 new Key<float[]>("android.lens.radialDistortion", float[].class);
1715
1716 /**
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001717 * <p>The origin for {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}.</p>
1718 * <p>Different calibration methods and use cases can produce better or worse results
1719 * depending on the selected coordinate origin.</p>
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001720 * <p><b>Possible values:</b>
1721 * <ul>
1722 * <li>{@link #LENS_POSE_REFERENCE_PRIMARY_CAMERA PRIMARY_CAMERA}</li>
1723 * <li>{@link #LENS_POSE_REFERENCE_GYROSCOPE GYROSCOPE}</li>
1724 * </ul></p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001725 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01001726 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001727 *
1728 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
1729 * @see #LENS_POSE_REFERENCE_PRIMARY_CAMERA
1730 * @see #LENS_POSE_REFERENCE_GYROSCOPE
1731 */
1732 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001733 @NonNull
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001734 public static final Key<Integer> LENS_POSE_REFERENCE =
1735 new Key<Integer>("android.lens.poseReference", int.class);
1736
1737 /**
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001738 * <p>The correction coefficients to correct for this camera device's
1739 * radial and tangential lens distortion.</p>
1740 * <p>Replaces the deprecated {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion} field, which was
1741 * inconsistently defined.</p>
1742 * <p>Three radial distortion coefficients <code>[kappa_1, kappa_2,
1743 * kappa_3]</code> and two tangential distortion coefficients
1744 * <code>[kappa_4, kappa_5]</code> that can be used to correct the
1745 * lens's geometric distortion with the mapping equations:</p>
1746 * <pre><code> x_c = x_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
1747 * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
1748 * y_c = y_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
1749 * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
1750 * </code></pre>
1751 * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the
1752 * input image that correspond to the pixel values in the
1753 * corrected image at the coordinate <code>[x_i, y_i]</code>:</p>
1754 * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
1755 * </code></pre>
1756 * <p>The pixel coordinates are defined in a coordinate system
1757 * related to the {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}
1758 * calibration fields; see that entry for details of the mapping stages.
1759 * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code>
1760 * have <code>(0,0)</code> at the lens optical center <code>[c_x, c_y]</code>, and
1761 * the range of the coordinates depends on the focal length
1762 * terms of the intrinsic calibration.</p>
1763 * <p>Finally, <code>r</code> represents the radial distance from the
1764 * optical center, <code>r^2 = x_i^2 + y_i^2</code>.</p>
1765 * <p>The distortion model used is the Brown-Conrady model.</p>
1766 * <p><b>Units</b>:
1767 * Unitless coefficients.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001768 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01001769 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001770 *
1771 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
1772 * @see CameraCharacteristics#LENS_RADIAL_DISTORTION
1773 */
1774 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001775 @NonNull
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001776 public static final Key<float[]> LENS_DISTORTION =
1777 new Key<float[]>("android.lens.distortion", float[].class);
1778
1779 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001780 * <p>List of noise reduction modes for {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode} that are supported
1781 * by this camera device.</p>
1782 * <p>Full-capability camera devices will always support OFF and FAST.</p>
Chien-Yu Chen72333912015-07-08 11:55:19 -07001783 * <p>Camera devices that support YUV_REPROCESSING or PRIVATE_REPROCESSING will support
1784 * ZERO_SHUTTER_LAG.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001785 * <p>Legacy-capability camera devices will only support FAST mode.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001786 * <p><b>Range of valid values:</b><br>
1787 * Any value listed in {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001788 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001789 * <p><b>Limited capability</b> -
1790 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1791 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001792 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001793 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001794 * @see CaptureRequest#NOISE_REDUCTION_MODE
1795 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001796 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001797 @NonNull
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07001798 public static final Key<int[]> NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES =
1799 new Key<int[]>("android.noiseReduction.availableNoiseReductionModes", int[].class);
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001800
1801 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001802 * <p>If set to 1, the HAL will always split result
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001803 * metadata for a single capture into multiple buffers,
Igor Murashkinace5bf02013-12-10 17:36:40 -08001804 * returned using multiple process_capture_result calls.</p>
1805 * <p>Does not need to be listed in static
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001806 * metadata. Support for partial results will be reworked in
1807 * future versions of camera service. This quirk will stop
1808 * working at that point; DO NOT USE without careful
Igor Murashkinace5bf02013-12-10 17:36:40 -08001809 * consideration of future support.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001810 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07001811 * @deprecated
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001812 * <p>Not used in HALv3 or newer; replaced by better partials mechanism</p>
1813
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001814 * @hide
1815 */
Igor Murashkin9c595172014-05-12 13:56:20 -07001816 @Deprecated
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001817 public static final Key<Byte> QUIRKS_USE_PARTIAL_RESULT =
1818 new Key<Byte>("android.quirks.usePartialResult", byte.class);
1819
1820 /**
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001821 * <p>The maximum numbers of different types of output streams
1822 * that can be configured and used simultaneously by a camera device.</p>
1823 * <p>This is a 3 element tuple that contains the max number of output simultaneous
Zhijun Hea4d0a8f2014-04-29 12:35:27 -07001824 * streams for raw sensor, processed (but not stalling), and processed (and stalling)
1825 * formats respectively. For example, assuming that JPEG is typically a processed and
1826 * stalling stream, if max raw sensor format output stream number is 1, max YUV streams
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001827 * number is 3, and max JPEG stream number is 2, then this tuple should be <code>(1, 3, 2)</code>.</p>
1828 * <p>This lists the upper bound of the number of output streams supported by
1829 * the camera device. Using more streams simultaneously may require more hardware and
Igor Murashkin78712a82014-05-27 18:32:18 -07001830 * CPU resources that will consume more power. The image format for an output stream can
Igor Murashkin9c595172014-05-12 13:56:20 -07001831 * be any supported format provided by android.scaler.availableStreamConfigurations.
1832 * The formats defined in android.scaler.availableStreamConfigurations can be catergorized
Zhijun Hea4d0a8f2014-04-29 12:35:27 -07001833 * into the 3 stream types as below:</p>
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001834 * <ul>
Zhijun Hea4d0a8f2014-04-29 12:35:27 -07001835 * <li>Processed (but stalling): any non-RAW format with a stallDurations &gt; 0.
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07001836 * Typically {@link android.graphics.ImageFormat#JPEG JPEG format}.</li>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08001837 * <li>Raw formats: {@link android.graphics.ImageFormat#RAW_SENSOR RAW_SENSOR}, {@link android.graphics.ImageFormat#RAW10 RAW10}, or
1838 * {@link android.graphics.ImageFormat#RAW12 RAW12}.</li>
1839 * <li>Processed (but not-stalling): any non-RAW format without a stall duration. Typically
1840 * {@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888},
Shuzhen Wangec5e8d22018-09-28 09:28:48 -07001841 * {@link android.graphics.ImageFormat#NV21 NV21}, {@link android.graphics.ImageFormat#YV12 YV12}, or {@link android.graphics.ImageFormat#Y8 Y8} .</li>
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001842 * </ul>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001843 * <p><b>Range of valid values:</b><br></p>
1844 * <p>For processed (and stalling) format streams, &gt;= 1.</p>
1845 * <p>For Raw format (either stalling or non-stalling) streams, &gt;= 0.</p>
1846 * <p>For processed (but not stalling) format streams, &gt;= 3
1847 * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>);
1848 * &gt;= 2 for LIMITED mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == LIMITED</code>).</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001849 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001850 *
1851 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkin78712a82014-05-27 18:32:18 -07001852 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001853 */
1854 public static final Key<int[]> REQUEST_MAX_NUM_OUTPUT_STREAMS =
1855 new Key<int[]>("android.request.maxNumOutputStreams", int[].class);
1856
1857 /**
Igor Murashkin78712a82014-05-27 18:32:18 -07001858 * <p>The maximum numbers of different types of output streams
1859 * that can be configured and used simultaneously by a camera device
1860 * for any <code>RAW</code> formats.</p>
1861 * <p>This value contains the max number of output simultaneous
1862 * streams from the raw sensor.</p>
1863 * <p>This lists the upper bound of the number of output streams supported by
1864 * the camera device. Using more streams simultaneously may require more hardware and
1865 * CPU resources that will consume more power. The image format for this kind of an output stream can
1866 * be any <code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p>
1867 * <p>In particular, a <code>RAW</code> format is typically one of:</p>
1868 * <ul>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07001869 * <li>{@link android.graphics.ImageFormat#RAW_SENSOR RAW_SENSOR}</li>
1870 * <li>{@link android.graphics.ImageFormat#RAW10 RAW10}</li>
1871 * <li>{@link android.graphics.ImageFormat#RAW12 RAW12}</li>
Igor Murashkin78712a82014-05-27 18:32:18 -07001872 * </ul>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001873 * <p>LEGACY mode devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> LEGACY)
1874 * never support raw streams.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001875 * <p><b>Range of valid values:</b><br></p>
1876 * <p>&gt;= 0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001877 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -07001878 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001879 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkin78712a82014-05-27 18:32:18 -07001880 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
1881 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001882 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001883 @NonNull
Igor Murashkin6c76f582014-07-15 17:19:49 -07001884 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -07001885 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_RAW =
1886 new Key<Integer>("android.request.maxNumOutputRaw", int.class);
1887
1888 /**
1889 * <p>The maximum numbers of different types of output streams
1890 * that can be configured and used simultaneously by a camera device
1891 * for any processed (but not-stalling) formats.</p>
1892 * <p>This value contains the max number of output simultaneous
1893 * streams for any processed (but not-stalling) formats.</p>
1894 * <p>This lists the upper bound of the number of output streams supported by
1895 * the camera device. Using more streams simultaneously may require more hardware and
1896 * CPU resources that will consume more power. The image format for this kind of an output stream can
1897 * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p>
1898 * <p>Processed (but not-stalling) is defined as any non-RAW format without a stall duration.
1899 * Typically:</p>
1900 * <ul>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07001901 * <li>{@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888}</li>
1902 * <li>{@link android.graphics.ImageFormat#NV21 NV21}</li>
1903 * <li>{@link android.graphics.ImageFormat#YV12 YV12}</li>
1904 * <li>Implementation-defined formats, i.e. {@link android.hardware.camera2.params.StreamConfigurationMap#isOutputSupportedFor(Class) }</li>
Shuzhen Wangec5e8d22018-09-28 09:28:48 -07001905 * <li>{@link android.graphics.ImageFormat#Y8 Y8}</li>
Igor Murashkin78712a82014-05-27 18:32:18 -07001906 * </ul>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07001907 * <p>For full guarantees, query {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } with a
1908 * processed format -- it will return 0 for a non-stalling stream.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001909 * <p>LEGACY devices will support at least 2 processing/non-stalling streams.</p>
1910 * <p><b>Range of valid values:</b><br></p>
1911 * <p>&gt;= 3
1912 * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>);
1913 * &gt;= 2 for LIMITED mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == LIMITED</code>).</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001914 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -07001915 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001916 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkin78712a82014-05-27 18:32:18 -07001917 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
1918 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001919 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001920 @NonNull
Igor Murashkin6c76f582014-07-15 17:19:49 -07001921 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -07001922 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC =
1923 new Key<Integer>("android.request.maxNumOutputProc", int.class);
1924
1925 /**
1926 * <p>The maximum numbers of different types of output streams
1927 * that can be configured and used simultaneously by a camera device
1928 * for any processed (and stalling) formats.</p>
1929 * <p>This value contains the max number of output simultaneous
1930 * streams for any processed (but not-stalling) formats.</p>
1931 * <p>This lists the upper bound of the number of output streams supported by
1932 * the camera device. Using more streams simultaneously may require more hardware and
1933 * CPU resources that will consume more power. The image format for this kind of an output stream can
1934 * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07001935 * <p>A processed and stalling format is defined as any non-RAW format with a stallDurations
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08001936 * &gt; 0. Typically only the {@link android.graphics.ImageFormat#JPEG JPEG format} is a stalling format.</p>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07001937 * <p>For full guarantees, query {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } with a
1938 * processed format -- it will return a non-0 value for a stalling stream.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001939 * <p>LEGACY devices will support up to 1 processing/stalling stream.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001940 * <p><b>Range of valid values:</b><br></p>
1941 * <p>&gt;= 1</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001942 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -07001943 *
1944 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
1945 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001946 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001947 @NonNull
Igor Murashkin6c76f582014-07-15 17:19:49 -07001948 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -07001949 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC_STALLING =
1950 new Key<Integer>("android.request.maxNumOutputProcStalling", int.class);
1951
1952 /**
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001953 * <p>The maximum numbers of any type of input streams
1954 * that can be configured and used simultaneously by a camera device.</p>
1955 * <p>When set to 0, it means no input stream is supported.</p>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07001956 * <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
1957 * input stream, there must be at least one output stream configured to to receive the
1958 * reprocessed images.</p>
Zhijun He0e99c222015-01-29 15:26:05 -08001959 * <p>When an input stream and some output streams are used in a reprocessing request,
1960 * only the input buffer will be used to produce these output stream buffers, and a
1961 * new sensor image will not be captured.</p>
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001962 * <p>For example, for Zero Shutter Lag (ZSL) still capture use case, the input
Chien-Yu Chen8062d312015-05-12 14:24:10 -07001963 * stream image format will be PRIVATE, the associated output stream image format
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001964 * should be JPEG.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001965 * <p><b>Range of valid values:</b><br></p>
1966 * <p>0 or 1.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001967 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001968 * <p><b>Full capability</b> -
1969 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1970 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1971 *
1972 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001973 */
Zhijun He0e99c222015-01-29 15:26:05 -08001974 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08001975 @NonNull
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001976 public static final Key<Integer> REQUEST_MAX_NUM_INPUT_STREAMS =
1977 new Key<Integer>("android.request.maxNumInputStreams", int.class);
1978
1979 /**
Igor Murashkinc127f052014-01-17 18:06:02 -08001980 * <p>Specifies the number of maximum pipeline stages a frame
1981 * has to go through from when it's exposed to when it's available
1982 * to the framework.</p>
1983 * <p>A typical minimum value for this is 2 (one stage to expose,
1984 * one stage to readout) from the sensor. The ISP then usually adds
1985 * its own stages to do custom HW processing. Further stages may be
1986 * added by SW processing.</p>
1987 * <p>Depending on what settings are used (e.g. YUV, JPEG) and what
1988 * processing is enabled (e.g. face detection), the actual pipeline
1989 * depth (specified by {@link CaptureResult#REQUEST_PIPELINE_DEPTH android.request.pipelineDepth}) may be less than
1990 * the max pipeline depth.</p>
1991 * <p>A pipeline depth of X stages is equivalent to a pipeline latency of
1992 * X frame intervals.</p>
Zhijun Hefab663e2015-05-26 19:46:31 -07001993 * <p>This value will normally be 8 or less, however, for high speed capture session,
1994 * the max pipeline depth will be up to 8 x size of high speed capture request list.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001995 * <p>This key is available on all devices.</p>
Igor Murashkinc127f052014-01-17 18:06:02 -08001996 *
1997 * @see CaptureResult#REQUEST_PIPELINE_DEPTH
1998 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001999 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002000 @NonNull
Igor Murashkinc127f052014-01-17 18:06:02 -08002001 public static final Key<Byte> REQUEST_PIPELINE_MAX_DEPTH =
2002 new Key<Byte>("android.request.pipelineMaxDepth", byte.class);
2003
2004 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002005 * <p>Defines how many sub-components
Igor Murashkin2086b582014-01-17 18:30:59 -08002006 * a result will be composed of.</p>
2007 * <p>In order to combat the pipeline latency, partial results
2008 * may be delivered to the application layer from the camera device as
2009 * soon as they are available.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002010 * <p>Optional; defaults to 1. A value of 1 means that partial
2011 * results are not supported, and only the final TotalCaptureResult will
2012 * be produced by the camera device.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002013 * <p>A typical use case for this might be: after requesting an
2014 * auto-focus (AF) lock the new AF state might be available 50%
2015 * of the way through the pipeline. The camera device could
2016 * then immediately dispatch this state via a partial result to
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002017 * the application, and the rest of the metadata via later
2018 * partial results.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002019 * <p><b>Range of valid values:</b><br>
2020 * &gt;= 1</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002021 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin2086b582014-01-17 18:30:59 -08002022 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002023 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002024 @NonNull
Igor Murashkin2086b582014-01-17 18:30:59 -08002025 public static final Key<Integer> REQUEST_PARTIAL_RESULT_COUNT =
2026 new Key<Integer>("android.request.partialResultCount", int.class);
2027
2028 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002029 * <p>List of capabilities that this camera device
Igor Murashkine46c0da2014-02-07 18:34:37 -08002030 * advertises as fully supporting.</p>
2031 * <p>A capability is a contract that the camera device makes in order
2032 * to be able to satisfy one or more use cases.</p>
2033 * <p>Listing a capability guarantees that the whole set of features
2034 * required to support a common use will all be available.</p>
2035 * <p>Using a subset of the functionality provided by an unsupported
2036 * capability may be possible on a specific camera device implementation;
2037 * to do this query each of android.request.availableRequestKeys,
2038 * android.request.availableResultKeys,
2039 * android.request.availableCharacteristicsKeys.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08002040 * <p>The following capabilities are guaranteed to be available on
2041 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL devices:</p>
2042 * <ul>
2043 * <li>MANUAL_SENSOR</li>
Zhijun Hedf9b7472014-06-04 13:42:41 -07002044 * <li>MANUAL_POST_PROCESSING</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -08002045 * </ul>
2046 * <p>Other capabilities may be available on either FULL or LIMITED
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002047 * devices, but the application should query this key to be sure.</p>
2048 * <p><b>Possible values:</b>
2049 * <ul>
2050 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE BACKWARD_COMPATIBLE}</li>
2051 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR MANUAL_SENSOR}</li>
2052 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING MANUAL_POST_PROCESSING}</li>
2053 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_RAW RAW}</li>
Chien-Yu Chen8062d312015-05-12 14:24:10 -07002054 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING PRIVATE_REPROCESSING}</li>
Ruben Brunk0c22e692014-11-11 12:00:34 -08002055 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS READ_SENSOR_SETTINGS}</li>
Eino-Ville Talvala126a7462014-11-04 16:31:01 -08002056 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE BURST_CAPTURE}</li>
Zhijun He0e99c222015-01-29 15:26:05 -08002057 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING YUV_REPROCESSING}</li>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -07002058 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT DEPTH_OUTPUT}</li>
Zhijun Hefab663e2015-05-26 19:46:31 -07002059 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO CONSTRAINED_HIGH_SPEED_VIDEO}</li>
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08002060 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING MOTION_TRACKING}</li>
Shuzhen Wang23d29382017-11-26 17:24:56 -08002061 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA LOGICAL_MULTI_CAMERA}</li>
Shuzhen Wang51248bf2018-03-22 00:04:45 -07002062 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME MONOCHROME}</li>
Jayant Chowdharyd88b4832019-01-24 18:11:09 -08002063 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA SECURE_IMAGE_DATA}</li>
Jayant Chowdhary393ad6e2019-07-17 09:28:50 -07002064 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_SYSTEM_CAMERA SYSTEM_CAMERA}</li>
Yin-Chia Yeh440ee262019-10-07 15:14:51 -07002065 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_OFFLINE_PROCESSING OFFLINE_PROCESSING}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002066 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002067 * <p>This key is available on all devices.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08002068 *
2069 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -07002070 * @see #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE
Igor Murashkine46c0da2014-02-07 18:34:37 -08002071 * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR
Zhijun He50f72432014-05-28 13:52:04 -07002072 * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING
Eino-Ville Talvala611fece2014-07-10 17:29:38 -07002073 * @see #REQUEST_AVAILABLE_CAPABILITIES_RAW
Chien-Yu Chen8062d312015-05-12 14:24:10 -07002074 * @see #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING
Ruben Brunk0c22e692014-11-11 12:00:34 -08002075 * @see #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS
Eino-Ville Talvala126a7462014-11-04 16:31:01 -08002076 * @see #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE
Zhijun He0e99c222015-01-29 15:26:05 -08002077 * @see #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -07002078 * @see #REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT
Zhijun Hefab663e2015-05-26 19:46:31 -07002079 * @see #REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08002080 * @see #REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING
Shuzhen Wang23d29382017-11-26 17:24:56 -08002081 * @see #REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA
Shuzhen Wang51248bf2018-03-22 00:04:45 -07002082 * @see #REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME
Jayant Chowdharyd88b4832019-01-24 18:11:09 -08002083 * @see #REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA
Jayant Chowdhary393ad6e2019-07-17 09:28:50 -07002084 * @see #REQUEST_AVAILABLE_CAPABILITIES_SYSTEM_CAMERA
Yin-Chia Yeh440ee262019-10-07 15:14:51 -07002085 * @see #REQUEST_AVAILABLE_CAPABILITIES_OFFLINE_PROCESSING
Igor Murashkine46c0da2014-02-07 18:34:37 -08002086 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002087 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002088 @NonNull
Zhijun He421ddbe2014-05-29 13:41:49 -07002089 public static final Key<int[]> REQUEST_AVAILABLE_CAPABILITIES =
2090 new Key<int[]>("android.request.availableCapabilities", int[].class);
Igor Murashkine46c0da2014-02-07 18:34:37 -08002091
2092 /**
2093 * <p>A list of all keys that the camera device has available
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002094 * to use with {@link android.hardware.camera2.CaptureRequest }.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08002095 * <p>Attempting to set a key into a CaptureRequest that is not
2096 * listed here will result in an invalid request and will be rejected
2097 * by the camera device.</p>
2098 * <p>This field can be used to query the feature set of a camera device
2099 * at a more granular level than capabilities. This is especially
2100 * important for optional keys that are not listed under any capability
2101 * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002102 * <p>This key is available on all devices.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08002103 *
2104 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2105 * @hide
2106 */
2107 public static final Key<int[]> REQUEST_AVAILABLE_REQUEST_KEYS =
2108 new Key<int[]>("android.request.availableRequestKeys", int[].class);
2109
2110 /**
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08002111 * <p>A list of all keys that the camera device has available to use with {@link android.hardware.camera2.CaptureResult }.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08002112 * <p>Attempting to get a key from a CaptureResult that is not
2113 * listed here will always return a <code>null</code> value. Getting a key from
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002114 * a CaptureResult that is listed here will generally never return a <code>null</code>
Igor Murashkine46c0da2014-02-07 18:34:37 -08002115 * value.</p>
2116 * <p>The following keys may return <code>null</code> unless they are enabled:</p>
2117 * <ul>
Ruben Brunk57493682014-05-27 18:58:08 -07002118 * <li>android.statistics.lensShadingMap (non-null iff {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON)</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -08002119 * </ul>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002120 * <p>(Those sometimes-null keys will nevertheless be listed here
Igor Murashkine46c0da2014-02-07 18:34:37 -08002121 * if they are available.)</p>
2122 * <p>This field can be used to query the feature set of a camera device
2123 * at a more granular level than capabilities. This is especially
2124 * important for optional keys that are not listed under any capability
2125 * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002126 * <p>This key is available on all devices.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08002127 *
2128 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Igor Murashkine46c0da2014-02-07 18:34:37 -08002129 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
2130 * @hide
2131 */
2132 public static final Key<int[]> REQUEST_AVAILABLE_RESULT_KEYS =
2133 new Key<int[]>("android.request.availableResultKeys", int[].class);
2134
2135 /**
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08002136 * <p>A list of all keys that the camera device has available to use with {@link android.hardware.camera2.CameraCharacteristics }.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08002137 * <p>This entry follows the same rules as
2138 * android.request.availableResultKeys (except that it applies for
2139 * CameraCharacteristics instead of CaptureResult). See above for more
2140 * details.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002141 * <p>This key is available on all devices.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08002142 * @hide
2143 */
2144 public static final Key<int[]> REQUEST_AVAILABLE_CHARACTERISTICS_KEYS =
2145 new Key<int[]>("android.request.availableCharacteristicsKeys", int[].class);
2146
2147 /**
Emilian Peev75a55702017-11-07 16:09:59 +00002148 * <p>A subset of the available request keys that the camera device
2149 * can pass as part of the capture session initialization.</p>
2150 * <p>This is a subset of android.request.availableRequestKeys which
2151 * contains a list of keys that are difficult to apply per-frame and
2152 * can result in unexpected delays when modified during the capture session
2153 * lifetime. Typical examples include parameters that require a
2154 * time-consuming hardware re-configuration or internal camera pipeline
2155 * change. For performance reasons we advise clients to pass their initial
Chien-Yu Chena1d1d5b2018-01-03 12:14:53 -08002156 * values as part of
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08002157 * {@link SessionConfiguration#setSessionParameters }.
Chien-Yu Chena1d1d5b2018-01-03 12:14:53 -08002158 * Once the camera capture session is enabled it is also recommended to avoid
Emilian Peev75a55702017-11-07 16:09:59 +00002159 * changing them from their initial values set in
2160 * {@link SessionConfiguration#setSessionParameters }.
2161 * Control over session parameters can still be exerted in capture requests
2162 * but clients should be aware and expect delays during their application.
2163 * An example usage scenario could look like this:</p>
2164 * <ul>
2165 * <li>The camera client starts by quering the session parameter key list via
2166 * {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys }.</li>
2167 * <li>Before triggering the capture session create sequence, a capture request
Chien-Yu Chena1d1d5b2018-01-03 12:14:53 -08002168 * must be built via
2169 * {@link CameraDevice#createCaptureRequest }
2170 * using an appropriate template matching the particular use case.</li>
Emilian Peev75a55702017-11-07 16:09:59 +00002171 * <li>The client should go over the list of session parameters and check
2172 * whether some of the keys listed matches with the parameters that
2173 * they intend to modify as part of the first capture request.</li>
2174 * <li>If there is no such match, the capture request can be passed
Chien-Yu Chena1d1d5b2018-01-03 12:14:53 -08002175 * unmodified to
2176 * {@link SessionConfiguration#setSessionParameters }.</li>
Emilian Peev75a55702017-11-07 16:09:59 +00002177 * <li>If matches do exist, the client should update the respective values
Chien-Yu Chena1d1d5b2018-01-03 12:14:53 -08002178 * and pass the request to
2179 * {@link SessionConfiguration#setSessionParameters }.</li>
Emilian Peev75a55702017-11-07 16:09:59 +00002180 * <li>After the capture session initialization completes the session parameter
2181 * key list can continue to serve as reference when posting or updating
2182 * further requests. As mentioned above further changes to session
2183 * parameters should ideally be avoided, if updates are necessary
2184 * however clients could expect a delay/glitch during the
2185 * parameter switch.</li>
2186 * </ul>
2187 * <p>This key is available on all devices.</p>
2188 * @hide
2189 */
2190 public static final Key<int[]> REQUEST_AVAILABLE_SESSION_KEYS =
2191 new Key<int[]>("android.request.availableSessionKeys", int[].class);
2192
2193 /**
koprivadebd4ee2018-09-13 10:59:46 -07002194 * <p>A subset of the available request keys that can be overridden for
Emilian Peev2100ae72018-01-12 16:56:25 +00002195 * physical devices backing a logical multi-camera.</p>
2196 * <p>This is a subset of android.request.availableRequestKeys which contains a list
koprivadebd4ee2018-09-13 10:59:46 -07002197 * of keys that can be overridden using {@link CaptureRequest.Builder#setPhysicalCameraKey }.
Emilian Peev2100ae72018-01-12 16:56:25 +00002198 * The respective value of such request key can be obtained by calling
2199 * {@link CaptureRequest.Builder#getPhysicalCameraKey }. Capture requests that contain
2200 * individual physical device requests must be built via
Emilian Peevf60f4fb2018-02-08 17:40:48 +00002201 * {@link android.hardware.camera2.CameraDevice#createCaptureRequest(int, Set)}.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002202 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Emilian Peev2100ae72018-01-12 16:56:25 +00002203 * <p><b>Limited capability</b> -
2204 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
2205 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
2206 *
2207 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2208 * @hide
2209 */
2210 public static final Key<int[]> REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS =
2211 new Key<int[]>("android.request.availablePhysicalCameraRequestKeys", int[].class);
2212
2213 /**
Emilian Peeva7fea4c2018-09-03 16:37:06 +01002214 * <p>A list of camera characteristics keys that are only available
2215 * in case the camera client has camera permission.</p>
2216 * <p>The entry contains a subset of
2217 * {@link android.hardware.camera2.CameraCharacteristics#getKeys } that require camera clients
2218 * to acquire the {@link android.Manifest.permission#CAMERA } permission before calling
2219 * {@link android.hardware.camera2.CameraManager#getCameraCharacteristics }. If the
2220 * permission is not held by the camera client, then the values of the repsective properties
2221 * will not be present in {@link android.hardware.camera2.CameraCharacteristics }.</p>
2222 * <p>This key is available on all devices.</p>
2223 * @hide
2224 */
2225 public static final Key<int[]> REQUEST_CHARACTERISTIC_KEYS_NEEDING_PERMISSION =
2226 new Key<int[]>("android.request.characteristicKeysNeedingPermission", int[].class);
2227
2228 /**
Zhijun Hef3b16df2014-01-17 13:37:59 -08002229 * <p>The list of image formats that are supported by this
Igor Murashkin418f6df2014-02-07 18:20:48 -08002230 * camera device for output streams.</p>
Zhijun Hef3b16df2014-01-17 13:37:59 -08002231 * <p>All camera devices will support JPEG and YUV_420_888 formats.</p>
2232 * <p>When set to YUV_420_888, application can access the YUV420 data directly.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002233 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07002234 * @deprecated
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07002235 * <p>Not used in HALv3 or newer</p>
2236
Igor Murashkin9c595172014-05-12 13:56:20 -07002237 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002238 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002239 @Deprecated
Igor Murashkinb519cc52013-07-02 11:23:44 -07002240 public static final Key<int[]> SCALER_AVAILABLE_FORMATS =
2241 new Key<int[]>("android.scaler.availableFormats", int[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002242
2243 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002244 * <p>The minimum frame duration that is supported
Igor Murashkin9c595172014-05-12 13:56:20 -07002245 * for each resolution in android.scaler.availableJpegSizes.</p>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08002246 * <p>This corresponds to the minimum steady-state frame duration when only
2247 * that JPEG stream is active and captured in a burst, with all
2248 * processing (typically in android.*.mode) set to FAST.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08002249 * <p>When multiple streams are configured, the minimum
2250 * frame duration will be &gt;= max(individual stream min
2251 * durations)</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002252 * <p><b>Units</b>: Nanoseconds</p>
2253 * <p><b>Range of valid values:</b><br>
2254 * TODO: Remove property.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002255 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07002256 * @deprecated
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07002257 * <p>Not used in HALv3 or newer</p>
2258
Igor Murashkin9c595172014-05-12 13:56:20 -07002259 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002260 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002261 @Deprecated
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002262 public static final Key<long[]> SCALER_AVAILABLE_JPEG_MIN_DURATIONS =
2263 new Key<long[]>("android.scaler.availableJpegMinDurations", long[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002264
2265 /**
Zhijun Hef3b16df2014-01-17 13:37:59 -08002266 * <p>The JPEG resolutions that are supported by this camera device.</p>
2267 * <p>The resolutions are listed as <code>(width, height)</code> pairs. All camera devices will support
2268 * sensor maximum resolution (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002269 * <p><b>Range of valid values:</b><br>
2270 * TODO: Remove property.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002271 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Zhijun Hef3b16df2014-01-17 13:37:59 -08002272 *
2273 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Igor Murashkin9c595172014-05-12 13:56:20 -07002274 * @deprecated
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07002275 * <p>Not used in HALv3 or newer</p>
2276
Igor Murashkin9c595172014-05-12 13:56:20 -07002277 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002278 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002279 @Deprecated
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07002280 public static final Key<android.util.Size[]> SCALER_AVAILABLE_JPEG_SIZES =
2281 new Key<android.util.Size[]>("android.scaler.availableJpegSizes", android.util.Size[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002282
2283 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002284 * <p>The maximum ratio between both active area width
2285 * and crop region width, and active area height and
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002286 * crop region height, for {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002287 * <p>This represents the maximum amount of zooming possible by
2288 * the camera device, or equivalently, the minimum cropping
2289 * window size.</p>
2290 * <p>Crop regions that have a width or height that is smaller
2291 * than this ratio allows will be rounded up to the minimum
2292 * allowed size by the camera device.</p>
Shuzhen Wang55c1c3f2019-11-13 11:25:20 -08002293 * <p>Starting from API level 30, when using {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} to zoom in or out,
2294 * the application must use {@link CameraCharacteristics#CONTROL_ZOOM_RATIO_RANGE android.control.zoomRatioRange} to query both the minimum and
2295 * maximum zoom ratio.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002296 * <p><b>Units</b>: Zoom scale factor</p>
2297 * <p><b>Range of valid values:</b><br>
2298 * &gt;=1</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002299 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002300 *
Shuzhen Wang55c1c3f2019-11-13 11:25:20 -08002301 * @see CaptureRequest#CONTROL_ZOOM_RATIO
2302 * @see CameraCharacteristics#CONTROL_ZOOM_RATIO_RANGE
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002303 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002304 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002305 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002306 @NonNull
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002307 public static final Key<Float> SCALER_AVAILABLE_MAX_DIGITAL_ZOOM =
2308 new Key<Float>("android.scaler.availableMaxDigitalZoom", float.class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002309
2310 /**
Igor Murashkin143aa0b2014-01-17 15:02:34 -08002311 * <p>For each available processed output size (defined in
Igor Murashkin9c595172014-05-12 13:56:20 -07002312 * android.scaler.availableProcessedSizes), this property lists the
Igor Murashkin143aa0b2014-01-17 15:02:34 -08002313 * minimum supportable frame duration for that size.</p>
2314 * <p>This should correspond to the frame duration when only that processed
2315 * stream is active, with all processing (typically in android.*.mode)
2316 * set to FAST.</p>
2317 * <p>When multiple streams are configured, the minimum frame duration will
2318 * be &gt;= max(individual stream min durations).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002319 * <p><b>Units</b>: Nanoseconds</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002320 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07002321 * @deprecated
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07002322 * <p>Not used in HALv3 or newer</p>
2323
Igor Murashkin9c595172014-05-12 13:56:20 -07002324 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002325 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002326 @Deprecated
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002327 public static final Key<long[]> SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS =
2328 new Key<long[]>("android.scaler.availableProcessedMinDurations", long[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002329
2330 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002331 * <p>The resolutions available for use with
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002332 * processed output streams, such as YV12, NV12, and
2333 * platform opaque YUV/RGB streams to the GPU or video
Zhijun Hef3b16df2014-01-17 13:37:59 -08002334 * encoders.</p>
2335 * <p>The resolutions are listed as <code>(width, height)</code> pairs.</p>
2336 * <p>For a given use case, the actual maximum supported resolution
2337 * may be lower than what is listed here, depending on the destination
2338 * Surface for the image data. For example, for recording video,
2339 * the video encoder chosen may have a maximum size limit (e.g. 1080p)
2340 * smaller than what the camera (e.g. maximum resolution is 3264x2448)
2341 * can provide.</p>
2342 * <p>Please reference the documentation for the image data destination to
2343 * check if it limits the maximum size for image data.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002344 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07002345 * @deprecated
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07002346 * <p>Not used in HALv3 or newer</p>
2347
Igor Murashkin9c595172014-05-12 13:56:20 -07002348 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002349 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002350 @Deprecated
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07002351 public static final Key<android.util.Size[]> SCALER_AVAILABLE_PROCESSED_SIZES =
2352 new Key<android.util.Size[]>("android.scaler.availableProcessedSizes", android.util.Size[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002353
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002354 /**
Igor Murashkin418f6df2014-02-07 18:20:48 -08002355 * <p>The mapping of image formats that are supported by this
2356 * camera device for input streams, to their corresponding output formats.</p>
2357 * <p>All camera devices with at least 1
Zhijun He0e99c222015-01-29 15:26:05 -08002358 * {@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} will have at least one
Igor Murashkin418f6df2014-02-07 18:20:48 -08002359 * available input format.</p>
2360 * <p>The camera device will support the following map of formats,
Zhijun He0e99c222015-01-29 15:26:05 -08002361 * if its dependent capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}) is supported:</p>
Igor Murashkin418f6df2014-02-07 18:20:48 -08002362 * <table>
2363 * <thead>
2364 * <tr>
2365 * <th align="left">Input Format</th>
2366 * <th align="left">Output Format</th>
2367 * <th align="left">Capability</th>
2368 * </tr>
2369 * </thead>
2370 * <tbody>
2371 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002372 * <td align="left">{@link android.graphics.ImageFormat#PRIVATE }</td>
2373 * <td align="left">{@link android.graphics.ImageFormat#JPEG }</td>
Chien-Yu Chen8062d312015-05-12 14:24:10 -07002374 * <td align="left">PRIVATE_REPROCESSING</td>
Igor Murashkin418f6df2014-02-07 18:20:48 -08002375 * </tr>
2376 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002377 * <td align="left">{@link android.graphics.ImageFormat#PRIVATE }</td>
2378 * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
Chien-Yu Chen8062d312015-05-12 14:24:10 -07002379 * <td align="left">PRIVATE_REPROCESSING</td>
Igor Murashkin418f6df2014-02-07 18:20:48 -08002380 * </tr>
2381 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002382 * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
2383 * <td align="left">{@link android.graphics.ImageFormat#JPEG }</td>
Zhijun He0e99c222015-01-29 15:26:05 -08002384 * <td align="left">YUV_REPROCESSING</td>
2385 * </tr>
2386 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002387 * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
2388 * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
Zhijun He0e99c222015-01-29 15:26:05 -08002389 * <td align="left">YUV_REPROCESSING</td>
Igor Murashkin418f6df2014-02-07 18:20:48 -08002390 * </tr>
2391 * </tbody>
2392 * </table>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002393 * <p>PRIVATE refers to a device-internal format that is not directly application-visible. A
Chien-Yu Chen8062d312015-05-12 14:24:10 -07002394 * PRIVATE input surface can be acquired by {@link android.media.ImageReader#newInstance }
2395 * with {@link android.graphics.ImageFormat#PRIVATE } as the format.</p>
2396 * <p>For a PRIVATE_REPROCESSING-capable camera device, using the PRIVATE format as either input
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002397 * 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>
Igor Murashkin418f6df2014-02-07 18:20:48 -08002398 * <p>Attempting to configure an input stream with output streams not
2399 * listed as available in this map is not valid.</p>
Shuzhen Wangec5e8d22018-09-28 09:28:48 -07002400 * <p>Additionally, if the camera device is MONOCHROME with Y8 support, it will also support
2401 * the following map of formats if its dependent capability
2402 * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}) is supported:</p>
2403 * <table>
2404 * <thead>
2405 * <tr>
2406 * <th align="left">Input Format</th>
2407 * <th align="left">Output Format</th>
2408 * <th align="left">Capability</th>
2409 * </tr>
2410 * </thead>
2411 * <tbody>
2412 * <tr>
2413 * <td align="left">{@link android.graphics.ImageFormat#PRIVATE }</td>
2414 * <td align="left">{@link android.graphics.ImageFormat#Y8 }</td>
2415 * <td align="left">PRIVATE_REPROCESSING</td>
2416 * </tr>
2417 * <tr>
2418 * <td align="left">{@link android.graphics.ImageFormat#Y8 }</td>
2419 * <td align="left">{@link android.graphics.ImageFormat#JPEG }</td>
2420 * <td align="left">YUV_REPROCESSING</td>
2421 * </tr>
2422 * <tr>
2423 * <td align="left">{@link android.graphics.ImageFormat#Y8 }</td>
2424 * <td align="left">{@link android.graphics.ImageFormat#Y8 }</td>
2425 * <td align="left">YUV_REPROCESSING</td>
2426 * </tr>
2427 * </tbody>
2428 * </table>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002429 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002430 *
Zhijun He0e99c222015-01-29 15:26:05 -08002431 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2432 * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
Igor Murashkin9c595172014-05-12 13:56:20 -07002433 * @hide
Igor Murashkin418f6df2014-02-07 18:20:48 -08002434 */
Chien-Yu Chen0a551f12015-04-03 17:57:35 -07002435 public static final Key<android.hardware.camera2.params.ReprocessFormatsMap> SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP =
2436 new Key<android.hardware.camera2.params.ReprocessFormatsMap>("android.scaler.availableInputOutputFormatsMap", android.hardware.camera2.params.ReprocessFormatsMap.class);
Igor Murashkin418f6df2014-02-07 18:20:48 -08002437
2438 /**
Igor Murashkina23ffb52014-02-07 18:52:34 -08002439 * <p>The available stream configurations that this
2440 * camera device supports
2441 * (i.e. format, width, height, output/input stream).</p>
2442 * <p>The configurations are listed as <code>(format, width, height, input?)</code>
2443 * tuples.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002444 * <p>For a given use case, the actual maximum supported resolution
2445 * may be lower than what is listed here, depending on the destination
2446 * Surface for the image data. For example, for recording video,
2447 * the video encoder chosen may have a maximum size limit (e.g. 1080p)
2448 * smaller than what the camera (e.g. maximum resolution is 3264x2448)
2449 * can provide.</p>
2450 * <p>Please reference the documentation for the image data destination to
2451 * check if it limits the maximum size for image data.</p>
2452 * <p>Not all output formats may be supported in a configuration with
2453 * an input stream of a particular format. For more details, see
Igor Murashkin9c595172014-05-12 13:56:20 -07002454 * android.scaler.availableInputOutputFormatsMap.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002455 * <p>The following table describes the minimum required output stream
2456 * configurations based on the hardware level
2457 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p>
2458 * <table>
2459 * <thead>
2460 * <tr>
2461 * <th align="center">Format</th>
2462 * <th align="center">Size</th>
2463 * <th align="center">Hardware Level</th>
2464 * <th align="center">Notes</th>
2465 * </tr>
2466 * </thead>
2467 * <tbody>
2468 * <tr>
2469 * <td align="center">JPEG</td>
2470 * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td>
2471 * <td align="center">Any</td>
2472 * <td align="center"></td>
2473 * </tr>
2474 * <tr>
2475 * <td align="center">JPEG</td>
2476 * <td align="center">1920x1080 (1080p)</td>
2477 * <td align="center">Any</td>
2478 * <td align="center">if 1080p &lt;= activeArraySize</td>
2479 * </tr>
2480 * <tr>
2481 * <td align="center">JPEG</td>
2482 * <td align="center">1280x720 (720)</td>
2483 * <td align="center">Any</td>
2484 * <td align="center">if 720p &lt;= activeArraySize</td>
2485 * </tr>
2486 * <tr>
2487 * <td align="center">JPEG</td>
2488 * <td align="center">640x480 (480p)</td>
2489 * <td align="center">Any</td>
2490 * <td align="center">if 480p &lt;= activeArraySize</td>
2491 * </tr>
2492 * <tr>
2493 * <td align="center">JPEG</td>
2494 * <td align="center">320x240 (240p)</td>
2495 * <td align="center">Any</td>
2496 * <td align="center">if 240p &lt;= activeArraySize</td>
2497 * </tr>
2498 * <tr>
2499 * <td align="center">YUV_420_888</td>
2500 * <td align="center">all output sizes available for JPEG</td>
2501 * <td align="center">FULL</td>
2502 * <td align="center"></td>
2503 * </tr>
2504 * <tr>
2505 * <td align="center">YUV_420_888</td>
2506 * <td align="center">all output sizes available for JPEG, up to the maximum video size</td>
2507 * <td align="center">LIMITED</td>
2508 * <td align="center"></td>
2509 * </tr>
2510 * <tr>
2511 * <td align="center">IMPLEMENTATION_DEFINED</td>
2512 * <td align="center">same as YUV_420_888</td>
2513 * <td align="center">Any</td>
2514 * <td align="center"></td>
2515 * </tr>
2516 * </tbody>
2517 * </table>
2518 * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional
2519 * mandatory stream configurations on a per-capability basis.</p>
Yin-Chia Yeh428256d2019-01-23 15:27:47 -08002520 * <p>Exception on 176x144 (QCIF) resolution: camera devices usually have a fixed capability for
2521 * downscaling from larger resolution to smaller, and the QCIF resolution sometimes is not
2522 * fully supported due to this limitation on devices with high-resolution image sensors.
2523 * Therefore, trying to configure a QCIF resolution stream together with any other
2524 * stream larger than 1920x1080 resolution (either width or height) might not be supported,
2525 * and capture session creation will fail if it is not.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002526 * <p>This key is available on all devices.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002527 *
2528 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2529 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Igor Murashkina23ffb52014-02-07 18:52:34 -08002530 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Igor Murashkin9c595172014-05-12 13:56:20 -07002531 * @hide
Igor Murashkina23ffb52014-02-07 18:52:34 -08002532 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002533 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> SCALER_AVAILABLE_STREAM_CONFIGURATIONS =
2534 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.scaler.availableStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
Igor Murashkina23ffb52014-02-07 18:52:34 -08002535
2536 /**
2537 * <p>This lists the minimum frame duration for each
2538 * format/size combination.</p>
2539 * <p>This should correspond to the frame duration when only that
2540 * stream is active, with all processing (typically in android.*.mode)
2541 * set to either OFF or FAST.</p>
2542 * <p>When multiple streams are used in a request, the minimum frame
2543 * duration will be max(individual stream min durations).</p>
2544 * <p>The minimum frame duration of a stream (of a particular format, size)
2545 * is the same regardless of whether the stream is input or output.</p>
2546 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and
Igor Murashkin9c595172014-05-12 13:56:20 -07002547 * android.scaler.availableStallDurations for more details about
Igor Murashkina23ffb52014-02-07 18:52:34 -08002548 * calculating the max frame rate.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002549 * <p><b>Units</b>: (format, width, height, ns) x n</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002550 * <p>This key is available on all devices.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002551 *
Igor Murashkina23ffb52014-02-07 18:52:34 -08002552 * @see CaptureRequest#SENSOR_FRAME_DURATION
Igor Murashkin9c595172014-05-12 13:56:20 -07002553 * @hide
Igor Murashkina23ffb52014-02-07 18:52:34 -08002554 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002555 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_MIN_FRAME_DURATIONS =
2556 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
Igor Murashkina23ffb52014-02-07 18:52:34 -08002557
2558 /**
2559 * <p>This lists the maximum stall duration for each
Zhijun He513f7c32015-04-24 18:23:54 -07002560 * output format/size combination.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002561 * <p>A stall duration is how much extra time would get added
2562 * to the normal minimum frame duration for a repeating request
2563 * that has streams with non-zero stall.</p>
2564 * <p>For example, consider JPEG captures which have the following
2565 * characteristics:</p>
2566 * <ul>
2567 * <li>JPEG streams act like processed YUV streams in requests for which
2568 * they are not included; in requests in which they are directly
2569 * referenced, they act as JPEG streams. This is because supporting a
2570 * JPEG stream requires the underlying YUV data to always be ready for
2571 * use by a JPEG encoder, but the encoder will only be used (and impact
2572 * frame duration) on requests that actually reference a JPEG stream.</li>
2573 * <li>The JPEG processor can run concurrently to the rest of the camera
2574 * pipeline, but cannot process more than 1 capture at a time.</li>
2575 * </ul>
2576 * <p>In other words, using a repeating YUV request would result
2577 * in a steady frame rate (let's say it's 30 FPS). If a single
2578 * JPEG request is submitted periodically, the frame rate will stay
2579 * at 30 FPS (as long as we wait for the previous JPEG to return each
2580 * time). If we try to submit a repeating YUV + JPEG request, then
2581 * the frame rate will drop from 30 FPS.</p>
2582 * <p>In general, submitting a new request with a non-0 stall time
2583 * stream will <em>not</em> cause a frame rate drop unless there are still
2584 * outstanding buffers for that stream from previous requests.</p>
2585 * <p>Submitting a repeating request with streams (call this <code>S</code>)
2586 * is the same as setting the minimum frame duration from
2587 * the normal minimum frame duration corresponding to <code>S</code>, added with
2588 * the maximum stall duration for <code>S</code>.</p>
2589 * <p>If interleaving requests with and without a stall duration,
2590 * a request will stall by the maximum of the remaining times
2591 * for each can-stall stream with outstanding buffers.</p>
2592 * <p>This means that a stalling request will not have an exposure start
2593 * until the stall has completed.</p>
2594 * <p>This should correspond to the stall duration when only that stream is
2595 * active, with all processing (typically in android.*.mode) set to FAST
2596 * or OFF. Setting any of the processing modes to HIGH_QUALITY
2597 * effectively results in an indeterminate stall duration for all
2598 * streams in a request (the regular stall calculation rules are
2599 * ignored).</p>
2600 * <p>The following formats may always have a stall duration:</p>
2601 * <ul>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002602 * <li>{@link android.graphics.ImageFormat#JPEG }</li>
2603 * <li>{@link android.graphics.ImageFormat#RAW_SENSOR }</li>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002604 * </ul>
2605 * <p>The following formats will never have a stall duration:</p>
2606 * <ul>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002607 * <li>{@link android.graphics.ImageFormat#YUV_420_888 }</li>
2608 * <li>{@link android.graphics.ImageFormat#RAW10 }</li>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08002609 * <li>{@link android.graphics.ImageFormat#RAW12 }</li>
Shuzhen Wangec5e8d22018-09-28 09:28:48 -07002610 * <li>{@link android.graphics.ImageFormat#Y8 }</li>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002611 * </ul>
2612 * <p>All other formats may or may not have an allowed stall duration on
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002613 * a per-capability basis; refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
Igor Murashkina23ffb52014-02-07 18:52:34 -08002614 * for more details.</p>
2615 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} for more information about
2616 * calculating the max frame rate (absent stalls).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002617 * <p><b>Units</b>: (format, width, height, ns) x n</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002618 * <p>This key is available on all devices.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002619 *
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002620 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Igor Murashkina23ffb52014-02-07 18:52:34 -08002621 * @see CaptureRequest#SENSOR_FRAME_DURATION
Igor Murashkin9c595172014-05-12 13:56:20 -07002622 * @hide
Igor Murashkina23ffb52014-02-07 18:52:34 -08002623 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002624 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_STALL_DURATIONS =
2625 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
2626
2627 /**
2628 * <p>The available stream configurations that this
2629 * camera device supports; also includes the minimum frame durations
2630 * and the stall durations for each format/size combination.</p>
2631 * <p>All camera devices will support sensor maximum resolution (defined by
2632 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) for the JPEG format.</p>
2633 * <p>For a given use case, the actual maximum supported resolution
2634 * may be lower than what is listed here, depending on the destination
2635 * Surface for the image data. For example, for recording video,
2636 * the video encoder chosen may have a maximum size limit (e.g. 1080p)
2637 * smaller than what the camera (e.g. maximum resolution is 3264x2448)
2638 * can provide.</p>
2639 * <p>Please reference the documentation for the image data destination to
2640 * check if it limits the maximum size for image data.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07002641 * <p>The following table describes the minimum required output stream
2642 * configurations based on the hardware level
2643 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p>
2644 * <table>
2645 * <thead>
2646 * <tr>
2647 * <th align="center">Format</th>
2648 * <th align="center">Size</th>
2649 * <th align="center">Hardware Level</th>
2650 * <th align="center">Notes</th>
2651 * </tr>
2652 * </thead>
2653 * <tbody>
2654 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002655 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td>
Yin-Chia Yeh56830462015-07-08 14:26:05 -07002656 * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} (*1)</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002657 * <td align="center">Any</td>
2658 * <td align="center"></td>
2659 * </tr>
2660 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002661 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002662 * <td align="center">1920x1080 (1080p)</td>
2663 * <td align="center">Any</td>
2664 * <td align="center">if 1080p &lt;= activeArraySize</td>
2665 * </tr>
2666 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002667 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td>
Yin-Chia Yeh56830462015-07-08 14:26:05 -07002668 * <td align="center">1280x720 (720p)</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002669 * <td align="center">Any</td>
2670 * <td align="center">if 720p &lt;= activeArraySize</td>
2671 * </tr>
2672 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002673 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002674 * <td align="center">640x480 (480p)</td>
2675 * <td align="center">Any</td>
2676 * <td align="center">if 480p &lt;= activeArraySize</td>
2677 * </tr>
2678 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002679 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002680 * <td align="center">320x240 (240p)</td>
2681 * <td align="center">Any</td>
2682 * <td align="center">if 240p &lt;= activeArraySize</td>
2683 * </tr>
2684 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002685 * <td align="center">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002686 * <td align="center">all output sizes available for JPEG</td>
2687 * <td align="center">FULL</td>
2688 * <td align="center"></td>
2689 * </tr>
2690 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002691 * <td align="center">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002692 * <td align="center">all output sizes available for JPEG, up to the maximum video size</td>
2693 * <td align="center">LIMITED</td>
2694 * <td align="center"></td>
2695 * </tr>
2696 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002697 * <td align="center">{@link android.graphics.ImageFormat#PRIVATE }</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002698 * <td align="center">same as YUV_420_888</td>
2699 * <td align="center">Any</td>
2700 * <td align="center"></td>
2701 * </tr>
2702 * </tbody>
2703 * </table>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002704 * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} and {@link android.hardware.camera2.CameraDevice#createCaptureSession } for additional mandatory
2705 * stream configurations on a per-capability basis.</p>
Yin-Chia Yeh56830462015-07-08 14:26:05 -07002706 * <p>*1: For JPEG format, the sizes may be restricted by below conditions:</p>
2707 * <ul>
2708 * <li>The HAL may choose the aspect ratio of each Jpeg size to be one of well known ones
2709 * (e.g. 4:3, 16:9, 3:2 etc.). If the sensor maximum resolution
2710 * (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) has an aspect ratio other than these,
2711 * it does not have to be included in the supported JPEG sizes.</li>
2712 * <li>Some hardware JPEG encoders may have pixel boundary alignment requirements, such as
2713 * the dimensions being a multiple of 16.
2714 * Therefore, the maximum JPEG size may be smaller than sensor maximum resolution.
2715 * However, the largest JPEG size will be as close as possible to the sensor maximum
2716 * resolution given above constraints. It is required that after aspect ratio adjustments,
2717 * additional size reduction due to other issues must be less than 3% in area. For example,
2718 * if the sensor maximum resolution is 3280x2464, if the maximum JPEG size has aspect
2719 * ratio 4:3, and the JPEG encoder alignment requirement is 16, the maximum JPEG size will be
2720 * 3264x2448.</li>
2721 * </ul>
Yin-Chia Yeh428256d2019-01-23 15:27:47 -08002722 * <p>Exception on 176x144 (QCIF) resolution: camera devices usually have a fixed capability on
2723 * downscaling from larger resolution to smaller ones, and the QCIF resolution can sometimes
2724 * not be fully supported due to this limitation on devices with high-resolution image
2725 * sensors. Therefore, trying to configure a QCIF resolution stream together with any other
2726 * stream larger than 1920x1080 resolution (either width or height) might not be supported,
2727 * and capture session creation will fail if it is not.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002728 * <p>This key is available on all devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07002729 *
2730 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2731 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2732 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
2733 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002734 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002735 @NonNull
Igor Murashkin6c76f582014-07-15 17:19:49 -07002736 @SyntheticKey
Igor Murashkin9c595172014-05-12 13:56:20 -07002737 public static final Key<android.hardware.camera2.params.StreamConfigurationMap> SCALER_STREAM_CONFIGURATION_MAP =
2738 new Key<android.hardware.camera2.params.StreamConfigurationMap>("android.scaler.streamConfigurationMap", android.hardware.camera2.params.StreamConfigurationMap.class);
Igor Murashkina23ffb52014-02-07 18:52:34 -08002739
2740 /**
Zhijun He14986152014-05-22 21:17:37 -07002741 * <p>The crop type that this camera device supports.</p>
2742 * <p>When passing a non-centered crop region ({@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}) to a camera
2743 * device that only supports CENTER_ONLY cropping, the camera device will move the
2744 * crop region to the center of the sensor active array ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize})
2745 * and keep the crop region width and height unchanged. The camera device will return the
2746 * final used crop region in metadata result {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
2747 * <p>Camera devices that support FREEFORM cropping will support any crop region that
2748 * is inside of the active array. The camera device will apply the same crop region and
2749 * return the final used crop region in capture result metadata {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
Shuzhen Wang55c1c3f2019-11-13 11:25:20 -08002750 * <p>Starting from API level 30,</p>
2751 * <ul>
2752 * <li>If the camera device supports FREEFORM cropping, in order to do FREEFORM cropping, the
2753 * application must set {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} to 1.0, and use {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}
2754 * for zoom.</li>
2755 * <li>To do CENTER_ONLY zoom, the application has below 2 options:<ol>
2756 * <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>
2757 * <li>Adjust zoom by {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio}; use {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to crop
2758 * the field of view vertically (letterboxing) or horizontally (pillarboxing), but not
2759 * windowboxing.</li>
2760 * </ol>
2761 * </li>
2762 * <li>Setting {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} to values different than 1.0 and
2763 * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to be windowboxing at the same time is undefined behavior.</li>
2764 * </ul>
Eino-Ville Talvala81e89282015-06-30 16:34:24 -07002765 * <p>LEGACY capability devices will only support CENTER_ONLY cropping.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002766 * <p><b>Possible values:</b>
2767 * <ul>
2768 * <li>{@link #SCALER_CROPPING_TYPE_CENTER_ONLY CENTER_ONLY}</li>
2769 * <li>{@link #SCALER_CROPPING_TYPE_FREEFORM FREEFORM}</li>
2770 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002771 * <p>This key is available on all devices.</p>
Zhijun He14986152014-05-22 21:17:37 -07002772 *
Shuzhen Wang55c1c3f2019-11-13 11:25:20 -08002773 * @see CaptureRequest#CONTROL_ZOOM_RATIO
Zhijun He14986152014-05-22 21:17:37 -07002774 * @see CaptureRequest#SCALER_CROP_REGION
2775 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
2776 * @see #SCALER_CROPPING_TYPE_CENTER_ONLY
2777 * @see #SCALER_CROPPING_TYPE_FREEFORM
2778 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002779 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002780 @NonNull
Zhijun He14986152014-05-22 21:17:37 -07002781 public static final Key<Integer> SCALER_CROPPING_TYPE =
2782 new Key<Integer>("android.scaler.croppingType", int.class);
2783
2784 /**
Emilian Peev2776ca32018-09-18 14:00:39 +01002785 * <p>Recommended stream configurations for common client use cases.</p>
2786 * <p>Optional subset of the android.scaler.availableStreamConfigurations that contains
2787 * similar tuples listed as
2788 * (i.e. width, height, format, output/input stream, usecase bit field).
2789 * Camera devices will be able to suggest particular stream configurations which are
2790 * power and performance efficient for specific use cases. For more information about
2791 * retrieving the suggestions see
2792 * {@link android.hardware.camera2.CameraCharacteristics#getRecommendedStreamConfigurationMap }.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002793 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Emilian Peev2776ca32018-09-18 14:00:39 +01002794 * @hide
2795 */
2796 public static final Key<android.hardware.camera2.params.RecommendedStreamConfiguration[]> SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS =
2797 new Key<android.hardware.camera2.params.RecommendedStreamConfiguration[]>("android.scaler.availableRecommendedStreamConfigurations", android.hardware.camera2.params.RecommendedStreamConfiguration[].class);
2798
2799 /**
2800 * <p>Recommended mappings of image formats that are supported by this
2801 * camera device for input streams, to their corresponding output formats.</p>
2802 * <p>This is a recommended subset of the complete list of mappings found in
2803 * android.scaler.availableInputOutputFormatsMap. The same requirements apply here as well.
2804 * The list however doesn't need to contain all available and supported mappings. Instead of
2805 * this developers must list only recommended and efficient entries.
2806 * If set, the information will be available in the ZERO_SHUTTER_LAG recommended stream
2807 * configuration see
2808 * {@link android.hardware.camera2.CameraCharacteristics#getRecommendedStreamConfigurationMap }.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002809 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Emilian Peev2776ca32018-09-18 14:00:39 +01002810 * @hide
2811 */
2812 public static final Key<android.hardware.camera2.params.ReprocessFormatsMap> SCALER_AVAILABLE_RECOMMENDED_INPUT_OUTPUT_FORMATS_MAP =
2813 new Key<android.hardware.camera2.params.ReprocessFormatsMap>("android.scaler.availableRecommendedInputOutputFormatsMap", android.hardware.camera2.params.ReprocessFormatsMap.class);
2814
2815 /**
Emilian Peev423cbd72018-11-10 18:37:45 +00002816 * <p>An array of mandatory stream combinations generated according to the camera device
2817 * {@link android.hardware.camera2.CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL }
2818 * and {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES }.
2819 * This is an app-readable conversion of the mandatory stream combination
2820 * {@link android.hardware.camera2.CameraDevice#createCaptureSession tables}.</p>
2821 * <p>The array of
2822 * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is
2823 * generated according to the documented
2824 * {@link android.hardware.camera2.CameraDevice#createCaptureSession guideline} based on
2825 * specific device level and capabilities.
2826 * Clients can use the array as a quick reference to find an appropriate camera stream
2827 * combination.
2828 * As per documentation, the stream combinations with given PREVIEW, RECORD and
2829 * MAXIMUM resolutions and anything smaller from the list given by
2830 * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } are
2831 * guaranteed to work.
Shuzhen Wang2da73f42019-03-12 15:16:06 -07002832 * For a physical camera not independently exposed in
2833 * {@link android.hardware.camera2.CameraManager#getCameraIdList }, the mandatory stream
2834 * combinations for that physical camera Id are also generated, so that the application can
2835 * configure them as physical streams via the logical camera.
2836 * The mandatory stream combination array will be {@code null} in case the device is not
2837 * backward compatible.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002838 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Emilian Peev423cbd72018-11-10 18:37:45 +00002839 * <p><b>Limited capability</b> -
2840 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
2841 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
2842 *
2843 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2844 */
2845 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002846 @NonNull
Emilian Peev423cbd72018-11-10 18:37:45 +00002847 @SyntheticKey
2848 public static final Key<android.hardware.camera2.params.MandatoryStreamCombination[]> SCALER_MANDATORY_STREAM_COMBINATIONS =
2849 new Key<android.hardware.camera2.params.MandatoryStreamCombination[]>("android.scaler.mandatoryStreamCombinations", android.hardware.camera2.params.MandatoryStreamCombination[].class);
2850
2851 /**
Ruben Brunk224eb3a2015-06-15 17:32:06 -07002852 * <p>The area of the image sensor which corresponds to active pixels after any geometric
2853 * distortion correction has been applied.</p>
2854 * <p>This is the rectangle representing the size of the active region of the sensor (i.e.
2855 * the region that actually receives light from the scene) after any geometric correction
2856 * has been applied, and should be treated as the maximum size in pixels of any of the
2857 * image output formats aside from the raw formats.</p>
2858 * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of
2859 * the full pixel array, and the size of the full pixel array is given by
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002860 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
Ruben Brunk224eb3a2015-06-15 17:32:06 -07002861 * <p>The coordinate system for most other keys that list pixel coordinates, including
2862 * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, is defined relative to the active array rectangle given in
2863 * this field, with <code>(0, 0)</code> being the top-left of this rectangle.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002864 * <p>The active array may be smaller than the full pixel array, since the full array may
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07002865 * include black calibration pixels or other inactive regions.</p>
2866 * <p>For devices that do not support {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the active
2867 * array must be the same as {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.</p>
2868 * <p>For devices that support {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the active array must
2869 * be enclosed by {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}. The difference between
2870 * pre-correction active array and active array accounts for scaling or cropping caused
2871 * by lens geometric distortion correction.</p>
2872 * <p>In general, application should always refer to active array size for controls like
2873 * metering regions or crop region. Two exceptions are when the application is dealing with
2874 * RAW image buffers (RAW_SENSOR, RAW10, RAW12 etc), or when application explicitly set
2875 * {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} to OFF. In these cases, application should refer
2876 * to {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002877 * <p><b>Units</b>: Pixel coordinates on the image sensor</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002878 * <p>This key is available on all devices.</p>
2879 *
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07002880 * @see CaptureRequest#DISTORTION_CORRECTION_MODE
Ruben Brunk224eb3a2015-06-15 17:32:06 -07002881 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002882 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07002883 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002884 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002885 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002886 @NonNull
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002887 public static final Key<android.graphics.Rect> SENSOR_INFO_ACTIVE_ARRAY_SIZE =
2888 new Key<android.graphics.Rect>("android.sensor.info.activeArraySize", android.graphics.Rect.class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002889
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002890 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002891 * <p>Range of sensitivities for {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} supported by this
2892 * camera device.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002893 * <p>The values are the standard ISO sensitivity values,
2894 * as defined in ISO 12232:2006.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002895 * <p><b>Range of valid values:</b><br>
2896 * Min &lt;= 100, Max &gt;= 800</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002897 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002898 * <p><b>Full capability</b> -
2899 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2900 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002901 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002902 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002903 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002904 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002905 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002906 @NonNull
Ruben Brunk57493682014-05-27 18:58:08 -07002907 public static final Key<android.util.Range<Integer>> SENSOR_INFO_SENSITIVITY_RANGE =
2908 new Key<android.util.Range<Integer>>("android.sensor.info.sensitivityRange", new TypeReference<android.util.Range<Integer>>() {{ }});
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002909
2910 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002911 * <p>The arrangement of color filters on sensor;
Zhijun Hed1784962014-04-08 17:41:46 -07002912 * represents the colors in the top-left 2x2 section of
Shuzhen Wanga8d36032018-10-15 12:01:53 -07002913 * the sensor, in reading order, for a Bayer camera, or the
2914 * light spectrum it captures for MONOCHROME camera.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002915 * <p><b>Possible values:</b>
2916 * <ul>
2917 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB RGGB}</li>
2918 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG GRBG}</li>
2919 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG GBRG}</li>
2920 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR BGGR}</li>
2921 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB RGB}</li>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07002922 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_MONO MONO}</li>
2923 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR NIR}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002924 * </ul></p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002925 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002926 * <p><b>Full capability</b> -
2927 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2928 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
2929 *
2930 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun Hed1784962014-04-08 17:41:46 -07002931 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB
2932 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG
2933 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG
2934 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR
2935 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB
Shuzhen Wanga8d36032018-10-15 12:01:53 -07002936 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_MONO
2937 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR
Zhijun Hed1784962014-04-08 17:41:46 -07002938 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002939 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002940 @NonNull
Zhijun Hed1784962014-04-08 17:41:46 -07002941 public static final Key<Integer> SENSOR_INFO_COLOR_FILTER_ARRANGEMENT =
2942 new Key<Integer>("android.sensor.info.colorFilterArrangement", int.class);
2943
2944 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002945 * <p>The range of image exposure times for {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} supported
2946 * by this camera device.</p>
2947 * <p><b>Units</b>: Nanoseconds</p>
2948 * <p><b>Range of valid values:</b><br>
2949 * The minimum exposure time will be less than 100 us. For FULL
Zhijun He28288ca2014-06-25 15:49:13 -07002950 * capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL),
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002951 * the maximum exposure time will be greater than 100ms.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002952 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002953 * <p><b>Full capability</b> -
2954 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2955 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Igor Murashkin6b7ddc42014-02-03 14:39:19 -08002956 *
Zhijun He28288ca2014-06-25 15:49:13 -07002957 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkin6b7ddc42014-02-03 14:39:19 -08002958 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002959 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002960 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002961 @NonNull
Ruben Brunk57493682014-05-27 18:58:08 -07002962 public static final Key<android.util.Range<Long>> SENSOR_INFO_EXPOSURE_TIME_RANGE =
2963 new Key<android.util.Range<Long>>("android.sensor.info.exposureTimeRange", new TypeReference<android.util.Range<Long>>() {{ }});
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002964
2965 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002966 * <p>The maximum possible frame duration (minimum frame rate) for
2967 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} that is supported this camera device.</p>
2968 * <p>Attempting to use frame durations beyond the maximum will result in the frame
2969 * duration being clipped to the maximum. See that control for a full definition of frame
2970 * durations.</p>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002971 * <p>Refer to {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration }
2972 * for the minimum frame duration values.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002973 * <p><b>Units</b>: Nanoseconds</p>
2974 * <p><b>Range of valid values:</b><br>
2975 * For FULL capability devices
2976 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL), at least 100ms.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002977 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002978 * <p><b>Full capability</b> -
2979 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2980 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Igor Murashkin6b7ddc42014-02-03 14:39:19 -08002981 *
Zhijun He28288ca2014-06-25 15:49:13 -07002982 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002983 * @see CaptureRequest#SENSOR_FRAME_DURATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002984 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002985 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08002986 @NonNull
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002987 public static final Key<Long> SENSOR_INFO_MAX_FRAME_DURATION =
2988 new Key<Long>("android.sensor.info.maxFrameDuration", long.class);
2989
2990 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002991 * <p>The physical dimensions of the full pixel
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002992 * array.</p>
2993 * <p>This is the physical size of the sensor pixel
2994 * array defined by {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002995 * <p><b>Units</b>: Millimeters</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002996 * <p>This key is available on all devices.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002997 *
2998 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002999 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003000 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003001 @NonNull
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003002 public static final Key<android.util.SizeF> SENSOR_INFO_PHYSICAL_SIZE =
3003 new Key<android.util.SizeF>("android.sensor.info.physicalSize", android.util.SizeF.class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003004
3005 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003006 * <p>Dimensions of the full pixel array, possibly
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08003007 * including black calibration pixels.</p>
Ruben Brunk224eb3a2015-06-15 17:32:06 -07003008 * <p>The pixel count of the full pixel array of the image sensor, which covers
3009 * {@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize} area. This represents the full pixel dimensions of
3010 * the raw buffers produced by this sensor.</p>
3011 * <p>If a camera device supports raw sensor formats, either this or
3012 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} is the maximum dimensions for the raw
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003013 * output formats listed in {@link android.hardware.camera2.params.StreamConfigurationMap }
3014 * (this depends on whether or not the image sensor returns buffers containing pixels that
3015 * are not part of the active array region for blacklevel calibration or other purposes).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003016 * <p>Some parts of the full pixel array may not receive light from the scene,
Ruben Brunk224eb3a2015-06-15 17:32:06 -07003017 * or be otherwise inactive. The {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} key
3018 * defines the rectangle of active pixels that will be included in processed image
3019 * formats.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003020 * <p><b>Units</b>: Pixels</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003021 * <p>This key is available on all devices.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003022 *
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003023 * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE
Ruben Brunk224eb3a2015-06-15 17:32:06 -07003024 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08003025 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003026 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003027 @NonNull
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07003028 public static final Key<android.util.Size> SENSOR_INFO_PIXEL_ARRAY_SIZE =
3029 new Key<android.util.Size>("android.sensor.info.pixelArraySize", android.util.Size.class);
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08003030
3031 /**
Ruben Brunke60e29552014-02-18 10:44:17 -08003032 * <p>Maximum raw value output by sensor.</p>
3033 * <p>This specifies the fully-saturated encoding level for the raw
3034 * sample values from the sensor. This is typically caused by the
3035 * sensor becoming highly non-linear or clipping. The minimum for
3036 * each channel is specified by the offset in the
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003037 * {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} key.</p>
Ruben Brunke60e29552014-02-18 10:44:17 -08003038 * <p>The white level is typically determined either by sensor bit depth
Ruben Brunke89b1202014-03-24 17:10:35 -07003039 * (8-14 bits is expected), or by the point where the sensor response
Ruben Brunke60e29552014-02-18 10:44:17 -08003040 * becomes too non-linear to be useful. The default value for this is
3041 * maximum representable value for a 16-bit raw sample (2^16 - 1).</p>
Zhijun Hecd950b62015-11-12 17:47:52 -08003042 * <p>The white level values of captured images may vary for different
3043 * capture settings (e.g., {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}). This key
3044 * represents a coarse approximation for such case. It is recommended
3045 * to use {@link CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL android.sensor.dynamicWhiteLevel} for captures when supported
3046 * by the camera device, which provides more accurate white level values.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003047 * <p><b>Range of valid values:</b><br>
3048 * &gt; 255 (8-bit output)</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003049 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Ruben Brunke60e29552014-02-18 10:44:17 -08003050 *
3051 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
Zhijun Hecd950b62015-11-12 17:47:52 -08003052 * @see CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL
3053 * @see CaptureRequest#SENSOR_SENSITIVITY
Ruben Brunke60e29552014-02-18 10:44:17 -08003054 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003055 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003056 @NonNull
Ruben Brunke60e29552014-02-18 10:44:17 -08003057 public static final Key<Integer> SENSOR_INFO_WHITE_LEVEL =
3058 new Key<Integer>("android.sensor.info.whiteLevel", int.class);
3059
3060 /**
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07003061 * <p>The time base source for sensor capture start timestamps.</p>
3062 * <p>The timestamps provided for captures are always in nanoseconds and monotonic, but
3063 * may not based on a time source that can be compared to other system time sources.</p>
3064 * <p>This characteristic defines the source for the timestamps, and therefore whether they
3065 * can be compared against other system time sources/timestamps.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003066 * <p><b>Possible values:</b>
3067 * <ul>
3068 * <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN UNKNOWN}</li>
3069 * <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME REALTIME}</li>
3070 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003071 * <p>This key is available on all devices.</p>
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07003072 * @see #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN
3073 * @see #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME
Zhijun He45fa43a12014-06-13 18:29:37 -07003074 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003075 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003076 @NonNull
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07003077 public static final Key<Integer> SENSOR_INFO_TIMESTAMP_SOURCE =
3078 new Key<Integer>("android.sensor.info.timestampSource", int.class);
Zhijun He45fa43a12014-06-13 18:29:37 -07003079
3080 /**
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003081 * <p>Whether the RAW images output from this camera device are subject to
3082 * lens shading correction.</p>
3083 * <p>If TRUE, all images produced by the camera device in the RAW image formats will
3084 * have lens shading correction already applied to it. If FALSE, the images will
3085 * not be adjusted for lens shading correction.
3086 * See {@link CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW android.request.maxNumOutputRaw} for a list of RAW image formats.</p>
3087 * <p>This key will be <code>null</code> for all devices do not report this information.
3088 * Devices with RAW capability will always report this information in this key.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003089 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003090 *
3091 * @see CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW
3092 */
3093 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003094 @NonNull
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003095 public static final Key<Boolean> SENSOR_INFO_LENS_SHADING_APPLIED =
3096 new Key<Boolean>("android.sensor.info.lensShadingApplied", boolean.class);
3097
3098 /**
Ruben Brunk1b02df42015-07-01 12:53:45 -07003099 * <p>The area of the image sensor which corresponds to active pixels prior to the
3100 * application of any geometric distortion correction.</p>
3101 * <p>This is the rectangle representing the size of the active region of the sensor (i.e.
3102 * the region that actually receives light from the scene) before any geometric correction
3103 * has been applied, and should be treated as the active region rectangle for any of the
3104 * raw formats. All metadata associated with raw processing (e.g. the lens shading
3105 * correction map, and radial distortion fields) treats the top, left of this rectangle as
3106 * the origin, (0,0).</p>
3107 * <p>The size of this region determines the maximum field of view and the maximum number of
3108 * pixels that an image from this sensor can contain, prior to the application of
3109 * geometric distortion correction. The effective maximum pixel dimensions of a
3110 * post-distortion-corrected image is given by the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}
3111 * field, and the effective maximum field of view for a post-distortion-corrected image
3112 * can be calculated by applying the geometric distortion correction fields to this
3113 * rectangle, and cropping to the rectangle given in {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
3114 * <p>E.g. to calculate position of a pixel, (x,y), in a processed YUV output image with the
3115 * dimensions in {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} given the position of a pixel,
3116 * (x', y'), in the raw pixel array with dimensions give in
3117 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}:</p>
3118 * <ol>
3119 * <li>Choose a pixel (x', y') within the active array region of the raw buffer given in
3120 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}, otherwise this pixel is considered
3121 * to be outside of the FOV, and will not be shown in the processed output image.</li>
3122 * <li>Apply geometric distortion correction to get the post-distortion pixel coordinate,
3123 * (x_i, y_i). When applying geometric correction metadata, note that metadata for raw
3124 * buffers is defined relative to the top, left of the
3125 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} rectangle.</li>
3126 * <li>If the resulting corrected pixel coordinate is within the region given in
3127 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, then the position of this pixel in the
3128 * processed output image buffer is <code>(x_i - activeArray.left, y_i - activeArray.top)</code>,
3129 * when the top, left coordinate of that buffer is treated as (0, 0).</li>
3130 * </ol>
3131 * <p>Thus, for pixel x',y' = (25, 25) on a sensor where {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}
3132 * is (100,100), {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} is (10, 10, 100, 100),
3133 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} is (20, 20, 80, 80), and the geometric distortion
3134 * correction doesn't change the pixel coordinate, the resulting pixel selected in
3135 * pixel coordinates would be x,y = (25, 25) relative to the top,left of the raw buffer
3136 * with dimensions given in {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}, and would be (5, 5)
3137 * relative to the top,left of post-processed YUV output buffer with dimensions given in
3138 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
3139 * <p>The currently supported fields that correct for geometric distortion are:</p>
3140 * <ol>
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07003141 * <li>{@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}.</li>
Ruben Brunk1b02df42015-07-01 12:53:45 -07003142 * </ol>
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07003143 * <p>If the camera device doesn't support geometric distortion correction, or all of the
3144 * geometric distortion fields are no-ops, this rectangle will be the same as the
3145 * post-distortion-corrected rectangle given in {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
Ruben Brunk1b02df42015-07-01 12:53:45 -07003146 * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of
3147 * the full pixel array, and the size of the full pixel array is given by
3148 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
3149 * <p>The pre-correction active array may be smaller than the full pixel array, since the
3150 * full array may include black calibration pixels or other inactive regions.</p>
3151 * <p><b>Units</b>: Pixel coordinates on the image sensor</p>
3152 * <p>This key is available on all devices.</p>
3153 *
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07003154 * @see CameraCharacteristics#LENS_DISTORTION
Ruben Brunk1b02df42015-07-01 12:53:45 -07003155 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
3156 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
3157 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
3158 */
3159 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003160 @NonNull
Ruben Brunk1b02df42015-07-01 12:53:45 -07003161 public static final Key<android.graphics.Rect> SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE =
3162 new Key<android.graphics.Rect>("android.sensor.info.preCorrectionActiveArraySize", android.graphics.Rect.class);
3163
3164 /**
Ruben Brunk7c062362014-04-15 23:53:53 -07003165 * <p>The standard reference illuminant used as the scene light source when
3166 * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1},
3167 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and
3168 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} matrices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003169 * <p>The values in this key correspond to the values defined for the
Ruben Brunk7c062362014-04-15 23:53:53 -07003170 * EXIF LightSource tag. These illuminants are standard light sources
3171 * that are often used calibrating camera devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003172 * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1},
Ruben Brunk7c062362014-04-15 23:53:53 -07003173 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and
3174 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} will also be present.</p>
3175 * <p>Some devices may choose to provide a second set of calibration
3176 * information for improved quality, including
3177 * {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2} and its corresponding matrices.</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003178 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
3179 * the camera device has RAW capability.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003180 * <p><b>Possible values:</b>
3181 * <ul>
3182 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT DAYLIGHT}</li>
3183 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT FLUORESCENT}</li>
3184 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN TUNGSTEN}</li>
3185 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLASH FLASH}</li>
3186 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER FINE_WEATHER}</li>
3187 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER CLOUDY_WEATHER}</li>
3188 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_SHADE SHADE}</li>
3189 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT DAYLIGHT_FLUORESCENT}</li>
3190 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT DAY_WHITE_FLUORESCENT}</li>
3191 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT COOL_WHITE_FLUORESCENT}</li>
3192 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT WHITE_FLUORESCENT}</li>
3193 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A STANDARD_A}</li>
3194 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B STANDARD_B}</li>
3195 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C STANDARD_C}</li>
3196 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D55 D55}</li>
3197 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D65 D65}</li>
3198 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D75 D75}</li>
3199 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D50 D50}</li>
3200 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN ISO_STUDIO_TUNGSTEN}</li>
3201 * </ul></p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003202 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01003203 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Ruben Brunk7c062362014-04-15 23:53:53 -07003204 *
3205 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1
3206 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM1
3207 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX1
3208 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
3209 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT
3210 * @see #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT
3211 * @see #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN
3212 * @see #SENSOR_REFERENCE_ILLUMINANT1_FLASH
3213 * @see #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER
3214 * @see #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER
3215 * @see #SENSOR_REFERENCE_ILLUMINANT1_SHADE
3216 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT
3217 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT
3218 * @see #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT
3219 * @see #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT
3220 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A
3221 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B
3222 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C
3223 * @see #SENSOR_REFERENCE_ILLUMINANT1_D55
3224 * @see #SENSOR_REFERENCE_ILLUMINANT1_D65
3225 * @see #SENSOR_REFERENCE_ILLUMINANT1_D75
3226 * @see #SENSOR_REFERENCE_ILLUMINANT1_D50
3227 * @see #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN
3228 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003229 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003230 @NonNull
Ruben Brunk7c062362014-04-15 23:53:53 -07003231 public static final Key<Integer> SENSOR_REFERENCE_ILLUMINANT1 =
3232 new Key<Integer>("android.sensor.referenceIlluminant1", int.class);
3233
3234 /**
3235 * <p>The standard reference illuminant used as the scene light source when
3236 * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2},
3237 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and
3238 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} matrices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003239 * <p>See {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1} for more details.</p>
3240 * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2},
Ruben Brunk7c062362014-04-15 23:53:53 -07003241 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and
3242 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} will also be present.</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003243 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
3244 * the camera device has RAW capability.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003245 * <p><b>Range of valid values:</b><br>
3246 * Any value listed in {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003247 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01003248 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Ruben Brunk7c062362014-04-15 23:53:53 -07003249 *
3250 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2
3251 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM2
3252 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX2
3253 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
3254 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003255 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003256 @NonNull
Ruben Brunk7c062362014-04-15 23:53:53 -07003257 public static final Key<Byte> SENSOR_REFERENCE_ILLUMINANT2 =
3258 new Key<Byte>("android.sensor.referenceIlluminant2", byte.class);
3259
3260 /**
3261 * <p>A per-device calibration transform matrix that maps from the
3262 * reference sensor colorspace to the actual device sensor colorspace.</p>
3263 * <p>This matrix is used to correct for per-device variations in the
3264 * sensor colorspace, and is used for processing raw buffer data.</p>
3265 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
3266 * contains a per-device calibration transform that maps colors
3267 * from reference sensor color space (i.e. the "golden module"
3268 * colorspace) into this camera device's native sensor color
3269 * space under the first reference illuminant
3270 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003271 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
3272 * the camera device has RAW capability.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003273 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01003274 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Ruben Brunk7c062362014-04-15 23:53:53 -07003275 *
3276 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
3277 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003278 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003279 @NonNull
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07003280 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM1 =
3281 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform1", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07003282
3283 /**
3284 * <p>A per-device calibration transform matrix that maps from the
3285 * reference sensor colorspace to the actual device sensor colorspace
3286 * (this is the colorspace of the raw buffer data).</p>
3287 * <p>This matrix is used to correct for per-device variations in the
3288 * sensor colorspace, and is used for processing raw buffer data.</p>
3289 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
3290 * contains a per-device calibration transform that maps colors
3291 * from reference sensor color space (i.e. the "golden module"
3292 * colorspace) into this camera device's native sensor color
3293 * space under the second reference illuminant
3294 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p>
3295 * <p>This matrix will only be present if the second reference
3296 * illuminant is present.</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003297 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
3298 * the camera device has RAW capability.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003299 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01003300 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Ruben Brunk7c062362014-04-15 23:53:53 -07003301 *
3302 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
3303 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003304 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003305 @NonNull
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07003306 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM2 =
3307 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform2", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07003308
3309 /**
3310 * <p>A matrix that transforms color values from CIE XYZ color space to
3311 * reference sensor color space.</p>
3312 * <p>This matrix is used to convert from the standard CIE XYZ color
3313 * space to the reference sensor colorspace, and is used when processing
3314 * raw buffer data.</p>
3315 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
3316 * contains a color transform matrix that maps colors from the CIE
3317 * XYZ color space to the reference sensor color space (i.e. the
3318 * "golden module" colorspace) under the first reference illuminant
3319 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p>
3320 * <p>The white points chosen in both the reference sensor color space
3321 * and the CIE XYZ colorspace when calculating this transform will
3322 * match the standard white point for the first reference illuminant
3323 * (i.e. no chromatic adaptation will be applied by this transform).</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003324 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
3325 * the camera device has RAW capability.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003326 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01003327 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Ruben Brunk7c062362014-04-15 23:53:53 -07003328 *
3329 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
3330 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003331 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003332 @NonNull
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07003333 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM1 =
3334 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform1", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07003335
3336 /**
3337 * <p>A matrix that transforms color values from CIE XYZ color space to
3338 * reference sensor color space.</p>
3339 * <p>This matrix is used to convert from the standard CIE XYZ color
3340 * space to the reference sensor colorspace, and is used when processing
3341 * raw buffer data.</p>
3342 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
3343 * contains a color transform matrix that maps colors from the CIE
3344 * XYZ color space to the reference sensor color space (i.e. the
3345 * "golden module" colorspace) under the second reference illuminant
3346 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p>
3347 * <p>The white points chosen in both the reference sensor color space
3348 * and the CIE XYZ colorspace when calculating this transform will
3349 * match the standard white point for the second reference illuminant
3350 * (i.e. no chromatic adaptation will be applied by this transform).</p>
3351 * <p>This matrix will only be present if the second reference
3352 * illuminant is present.</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003353 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
3354 * the camera device has RAW capability.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003355 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01003356 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Ruben Brunk7c062362014-04-15 23:53:53 -07003357 *
3358 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
3359 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003360 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003361 @NonNull
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07003362 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM2 =
3363 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform2", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07003364
3365 /**
3366 * <p>A matrix that transforms white balanced camera colors from the reference
3367 * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
3368 * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
3369 * is used when processing raw buffer data.</p>
3370 * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
3371 * a color transform matrix that maps white balanced colors from the
3372 * reference sensor color space to the CIE XYZ color space with a D50 white
3373 * point.</p>
3374 * <p>Under the first reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1})
3375 * this matrix is chosen so that the standard white point for this reference
3376 * illuminant in the reference sensor colorspace is mapped to D50 in the
3377 * CIE XYZ colorspace.</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003378 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
3379 * the camera device has RAW capability.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003380 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01003381 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Ruben Brunk7c062362014-04-15 23:53:53 -07003382 *
3383 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
3384 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003385 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003386 @NonNull
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07003387 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX1 =
3388 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix1", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07003389
3390 /**
3391 * <p>A matrix that transforms white balanced camera colors from the reference
3392 * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
3393 * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
3394 * is used when processing raw buffer data.</p>
3395 * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
3396 * a color transform matrix that maps white balanced colors from the
3397 * reference sensor color space to the CIE XYZ color space with a D50 white
3398 * point.</p>
3399 * <p>Under the second reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2})
3400 * this matrix is chosen so that the standard white point for this reference
3401 * illuminant in the reference sensor colorspace is mapped to D50 in the
3402 * CIE XYZ colorspace.</p>
3403 * <p>This matrix will only be present if the second reference
3404 * illuminant is present.</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003405 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
3406 * the camera device has RAW capability.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003407 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01003408 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Ruben Brunk7c062362014-04-15 23:53:53 -07003409 *
3410 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
3411 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003412 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003413 @NonNull
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07003414 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX2 =
3415 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix2", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07003416
3417 /**
Ruben Brunk67b47022014-02-07 15:26:29 -08003418 * <p>A fixed black level offset for each of the color filter arrangement
3419 * (CFA) mosaic channels.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003420 * <p>This key specifies the zero light value for each of the CFA mosaic
Ruben Brunke60e29552014-02-18 10:44:17 -08003421 * channels in the camera sensor. The maximal value output by the
3422 * sensor is represented by the value in {@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}.</p>
Ruben Brunk52842e72014-06-05 13:16:45 -07003423 * <p>The values are given in the same order as channels listed for the CFA
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003424 * layout key (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}), i.e. the
Ruben Brunk52842e72014-06-05 13:16:45 -07003425 * nth value given corresponds to the black level offset for the nth
3426 * color channel listed in the CFA.</p>
Zhijun Hecd950b62015-11-12 17:47:52 -08003427 * <p>The black level values of captured images may vary for different
3428 * capture settings (e.g., {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}). This key
3429 * represents a coarse approximation for such case. It is recommended to
3430 * use {@link CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL android.sensor.dynamicBlackLevel} or use pixels from
3431 * {@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions} directly for captures when
3432 * supported by the camera device, which provides more accurate black
3433 * level values. For raw capture in particular, it is recommended to use
3434 * pixels from {@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions} to calculate black
3435 * level values for each frame.</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003436 * <p>For a MONOCHROME camera device, all of the 2x2 channels must have the same values.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003437 * <p><b>Range of valid values:</b><br>
3438 * &gt;= 0 for each.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003439 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Ruben Brunke60e29552014-02-18 10:44:17 -08003440 *
Zhijun Hecd950b62015-11-12 17:47:52 -08003441 * @see CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL
Ruben Brunk52842e72014-06-05 13:16:45 -07003442 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
Ruben Brunke60e29552014-02-18 10:44:17 -08003443 * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL
Zhijun Hecd950b62015-11-12 17:47:52 -08003444 * @see CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS
3445 * @see CaptureRequest#SENSOR_SENSITIVITY
Ruben Brunk67b47022014-02-07 15:26:29 -08003446 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003447 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003448 @NonNull
Ruben Brunk52842e72014-06-05 13:16:45 -07003449 public static final Key<android.hardware.camera2.params.BlackLevelPattern> SENSOR_BLACK_LEVEL_PATTERN =
3450 new Key<android.hardware.camera2.params.BlackLevelPattern>("android.sensor.blackLevelPattern", android.hardware.camera2.params.BlackLevelPattern.class);
Ruben Brunk67b47022014-02-07 15:26:29 -08003451
3452 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003453 * <p>Maximum sensitivity that is implemented
Zhijun He153ac102014-02-03 12:25:12 -08003454 * purely through analog gain.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003455 * <p>For {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} values less than or
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003456 * equal to this, all applied gain must be analog. For
Zhijun He153ac102014-02-03 12:25:12 -08003457 * values above this, the gain applied can be a mix of analog and
3458 * digital.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003459 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003460 * <p><b>Full capability</b> -
3461 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3462 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Alex Raye83c4eb2013-10-02 17:14:36 -07003463 *
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003464 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08003465 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003466 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003467 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003468 @NonNull
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003469 public static final Key<Integer> SENSOR_MAX_ANALOG_SENSITIVITY =
3470 new Key<Integer>("android.sensor.maxAnalogSensitivity", int.class);
3471
3472 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003473 * <p>Clockwise angle through which the output image needs to be rotated to be
3474 * upright on the device screen in its native orientation.</p>
3475 * <p>Also defines the direction of rolling shutter readout, which is from top to bottom in
3476 * the sensor's coordinate system.</p>
3477 * <p><b>Units</b>: Degrees of clockwise rotation; always a multiple of
3478 * 90</p>
3479 * <p><b>Range of valid values:</b><br>
3480 * 0, 90, 180, 270</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003481 * <p>This key is available on all devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003482 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003483 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003484 @NonNull
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003485 public static final Key<Integer> SENSOR_ORIENTATION =
3486 new Key<Integer>("android.sensor.orientation", int.class);
3487
3488 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003489 * <p>List of sensor test pattern modes for {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}
3490 * supported by this camera device.</p>
3491 * <p>Defaults to OFF, and always includes OFF if defined.</p>
3492 * <p><b>Range of valid values:</b><br>
3493 * Any value listed in {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003494 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08003495 *
3496 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
Igor Murashkinc127f052014-01-17 18:06:02 -08003497 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003498 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003499 @NonNull
Zhijun Hea4866242014-03-27 23:51:34 -07003500 public static final Key<int[]> SENSOR_AVAILABLE_TEST_PATTERN_MODES =
3501 new Key<int[]>("android.sensor.availableTestPatternModes", int[].class);
Igor Murashkinc127f052014-01-17 18:06:02 -08003502
3503 /**
Zhijun Hecd950b62015-11-12 17:47:52 -08003504 * <p>List of disjoint rectangles indicating the sensor
3505 * optically shielded black pixel regions.</p>
3506 * <p>In most camera sensors, the active array is surrounded by some
3507 * optically shielded pixel areas. By blocking light, these pixels
3508 * provides a reliable black reference for black level compensation
3509 * in active array region.</p>
3510 * <p>This key provides a list of disjoint rectangles specifying the
3511 * regions of optically shielded (with metal shield) black pixel
3512 * regions if the camera device is capable of reading out these black
3513 * pixels in the output raw images. In comparison to the fixed black
3514 * level values reported by {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern}, this key
3515 * may provide a more accurate way for the application to calculate
3516 * black level of each captured raw images.</p>
3517 * <p>When this key is reported, the {@link CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL android.sensor.dynamicBlackLevel} and
3518 * {@link CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL android.sensor.dynamicWhiteLevel} will also be reported.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003519 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Zhijun Hecd950b62015-11-12 17:47:52 -08003520 *
3521 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
3522 * @see CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL
3523 * @see CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL
3524 */
3525 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003526 @NonNull
Zhijun Hecd950b62015-11-12 17:47:52 -08003527 public static final Key<android.graphics.Rect[]> SENSOR_OPTICAL_BLACK_REGIONS =
3528 new Key<android.graphics.Rect[]>("android.sensor.opticalBlackRegions", android.graphics.Rect[].class);
3529
3530 /**
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003531 * <p>List of lens shading modes for {@link CaptureRequest#SHADING_MODE android.shading.mode} that are supported by this camera device.</p>
3532 * <p>This list contains lens shading modes that can be set for the camera device.
3533 * Camera devices that support the MANUAL_POST_PROCESSING capability will always
3534 * list OFF and FAST mode. This includes all FULL level devices.
3535 * LEGACY devices will always only support FAST mode.</p>
3536 * <p><b>Range of valid values:</b><br>
3537 * Any value listed in {@link CaptureRequest#SHADING_MODE android.shading.mode}</p>
3538 * <p>This key is available on all devices.</p>
3539 *
3540 * @see CaptureRequest#SHADING_MODE
3541 */
3542 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003543 @NonNull
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003544 public static final Key<int[]> SHADING_AVAILABLE_MODES =
3545 new Key<int[]>("android.shading.availableModes", int[].class);
3546
3547 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003548 * <p>List of face detection modes for {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} that are
3549 * supported by this camera device.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003550 * <p>OFF is always supported.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003551 * <p><b>Range of valid values:</b><br>
3552 * Any value listed in {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003553 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003554 *
3555 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003556 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003557 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003558 @NonNull
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07003559 public static final Key<int[]> STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES =
3560 new Key<int[]>("android.statistics.info.availableFaceDetectModes", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003561
3562 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003563 * <p>The maximum number of simultaneously detectable
3564 * faces.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003565 * <p><b>Range of valid values:</b><br>
3566 * 0 for cameras without available face detection; otherwise:
3567 * <code>&gt;=4</code> for LIMITED or FULL hwlevel devices or
3568 * <code>&gt;0</code> for LEGACY devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003569 * <p>This key is available on all devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003570 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003571 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003572 @NonNull
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003573 public static final Key<Integer> STATISTICS_INFO_MAX_FACE_COUNT =
3574 new Key<Integer>("android.statistics.info.maxFaceCount", int.class);
3575
3576 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003577 * <p>List of hot pixel map output modes for {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode} that are
3578 * supported by this camera device.</p>
3579 * <p>If no hotpixel map output is available for this camera device, this will contain only
3580 * <code>false</code>.</p>
3581 * <p>ON is always supported on devices with the RAW capability.</p>
3582 * <p><b>Range of valid values:</b><br>
3583 * Any value listed in {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode}</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003584 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08003585 *
3586 * @see CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE
3587 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003588 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003589 @NonNull
Ruben Brunk9d454fd2014-03-04 14:11:52 -08003590 public static final Key<boolean[]> STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES =
3591 new Key<boolean[]>("android.statistics.info.availableHotPixelMapModes", boolean[].class);
3592
3593 /**
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003594 * <p>List of lens shading map output modes for {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} that
3595 * are supported by this camera device.</p>
3596 * <p>If no lens shading map output is available for this camera device, this key will
3597 * contain only OFF.</p>
3598 * <p>ON is always supported on devices with the RAW capability.
3599 * LEGACY mode devices will always only support OFF.</p>
3600 * <p><b>Range of valid values:</b><br>
3601 * Any value listed in {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode}</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003602 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003603 *
3604 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
3605 */
3606 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003607 @NonNull
Yin-Chia Yeh656931d2015-05-22 16:37:27 -07003608 public static final Key<int[]> STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES =
3609 new Key<int[]>("android.statistics.info.availableLensShadingMapModes", int[].class);
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003610
3611 /**
Chien-Yu Chenc9cf5b92018-01-18 12:24:40 -08003612 * <p>List of OIS data output modes for {@link CaptureRequest#STATISTICS_OIS_DATA_MODE android.statistics.oisDataMode} that
3613 * are supported by this camera device.</p>
3614 * <p>If no OIS data output is available for this camera device, this key will
3615 * contain only OFF.</p>
3616 * <p><b>Range of valid values:</b><br>
3617 * Any value listed in {@link CaptureRequest#STATISTICS_OIS_DATA_MODE android.statistics.oisDataMode}</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003618 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Chien-Yu Chenc9cf5b92018-01-18 12:24:40 -08003619 *
3620 * @see CaptureRequest#STATISTICS_OIS_DATA_MODE
3621 */
3622 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003623 @NonNull
Chien-Yu Chenc9cf5b92018-01-18 12:24:40 -08003624 public static final Key<int[]> STATISTICS_INFO_AVAILABLE_OIS_DATA_MODES =
3625 new Key<int[]>("android.statistics.info.availableOisDataModes", int[].class);
3626
3627 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003628 * <p>Maximum number of supported points in the
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003629 * tonemap curve that can be used for {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003630 * <p>If the actual number of points provided by the application (in {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}*) is
3631 * less than this maximum, the camera device will resample the curve to its internal
3632 * representation, using linear interpolation.</p>
Igor Murashkine0060932014-01-17 17:24:11 -08003633 * <p>The output curves in the result metadata may have a different number
3634 * of points than the input curves, and will represent the actual
3635 * hardware curves used as closely as possible when linearly interpolated.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003636 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003637 * <p><b>Full capability</b> -
3638 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3639 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Igor Murashkine0060932014-01-17 17:24:11 -08003640 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003641 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003642 * @see CaptureRequest#TONEMAP_CURVE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003643 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003644 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003645 @NonNull
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003646 public static final Key<Integer> TONEMAP_MAX_CURVE_POINTS =
3647 new Key<Integer>("android.tonemap.maxCurvePoints", int.class);
3648
3649 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003650 * <p>List of tonemapping modes for {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} that are supported by this camera
3651 * device.</p>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08003652 * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always contain
3653 * at least one of below mode combinations:</p>
3654 * <ul>
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07003655 * <li>CONTRAST_CURVE, FAST and HIGH_QUALITY</li>
3656 * <li>GAMMA_VALUE, PRESET_CURVE, FAST and HIGH_QUALITY</li>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08003657 * </ul>
3658 * <p>This includes all FULL level devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003659 * <p><b>Range of valid values:</b><br>
3660 * Any value listed in {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003661 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003662 * <p><b>Full capability</b> -
3663 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3664 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08003665 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003666 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk6dc379c2014-03-04 15:04:00 -08003667 * @see CaptureRequest#TONEMAP_MODE
3668 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003669 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003670 @NonNull
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07003671 public static final Key<int[]> TONEMAP_AVAILABLE_TONE_MAP_MODES =
3672 new Key<int[]>("android.tonemap.availableToneMapModes", int[].class);
Ruben Brunk6dc379c2014-03-04 15:04:00 -08003673
3674 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003675 * <p>A list of camera LEDs that are available on this system.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003676 * <p><b>Possible values:</b>
3677 * <ul>
3678 * <li>{@link #LED_AVAILABLE_LEDS_TRANSMIT TRANSMIT}</li>
3679 * </ul></p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003680 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003681 * @see #LED_AVAILABLE_LEDS_TRANSMIT
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003682 * @hide
3683 */
3684 public static final Key<int[]> LED_AVAILABLE_LEDS =
3685 new Key<int[]>("android.led.availableLeds", int[].class);
3686
3687 /**
Igor Murashkine46c0da2014-02-07 18:34:37 -08003688 * <p>Generally classifies the overall set of the camera device functionality.</p>
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08003689 * <p>The supported hardware level is a high-level description of the camera device's
3690 * capabilities, summarizing several capabilities into one field. Each level adds additional
3691 * features to the previous one, and is always a strict superset of the previous level.
3692 * The ordering is <code>LEGACY &lt; LIMITED &lt; FULL &lt; LEVEL_3</code>.</p>
3693 * <p>Starting from <code>LEVEL_3</code>, the level enumerations are guaranteed to be in increasing
3694 * numerical value as well. To check if a given device is at least at a given hardware level,
3695 * the following code snippet can be used:</p>
3696 * <pre><code>// Returns true if the device supports the required hardware level, or better.
3697 * boolean isHardwareLevelSupported(CameraCharacteristics c, int requiredLevel) {
Yin-Chia Yehc5657002018-07-13 13:42:43 -07003698 * final int[] sortedHwLevels = {
3699 * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY,
3700 * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL,
3701 * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED,
3702 * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL,
3703 * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_3
3704 * };
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08003705 * int deviceLevel = c.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
Yin-Chia Yehc5657002018-07-13 13:42:43 -07003706 * if (requiredLevel == deviceLevel) {
3707 * return true;
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08003708 * }
Yin-Chia Yehc5657002018-07-13 13:42:43 -07003709 *
3710 * for (int sortedlevel : sortedHwLevels) {
3711 * if (sortedlevel == requiredLevel) {
3712 * return true;
3713 * } else if (sortedlevel == deviceLevel) {
3714 * return false;
3715 * }
3716 * }
3717 * return false; // Should never reach here
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08003718 * }
3719 * </code></pre>
3720 * <p>At a high level, the levels are:</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08003721 * <ul>
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08003722 * <li><code>LEGACY</code> devices operate in a backwards-compatibility mode for older
3723 * Android devices, and have very limited capabilities.</li>
3724 * <li><code>LIMITED</code> devices represent the
3725 * baseline feature set, and may also include additional capabilities that are
3726 * subsets of <code>FULL</code>.</li>
3727 * <li><code>FULL</code> devices additionally support per-frame manual control of sensor, flash, lens and
3728 * post-processing settings, and image capture at a high rate.</li>
3729 * <li><code>LEVEL_3</code> devices additionally support YUV reprocessing and RAW image capture, along
3730 * with additional output stream configurations.</li>
Yin-Chia Yehc5657002018-07-13 13:42:43 -07003731 * <li><code>EXTERNAL</code> devices are similar to <code>LIMITED</code> devices with exceptions like some sensor or
Yin-Chia Yeh428256d2019-01-23 15:27:47 -08003732 * lens information not reported or less stable framerates.</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -08003733 * </ul>
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08003734 * <p>See the individual level enums for full descriptions of the supported capabilities. The
3735 * {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} entry describes the device's capabilities at a
3736 * finer-grain level, if needed. In addition, many controls have their available settings or
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003737 * ranges defined in individual entries from {@link android.hardware.camera2.CameraCharacteristics }.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003738 * <p>Some features are not part of any particular hardware level or capability and must be
3739 * queried separately. These include:</p>
3740 * <ul>
3741 * <li>Calibrated timestamps ({@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} <code>==</code> REALTIME)</li>
3742 * <li>Precision lens control ({@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} <code>==</code> CALIBRATED)</li>
3743 * <li>Face detection ({@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes})</li>
3744 * <li>Optical or electrical image stabilization
3745 * ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization},
3746 * {@link CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES android.control.availableVideoStabilizationModes})</li>
3747 * </ul>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003748 * <p><b>Possible values:</b>
3749 * <ul>
3750 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED}</li>
3751 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL}</li>
3752 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY LEGACY}</li>
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08003753 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_3 3}</li>
Yin-Chia Yeh43cea5a2018-01-19 11:38:12 -08003754 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL EXTERNAL}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003755 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003756 * <p>This key is available on all devices.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08003757 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003758 * @see CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES
3759 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
3760 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
Igor Murashkine46c0da2014-02-07 18:34:37 -08003761 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003762 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
3763 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003764 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED
3765 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_FULL
Ruben Brunk4a61a862014-07-01 16:00:26 -07003766 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08003767 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_3
Yin-Chia Yeh43cea5a2018-01-19 11:38:12 -08003768 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003769 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003770 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003771 @NonNull
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003772 public static final Key<Integer> INFO_SUPPORTED_HARDWARE_LEVEL =
3773 new Key<Integer>("android.info.supportedHardwareLevel", int.class);
3774
Igor Murashkin3865a842014-01-17 18:18:39 -08003775 /**
Chien-Yu Chena1d1d5b2018-01-03 12:14:53 -08003776 * <p>A short string for manufacturer version information about the camera device, such as
3777 * ISP hardware, sensors, etc.</p>
3778 * <p>This can be used in {@link android.media.ExifInterface#TAG_IMAGE_DESCRIPTION TAG_IMAGE_DESCRIPTION}
3779 * in jpeg EXIF. This key may be absent if no version information is available on the
3780 * device.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003781 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Chien-Yu Chena1d1d5b2018-01-03 12:14:53 -08003782 */
3783 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003784 @NonNull
Chien-Yu Chena1d1d5b2018-01-03 12:14:53 -08003785 public static final Key<String> INFO_VERSION =
3786 new Key<String>("android.info.version", String.class);
3787
3788 /**
Igor Murashkin3865a842014-01-17 18:18:39 -08003789 * <p>The maximum number of frames that can occur after a request
3790 * (different than the previous) has been submitted, and before the
Chien-Yu Chen161a76c2015-06-26 11:23:55 -07003791 * result's state becomes synchronized.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08003792 * <p>This defines the maximum distance (in number of metadata results),
Chien-Yu Chen161a76c2015-06-26 11:23:55 -07003793 * between the frame number of the request that has new controls to apply
3794 * and the frame number of the result that has all the controls applied.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08003795 * <p>In other words this acts as an upper boundary for how many frames
3796 * must occur before the camera device knows for a fact that the new
3797 * submitted camera settings have been applied in outgoing frames.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003798 * <p><b>Units</b>: Frame counts</p>
3799 * <p><b>Possible values:</b>
3800 * <ul>
3801 * <li>{@link #SYNC_MAX_LATENCY_PER_FRAME_CONTROL PER_FRAME_CONTROL}</li>
3802 * <li>{@link #SYNC_MAX_LATENCY_UNKNOWN UNKNOWN}</li>
3803 * </ul></p>
3804 * <p><b>Available values for this device:</b><br>
3805 * A positive value, PER_FRAME_CONTROL, or UNKNOWN.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003806 * <p>This key is available on all devices.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08003807 * @see #SYNC_MAX_LATENCY_PER_FRAME_CONTROL
3808 * @see #SYNC_MAX_LATENCY_UNKNOWN
3809 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003810 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003811 @NonNull
Igor Murashkin3865a842014-01-17 18:18:39 -08003812 public static final Key<Integer> SYNC_MAX_LATENCY =
3813 new Key<Integer>("android.sync.maxLatency", int.class);
3814
Eino-Ville Talvala24c369e2015-02-23 15:55:55 -08003815 /**
Zhijun He513f7c32015-04-24 18:23:54 -07003816 * <p>The maximal camera capture pipeline stall (in unit of frame count) introduced by a
3817 * reprocess capture request.</p>
3818 * <p>The key describes the maximal interference that one reprocess (input) request
3819 * can introduce to the camera simultaneous streaming of regular (output) capture
3820 * requests, including repeating requests.</p>
3821 * <p>When a reprocessing capture request is submitted while a camera output repeating request
3822 * (e.g. preview) is being served by the camera device, it may preempt the camera capture
3823 * pipeline for at least one frame duration so that the camera device is unable to process
3824 * the following capture request in time for the next sensor start of exposure boundary.
3825 * When this happens, the application may observe a capture time gap (longer than one frame
3826 * duration) between adjacent capture output frames, which usually exhibits as preview
3827 * glitch if the repeating request output targets include a preview surface. This key gives
3828 * the worst-case number of frame stall introduced by one reprocess request with any kind of
3829 * formats/sizes combination.</p>
3830 * <p>If this key reports 0, it means a reprocess request doesn't introduce any glitch to the
3831 * ongoing camera repeating request outputs, as if this reprocess request is never issued.</p>
Chien-Yu Chen8062d312015-05-12 14:24:10 -07003832 * <p>This key is supported if the camera device supports PRIVATE or YUV reprocessing (
3833 * i.e. {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains PRIVATE_REPROCESSING or
Zhijun He513f7c32015-04-24 18:23:54 -07003834 * YUV_REPROCESSING).</p>
3835 * <p><b>Units</b>: Number of frames.</p>
3836 * <p><b>Range of valid values:</b><br>
3837 * &lt;= 4</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003838 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Zhijun He513f7c32015-04-24 18:23:54 -07003839 * <p><b>Limited capability</b> -
3840 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3841 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3842 *
3843 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3844 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
3845 */
3846 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003847 @NonNull
Zhijun He513f7c32015-04-24 18:23:54 -07003848 public static final Key<Integer> REPROCESS_MAX_CAPTURE_STALL =
3849 new Key<Integer>("android.reprocess.maxCaptureStall", int.class);
3850
3851 /**
Eino-Ville Talvala24c369e2015-02-23 15:55:55 -08003852 * <p>The available depth dataspace stream
3853 * configurations that this camera device supports
3854 * (i.e. format, width, height, output/input stream).</p>
3855 * <p>These are output stream configurations for use with
3856 * dataSpace HAL_DATASPACE_DEPTH. The configurations are
3857 * listed as <code>(format, width, height, input?)</code> tuples.</p>
3858 * <p>Only devices that support depth output for at least
3859 * the HAL_PIXEL_FORMAT_Y16 dense depth map may include
3860 * this entry.</p>
3861 * <p>A device that also supports the HAL_PIXEL_FORMAT_BLOB
3862 * sparse depth point cloud must report a single entry for
3863 * the format in this list as <code>(HAL_PIXEL_FORMAT_BLOB,
3864 * android.depth.maxDepthSamples, 1, OUTPUT)</code> in addition to
3865 * the entries for HAL_PIXEL_FORMAT_Y16.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003866 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Eino-Ville Talvala24c369e2015-02-23 15:55:55 -08003867 * <p><b>Limited capability</b> -
3868 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3869 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3870 *
3871 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3872 * @hide
3873 */
3874 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS =
3875 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.depth.availableDepthStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
3876
3877 /**
3878 * <p>This lists the minimum frame duration for each
3879 * format/size combination for depth output formats.</p>
3880 * <p>This should correspond to the frame duration when only that
3881 * stream is active, with all processing (typically in android.*.mode)
3882 * set to either OFF or FAST.</p>
3883 * <p>When multiple streams are used in a request, the minimum frame
3884 * duration will be max(individual stream min durations).</p>
3885 * <p>The minimum frame duration of a stream (of a particular format, size)
3886 * is the same regardless of whether the stream is input or output.</p>
3887 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and
3888 * android.scaler.availableStallDurations for more details about
3889 * calculating the max frame rate.</p>
Eino-Ville Talvala24c369e2015-02-23 15:55:55 -08003890 * <p><b>Units</b>: (format, width, height, ns) x n</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003891 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Eino-Ville Talvala24c369e2015-02-23 15:55:55 -08003892 * <p><b>Limited capability</b> -
3893 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3894 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3895 *
3896 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3897 * @see CaptureRequest#SENSOR_FRAME_DURATION
3898 * @hide
3899 */
3900 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS =
3901 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
3902
3903 /**
3904 * <p>This lists the maximum stall duration for each
Zhijun He513f7c32015-04-24 18:23:54 -07003905 * output format/size combination for depth streams.</p>
Eino-Ville Talvala24c369e2015-02-23 15:55:55 -08003906 * <p>A stall duration is how much extra time would get added
3907 * to the normal minimum frame duration for a repeating request
3908 * that has streams with non-zero stall.</p>
3909 * <p>This functions similarly to
3910 * android.scaler.availableStallDurations for depth
3911 * streams.</p>
3912 * <p>All depth output stream formats may have a nonzero stall
3913 * duration.</p>
3914 * <p><b>Units</b>: (format, width, height, ns) x n</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003915 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Eino-Ville Talvala24c369e2015-02-23 15:55:55 -08003916 * <p><b>Limited capability</b> -
3917 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3918 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3919 *
3920 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3921 * @hide
3922 */
3923 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS =
3924 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
3925
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -07003926 /**
3927 * <p>Indicates whether a capture request may target both a
3928 * DEPTH16 / DEPTH_POINT_CLOUD output, and normal color outputs (such as
3929 * YUV_420_888, JPEG, or RAW) simultaneously.</p>
3930 * <p>If TRUE, including both depth and color outputs in a single
3931 * capture request is not supported. An application must interleave color
3932 * and depth requests. If FALSE, a single request can target both types
3933 * of output.</p>
3934 * <p>Typically, this restriction exists on camera devices that
3935 * need to emit a specific pattern or wavelength of light to
3936 * measure depth values, which causes the color image to be
3937 * corrupted during depth measurement.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003938 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -07003939 * <p><b>Limited capability</b> -
3940 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3941 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3942 *
3943 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3944 */
3945 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003946 @NonNull
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -07003947 public static final Key<Boolean> DEPTH_DEPTH_IS_EXCLUSIVE =
3948 new Key<Boolean>("android.depth.depthIsExclusive", boolean.class);
3949
Shuzhen Wang23d29382017-11-26 17:24:56 -08003950 /**
Emilian Peev2776ca32018-09-18 14:00:39 +01003951 * <p>Recommended depth stream configurations for common client use cases.</p>
3952 * <p>Optional subset of the android.depth.availableDepthStreamConfigurations that
3953 * contains similar tuples listed as
3954 * (i.e. width, height, format, output/input stream, usecase bit field).
3955 * Camera devices will be able to suggest particular depth stream configurations which are
3956 * power and performance efficient for specific use cases. For more information about
3957 * retrieving the suggestions see
3958 * {@link android.hardware.camera2.CameraCharacteristics#getRecommendedStreamConfigurationMap }.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003959 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Emilian Peev2776ca32018-09-18 14:00:39 +01003960 * @hide
3961 */
3962 public static final Key<android.hardware.camera2.params.RecommendedStreamConfiguration[]> DEPTH_AVAILABLE_RECOMMENDED_DEPTH_STREAM_CONFIGURATIONS =
3963 new Key<android.hardware.camera2.params.RecommendedStreamConfiguration[]>("android.depth.availableRecommendedDepthStreamConfigurations", android.hardware.camera2.params.RecommendedStreamConfiguration[].class);
3964
3965 /**
Emilian Peev934ffa62019-01-04 17:48:31 +00003966 * <p>The available dynamic depth dataspace stream
3967 * configurations that this camera device supports
3968 * (i.e. format, width, height, output/input stream).</p>
3969 * <p>These are output stream configurations for use with
3970 * dataSpace DYNAMIC_DEPTH. The configurations are
3971 * listed as <code>(format, width, height, input?)</code> tuples.</p>
3972 * <p>Only devices that support depth output for at least
3973 * the HAL_PIXEL_FORMAT_Y16 dense depth map along with
3974 * HAL_PIXEL_FORMAT_BLOB with the same size or size with
3975 * the same aspect ratio can have dynamic depth dataspace
3976 * stream configuration. {@link CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE android.depth.depthIsExclusive} also
3977 * needs to be set to FALSE.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003978 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Emilian Peev934ffa62019-01-04 17:48:31 +00003979 *
3980 * @see CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE
3981 * @hide
3982 */
3983 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS =
3984 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.depth.availableDynamicDepthStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
3985
3986 /**
3987 * <p>This lists the minimum frame duration for each
3988 * format/size combination for dynamic depth output streams.</p>
3989 * <p>This should correspond to the frame duration when only that
3990 * stream is active, with all processing (typically in android.*.mode)
3991 * set to either OFF or FAST.</p>
3992 * <p>When multiple streams are used in a request, the minimum frame
3993 * duration will be max(individual stream min durations).</p>
3994 * <p>The minimum frame duration of a stream (of a particular format, size)
3995 * is the same regardless of whether the stream is input or output.</p>
3996 * <p><b>Units</b>: (format, width, height, ns) x n</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08003997 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Emilian Peev934ffa62019-01-04 17:48:31 +00003998 * @hide
3999 */
4000 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS =
4001 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDynamicDepthMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
4002
4003 /**
4004 * <p>This lists the maximum stall duration for each
4005 * output format/size combination for dynamic depth streams.</p>
4006 * <p>A stall duration is how much extra time would get added
4007 * to the normal minimum frame duration for a repeating request
4008 * that has streams with non-zero stall.</p>
4009 * <p>All dynamic depth output streams may have a nonzero stall
4010 * duration.</p>
4011 * <p><b>Units</b>: (format, width, height, ns) x n</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08004012 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Emilian Peev934ffa62019-01-04 17:48:31 +00004013 * @hide
4014 */
4015 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS =
4016 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDynamicDepthStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
4017
4018 /**
Shuzhen Wang23d29382017-11-26 17:24:56 -08004019 * <p>String containing the ids of the underlying physical cameras.</p>
Shuzhen Wang61aaa322018-11-19 16:04:57 -08004020 * <p>For a logical camera, this is concatenation of all underlying physical camera IDs.
4021 * The null terminator for physical camera ID must be preserved so that the whole string
4022 * can be tokenized using '\0' to generate list of physical camera IDs.</p>
4023 * <p>For example, if the physical camera IDs of the logical camera are "2" and "3", the
Shuzhen Wang23d29382017-11-26 17:24:56 -08004024 * value of this tag will be ['2', '\0', '3', '\0'].</p>
Shuzhen Wang61aaa322018-11-19 16:04:57 -08004025 * <p>The number of physical camera IDs must be no less than 2.</p>
Shuzhen Wang23d29382017-11-26 17:24:56 -08004026 * <p><b>Units</b>: UTF-8 null-terminated string</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08004027 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Shuzhen Wang23d29382017-11-26 17:24:56 -08004028 * <p><b>Limited capability</b> -
4029 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
4030 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
4031 *
4032 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
4033 * @hide
4034 */
4035 public static final Key<byte[]> LOGICAL_MULTI_CAMERA_PHYSICAL_IDS =
4036 new Key<byte[]>("android.logicalMultiCamera.physicalIds", byte[].class);
4037
4038 /**
4039 * <p>The accuracy of frame timestamp synchronization between physical cameras</p>
4040 * <p>The accuracy of the frame timestamp synchronization determines the physical cameras'
4041 * ability to start exposure at the same time. If the sensorSyncType is CALIBRATED,
4042 * the physical camera sensors usually run in master-slave mode so that their shutter
4043 * time is synchronized. For APPROXIMATE sensorSyncType, the camera sensors usually run in
4044 * master-master mode, and there could be offset between their start of exposure.</p>
4045 * <p>In both cases, all images generated for a particular capture request still carry the same
4046 * timestamps, so that they can be used to look up the matching frame number and
4047 * onCaptureStarted callback.</p>
Shuzhen Wang2da73f42019-03-12 15:16:06 -07004048 * <p>This tag is only applicable if the logical camera device supports concurrent physical
4049 * streams from different physical cameras.</p>
Shuzhen Wang23d29382017-11-26 17:24:56 -08004050 * <p><b>Possible values:</b>
4051 * <ul>
4052 * <li>{@link #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE APPROXIMATE}</li>
4053 * <li>{@link #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED CALIBRATED}</li>
4054 * </ul></p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08004055 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Shuzhen Wang23d29382017-11-26 17:24:56 -08004056 * <p><b>Limited capability</b> -
4057 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
4058 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
4059 *
4060 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
4061 * @see #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE
4062 * @see #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED
4063 */
4064 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08004065 @NonNull
Shuzhen Wang23d29382017-11-26 17:24:56 -08004066 public static final Key<Integer> LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE =
4067 new Key<Integer>("android.logicalMultiCamera.sensorSyncType", int.class);
4068
Eino-Ville Talvala41670722018-03-13 19:43:07 -07004069 /**
4070 * <p>List of distortion correction modes for {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} that are
4071 * supported by this camera device.</p>
4072 * <p>No device is required to support this API; such devices will always list only 'OFF'.
4073 * All devices that support this API will list both FAST and HIGH_QUALITY.</p>
4074 * <p><b>Range of valid values:</b><br>
4075 * Any value listed in {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode}</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08004076 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Eino-Ville Talvala41670722018-03-13 19:43:07 -07004077 *
4078 * @see CaptureRequest#DISTORTION_CORRECTION_MODE
4079 */
4080 @PublicKey
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08004081 @NonNull
Eino-Ville Talvala41670722018-03-13 19:43:07 -07004082 public static final Key<int[]> DISTORTION_CORRECTION_AVAILABLE_MODES =
4083 new Key<int[]>("android.distortionCorrection.availableModes", int[].class);
4084
Shuzhen Wangf655b1c2018-12-28 15:40:36 -08004085 /**
4086 * <p>The available HEIC (ISO/IEC 23008-12) stream
4087 * configurations that this camera device supports
4088 * (i.e. format, width, height, output/input stream).</p>
4089 * <p>The configurations are listed as <code>(format, width, height, input?)</code> tuples.</p>
4090 * <p>If the camera device supports HEIC image format, it will support identical set of stream
4091 * combinations involving HEIC image format, compared to the combinations involving JPEG
4092 * image format as required by the device's hardware level and capabilities.</p>
4093 * <p>All the static, control, and dynamic metadata tags related to JPEG apply to HEIC formats.
4094 * Configuring JPEG and HEIC streams at the same time is not supported.</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08004095 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Shuzhen Wangf655b1c2018-12-28 15:40:36 -08004096 * <p><b>Limited capability</b> -
4097 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
4098 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
4099 *
4100 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
4101 * @hide
4102 */
4103 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS =
4104 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.heic.availableHeicStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
4105
4106 /**
4107 * <p>This lists the minimum frame duration for each
4108 * format/size combination for HEIC output formats.</p>
4109 * <p>This should correspond to the frame duration when only that
4110 * stream is active, with all processing (typically in android.*.mode)
4111 * set to either OFF or FAST.</p>
4112 * <p>When multiple streams are used in a request, the minimum frame
4113 * duration will be max(individual stream min durations).</p>
4114 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and
4115 * android.scaler.availableStallDurations for more details about
4116 * calculating the max frame rate.</p>
4117 * <p><b>Units</b>: (format, width, height, ns) x n</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08004118 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Shuzhen Wangf655b1c2018-12-28 15:40:36 -08004119 * <p><b>Limited capability</b> -
4120 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
4121 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
4122 *
4123 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
4124 * @see CaptureRequest#SENSOR_FRAME_DURATION
4125 * @hide
4126 */
4127 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS =
4128 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.heic.availableHeicMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
4129
4130 /**
4131 * <p>This lists the maximum stall duration for each
4132 * output format/size combination for HEIC streams.</p>
4133 * <p>A stall duration is how much extra time would get added
4134 * to the normal minimum frame duration for a repeating request
4135 * that has streams with non-zero stall.</p>
4136 * <p>This functions similarly to
4137 * android.scaler.availableStallDurations for HEIC
4138 * streams.</p>
4139 * <p>All HEIC output stream formats may have a nonzero stall
4140 * duration.</p>
4141 * <p><b>Units</b>: (format, width, height, ns) x n</p>
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08004142 * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
Shuzhen Wangf655b1c2018-12-28 15:40:36 -08004143 * <p><b>Limited capability</b> -
4144 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
4145 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
4146 *
4147 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
4148 * @hide
4149 */
4150 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> HEIC_AVAILABLE_HEIC_STALL_DURATIONS =
4151 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.heic.availableHeicStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
4152
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004153 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
4154 * End generated code
4155 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
Igor Murashkin6c76f582014-07-15 17:19:49 -07004156
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004157
4158
Shuzhen Wang1484a21e2019-02-28 10:01:00 -08004159
4160
4161
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08004162}