blob: 0e4ff78af1e012775034757f5de4d816c293bbda [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;
Mathew Inwoodbcbe4402018-08-08 15:42:59 +010021import android.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 */
Justin Yunf01e40c2018-05-18 20:39:45 +090088 public Key(String name, String fallbackName, Class<T> type) {
89 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 */
Igor Murashkind6d65152014-05-19 16:31:02 -0700100 public Key(String name, Class<T> type) {
101 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
300 * {@link android.Manifest.permission#CAMERA} permission. The list can be null in case
301 * there are no currently present keys that need additional permission.
302 */
303 public List<Key<?>> getKeysNeedingPermission() {
304 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) {
311 return null;
312 }
313 mKeysNeedingPermission =
314 getAvailableKeyList(CameraCharacteristics.class, crKeyTyped, filterTags,
315 /*includeSynthetic*/ false);
316 }
317 return mKeysNeedingPermission;
318 }
319
320 /**
Emilian Peev2776ca32018-09-18 14:00:39 +0100321 * <p>Retrieve camera device recommended stream configuration map
322 * {@link RecommendedStreamConfigurationMap} for a given use case.</p>
323 *
324 * <p>The stream configurations advertised here are efficient in terms of power and performance
325 * for common use cases like preview, video, snapshot, etc. The recommended maps are usually
326 * only small subsets of the exhaustive list provided in
327 * {@link #SCALER_STREAM_CONFIGURATION_MAP} and suggested for a particular use case by the
328 * camera device implementation. For further information about the expected configurations in
329 * various scenarios please refer to:
330 * <ul>
331 * <li>{@link RecommendedStreamConfigurationMap#USECASE_PREVIEW}</li>
332 * <li>{@link RecommendedStreamConfigurationMap#USECASE_RECORD}</li>
333 * <li>{@link RecommendedStreamConfigurationMap#USECASE_VIDEO_SNAPSHOT}</li>
334 * <li>{@link RecommendedStreamConfigurationMap#USECASE_SNAPSHOT}</li>
335 * <li>{@link RecommendedStreamConfigurationMap#USECASE_RAW}</li>
336 * <li>{@link RecommendedStreamConfigurationMap#USECASE_ZSL}</li>
337 * </ul>
338 * </p>
339 *
340 * <p>For example on how this can be used by camera clients to find out the maximum recommended
341 * preview and snapshot resolution, consider the following pseudo-code:
342 * </p>
343 * <pre><code>
344 * public static Size getMaxSize(Size... sizes) {
345 * if (sizes == null || sizes.length == 0) {
346 * throw new IllegalArgumentException("sizes was empty");
347 * }
348 *
349 * Size sz = sizes[0];
350 * for (Size size : sizes) {
351 * if (size.getWidth() * size.getHeight() &gt; sz.getWidth() * sz.getHeight()) {
352 * sz = size;
353 * }
354 * }
355 *
356 * return sz;
357 * }
358 *
359 * CameraCharacteristics characteristics =
360 * cameraManager.getCameraCharacteristics(cameraId);
361 * RecommendedStreamConfigurationMap previewConfig =
362 * characteristics.getRecommendedStreamConfigurationMap(
363 * RecommendedStreamConfigurationMap.USECASE_PREVIEW);
364 * RecommendedStreamConfigurationMap snapshotConfig =
365 * characteristics.getRecommendedStreamConfigurationMap(
366 * RecommendedStreamConfigurationMap.USECASE_SNAPSHOT);
367 *
368 * if ((previewConfig != null) &amp;&amp; (snapshotConfig != null)) {
369 *
370 * Set<Size> snapshotSizeSet = snapshotConfig.getOutputSizes(
371 * ImageFormat.JPEG);
372 * Size[] snapshotSizes = new Size[snapshotSizeSet.size()];
373 * snapshotSizes = snapshotSizeSet.toArray(snapshotSizes);
374 * Size suggestedMaxJpegSize = getMaxSize(snapshotSizes);
375 *
376 * Set<Size> previewSizeSet = snapshotConfig.getOutputSizes(
377 * ImageFormat.PRIVATE);
378 * Size[] previewSizes = new Size[previewSizeSet.size()];
379 * previewSizes = previewSizeSet.toArray(previewSizes);
380 * Size suggestedMaxPreviewSize = getMaxSize(previewSizes);
381 * }
382 *
383 * </code></pre>
384 *
385 * <p>Similar logic can be used for other use cases as well.</p>
386 *
387 * <p>Support for recommended stream configurations is optional. In case there a no
388 * suggested configurations for the particular use case, please refer to
389 * {@link #SCALER_STREAM_CONFIGURATION_MAP} for the exhaustive available list.</p>
390 *
391 * @param usecase Use case id.
392 *
393 * @throws IllegalArgumentException In case the use case argument is invalid.
394 * @return Valid {@link RecommendedStreamConfigurationMap} or null in case the camera device
395 * doesn't have any recommendation for this use case or the recommended configurations
396 * are invalid.
397 */
Emilian Peevae4a3412018-11-27 16:47:19 +0000398 public @Nullable RecommendedStreamConfigurationMap getRecommendedStreamConfigurationMap(
Emilian Peev2776ca32018-09-18 14:00:39 +0100399 @RecommendedStreamConfigurationMap.RecommendedUsecase int usecase) {
400 if (((usecase >= RecommendedStreamConfigurationMap.USECASE_PREVIEW) &&
401 (usecase <= RecommendedStreamConfigurationMap.USECASE_RAW)) ||
402 ((usecase >= RecommendedStreamConfigurationMap.USECASE_VENDOR_START) &&
403 (usecase < RecommendedStreamConfigurationMap.MAX_USECASE_COUNT))) {
404 if (mRecommendedConfigurations == null) {
405 mRecommendedConfigurations = mProperties.getRecommendedStreamConfigurations();
406 if (mRecommendedConfigurations == null) {
407 return null;
408 }
409 }
410
411 return mRecommendedConfigurations.get(usecase);
412 }
413
414 throw new IllegalArgumentException(String.format("Invalid use case: %d", usecase));
415 }
416
417 /**
Emilian Peev75a55702017-11-07 16:09:59 +0000418 * <p>Returns a subset of {@link #getAvailableCaptureRequestKeys} keys that the
419 * camera device can pass as part of the capture session initialization.</p>
420 *
421 * <p>This list includes keys that are difficult to apply per-frame and
422 * can result in unexpected delays when modified during the capture session
423 * lifetime. Typical examples include parameters that require a
424 * time-consuming hardware re-configuration or internal camera pipeline
425 * change. For performance reasons we suggest clients to pass their initial
426 * values as part of {@link SessionConfiguration#setSessionParameters}. Once
427 * the camera capture session is enabled it is also recommended to avoid
428 * changing them from their initial values set in
429 * {@link SessionConfiguration#setSessionParameters }.
430 * Control over session parameters can still be exerted in capture requests
431 * but clients should be aware and expect delays during their application.
432 * An example usage scenario could look like this:</p>
433 * <ul>
Emilian Peev2776ca32018-09-18 14:00:39 +0100434 * <li>The camera client starts by querying the session parameter key list via
Emilian Peev75a55702017-11-07 16:09:59 +0000435 * {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys }.</li>
436 * <li>Before triggering the capture session create sequence, a capture request
437 * must be built via {@link CameraDevice#createCaptureRequest } using an
438 * appropriate template matching the particular use case.</li>
439 * <li>The client should go over the list of session parameters and check
440 * whether some of the keys listed matches with the parameters that
441 * they intend to modify as part of the first capture request.</li>
442 * <li>If there is no such match, the capture request can be passed
443 * unmodified to {@link SessionConfiguration#setSessionParameters }.</li>
444 * <li>If matches do exist, the client should update the respective values
445 * and pass the request to {@link SessionConfiguration#setSessionParameters }.</li>
446 * <li>After the capture session initialization completes the session parameter
447 * key list can continue to serve as reference when posting or updating
448 * further requests. As mentioned above further changes to session
449 * parameters should ideally be avoided, if updates are necessary
450 * however clients could expect a delay/glitch during the
451 * parameter switch.</li>
452 * </ul>
453 *
454 * <p>The list returned is not modifiable, so any attempts to modify it will throw
455 * a {@code UnsupportedOperationException}.</p>
456 *
457 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
458 *
459 * @return List of keys that can be passed during capture session initialization. In case the
460 * camera device doesn't support such keys the list can be null.
461 */
462 @SuppressWarnings({"unchecked"})
463 public List<CaptureRequest.Key<?>> getAvailableSessionKeys() {
464 if (mAvailableSessionKeys == null) {
465 Object crKey = CaptureRequest.Key.class;
466 Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey;
467
468 int[] filterTags = get(REQUEST_AVAILABLE_SESSION_KEYS);
469 if (filterTags == null) {
470 return null;
471 }
472 mAvailableSessionKeys =
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100473 getAvailableKeyList(CaptureRequest.class, crKeyTyped, filterTags,
474 /*includeSynthetic*/ false);
Emilian Peev75a55702017-11-07 16:09:59 +0000475 }
476 return mAvailableSessionKeys;
477 }
478
479 /**
Emilian Peev2100ae72018-01-12 16:56:25 +0000480 * <p>Returns a subset of {@link #getAvailableCaptureRequestKeys} keys that can
koprivadebd4ee2018-09-13 10:59:46 -0700481 * be overridden for physical devices backing a logical multi-camera.</p>
Emilian Peev2100ae72018-01-12 16:56:25 +0000482 *
483 * <p>This is a subset of android.request.availableRequestKeys which contains a list
koprivadebd4ee2018-09-13 10:59:46 -0700484 * of keys that can be overridden using {@link CaptureRequest.Builder#setPhysicalCameraKey }.
Emilian Peev2100ae72018-01-12 16:56:25 +0000485 * The respective value of such request key can be obtained by calling
486 * {@link CaptureRequest.Builder#getPhysicalCameraKey }. Capture requests that contain
487 * individual physical device requests must be built via
488 * {@link android.hardware.camera2.CameraDevice#createCaptureRequest(int, Set)}.
489 * Such extended capture requests can be passed only to
490 * {@link CameraCaptureSession#capture } or {@link CameraCaptureSession#captureBurst } and
491 * not to {@link CameraCaptureSession#setRepeatingRequest } or
492 * {@link CameraCaptureSession#setRepeatingBurst }.</p>
493 *
494 * <p>The list returned is not modifiable, so any attempts to modify it will throw
495 * a {@code UnsupportedOperationException}.</p>
496 *
497 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
498 *
koprivadebd4ee2018-09-13 10:59:46 -0700499 * @return List of keys that can be overridden in individual physical device requests.
Emilian Peev2100ae72018-01-12 16:56:25 +0000500 * In case the camera device doesn't support such keys the list can be null.
501 */
502 @SuppressWarnings({"unchecked"})
503 public List<CaptureRequest.Key<?>> getAvailablePhysicalCameraRequestKeys() {
Emilian Peevf60f4fb2018-02-08 17:40:48 +0000504 if (mAvailablePhysicalRequestKeys == null) {
Emilian Peev2100ae72018-01-12 16:56:25 +0000505 Object crKey = CaptureRequest.Key.class;
506 Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey;
507
508 int[] filterTags = get(REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS);
509 if (filterTags == null) {
510 return null;
511 }
512 mAvailablePhysicalRequestKeys =
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100513 getAvailableKeyList(CaptureRequest.class, crKeyTyped, filterTags,
514 /*includeSynthetic*/ false);
Emilian Peev2100ae72018-01-12 16:56:25 +0000515 }
516 return mAvailablePhysicalRequestKeys;
517 }
518
519 /**
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700520 * Returns the list of keys supported by this {@link CameraDevice} for querying
521 * with a {@link CaptureRequest}.
522 *
523 * <p>The list returned is not modifiable, so any attempts to modify it will throw
524 * a {@code UnsupportedOperationException}.</p>
525 *
526 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
527 *
Igor Murashkin68f40062013-09-10 12:15:54 -0700528 * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700529 * {@link #getKeys()} instead.</p>
530 *
531 * @return List of keys supported by this CameraDevice for CaptureRequests.
532 */
Igor Murashkind6d65152014-05-19 16:31:02 -0700533 @SuppressWarnings({"unchecked"})
Eino-Ville Talvala8b905572015-05-14 15:43:01 -0700534 @NonNull
Igor Murashkind6d65152014-05-19 16:31:02 -0700535 public List<CaptureRequest.Key<?>> getAvailableCaptureRequestKeys() {
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700536 if (mAvailableRequestKeys == null) {
Igor Murashkind6d65152014-05-19 16:31:02 -0700537 Object crKey = CaptureRequest.Key.class;
538 Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey;
539
Igor Murashkincc542a42014-06-25 11:52:23 -0700540 int[] filterTags = get(REQUEST_AVAILABLE_REQUEST_KEYS);
541 if (filterTags == null) {
542 throw new AssertionError("android.request.availableRequestKeys must be non-null "
543 + "in the characteristics");
544 }
545 mAvailableRequestKeys =
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100546 getAvailableKeyList(CaptureRequest.class, crKeyTyped, filterTags,
547 /*includeSynthetic*/ true);
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700548 }
549 return mAvailableRequestKeys;
550 }
551
552 /**
553 * Returns the list of keys supported by this {@link CameraDevice} for querying
554 * with a {@link CaptureResult}.
555 *
556 * <p>The list returned is not modifiable, so any attempts to modify it will throw
557 * a {@code UnsupportedOperationException}.</p>
558 *
559 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
560 *
Igor Murashkin68f40062013-09-10 12:15:54 -0700561 * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700562 * {@link #getKeys()} instead.</p>
563 *
564 * @return List of keys supported by this CameraDevice for CaptureResults.
565 */
Igor Murashkind6d65152014-05-19 16:31:02 -0700566 @SuppressWarnings({"unchecked"})
Eino-Ville Talvala8b905572015-05-14 15:43:01 -0700567 @NonNull
Igor Murashkind6d65152014-05-19 16:31:02 -0700568 public List<CaptureResult.Key<?>> getAvailableCaptureResultKeys() {
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700569 if (mAvailableResultKeys == null) {
Igor Murashkind6d65152014-05-19 16:31:02 -0700570 Object crKey = CaptureResult.Key.class;
571 Class<CaptureResult.Key<?>> crKeyTyped = (Class<CaptureResult.Key<?>>)crKey;
572
Igor Murashkincc542a42014-06-25 11:52:23 -0700573 int[] filterTags = get(REQUEST_AVAILABLE_RESULT_KEYS);
574 if (filterTags == null) {
575 throw new AssertionError("android.request.availableResultKeys must be non-null "
576 + "in the characteristics");
577 }
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100578 mAvailableResultKeys = getAvailableKeyList(CaptureResult.class, crKeyTyped, filterTags,
579 /*includeSynthetic*/ true);
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700580 }
581 return mAvailableResultKeys;
582 }
583
584 /**
585 * Returns the list of keys supported by this {@link CameraDevice} by metadataClass.
586 *
587 * <p>The list returned is not modifiable, so any attempts to modify it will throw
588 * a {@code UnsupportedOperationException}.</p>
589 *
590 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
591 *
592 * @param metadataClass The subclass of CameraMetadata that you want to get the keys for.
Igor Murashkind6d65152014-05-19 16:31:02 -0700593 * @param keyClass The class of the metadata key, e.g. CaptureRequest.Key.class
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100594 * @param filterTags An array of tags to be used for filtering
595 * @param includeSynthetic Include public syntethic tag by default.
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700596 *
597 * @return List of keys supported by this CameraDevice for metadataClass.
598 *
599 * @throws IllegalArgumentException if metadataClass is not a subclass of CameraMetadata
600 */
Igor Murashkind6d65152014-05-19 16:31:02 -0700601 private <TKey> List<TKey>
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100602 getAvailableKeyList(Class<?> metadataClass, Class<TKey> keyClass, int[] filterTags,
603 boolean includeSynthetic) {
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700604
605 if (metadataClass.equals(CameraMetadata.class)) {
606 throw new AssertionError(
607 "metadataClass must be a strict subclass of CameraMetadata");
608 } else if (!CameraMetadata.class.isAssignableFrom(metadataClass)) {
609 throw new AssertionError(
610 "metadataClass must be a subclass of CameraMetadata");
611 }
612
Emilian Peevde62d842017-03-23 19:20:40 +0000613 List<TKey> staticKeyList = getKeys(
Emilian Peeva7fea4c2018-09-03 16:37:06 +0100614 metadataClass, keyClass, /*instance*/null, filterTags, includeSynthetic);
Igor Murashkind6d65152014-05-19 16:31:02 -0700615 return Collections.unmodifiableList(staticKeyList);
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700616 }
617
Shuzhen Wang23d29382017-11-26 17:24:56 -0800618 /**
Shuzhen Wangbde13972018-03-19 10:30:45 -0700619 * Returns the set of physical camera ids that this logical {@link CameraDevice} is
Shuzhen Wang23d29382017-11-26 17:24:56 -0800620 * made up of.
621 *
622 * <p>A camera device is a logical camera if it has
623 * REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA capability. If the camera device
Shuzhen Wangbde13972018-03-19 10:30:45 -0700624 * doesn't have the capability, the return value will be an empty set. </p>
Shuzhen Wang23d29382017-11-26 17:24:56 -0800625 *
Shuzhen Wang123deefc2018-08-20 12:00:05 -0700626 * <p>Prior to API level 29, all returned IDs are guaranteed to be returned by {@link
627 * CameraManager#getCameraIdList}, and can be opened directly by
628 * {@link CameraManager#openCamera}. Starting from API level 29, for each of the returned ID,
629 * if it's also returned by {@link CameraManager#getCameraIdList}, it can be used as a
630 * standalone camera by {@link CameraManager#openCamera}. Otherwise, the camera ID can only be
631 * used as part of the current logical camera.</p>
632 *
Shuzhen Wangbde13972018-03-19 10:30:45 -0700633 * <p>The set returned is not modifiable, so any attempts to modify it will throw
Shuzhen Wang23d29382017-11-26 17:24:56 -0800634 * a {@code UnsupportedOperationException}.</p>
635 *
Shuzhen Wangbde13972018-03-19 10:30:45 -0700636 * @return Set of physical camera ids for this logical camera device.
Shuzhen Wang23d29382017-11-26 17:24:56 -0800637 */
638 @NonNull
Shuzhen Wangbde13972018-03-19 10:30:45 -0700639 public Set<String> getPhysicalCameraIds() {
Shuzhen Wang23d29382017-11-26 17:24:56 -0800640 int[] availableCapabilities = get(REQUEST_AVAILABLE_CAPABILITIES);
641 if (availableCapabilities == null) {
642 throw new AssertionError("android.request.availableCapabilities must be non-null "
643 + "in the characteristics");
644 }
645
646 if (!ArrayUtils.contains(availableCapabilities,
647 REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA)) {
Shuzhen Wangbde13972018-03-19 10:30:45 -0700648 return Collections.emptySet();
Shuzhen Wang23d29382017-11-26 17:24:56 -0800649 }
650 byte[] physicalCamIds = get(LOGICAL_MULTI_CAMERA_PHYSICAL_IDS);
651
652 String physicalCamIdString = null;
653 try {
654 physicalCamIdString = new String(physicalCamIds, "UTF-8");
655 } catch (java.io.UnsupportedEncodingException e) {
656 throw new AssertionError("android.logicalCam.physicalIds must be UTF-8 string");
657 }
Shuzhen Wangbde13972018-03-19 10:30:45 -0700658 String[] physicalCameraIdArray = physicalCamIdString.split("\0");
Shuzhen Wang23d29382017-11-26 17:24:56 -0800659
Shuzhen Wangbde13972018-03-19 10:30:45 -0700660 return Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(physicalCameraIdArray)));
Shuzhen Wang23d29382017-11-26 17:24:56 -0800661 }
662
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700663 /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
664 * The key entries below this point are generated from metadata
665 * definitions in /system/media/camera/docs. Do not modify by hand or
666 * modify the comment blocks at the start or end.
667 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800668
669 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700670 * <p>List of aberration correction modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode} that are
671 * supported by this camera device.</p>
672 * <p>This key lists the valid modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}. If no
673 * aberration correction modes are available for a device, this list will solely include
Yin-Chia Yeh941aac02015-01-06 10:32:47 -0800674 * OFF mode. All camera devices will support either OFF or FAST mode.</p>
675 * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always list
676 * OFF mode. This includes all FULL level devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700677 * <p>LEGACY devices will always only support FAST mode.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700678 * <p><b>Range of valid values:</b><br>
679 * Any value listed in {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700680 * <p>This key is available on all devices.</p>
Zhijun Hea05e59d2014-07-08 18:27:47 -0700681 *
Zhijun He9e4e4392014-08-18 11:12:32 -0700682 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
Zhijun Hea05e59d2014-07-08 18:27:47 -0700683 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700684 @PublicKey
Zhijun He9e4e4392014-08-18 11:12:32 -0700685 public static final Key<int[]> COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES =
686 new Key<int[]>("android.colorCorrection.availableAberrationModes", int[].class);
Zhijun Hea05e59d2014-07-08 18:27:47 -0700687
688 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700689 * <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 -0800690 * supported by this camera device.</p>
691 * <p>Not all of the auto-exposure anti-banding modes may be
692 * supported by a given camera device. This field lists the
693 * valid anti-banding modes that the application may request
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700694 * for this camera device with the
Yin-Chia Yeh7b2cae62014-11-25 11:54:18 -0800695 * {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} control.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700696 * <p><b>Range of valid values:</b><br>
697 * Any value listed in {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700698 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700699 *
700 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800701 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700702 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700703 public static final Key<int[]> CONTROL_AE_AVAILABLE_ANTIBANDING_MODES =
704 new Key<int[]>("android.control.aeAvailableAntibandingModes", int[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800705
706 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700707 * <p>List of auto-exposure modes for {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} that are supported by this camera
708 * device.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800709 * <p>Not all the auto-exposure modes may be supported by a
710 * given camera device, especially if no flash unit is
711 * available. This entry lists the valid modes for
712 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} for this camera device.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700713 * <p>All camera devices support ON, and all camera devices with flash
714 * units support ON_AUTO_FLASH and ON_ALWAYS_FLASH.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -0800715 * <p>FULL mode camera devices always support OFF mode,
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800716 * which enables application control of camera exposure time,
717 * sensitivity, and frame duration.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700718 * <p>LEGACY mode camera devices never support OFF mode.
719 * LIMITED mode devices support OFF if they support the MANUAL_SENSOR
720 * capability.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700721 * <p><b>Range of valid values:</b><br>
722 * Any value listed in {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700723 * <p>This key is available on all devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800724 *
725 * @see CaptureRequest#CONTROL_AE_MODE
726 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700727 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700728 public static final Key<int[]> CONTROL_AE_AVAILABLE_MODES =
729 new Key<int[]>("android.control.aeAvailableModes", int[].class);
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800730
731 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700732 * <p>List of frame rate ranges for {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} supported by
733 * this camera device.</p>
Yin-Chia Yeh58551622015-05-21 11:27:06 -0700734 * <p>For devices at the LEGACY level or above:</p>
735 * <ul>
Yin-Chia Yeh5fdf0a12015-11-20 15:39:36 -0800736 * <li>
737 * <p>For constant-framerate recording, for each normal
738 * {@link android.media.CamcorderProfile CamcorderProfile}, that is, a
Yin-Chia Yeh58551622015-05-21 11:27:06 -0700739 * {@link android.media.CamcorderProfile CamcorderProfile} that has
740 * {@link android.media.CamcorderProfile#quality quality} in
741 * the range [{@link android.media.CamcorderProfile#QUALITY_LOW QUALITY_LOW},
742 * {@link android.media.CamcorderProfile#QUALITY_2160P QUALITY_2160P}], if the profile is
743 * supported by the device and has
744 * {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} <code>x</code>, this list will
Yin-Chia Yeh5fdf0a12015-11-20 15:39:36 -0800745 * always include (<code>x</code>,<code>x</code>).</p>
746 * </li>
747 * <li>
748 * <p>Also, a camera device must either not support any
749 * {@link android.media.CamcorderProfile CamcorderProfile},
750 * or support at least one
751 * normal {@link android.media.CamcorderProfile CamcorderProfile} that has
752 * {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} <code>x</code> &gt;= 24.</p>
753 * </li>
Yin-Chia Yeh58551622015-05-21 11:27:06 -0700754 * </ul>
755 * <p>For devices at the LIMITED level or above:</p>
756 * <ul>
757 * <li>For YUV_420_888 burst capture use case, this list will always include (<code>min</code>, <code>max</code>)
758 * and (<code>max</code>, <code>max</code>) where <code>min</code> &lt;= 15 and <code>max</code> = the maximum output frame rate of the
759 * maximum YUV_420_888 output size.</li>
760 * </ul>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700761 * <p><b>Units</b>: Frames per second (FPS)</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700762 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700763 *
764 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800765 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700766 @PublicKey
Igor Murashkin78712a82014-05-27 18:32:18 -0700767 public static final Key<android.util.Range<Integer>[]> CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES =
768 new Key<android.util.Range<Integer>[]>("android.control.aeAvailableTargetFpsRanges", new TypeReference<android.util.Range<Integer>[]>() {{ }});
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800769
770 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700771 * <p>Maximum and minimum exposure compensation values for
772 * {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}, in counts of {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep},
773 * that are supported by this camera device.</p>
774 * <p><b>Range of valid values:</b><br></p>
Zhijun Hef1745ce2015-02-04 13:55:14 -0800775 * <p>Range [0,0] indicates that exposure compensation is not supported.</p>
776 * <p>For LIMITED and FULL devices, range must follow below requirements if exposure
777 * compensation is supported (<code>range != [0, 0]</code>):</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700778 * <p><code>Min.exposure compensation * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} &lt;= -2 EV</code></p>
779 * <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 -0800780 * <p>LEGACY devices may support a smaller range than this.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700781 * <p>This key is available on all devices.</p>
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -0800782 *
783 * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700784 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800785 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700786 @PublicKey
Igor Murashkin78712a82014-05-27 18:32:18 -0700787 public static final Key<android.util.Range<Integer>> CONTROL_AE_COMPENSATION_RANGE =
788 new Key<android.util.Range<Integer>>("android.control.aeCompensationRange", new TypeReference<android.util.Range<Integer>>() {{ }});
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800789
790 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700791 * <p>Smallest step by which the exposure compensation
792 * can be changed.</p>
793 * <p>This is the unit for {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}. For example, if this key has
794 * 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
795 * that the target EV offset for the auto-exposure routine is -1 EV.</p>
796 * <p>One unit of EV compensation changes the brightness of the captured image by a factor
797 * of two. +1 EV doubles the image brightness, while -1 EV halves the image brightness.</p>
798 * <p><b>Units</b>: Exposure Value (EV)</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700799 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700800 *
801 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800802 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700803 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700804 public static final Key<Rational> CONTROL_AE_COMPENSATION_STEP =
805 new Key<Rational>("android.control.aeCompensationStep", Rational.class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800806
807 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700808 * <p>List of auto-focus (AF) modes for {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} that are
809 * supported by this camera device.</p>
Zhijun He78146ec2014-01-14 18:12:13 -0800810 * <p>Not all the auto-focus modes may be supported by a
811 * given camera device. This entry lists the valid modes for
812 * {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} for this camera device.</p>
Ruben Brunk6f387092014-09-22 16:13:54 -0700813 * <p>All LIMITED and FULL mode camera devices will support OFF mode, and all
814 * camera devices with adjustable focuser units
815 * (<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 -0700816 * <p>LEGACY devices will support OFF mode only if they support
817 * focusing to infinity (by also setting {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} to
818 * <code>0.0f</code>).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700819 * <p><b>Range of valid values:</b><br>
820 * Any value listed in {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700821 * <p>This key is available on all devices.</p>
Zhijun He78146ec2014-01-14 18:12:13 -0800822 *
823 * @see CaptureRequest#CONTROL_AF_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700824 * @see CaptureRequest#LENS_FOCUS_DISTANCE
Zhijun He78146ec2014-01-14 18:12:13 -0800825 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800826 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700827 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700828 public static final Key<int[]> CONTROL_AF_AVAILABLE_MODES =
829 new Key<int[]>("android.control.afAvailableModes", int[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800830
831 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700832 * <p>List of color effects for {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode} that are supported by this camera
833 * device.</p>
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -0800834 * <p>This list contains the color effect modes that can be applied to
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700835 * images produced by the camera device.
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -0800836 * Implementations are not expected to be consistent across all devices.
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700837 * If no color effect modes are available for a device, this will only list
838 * OFF.</p>
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -0800839 * <p>A color effect will only be applied if
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700840 * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF. OFF is always included in this list.</p>
841 * <p>This control has no effect on the operation of other control routines such
842 * as auto-exposure, white balance, or focus.</p>
843 * <p><b>Range of valid values:</b><br>
844 * Any value listed in {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700845 * <p>This key is available on all devices.</p>
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -0800846 *
847 * @see CaptureRequest#CONTROL_EFFECT_MODE
848 * @see CaptureRequest#CONTROL_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700849 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700850 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700851 public static final Key<int[]> CONTROL_AVAILABLE_EFFECTS =
852 new Key<int[]>("android.control.availableEffects", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700853
854 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700855 * <p>List of scene modes for {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} that are supported by this camera
856 * device.</p>
Ruben Brunk8237d342014-01-17 15:33:02 -0800857 * <p>This list contains scene modes that can be set for the camera device.
858 * Only scene modes that have been fully implemented for the
859 * camera device may be included here. Implementations are not expected
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700860 * to be consistent across all devices.</p>
861 * <p>If no scene modes are supported by the camera device, this
862 * will be set to DISABLED. Otherwise DISABLED will not be listed.</p>
863 * <p>FACE_PRIORITY is always listed if face detection is
864 * supported (i.e.<code>{@link CameraCharacteristics#STATISTICS_INFO_MAX_FACE_COUNT android.statistics.info.maxFaceCount} &gt;
865 * 0</code>).</p>
866 * <p><b>Range of valid values:</b><br>
867 * Any value listed in {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700868 * <p>This key is available on all devices.</p>
Ruben Brunk8237d342014-01-17 15:33:02 -0800869 *
870 * @see CaptureRequest#CONTROL_SCENE_MODE
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700871 * @see CameraCharacteristics#STATISTICS_INFO_MAX_FACE_COUNT
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700872 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700873 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700874 public static final Key<int[]> CONTROL_AVAILABLE_SCENE_MODES =
875 new Key<int[]>("android.control.availableSceneModes", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700876
877 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700878 * <p>List of video stabilization modes for {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}
879 * that are supported by this camera device.</p>
880 * <p>OFF will always be listed.</p>
881 * <p><b>Range of valid values:</b><br>
882 * Any value listed in {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700883 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700884 *
885 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700886 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700887 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700888 public static final Key<int[]> CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES =
889 new Key<int[]>("android.control.availableVideoStabilizationModes", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700890
891 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700892 * <p>List of auto-white-balance modes for {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} that are supported by this
893 * camera device.</p>
Zhijun He399f05d2014-01-15 11:31:30 -0800894 * <p>Not all the auto-white-balance modes may be supported by a
895 * given camera device. This entry lists the valid modes for
896 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} for this camera device.</p>
897 * <p>All camera devices will support ON mode.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700898 * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always support OFF
899 * mode, which enables application control of white balance, by using
900 * {@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
901 * mode camera devices.</p>
902 * <p><b>Range of valid values:</b><br>
903 * Any value listed in {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700904 * <p>This key is available on all devices.</p>
Zhijun He399f05d2014-01-15 11:31:30 -0800905 *
Zhijun He399f05d2014-01-15 11:31:30 -0800906 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -0800907 * @see CaptureRequest#COLOR_CORRECTION_MODE
908 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
909 * @see CaptureRequest#CONTROL_AWB_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700910 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700911 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700912 public static final Key<int[]> CONTROL_AWB_AVAILABLE_MODES =
913 new Key<int[]>("android.control.awbAvailableModes", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700914
915 /**
Ruben Brunk90bc34e2014-02-03 17:54:24 -0800916 * <p>List of the maximum number of regions that can be used for metering in
917 * auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF);
918 * this corresponds to the the maximum number of elements in
919 * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}, {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions},
920 * and {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700921 * <p><b>Range of valid values:</b><br></p>
922 * <p>Value must be &gt;= 0 for each element. For full-capability devices
923 * this value must be &gt;= 1 for AE and AF. The order of the elements is:
924 * <code>(AE, AWB, AF)</code>.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700925 * <p>This key is available on all devices.</p>
Ruben Brunk90bc34e2014-02-03 17:54:24 -0800926 *
927 * @see CaptureRequest#CONTROL_AE_REGIONS
928 * @see CaptureRequest#CONTROL_AF_REGIONS
929 * @see CaptureRequest#CONTROL_AWB_REGIONS
Igor Murashkin78712a82014-05-27 18:32:18 -0700930 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700931 */
Ruben Brunk90bc34e2014-02-03 17:54:24 -0800932 public static final Key<int[]> CONTROL_MAX_REGIONS =
933 new Key<int[]>("android.control.maxRegions", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700934
935 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700936 * <p>The maximum number of metering regions that can be used by the auto-exposure (AE)
937 * routine.</p>
938 * <p>This corresponds to the the maximum allowed number of elements in
Igor Murashkin78712a82014-05-27 18:32:18 -0700939 * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700940 * <p><b>Range of valid values:</b><br>
941 * Value will be &gt;= 0. For FULL-capability devices, this
942 * value will be &gt;= 1.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700943 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -0700944 *
945 * @see CaptureRequest#CONTROL_AE_REGIONS
946 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700947 @PublicKey
948 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -0700949 public static final Key<Integer> CONTROL_MAX_REGIONS_AE =
950 new Key<Integer>("android.control.maxRegionsAe", int.class);
951
952 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700953 * <p>The maximum number of metering regions that can be used by the auto-white balance (AWB)
954 * routine.</p>
955 * <p>This corresponds to the the maximum allowed number of elements in
Igor Murashkin78712a82014-05-27 18:32:18 -0700956 * {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700957 * <p><b>Range of valid values:</b><br>
958 * Value will be &gt;= 0.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700959 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -0700960 *
961 * @see CaptureRequest#CONTROL_AWB_REGIONS
962 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700963 @PublicKey
964 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -0700965 public static final Key<Integer> CONTROL_MAX_REGIONS_AWB =
966 new Key<Integer>("android.control.maxRegionsAwb", int.class);
967
968 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700969 * <p>The maximum number of metering regions that can be used by the auto-focus (AF) routine.</p>
970 * <p>This corresponds to the the maximum allowed number of elements in
Igor Murashkin78712a82014-05-27 18:32:18 -0700971 * {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700972 * <p><b>Range of valid values:</b><br>
973 * Value will be &gt;= 0. For FULL-capability devices, this
974 * value will be &gt;= 1.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700975 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -0700976 *
977 * @see CaptureRequest#CONTROL_AF_REGIONS
978 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700979 @PublicKey
980 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -0700981 public static final Key<Integer> CONTROL_MAX_REGIONS_AF =
982 new Key<Integer>("android.control.maxRegionsAf", int.class);
983
984 /**
Zhijun Hefab663e2015-05-26 19:46:31 -0700985 * <p>List of available high speed video size, fps range and max batch size configurations
986 * 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 -0700987 * <p>When CONSTRAINED_HIGH_SPEED_VIDEO is supported in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities},
Zhijun Hefab663e2015-05-26 19:46:31 -0700988 * this metadata will list the supported high speed video size, fps range and max batch size
989 * configurations. All the sizes listed in this configuration will be a subset of the sizes
990 * reported by {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes }
991 * for processed non-stalling formats.</p>
992 * <p>For the high speed video use case, the application must
Zhijun Hee0404182014-06-26 13:17:09 -0700993 * select the video size and fps range from this metadata to configure the recording and
994 * preview streams and setup the recording requests. For example, if the application intends
995 * to do high speed recording, it can select the maximum size reported by this metadata to
996 * configure output streams. Once the size is selected, application can filter this metadata
997 * 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 -0700998 * recording requests. Note that for the use case of multiple output streams, application
Zhijun Hefab663e2015-05-26 19:46:31 -0700999 * must select one unique size from this metadata to use (e.g., preview and recording streams
1000 * must have the same size). Otherwise, the high speed capture session creation will fail.</p>
1001 * <p>The min and max fps will be multiple times of 30fps.</p>
1002 * <p>High speed video streaming extends significant performance pressue to camera hardware,
1003 * to achieve efficient high speed streaming, the camera device may have to aggregate
1004 * multiple frames together and send to camera device for processing where the request
1005 * controls are same for all the frames in this batch. Max batch size indicates
1006 * the max possible number of frames the camera device will group together for this high
1007 * speed stream configuration. This max batch size will be used to generate a high speed
1008 * recording request list by
Eino-Ville Talvala639fffe2015-06-30 10:34:48 -07001009 * {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList }.
Zhijun Hefab663e2015-05-26 19:46:31 -07001010 * The max batch size for each configuration will satisfy below conditions:</p>
1011 * <ul>
1012 * <li>Each max batch size will be a divisor of its corresponding fps_max / 30. For example,
1013 * if max_fps is 300, max batch size will only be 1, 2, 5, or 10.</li>
1014 * <li>The camera device may choose smaller internal batch size for each configuration, but
1015 * the actual batch size will be a divisor of max batch size. For example, if the max batch
1016 * size is 8, the actual batch size used by camera device will only be 1, 2, 4, or 8.</li>
1017 * <li>The max batch size in each configuration entry must be no larger than 32.</li>
1018 * </ul>
1019 * <p>The camera device doesn't have to support batch mode to achieve high speed video recording,
1020 * in such case, batch_size_max will be reported as 1 in each configuration entry.</p>
1021 * <p>This fps ranges in this configuration list can only be used to create requests
1022 * that are submitted to a high speed camera capture session created by
1023 * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }.
1024 * The fps ranges reported in this metadata must not be used to setup capture requests for
1025 * normal capture session, or it will cause request error.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001026 * <p><b>Range of valid values:</b><br></p>
Zhijun Hefab663e2015-05-26 19:46:31 -07001027 * <p>For each configuration, the fps_max &gt;= 120fps.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001028 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1029 * <p><b>Limited capability</b> -
1030 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1031 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun Hee0404182014-06-26 13:17:09 -07001032 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001033 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He3c1ff682015-06-23 09:21:43 -07001034 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Zhijun Hee0404182014-06-26 13:17:09 -07001035 * @hide
1036 */
Yin-Chia Yeh12da1402014-07-15 10:37:31 -07001037 public static final Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]> CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS =
1038 new Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]>("android.control.availableHighSpeedVideoConfigurations", android.hardware.camera2.params.HighSpeedVideoConfiguration[].class);
Zhijun Hee0404182014-06-26 13:17:09 -07001039
1040 /**
Yin-Chia Yehdc0ba092015-02-20 15:52:06 -08001041 * <p>Whether the camera device supports {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</p>
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -07001042 * <p>Devices with MANUAL_SENSOR capability or BURST_CAPTURE capability will always
1043 * list <code>true</code>. This includes FULL devices.</p>
Yin-Chia Yehdc0ba092015-02-20 15:52:06 -08001044 * <p>This key is available on all devices.</p>
1045 *
1046 * @see CaptureRequest#CONTROL_AE_LOCK
1047 */
1048 @PublicKey
1049 public static final Key<Boolean> CONTROL_AE_LOCK_AVAILABLE =
1050 new Key<Boolean>("android.control.aeLockAvailable", boolean.class);
1051
1052 /**
1053 * <p>Whether the camera device supports {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</p>
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -07001054 * <p>Devices with MANUAL_POST_PROCESSING capability or BURST_CAPTURE capability will
1055 * always list <code>true</code>. This includes FULL devices.</p>
Yin-Chia Yehdc0ba092015-02-20 15:52:06 -08001056 * <p>This key is available on all devices.</p>
1057 *
1058 * @see CaptureRequest#CONTROL_AWB_LOCK
1059 */
1060 @PublicKey
1061 public static final Key<Boolean> CONTROL_AWB_LOCK_AVAILABLE =
1062 new Key<Boolean>("android.control.awbLockAvailable", boolean.class);
1063
1064 /**
1065 * <p>List of control modes for {@link CaptureRequest#CONTROL_MODE android.control.mode} that are supported by this camera
1066 * device.</p>
1067 * <p>This list contains control modes that can be set for the camera device.
1068 * LEGACY mode devices will always support AUTO mode. LIMITED and FULL
1069 * devices will always support OFF, AUTO modes.</p>
1070 * <p><b>Range of valid values:</b><br>
1071 * Any value listed in {@link CaptureRequest#CONTROL_MODE android.control.mode}</p>
1072 * <p>This key is available on all devices.</p>
1073 *
1074 * @see CaptureRequest#CONTROL_MODE
1075 */
1076 @PublicKey
1077 public static final Key<int[]> CONTROL_AVAILABLE_MODES =
1078 new Key<int[]>("android.control.availableModes", int[].class);
1079
1080 /**
Yin-Chia Yeh1ee1a0a2016-01-18 19:13:47 -08001081 * <p>Range of boosts for {@link CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST android.control.postRawSensitivityBoost} supported
1082 * by this camera device.</p>
1083 * <p>Devices support post RAW sensitivity boost will advertise
1084 * {@link CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST android.control.postRawSensitivityBoost} key for controling
1085 * post RAW sensitivity boost.</p>
1086 * <p>This key will be <code>null</code> for devices that do not support any RAW format
1087 * outputs. For devices that do support RAW format outputs, this key will always
1088 * present, and if a device does not support post RAW sensitivity boost, it will
1089 * list <code>(100, 100)</code> in this key.</p>
1090 * <p><b>Units</b>: ISO arithmetic units, the same as {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</p>
1091 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1092 *
1093 * @see CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST
1094 * @see CaptureRequest#SENSOR_SENSITIVITY
1095 */
1096 @PublicKey
1097 public static final Key<android.util.Range<Integer>> CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE =
1098 new Key<android.util.Range<Integer>>("android.control.postRawSensitivityBoostRange", new TypeReference<android.util.Range<Integer>>() {{ }});
1099
1100 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001101 * <p>List of edge enhancement modes for {@link CaptureRequest#EDGE_MODE android.edge.mode} that are supported by this camera
1102 * device.</p>
Chien-Yu Chen72333912015-07-08 11:55:19 -07001103 * <p>Full-capability camera devices must always support OFF; camera devices that support
1104 * YUV_REPROCESSING or PRIVATE_REPROCESSING will list ZERO_SHUTTER_LAG; all devices will
1105 * list FAST.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001106 * <p><b>Range of valid values:</b><br>
1107 * Any value listed in {@link CaptureRequest#EDGE_MODE android.edge.mode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001108 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1109 * <p><b>Full capability</b> -
1110 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1111 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001112 *
1113 * @see CaptureRequest#EDGE_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001114 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001115 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001116 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07001117 public static final Key<int[]> EDGE_AVAILABLE_EDGE_MODES =
1118 new Key<int[]>("android.edge.availableEdgeModes", int[].class);
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001119
1120 /**
Zhijun Heca1b73a2014-02-03 12:39:53 -08001121 * <p>Whether this camera device has a
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001122 * flash unit.</p>
1123 * <p>Will be <code>false</code> if no flash is available.</p>
1124 * <p>If there is no flash unit, none of the flash controls do
1125 * anything.
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001126 * This key is available on all devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001127 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001128 @PublicKey
Zhijun Heca1b73a2014-02-03 12:39:53 -08001129 public static final Key<Boolean> FLASH_INFO_AVAILABLE =
1130 new Key<Boolean>("android.flash.info.available", boolean.class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001131
1132 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001133 * <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 -08001134 * camera device.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08001135 * <p>FULL mode camera devices will always support FAST.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001136 * <p><b>Range of valid values:</b><br>
1137 * Any value listed in {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001138 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08001139 *
1140 * @see CaptureRequest#HOT_PIXEL_MODE
1141 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001142 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07001143 public static final Key<int[]> HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES =
1144 new Key<int[]>("android.hotPixel.availableHotPixelModes", int[].class);
Ruben Brunk9d454fd2014-03-04 14:11:52 -08001145
1146 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001147 * <p>List of JPEG thumbnail sizes for {@link CaptureRequest#JPEG_THUMBNAIL_SIZE android.jpeg.thumbnailSize} supported by this
1148 * camera device.</p>
1149 * <p>This list will include at least one non-zero resolution, plus <code>(0,0)</code> for indicating no
1150 * thumbnail should be generated.</p>
Zhijun He5f2a47f2014-01-16 15:44:41 -08001151 * <p>Below condiditions will be satisfied for this size list:</p>
Zhijun He5a9ff372013-12-26 11:49:09 -08001152 * <ul>
Zhijun He5f2a47f2014-01-16 15:44:41 -08001153 * <li>The sizes will be sorted by increasing pixel area (width x height).
1154 * If several resolutions have the same area, they will be sorted by increasing width.</li>
1155 * <li>The aspect ratio of the largest thumbnail size will be same as the
Igor Murashkin9c595172014-05-12 13:56:20 -07001156 * aspect ratio of largest JPEG output size in android.scaler.availableStreamConfigurations.
Zhijun He5a9ff372013-12-26 11:49:09 -08001157 * The largest size is defined as the size that has the largest pixel area
1158 * in a given size list.</li>
Igor Murashkin9c595172014-05-12 13:56:20 -07001159 * <li>Each output JPEG size in android.scaler.availableStreamConfigurations will have at least
Zhijun He5a9ff372013-12-26 11:49:09 -08001160 * one corresponding size that has the same aspect ratio in availableThumbnailSizes,
1161 * and vice versa.</li>
Shuzhen Wangf655b1c2018-12-28 15:40:36 -08001162 * <li>All non-<code>(0, 0)</code> sizes will have non-zero widths and heights.</li>
Zhijun He5a9ff372013-12-26 11:49:09 -08001163 * </ul>
Shuzhen Wangf655b1c2018-12-28 15:40:36 -08001164 * <p>This list is also used as supported thumbnail sizes for HEIC image format capture.</p>
1165 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001166 *
1167 * @see CaptureRequest#JPEG_THUMBNAIL_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001168 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001169 @PublicKey
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07001170 public static final Key<android.util.Size[]> JPEG_AVAILABLE_THUMBNAIL_SIZES =
1171 new Key<android.util.Size[]>("android.jpeg.availableThumbnailSizes", android.util.Size[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001172
1173 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001174 * <p>List of aperture size values for {@link CaptureRequest#LENS_APERTURE android.lens.aperture} that are
1175 * supported by this camera device.</p>
1176 * <p>If the camera device doesn't support a variable lens aperture,
1177 * this list will contain only one value, which is the fixed aperture size.</p>
1178 * <p>If the camera device supports a variable aperture, the aperture values
Zhijun Hefb46c642014-01-14 17:57:23 -08001179 * in this list will be sorted in ascending order.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001180 * <p><b>Units</b>: The aperture f-number</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001181 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1182 * <p><b>Full capability</b> -
1183 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1184 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1185 *
1186 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001187 * @see CaptureRequest#LENS_APERTURE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001188 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001189 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001190 public static final Key<float[]> LENS_INFO_AVAILABLE_APERTURES =
1191 new Key<float[]>("android.lens.info.availableApertures", float[].class);
1192
1193 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001194 * <p>List of neutral density filter values for
1195 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} that are supported by this camera device.</p>
1196 * <p>If a neutral density filter is not supported by this camera device,
1197 * this list will contain only 0. Otherwise, this list will include every
1198 * filter density supported by the camera device, in ascending order.</p>
1199 * <p><b>Units</b>: Exposure value (EV)</p>
1200 * <p><b>Range of valid values:</b><br></p>
1201 * <p>Values are &gt;= 0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001202 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1203 * <p><b>Full capability</b> -
1204 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1205 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk855bae42014-01-17 10:30:32 -08001206 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001207 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk855bae42014-01-17 10:30:32 -08001208 * @see CaptureRequest#LENS_FILTER_DENSITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001209 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001210 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001211 public static final Key<float[]> LENS_INFO_AVAILABLE_FILTER_DENSITIES =
1212 new Key<float[]>("android.lens.info.availableFilterDensities", float[].class);
1213
1214 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001215 * <p>List of focal lengths for {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength} that are supported by this camera
1216 * device.</p>
1217 * <p>If optical zoom is not supported, this list will only contain
1218 * a single value corresponding to the fixed focal length of the
1219 * device. Otherwise, this list will include every focal length supported
1220 * by the camera device, in ascending order.</p>
1221 * <p><b>Units</b>: Millimeters</p>
1222 * <p><b>Range of valid values:</b><br></p>
1223 * <p>Values are &gt; 0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001224 * <p>This key is available on all devices.</p>
Ruben Brunka20f4c22014-01-17 15:21:13 -08001225 *
1226 * @see CaptureRequest#LENS_FOCAL_LENGTH
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001227 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001228 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001229 public static final Key<float[]> LENS_INFO_AVAILABLE_FOCAL_LENGTHS =
1230 new Key<float[]>("android.lens.info.availableFocalLengths", float[].class);
1231
1232 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001233 * <p>List of optical image stabilization (OIS) modes for
1234 * {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} that are supported by this camera device.</p>
1235 * <p>If OIS is not supported by a given camera device, this list will
Ruben Brunk00849b32014-01-17 18:30:23 -08001236 * contain only OFF.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001237 * <p><b>Range of valid values:</b><br>
1238 * Any value listed in {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001239 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1240 * <p><b>Limited capability</b> -
1241 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1242 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk00849b32014-01-17 18:30:23 -08001243 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001244 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk00849b32014-01-17 18:30:23 -08001245 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001246 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001247 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07001248 public static final Key<int[]> LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION =
1249 new Key<int[]>("android.lens.info.availableOpticalStabilization", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001250
1251 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001252 * <p>Hyperfocal distance for this lens.</p>
Zhijun Heff413932014-02-07 15:44:30 -08001253 * <p>If the lens is not fixed focus, the camera device will report this
1254 * 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 -07001255 * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p>
1256 * <p><b>Range of valid values:</b><br>
1257 * If lens is fixed focus, &gt;= 0. If lens has focuser unit, the value is
1258 * within <code>(0.0f, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code></p>
1259 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1260 * <p><b>Limited capability</b> -
1261 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1262 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01001263 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001264 *
1265 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1266 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
1267 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
1268 */
1269 @PublicKey
1270 public static final Key<Float> LENS_INFO_HYPERFOCAL_DISTANCE =
1271 new Key<Float>("android.lens.info.hyperfocalDistance", float.class);
1272
1273 /**
1274 * <p>Shortest distance from frontmost surface
1275 * of the lens that can be brought into sharp focus.</p>
1276 * <p>If the lens is fixed-focus, this will be
1277 * 0.</p>
1278 * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p>
1279 * <p><b>Range of valid values:</b><br>
1280 * &gt;= 0</p>
Zhijun Heff413932014-02-07 15:44:30 -08001281 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001282 * <p><b>Limited capability</b> -
1283 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1284 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01001285 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Zhijun Heff413932014-02-07 15:44:30 -08001286 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001287 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun Heff413932014-02-07 15:44:30 -08001288 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001289 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001290 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001291 public static final Key<Float> LENS_INFO_MINIMUM_FOCUS_DISTANCE =
1292 new Key<Float>("android.lens.info.minimumFocusDistance", float.class);
1293
1294 /**
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08001295 * <p>Dimensions of lens shading map.</p>
1296 * <p>The map should be on the order of 30-40 rows and columns, and
1297 * must be smaller than 64x64.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001298 * <p><b>Range of valid values:</b><br>
1299 * Both values &gt;= 1</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001300 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1301 * <p><b>Full capability</b> -
1302 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1303 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1304 *
1305 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk57493682014-05-27 18:58:08 -07001306 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001307 */
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07001308 public static final Key<android.util.Size> LENS_INFO_SHADING_MAP_SIZE =
1309 new Key<android.util.Size>("android.lens.info.shadingMapSize", android.util.Size.class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001310
1311 /**
Zhijun Heff413932014-02-07 15:44:30 -08001312 * <p>The lens focus distance calibration quality.</p>
1313 * <p>The lens focus distance calibration quality determines the reliability of
1314 * focus related metadata entries, i.e. {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
1315 * {@link CaptureResult#LENS_FOCUS_RANGE android.lens.focusRange}, {@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}, and
1316 * {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001317 * <p>APPROXIMATE and CALIBRATED devices report the focus metadata in
1318 * units of diopters (1/meter), so <code>0.0f</code> represents focusing at infinity,
1319 * and increasing positive numbers represent focusing closer and closer
1320 * to the camera device. The focus distance control also uses diopters
1321 * on these devices.</p>
1322 * <p>UNCALIBRATED devices do not use units that are directly comparable
1323 * to any real physical measurement, but <code>0.0f</code> still represents farthest
1324 * focus, and {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} represents the
1325 * nearest focus the device can achieve.</p>
1326 * <p><b>Possible values:</b>
1327 * <ul>
1328 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED UNCALIBRATED}</li>
1329 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE APPROXIMATE}</li>
1330 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED CALIBRATED}</li>
1331 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001332 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1333 * <p><b>Limited capability</b> -
1334 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1335 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun Heff413932014-02-07 15:44:30 -08001336 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001337 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun Heff413932014-02-07 15:44:30 -08001338 * @see CaptureRequest#LENS_FOCUS_DISTANCE
1339 * @see CaptureResult#LENS_FOCUS_RANGE
1340 * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE
1341 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
1342 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED
1343 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE
1344 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED
1345 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001346 @PublicKey
Zhijun Heff413932014-02-07 15:44:30 -08001347 public static final Key<Integer> LENS_INFO_FOCUS_DISTANCE_CALIBRATION =
1348 new Key<Integer>("android.lens.info.focusDistanceCalibration", int.class);
1349
1350 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001351 * <p>Direction the camera faces relative to
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001352 * device screen.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001353 * <p><b>Possible values:</b>
1354 * <ul>
1355 * <li>{@link #LENS_FACING_FRONT FRONT}</li>
1356 * <li>{@link #LENS_FACING_BACK BACK}</li>
Zhijun He503e8152015-01-12 15:16:56 -08001357 * <li>{@link #LENS_FACING_EXTERNAL EXTERNAL}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001358 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001359 * <p>This key is available on all devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001360 * @see #LENS_FACING_FRONT
1361 * @see #LENS_FACING_BACK
Zhijun He503e8152015-01-12 15:16:56 -08001362 * @see #LENS_FACING_EXTERNAL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001363 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001364 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001365 public static final Key<Integer> LENS_FACING =
1366 new Key<Integer>("android.lens.facing", int.class);
1367
1368 /**
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001369 * <p>The orientation of the camera relative to the sensor
1370 * coordinate system.</p>
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07001371 * <p>The four coefficients that describe the quaternion
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001372 * rotation from the Android sensor coordinate system to a
1373 * camera-aligned coordinate system where the X-axis is
1374 * aligned with the long side of the image sensor, the Y-axis
1375 * is aligned with the short side of the image sensor, and
1376 * the Z-axis is aligned with the optical axis of the sensor.</p>
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07001377 * <p>To convert from the quaternion coefficients <code>(x,y,z,w)</code>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001378 * to the axis of rotation <code>(a_x, a_y, a_z)</code> and rotation
1379 * amount <code>theta</code>, the following formulas can be used:</p>
1380 * <pre><code> theta = 2 * acos(w)
1381 * a_x = x / sin(theta/2)
1382 * a_y = y / sin(theta/2)
1383 * a_z = z / sin(theta/2)
1384 * </code></pre>
1385 * <p>To create a 3x3 rotation matrix that applies the rotation
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07001386 * defined by this quaternion, the following matrix can be
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001387 * used:</p>
1388 * <pre><code>R = [ 1 - 2y^2 - 2z^2, 2xy - 2zw, 2xz + 2yw,
1389 * 2xy + 2zw, 1 - 2x^2 - 2z^2, 2yz - 2xw,
1390 * 2xz - 2yw, 2yz + 2xw, 1 - 2x^2 - 2y^2 ]
1391 * </code></pre>
1392 * <p>This matrix can then be used to apply the rotation to a
1393 * column vector point with</p>
1394 * <p><code>p' = Rp</code></p>
1395 * <p>where <code>p</code> is in the device sensor coordinate system, and
1396 * <code>p'</code> is in the camera-oriented coordinate system.</p>
1397 * <p><b>Units</b>:
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07001398 * Quaternion coefficients</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001399 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01001400 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001401 */
1402 @PublicKey
1403 public static final Key<float[]> LENS_POSE_ROTATION =
1404 new Key<float[]>("android.lens.poseRotation", float[].class);
1405
1406 /**
1407 * <p>Position of the camera optical center.</p>
Eino-Ville Talvalad3dbfb32015-05-29 17:17:04 -07001408 * <p>The position of the camera device's lens optical center,
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001409 * as a three-dimensional vector <code>(x,y,z)</code>.</p>
1410 * <p>Prior to Android P, or when {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is PRIMARY_CAMERA, this position
1411 * is relative to the optical center of the largest camera device facing in the same
1412 * direction as this camera, in the {@link android.hardware.SensorEvent Android sensor
1413 * coordinate axes}. Note that only the axis definitions are shared with the sensor
1414 * coordinate system, but not the origin.</p>
1415 * <p>If this device is the largest or only camera device with a given facing, then this
1416 * position will be <code>(0, 0, 0)</code>; a camera device with a lens optical center located 3 cm
1417 * 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 -07001418 * report <code>(0.03, 0, 0)</code>. Note that this means that, for many computer vision
1419 * applications, the position needs to be negated to convert it to a translation from the
1420 * camera to the origin.</p>
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001421 * <p>To transform a pixel coordinates between two cameras facing the same direction, first
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001422 * 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 -08001423 * camera {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} needs to be applied, followed by the
1424 * {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the source camera, the translation of the source camera
1425 * relative to the destination camera, the {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the destination
1426 * camera, and finally the inverse of {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} of the destination
1427 * camera. This obtains a radial-distortion-free coordinate in the destination camera pixel
1428 * coordinates.</p>
1429 * <p>To compare this against a real image from the destination camera, the destination camera
1430 * image then needs to be corrected for radial distortion before comparison or sampling.</p>
1431 * <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 -07001432 * the center of the primary gyroscope on the device. The axis definitions are the same as
1433 * with PRIMARY_CAMERA.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001434 * <p><b>Units</b>: Meters</p>
1435 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01001436 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001437 *
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001438 * @see CameraCharacteristics#LENS_DISTORTION
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07001439 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001440 * @see CameraCharacteristics#LENS_POSE_REFERENCE
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001441 * @see CameraCharacteristics#LENS_POSE_ROTATION
1442 */
1443 @PublicKey
1444 public static final Key<float[]> LENS_POSE_TRANSLATION =
1445 new Key<float[]>("android.lens.poseTranslation", float[].class);
1446
1447 /**
1448 * <p>The parameters for this camera device's intrinsic
1449 * calibration.</p>
1450 * <p>The five calibration parameters that describe the
1451 * transform from camera-centric 3D coordinates to sensor
1452 * pixel coordinates:</p>
1453 * <pre><code>[f_x, f_y, c_x, c_y, s]
1454 * </code></pre>
1455 * <p>Where <code>f_x</code> and <code>f_y</code> are the horizontal and vertical
1456 * focal lengths, <code>[c_x, c_y]</code> is the position of the optical
1457 * axis, and <code>s</code> is a skew parameter for the sensor plane not
1458 * being aligned with the lens plane.</p>
1459 * <p>These are typically used within a transformation matrix K:</p>
1460 * <pre><code>K = [ f_x, s, c_x,
1461 * 0, f_y, c_y,
1462 * 0 0, 1 ]
1463 * </code></pre>
1464 * <p>which can then be combined with the camera pose rotation
1465 * <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 -07001466 * {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}, respectively) to calculate the
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001467 * complete transform from world coordinates to pixel
1468 * coordinates:</p>
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07001469 * <pre><code>P = [ K 0 * [ R -Rt
1470 * 0 1 ] 0 1 ]
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001471 * </code></pre>
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07001472 * <p>(Note the negation of poseTranslation when mapping from camera
1473 * to world coordinates, and multiplication by the rotation).</p>
1474 * <p>With <code>p_w</code> being a point in the world coordinate system
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001475 * and <code>p_s</code> being a point in the camera active pixel array
1476 * coordinate system, and with the mapping including the
1477 * homogeneous division by z:</p>
1478 * <pre><code> p_h = (x_h, y_h, z_h) = P p_w
1479 * p_s = p_h / z_h
1480 * </code></pre>
1481 * <p>so <code>[x_s, y_s]</code> is the pixel coordinates of the world
1482 * point, <code>z_s = 1</code>, and <code>w_s</code> is a measurement of disparity
1483 * (depth) in pixel coordinates.</p>
Eino-Ville Talvalab8bd8ab2015-06-16 11:44:10 -07001484 * <p>Note that the coordinate system for this transform is the
1485 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} system,
1486 * where <code>(0,0)</code> is the top-left of the
1487 * preCorrectionActiveArraySize rectangle. Once the pose and
1488 * intrinsic calibration transforms have been applied to a
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001489 * world point, then the {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}
Eino-Ville Talvalab8bd8ab2015-06-16 11:44:10 -07001490 * transform needs to be applied, and the result adjusted to
1491 * be in the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} coordinate
1492 * system (where <code>(0, 0)</code> is the top-left of the
1493 * activeArraySize rectangle), to determine the final pixel
1494 * coordinate of the world point for processed (non-RAW)
1495 * output buffers.</p>
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07001496 * <p>For camera devices, the center of pixel <code>(x,y)</code> is located at
1497 * coordinate <code>(x + 0.5, y + 0.5)</code>. So on a device with a
1498 * precorrection active array of size <code>(10,10)</code>, the valid pixel
1499 * indices go from <code>(0,0)-(9,9)</code>, and an perfectly-built camera would
1500 * have an optical center at the exact center of the pixel grid, at
1501 * coordinates <code>(5.0, 5.0)</code>, which is the top-left corner of pixel
1502 * <code>(5,5)</code>.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001503 * <p><b>Units</b>:
Eino-Ville Talvalab8bd8ab2015-06-16 11:44:10 -07001504 * Pixels in the
1505 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}
1506 * coordinate system.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001507 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01001508 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001509 *
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001510 * @see CameraCharacteristics#LENS_DISTORTION
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001511 * @see CameraCharacteristics#LENS_POSE_ROTATION
1512 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -07001513 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Eino-Ville Talvalab8bd8ab2015-06-16 11:44:10 -07001514 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001515 */
1516 @PublicKey
1517 public static final Key<float[]> LENS_INTRINSIC_CALIBRATION =
1518 new Key<float[]>("android.lens.intrinsicCalibration", float[].class);
1519
1520 /**
1521 * <p>The correction coefficients to correct for this camera device's
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07001522 * radial and tangential lens distortion.</p>
Ruben Brunk02cd8cb2015-06-15 15:33:09 -07001523 * <p>Four radial distortion coefficients <code>[kappa_0, kappa_1, kappa_2,
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07001524 * kappa_3]</code> and two tangential distortion coefficients
1525 * <code>[kappa_4, kappa_5]</code> that can be used to correct the
1526 * lens's geometric distortion with the mapping equations:</p>
Ruben Brunk02cd8cb2015-06-15 15:33:09 -07001527 * <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 -07001528 * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
Ruben Brunk02cd8cb2015-06-15 15:33:09 -07001529 * 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 -07001530 * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001531 * </code></pre>
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07001532 * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the
1533 * input image that correspond to the pixel values in the
1534 * corrected image at the coordinate <code>[x_i, y_i]</code>:</p>
1535 * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
1536 * </code></pre>
1537 * <p>The pixel coordinates are defined in a normalized
1538 * coordinate system related to the
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07001539 * {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} calibration fields.
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07001540 * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code> have <code>(0,0)</code> at the
1541 * lens optical center <code>[c_x, c_y]</code>. The maximum magnitudes
1542 * of both x and y coordinates are normalized to be 1 at the
1543 * edge further from the optical center, so the range
1544 * for both dimensions is <code>-1 &lt;= x &lt;= 1</code>.</p>
1545 * <p>Finally, <code>r</code> represents the radial distance from the
1546 * optical center, <code>r^2 = x_i^2 + y_i^2</code>, and its magnitude
1547 * is therefore no larger than <code>|r| &lt;= sqrt(2)</code>.</p>
1548 * <p>The distortion model used is the Brown-Conrady model.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001549 * <p><b>Units</b>:
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07001550 * Unitless coefficients.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001551 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01001552 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07001553 *
1554 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001555 * @deprecated
1556 * <p>This field was inconsistently defined in terms of its
1557 * normalization. Use {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} instead.</p>
1558 *
1559 * @see CameraCharacteristics#LENS_DISTORTION
1560
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001561 */
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001562 @Deprecated
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001563 @PublicKey
1564 public static final Key<float[]> LENS_RADIAL_DISTORTION =
1565 new Key<float[]>("android.lens.radialDistortion", float[].class);
1566
1567 /**
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001568 * <p>The origin for {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}.</p>
1569 * <p>Different calibration methods and use cases can produce better or worse results
1570 * depending on the selected coordinate origin.</p>
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001571 * <p><b>Possible values:</b>
1572 * <ul>
1573 * <li>{@link #LENS_POSE_REFERENCE_PRIMARY_CAMERA PRIMARY_CAMERA}</li>
1574 * <li>{@link #LENS_POSE_REFERENCE_GYROSCOPE GYROSCOPE}</li>
1575 * </ul></p>
1576 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01001577 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001578 *
1579 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
1580 * @see #LENS_POSE_REFERENCE_PRIMARY_CAMERA
1581 * @see #LENS_POSE_REFERENCE_GYROSCOPE
1582 */
1583 @PublicKey
1584 public static final Key<Integer> LENS_POSE_REFERENCE =
1585 new Key<Integer>("android.lens.poseReference", int.class);
1586
1587 /**
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001588 * <p>The correction coefficients to correct for this camera device's
1589 * radial and tangential lens distortion.</p>
1590 * <p>Replaces the deprecated {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion} field, which was
1591 * inconsistently defined.</p>
1592 * <p>Three radial distortion coefficients <code>[kappa_1, kappa_2,
1593 * kappa_3]</code> and two tangential distortion coefficients
1594 * <code>[kappa_4, kappa_5]</code> that can be used to correct the
1595 * lens's geometric distortion with the mapping equations:</p>
1596 * <pre><code> x_c = x_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
1597 * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
1598 * y_c = y_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
1599 * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
1600 * </code></pre>
1601 * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the
1602 * input image that correspond to the pixel values in the
1603 * corrected image at the coordinate <code>[x_i, y_i]</code>:</p>
1604 * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
1605 * </code></pre>
1606 * <p>The pixel coordinates are defined in a coordinate system
1607 * related to the {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}
1608 * calibration fields; see that entry for details of the mapping stages.
1609 * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code>
1610 * have <code>(0,0)</code> at the lens optical center <code>[c_x, c_y]</code>, and
1611 * the range of the coordinates depends on the focal length
1612 * terms of the intrinsic calibration.</p>
1613 * <p>Finally, <code>r</code> represents the radial distance from the
1614 * optical center, <code>r^2 = x_i^2 + y_i^2</code>.</p>
1615 * <p>The distortion model used is the Brown-Conrady model.</p>
1616 * <p><b>Units</b>:
1617 * Unitless coefficients.</p>
1618 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01001619 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001620 *
1621 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
1622 * @see CameraCharacteristics#LENS_RADIAL_DISTORTION
1623 */
1624 @PublicKey
1625 public static final Key<float[]> LENS_DISTORTION =
1626 new Key<float[]>("android.lens.distortion", float[].class);
1627
1628 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001629 * <p>List of noise reduction modes for {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode} that are supported
1630 * by this camera device.</p>
1631 * <p>Full-capability camera devices will always support OFF and FAST.</p>
Chien-Yu Chen72333912015-07-08 11:55:19 -07001632 * <p>Camera devices that support YUV_REPROCESSING or PRIVATE_REPROCESSING will support
1633 * ZERO_SHUTTER_LAG.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001634 * <p>Legacy-capability camera devices will only support FAST mode.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001635 * <p><b>Range of valid values:</b><br>
1636 * Any value listed in {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001637 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1638 * <p><b>Limited capability</b> -
1639 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1640 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001641 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001642 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001643 * @see CaptureRequest#NOISE_REDUCTION_MODE
1644 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001645 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07001646 public static final Key<int[]> NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES =
1647 new Key<int[]>("android.noiseReduction.availableNoiseReductionModes", int[].class);
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001648
1649 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001650 * <p>If set to 1, the HAL will always split result
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001651 * metadata for a single capture into multiple buffers,
Igor Murashkinace5bf02013-12-10 17:36:40 -08001652 * returned using multiple process_capture_result calls.</p>
1653 * <p>Does not need to be listed in static
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001654 * metadata. Support for partial results will be reworked in
1655 * future versions of camera service. This quirk will stop
1656 * working at that point; DO NOT USE without careful
Igor Murashkinace5bf02013-12-10 17:36:40 -08001657 * consideration of future support.</p>
Igor Murashkin3242f4f2014-01-15 12:27:41 -08001658 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07001659 * @deprecated
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001660 * <p>Not used in HALv3 or newer; replaced by better partials mechanism</p>
1661
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001662 * @hide
1663 */
Igor Murashkin9c595172014-05-12 13:56:20 -07001664 @Deprecated
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001665 public static final Key<Byte> QUIRKS_USE_PARTIAL_RESULT =
1666 new Key<Byte>("android.quirks.usePartialResult", byte.class);
1667
1668 /**
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001669 * <p>The maximum numbers of different types of output streams
1670 * that can be configured and used simultaneously by a camera device.</p>
1671 * <p>This is a 3 element tuple that contains the max number of output simultaneous
Zhijun Hea4d0a8f2014-04-29 12:35:27 -07001672 * streams for raw sensor, processed (but not stalling), and processed (and stalling)
1673 * formats respectively. For example, assuming that JPEG is typically a processed and
1674 * stalling stream, if max raw sensor format output stream number is 1, max YUV streams
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001675 * number is 3, and max JPEG stream number is 2, then this tuple should be <code>(1, 3, 2)</code>.</p>
1676 * <p>This lists the upper bound of the number of output streams supported by
1677 * the camera device. Using more streams simultaneously may require more hardware and
Igor Murashkin78712a82014-05-27 18:32:18 -07001678 * CPU resources that will consume more power. The image format for an output stream can
Igor Murashkin9c595172014-05-12 13:56:20 -07001679 * be any supported format provided by android.scaler.availableStreamConfigurations.
1680 * The formats defined in android.scaler.availableStreamConfigurations can be catergorized
Zhijun Hea4d0a8f2014-04-29 12:35:27 -07001681 * into the 3 stream types as below:</p>
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001682 * <ul>
Zhijun Hea4d0a8f2014-04-29 12:35:27 -07001683 * <li>Processed (but stalling): any non-RAW format with a stallDurations &gt; 0.
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07001684 * Typically {@link android.graphics.ImageFormat#JPEG JPEG format}.</li>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08001685 * <li>Raw formats: {@link android.graphics.ImageFormat#RAW_SENSOR RAW_SENSOR}, {@link android.graphics.ImageFormat#RAW10 RAW10}, or
1686 * {@link android.graphics.ImageFormat#RAW12 RAW12}.</li>
1687 * <li>Processed (but not-stalling): any non-RAW format without a stall duration. Typically
1688 * {@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888},
Shuzhen Wangec5e8d22018-09-28 09:28:48 -07001689 * {@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 -08001690 * </ul>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001691 * <p><b>Range of valid values:</b><br></p>
1692 * <p>For processed (and stalling) format streams, &gt;= 1.</p>
1693 * <p>For Raw format (either stalling or non-stalling) streams, &gt;= 0.</p>
1694 * <p>For processed (but not stalling) format streams, &gt;= 3
1695 * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>);
1696 * &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 -07001697 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001698 *
1699 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkin78712a82014-05-27 18:32:18 -07001700 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001701 */
1702 public static final Key<int[]> REQUEST_MAX_NUM_OUTPUT_STREAMS =
1703 new Key<int[]>("android.request.maxNumOutputStreams", int[].class);
1704
1705 /**
Igor Murashkin78712a82014-05-27 18:32:18 -07001706 * <p>The maximum numbers of different types of output streams
1707 * that can be configured and used simultaneously by a camera device
1708 * for any <code>RAW</code> formats.</p>
1709 * <p>This value contains the max number of output simultaneous
1710 * streams from the raw sensor.</p>
1711 * <p>This lists the upper bound of the number of output streams supported by
1712 * the camera device. Using more streams simultaneously may require more hardware and
1713 * CPU resources that will consume more power. The image format for this kind of an output stream can
1714 * be any <code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p>
1715 * <p>In particular, a <code>RAW</code> format is typically one of:</p>
1716 * <ul>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07001717 * <li>{@link android.graphics.ImageFormat#RAW_SENSOR RAW_SENSOR}</li>
1718 * <li>{@link android.graphics.ImageFormat#RAW10 RAW10}</li>
1719 * <li>{@link android.graphics.ImageFormat#RAW12 RAW12}</li>
Igor Murashkin78712a82014-05-27 18:32:18 -07001720 * </ul>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001721 * <p>LEGACY mode devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> LEGACY)
1722 * never support raw streams.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001723 * <p><b>Range of valid values:</b><br></p>
1724 * <p>&gt;= 0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001725 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -07001726 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001727 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkin78712a82014-05-27 18:32:18 -07001728 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
1729 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001730 @PublicKey
1731 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -07001732 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_RAW =
1733 new Key<Integer>("android.request.maxNumOutputRaw", int.class);
1734
1735 /**
1736 * <p>The maximum numbers of different types of output streams
1737 * that can be configured and used simultaneously by a camera device
1738 * for any processed (but not-stalling) formats.</p>
1739 * <p>This value contains the max number of output simultaneous
1740 * streams for any processed (but not-stalling) formats.</p>
1741 * <p>This lists the upper bound of the number of output streams supported by
1742 * the camera device. Using more streams simultaneously may require more hardware and
1743 * CPU resources that will consume more power. The image format for this kind of an output stream can
1744 * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p>
1745 * <p>Processed (but not-stalling) is defined as any non-RAW format without a stall duration.
1746 * Typically:</p>
1747 * <ul>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07001748 * <li>{@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888}</li>
1749 * <li>{@link android.graphics.ImageFormat#NV21 NV21}</li>
1750 * <li>{@link android.graphics.ImageFormat#YV12 YV12}</li>
1751 * <li>Implementation-defined formats, i.e. {@link android.hardware.camera2.params.StreamConfigurationMap#isOutputSupportedFor(Class) }</li>
Shuzhen Wangec5e8d22018-09-28 09:28:48 -07001752 * <li>{@link android.graphics.ImageFormat#Y8 Y8}</li>
Igor Murashkin78712a82014-05-27 18:32:18 -07001753 * </ul>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07001754 * <p>For full guarantees, query {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } with a
1755 * processed format -- it will return 0 for a non-stalling stream.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001756 * <p>LEGACY devices will support at least 2 processing/non-stalling streams.</p>
1757 * <p><b>Range of valid values:</b><br></p>
1758 * <p>&gt;= 3
1759 * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>);
1760 * &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 -07001761 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -07001762 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001763 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkin78712a82014-05-27 18:32:18 -07001764 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
1765 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001766 @PublicKey
1767 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -07001768 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC =
1769 new Key<Integer>("android.request.maxNumOutputProc", int.class);
1770
1771 /**
1772 * <p>The maximum numbers of different types of output streams
1773 * that can be configured and used simultaneously by a camera device
1774 * for any processed (and stalling) formats.</p>
1775 * <p>This value contains the max number of output simultaneous
1776 * streams for any processed (but not-stalling) formats.</p>
1777 * <p>This lists the upper bound of the number of output streams supported by
1778 * the camera device. Using more streams simultaneously may require more hardware and
1779 * CPU resources that will consume more power. The image format for this kind of an output stream can
1780 * 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 -07001781 * <p>A processed and stalling format is defined as any non-RAW format with a stallDurations
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08001782 * &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 -07001783 * <p>For full guarantees, query {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } with a
1784 * processed format -- it will return a non-0 value for a stalling stream.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001785 * <p>LEGACY devices will support up to 1 processing/stalling stream.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001786 * <p><b>Range of valid values:</b><br></p>
1787 * <p>&gt;= 1</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001788 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -07001789 *
1790 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
1791 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001792 @PublicKey
1793 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -07001794 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC_STALLING =
1795 new Key<Integer>("android.request.maxNumOutputProcStalling", int.class);
1796
1797 /**
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001798 * <p>The maximum numbers of any type of input streams
1799 * that can be configured and used simultaneously by a camera device.</p>
1800 * <p>When set to 0, it means no input stream is supported.</p>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07001801 * <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
1802 * input stream, there must be at least one output stream configured to to receive the
1803 * reprocessed images.</p>
Zhijun He0e99c222015-01-29 15:26:05 -08001804 * <p>When an input stream and some output streams are used in a reprocessing request,
1805 * only the input buffer will be used to produce these output stream buffers, and a
1806 * new sensor image will not be captured.</p>
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001807 * <p>For example, for Zero Shutter Lag (ZSL) still capture use case, the input
Chien-Yu Chen8062d312015-05-12 14:24:10 -07001808 * stream image format will be PRIVATE, the associated output stream image format
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001809 * should be JPEG.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001810 * <p><b>Range of valid values:</b><br></p>
1811 * <p>0 or 1.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001812 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1813 * <p><b>Full capability</b> -
1814 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1815 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1816 *
1817 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001818 */
Zhijun He0e99c222015-01-29 15:26:05 -08001819 @PublicKey
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001820 public static final Key<Integer> REQUEST_MAX_NUM_INPUT_STREAMS =
1821 new Key<Integer>("android.request.maxNumInputStreams", int.class);
1822
1823 /**
Igor Murashkinc127f052014-01-17 18:06:02 -08001824 * <p>Specifies the number of maximum pipeline stages a frame
1825 * has to go through from when it's exposed to when it's available
1826 * to the framework.</p>
1827 * <p>A typical minimum value for this is 2 (one stage to expose,
1828 * one stage to readout) from the sensor. The ISP then usually adds
1829 * its own stages to do custom HW processing. Further stages may be
1830 * added by SW processing.</p>
1831 * <p>Depending on what settings are used (e.g. YUV, JPEG) and what
1832 * processing is enabled (e.g. face detection), the actual pipeline
1833 * depth (specified by {@link CaptureResult#REQUEST_PIPELINE_DEPTH android.request.pipelineDepth}) may be less than
1834 * the max pipeline depth.</p>
1835 * <p>A pipeline depth of X stages is equivalent to a pipeline latency of
1836 * X frame intervals.</p>
Zhijun Hefab663e2015-05-26 19:46:31 -07001837 * <p>This value will normally be 8 or less, however, for high speed capture session,
1838 * 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 -07001839 * <p>This key is available on all devices.</p>
Igor Murashkinc127f052014-01-17 18:06:02 -08001840 *
1841 * @see CaptureResult#REQUEST_PIPELINE_DEPTH
1842 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001843 @PublicKey
Igor Murashkinc127f052014-01-17 18:06:02 -08001844 public static final Key<Byte> REQUEST_PIPELINE_MAX_DEPTH =
1845 new Key<Byte>("android.request.pipelineMaxDepth", byte.class);
1846
1847 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001848 * <p>Defines how many sub-components
Igor Murashkin2086b582014-01-17 18:30:59 -08001849 * a result will be composed of.</p>
1850 * <p>In order to combat the pipeline latency, partial results
1851 * may be delivered to the application layer from the camera device as
1852 * soon as they are available.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001853 * <p>Optional; defaults to 1. A value of 1 means that partial
1854 * results are not supported, and only the final TotalCaptureResult will
1855 * be produced by the camera device.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001856 * <p>A typical use case for this might be: after requesting an
1857 * auto-focus (AF) lock the new AF state might be available 50%
1858 * of the way through the pipeline. The camera device could
1859 * then immediately dispatch this state via a partial result to
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001860 * the application, and the rest of the metadata via later
1861 * partial results.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001862 * <p><b>Range of valid values:</b><br>
1863 * &gt;= 1</p>
Zhijun He1420de42014-07-17 17:45:54 -07001864 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin2086b582014-01-17 18:30:59 -08001865 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001866 @PublicKey
Igor Murashkin2086b582014-01-17 18:30:59 -08001867 public static final Key<Integer> REQUEST_PARTIAL_RESULT_COUNT =
1868 new Key<Integer>("android.request.partialResultCount", int.class);
1869
1870 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001871 * <p>List of capabilities that this camera device
Igor Murashkine46c0da2014-02-07 18:34:37 -08001872 * advertises as fully supporting.</p>
1873 * <p>A capability is a contract that the camera device makes in order
1874 * to be able to satisfy one or more use cases.</p>
1875 * <p>Listing a capability guarantees that the whole set of features
1876 * required to support a common use will all be available.</p>
1877 * <p>Using a subset of the functionality provided by an unsupported
1878 * capability may be possible on a specific camera device implementation;
1879 * to do this query each of android.request.availableRequestKeys,
1880 * android.request.availableResultKeys,
1881 * android.request.availableCharacteristicsKeys.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001882 * <p>The following capabilities are guaranteed to be available on
1883 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL devices:</p>
1884 * <ul>
1885 * <li>MANUAL_SENSOR</li>
Zhijun Hedf9b7472014-06-04 13:42:41 -07001886 * <li>MANUAL_POST_PROCESSING</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001887 * </ul>
1888 * <p>Other capabilities may be available on either FULL or LIMITED
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001889 * devices, but the application should query this key to be sure.</p>
1890 * <p><b>Possible values:</b>
1891 * <ul>
1892 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE BACKWARD_COMPATIBLE}</li>
1893 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR MANUAL_SENSOR}</li>
1894 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING MANUAL_POST_PROCESSING}</li>
1895 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_RAW RAW}</li>
Chien-Yu Chen8062d312015-05-12 14:24:10 -07001896 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING PRIVATE_REPROCESSING}</li>
Ruben Brunk0c22e692014-11-11 12:00:34 -08001897 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS READ_SENSOR_SETTINGS}</li>
Eino-Ville Talvala126a7462014-11-04 16:31:01 -08001898 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE BURST_CAPTURE}</li>
Zhijun He0e99c222015-01-29 15:26:05 -08001899 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING YUV_REPROCESSING}</li>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -07001900 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT DEPTH_OUTPUT}</li>
Zhijun Hefab663e2015-05-26 19:46:31 -07001901 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO CONSTRAINED_HIGH_SPEED_VIDEO}</li>
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001902 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING MOTION_TRACKING}</li>
Shuzhen Wang23d29382017-11-26 17:24:56 -08001903 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA LOGICAL_MULTI_CAMERA}</li>
Shuzhen Wang51248bf2018-03-22 00:04:45 -07001904 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME MONOCHROME}</li>
Jayant Chowdharyd88b4832019-01-24 18:11:09 -08001905 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA SECURE_IMAGE_DATA}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001906 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001907 * <p>This key is available on all devices.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001908 *
1909 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -07001910 * @see #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE
Igor Murashkine46c0da2014-02-07 18:34:37 -08001911 * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR
Zhijun He50f72432014-05-28 13:52:04 -07001912 * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING
Eino-Ville Talvala611fece2014-07-10 17:29:38 -07001913 * @see #REQUEST_AVAILABLE_CAPABILITIES_RAW
Chien-Yu Chen8062d312015-05-12 14:24:10 -07001914 * @see #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING
Ruben Brunk0c22e692014-11-11 12:00:34 -08001915 * @see #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS
Eino-Ville Talvala126a7462014-11-04 16:31:01 -08001916 * @see #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE
Zhijun He0e99c222015-01-29 15:26:05 -08001917 * @see #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -07001918 * @see #REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT
Zhijun Hefab663e2015-05-26 19:46:31 -07001919 * @see #REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001920 * @see #REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING
Shuzhen Wang23d29382017-11-26 17:24:56 -08001921 * @see #REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA
Shuzhen Wang51248bf2018-03-22 00:04:45 -07001922 * @see #REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME
Jayant Chowdharyd88b4832019-01-24 18:11:09 -08001923 * @see #REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA
Igor Murashkine46c0da2014-02-07 18:34:37 -08001924 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001925 @PublicKey
Zhijun He421ddbe2014-05-29 13:41:49 -07001926 public static final Key<int[]> REQUEST_AVAILABLE_CAPABILITIES =
1927 new Key<int[]>("android.request.availableCapabilities", int[].class);
Igor Murashkine46c0da2014-02-07 18:34:37 -08001928
1929 /**
1930 * <p>A list of all keys that the camera device has available
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07001931 * to use with {@link android.hardware.camera2.CaptureRequest }.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001932 * <p>Attempting to set a key into a CaptureRequest that is not
1933 * listed here will result in an invalid request and will be rejected
1934 * by the camera device.</p>
1935 * <p>This field can be used to query the feature set of a camera device
1936 * at a more granular level than capabilities. This is especially
1937 * important for optional keys that are not listed under any capability
1938 * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001939 * <p>This key is available on all devices.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001940 *
1941 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1942 * @hide
1943 */
1944 public static final Key<int[]> REQUEST_AVAILABLE_REQUEST_KEYS =
1945 new Key<int[]>("android.request.availableRequestKeys", int[].class);
1946
1947 /**
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08001948 * <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 -08001949 * <p>Attempting to get a key from a CaptureResult that is not
1950 * listed here will always return a <code>null</code> value. Getting a key from
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001951 * a CaptureResult that is listed here will generally never return a <code>null</code>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001952 * value.</p>
1953 * <p>The following keys may return <code>null</code> unless they are enabled:</p>
1954 * <ul>
Ruben Brunk57493682014-05-27 18:58:08 -07001955 * <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 -08001956 * </ul>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001957 * <p>(Those sometimes-null keys will nevertheless be listed here
Igor Murashkine46c0da2014-02-07 18:34:37 -08001958 * if they are available.)</p>
1959 * <p>This field can be used to query the feature set of a camera device
1960 * at a more granular level than capabilities. This is especially
1961 * important for optional keys that are not listed under any capability
1962 * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001963 * <p>This key is available on all devices.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001964 *
1965 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Igor Murashkine46c0da2014-02-07 18:34:37 -08001966 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
1967 * @hide
1968 */
1969 public static final Key<int[]> REQUEST_AVAILABLE_RESULT_KEYS =
1970 new Key<int[]>("android.request.availableResultKeys", int[].class);
1971
1972 /**
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08001973 * <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 -08001974 * <p>This entry follows the same rules as
1975 * android.request.availableResultKeys (except that it applies for
1976 * CameraCharacteristics instead of CaptureResult). See above for more
1977 * details.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001978 * <p>This key is available on all devices.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001979 * @hide
1980 */
1981 public static final Key<int[]> REQUEST_AVAILABLE_CHARACTERISTICS_KEYS =
1982 new Key<int[]>("android.request.availableCharacteristicsKeys", int[].class);
1983
1984 /**
Emilian Peev75a55702017-11-07 16:09:59 +00001985 * <p>A subset of the available request keys that the camera device
1986 * can pass as part of the capture session initialization.</p>
1987 * <p>This is a subset of android.request.availableRequestKeys which
1988 * contains a list of keys that are difficult to apply per-frame and
1989 * can result in unexpected delays when modified during the capture session
1990 * lifetime. Typical examples include parameters that require a
1991 * time-consuming hardware re-configuration or internal camera pipeline
1992 * change. For performance reasons we advise clients to pass their initial
Chien-Yu Chena1d1d5b2018-01-03 12:14:53 -08001993 * values as part of
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001994 * {@link SessionConfiguration#setSessionParameters }.
Chien-Yu Chena1d1d5b2018-01-03 12:14:53 -08001995 * Once the camera capture session is enabled it is also recommended to avoid
Emilian Peev75a55702017-11-07 16:09:59 +00001996 * changing them from their initial values set in
1997 * {@link SessionConfiguration#setSessionParameters }.
1998 * Control over session parameters can still be exerted in capture requests
1999 * but clients should be aware and expect delays during their application.
2000 * An example usage scenario could look like this:</p>
2001 * <ul>
2002 * <li>The camera client starts by quering the session parameter key list via
2003 * {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys }.</li>
2004 * <li>Before triggering the capture session create sequence, a capture request
Chien-Yu Chena1d1d5b2018-01-03 12:14:53 -08002005 * must be built via
2006 * {@link CameraDevice#createCaptureRequest }
2007 * using an appropriate template matching the particular use case.</li>
Emilian Peev75a55702017-11-07 16:09:59 +00002008 * <li>The client should go over the list of session parameters and check
2009 * whether some of the keys listed matches with the parameters that
2010 * they intend to modify as part of the first capture request.</li>
2011 * <li>If there is no such match, the capture request can be passed
Chien-Yu Chena1d1d5b2018-01-03 12:14:53 -08002012 * unmodified to
2013 * {@link SessionConfiguration#setSessionParameters }.</li>
Emilian Peev75a55702017-11-07 16:09:59 +00002014 * <li>If matches do exist, the client should update the respective values
Chien-Yu Chena1d1d5b2018-01-03 12:14:53 -08002015 * and pass the request to
2016 * {@link SessionConfiguration#setSessionParameters }.</li>
Emilian Peev75a55702017-11-07 16:09:59 +00002017 * <li>After the capture session initialization completes the session parameter
2018 * key list can continue to serve as reference when posting or updating
2019 * further requests. As mentioned above further changes to session
2020 * parameters should ideally be avoided, if updates are necessary
2021 * however clients could expect a delay/glitch during the
2022 * parameter switch.</li>
2023 * </ul>
2024 * <p>This key is available on all devices.</p>
2025 * @hide
2026 */
2027 public static final Key<int[]> REQUEST_AVAILABLE_SESSION_KEYS =
2028 new Key<int[]>("android.request.availableSessionKeys", int[].class);
2029
2030 /**
koprivadebd4ee2018-09-13 10:59:46 -07002031 * <p>A subset of the available request keys that can be overridden for
Emilian Peev2100ae72018-01-12 16:56:25 +00002032 * physical devices backing a logical multi-camera.</p>
2033 * <p>This is a subset of android.request.availableRequestKeys which contains a list
koprivadebd4ee2018-09-13 10:59:46 -07002034 * of keys that can be overridden using {@link CaptureRequest.Builder#setPhysicalCameraKey }.
Emilian Peev2100ae72018-01-12 16:56:25 +00002035 * The respective value of such request key can be obtained by calling
2036 * {@link CaptureRequest.Builder#getPhysicalCameraKey }. Capture requests that contain
2037 * individual physical device requests must be built via
Emilian Peevf60f4fb2018-02-08 17:40:48 +00002038 * {@link android.hardware.camera2.CameraDevice#createCaptureRequest(int, Set)}.</p>
Emilian Peev2100ae72018-01-12 16:56:25 +00002039 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2040 * <p><b>Limited capability</b> -
2041 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
2042 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
2043 *
2044 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2045 * @hide
2046 */
2047 public static final Key<int[]> REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS =
2048 new Key<int[]>("android.request.availablePhysicalCameraRequestKeys", int[].class);
2049
2050 /**
Emilian Peeva7fea4c2018-09-03 16:37:06 +01002051 * <p>A list of camera characteristics keys that are only available
2052 * in case the camera client has camera permission.</p>
2053 * <p>The entry contains a subset of
2054 * {@link android.hardware.camera2.CameraCharacteristics#getKeys } that require camera clients
2055 * to acquire the {@link android.Manifest.permission#CAMERA } permission before calling
2056 * {@link android.hardware.camera2.CameraManager#getCameraCharacteristics }. If the
2057 * permission is not held by the camera client, then the values of the repsective properties
2058 * will not be present in {@link android.hardware.camera2.CameraCharacteristics }.</p>
2059 * <p>This key is available on all devices.</p>
2060 * @hide
2061 */
2062 public static final Key<int[]> REQUEST_CHARACTERISTIC_KEYS_NEEDING_PERMISSION =
2063 new Key<int[]>("android.request.characteristicKeysNeedingPermission", int[].class);
2064
2065 /**
Zhijun Hef3b16df2014-01-17 13:37:59 -08002066 * <p>The list of image formats that are supported by this
Igor Murashkin418f6df2014-02-07 18:20:48 -08002067 * camera device for output streams.</p>
Zhijun Hef3b16df2014-01-17 13:37:59 -08002068 * <p>All camera devices will support JPEG and YUV_420_888 formats.</p>
2069 * <p>When set to YUV_420_888, application can access the YUV420 data directly.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002070 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07002071 * @deprecated
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07002072 * <p>Not used in HALv3 or newer</p>
2073
Igor Murashkin9c595172014-05-12 13:56:20 -07002074 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002075 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002076 @Deprecated
Igor Murashkinb519cc52013-07-02 11:23:44 -07002077 public static final Key<int[]> SCALER_AVAILABLE_FORMATS =
2078 new Key<int[]>("android.scaler.availableFormats", int[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002079
2080 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002081 * <p>The minimum frame duration that is supported
Igor Murashkin9c595172014-05-12 13:56:20 -07002082 * for each resolution in android.scaler.availableJpegSizes.</p>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08002083 * <p>This corresponds to the minimum steady-state frame duration when only
2084 * that JPEG stream is active and captured in a burst, with all
2085 * processing (typically in android.*.mode) set to FAST.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08002086 * <p>When multiple streams are configured, the minimum
2087 * frame duration will be &gt;= max(individual stream min
2088 * durations)</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002089 * <p><b>Units</b>: Nanoseconds</p>
2090 * <p><b>Range of valid values:</b><br>
2091 * TODO: Remove property.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002092 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07002093 * @deprecated
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07002094 * <p>Not used in HALv3 or newer</p>
2095
Igor Murashkin9c595172014-05-12 13:56:20 -07002096 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002097 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002098 @Deprecated
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002099 public static final Key<long[]> SCALER_AVAILABLE_JPEG_MIN_DURATIONS =
2100 new Key<long[]>("android.scaler.availableJpegMinDurations", long[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002101
2102 /**
Zhijun Hef3b16df2014-01-17 13:37:59 -08002103 * <p>The JPEG resolutions that are supported by this camera device.</p>
2104 * <p>The resolutions are listed as <code>(width, height)</code> pairs. All camera devices will support
2105 * 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 -07002106 * <p><b>Range of valid values:</b><br>
2107 * TODO: Remove property.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002108 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Zhijun Hef3b16df2014-01-17 13:37:59 -08002109 *
2110 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Igor Murashkin9c595172014-05-12 13:56:20 -07002111 * @deprecated
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07002112 * <p>Not used in HALv3 or newer</p>
2113
Igor Murashkin9c595172014-05-12 13:56:20 -07002114 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002115 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002116 @Deprecated
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07002117 public static final Key<android.util.Size[]> SCALER_AVAILABLE_JPEG_SIZES =
2118 new Key<android.util.Size[]>("android.scaler.availableJpegSizes", android.util.Size[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002119
2120 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002121 * <p>The maximum ratio between both active area width
2122 * and crop region width, and active area height and
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002123 * crop region height, for {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002124 * <p>This represents the maximum amount of zooming possible by
2125 * the camera device, or equivalently, the minimum cropping
2126 * window size.</p>
2127 * <p>Crop regions that have a width or height that is smaller
2128 * than this ratio allows will be rounded up to the minimum
2129 * allowed size by the camera device.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002130 * <p><b>Units</b>: Zoom scale factor</p>
2131 * <p><b>Range of valid values:</b><br>
2132 * &gt;=1</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002133 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002134 *
2135 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002136 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002137 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002138 public static final Key<Float> SCALER_AVAILABLE_MAX_DIGITAL_ZOOM =
2139 new Key<Float>("android.scaler.availableMaxDigitalZoom", float.class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002140
2141 /**
Igor Murashkin143aa0b2014-01-17 15:02:34 -08002142 * <p>For each available processed output size (defined in
Igor Murashkin9c595172014-05-12 13:56:20 -07002143 * android.scaler.availableProcessedSizes), this property lists the
Igor Murashkin143aa0b2014-01-17 15:02:34 -08002144 * minimum supportable frame duration for that size.</p>
2145 * <p>This should correspond to the frame duration when only that processed
2146 * stream is active, with all processing (typically in android.*.mode)
2147 * set to FAST.</p>
2148 * <p>When multiple streams are configured, the minimum frame duration will
2149 * be &gt;= max(individual stream min durations).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002150 * <p><b>Units</b>: Nanoseconds</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002151 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07002152 * @deprecated
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07002153 * <p>Not used in HALv3 or newer</p>
2154
Igor Murashkin9c595172014-05-12 13:56:20 -07002155 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002156 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002157 @Deprecated
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002158 public static final Key<long[]> SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS =
2159 new Key<long[]>("android.scaler.availableProcessedMinDurations", long[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002160
2161 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002162 * <p>The resolutions available for use with
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002163 * processed output streams, such as YV12, NV12, and
2164 * platform opaque YUV/RGB streams to the GPU or video
Zhijun Hef3b16df2014-01-17 13:37:59 -08002165 * encoders.</p>
2166 * <p>The resolutions are listed as <code>(width, height)</code> pairs.</p>
2167 * <p>For a given use case, the actual maximum supported resolution
2168 * may be lower than what is listed here, depending on the destination
2169 * Surface for the image data. For example, for recording video,
2170 * the video encoder chosen may have a maximum size limit (e.g. 1080p)
2171 * smaller than what the camera (e.g. maximum resolution is 3264x2448)
2172 * can provide.</p>
2173 * <p>Please reference the documentation for the image data destination to
2174 * check if it limits the maximum size for image data.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002175 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07002176 * @deprecated
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07002177 * <p>Not used in HALv3 or newer</p>
2178
Igor Murashkin9c595172014-05-12 13:56:20 -07002179 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002180 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002181 @Deprecated
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07002182 public static final Key<android.util.Size[]> SCALER_AVAILABLE_PROCESSED_SIZES =
2183 new Key<android.util.Size[]>("android.scaler.availableProcessedSizes", android.util.Size[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002184
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002185 /**
Igor Murashkin418f6df2014-02-07 18:20:48 -08002186 * <p>The mapping of image formats that are supported by this
2187 * camera device for input streams, to their corresponding output formats.</p>
2188 * <p>All camera devices with at least 1
Zhijun He0e99c222015-01-29 15:26:05 -08002189 * {@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} will have at least one
Igor Murashkin418f6df2014-02-07 18:20:48 -08002190 * available input format.</p>
2191 * <p>The camera device will support the following map of formats,
Zhijun He0e99c222015-01-29 15:26:05 -08002192 * if its dependent capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}) is supported:</p>
Igor Murashkin418f6df2014-02-07 18:20:48 -08002193 * <table>
2194 * <thead>
2195 * <tr>
2196 * <th align="left">Input Format</th>
2197 * <th align="left">Output Format</th>
2198 * <th align="left">Capability</th>
2199 * </tr>
2200 * </thead>
2201 * <tbody>
2202 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002203 * <td align="left">{@link android.graphics.ImageFormat#PRIVATE }</td>
2204 * <td align="left">{@link android.graphics.ImageFormat#JPEG }</td>
Chien-Yu Chen8062d312015-05-12 14:24:10 -07002205 * <td align="left">PRIVATE_REPROCESSING</td>
Igor Murashkin418f6df2014-02-07 18:20:48 -08002206 * </tr>
2207 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002208 * <td align="left">{@link android.graphics.ImageFormat#PRIVATE }</td>
2209 * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
Chien-Yu Chen8062d312015-05-12 14:24:10 -07002210 * <td align="left">PRIVATE_REPROCESSING</td>
Igor Murashkin418f6df2014-02-07 18:20:48 -08002211 * </tr>
2212 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002213 * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
2214 * <td align="left">{@link android.graphics.ImageFormat#JPEG }</td>
Zhijun He0e99c222015-01-29 15:26:05 -08002215 * <td align="left">YUV_REPROCESSING</td>
2216 * </tr>
2217 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002218 * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
2219 * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
Zhijun He0e99c222015-01-29 15:26:05 -08002220 * <td align="left">YUV_REPROCESSING</td>
Igor Murashkin418f6df2014-02-07 18:20:48 -08002221 * </tr>
2222 * </tbody>
2223 * </table>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002224 * <p>PRIVATE refers to a device-internal format that is not directly application-visible. A
Chien-Yu Chen8062d312015-05-12 14:24:10 -07002225 * PRIVATE input surface can be acquired by {@link android.media.ImageReader#newInstance }
2226 * with {@link android.graphics.ImageFormat#PRIVATE } as the format.</p>
2227 * <p>For a PRIVATE_REPROCESSING-capable camera device, using the PRIVATE format as either input
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002228 * 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 -08002229 * <p>Attempting to configure an input stream with output streams not
2230 * listed as available in this map is not valid.</p>
Shuzhen Wangec5e8d22018-09-28 09:28:48 -07002231 * <p>Additionally, if the camera device is MONOCHROME with Y8 support, it will also support
2232 * the following map of formats if its dependent capability
2233 * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}) is supported:</p>
2234 * <table>
2235 * <thead>
2236 * <tr>
2237 * <th align="left">Input Format</th>
2238 * <th align="left">Output Format</th>
2239 * <th align="left">Capability</th>
2240 * </tr>
2241 * </thead>
2242 * <tbody>
2243 * <tr>
2244 * <td align="left">{@link android.graphics.ImageFormat#PRIVATE }</td>
2245 * <td align="left">{@link android.graphics.ImageFormat#Y8 }</td>
2246 * <td align="left">PRIVATE_REPROCESSING</td>
2247 * </tr>
2248 * <tr>
2249 * <td align="left">{@link android.graphics.ImageFormat#Y8 }</td>
2250 * <td align="left">{@link android.graphics.ImageFormat#JPEG }</td>
2251 * <td align="left">YUV_REPROCESSING</td>
2252 * </tr>
2253 * <tr>
2254 * <td align="left">{@link android.graphics.ImageFormat#Y8 }</td>
2255 * <td align="left">{@link android.graphics.ImageFormat#Y8 }</td>
2256 * <td align="left">YUV_REPROCESSING</td>
2257 * </tr>
2258 * </tbody>
2259 * </table>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002260 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002261 *
Zhijun He0e99c222015-01-29 15:26:05 -08002262 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2263 * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
Igor Murashkin9c595172014-05-12 13:56:20 -07002264 * @hide
Igor Murashkin418f6df2014-02-07 18:20:48 -08002265 */
Chien-Yu Chen0a551f12015-04-03 17:57:35 -07002266 public static final Key<android.hardware.camera2.params.ReprocessFormatsMap> SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP =
2267 new Key<android.hardware.camera2.params.ReprocessFormatsMap>("android.scaler.availableInputOutputFormatsMap", android.hardware.camera2.params.ReprocessFormatsMap.class);
Igor Murashkin418f6df2014-02-07 18:20:48 -08002268
2269 /**
Igor Murashkina23ffb52014-02-07 18:52:34 -08002270 * <p>The available stream configurations that this
2271 * camera device supports
2272 * (i.e. format, width, height, output/input stream).</p>
2273 * <p>The configurations are listed as <code>(format, width, height, input?)</code>
2274 * tuples.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002275 * <p>For a given use case, the actual maximum supported resolution
2276 * may be lower than what is listed here, depending on the destination
2277 * Surface for the image data. For example, for recording video,
2278 * the video encoder chosen may have a maximum size limit (e.g. 1080p)
2279 * smaller than what the camera (e.g. maximum resolution is 3264x2448)
2280 * can provide.</p>
2281 * <p>Please reference the documentation for the image data destination to
2282 * check if it limits the maximum size for image data.</p>
2283 * <p>Not all output formats may be supported in a configuration with
2284 * an input stream of a particular format. For more details, see
Igor Murashkin9c595172014-05-12 13:56:20 -07002285 * android.scaler.availableInputOutputFormatsMap.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002286 * <p>The following table describes the minimum required output stream
2287 * configurations based on the hardware level
2288 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p>
2289 * <table>
2290 * <thead>
2291 * <tr>
2292 * <th align="center">Format</th>
2293 * <th align="center">Size</th>
2294 * <th align="center">Hardware Level</th>
2295 * <th align="center">Notes</th>
2296 * </tr>
2297 * </thead>
2298 * <tbody>
2299 * <tr>
2300 * <td align="center">JPEG</td>
2301 * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td>
2302 * <td align="center">Any</td>
2303 * <td align="center"></td>
2304 * </tr>
2305 * <tr>
2306 * <td align="center">JPEG</td>
2307 * <td align="center">1920x1080 (1080p)</td>
2308 * <td align="center">Any</td>
2309 * <td align="center">if 1080p &lt;= activeArraySize</td>
2310 * </tr>
2311 * <tr>
2312 * <td align="center">JPEG</td>
2313 * <td align="center">1280x720 (720)</td>
2314 * <td align="center">Any</td>
2315 * <td align="center">if 720p &lt;= activeArraySize</td>
2316 * </tr>
2317 * <tr>
2318 * <td align="center">JPEG</td>
2319 * <td align="center">640x480 (480p)</td>
2320 * <td align="center">Any</td>
2321 * <td align="center">if 480p &lt;= activeArraySize</td>
2322 * </tr>
2323 * <tr>
2324 * <td align="center">JPEG</td>
2325 * <td align="center">320x240 (240p)</td>
2326 * <td align="center">Any</td>
2327 * <td align="center">if 240p &lt;= activeArraySize</td>
2328 * </tr>
2329 * <tr>
2330 * <td align="center">YUV_420_888</td>
2331 * <td align="center">all output sizes available for JPEG</td>
2332 * <td align="center">FULL</td>
2333 * <td align="center"></td>
2334 * </tr>
2335 * <tr>
2336 * <td align="center">YUV_420_888</td>
2337 * <td align="center">all output sizes available for JPEG, up to the maximum video size</td>
2338 * <td align="center">LIMITED</td>
2339 * <td align="center"></td>
2340 * </tr>
2341 * <tr>
2342 * <td align="center">IMPLEMENTATION_DEFINED</td>
2343 * <td align="center">same as YUV_420_888</td>
2344 * <td align="center">Any</td>
2345 * <td align="center"></td>
2346 * </tr>
2347 * </tbody>
2348 * </table>
2349 * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional
2350 * mandatory stream configurations on a per-capability basis.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002351 * <p>This key is available on all devices.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002352 *
2353 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2354 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Igor Murashkina23ffb52014-02-07 18:52:34 -08002355 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Igor Murashkin9c595172014-05-12 13:56:20 -07002356 * @hide
Igor Murashkina23ffb52014-02-07 18:52:34 -08002357 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002358 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> SCALER_AVAILABLE_STREAM_CONFIGURATIONS =
2359 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.scaler.availableStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
Igor Murashkina23ffb52014-02-07 18:52:34 -08002360
2361 /**
2362 * <p>This lists the minimum frame duration for each
2363 * format/size combination.</p>
2364 * <p>This should correspond to the frame duration when only that
2365 * stream is active, with all processing (typically in android.*.mode)
2366 * set to either OFF or FAST.</p>
2367 * <p>When multiple streams are used in a request, the minimum frame
2368 * duration will be max(individual stream min durations).</p>
2369 * <p>The minimum frame duration of a stream (of a particular format, size)
2370 * is the same regardless of whether the stream is input or output.</p>
2371 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and
Igor Murashkin9c595172014-05-12 13:56:20 -07002372 * android.scaler.availableStallDurations for more details about
Igor Murashkina23ffb52014-02-07 18:52:34 -08002373 * calculating the max frame rate.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002374 * <p><b>Units</b>: (format, width, height, ns) x n</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002375 * <p>This key is available on all devices.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002376 *
Igor Murashkina23ffb52014-02-07 18:52:34 -08002377 * @see CaptureRequest#SENSOR_FRAME_DURATION
Igor Murashkin9c595172014-05-12 13:56:20 -07002378 * @hide
Igor Murashkina23ffb52014-02-07 18:52:34 -08002379 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002380 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_MIN_FRAME_DURATIONS =
2381 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
Igor Murashkina23ffb52014-02-07 18:52:34 -08002382
2383 /**
2384 * <p>This lists the maximum stall duration for each
Zhijun He513f7c32015-04-24 18:23:54 -07002385 * output format/size combination.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002386 * <p>A stall duration is how much extra time would get added
2387 * to the normal minimum frame duration for a repeating request
2388 * that has streams with non-zero stall.</p>
2389 * <p>For example, consider JPEG captures which have the following
2390 * characteristics:</p>
2391 * <ul>
2392 * <li>JPEG streams act like processed YUV streams in requests for which
2393 * they are not included; in requests in which they are directly
2394 * referenced, they act as JPEG streams. This is because supporting a
2395 * JPEG stream requires the underlying YUV data to always be ready for
2396 * use by a JPEG encoder, but the encoder will only be used (and impact
2397 * frame duration) on requests that actually reference a JPEG stream.</li>
2398 * <li>The JPEG processor can run concurrently to the rest of the camera
2399 * pipeline, but cannot process more than 1 capture at a time.</li>
2400 * </ul>
2401 * <p>In other words, using a repeating YUV request would result
2402 * in a steady frame rate (let's say it's 30 FPS). If a single
2403 * JPEG request is submitted periodically, the frame rate will stay
2404 * at 30 FPS (as long as we wait for the previous JPEG to return each
2405 * time). If we try to submit a repeating YUV + JPEG request, then
2406 * the frame rate will drop from 30 FPS.</p>
2407 * <p>In general, submitting a new request with a non-0 stall time
2408 * stream will <em>not</em> cause a frame rate drop unless there are still
2409 * outstanding buffers for that stream from previous requests.</p>
2410 * <p>Submitting a repeating request with streams (call this <code>S</code>)
2411 * is the same as setting the minimum frame duration from
2412 * the normal minimum frame duration corresponding to <code>S</code>, added with
2413 * the maximum stall duration for <code>S</code>.</p>
2414 * <p>If interleaving requests with and without a stall duration,
2415 * a request will stall by the maximum of the remaining times
2416 * for each can-stall stream with outstanding buffers.</p>
2417 * <p>This means that a stalling request will not have an exposure start
2418 * until the stall has completed.</p>
2419 * <p>This should correspond to the stall duration when only that stream is
2420 * active, with all processing (typically in android.*.mode) set to FAST
2421 * or OFF. Setting any of the processing modes to HIGH_QUALITY
2422 * effectively results in an indeterminate stall duration for all
2423 * streams in a request (the regular stall calculation rules are
2424 * ignored).</p>
2425 * <p>The following formats may always have a stall duration:</p>
2426 * <ul>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002427 * <li>{@link android.graphics.ImageFormat#JPEG }</li>
2428 * <li>{@link android.graphics.ImageFormat#RAW_SENSOR }</li>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002429 * </ul>
2430 * <p>The following formats will never have a stall duration:</p>
2431 * <ul>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002432 * <li>{@link android.graphics.ImageFormat#YUV_420_888 }</li>
2433 * <li>{@link android.graphics.ImageFormat#RAW10 }</li>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08002434 * <li>{@link android.graphics.ImageFormat#RAW12 }</li>
Shuzhen Wangec5e8d22018-09-28 09:28:48 -07002435 * <li>{@link android.graphics.ImageFormat#Y8 }</li>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002436 * </ul>
2437 * <p>All other formats may or may not have an allowed stall duration on
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002438 * a per-capability basis; refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
Igor Murashkina23ffb52014-02-07 18:52:34 -08002439 * for more details.</p>
2440 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} for more information about
2441 * calculating the max frame rate (absent stalls).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002442 * <p><b>Units</b>: (format, width, height, ns) x n</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002443 * <p>This key is available on all devices.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002444 *
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002445 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Igor Murashkina23ffb52014-02-07 18:52:34 -08002446 * @see CaptureRequest#SENSOR_FRAME_DURATION
Igor Murashkin9c595172014-05-12 13:56:20 -07002447 * @hide
Igor Murashkina23ffb52014-02-07 18:52:34 -08002448 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002449 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_STALL_DURATIONS =
2450 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
2451
2452 /**
2453 * <p>The available stream configurations that this
2454 * camera device supports; also includes the minimum frame durations
2455 * and the stall durations for each format/size combination.</p>
2456 * <p>All camera devices will support sensor maximum resolution (defined by
2457 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) for the JPEG format.</p>
2458 * <p>For a given use case, the actual maximum supported resolution
2459 * may be lower than what is listed here, depending on the destination
2460 * Surface for the image data. For example, for recording video,
2461 * the video encoder chosen may have a maximum size limit (e.g. 1080p)
2462 * smaller than what the camera (e.g. maximum resolution is 3264x2448)
2463 * can provide.</p>
2464 * <p>Please reference the documentation for the image data destination to
2465 * check if it limits the maximum size for image data.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07002466 * <p>The following table describes the minimum required output stream
2467 * configurations based on the hardware level
2468 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p>
2469 * <table>
2470 * <thead>
2471 * <tr>
2472 * <th align="center">Format</th>
2473 * <th align="center">Size</th>
2474 * <th align="center">Hardware Level</th>
2475 * <th align="center">Notes</th>
2476 * </tr>
2477 * </thead>
2478 * <tbody>
2479 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002480 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td>
Yin-Chia Yeh56830462015-07-08 14:26:05 -07002481 * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} (*1)</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002482 * <td align="center">Any</td>
2483 * <td align="center"></td>
2484 * </tr>
2485 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002486 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002487 * <td align="center">1920x1080 (1080p)</td>
2488 * <td align="center">Any</td>
2489 * <td align="center">if 1080p &lt;= activeArraySize</td>
2490 * </tr>
2491 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002492 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td>
Yin-Chia Yeh56830462015-07-08 14:26:05 -07002493 * <td align="center">1280x720 (720p)</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002494 * <td align="center">Any</td>
2495 * <td align="center">if 720p &lt;= activeArraySize</td>
2496 * </tr>
2497 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002498 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002499 * <td align="center">640x480 (480p)</td>
2500 * <td align="center">Any</td>
2501 * <td align="center">if 480p &lt;= activeArraySize</td>
2502 * </tr>
2503 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002504 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002505 * <td align="center">320x240 (240p)</td>
2506 * <td align="center">Any</td>
2507 * <td align="center">if 240p &lt;= activeArraySize</td>
2508 * </tr>
2509 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002510 * <td align="center">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002511 * <td align="center">all output sizes available for JPEG</td>
2512 * <td align="center">FULL</td>
2513 * <td align="center"></td>
2514 * </tr>
2515 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002516 * <td align="center">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002517 * <td align="center">all output sizes available for JPEG, up to the maximum video size</td>
2518 * <td align="center">LIMITED</td>
2519 * <td align="center"></td>
2520 * </tr>
2521 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002522 * <td align="center">{@link android.graphics.ImageFormat#PRIVATE }</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002523 * <td align="center">same as YUV_420_888</td>
2524 * <td align="center">Any</td>
2525 * <td align="center"></td>
2526 * </tr>
2527 * </tbody>
2528 * </table>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002529 * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} and {@link android.hardware.camera2.CameraDevice#createCaptureSession } for additional mandatory
2530 * stream configurations on a per-capability basis.</p>
Yin-Chia Yeh56830462015-07-08 14:26:05 -07002531 * <p>*1: For JPEG format, the sizes may be restricted by below conditions:</p>
2532 * <ul>
2533 * <li>The HAL may choose the aspect ratio of each Jpeg size to be one of well known ones
2534 * (e.g. 4:3, 16:9, 3:2 etc.). If the sensor maximum resolution
2535 * (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) has an aspect ratio other than these,
2536 * it does not have to be included in the supported JPEG sizes.</li>
2537 * <li>Some hardware JPEG encoders may have pixel boundary alignment requirements, such as
2538 * the dimensions being a multiple of 16.
2539 * Therefore, the maximum JPEG size may be smaller than sensor maximum resolution.
2540 * However, the largest JPEG size will be as close as possible to the sensor maximum
2541 * resolution given above constraints. It is required that after aspect ratio adjustments,
2542 * additional size reduction due to other issues must be less than 3% in area. For example,
2543 * if the sensor maximum resolution is 3280x2464, if the maximum JPEG size has aspect
2544 * ratio 4:3, and the JPEG encoder alignment requirement is 16, the maximum JPEG size will be
2545 * 3264x2448.</li>
2546 * </ul>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002547 * <p>This key is available on all devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07002548 *
2549 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2550 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2551 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
2552 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002553 @PublicKey
2554 @SyntheticKey
Igor Murashkin9c595172014-05-12 13:56:20 -07002555 public static final Key<android.hardware.camera2.params.StreamConfigurationMap> SCALER_STREAM_CONFIGURATION_MAP =
2556 new Key<android.hardware.camera2.params.StreamConfigurationMap>("android.scaler.streamConfigurationMap", android.hardware.camera2.params.StreamConfigurationMap.class);
Igor Murashkina23ffb52014-02-07 18:52:34 -08002557
2558 /**
Zhijun He14986152014-05-22 21:17:37 -07002559 * <p>The crop type that this camera device supports.</p>
2560 * <p>When passing a non-centered crop region ({@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}) to a camera
2561 * device that only supports CENTER_ONLY cropping, the camera device will move the
2562 * crop region to the center of the sensor active array ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize})
2563 * and keep the crop region width and height unchanged. The camera device will return the
2564 * final used crop region in metadata result {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
2565 * <p>Camera devices that support FREEFORM cropping will support any crop region that
2566 * is inside of the active array. The camera device will apply the same crop region and
2567 * return the final used crop region in capture result metadata {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
Eino-Ville Talvala81e89282015-06-30 16:34:24 -07002568 * <p>LEGACY capability devices will only support CENTER_ONLY cropping.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002569 * <p><b>Possible values:</b>
2570 * <ul>
2571 * <li>{@link #SCALER_CROPPING_TYPE_CENTER_ONLY CENTER_ONLY}</li>
2572 * <li>{@link #SCALER_CROPPING_TYPE_FREEFORM FREEFORM}</li>
2573 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002574 * <p>This key is available on all devices.</p>
Zhijun He14986152014-05-22 21:17:37 -07002575 *
Zhijun He14986152014-05-22 21:17:37 -07002576 * @see CaptureRequest#SCALER_CROP_REGION
2577 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
2578 * @see #SCALER_CROPPING_TYPE_CENTER_ONLY
2579 * @see #SCALER_CROPPING_TYPE_FREEFORM
2580 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002581 @PublicKey
Zhijun He14986152014-05-22 21:17:37 -07002582 public static final Key<Integer> SCALER_CROPPING_TYPE =
2583 new Key<Integer>("android.scaler.croppingType", int.class);
2584
2585 /**
Emilian Peev2776ca32018-09-18 14:00:39 +01002586 * <p>Recommended stream configurations for common client use cases.</p>
2587 * <p>Optional subset of the android.scaler.availableStreamConfigurations that contains
2588 * similar tuples listed as
2589 * (i.e. width, height, format, output/input stream, usecase bit field).
2590 * Camera devices will be able to suggest particular stream configurations which are
2591 * power and performance efficient for specific use cases. For more information about
2592 * retrieving the suggestions see
2593 * {@link android.hardware.camera2.CameraCharacteristics#getRecommendedStreamConfigurationMap }.</p>
2594 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2595 * @hide
2596 */
2597 public static final Key<android.hardware.camera2.params.RecommendedStreamConfiguration[]> SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS =
2598 new Key<android.hardware.camera2.params.RecommendedStreamConfiguration[]>("android.scaler.availableRecommendedStreamConfigurations", android.hardware.camera2.params.RecommendedStreamConfiguration[].class);
2599
2600 /**
2601 * <p>Recommended mappings of image formats that are supported by this
2602 * camera device for input streams, to their corresponding output formats.</p>
2603 * <p>This is a recommended subset of the complete list of mappings found in
2604 * android.scaler.availableInputOutputFormatsMap. The same requirements apply here as well.
2605 * The list however doesn't need to contain all available and supported mappings. Instead of
2606 * this developers must list only recommended and efficient entries.
2607 * If set, the information will be available in the ZERO_SHUTTER_LAG recommended stream
2608 * configuration see
2609 * {@link android.hardware.camera2.CameraCharacteristics#getRecommendedStreamConfigurationMap }.</p>
2610 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2611 * @hide
2612 */
2613 public static final Key<android.hardware.camera2.params.ReprocessFormatsMap> SCALER_AVAILABLE_RECOMMENDED_INPUT_OUTPUT_FORMATS_MAP =
2614 new Key<android.hardware.camera2.params.ReprocessFormatsMap>("android.scaler.availableRecommendedInputOutputFormatsMap", android.hardware.camera2.params.ReprocessFormatsMap.class);
2615
2616 /**
Emilian Peev423cbd72018-11-10 18:37:45 +00002617 * <p>An array of mandatory stream combinations generated according to the camera device
2618 * {@link android.hardware.camera2.CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL }
2619 * and {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES }.
2620 * This is an app-readable conversion of the mandatory stream combination
2621 * {@link android.hardware.camera2.CameraDevice#createCaptureSession tables}.</p>
2622 * <p>The array of
2623 * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is
2624 * generated according to the documented
2625 * {@link android.hardware.camera2.CameraDevice#createCaptureSession guideline} based on
2626 * specific device level and capabilities.
2627 * Clients can use the array as a quick reference to find an appropriate camera stream
2628 * combination.
2629 * As per documentation, the stream combinations with given PREVIEW, RECORD and
2630 * MAXIMUM resolutions and anything smaller from the list given by
2631 * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } are
2632 * guaranteed to work.
2633 * The mandatory stream combination array will be {@code null} in case the device is a
2634 * physical camera not independently exposed in
2635 * {@link android.hardware.camera2.CameraManager#getCameraIdList } or is not backward
2636 * compatible.</p>
2637 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2638 * <p><b>Limited capability</b> -
2639 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
2640 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
2641 *
2642 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2643 */
2644 @PublicKey
2645 @SyntheticKey
2646 public static final Key<android.hardware.camera2.params.MandatoryStreamCombination[]> SCALER_MANDATORY_STREAM_COMBINATIONS =
2647 new Key<android.hardware.camera2.params.MandatoryStreamCombination[]>("android.scaler.mandatoryStreamCombinations", android.hardware.camera2.params.MandatoryStreamCombination[].class);
2648
2649 /**
Ruben Brunk224eb3a2015-06-15 17:32:06 -07002650 * <p>The area of the image sensor which corresponds to active pixels after any geometric
2651 * distortion correction has been applied.</p>
2652 * <p>This is the rectangle representing the size of the active region of the sensor (i.e.
2653 * the region that actually receives light from the scene) after any geometric correction
2654 * has been applied, and should be treated as the maximum size in pixels of any of the
2655 * image output formats aside from the raw formats.</p>
2656 * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of
2657 * the full pixel array, and the size of the full pixel array is given by
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002658 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
Ruben Brunk224eb3a2015-06-15 17:32:06 -07002659 * <p>The coordinate system for most other keys that list pixel coordinates, including
2660 * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, is defined relative to the active array rectangle given in
2661 * this field, with <code>(0, 0)</code> being the top-left of this rectangle.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002662 * <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 -07002663 * include black calibration pixels or other inactive regions.</p>
2664 * <p>For devices that do not support {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the active
2665 * array must be the same as {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.</p>
2666 * <p>For devices that support {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the active array must
2667 * be enclosed by {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}. The difference between
2668 * pre-correction active array and active array accounts for scaling or cropping caused
2669 * by lens geometric distortion correction.</p>
2670 * <p>In general, application should always refer to active array size for controls like
2671 * metering regions or crop region. Two exceptions are when the application is dealing with
2672 * RAW image buffers (RAW_SENSOR, RAW10, RAW12 etc), or when application explicitly set
2673 * {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} to OFF. In these cases, application should refer
2674 * to {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002675 * <p><b>Units</b>: Pixel coordinates on the image sensor</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002676 * <p>This key is available on all devices.</p>
2677 *
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07002678 * @see CaptureRequest#DISTORTION_CORRECTION_MODE
Ruben Brunk224eb3a2015-06-15 17:32:06 -07002679 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002680 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07002681 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002682 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002683 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002684 public static final Key<android.graphics.Rect> SENSOR_INFO_ACTIVE_ARRAY_SIZE =
2685 new Key<android.graphics.Rect>("android.sensor.info.activeArraySize", android.graphics.Rect.class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002686
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002687 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002688 * <p>Range of sensitivities for {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} supported by this
2689 * camera device.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002690 * <p>The values are the standard ISO sensitivity values,
2691 * as defined in ISO 12232:2006.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002692 * <p><b>Range of valid values:</b><br>
2693 * Min &lt;= 100, Max &gt;= 800</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002694 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2695 * <p><b>Full capability</b> -
2696 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2697 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002698 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002699 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002700 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002701 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002702 @PublicKey
Ruben Brunk57493682014-05-27 18:58:08 -07002703 public static final Key<android.util.Range<Integer>> SENSOR_INFO_SENSITIVITY_RANGE =
2704 new Key<android.util.Range<Integer>>("android.sensor.info.sensitivityRange", new TypeReference<android.util.Range<Integer>>() {{ }});
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002705
2706 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002707 * <p>The arrangement of color filters on sensor;
Zhijun Hed1784962014-04-08 17:41:46 -07002708 * represents the colors in the top-left 2x2 section of
Shuzhen Wanga8d36032018-10-15 12:01:53 -07002709 * the sensor, in reading order, for a Bayer camera, or the
2710 * light spectrum it captures for MONOCHROME camera.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002711 * <p><b>Possible values:</b>
2712 * <ul>
2713 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB RGGB}</li>
2714 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG GRBG}</li>
2715 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG GBRG}</li>
2716 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR BGGR}</li>
2717 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB RGB}</li>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07002718 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_MONO MONO}</li>
2719 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR NIR}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002720 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002721 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2722 * <p><b>Full capability</b> -
2723 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2724 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
2725 *
2726 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun Hed1784962014-04-08 17:41:46 -07002727 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB
2728 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG
2729 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG
2730 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR
2731 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB
Shuzhen Wanga8d36032018-10-15 12:01:53 -07002732 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_MONO
2733 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR
Zhijun Hed1784962014-04-08 17:41:46 -07002734 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002735 @PublicKey
Zhijun Hed1784962014-04-08 17:41:46 -07002736 public static final Key<Integer> SENSOR_INFO_COLOR_FILTER_ARRANGEMENT =
2737 new Key<Integer>("android.sensor.info.colorFilterArrangement", int.class);
2738
2739 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002740 * <p>The range of image exposure times for {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} supported
2741 * by this camera device.</p>
2742 * <p><b>Units</b>: Nanoseconds</p>
2743 * <p><b>Range of valid values:</b><br>
2744 * The minimum exposure time will be less than 100 us. For FULL
Zhijun He28288ca2014-06-25 15:49:13 -07002745 * capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL),
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002746 * the maximum exposure time will be greater than 100ms.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002747 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2748 * <p><b>Full capability</b> -
2749 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2750 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Igor Murashkin6b7ddc42014-02-03 14:39:19 -08002751 *
Zhijun He28288ca2014-06-25 15:49:13 -07002752 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkin6b7ddc42014-02-03 14:39:19 -08002753 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002754 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002755 @PublicKey
Ruben Brunk57493682014-05-27 18:58:08 -07002756 public static final Key<android.util.Range<Long>> SENSOR_INFO_EXPOSURE_TIME_RANGE =
2757 new Key<android.util.Range<Long>>("android.sensor.info.exposureTimeRange", new TypeReference<android.util.Range<Long>>() {{ }});
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002758
2759 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002760 * <p>The maximum possible frame duration (minimum frame rate) for
2761 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} that is supported this camera device.</p>
2762 * <p>Attempting to use frame durations beyond the maximum will result in the frame
2763 * duration being clipped to the maximum. See that control for a full definition of frame
2764 * durations.</p>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002765 * <p>Refer to {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration }
2766 * for the minimum frame duration values.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002767 * <p><b>Units</b>: Nanoseconds</p>
2768 * <p><b>Range of valid values:</b><br>
2769 * For FULL capability devices
2770 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL), at least 100ms.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002771 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2772 * <p><b>Full capability</b> -
2773 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2774 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Igor Murashkin6b7ddc42014-02-03 14:39:19 -08002775 *
Zhijun He28288ca2014-06-25 15:49:13 -07002776 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002777 * @see CaptureRequest#SENSOR_FRAME_DURATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002778 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002779 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002780 public static final Key<Long> SENSOR_INFO_MAX_FRAME_DURATION =
2781 new Key<Long>("android.sensor.info.maxFrameDuration", long.class);
2782
2783 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002784 * <p>The physical dimensions of the full pixel
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002785 * array.</p>
2786 * <p>This is the physical size of the sensor pixel
2787 * array defined by {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002788 * <p><b>Units</b>: Millimeters</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002789 * <p>This key is available on all devices.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002790 *
2791 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002792 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002793 @PublicKey
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07002794 public static final Key<android.util.SizeF> SENSOR_INFO_PHYSICAL_SIZE =
2795 new Key<android.util.SizeF>("android.sensor.info.physicalSize", android.util.SizeF.class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002796
2797 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002798 * <p>Dimensions of the full pixel array, possibly
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002799 * including black calibration pixels.</p>
Ruben Brunk224eb3a2015-06-15 17:32:06 -07002800 * <p>The pixel count of the full pixel array of the image sensor, which covers
2801 * {@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize} area. This represents the full pixel dimensions of
2802 * the raw buffers produced by this sensor.</p>
2803 * <p>If a camera device supports raw sensor formats, either this or
2804 * {@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 -08002805 * output formats listed in {@link android.hardware.camera2.params.StreamConfigurationMap }
2806 * (this depends on whether or not the image sensor returns buffers containing pixels that
2807 * are not part of the active array region for blacklevel calibration or other purposes).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002808 * <p>Some parts of the full pixel array may not receive light from the scene,
Ruben Brunk224eb3a2015-06-15 17:32:06 -07002809 * or be otherwise inactive. The {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} key
2810 * defines the rectangle of active pixels that will be included in processed image
2811 * formats.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002812 * <p><b>Units</b>: Pixels</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002813 * <p>This key is available on all devices.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002814 *
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002815 * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE
Ruben Brunk224eb3a2015-06-15 17:32:06 -07002816 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002817 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002818 @PublicKey
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07002819 public static final Key<android.util.Size> SENSOR_INFO_PIXEL_ARRAY_SIZE =
2820 new Key<android.util.Size>("android.sensor.info.pixelArraySize", android.util.Size.class);
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002821
2822 /**
Ruben Brunke60e29552014-02-18 10:44:17 -08002823 * <p>Maximum raw value output by sensor.</p>
2824 * <p>This specifies the fully-saturated encoding level for the raw
2825 * sample values from the sensor. This is typically caused by the
2826 * sensor becoming highly non-linear or clipping. The minimum for
2827 * each channel is specified by the offset in the
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002828 * {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} key.</p>
Ruben Brunke60e29552014-02-18 10:44:17 -08002829 * <p>The white level is typically determined either by sensor bit depth
Ruben Brunke89b1202014-03-24 17:10:35 -07002830 * (8-14 bits is expected), or by the point where the sensor response
Ruben Brunke60e29552014-02-18 10:44:17 -08002831 * becomes too non-linear to be useful. The default value for this is
2832 * maximum representable value for a 16-bit raw sample (2^16 - 1).</p>
Zhijun Hecd950b62015-11-12 17:47:52 -08002833 * <p>The white level values of captured images may vary for different
2834 * capture settings (e.g., {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}). This key
2835 * represents a coarse approximation for such case. It is recommended
2836 * to use {@link CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL android.sensor.dynamicWhiteLevel} for captures when supported
2837 * by the camera device, which provides more accurate white level values.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002838 * <p><b>Range of valid values:</b><br>
2839 * &gt; 255 (8-bit output)</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002840 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunke60e29552014-02-18 10:44:17 -08002841 *
2842 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
Zhijun Hecd950b62015-11-12 17:47:52 -08002843 * @see CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL
2844 * @see CaptureRequest#SENSOR_SENSITIVITY
Ruben Brunke60e29552014-02-18 10:44:17 -08002845 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002846 @PublicKey
Ruben Brunke60e29552014-02-18 10:44:17 -08002847 public static final Key<Integer> SENSOR_INFO_WHITE_LEVEL =
2848 new Key<Integer>("android.sensor.info.whiteLevel", int.class);
2849
2850 /**
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07002851 * <p>The time base source for sensor capture start timestamps.</p>
2852 * <p>The timestamps provided for captures are always in nanoseconds and monotonic, but
2853 * may not based on a time source that can be compared to other system time sources.</p>
2854 * <p>This characteristic defines the source for the timestamps, and therefore whether they
2855 * can be compared against other system time sources/timestamps.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002856 * <p><b>Possible values:</b>
2857 * <ul>
2858 * <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN UNKNOWN}</li>
2859 * <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME REALTIME}</li>
2860 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002861 * <p>This key is available on all devices.</p>
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07002862 * @see #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN
2863 * @see #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME
Zhijun He45fa43a12014-06-13 18:29:37 -07002864 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002865 @PublicKey
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07002866 public static final Key<Integer> SENSOR_INFO_TIMESTAMP_SOURCE =
2867 new Key<Integer>("android.sensor.info.timestampSource", int.class);
Zhijun He45fa43a12014-06-13 18:29:37 -07002868
2869 /**
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08002870 * <p>Whether the RAW images output from this camera device are subject to
2871 * lens shading correction.</p>
2872 * <p>If TRUE, all images produced by the camera device in the RAW image formats will
2873 * have lens shading correction already applied to it. If FALSE, the images will
2874 * not be adjusted for lens shading correction.
2875 * See {@link CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW android.request.maxNumOutputRaw} for a list of RAW image formats.</p>
2876 * <p>This key will be <code>null</code> for all devices do not report this information.
2877 * Devices with RAW capability will always report this information in this key.</p>
2878 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2879 *
2880 * @see CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW
2881 */
2882 @PublicKey
2883 public static final Key<Boolean> SENSOR_INFO_LENS_SHADING_APPLIED =
2884 new Key<Boolean>("android.sensor.info.lensShadingApplied", boolean.class);
2885
2886 /**
Ruben Brunk1b02df42015-07-01 12:53:45 -07002887 * <p>The area of the image sensor which corresponds to active pixels prior to the
2888 * application of any geometric distortion correction.</p>
2889 * <p>This is the rectangle representing the size of the active region of the sensor (i.e.
2890 * the region that actually receives light from the scene) before any geometric correction
2891 * has been applied, and should be treated as the active region rectangle for any of the
2892 * raw formats. All metadata associated with raw processing (e.g. the lens shading
2893 * correction map, and radial distortion fields) treats the top, left of this rectangle as
2894 * the origin, (0,0).</p>
2895 * <p>The size of this region determines the maximum field of view and the maximum number of
2896 * pixels that an image from this sensor can contain, prior to the application of
2897 * geometric distortion correction. The effective maximum pixel dimensions of a
2898 * post-distortion-corrected image is given by the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}
2899 * field, and the effective maximum field of view for a post-distortion-corrected image
2900 * can be calculated by applying the geometric distortion correction fields to this
2901 * rectangle, and cropping to the rectangle given in {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
2902 * <p>E.g. to calculate position of a pixel, (x,y), in a processed YUV output image with the
2903 * dimensions in {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} given the position of a pixel,
2904 * (x', y'), in the raw pixel array with dimensions give in
2905 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}:</p>
2906 * <ol>
2907 * <li>Choose a pixel (x', y') within the active array region of the raw buffer given in
2908 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}, otherwise this pixel is considered
2909 * to be outside of the FOV, and will not be shown in the processed output image.</li>
2910 * <li>Apply geometric distortion correction to get the post-distortion pixel coordinate,
2911 * (x_i, y_i). When applying geometric correction metadata, note that metadata for raw
2912 * buffers is defined relative to the top, left of the
2913 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} rectangle.</li>
2914 * <li>If the resulting corrected pixel coordinate is within the region given in
2915 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, then the position of this pixel in the
2916 * processed output image buffer is <code>(x_i - activeArray.left, y_i - activeArray.top)</code>,
2917 * when the top, left coordinate of that buffer is treated as (0, 0).</li>
2918 * </ol>
2919 * <p>Thus, for pixel x',y' = (25, 25) on a sensor where {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}
2920 * is (100,100), {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} is (10, 10, 100, 100),
2921 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} is (20, 20, 80, 80), and the geometric distortion
2922 * correction doesn't change the pixel coordinate, the resulting pixel selected in
2923 * pixel coordinates would be x,y = (25, 25) relative to the top,left of the raw buffer
2924 * with dimensions given in {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}, and would be (5, 5)
2925 * relative to the top,left of post-processed YUV output buffer with dimensions given in
2926 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
2927 * <p>The currently supported fields that correct for geometric distortion are:</p>
2928 * <ol>
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07002929 * <li>{@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}.</li>
Ruben Brunk1b02df42015-07-01 12:53:45 -07002930 * </ol>
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07002931 * <p>If the camera device doesn't support geometric distortion correction, or all of the
2932 * geometric distortion fields are no-ops, this rectangle will be the same as the
2933 * 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 -07002934 * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of
2935 * the full pixel array, and the size of the full pixel array is given by
2936 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
2937 * <p>The pre-correction active array may be smaller than the full pixel array, since the
2938 * full array may include black calibration pixels or other inactive regions.</p>
2939 * <p><b>Units</b>: Pixel coordinates on the image sensor</p>
2940 * <p>This key is available on all devices.</p>
2941 *
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07002942 * @see CameraCharacteristics#LENS_DISTORTION
Ruben Brunk1b02df42015-07-01 12:53:45 -07002943 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
2944 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
2945 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
2946 */
2947 @PublicKey
2948 public static final Key<android.graphics.Rect> SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE =
2949 new Key<android.graphics.Rect>("android.sensor.info.preCorrectionActiveArraySize", android.graphics.Rect.class);
2950
2951 /**
Ruben Brunk7c062362014-04-15 23:53:53 -07002952 * <p>The standard reference illuminant used as the scene light source when
2953 * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1},
2954 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and
2955 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} matrices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002956 * <p>The values in this key correspond to the values defined for the
Ruben Brunk7c062362014-04-15 23:53:53 -07002957 * EXIF LightSource tag. These illuminants are standard light sources
2958 * that are often used calibrating camera devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002959 * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1},
Ruben Brunk7c062362014-04-15 23:53:53 -07002960 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and
2961 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} will also be present.</p>
2962 * <p>Some devices may choose to provide a second set of calibration
2963 * information for improved quality, including
2964 * {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2} and its corresponding matrices.</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07002965 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
2966 * the camera device has RAW capability.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002967 * <p><b>Possible values:</b>
2968 * <ul>
2969 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT DAYLIGHT}</li>
2970 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT FLUORESCENT}</li>
2971 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN TUNGSTEN}</li>
2972 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLASH FLASH}</li>
2973 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER FINE_WEATHER}</li>
2974 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER CLOUDY_WEATHER}</li>
2975 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_SHADE SHADE}</li>
2976 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT DAYLIGHT_FLUORESCENT}</li>
2977 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT DAY_WHITE_FLUORESCENT}</li>
2978 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT COOL_WHITE_FLUORESCENT}</li>
2979 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT WHITE_FLUORESCENT}</li>
2980 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A STANDARD_A}</li>
2981 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B STANDARD_B}</li>
2982 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C STANDARD_C}</li>
2983 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D55 D55}</li>
2984 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D65 D65}</li>
2985 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D75 D75}</li>
2986 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D50 D50}</li>
2987 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN ISO_STUDIO_TUNGSTEN}</li>
2988 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002989 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01002990 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Ruben Brunk7c062362014-04-15 23:53:53 -07002991 *
2992 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1
2993 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM1
2994 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX1
2995 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
2996 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT
2997 * @see #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT
2998 * @see #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN
2999 * @see #SENSOR_REFERENCE_ILLUMINANT1_FLASH
3000 * @see #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER
3001 * @see #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER
3002 * @see #SENSOR_REFERENCE_ILLUMINANT1_SHADE
3003 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT
3004 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT
3005 * @see #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT
3006 * @see #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT
3007 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A
3008 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B
3009 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C
3010 * @see #SENSOR_REFERENCE_ILLUMINANT1_D55
3011 * @see #SENSOR_REFERENCE_ILLUMINANT1_D65
3012 * @see #SENSOR_REFERENCE_ILLUMINANT1_D75
3013 * @see #SENSOR_REFERENCE_ILLUMINANT1_D50
3014 * @see #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN
3015 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003016 @PublicKey
Ruben Brunk7c062362014-04-15 23:53:53 -07003017 public static final Key<Integer> SENSOR_REFERENCE_ILLUMINANT1 =
3018 new Key<Integer>("android.sensor.referenceIlluminant1", int.class);
3019
3020 /**
3021 * <p>The standard reference illuminant used as the scene light source when
3022 * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2},
3023 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and
3024 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} matrices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003025 * <p>See {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1} for more details.</p>
3026 * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2},
Ruben Brunk7c062362014-04-15 23:53:53 -07003027 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and
3028 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} will also be present.</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003029 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
3030 * the camera device has RAW capability.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003031 * <p><b>Range of valid values:</b><br>
3032 * Any value listed in {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003033 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01003034 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Ruben Brunk7c062362014-04-15 23:53:53 -07003035 *
3036 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2
3037 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM2
3038 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX2
3039 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
3040 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003041 @PublicKey
Ruben Brunk7c062362014-04-15 23:53:53 -07003042 public static final Key<Byte> SENSOR_REFERENCE_ILLUMINANT2 =
3043 new Key<Byte>("android.sensor.referenceIlluminant2", byte.class);
3044
3045 /**
3046 * <p>A per-device calibration transform matrix that maps from the
3047 * reference sensor colorspace to the actual device sensor colorspace.</p>
3048 * <p>This matrix is used to correct for per-device variations in the
3049 * sensor colorspace, and is used for processing raw buffer data.</p>
3050 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
3051 * contains a per-device calibration transform that maps colors
3052 * from reference sensor color space (i.e. the "golden module"
3053 * colorspace) into this camera device's native sensor color
3054 * space under the first reference illuminant
3055 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003056 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
3057 * the camera device has RAW capability.</p>
Ruben Brunk7c062362014-04-15 23:53:53 -07003058 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01003059 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Ruben Brunk7c062362014-04-15 23:53:53 -07003060 *
3061 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
3062 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003063 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07003064 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM1 =
3065 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform1", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07003066
3067 /**
3068 * <p>A per-device calibration transform matrix that maps from the
3069 * reference sensor colorspace to the actual device sensor colorspace
3070 * (this is the colorspace of the raw buffer data).</p>
3071 * <p>This matrix is used to correct for per-device variations in the
3072 * sensor colorspace, and is used for processing raw buffer data.</p>
3073 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
3074 * contains a per-device calibration transform that maps colors
3075 * from reference sensor color space (i.e. the "golden module"
3076 * colorspace) into this camera device's native sensor color
3077 * space under the second reference illuminant
3078 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p>
3079 * <p>This matrix will only be present if the second reference
3080 * illuminant is present.</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003081 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
3082 * the camera device has RAW capability.</p>
Ruben Brunk7c062362014-04-15 23:53:53 -07003083 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01003084 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Ruben Brunk7c062362014-04-15 23:53:53 -07003085 *
3086 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
3087 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003088 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07003089 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM2 =
3090 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform2", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07003091
3092 /**
3093 * <p>A matrix that transforms color values from CIE XYZ color space to
3094 * reference sensor color space.</p>
3095 * <p>This matrix is used to convert from the standard CIE XYZ color
3096 * space to the reference sensor colorspace, and is used when processing
3097 * raw buffer data.</p>
3098 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
3099 * contains a color transform matrix that maps colors from the CIE
3100 * XYZ color space to the reference sensor color space (i.e. the
3101 * "golden module" colorspace) under the first reference illuminant
3102 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p>
3103 * <p>The white points chosen in both the reference sensor color space
3104 * and the CIE XYZ colorspace when calculating this transform will
3105 * match the standard white point for the first reference illuminant
3106 * (i.e. no chromatic adaptation will be applied by this transform).</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003107 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
3108 * the camera device has RAW capability.</p>
Ruben Brunk7c062362014-04-15 23:53:53 -07003109 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01003110 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Ruben Brunk7c062362014-04-15 23:53:53 -07003111 *
3112 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
3113 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003114 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07003115 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM1 =
3116 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform1", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07003117
3118 /**
3119 * <p>A matrix that transforms color values from CIE XYZ color space to
3120 * reference sensor color space.</p>
3121 * <p>This matrix is used to convert from the standard CIE XYZ color
3122 * space to the reference sensor colorspace, and is used when processing
3123 * raw buffer data.</p>
3124 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
3125 * contains a color transform matrix that maps colors from the CIE
3126 * XYZ color space to the reference sensor color space (i.e. the
3127 * "golden module" colorspace) under the second reference illuminant
3128 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p>
3129 * <p>The white points chosen in both the reference sensor color space
3130 * and the CIE XYZ colorspace when calculating this transform will
3131 * match the standard white point for the second reference illuminant
3132 * (i.e. no chromatic adaptation will be applied by this transform).</p>
3133 * <p>This matrix will only be present if the second reference
3134 * illuminant is present.</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003135 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
3136 * the camera device has RAW capability.</p>
Ruben Brunk7c062362014-04-15 23:53:53 -07003137 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01003138 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Ruben Brunk7c062362014-04-15 23:53:53 -07003139 *
3140 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
3141 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003142 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07003143 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM2 =
3144 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform2", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07003145
3146 /**
3147 * <p>A matrix that transforms white balanced camera colors from the reference
3148 * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
3149 * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
3150 * is used when processing raw buffer data.</p>
3151 * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
3152 * a color transform matrix that maps white balanced colors from the
3153 * reference sensor color space to the CIE XYZ color space with a D50 white
3154 * point.</p>
3155 * <p>Under the first reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1})
3156 * this matrix is chosen so that the standard white point for this reference
3157 * illuminant in the reference sensor colorspace is mapped to D50 in the
3158 * CIE XYZ colorspace.</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003159 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
3160 * the camera device has RAW capability.</p>
Ruben Brunk7c062362014-04-15 23:53:53 -07003161 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01003162 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Ruben Brunk7c062362014-04-15 23:53:53 -07003163 *
3164 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
3165 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003166 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07003167 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX1 =
3168 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix1", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07003169
3170 /**
3171 * <p>A matrix that transforms white balanced camera colors from the reference
3172 * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
3173 * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
3174 * is used when processing raw buffer data.</p>
3175 * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
3176 * a color transform matrix that maps white balanced colors from the
3177 * reference sensor color space to the CIE XYZ color space with a D50 white
3178 * point.</p>
3179 * <p>Under the second reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2})
3180 * this matrix is chosen so that the standard white point for this reference
3181 * illuminant in the reference sensor colorspace is mapped to D50 in the
3182 * CIE XYZ colorspace.</p>
3183 * <p>This matrix will only be present if the second reference
3184 * illuminant is present.</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003185 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
3186 * the camera device has RAW capability.</p>
Ruben Brunk7c062362014-04-15 23:53:53 -07003187 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01003188 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Ruben Brunk7c062362014-04-15 23:53:53 -07003189 *
3190 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
3191 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003192 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07003193 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX2 =
3194 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix2", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07003195
3196 /**
Ruben Brunk67b47022014-02-07 15:26:29 -08003197 * <p>A fixed black level offset for each of the color filter arrangement
3198 * (CFA) mosaic channels.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003199 * <p>This key specifies the zero light value for each of the CFA mosaic
Ruben Brunke60e29552014-02-18 10:44:17 -08003200 * channels in the camera sensor. The maximal value output by the
3201 * 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 -07003202 * <p>The values are given in the same order as channels listed for the CFA
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003203 * layout key (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}), i.e. the
Ruben Brunk52842e72014-06-05 13:16:45 -07003204 * nth value given corresponds to the black level offset for the nth
3205 * color channel listed in the CFA.</p>
Zhijun Hecd950b62015-11-12 17:47:52 -08003206 * <p>The black level values of captured images may vary for different
3207 * capture settings (e.g., {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}). This key
3208 * represents a coarse approximation for such case. It is recommended to
3209 * use {@link CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL android.sensor.dynamicBlackLevel} or use pixels from
3210 * {@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions} directly for captures when
3211 * supported by the camera device, which provides more accurate black
3212 * level values. For raw capture in particular, it is recommended to use
3213 * pixels from {@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions} to calculate black
3214 * level values for each frame.</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003215 * <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 -07003216 * <p><b>Range of valid values:</b><br>
3217 * &gt;= 0 for each.</p>
Ruben Brunk1ef676f2014-02-07 16:08:38 -08003218 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunke60e29552014-02-18 10:44:17 -08003219 *
Zhijun Hecd950b62015-11-12 17:47:52 -08003220 * @see CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL
Ruben Brunk52842e72014-06-05 13:16:45 -07003221 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
Ruben Brunke60e29552014-02-18 10:44:17 -08003222 * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL
Zhijun Hecd950b62015-11-12 17:47:52 -08003223 * @see CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS
3224 * @see CaptureRequest#SENSOR_SENSITIVITY
Ruben Brunk67b47022014-02-07 15:26:29 -08003225 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003226 @PublicKey
Ruben Brunk52842e72014-06-05 13:16:45 -07003227 public static final Key<android.hardware.camera2.params.BlackLevelPattern> SENSOR_BLACK_LEVEL_PATTERN =
3228 new Key<android.hardware.camera2.params.BlackLevelPattern>("android.sensor.blackLevelPattern", android.hardware.camera2.params.BlackLevelPattern.class);
Ruben Brunk67b47022014-02-07 15:26:29 -08003229
3230 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003231 * <p>Maximum sensitivity that is implemented
Zhijun He153ac102014-02-03 12:25:12 -08003232 * purely through analog gain.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003233 * <p>For {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} values less than or
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003234 * equal to this, all applied gain must be analog. For
Zhijun He153ac102014-02-03 12:25:12 -08003235 * values above this, the gain applied can be a mix of analog and
3236 * digital.</p>
Igor Murashkin3242f4f2014-01-15 12:27:41 -08003237 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003238 * <p><b>Full capability</b> -
3239 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3240 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Alex Raye83c4eb2013-10-02 17:14:36 -07003241 *
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003242 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08003243 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003244 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003245 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003246 public static final Key<Integer> SENSOR_MAX_ANALOG_SENSITIVITY =
3247 new Key<Integer>("android.sensor.maxAnalogSensitivity", int.class);
3248
3249 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003250 * <p>Clockwise angle through which the output image needs to be rotated to be
3251 * upright on the device screen in its native orientation.</p>
3252 * <p>Also defines the direction of rolling shutter readout, which is from top to bottom in
3253 * the sensor's coordinate system.</p>
3254 * <p><b>Units</b>: Degrees of clockwise rotation; always a multiple of
3255 * 90</p>
3256 * <p><b>Range of valid values:</b><br>
3257 * 0, 90, 180, 270</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003258 * <p>This key is available on all devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003259 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003260 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003261 public static final Key<Integer> SENSOR_ORIENTATION =
3262 new Key<Integer>("android.sensor.orientation", int.class);
3263
3264 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003265 * <p>List of sensor test pattern modes for {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}
3266 * supported by this camera device.</p>
3267 * <p>Defaults to OFF, and always includes OFF if defined.</p>
3268 * <p><b>Range of valid values:</b><br>
3269 * Any value listed in {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}</p>
Igor Murashkinc127f052014-01-17 18:06:02 -08003270 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08003271 *
3272 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
Igor Murashkinc127f052014-01-17 18:06:02 -08003273 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003274 @PublicKey
Zhijun Hea4866242014-03-27 23:51:34 -07003275 public static final Key<int[]> SENSOR_AVAILABLE_TEST_PATTERN_MODES =
3276 new Key<int[]>("android.sensor.availableTestPatternModes", int[].class);
Igor Murashkinc127f052014-01-17 18:06:02 -08003277
3278 /**
Zhijun Hecd950b62015-11-12 17:47:52 -08003279 * <p>List of disjoint rectangles indicating the sensor
3280 * optically shielded black pixel regions.</p>
3281 * <p>In most camera sensors, the active array is surrounded by some
3282 * optically shielded pixel areas. By blocking light, these pixels
3283 * provides a reliable black reference for black level compensation
3284 * in active array region.</p>
3285 * <p>This key provides a list of disjoint rectangles specifying the
3286 * regions of optically shielded (with metal shield) black pixel
3287 * regions if the camera device is capable of reading out these black
3288 * pixels in the output raw images. In comparison to the fixed black
3289 * level values reported by {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern}, this key
3290 * may provide a more accurate way for the application to calculate
3291 * black level of each captured raw images.</p>
3292 * <p>When this key is reported, the {@link CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL android.sensor.dynamicBlackLevel} and
3293 * {@link CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL android.sensor.dynamicWhiteLevel} will also be reported.</p>
3294 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3295 *
3296 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
3297 * @see CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL
3298 * @see CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL
3299 */
3300 @PublicKey
3301 public static final Key<android.graphics.Rect[]> SENSOR_OPTICAL_BLACK_REGIONS =
3302 new Key<android.graphics.Rect[]>("android.sensor.opticalBlackRegions", android.graphics.Rect[].class);
3303
3304 /**
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003305 * <p>List of lens shading modes for {@link CaptureRequest#SHADING_MODE android.shading.mode} that are supported by this camera device.</p>
3306 * <p>This list contains lens shading modes that can be set for the camera device.
3307 * Camera devices that support the MANUAL_POST_PROCESSING capability will always
3308 * list OFF and FAST mode. This includes all FULL level devices.
3309 * LEGACY devices will always only support FAST mode.</p>
3310 * <p><b>Range of valid values:</b><br>
3311 * Any value listed in {@link CaptureRequest#SHADING_MODE android.shading.mode}</p>
3312 * <p>This key is available on all devices.</p>
3313 *
3314 * @see CaptureRequest#SHADING_MODE
3315 */
3316 @PublicKey
3317 public static final Key<int[]> SHADING_AVAILABLE_MODES =
3318 new Key<int[]>("android.shading.availableModes", int[].class);
3319
3320 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003321 * <p>List of face detection modes for {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} that are
3322 * supported by this camera device.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003323 * <p>OFF is always supported.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003324 * <p><b>Range of valid values:</b><br>
3325 * Any value listed in {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003326 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003327 *
3328 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003329 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003330 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07003331 public static final Key<int[]> STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES =
3332 new Key<int[]>("android.statistics.info.availableFaceDetectModes", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003333
3334 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003335 * <p>The maximum number of simultaneously detectable
3336 * faces.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003337 * <p><b>Range of valid values:</b><br>
3338 * 0 for cameras without available face detection; otherwise:
3339 * <code>&gt;=4</code> for LIMITED or FULL hwlevel devices or
3340 * <code>&gt;0</code> for LEGACY devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003341 * <p>This key is available on all devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003342 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003343 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003344 public static final Key<Integer> STATISTICS_INFO_MAX_FACE_COUNT =
3345 new Key<Integer>("android.statistics.info.maxFaceCount", int.class);
3346
3347 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003348 * <p>List of hot pixel map output modes for {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode} that are
3349 * supported by this camera device.</p>
3350 * <p>If no hotpixel map output is available for this camera device, this will contain only
3351 * <code>false</code>.</p>
3352 * <p>ON is always supported on devices with the RAW capability.</p>
3353 * <p><b>Range of valid values:</b><br>
3354 * Any value listed in {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003355 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08003356 *
3357 * @see CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE
3358 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003359 @PublicKey
Ruben Brunk9d454fd2014-03-04 14:11:52 -08003360 public static final Key<boolean[]> STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES =
3361 new Key<boolean[]>("android.statistics.info.availableHotPixelMapModes", boolean[].class);
3362
3363 /**
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003364 * <p>List of lens shading map output modes for {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} that
3365 * are supported by this camera device.</p>
3366 * <p>If no lens shading map output is available for this camera device, this key will
3367 * contain only OFF.</p>
3368 * <p>ON is always supported on devices with the RAW capability.
3369 * LEGACY mode devices will always only support OFF.</p>
3370 * <p><b>Range of valid values:</b><br>
3371 * Any value listed in {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode}</p>
3372 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3373 *
3374 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
3375 */
3376 @PublicKey
Yin-Chia Yeh656931d2015-05-22 16:37:27 -07003377 public static final Key<int[]> STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES =
3378 new Key<int[]>("android.statistics.info.availableLensShadingMapModes", int[].class);
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003379
3380 /**
Chien-Yu Chenc9cf5b92018-01-18 12:24:40 -08003381 * <p>List of OIS data output modes for {@link CaptureRequest#STATISTICS_OIS_DATA_MODE android.statistics.oisDataMode} that
3382 * are supported by this camera device.</p>
3383 * <p>If no OIS data output is available for this camera device, this key will
3384 * contain only OFF.</p>
3385 * <p><b>Range of valid values:</b><br>
3386 * Any value listed in {@link CaptureRequest#STATISTICS_OIS_DATA_MODE android.statistics.oisDataMode}</p>
3387 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3388 *
3389 * @see CaptureRequest#STATISTICS_OIS_DATA_MODE
3390 */
3391 @PublicKey
3392 public static final Key<int[]> STATISTICS_INFO_AVAILABLE_OIS_DATA_MODES =
3393 new Key<int[]>("android.statistics.info.availableOisDataModes", int[].class);
3394
3395 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003396 * <p>Maximum number of supported points in the
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003397 * tonemap curve that can be used for {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003398 * <p>If the actual number of points provided by the application (in {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}*) is
3399 * less than this maximum, the camera device will resample the curve to its internal
3400 * representation, using linear interpolation.</p>
Igor Murashkine0060932014-01-17 17:24:11 -08003401 * <p>The output curves in the result metadata may have a different number
3402 * of points than the input curves, and will represent the actual
3403 * hardware curves used as closely as possible when linearly interpolated.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003404 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3405 * <p><b>Full capability</b> -
3406 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3407 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Igor Murashkine0060932014-01-17 17:24:11 -08003408 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003409 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003410 * @see CaptureRequest#TONEMAP_CURVE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003411 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003412 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003413 public static final Key<Integer> TONEMAP_MAX_CURVE_POINTS =
3414 new Key<Integer>("android.tonemap.maxCurvePoints", int.class);
3415
3416 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003417 * <p>List of tonemapping modes for {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} that are supported by this camera
3418 * device.</p>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08003419 * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always contain
3420 * at least one of below mode combinations:</p>
3421 * <ul>
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07003422 * <li>CONTRAST_CURVE, FAST and HIGH_QUALITY</li>
3423 * <li>GAMMA_VALUE, PRESET_CURVE, FAST and HIGH_QUALITY</li>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08003424 * </ul>
3425 * <p>This includes all FULL level devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003426 * <p><b>Range of valid values:</b><br>
3427 * Any value listed in {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003428 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3429 * <p><b>Full capability</b> -
3430 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3431 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08003432 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003433 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk6dc379c2014-03-04 15:04:00 -08003434 * @see CaptureRequest#TONEMAP_MODE
3435 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003436 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07003437 public static final Key<int[]> TONEMAP_AVAILABLE_TONE_MAP_MODES =
3438 new Key<int[]>("android.tonemap.availableToneMapModes", int[].class);
Ruben Brunk6dc379c2014-03-04 15:04:00 -08003439
3440 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003441 * <p>A list of camera LEDs that are available on this system.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003442 * <p><b>Possible values:</b>
3443 * <ul>
3444 * <li>{@link #LED_AVAILABLE_LEDS_TRANSMIT TRANSMIT}</li>
3445 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003446 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003447 * @see #LED_AVAILABLE_LEDS_TRANSMIT
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003448 * @hide
3449 */
3450 public static final Key<int[]> LED_AVAILABLE_LEDS =
3451 new Key<int[]>("android.led.availableLeds", int[].class);
3452
3453 /**
Igor Murashkine46c0da2014-02-07 18:34:37 -08003454 * <p>Generally classifies the overall set of the camera device functionality.</p>
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08003455 * <p>The supported hardware level is a high-level description of the camera device's
3456 * capabilities, summarizing several capabilities into one field. Each level adds additional
3457 * features to the previous one, and is always a strict superset of the previous level.
3458 * The ordering is <code>LEGACY &lt; LIMITED &lt; FULL &lt; LEVEL_3</code>.</p>
3459 * <p>Starting from <code>LEVEL_3</code>, the level enumerations are guaranteed to be in increasing
3460 * numerical value as well. To check if a given device is at least at a given hardware level,
3461 * the following code snippet can be used:</p>
3462 * <pre><code>// Returns true if the device supports the required hardware level, or better.
3463 * boolean isHardwareLevelSupported(CameraCharacteristics c, int requiredLevel) {
Yin-Chia Yehc5657002018-07-13 13:42:43 -07003464 * final int[] sortedHwLevels = {
3465 * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY,
3466 * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL,
3467 * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED,
3468 * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL,
3469 * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_3
3470 * };
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08003471 * int deviceLevel = c.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
Yin-Chia Yehc5657002018-07-13 13:42:43 -07003472 * if (requiredLevel == deviceLevel) {
3473 * return true;
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08003474 * }
Yin-Chia Yehc5657002018-07-13 13:42:43 -07003475 *
3476 * for (int sortedlevel : sortedHwLevels) {
3477 * if (sortedlevel == requiredLevel) {
3478 * return true;
3479 * } else if (sortedlevel == deviceLevel) {
3480 * return false;
3481 * }
3482 * }
3483 * return false; // Should never reach here
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08003484 * }
3485 * </code></pre>
3486 * <p>At a high level, the levels are:</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08003487 * <ul>
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08003488 * <li><code>LEGACY</code> devices operate in a backwards-compatibility mode for older
3489 * Android devices, and have very limited capabilities.</li>
3490 * <li><code>LIMITED</code> devices represent the
3491 * baseline feature set, and may also include additional capabilities that are
3492 * subsets of <code>FULL</code>.</li>
3493 * <li><code>FULL</code> devices additionally support per-frame manual control of sensor, flash, lens and
3494 * post-processing settings, and image capture at a high rate.</li>
3495 * <li><code>LEVEL_3</code> devices additionally support YUV reprocessing and RAW image capture, along
3496 * with additional output stream configurations.</li>
Yin-Chia Yehc5657002018-07-13 13:42:43 -07003497 * <li><code>EXTERNAL</code> devices are similar to <code>LIMITED</code> devices with exceptions like some sensor or
3498 * lens information not reorted or less stable framerates.</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -08003499 * </ul>
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08003500 * <p>See the individual level enums for full descriptions of the supported capabilities. The
3501 * {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} entry describes the device's capabilities at a
3502 * finer-grain level, if needed. In addition, many controls have their available settings or
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003503 * ranges defined in individual entries from {@link android.hardware.camera2.CameraCharacteristics }.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003504 * <p>Some features are not part of any particular hardware level or capability and must be
3505 * queried separately. These include:</p>
3506 * <ul>
3507 * <li>Calibrated timestamps ({@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} <code>==</code> REALTIME)</li>
3508 * <li>Precision lens control ({@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} <code>==</code> CALIBRATED)</li>
3509 * <li>Face detection ({@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes})</li>
3510 * <li>Optical or electrical image stabilization
3511 * ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization},
3512 * {@link CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES android.control.availableVideoStabilizationModes})</li>
3513 * </ul>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003514 * <p><b>Possible values:</b>
3515 * <ul>
3516 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED}</li>
3517 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL}</li>
3518 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY LEGACY}</li>
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08003519 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_3 3}</li>
Yin-Chia Yeh43cea5a2018-01-19 11:38:12 -08003520 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL EXTERNAL}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003521 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003522 * <p>This key is available on all devices.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08003523 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003524 * @see CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES
3525 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
3526 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
Igor Murashkine46c0da2014-02-07 18:34:37 -08003527 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003528 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
3529 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003530 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED
3531 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_FULL
Ruben Brunk4a61a862014-07-01 16:00:26 -07003532 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08003533 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_3
Yin-Chia Yeh43cea5a2018-01-19 11:38:12 -08003534 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003535 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003536 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003537 public static final Key<Integer> INFO_SUPPORTED_HARDWARE_LEVEL =
3538 new Key<Integer>("android.info.supportedHardwareLevel", int.class);
3539
Igor Murashkin3865a842014-01-17 18:18:39 -08003540 /**
Chien-Yu Chena1d1d5b2018-01-03 12:14:53 -08003541 * <p>A short string for manufacturer version information about the camera device, such as
3542 * ISP hardware, sensors, etc.</p>
3543 * <p>This can be used in {@link android.media.ExifInterface#TAG_IMAGE_DESCRIPTION TAG_IMAGE_DESCRIPTION}
3544 * in jpeg EXIF. This key may be absent if no version information is available on the
3545 * device.</p>
3546 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3547 */
3548 @PublicKey
3549 public static final Key<String> INFO_VERSION =
3550 new Key<String>("android.info.version", String.class);
3551
3552 /**
Igor Murashkin3865a842014-01-17 18:18:39 -08003553 * <p>The maximum number of frames that can occur after a request
3554 * (different than the previous) has been submitted, and before the
Chien-Yu Chen161a76c2015-06-26 11:23:55 -07003555 * result's state becomes synchronized.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08003556 * <p>This defines the maximum distance (in number of metadata results),
Chien-Yu Chen161a76c2015-06-26 11:23:55 -07003557 * between the frame number of the request that has new controls to apply
3558 * and the frame number of the result that has all the controls applied.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08003559 * <p>In other words this acts as an upper boundary for how many frames
3560 * must occur before the camera device knows for a fact that the new
3561 * submitted camera settings have been applied in outgoing frames.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003562 * <p><b>Units</b>: Frame counts</p>
3563 * <p><b>Possible values:</b>
3564 * <ul>
3565 * <li>{@link #SYNC_MAX_LATENCY_PER_FRAME_CONTROL PER_FRAME_CONTROL}</li>
3566 * <li>{@link #SYNC_MAX_LATENCY_UNKNOWN UNKNOWN}</li>
3567 * </ul></p>
3568 * <p><b>Available values for this device:</b><br>
3569 * A positive value, PER_FRAME_CONTROL, or UNKNOWN.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003570 * <p>This key is available on all devices.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08003571 * @see #SYNC_MAX_LATENCY_PER_FRAME_CONTROL
3572 * @see #SYNC_MAX_LATENCY_UNKNOWN
3573 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003574 @PublicKey
Igor Murashkin3865a842014-01-17 18:18:39 -08003575 public static final Key<Integer> SYNC_MAX_LATENCY =
3576 new Key<Integer>("android.sync.maxLatency", int.class);
3577
Eino-Ville Talvala24c369e2015-02-23 15:55:55 -08003578 /**
Zhijun He513f7c32015-04-24 18:23:54 -07003579 * <p>The maximal camera capture pipeline stall (in unit of frame count) introduced by a
3580 * reprocess capture request.</p>
3581 * <p>The key describes the maximal interference that one reprocess (input) request
3582 * can introduce to the camera simultaneous streaming of regular (output) capture
3583 * requests, including repeating requests.</p>
3584 * <p>When a reprocessing capture request is submitted while a camera output repeating request
3585 * (e.g. preview) is being served by the camera device, it may preempt the camera capture
3586 * pipeline for at least one frame duration so that the camera device is unable to process
3587 * the following capture request in time for the next sensor start of exposure boundary.
3588 * When this happens, the application may observe a capture time gap (longer than one frame
3589 * duration) between adjacent capture output frames, which usually exhibits as preview
3590 * glitch if the repeating request output targets include a preview surface. This key gives
3591 * the worst-case number of frame stall introduced by one reprocess request with any kind of
3592 * formats/sizes combination.</p>
3593 * <p>If this key reports 0, it means a reprocess request doesn't introduce any glitch to the
3594 * ongoing camera repeating request outputs, as if this reprocess request is never issued.</p>
Chien-Yu Chen8062d312015-05-12 14:24:10 -07003595 * <p>This key is supported if the camera device supports PRIVATE or YUV reprocessing (
3596 * i.e. {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains PRIVATE_REPROCESSING or
Zhijun He513f7c32015-04-24 18:23:54 -07003597 * YUV_REPROCESSING).</p>
3598 * <p><b>Units</b>: Number of frames.</p>
3599 * <p><b>Range of valid values:</b><br>
3600 * &lt;= 4</p>
3601 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3602 * <p><b>Limited capability</b> -
3603 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3604 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3605 *
3606 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3607 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
3608 */
3609 @PublicKey
3610 public static final Key<Integer> REPROCESS_MAX_CAPTURE_STALL =
3611 new Key<Integer>("android.reprocess.maxCaptureStall", int.class);
3612
3613 /**
Eino-Ville Talvala24c369e2015-02-23 15:55:55 -08003614 * <p>The available depth dataspace stream
3615 * configurations that this camera device supports
3616 * (i.e. format, width, height, output/input stream).</p>
3617 * <p>These are output stream configurations for use with
3618 * dataSpace HAL_DATASPACE_DEPTH. The configurations are
3619 * listed as <code>(format, width, height, input?)</code> tuples.</p>
3620 * <p>Only devices that support depth output for at least
3621 * the HAL_PIXEL_FORMAT_Y16 dense depth map may include
3622 * this entry.</p>
3623 * <p>A device that also supports the HAL_PIXEL_FORMAT_BLOB
3624 * sparse depth point cloud must report a single entry for
3625 * the format in this list as <code>(HAL_PIXEL_FORMAT_BLOB,
3626 * android.depth.maxDepthSamples, 1, OUTPUT)</code> in addition to
3627 * the entries for HAL_PIXEL_FORMAT_Y16.</p>
3628 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3629 * <p><b>Limited capability</b> -
3630 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3631 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3632 *
3633 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3634 * @hide
3635 */
3636 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS =
3637 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.depth.availableDepthStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
3638
3639 /**
3640 * <p>This lists the minimum frame duration for each
3641 * format/size combination for depth output formats.</p>
3642 * <p>This should correspond to the frame duration when only that
3643 * stream is active, with all processing (typically in android.*.mode)
3644 * set to either OFF or FAST.</p>
3645 * <p>When multiple streams are used in a request, the minimum frame
3646 * duration will be max(individual stream min durations).</p>
3647 * <p>The minimum frame duration of a stream (of a particular format, size)
3648 * is the same regardless of whether the stream is input or output.</p>
3649 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and
3650 * android.scaler.availableStallDurations for more details about
3651 * calculating the max frame rate.</p>
Eino-Ville Talvala24c369e2015-02-23 15:55:55 -08003652 * <p><b>Units</b>: (format, width, height, ns) x n</p>
3653 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3654 * <p><b>Limited capability</b> -
3655 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3656 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3657 *
3658 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3659 * @see CaptureRequest#SENSOR_FRAME_DURATION
3660 * @hide
3661 */
3662 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS =
3663 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
3664
3665 /**
3666 * <p>This lists the maximum stall duration for each
Zhijun He513f7c32015-04-24 18:23:54 -07003667 * output format/size combination for depth streams.</p>
Eino-Ville Talvala24c369e2015-02-23 15:55:55 -08003668 * <p>A stall duration is how much extra time would get added
3669 * to the normal minimum frame duration for a repeating request
3670 * that has streams with non-zero stall.</p>
3671 * <p>This functions similarly to
3672 * android.scaler.availableStallDurations for depth
3673 * streams.</p>
3674 * <p>All depth output stream formats may have a nonzero stall
3675 * duration.</p>
3676 * <p><b>Units</b>: (format, width, height, ns) x n</p>
3677 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3678 * <p><b>Limited capability</b> -
3679 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3680 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3681 *
3682 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3683 * @hide
3684 */
3685 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS =
3686 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
3687
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -07003688 /**
3689 * <p>Indicates whether a capture request may target both a
3690 * DEPTH16 / DEPTH_POINT_CLOUD output, and normal color outputs (such as
3691 * YUV_420_888, JPEG, or RAW) simultaneously.</p>
3692 * <p>If TRUE, including both depth and color outputs in a single
3693 * capture request is not supported. An application must interleave color
3694 * and depth requests. If FALSE, a single request can target both types
3695 * of output.</p>
3696 * <p>Typically, this restriction exists on camera devices that
3697 * need to emit a specific pattern or wavelength of light to
3698 * measure depth values, which causes the color image to be
3699 * corrupted during depth measurement.</p>
3700 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3701 * <p><b>Limited capability</b> -
3702 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3703 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3704 *
3705 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3706 */
3707 @PublicKey
3708 public static final Key<Boolean> DEPTH_DEPTH_IS_EXCLUSIVE =
3709 new Key<Boolean>("android.depth.depthIsExclusive", boolean.class);
3710
Shuzhen Wang23d29382017-11-26 17:24:56 -08003711 /**
Emilian Peev2776ca32018-09-18 14:00:39 +01003712 * <p>Recommended depth stream configurations for common client use cases.</p>
3713 * <p>Optional subset of the android.depth.availableDepthStreamConfigurations that
3714 * contains similar tuples listed as
3715 * (i.e. width, height, format, output/input stream, usecase bit field).
3716 * Camera devices will be able to suggest particular depth stream configurations which are
3717 * power and performance efficient for specific use cases. For more information about
3718 * retrieving the suggestions see
3719 * {@link android.hardware.camera2.CameraCharacteristics#getRecommendedStreamConfigurationMap }.</p>
3720 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3721 * @hide
3722 */
3723 public static final Key<android.hardware.camera2.params.RecommendedStreamConfiguration[]> DEPTH_AVAILABLE_RECOMMENDED_DEPTH_STREAM_CONFIGURATIONS =
3724 new Key<android.hardware.camera2.params.RecommendedStreamConfiguration[]>("android.depth.availableRecommendedDepthStreamConfigurations", android.hardware.camera2.params.RecommendedStreamConfiguration[].class);
3725
3726 /**
Emilian Peev934ffa62019-01-04 17:48:31 +00003727 * <p>The available dynamic depth dataspace stream
3728 * configurations that this camera device supports
3729 * (i.e. format, width, height, output/input stream).</p>
3730 * <p>These are output stream configurations for use with
3731 * dataSpace DYNAMIC_DEPTH. The configurations are
3732 * listed as <code>(format, width, height, input?)</code> tuples.</p>
3733 * <p>Only devices that support depth output for at least
3734 * the HAL_PIXEL_FORMAT_Y16 dense depth map along with
3735 * HAL_PIXEL_FORMAT_BLOB with the same size or size with
3736 * the same aspect ratio can have dynamic depth dataspace
3737 * stream configuration. {@link CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE android.depth.depthIsExclusive} also
3738 * needs to be set to FALSE.</p>
3739 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3740 *
3741 * @see CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE
3742 * @hide
3743 */
3744 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS =
3745 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.depth.availableDynamicDepthStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
3746
3747 /**
3748 * <p>This lists the minimum frame duration for each
3749 * format/size combination for dynamic depth output streams.</p>
3750 * <p>This should correspond to the frame duration when only that
3751 * stream is active, with all processing (typically in android.*.mode)
3752 * set to either OFF or FAST.</p>
3753 * <p>When multiple streams are used in a request, the minimum frame
3754 * duration will be max(individual stream min durations).</p>
3755 * <p>The minimum frame duration of a stream (of a particular format, size)
3756 * is the same regardless of whether the stream is input or output.</p>
3757 * <p><b>Units</b>: (format, width, height, ns) x n</p>
3758 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3759 * @hide
3760 */
3761 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS =
3762 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDynamicDepthMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
3763
3764 /**
3765 * <p>This lists the maximum stall duration for each
3766 * output format/size combination for dynamic depth streams.</p>
3767 * <p>A stall duration is how much extra time would get added
3768 * to the normal minimum frame duration for a repeating request
3769 * that has streams with non-zero stall.</p>
3770 * <p>All dynamic depth output streams may have a nonzero stall
3771 * duration.</p>
3772 * <p><b>Units</b>: (format, width, height, ns) x n</p>
3773 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3774 * @hide
3775 */
3776 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS =
3777 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDynamicDepthStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
3778
3779 /**
Shuzhen Wang23d29382017-11-26 17:24:56 -08003780 * <p>String containing the ids of the underlying physical cameras.</p>
Shuzhen Wang61aaa322018-11-19 16:04:57 -08003781 * <p>For a logical camera, this is concatenation of all underlying physical camera IDs.
3782 * The null terminator for physical camera ID must be preserved so that the whole string
3783 * can be tokenized using '\0' to generate list of physical camera IDs.</p>
3784 * <p>For example, if the physical camera IDs of the logical camera are "2" and "3", the
Shuzhen Wang23d29382017-11-26 17:24:56 -08003785 * value of this tag will be ['2', '\0', '3', '\0'].</p>
Shuzhen Wang61aaa322018-11-19 16:04:57 -08003786 * <p>The number of physical camera IDs must be no less than 2.</p>
Shuzhen Wang23d29382017-11-26 17:24:56 -08003787 * <p><b>Units</b>: UTF-8 null-terminated string</p>
3788 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3789 * <p><b>Limited capability</b> -
3790 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3791 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3792 *
3793 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3794 * @hide
3795 */
3796 public static final Key<byte[]> LOGICAL_MULTI_CAMERA_PHYSICAL_IDS =
3797 new Key<byte[]>("android.logicalMultiCamera.physicalIds", byte[].class);
3798
3799 /**
3800 * <p>The accuracy of frame timestamp synchronization between physical cameras</p>
3801 * <p>The accuracy of the frame timestamp synchronization determines the physical cameras'
3802 * ability to start exposure at the same time. If the sensorSyncType is CALIBRATED,
3803 * the physical camera sensors usually run in master-slave mode so that their shutter
3804 * time is synchronized. For APPROXIMATE sensorSyncType, the camera sensors usually run in
3805 * master-master mode, and there could be offset between their start of exposure.</p>
3806 * <p>In both cases, all images generated for a particular capture request still carry the same
3807 * timestamps, so that they can be used to look up the matching frame number and
3808 * onCaptureStarted callback.</p>
3809 * <p><b>Possible values:</b>
3810 * <ul>
3811 * <li>{@link #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE APPROXIMATE}</li>
3812 * <li>{@link #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED CALIBRATED}</li>
3813 * </ul></p>
3814 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3815 * <p><b>Limited capability</b> -
3816 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3817 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3818 *
3819 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3820 * @see #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE
3821 * @see #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED
3822 */
3823 @PublicKey
3824 public static final Key<Integer> LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE =
3825 new Key<Integer>("android.logicalMultiCamera.sensorSyncType", int.class);
3826
Eino-Ville Talvala41670722018-03-13 19:43:07 -07003827 /**
3828 * <p>List of distortion correction modes for {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} that are
3829 * supported by this camera device.</p>
3830 * <p>No device is required to support this API; such devices will always list only 'OFF'.
3831 * All devices that support this API will list both FAST and HIGH_QUALITY.</p>
3832 * <p><b>Range of valid values:</b><br>
3833 * Any value listed in {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode}</p>
3834 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3835 *
3836 * @see CaptureRequest#DISTORTION_CORRECTION_MODE
3837 */
3838 @PublicKey
3839 public static final Key<int[]> DISTORTION_CORRECTION_AVAILABLE_MODES =
3840 new Key<int[]>("android.distortionCorrection.availableModes", int[].class);
3841
Shuzhen Wangf655b1c2018-12-28 15:40:36 -08003842 /**
3843 * <p>The available HEIC (ISO/IEC 23008-12) stream
3844 * configurations that this camera device supports
3845 * (i.e. format, width, height, output/input stream).</p>
3846 * <p>The configurations are listed as <code>(format, width, height, input?)</code> tuples.</p>
3847 * <p>If the camera device supports HEIC image format, it will support identical set of stream
3848 * combinations involving HEIC image format, compared to the combinations involving JPEG
3849 * image format as required by the device's hardware level and capabilities.</p>
3850 * <p>All the static, control, and dynamic metadata tags related to JPEG apply to HEIC formats.
3851 * Configuring JPEG and HEIC streams at the same time is not supported.</p>
3852 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3853 * <p><b>Limited capability</b> -
3854 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3855 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3856 *
3857 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3858 * @hide
3859 */
3860 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS =
3861 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.heic.availableHeicStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
3862
3863 /**
3864 * <p>This lists the minimum frame duration for each
3865 * format/size combination for HEIC output formats.</p>
3866 * <p>This should correspond to the frame duration when only that
3867 * stream is active, with all processing (typically in android.*.mode)
3868 * set to either OFF or FAST.</p>
3869 * <p>When multiple streams are used in a request, the minimum frame
3870 * duration will be max(individual stream min durations).</p>
3871 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and
3872 * android.scaler.availableStallDurations for more details about
3873 * calculating the max frame rate.</p>
3874 * <p><b>Units</b>: (format, width, height, ns) x n</p>
3875 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3876 * <p><b>Limited capability</b> -
3877 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3878 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3879 *
3880 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3881 * @see CaptureRequest#SENSOR_FRAME_DURATION
3882 * @hide
3883 */
3884 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS =
3885 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.heic.availableHeicMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
3886
3887 /**
3888 * <p>This lists the maximum stall duration for each
3889 * output format/size combination for HEIC streams.</p>
3890 * <p>A stall duration is how much extra time would get added
3891 * to the normal minimum frame duration for a repeating request
3892 * that has streams with non-zero stall.</p>
3893 * <p>This functions similarly to
3894 * android.scaler.availableStallDurations for HEIC
3895 * streams.</p>
3896 * <p>All HEIC output stream formats may have a nonzero stall
3897 * duration.</p>
3898 * <p><b>Units</b>: (format, width, height, ns) x n</p>
3899 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3900 * <p><b>Limited capability</b> -
3901 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3902 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3903 *
3904 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3905 * @hide
3906 */
3907 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> HEIC_AVAILABLE_HEIC_STALL_DURATIONS =
3908 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.heic.availableHeicStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
3909
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003910 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
3911 * End generated code
3912 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
Igor Murashkin6c76f582014-07-15 17:19:49 -07003913
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003914
3915
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08003916}