blob: 87c64cd12903649f4aa28a43e28bc76d8cea68f9 [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;
Eino-Ville Talvala70c22072013-08-27 12:09:04 -070021import android.hardware.camera2.impl.CameraMetadataNative;
Igor Murashkin6c76f582014-07-15 17:19:49 -070022import android.hardware.camera2.impl.PublicKey;
23import android.hardware.camera2.impl.SyntheticKey;
Emilian Peev75a55702017-11-07 16:09:59 +000024import android.hardware.camera2.params.SessionConfiguration;
Shuzhen Wang23d29382017-11-26 17:24:56 -080025import android.hardware.camera2.utils.ArrayUtils;
Igor Murashkind6d65152014-05-19 16:31:02 -070026import android.hardware.camera2.utils.TypeReference;
Igor Murashkin72f9f0a2014-05-14 15:46:10 -070027import android.util.Rational;
Eino-Ville Talvala70c22072013-08-27 12:09:04 -070028
Shuzhen Wang23d29382017-11-26 17:24:56 -080029import java.util.Arrays;
Igor Murashkin7a36a0f2013-09-10 18:13:09 -070030import java.util.Collections;
Shuzhen Wangbde13972018-03-19 10:30:45 -070031import java.util.HashSet;
Igor Murashkin7a36a0f2013-09-10 18:13:09 -070032import java.util.List;
Shuzhen Wangbde13972018-03-19 10:30:45 -070033import java.util.Set;
Igor Murashkin7a36a0f2013-09-10 18:13:09 -070034
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080035/**
36 * <p>The properties describing a
37 * {@link CameraDevice CameraDevice}.</p>
38 *
39 * <p>These properties are fixed for a given CameraDevice, and can be queried
40 * through the {@link CameraManager CameraManager}
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -070041 * interface with {@link CameraManager#getCameraCharacteristics}.</p>
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080042 *
Ruben Brunkf967a542014-04-28 16:31:11 -070043 * <p>{@link CameraCharacteristics} objects are immutable.</p>
44 *
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080045 * @see CameraDevice
46 * @see CameraManager
47 */
Igor Murashkind6d65152014-05-19 16:31:02 -070048public final class CameraCharacteristics extends CameraMetadata<CameraCharacteristics.Key<?>> {
49
50 /**
51 * A {@code Key} is used to do camera characteristics field lookups with
52 * {@link CameraCharacteristics#get}.
53 *
54 * <p>For example, to get the stream configuration map:
55 * <code><pre>
56 * StreamConfigurationMap map = cameraCharacteristics.get(
57 * CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);
58 * </pre></code>
59 * </p>
60 *
61 * <p>To enumerate over all possible keys for {@link CameraCharacteristics}, see
62 * {@link CameraCharacteristics#getKeys()}.</p>
63 *
64 * @see CameraCharacteristics#get
65 * @see CameraCharacteristics#getKeys()
66 */
67 public static final class Key<T> {
68 private final CameraMetadataNative.Key<T> mKey;
69
70 /**
71 * Visible for testing and vendor extensions only.
72 *
73 * @hide
74 */
Emilian Peevde62d842017-03-23 19:20:40 +000075 public Key(String name, Class<T> type, long vendorId) {
76 mKey = new CameraMetadataNative.Key<T>(name, type, vendorId);
77 }
78
79 /**
80 * Visible for testing and vendor extensions only.
81 *
82 * @hide
83 */
Justin Yunf01e40c2018-05-18 20:39:45 +090084 public Key(String name, String fallbackName, Class<T> type) {
85 mKey = new CameraMetadataNative.Key<T>(name, fallbackName, type);
86 }
87
88 /**
89 * Visible for testing and vendor extensions only.
90 *
91 * @hide
92 */
Igor Murashkind6d65152014-05-19 16:31:02 -070093 public Key(String name, Class<T> type) {
94 mKey = new CameraMetadataNative.Key<T>(name, type);
95 }
96
97 /**
98 * Visible for testing and vendor extensions only.
99 *
100 * @hide
101 */
102 public Key(String name, TypeReference<T> typeReference) {
103 mKey = new CameraMetadataNative.Key<T>(name, typeReference);
104 }
105
106 /**
107 * Return a camelCase, period separated name formatted like:
108 * {@code "root.section[.subsections].name"}.
109 *
110 * <p>Built-in keys exposed by the Android SDK are always prefixed with {@code "android."};
111 * keys that are device/platform-specific are prefixed with {@code "com."}.</p>
112 *
113 * <p>For example, {@code CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP} would
114 * have a name of {@code "android.scaler.streamConfigurationMap"}; whereas a device
115 * specific key might look like {@code "com.google.nexus.data.private"}.</p>
116 *
117 * @return String representation of the key name
118 */
Eino-Ville Talvala8b905572015-05-14 15:43:01 -0700119 @NonNull
Igor Murashkind6d65152014-05-19 16:31:02 -0700120 public String getName() {
121 return mKey.getName();
122 }
123
124 /**
Emilian Peevde62d842017-03-23 19:20:40 +0000125 * Return vendor tag id.
126 *
127 * @hide
128 */
129 public long getVendorId() {
130 return mKey.getVendorId();
131 }
132
133 /**
Igor Murashkind6d65152014-05-19 16:31:02 -0700134 * {@inheritDoc}
135 */
136 @Override
137 public final int hashCode() {
138 return mKey.hashCode();
139 }
140
141 /**
142 * {@inheritDoc}
143 */
144 @SuppressWarnings("unchecked")
145 @Override
146 public final boolean equals(Object o) {
147 return o instanceof Key && ((Key<T>)o).mKey.equals(mKey);
148 }
149
150 /**
Chien-Yu Chen12a83852015-07-07 12:17:22 -0700151 * Return this {@link Key} as a string representation.
152 *
153 * <p>{@code "CameraCharacteristics.Key(%s)"}, where {@code %s} represents
154 * the name of this key as returned by {@link #getName}.</p>
155 *
156 * @return string representation of {@link Key}
157 */
158 @NonNull
159 @Override
160 public String toString() {
161 return String.format("CameraCharacteristics.Key(%s)", mKey.getName());
162 }
163
164 /**
Igor Murashkind6d65152014-05-19 16:31:02 -0700165 * Visible for CameraMetadataNative implementation only; do not use.
166 *
167 * TODO: Make this private or remove it altogether.
168 *
169 * @hide
170 */
171 public CameraMetadataNative.Key<T> getNativeKey() {
172 return mKey;
173 }
174
175 @SuppressWarnings({
176 "unused", "unchecked"
177 })
178 private Key(CameraMetadataNative.Key<?> nativeKey) {
179 mKey = (CameraMetadataNative.Key<T>) nativeKey;
180 }
181 }
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700182
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700183 private final CameraMetadataNative mProperties;
Igor Murashkincc542a42014-06-25 11:52:23 -0700184 private List<CameraCharacteristics.Key<?>> mKeys;
Igor Murashkind6d65152014-05-19 16:31:02 -0700185 private List<CaptureRequest.Key<?>> mAvailableRequestKeys;
Emilian Peev75a55702017-11-07 16:09:59 +0000186 private List<CaptureRequest.Key<?>> mAvailableSessionKeys;
Emilian Peev2100ae72018-01-12 16:56:25 +0000187 private List<CaptureRequest.Key<?>> mAvailablePhysicalRequestKeys;
Igor Murashkind6d65152014-05-19 16:31:02 -0700188 private List<CaptureResult.Key<?>> mAvailableResultKeys;
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700189
190 /**
191 * Takes ownership of the passed-in properties object
192 * @hide
193 */
Igor Murashkin68f40062013-09-10 12:15:54 -0700194 public CameraCharacteristics(CameraMetadataNative properties) {
Igor Murashkind6d65152014-05-19 16:31:02 -0700195 mProperties = CameraMetadataNative.move(properties);
Emilian Peevde62d842017-03-23 19:20:40 +0000196 setNativeInstance(mProperties);
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700197 }
198
Ruben Brunkf967a542014-04-28 16:31:11 -0700199 /**
200 * Returns a copy of the underlying {@link CameraMetadataNative}.
201 * @hide
202 */
203 public CameraMetadataNative getNativeCopy() {
204 return new CameraMetadataNative(mProperties);
205 }
206
Igor Murashkind6d65152014-05-19 16:31:02 -0700207 /**
208 * Get a camera characteristics field value.
209 *
210 * <p>The field definitions can be
211 * found in {@link CameraCharacteristics}.</p>
212 *
213 * <p>Querying the value for the same key more than once will return a value
214 * which is equal to the previous queried value.</p>
215 *
216 * @throws IllegalArgumentException if the key was not valid
217 *
218 * @param key The characteristics field to read.
219 * @return The value of that key, or {@code null} if the field is not set.
220 */
Eino-Ville Talvala8b905572015-05-14 15:43:01 -0700221 @Nullable
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700222 public <T> T get(Key<T> key) {
223 return mProperties.get(key);
224 }
225
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700226 /**
Igor Murashkind6d65152014-05-19 16:31:02 -0700227 * {@inheritDoc}
228 * @hide
229 */
230 @SuppressWarnings("unchecked")
231 @Override
232 protected <T> T getProtected(Key<?> key) {
233 return (T) mProperties.get(key);
234 }
235
236 /**
237 * {@inheritDoc}
238 * @hide
239 */
240 @SuppressWarnings("unchecked")
241 @Override
242 protected Class<Key<?>> getKeyClass() {
243 Object thisClass = Key.class;
244 return (Class<Key<?>>)thisClass;
245 }
246
247 /**
248 * {@inheritDoc}
249 */
Eino-Ville Talvala8b905572015-05-14 15:43:01 -0700250 @NonNull
Igor Murashkind6d65152014-05-19 16:31:02 -0700251 @Override
252 public List<Key<?>> getKeys() {
Igor Murashkincc542a42014-06-25 11:52:23 -0700253 // List of keys is immutable; cache the results after we calculate them
254 if (mKeys != null) {
255 return mKeys;
256 }
257
258 int[] filterTags = get(REQUEST_AVAILABLE_CHARACTERISTICS_KEYS);
259 if (filterTags == null) {
260 throw new AssertionError("android.request.availableCharacteristicsKeys must be non-null"
261 + " in the characteristics");
262 }
263
264 mKeys = Collections.unmodifiableList(
Emilian Peevde62d842017-03-23 19:20:40 +0000265 getKeys(getClass(), getKeyClass(), this, filterTags));
Igor Murashkincc542a42014-06-25 11:52:23 -0700266 return mKeys;
Igor Murashkind6d65152014-05-19 16:31:02 -0700267 }
268
269 /**
Emilian Peev75a55702017-11-07 16:09:59 +0000270 * <p>Returns a subset of {@link #getAvailableCaptureRequestKeys} keys that the
271 * camera device can pass as part of the capture session initialization.</p>
272 *
273 * <p>This list includes keys that are difficult to apply per-frame and
274 * can result in unexpected delays when modified during the capture session
275 * lifetime. Typical examples include parameters that require a
276 * time-consuming hardware re-configuration or internal camera pipeline
277 * change. For performance reasons we suggest clients to pass their initial
278 * values as part of {@link SessionConfiguration#setSessionParameters}. Once
279 * the camera capture session is enabled it is also recommended to avoid
280 * changing them from their initial values set in
281 * {@link SessionConfiguration#setSessionParameters }.
282 * Control over session parameters can still be exerted in capture requests
283 * but clients should be aware and expect delays during their application.
284 * An example usage scenario could look like this:</p>
285 * <ul>
286 * <li>The camera client starts by quering the session parameter key list via
287 * {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys }.</li>
288 * <li>Before triggering the capture session create sequence, a capture request
289 * must be built via {@link CameraDevice#createCaptureRequest } using an
290 * appropriate template matching the particular use case.</li>
291 * <li>The client should go over the list of session parameters and check
292 * whether some of the keys listed matches with the parameters that
293 * they intend to modify as part of the first capture request.</li>
294 * <li>If there is no such match, the capture request can be passed
295 * unmodified to {@link SessionConfiguration#setSessionParameters }.</li>
296 * <li>If matches do exist, the client should update the respective values
297 * and pass the request to {@link SessionConfiguration#setSessionParameters }.</li>
298 * <li>After the capture session initialization completes the session parameter
299 * key list can continue to serve as reference when posting or updating
300 * further requests. As mentioned above further changes to session
301 * parameters should ideally be avoided, if updates are necessary
302 * however clients could expect a delay/glitch during the
303 * parameter switch.</li>
304 * </ul>
305 *
306 * <p>The list returned is not modifiable, so any attempts to modify it will throw
307 * a {@code UnsupportedOperationException}.</p>
308 *
309 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
310 *
311 * @return List of keys that can be passed during capture session initialization. In case the
312 * camera device doesn't support such keys the list can be null.
313 */
314 @SuppressWarnings({"unchecked"})
315 public List<CaptureRequest.Key<?>> getAvailableSessionKeys() {
316 if (mAvailableSessionKeys == null) {
317 Object crKey = CaptureRequest.Key.class;
318 Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey;
319
320 int[] filterTags = get(REQUEST_AVAILABLE_SESSION_KEYS);
321 if (filterTags == null) {
322 return null;
323 }
324 mAvailableSessionKeys =
325 getAvailableKeyList(CaptureRequest.class, crKeyTyped, filterTags);
326 }
327 return mAvailableSessionKeys;
328 }
329
330 /**
Emilian Peev2100ae72018-01-12 16:56:25 +0000331 * <p>Returns a subset of {@link #getAvailableCaptureRequestKeys} keys that can
332 * be overriden for physical devices backing a logical multi-camera.</p>
333 *
334 * <p>This is a subset of android.request.availableRequestKeys which contains a list
335 * of keys that can be overriden using {@link CaptureRequest.Builder#setPhysicalCameraKey }.
336 * The respective value of such request key can be obtained by calling
337 * {@link CaptureRequest.Builder#getPhysicalCameraKey }. Capture requests that contain
338 * individual physical device requests must be built via
339 * {@link android.hardware.camera2.CameraDevice#createCaptureRequest(int, Set)}.
340 * Such extended capture requests can be passed only to
341 * {@link CameraCaptureSession#capture } or {@link CameraCaptureSession#captureBurst } and
342 * not to {@link CameraCaptureSession#setRepeatingRequest } or
343 * {@link CameraCaptureSession#setRepeatingBurst }.</p>
344 *
345 * <p>The list returned is not modifiable, so any attempts to modify it will throw
346 * a {@code UnsupportedOperationException}.</p>
347 *
348 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
349 *
350 * @return List of keys that can be overriden in individual physical device requests.
351 * In case the camera device doesn't support such keys the list can be null.
352 */
353 @SuppressWarnings({"unchecked"})
354 public List<CaptureRequest.Key<?>> getAvailablePhysicalCameraRequestKeys() {
Emilian Peevf60f4fb2018-02-08 17:40:48 +0000355 if (mAvailablePhysicalRequestKeys == null) {
Emilian Peev2100ae72018-01-12 16:56:25 +0000356 Object crKey = CaptureRequest.Key.class;
357 Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey;
358
359 int[] filterTags = get(REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS);
360 if (filterTags == null) {
361 return null;
362 }
363 mAvailablePhysicalRequestKeys =
364 getAvailableKeyList(CaptureRequest.class, crKeyTyped, filterTags);
365 }
366 return mAvailablePhysicalRequestKeys;
367 }
368
369 /**
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700370 * Returns the list of keys supported by this {@link CameraDevice} for querying
371 * with a {@link CaptureRequest}.
372 *
373 * <p>The list returned is not modifiable, so any attempts to modify it will throw
374 * a {@code UnsupportedOperationException}.</p>
375 *
376 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
377 *
Igor Murashkin68f40062013-09-10 12:15:54 -0700378 * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700379 * {@link #getKeys()} instead.</p>
380 *
381 * @return List of keys supported by this CameraDevice for CaptureRequests.
382 */
Igor Murashkind6d65152014-05-19 16:31:02 -0700383 @SuppressWarnings({"unchecked"})
Eino-Ville Talvala8b905572015-05-14 15:43:01 -0700384 @NonNull
Igor Murashkind6d65152014-05-19 16:31:02 -0700385 public List<CaptureRequest.Key<?>> getAvailableCaptureRequestKeys() {
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700386 if (mAvailableRequestKeys == null) {
Igor Murashkind6d65152014-05-19 16:31:02 -0700387 Object crKey = CaptureRequest.Key.class;
388 Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey;
389
Igor Murashkincc542a42014-06-25 11:52:23 -0700390 int[] filterTags = get(REQUEST_AVAILABLE_REQUEST_KEYS);
391 if (filterTags == null) {
392 throw new AssertionError("android.request.availableRequestKeys must be non-null "
393 + "in the characteristics");
394 }
395 mAvailableRequestKeys =
396 getAvailableKeyList(CaptureRequest.class, crKeyTyped, filterTags);
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700397 }
398 return mAvailableRequestKeys;
399 }
400
401 /**
402 * Returns the list of keys supported by this {@link CameraDevice} for querying
403 * with a {@link CaptureResult}.
404 *
405 * <p>The list returned is not modifiable, so any attempts to modify it will throw
406 * a {@code UnsupportedOperationException}.</p>
407 *
408 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
409 *
Igor Murashkin68f40062013-09-10 12:15:54 -0700410 * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700411 * {@link #getKeys()} instead.</p>
412 *
413 * @return List of keys supported by this CameraDevice for CaptureResults.
414 */
Igor Murashkind6d65152014-05-19 16:31:02 -0700415 @SuppressWarnings({"unchecked"})
Eino-Ville Talvala8b905572015-05-14 15:43:01 -0700416 @NonNull
Igor Murashkind6d65152014-05-19 16:31:02 -0700417 public List<CaptureResult.Key<?>> getAvailableCaptureResultKeys() {
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700418 if (mAvailableResultKeys == null) {
Igor Murashkind6d65152014-05-19 16:31:02 -0700419 Object crKey = CaptureResult.Key.class;
420 Class<CaptureResult.Key<?>> crKeyTyped = (Class<CaptureResult.Key<?>>)crKey;
421
Igor Murashkincc542a42014-06-25 11:52:23 -0700422 int[] filterTags = get(REQUEST_AVAILABLE_RESULT_KEYS);
423 if (filterTags == null) {
424 throw new AssertionError("android.request.availableResultKeys must be non-null "
425 + "in the characteristics");
426 }
427 mAvailableResultKeys = getAvailableKeyList(CaptureResult.class, crKeyTyped, filterTags);
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700428 }
429 return mAvailableResultKeys;
430 }
431
432 /**
433 * Returns the list of keys supported by this {@link CameraDevice} by metadataClass.
434 *
435 * <p>The list returned is not modifiable, so any attempts to modify it will throw
436 * a {@code UnsupportedOperationException}.</p>
437 *
438 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
439 *
440 * @param metadataClass The subclass of CameraMetadata that you want to get the keys for.
Igor Murashkind6d65152014-05-19 16:31:02 -0700441 * @param keyClass The class of the metadata key, e.g. CaptureRequest.Key.class
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700442 *
443 * @return List of keys supported by this CameraDevice for metadataClass.
444 *
445 * @throws IllegalArgumentException if metadataClass is not a subclass of CameraMetadata
446 */
Igor Murashkind6d65152014-05-19 16:31:02 -0700447 private <TKey> List<TKey>
Igor Murashkincc542a42014-06-25 11:52:23 -0700448 getAvailableKeyList(Class<?> metadataClass, Class<TKey> keyClass, int[] filterTags) {
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700449
450 if (metadataClass.equals(CameraMetadata.class)) {
451 throw new AssertionError(
452 "metadataClass must be a strict subclass of CameraMetadata");
453 } else if (!CameraMetadata.class.isAssignableFrom(metadataClass)) {
454 throw new AssertionError(
455 "metadataClass must be a subclass of CameraMetadata");
456 }
457
Emilian Peevde62d842017-03-23 19:20:40 +0000458 List<TKey> staticKeyList = getKeys(
Igor Murashkincc542a42014-06-25 11:52:23 -0700459 metadataClass, keyClass, /*instance*/null, filterTags);
Igor Murashkind6d65152014-05-19 16:31:02 -0700460 return Collections.unmodifiableList(staticKeyList);
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700461 }
462
Shuzhen Wang23d29382017-11-26 17:24:56 -0800463 /**
Shuzhen Wangbde13972018-03-19 10:30:45 -0700464 * Returns the set of physical camera ids that this logical {@link CameraDevice} is
Shuzhen Wang23d29382017-11-26 17:24:56 -0800465 * made up of.
466 *
467 * <p>A camera device is a logical camera if it has
468 * REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA capability. If the camera device
Shuzhen Wangbde13972018-03-19 10:30:45 -0700469 * doesn't have the capability, the return value will be an empty set. </p>
Shuzhen Wang23d29382017-11-26 17:24:56 -0800470 *
Shuzhen Wangbde13972018-03-19 10:30:45 -0700471 * <p>The set returned is not modifiable, so any attempts to modify it will throw
Shuzhen Wang23d29382017-11-26 17:24:56 -0800472 * a {@code UnsupportedOperationException}.</p>
473 *
Shuzhen Wangbde13972018-03-19 10:30:45 -0700474 * @return Set of physical camera ids for this logical camera device.
Shuzhen Wang23d29382017-11-26 17:24:56 -0800475 */
476 @NonNull
Shuzhen Wangbde13972018-03-19 10:30:45 -0700477 public Set<String> getPhysicalCameraIds() {
Shuzhen Wang23d29382017-11-26 17:24:56 -0800478 int[] availableCapabilities = get(REQUEST_AVAILABLE_CAPABILITIES);
479 if (availableCapabilities == null) {
480 throw new AssertionError("android.request.availableCapabilities must be non-null "
481 + "in the characteristics");
482 }
483
484 if (!ArrayUtils.contains(availableCapabilities,
485 REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA)) {
Shuzhen Wangbde13972018-03-19 10:30:45 -0700486 return Collections.emptySet();
Shuzhen Wang23d29382017-11-26 17:24:56 -0800487 }
488 byte[] physicalCamIds = get(LOGICAL_MULTI_CAMERA_PHYSICAL_IDS);
489
490 String physicalCamIdString = null;
491 try {
492 physicalCamIdString = new String(physicalCamIds, "UTF-8");
493 } catch (java.io.UnsupportedEncodingException e) {
494 throw new AssertionError("android.logicalCam.physicalIds must be UTF-8 string");
495 }
Shuzhen Wangbde13972018-03-19 10:30:45 -0700496 String[] physicalCameraIdArray = physicalCamIdString.split("\0");
Shuzhen Wang23d29382017-11-26 17:24:56 -0800497
Shuzhen Wangbde13972018-03-19 10:30:45 -0700498 return Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(physicalCameraIdArray)));
Shuzhen Wang23d29382017-11-26 17:24:56 -0800499 }
500
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700501 /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
502 * The key entries below this point are generated from metadata
503 * definitions in /system/media/camera/docs. Do not modify by hand or
504 * modify the comment blocks at the start or end.
505 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800506
507 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700508 * <p>List of aberration correction modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode} that are
509 * supported by this camera device.</p>
510 * <p>This key lists the valid modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}. If no
511 * aberration correction modes are available for a device, this list will solely include
Yin-Chia Yeh941aac02015-01-06 10:32:47 -0800512 * OFF mode. All camera devices will support either OFF or FAST mode.</p>
513 * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always list
514 * OFF mode. This includes all FULL level devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700515 * <p>LEGACY devices will always only support FAST mode.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700516 * <p><b>Range of valid values:</b><br>
517 * Any value listed in {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700518 * <p>This key is available on all devices.</p>
Zhijun Hea05e59d2014-07-08 18:27:47 -0700519 *
Zhijun He9e4e4392014-08-18 11:12:32 -0700520 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
Zhijun Hea05e59d2014-07-08 18:27:47 -0700521 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700522 @PublicKey
Zhijun He9e4e4392014-08-18 11:12:32 -0700523 public static final Key<int[]> COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES =
524 new Key<int[]>("android.colorCorrection.availableAberrationModes", int[].class);
Zhijun Hea05e59d2014-07-08 18:27:47 -0700525
526 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700527 * <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 -0800528 * supported by this camera device.</p>
529 * <p>Not all of the auto-exposure anti-banding modes may be
530 * supported by a given camera device. This field lists the
531 * valid anti-banding modes that the application may request
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700532 * for this camera device with the
Yin-Chia Yeh7b2cae62014-11-25 11:54:18 -0800533 * {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} control.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700534 * <p><b>Range of valid values:</b><br>
535 * Any value listed in {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700536 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700537 *
538 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800539 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700540 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700541 public static final Key<int[]> CONTROL_AE_AVAILABLE_ANTIBANDING_MODES =
542 new Key<int[]>("android.control.aeAvailableAntibandingModes", int[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800543
544 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700545 * <p>List of auto-exposure modes for {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} that are supported by this camera
546 * device.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800547 * <p>Not all the auto-exposure modes may be supported by a
548 * given camera device, especially if no flash unit is
549 * available. This entry lists the valid modes for
550 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} for this camera device.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700551 * <p>All camera devices support ON, and all camera devices with flash
552 * units support ON_AUTO_FLASH and ON_ALWAYS_FLASH.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -0800553 * <p>FULL mode camera devices always support OFF mode,
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800554 * which enables application control of camera exposure time,
555 * sensitivity, and frame duration.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700556 * <p>LEGACY mode camera devices never support OFF mode.
557 * LIMITED mode devices support OFF if they support the MANUAL_SENSOR
558 * capability.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700559 * <p><b>Range of valid values:</b><br>
560 * Any value listed in {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700561 * <p>This key is available on all devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800562 *
563 * @see CaptureRequest#CONTROL_AE_MODE
564 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700565 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700566 public static final Key<int[]> CONTROL_AE_AVAILABLE_MODES =
567 new Key<int[]>("android.control.aeAvailableModes", int[].class);
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800568
569 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700570 * <p>List of frame rate ranges for {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} supported by
571 * this camera device.</p>
Yin-Chia Yeh58551622015-05-21 11:27:06 -0700572 * <p>For devices at the LEGACY level or above:</p>
573 * <ul>
Yin-Chia Yeh5fdf0a12015-11-20 15:39:36 -0800574 * <li>
575 * <p>For constant-framerate recording, for each normal
576 * {@link android.media.CamcorderProfile CamcorderProfile}, that is, a
Yin-Chia Yeh58551622015-05-21 11:27:06 -0700577 * {@link android.media.CamcorderProfile CamcorderProfile} that has
578 * {@link android.media.CamcorderProfile#quality quality} in
579 * the range [{@link android.media.CamcorderProfile#QUALITY_LOW QUALITY_LOW},
580 * {@link android.media.CamcorderProfile#QUALITY_2160P QUALITY_2160P}], if the profile is
581 * supported by the device and has
582 * {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} <code>x</code>, this list will
Yin-Chia Yeh5fdf0a12015-11-20 15:39:36 -0800583 * always include (<code>x</code>,<code>x</code>).</p>
584 * </li>
585 * <li>
586 * <p>Also, a camera device must either not support any
587 * {@link android.media.CamcorderProfile CamcorderProfile},
588 * or support at least one
589 * normal {@link android.media.CamcorderProfile CamcorderProfile} that has
590 * {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} <code>x</code> &gt;= 24.</p>
591 * </li>
Yin-Chia Yeh58551622015-05-21 11:27:06 -0700592 * </ul>
593 * <p>For devices at the LIMITED level or above:</p>
594 * <ul>
595 * <li>For YUV_420_888 burst capture use case, this list will always include (<code>min</code>, <code>max</code>)
596 * and (<code>max</code>, <code>max</code>) where <code>min</code> &lt;= 15 and <code>max</code> = the maximum output frame rate of the
597 * maximum YUV_420_888 output size.</li>
598 * </ul>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700599 * <p><b>Units</b>: Frames per second (FPS)</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700600 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700601 *
602 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800603 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700604 @PublicKey
Igor Murashkin78712a82014-05-27 18:32:18 -0700605 public static final Key<android.util.Range<Integer>[]> CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES =
606 new Key<android.util.Range<Integer>[]>("android.control.aeAvailableTargetFpsRanges", new TypeReference<android.util.Range<Integer>[]>() {{ }});
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800607
608 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700609 * <p>Maximum and minimum exposure compensation values for
610 * {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}, in counts of {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep},
611 * that are supported by this camera device.</p>
612 * <p><b>Range of valid values:</b><br></p>
Zhijun Hef1745ce2015-02-04 13:55:14 -0800613 * <p>Range [0,0] indicates that exposure compensation is not supported.</p>
614 * <p>For LIMITED and FULL devices, range must follow below requirements if exposure
615 * compensation is supported (<code>range != [0, 0]</code>):</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700616 * <p><code>Min.exposure compensation * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} &lt;= -2 EV</code></p>
617 * <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 -0800618 * <p>LEGACY devices may support a smaller range than this.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700619 * <p>This key is available on all devices.</p>
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -0800620 *
621 * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700622 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800623 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700624 @PublicKey
Igor Murashkin78712a82014-05-27 18:32:18 -0700625 public static final Key<android.util.Range<Integer>> CONTROL_AE_COMPENSATION_RANGE =
626 new Key<android.util.Range<Integer>>("android.control.aeCompensationRange", new TypeReference<android.util.Range<Integer>>() {{ }});
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800627
628 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700629 * <p>Smallest step by which the exposure compensation
630 * can be changed.</p>
631 * <p>This is the unit for {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}. For example, if this key has
632 * 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
633 * that the target EV offset for the auto-exposure routine is -1 EV.</p>
634 * <p>One unit of EV compensation changes the brightness of the captured image by a factor
635 * of two. +1 EV doubles the image brightness, while -1 EV halves the image brightness.</p>
636 * <p><b>Units</b>: Exposure Value (EV)</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700637 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700638 *
639 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800640 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700641 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700642 public static final Key<Rational> CONTROL_AE_COMPENSATION_STEP =
643 new Key<Rational>("android.control.aeCompensationStep", Rational.class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800644
645 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700646 * <p>List of auto-focus (AF) modes for {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} that are
647 * supported by this camera device.</p>
Zhijun He78146ec2014-01-14 18:12:13 -0800648 * <p>Not all the auto-focus modes may be supported by a
649 * given camera device. This entry lists the valid modes for
650 * {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} for this camera device.</p>
Ruben Brunk6f387092014-09-22 16:13:54 -0700651 * <p>All LIMITED and FULL mode camera devices will support OFF mode, and all
652 * camera devices with adjustable focuser units
653 * (<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 -0700654 * <p>LEGACY devices will support OFF mode only if they support
655 * focusing to infinity (by also setting {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} to
656 * <code>0.0f</code>).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700657 * <p><b>Range of valid values:</b><br>
658 * Any value listed in {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700659 * <p>This key is available on all devices.</p>
Zhijun He78146ec2014-01-14 18:12:13 -0800660 *
661 * @see CaptureRequest#CONTROL_AF_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700662 * @see CaptureRequest#LENS_FOCUS_DISTANCE
Zhijun He78146ec2014-01-14 18:12:13 -0800663 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800664 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700665 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700666 public static final Key<int[]> CONTROL_AF_AVAILABLE_MODES =
667 new Key<int[]>("android.control.afAvailableModes", int[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800668
669 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700670 * <p>List of color effects for {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode} that are supported by this camera
671 * device.</p>
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -0800672 * <p>This list contains the color effect modes that can be applied to
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700673 * images produced by the camera device.
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -0800674 * Implementations are not expected to be consistent across all devices.
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700675 * If no color effect modes are available for a device, this will only list
676 * OFF.</p>
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -0800677 * <p>A color effect will only be applied if
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700678 * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF. OFF is always included in this list.</p>
679 * <p>This control has no effect on the operation of other control routines such
680 * as auto-exposure, white balance, or focus.</p>
681 * <p><b>Range of valid values:</b><br>
682 * Any value listed in {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700683 * <p>This key is available on all devices.</p>
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -0800684 *
685 * @see CaptureRequest#CONTROL_EFFECT_MODE
686 * @see CaptureRequest#CONTROL_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700687 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700688 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700689 public static final Key<int[]> CONTROL_AVAILABLE_EFFECTS =
690 new Key<int[]>("android.control.availableEffects", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700691
692 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700693 * <p>List of scene modes for {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} that are supported by this camera
694 * device.</p>
Ruben Brunk8237d342014-01-17 15:33:02 -0800695 * <p>This list contains scene modes that can be set for the camera device.
696 * Only scene modes that have been fully implemented for the
697 * camera device may be included here. Implementations are not expected
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700698 * to be consistent across all devices.</p>
699 * <p>If no scene modes are supported by the camera device, this
700 * will be set to DISABLED. Otherwise DISABLED will not be listed.</p>
701 * <p>FACE_PRIORITY is always listed if face detection is
702 * supported (i.e.<code>{@link CameraCharacteristics#STATISTICS_INFO_MAX_FACE_COUNT android.statistics.info.maxFaceCount} &gt;
703 * 0</code>).</p>
704 * <p><b>Range of valid values:</b><br>
705 * Any value listed in {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700706 * <p>This key is available on all devices.</p>
Ruben Brunk8237d342014-01-17 15:33:02 -0800707 *
708 * @see CaptureRequest#CONTROL_SCENE_MODE
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700709 * @see CameraCharacteristics#STATISTICS_INFO_MAX_FACE_COUNT
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700710 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700711 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700712 public static final Key<int[]> CONTROL_AVAILABLE_SCENE_MODES =
713 new Key<int[]>("android.control.availableSceneModes", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700714
715 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700716 * <p>List of video stabilization modes for {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}
717 * that are supported by this camera device.</p>
718 * <p>OFF will always be listed.</p>
719 * <p><b>Range of valid values:</b><br>
720 * Any value listed in {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700721 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700722 *
723 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700724 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700725 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700726 public static final Key<int[]> CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES =
727 new Key<int[]>("android.control.availableVideoStabilizationModes", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700728
729 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700730 * <p>List of auto-white-balance modes for {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} that are supported by this
731 * camera device.</p>
Zhijun He399f05d2014-01-15 11:31:30 -0800732 * <p>Not all the auto-white-balance modes may be supported by a
733 * given camera device. This entry lists the valid modes for
734 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} for this camera device.</p>
735 * <p>All camera devices will support ON mode.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700736 * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always support OFF
737 * mode, which enables application control of white balance, by using
738 * {@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
739 * mode camera devices.</p>
740 * <p><b>Range of valid values:</b><br>
741 * Any value listed in {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700742 * <p>This key is available on all devices.</p>
Zhijun He399f05d2014-01-15 11:31:30 -0800743 *
Zhijun He399f05d2014-01-15 11:31:30 -0800744 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -0800745 * @see CaptureRequest#COLOR_CORRECTION_MODE
746 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
747 * @see CaptureRequest#CONTROL_AWB_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700748 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700749 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700750 public static final Key<int[]> CONTROL_AWB_AVAILABLE_MODES =
751 new Key<int[]>("android.control.awbAvailableModes", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700752
753 /**
Ruben Brunk90bc34e2014-02-03 17:54:24 -0800754 * <p>List of the maximum number of regions that can be used for metering in
755 * auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF);
756 * this corresponds to the the maximum number of elements in
757 * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}, {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions},
758 * and {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700759 * <p><b>Range of valid values:</b><br></p>
760 * <p>Value must be &gt;= 0 for each element. For full-capability devices
761 * this value must be &gt;= 1 for AE and AF. The order of the elements is:
762 * <code>(AE, AWB, AF)</code>.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700763 * <p>This key is available on all devices.</p>
Ruben Brunk90bc34e2014-02-03 17:54:24 -0800764 *
765 * @see CaptureRequest#CONTROL_AE_REGIONS
766 * @see CaptureRequest#CONTROL_AF_REGIONS
767 * @see CaptureRequest#CONTROL_AWB_REGIONS
Igor Murashkin78712a82014-05-27 18:32:18 -0700768 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700769 */
Ruben Brunk90bc34e2014-02-03 17:54:24 -0800770 public static final Key<int[]> CONTROL_MAX_REGIONS =
771 new Key<int[]>("android.control.maxRegions", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700772
773 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700774 * <p>The maximum number of metering regions that can be used by the auto-exposure (AE)
775 * routine.</p>
776 * <p>This corresponds to the the maximum allowed number of elements in
Igor Murashkin78712a82014-05-27 18:32:18 -0700777 * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700778 * <p><b>Range of valid values:</b><br>
779 * Value will be &gt;= 0. For FULL-capability devices, this
780 * value will be &gt;= 1.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700781 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -0700782 *
783 * @see CaptureRequest#CONTROL_AE_REGIONS
784 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700785 @PublicKey
786 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -0700787 public static final Key<Integer> CONTROL_MAX_REGIONS_AE =
788 new Key<Integer>("android.control.maxRegionsAe", int.class);
789
790 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700791 * <p>The maximum number of metering regions that can be used by the auto-white balance (AWB)
792 * routine.</p>
793 * <p>This corresponds to the the maximum allowed number of elements in
Igor Murashkin78712a82014-05-27 18:32:18 -0700794 * {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700795 * <p><b>Range of valid values:</b><br>
796 * Value will be &gt;= 0.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700797 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -0700798 *
799 * @see CaptureRequest#CONTROL_AWB_REGIONS
800 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700801 @PublicKey
802 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -0700803 public static final Key<Integer> CONTROL_MAX_REGIONS_AWB =
804 new Key<Integer>("android.control.maxRegionsAwb", int.class);
805
806 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700807 * <p>The maximum number of metering regions that can be used by the auto-focus (AF) routine.</p>
808 * <p>This corresponds to the the maximum allowed number of elements in
Igor Murashkin78712a82014-05-27 18:32:18 -0700809 * {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700810 * <p><b>Range of valid values:</b><br>
811 * Value will be &gt;= 0. For FULL-capability devices, this
812 * value will be &gt;= 1.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700813 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -0700814 *
815 * @see CaptureRequest#CONTROL_AF_REGIONS
816 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700817 @PublicKey
818 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -0700819 public static final Key<Integer> CONTROL_MAX_REGIONS_AF =
820 new Key<Integer>("android.control.maxRegionsAf", int.class);
821
822 /**
Zhijun Hefab663e2015-05-26 19:46:31 -0700823 * <p>List of available high speed video size, fps range and max batch size configurations
824 * 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 -0700825 * <p>When CONSTRAINED_HIGH_SPEED_VIDEO is supported in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities},
Zhijun Hefab663e2015-05-26 19:46:31 -0700826 * this metadata will list the supported high speed video size, fps range and max batch size
827 * configurations. All the sizes listed in this configuration will be a subset of the sizes
828 * reported by {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes }
829 * for processed non-stalling formats.</p>
830 * <p>For the high speed video use case, the application must
Zhijun Hee0404182014-06-26 13:17:09 -0700831 * select the video size and fps range from this metadata to configure the recording and
832 * preview streams and setup the recording requests. For example, if the application intends
833 * to do high speed recording, it can select the maximum size reported by this metadata to
834 * configure output streams. Once the size is selected, application can filter this metadata
835 * 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 -0700836 * recording requests. Note that for the use case of multiple output streams, application
Zhijun Hefab663e2015-05-26 19:46:31 -0700837 * must select one unique size from this metadata to use (e.g., preview and recording streams
838 * must have the same size). Otherwise, the high speed capture session creation will fail.</p>
839 * <p>The min and max fps will be multiple times of 30fps.</p>
840 * <p>High speed video streaming extends significant performance pressue to camera hardware,
841 * to achieve efficient high speed streaming, the camera device may have to aggregate
842 * multiple frames together and send to camera device for processing where the request
843 * controls are same for all the frames in this batch. Max batch size indicates
844 * the max possible number of frames the camera device will group together for this high
845 * speed stream configuration. This max batch size will be used to generate a high speed
846 * recording request list by
Eino-Ville Talvala639fffe2015-06-30 10:34:48 -0700847 * {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList }.
Zhijun Hefab663e2015-05-26 19:46:31 -0700848 * The max batch size for each configuration will satisfy below conditions:</p>
849 * <ul>
850 * <li>Each max batch size will be a divisor of its corresponding fps_max / 30. For example,
851 * if max_fps is 300, max batch size will only be 1, 2, 5, or 10.</li>
852 * <li>The camera device may choose smaller internal batch size for each configuration, but
853 * the actual batch size will be a divisor of max batch size. For example, if the max batch
854 * size is 8, the actual batch size used by camera device will only be 1, 2, 4, or 8.</li>
855 * <li>The max batch size in each configuration entry must be no larger than 32.</li>
856 * </ul>
857 * <p>The camera device doesn't have to support batch mode to achieve high speed video recording,
858 * in such case, batch_size_max will be reported as 1 in each configuration entry.</p>
859 * <p>This fps ranges in this configuration list can only be used to create requests
860 * that are submitted to a high speed camera capture session created by
861 * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }.
862 * The fps ranges reported in this metadata must not be used to setup capture requests for
863 * normal capture session, or it will cause request error.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700864 * <p><b>Range of valid values:</b><br></p>
Zhijun Hefab663e2015-05-26 19:46:31 -0700865 * <p>For each configuration, the fps_max &gt;= 120fps.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700866 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
867 * <p><b>Limited capability</b> -
868 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
869 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun Hee0404182014-06-26 13:17:09 -0700870 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700871 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He3c1ff682015-06-23 09:21:43 -0700872 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Zhijun Hee0404182014-06-26 13:17:09 -0700873 * @hide
874 */
Yin-Chia Yeh12da1402014-07-15 10:37:31 -0700875 public static final Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]> CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS =
876 new Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]>("android.control.availableHighSpeedVideoConfigurations", android.hardware.camera2.params.HighSpeedVideoConfiguration[].class);
Zhijun Hee0404182014-06-26 13:17:09 -0700877
878 /**
Yin-Chia Yehdc0ba092015-02-20 15:52:06 -0800879 * <p>Whether the camera device supports {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</p>
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700880 * <p>Devices with MANUAL_SENSOR capability or BURST_CAPTURE capability will always
881 * list <code>true</code>. This includes FULL devices.</p>
Yin-Chia Yehdc0ba092015-02-20 15:52:06 -0800882 * <p>This key is available on all devices.</p>
883 *
884 * @see CaptureRequest#CONTROL_AE_LOCK
885 */
886 @PublicKey
887 public static final Key<Boolean> CONTROL_AE_LOCK_AVAILABLE =
888 new Key<Boolean>("android.control.aeLockAvailable", boolean.class);
889
890 /**
891 * <p>Whether the camera device supports {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</p>
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700892 * <p>Devices with MANUAL_POST_PROCESSING capability or BURST_CAPTURE capability will
893 * always list <code>true</code>. This includes FULL devices.</p>
Yin-Chia Yehdc0ba092015-02-20 15:52:06 -0800894 * <p>This key is available on all devices.</p>
895 *
896 * @see CaptureRequest#CONTROL_AWB_LOCK
897 */
898 @PublicKey
899 public static final Key<Boolean> CONTROL_AWB_LOCK_AVAILABLE =
900 new Key<Boolean>("android.control.awbLockAvailable", boolean.class);
901
902 /**
903 * <p>List of control modes for {@link CaptureRequest#CONTROL_MODE android.control.mode} that are supported by this camera
904 * device.</p>
905 * <p>This list contains control modes that can be set for the camera device.
906 * LEGACY mode devices will always support AUTO mode. LIMITED and FULL
907 * devices will always support OFF, AUTO modes.</p>
908 * <p><b>Range of valid values:</b><br>
909 * Any value listed in {@link CaptureRequest#CONTROL_MODE android.control.mode}</p>
910 * <p>This key is available on all devices.</p>
911 *
912 * @see CaptureRequest#CONTROL_MODE
913 */
914 @PublicKey
915 public static final Key<int[]> CONTROL_AVAILABLE_MODES =
916 new Key<int[]>("android.control.availableModes", int[].class);
917
918 /**
Yin-Chia Yeh1ee1a0a2016-01-18 19:13:47 -0800919 * <p>Range of boosts for {@link CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST android.control.postRawSensitivityBoost} supported
920 * by this camera device.</p>
921 * <p>Devices support post RAW sensitivity boost will advertise
922 * {@link CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST android.control.postRawSensitivityBoost} key for controling
923 * post RAW sensitivity boost.</p>
924 * <p>This key will be <code>null</code> for devices that do not support any RAW format
925 * outputs. For devices that do support RAW format outputs, this key will always
926 * present, and if a device does not support post RAW sensitivity boost, it will
927 * list <code>(100, 100)</code> in this key.</p>
928 * <p><b>Units</b>: ISO arithmetic units, the same as {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</p>
929 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
930 *
931 * @see CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST
932 * @see CaptureRequest#SENSOR_SENSITIVITY
933 */
934 @PublicKey
935 public static final Key<android.util.Range<Integer>> CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE =
936 new Key<android.util.Range<Integer>>("android.control.postRawSensitivityBoostRange", new TypeReference<android.util.Range<Integer>>() {{ }});
937
938 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700939 * <p>List of edge enhancement modes for {@link CaptureRequest#EDGE_MODE android.edge.mode} that are supported by this camera
940 * device.</p>
Chien-Yu Chen72333912015-07-08 11:55:19 -0700941 * <p>Full-capability camera devices must always support OFF; camera devices that support
942 * YUV_REPROCESSING or PRIVATE_REPROCESSING will list ZERO_SHUTTER_LAG; all devices will
943 * list FAST.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700944 * <p><b>Range of valid values:</b><br>
945 * Any value listed in {@link CaptureRequest#EDGE_MODE android.edge.mode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700946 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
947 * <p><b>Full capability</b> -
948 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
949 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -0800950 *
951 * @see CaptureRequest#EDGE_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700952 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk6dc379c2014-03-04 15:04:00 -0800953 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700954 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700955 public static final Key<int[]> EDGE_AVAILABLE_EDGE_MODES =
956 new Key<int[]>("android.edge.availableEdgeModes", int[].class);
Ruben Brunk6dc379c2014-03-04 15:04:00 -0800957
958 /**
Zhijun Heca1b73a2014-02-03 12:39:53 -0800959 * <p>Whether this camera device has a
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700960 * flash unit.</p>
961 * <p>Will be <code>false</code> if no flash is available.</p>
962 * <p>If there is no flash unit, none of the flash controls do
963 * anything.
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700964 * This key is available on all devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700965 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700966 @PublicKey
Zhijun Heca1b73a2014-02-03 12:39:53 -0800967 public static final Key<Boolean> FLASH_INFO_AVAILABLE =
968 new Key<Boolean>("android.flash.info.available", boolean.class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700969
970 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700971 * <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 -0800972 * camera device.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -0800973 * <p>FULL mode camera devices will always support FAST.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700974 * <p><b>Range of valid values:</b><br>
975 * Any value listed in {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700976 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -0800977 *
978 * @see CaptureRequest#HOT_PIXEL_MODE
979 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700980 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700981 public static final Key<int[]> HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES =
982 new Key<int[]>("android.hotPixel.availableHotPixelModes", int[].class);
Ruben Brunk9d454fd2014-03-04 14:11:52 -0800983
984 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700985 * <p>List of JPEG thumbnail sizes for {@link CaptureRequest#JPEG_THUMBNAIL_SIZE android.jpeg.thumbnailSize} supported by this
986 * camera device.</p>
987 * <p>This list will include at least one non-zero resolution, plus <code>(0,0)</code> for indicating no
988 * thumbnail should be generated.</p>
Zhijun He5f2a47f2014-01-16 15:44:41 -0800989 * <p>Below condiditions will be satisfied for this size list:</p>
Zhijun He5a9ff372013-12-26 11:49:09 -0800990 * <ul>
Zhijun He5f2a47f2014-01-16 15:44:41 -0800991 * <li>The sizes will be sorted by increasing pixel area (width x height).
992 * If several resolutions have the same area, they will be sorted by increasing width.</li>
993 * <li>The aspect ratio of the largest thumbnail size will be same as the
Igor Murashkin9c595172014-05-12 13:56:20 -0700994 * aspect ratio of largest JPEG output size in android.scaler.availableStreamConfigurations.
Zhijun He5a9ff372013-12-26 11:49:09 -0800995 * The largest size is defined as the size that has the largest pixel area
996 * in a given size list.</li>
Igor Murashkin9c595172014-05-12 13:56:20 -0700997 * <li>Each output JPEG size in android.scaler.availableStreamConfigurations will have at least
Zhijun He5a9ff372013-12-26 11:49:09 -0800998 * one corresponding size that has the same aspect ratio in availableThumbnailSizes,
999 * and vice versa.</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001000 * <li>All non-<code>(0, 0)</code> sizes will have non-zero widths and heights.
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001001 * This key is available on all devices.</li>
Zhijun He5a9ff372013-12-26 11:49:09 -08001002 * </ul>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001003 *
1004 * @see CaptureRequest#JPEG_THUMBNAIL_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001005 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001006 @PublicKey
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07001007 public static final Key<android.util.Size[]> JPEG_AVAILABLE_THUMBNAIL_SIZES =
1008 new Key<android.util.Size[]>("android.jpeg.availableThumbnailSizes", android.util.Size[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001009
1010 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001011 * <p>List of aperture size values for {@link CaptureRequest#LENS_APERTURE android.lens.aperture} that are
1012 * supported by this camera device.</p>
1013 * <p>If the camera device doesn't support a variable lens aperture,
1014 * this list will contain only one value, which is the fixed aperture size.</p>
1015 * <p>If the camera device supports a variable aperture, the aperture values
Zhijun Hefb46c642014-01-14 17:57:23 -08001016 * in this list will be sorted in ascending order.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001017 * <p><b>Units</b>: The aperture f-number</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001018 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1019 * <p><b>Full capability</b> -
1020 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1021 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1022 *
1023 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001024 * @see CaptureRequest#LENS_APERTURE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001025 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001026 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001027 public static final Key<float[]> LENS_INFO_AVAILABLE_APERTURES =
1028 new Key<float[]>("android.lens.info.availableApertures", float[].class);
1029
1030 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001031 * <p>List of neutral density filter values for
1032 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} that are supported by this camera device.</p>
1033 * <p>If a neutral density filter is not supported by this camera device,
1034 * this list will contain only 0. Otherwise, this list will include every
1035 * filter density supported by the camera device, in ascending order.</p>
1036 * <p><b>Units</b>: Exposure value (EV)</p>
1037 * <p><b>Range of valid values:</b><br></p>
1038 * <p>Values are &gt;= 0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001039 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1040 * <p><b>Full capability</b> -
1041 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1042 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk855bae42014-01-17 10:30:32 -08001043 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001044 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk855bae42014-01-17 10:30:32 -08001045 * @see CaptureRequest#LENS_FILTER_DENSITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001046 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001047 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001048 public static final Key<float[]> LENS_INFO_AVAILABLE_FILTER_DENSITIES =
1049 new Key<float[]>("android.lens.info.availableFilterDensities", float[].class);
1050
1051 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001052 * <p>List of focal lengths for {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength} that are supported by this camera
1053 * device.</p>
1054 * <p>If optical zoom is not supported, this list will only contain
1055 * a single value corresponding to the fixed focal length of the
1056 * device. Otherwise, this list will include every focal length supported
1057 * by the camera device, in ascending order.</p>
1058 * <p><b>Units</b>: Millimeters</p>
1059 * <p><b>Range of valid values:</b><br></p>
1060 * <p>Values are &gt; 0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001061 * <p>This key is available on all devices.</p>
Ruben Brunka20f4c22014-01-17 15:21:13 -08001062 *
1063 * @see CaptureRequest#LENS_FOCAL_LENGTH
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001064 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001065 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001066 public static final Key<float[]> LENS_INFO_AVAILABLE_FOCAL_LENGTHS =
1067 new Key<float[]>("android.lens.info.availableFocalLengths", float[].class);
1068
1069 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001070 * <p>List of optical image stabilization (OIS) modes for
1071 * {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} that are supported by this camera device.</p>
1072 * <p>If OIS is not supported by a given camera device, this list will
Ruben Brunk00849b32014-01-17 18:30:23 -08001073 * contain only OFF.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001074 * <p><b>Range of valid values:</b><br>
1075 * Any value listed in {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001076 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1077 * <p><b>Limited capability</b> -
1078 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1079 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk00849b32014-01-17 18:30:23 -08001080 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001081 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk00849b32014-01-17 18:30:23 -08001082 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001083 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001084 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07001085 public static final Key<int[]> LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION =
1086 new Key<int[]>("android.lens.info.availableOpticalStabilization", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001087
1088 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001089 * <p>Hyperfocal distance for this lens.</p>
Zhijun Heff413932014-02-07 15:44:30 -08001090 * <p>If the lens is not fixed focus, the camera device will report this
1091 * 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 -07001092 * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p>
1093 * <p><b>Range of valid values:</b><br>
1094 * If lens is fixed focus, &gt;= 0. If lens has focuser unit, the value is
1095 * within <code>(0.0f, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code></p>
1096 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1097 * <p><b>Limited capability</b> -
1098 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1099 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1100 *
1101 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1102 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
1103 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
1104 */
1105 @PublicKey
1106 public static final Key<Float> LENS_INFO_HYPERFOCAL_DISTANCE =
1107 new Key<Float>("android.lens.info.hyperfocalDistance", float.class);
1108
1109 /**
1110 * <p>Shortest distance from frontmost surface
1111 * of the lens that can be brought into sharp focus.</p>
1112 * <p>If the lens is fixed-focus, this will be
1113 * 0.</p>
1114 * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p>
1115 * <p><b>Range of valid values:</b><br>
1116 * &gt;= 0</p>
Zhijun Heff413932014-02-07 15:44:30 -08001117 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001118 * <p><b>Limited capability</b> -
1119 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1120 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun Heff413932014-02-07 15:44:30 -08001121 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001122 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun Heff413932014-02-07 15:44:30 -08001123 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001124 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001125 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001126 public static final Key<Float> LENS_INFO_MINIMUM_FOCUS_DISTANCE =
1127 new Key<Float>("android.lens.info.minimumFocusDistance", float.class);
1128
1129 /**
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08001130 * <p>Dimensions of lens shading map.</p>
1131 * <p>The map should be on the order of 30-40 rows and columns, and
1132 * must be smaller than 64x64.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001133 * <p><b>Range of valid values:</b><br>
1134 * Both values &gt;= 1</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001135 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1136 * <p><b>Full capability</b> -
1137 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1138 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1139 *
1140 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk57493682014-05-27 18:58:08 -07001141 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001142 */
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07001143 public static final Key<android.util.Size> LENS_INFO_SHADING_MAP_SIZE =
1144 new Key<android.util.Size>("android.lens.info.shadingMapSize", android.util.Size.class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001145
1146 /**
Zhijun Heff413932014-02-07 15:44:30 -08001147 * <p>The lens focus distance calibration quality.</p>
1148 * <p>The lens focus distance calibration quality determines the reliability of
1149 * focus related metadata entries, i.e. {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
1150 * {@link CaptureResult#LENS_FOCUS_RANGE android.lens.focusRange}, {@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}, and
1151 * {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001152 * <p>APPROXIMATE and CALIBRATED devices report the focus metadata in
1153 * units of diopters (1/meter), so <code>0.0f</code> represents focusing at infinity,
1154 * and increasing positive numbers represent focusing closer and closer
1155 * to the camera device. The focus distance control also uses diopters
1156 * on these devices.</p>
1157 * <p>UNCALIBRATED devices do not use units that are directly comparable
1158 * to any real physical measurement, but <code>0.0f</code> still represents farthest
1159 * focus, and {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} represents the
1160 * nearest focus the device can achieve.</p>
1161 * <p><b>Possible values:</b>
1162 * <ul>
1163 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED UNCALIBRATED}</li>
1164 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE APPROXIMATE}</li>
1165 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED CALIBRATED}</li>
1166 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001167 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1168 * <p><b>Limited capability</b> -
1169 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1170 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun Heff413932014-02-07 15:44:30 -08001171 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001172 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun Heff413932014-02-07 15:44:30 -08001173 * @see CaptureRequest#LENS_FOCUS_DISTANCE
1174 * @see CaptureResult#LENS_FOCUS_RANGE
1175 * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE
1176 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
1177 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED
1178 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE
1179 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED
1180 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001181 @PublicKey
Zhijun Heff413932014-02-07 15:44:30 -08001182 public static final Key<Integer> LENS_INFO_FOCUS_DISTANCE_CALIBRATION =
1183 new Key<Integer>("android.lens.info.focusDistanceCalibration", int.class);
1184
1185 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001186 * <p>Direction the camera faces relative to
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001187 * device screen.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001188 * <p><b>Possible values:</b>
1189 * <ul>
1190 * <li>{@link #LENS_FACING_FRONT FRONT}</li>
1191 * <li>{@link #LENS_FACING_BACK BACK}</li>
Zhijun He503e8152015-01-12 15:16:56 -08001192 * <li>{@link #LENS_FACING_EXTERNAL EXTERNAL}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001193 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001194 * <p>This key is available on all devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001195 * @see #LENS_FACING_FRONT
1196 * @see #LENS_FACING_BACK
Zhijun He503e8152015-01-12 15:16:56 -08001197 * @see #LENS_FACING_EXTERNAL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001198 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001199 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001200 public static final Key<Integer> LENS_FACING =
1201 new Key<Integer>("android.lens.facing", int.class);
1202
1203 /**
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001204 * <p>The orientation of the camera relative to the sensor
1205 * coordinate system.</p>
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07001206 * <p>The four coefficients that describe the quaternion
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001207 * rotation from the Android sensor coordinate system to a
1208 * camera-aligned coordinate system where the X-axis is
1209 * aligned with the long side of the image sensor, the Y-axis
1210 * is aligned with the short side of the image sensor, and
1211 * the Z-axis is aligned with the optical axis of the sensor.</p>
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07001212 * <p>To convert from the quaternion coefficients <code>(x,y,z,w)</code>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001213 * to the axis of rotation <code>(a_x, a_y, a_z)</code> and rotation
1214 * amount <code>theta</code>, the following formulas can be used:</p>
1215 * <pre><code> theta = 2 * acos(w)
1216 * a_x = x / sin(theta/2)
1217 * a_y = y / sin(theta/2)
1218 * a_z = z / sin(theta/2)
1219 * </code></pre>
1220 * <p>To create a 3x3 rotation matrix that applies the rotation
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07001221 * defined by this quaternion, the following matrix can be
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001222 * used:</p>
1223 * <pre><code>R = [ 1 - 2y^2 - 2z^2, 2xy - 2zw, 2xz + 2yw,
1224 * 2xy + 2zw, 1 - 2x^2 - 2z^2, 2yz - 2xw,
1225 * 2xz - 2yw, 2yz + 2xw, 1 - 2x^2 - 2y^2 ]
1226 * </code></pre>
1227 * <p>This matrix can then be used to apply the rotation to a
1228 * column vector point with</p>
1229 * <p><code>p' = Rp</code></p>
1230 * <p>where <code>p</code> is in the device sensor coordinate system, and
1231 * <code>p'</code> is in the camera-oriented coordinate system.</p>
1232 * <p><b>Units</b>:
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07001233 * Quaternion coefficients</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001234 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1235 */
1236 @PublicKey
1237 public static final Key<float[]> LENS_POSE_ROTATION =
1238 new Key<float[]>("android.lens.poseRotation", float[].class);
1239
1240 /**
1241 * <p>Position of the camera optical center.</p>
Eino-Ville Talvalad3dbfb32015-05-29 17:17:04 -07001242 * <p>The position of the camera device's lens optical center,
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001243 * as a three-dimensional vector <code>(x,y,z)</code>.</p>
1244 * <p>Prior to Android P, or when {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is PRIMARY_CAMERA, this position
1245 * is relative to the optical center of the largest camera device facing in the same
1246 * direction as this camera, in the {@link android.hardware.SensorEvent Android sensor
1247 * coordinate axes}. Note that only the axis definitions are shared with the sensor
1248 * coordinate system, but not the origin.</p>
1249 * <p>If this device is the largest or only camera device with a given facing, then this
1250 * position will be <code>(0, 0, 0)</code>; a camera device with a lens optical center located 3 cm
1251 * from the main sensor along the +X axis (to the right from the user's perspective) will
1252 * report <code>(0.03, 0, 0)</code>.</p>
1253 * <p>To transform a pixel coordinates between two cameras facing the same direction, first
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001254 * 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 -08001255 * camera {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} needs to be applied, followed by the
1256 * {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the source camera, the translation of the source camera
1257 * relative to the destination camera, the {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the destination
1258 * camera, and finally the inverse of {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} of the destination
1259 * camera. This obtains a radial-distortion-free coordinate in the destination camera pixel
1260 * coordinates.</p>
1261 * <p>To compare this against a real image from the destination camera, the destination camera
1262 * image then needs to be corrected for radial distortion before comparison or sampling.</p>
1263 * <p>When {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is GYROSCOPE, then this position is relative to
1264 * the center of the primary gyroscope on the device.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001265 * <p><b>Units</b>: Meters</p>
1266 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1267 *
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001268 * @see CameraCharacteristics#LENS_DISTORTION
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07001269 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001270 * @see CameraCharacteristics#LENS_POSE_REFERENCE
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001271 * @see CameraCharacteristics#LENS_POSE_ROTATION
1272 */
1273 @PublicKey
1274 public static final Key<float[]> LENS_POSE_TRANSLATION =
1275 new Key<float[]>("android.lens.poseTranslation", float[].class);
1276
1277 /**
1278 * <p>The parameters for this camera device's intrinsic
1279 * calibration.</p>
1280 * <p>The five calibration parameters that describe the
1281 * transform from camera-centric 3D coordinates to sensor
1282 * pixel coordinates:</p>
1283 * <pre><code>[f_x, f_y, c_x, c_y, s]
1284 * </code></pre>
1285 * <p>Where <code>f_x</code> and <code>f_y</code> are the horizontal and vertical
1286 * focal lengths, <code>[c_x, c_y]</code> is the position of the optical
1287 * axis, and <code>s</code> is a skew parameter for the sensor plane not
1288 * being aligned with the lens plane.</p>
1289 * <p>These are typically used within a transformation matrix K:</p>
1290 * <pre><code>K = [ f_x, s, c_x,
1291 * 0, f_y, c_y,
1292 * 0 0, 1 ]
1293 * </code></pre>
1294 * <p>which can then be combined with the camera pose rotation
1295 * <code>R</code> and translation <code>t</code> ({@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} and
1296 * {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}, respective) to calculate the
1297 * complete transform from world coordinates to pixel
1298 * coordinates:</p>
1299 * <pre><code>P = [ K 0 * [ R t
1300 * 0 1 ] 0 1 ]
1301 * </code></pre>
1302 * <p>and with <code>p_w</code> being a point in the world coordinate system
1303 * and <code>p_s</code> being a point in the camera active pixel array
1304 * coordinate system, and with the mapping including the
1305 * homogeneous division by z:</p>
1306 * <pre><code> p_h = (x_h, y_h, z_h) = P p_w
1307 * p_s = p_h / z_h
1308 * </code></pre>
1309 * <p>so <code>[x_s, y_s]</code> is the pixel coordinates of the world
1310 * point, <code>z_s = 1</code>, and <code>w_s</code> is a measurement of disparity
1311 * (depth) in pixel coordinates.</p>
Eino-Ville Talvalab8bd8ab2015-06-16 11:44:10 -07001312 * <p>Note that the coordinate system for this transform is the
1313 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} system,
1314 * where <code>(0,0)</code> is the top-left of the
1315 * preCorrectionActiveArraySize rectangle. Once the pose and
1316 * intrinsic calibration transforms have been applied to a
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001317 * world point, then the {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}
Eino-Ville Talvalab8bd8ab2015-06-16 11:44:10 -07001318 * transform needs to be applied, and the result adjusted to
1319 * be in the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} coordinate
1320 * system (where <code>(0, 0)</code> is the top-left of the
1321 * activeArraySize rectangle), to determine the final pixel
1322 * coordinate of the world point for processed (non-RAW)
1323 * output buffers.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001324 * <p><b>Units</b>:
Eino-Ville Talvalab8bd8ab2015-06-16 11:44:10 -07001325 * Pixels in the
1326 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}
1327 * coordinate system.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001328 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1329 *
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001330 * @see CameraCharacteristics#LENS_DISTORTION
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001331 * @see CameraCharacteristics#LENS_POSE_ROTATION
1332 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -07001333 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Eino-Ville Talvalab8bd8ab2015-06-16 11:44:10 -07001334 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001335 */
1336 @PublicKey
1337 public static final Key<float[]> LENS_INTRINSIC_CALIBRATION =
1338 new Key<float[]>("android.lens.intrinsicCalibration", float[].class);
1339
1340 /**
1341 * <p>The correction coefficients to correct for this camera device's
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07001342 * radial and tangential lens distortion.</p>
Ruben Brunk02cd8cb2015-06-15 15:33:09 -07001343 * <p>Four radial distortion coefficients <code>[kappa_0, kappa_1, kappa_2,
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07001344 * kappa_3]</code> and two tangential distortion coefficients
1345 * <code>[kappa_4, kappa_5]</code> that can be used to correct the
1346 * lens's geometric distortion with the mapping equations:</p>
Ruben Brunk02cd8cb2015-06-15 15:33:09 -07001347 * <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 -07001348 * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
Ruben Brunk02cd8cb2015-06-15 15:33:09 -07001349 * 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 -07001350 * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001351 * </code></pre>
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07001352 * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the
1353 * input image that correspond to the pixel values in the
1354 * corrected image at the coordinate <code>[x_i, y_i]</code>:</p>
1355 * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
1356 * </code></pre>
1357 * <p>The pixel coordinates are defined in a normalized
1358 * coordinate system related to the
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07001359 * {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} calibration fields.
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07001360 * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code> have <code>(0,0)</code> at the
1361 * lens optical center <code>[c_x, c_y]</code>. The maximum magnitudes
1362 * of both x and y coordinates are normalized to be 1 at the
1363 * edge further from the optical center, so the range
1364 * for both dimensions is <code>-1 &lt;= x &lt;= 1</code>.</p>
1365 * <p>Finally, <code>r</code> represents the radial distance from the
1366 * optical center, <code>r^2 = x_i^2 + y_i^2</code>, and its magnitude
1367 * is therefore no larger than <code>|r| &lt;= sqrt(2)</code>.</p>
1368 * <p>The distortion model used is the Brown-Conrady model.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001369 * <p><b>Units</b>:
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07001370 * Unitless coefficients.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001371 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07001372 *
1373 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001374 * @deprecated
1375 * <p>This field was inconsistently defined in terms of its
1376 * normalization. Use {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} instead.</p>
1377 *
1378 * @see CameraCharacteristics#LENS_DISTORTION
1379
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001380 */
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001381 @Deprecated
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00001382 @PublicKey
1383 public static final Key<float[]> LENS_RADIAL_DISTORTION =
1384 new Key<float[]>("android.lens.radialDistortion", float[].class);
1385
1386 /**
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001387 * <p>The origin for {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}.</p>
1388 * <p>Different calibration methods and use cases can produce better or worse results
1389 * depending on the selected coordinate origin.</p>
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001390 * <p><b>Possible values:</b>
1391 * <ul>
1392 * <li>{@link #LENS_POSE_REFERENCE_PRIMARY_CAMERA PRIMARY_CAMERA}</li>
1393 * <li>{@link #LENS_POSE_REFERENCE_GYROSCOPE GYROSCOPE}</li>
1394 * </ul></p>
1395 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1396 *
1397 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
1398 * @see #LENS_POSE_REFERENCE_PRIMARY_CAMERA
1399 * @see #LENS_POSE_REFERENCE_GYROSCOPE
1400 */
1401 @PublicKey
1402 public static final Key<Integer> LENS_POSE_REFERENCE =
1403 new Key<Integer>("android.lens.poseReference", int.class);
1404
1405 /**
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001406 * <p>The correction coefficients to correct for this camera device's
1407 * radial and tangential lens distortion.</p>
1408 * <p>Replaces the deprecated {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion} field, which was
1409 * inconsistently defined.</p>
1410 * <p>Three radial distortion coefficients <code>[kappa_1, kappa_2,
1411 * kappa_3]</code> and two tangential distortion coefficients
1412 * <code>[kappa_4, kappa_5]</code> that can be used to correct the
1413 * lens's geometric distortion with the mapping equations:</p>
1414 * <pre><code> x_c = x_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
1415 * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
1416 * y_c = y_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
1417 * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
1418 * </code></pre>
1419 * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the
1420 * input image that correspond to the pixel values in the
1421 * corrected image at the coordinate <code>[x_i, y_i]</code>:</p>
1422 * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
1423 * </code></pre>
1424 * <p>The pixel coordinates are defined in a coordinate system
1425 * related to the {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}
1426 * calibration fields; see that entry for details of the mapping stages.
1427 * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code>
1428 * have <code>(0,0)</code> at the lens optical center <code>[c_x, c_y]</code>, and
1429 * the range of the coordinates depends on the focal length
1430 * terms of the intrinsic calibration.</p>
1431 * <p>Finally, <code>r</code> represents the radial distance from the
1432 * optical center, <code>r^2 = x_i^2 + y_i^2</code>.</p>
1433 * <p>The distortion model used is the Brown-Conrady model.</p>
1434 * <p><b>Units</b>:
1435 * Unitless coefficients.</p>
1436 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1437 *
1438 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
1439 * @see CameraCharacteristics#LENS_RADIAL_DISTORTION
1440 */
1441 @PublicKey
1442 public static final Key<float[]> LENS_DISTORTION =
1443 new Key<float[]>("android.lens.distortion", float[].class);
1444
1445 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001446 * <p>List of noise reduction modes for {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode} that are supported
1447 * by this camera device.</p>
1448 * <p>Full-capability camera devices will always support OFF and FAST.</p>
Chien-Yu Chen72333912015-07-08 11:55:19 -07001449 * <p>Camera devices that support YUV_REPROCESSING or PRIVATE_REPROCESSING will support
1450 * ZERO_SHUTTER_LAG.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001451 * <p>Legacy-capability camera devices will only support FAST mode.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001452 * <p><b>Range of valid values:</b><br>
1453 * Any value listed in {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001454 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1455 * <p><b>Limited capability</b> -
1456 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1457 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001458 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001459 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001460 * @see CaptureRequest#NOISE_REDUCTION_MODE
1461 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001462 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07001463 public static final Key<int[]> NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES =
1464 new Key<int[]>("android.noiseReduction.availableNoiseReductionModes", int[].class);
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001465
1466 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001467 * <p>If set to 1, the HAL will always split result
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001468 * metadata for a single capture into multiple buffers,
Igor Murashkinace5bf02013-12-10 17:36:40 -08001469 * returned using multiple process_capture_result calls.</p>
1470 * <p>Does not need to be listed in static
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001471 * metadata. Support for partial results will be reworked in
1472 * future versions of camera service. This quirk will stop
1473 * working at that point; DO NOT USE without careful
Igor Murashkinace5bf02013-12-10 17:36:40 -08001474 * consideration of future support.</p>
Igor Murashkin3242f4f2014-01-15 12:27:41 -08001475 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07001476 * @deprecated
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001477 * <p>Not used in HALv3 or newer; replaced by better partials mechanism</p>
1478
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001479 * @hide
1480 */
Igor Murashkin9c595172014-05-12 13:56:20 -07001481 @Deprecated
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001482 public static final Key<Byte> QUIRKS_USE_PARTIAL_RESULT =
1483 new Key<Byte>("android.quirks.usePartialResult", byte.class);
1484
1485 /**
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001486 * <p>The maximum numbers of different types of output streams
1487 * that can be configured and used simultaneously by a camera device.</p>
1488 * <p>This is a 3 element tuple that contains the max number of output simultaneous
Zhijun Hea4d0a8f2014-04-29 12:35:27 -07001489 * streams for raw sensor, processed (but not stalling), and processed (and stalling)
1490 * formats respectively. For example, assuming that JPEG is typically a processed and
1491 * stalling stream, if max raw sensor format output stream number is 1, max YUV streams
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001492 * number is 3, and max JPEG stream number is 2, then this tuple should be <code>(1, 3, 2)</code>.</p>
1493 * <p>This lists the upper bound of the number of output streams supported by
1494 * the camera device. Using more streams simultaneously may require more hardware and
Igor Murashkin78712a82014-05-27 18:32:18 -07001495 * CPU resources that will consume more power. The image format for an output stream can
Igor Murashkin9c595172014-05-12 13:56:20 -07001496 * be any supported format provided by android.scaler.availableStreamConfigurations.
1497 * The formats defined in android.scaler.availableStreamConfigurations can be catergorized
Zhijun Hea4d0a8f2014-04-29 12:35:27 -07001498 * into the 3 stream types as below:</p>
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001499 * <ul>
Zhijun Hea4d0a8f2014-04-29 12:35:27 -07001500 * <li>Processed (but stalling): any non-RAW format with a stallDurations &gt; 0.
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07001501 * Typically {@link android.graphics.ImageFormat#JPEG JPEG format}.</li>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08001502 * <li>Raw formats: {@link android.graphics.ImageFormat#RAW_SENSOR RAW_SENSOR}, {@link android.graphics.ImageFormat#RAW10 RAW10}, or
1503 * {@link android.graphics.ImageFormat#RAW12 RAW12}.</li>
1504 * <li>Processed (but not-stalling): any non-RAW format without a stall duration. Typically
1505 * {@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888},
1506 * {@link android.graphics.ImageFormat#NV21 NV21}, or {@link android.graphics.ImageFormat#YV12 YV12}.</li>
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001507 * </ul>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001508 * <p><b>Range of valid values:</b><br></p>
1509 * <p>For processed (and stalling) format streams, &gt;= 1.</p>
1510 * <p>For Raw format (either stalling or non-stalling) streams, &gt;= 0.</p>
1511 * <p>For processed (but not stalling) format streams, &gt;= 3
1512 * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>);
1513 * &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 -07001514 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001515 *
1516 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkin78712a82014-05-27 18:32:18 -07001517 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001518 */
1519 public static final Key<int[]> REQUEST_MAX_NUM_OUTPUT_STREAMS =
1520 new Key<int[]>("android.request.maxNumOutputStreams", int[].class);
1521
1522 /**
Igor Murashkin78712a82014-05-27 18:32:18 -07001523 * <p>The maximum numbers of different types of output streams
1524 * that can be configured and used simultaneously by a camera device
1525 * for any <code>RAW</code> formats.</p>
1526 * <p>This value contains the max number of output simultaneous
1527 * streams from the raw sensor.</p>
1528 * <p>This lists the upper bound of the number of output streams supported by
1529 * the camera device. Using more streams simultaneously may require more hardware and
1530 * CPU resources that will consume more power. The image format for this kind of an output stream can
1531 * be any <code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p>
1532 * <p>In particular, a <code>RAW</code> format is typically one of:</p>
1533 * <ul>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07001534 * <li>{@link android.graphics.ImageFormat#RAW_SENSOR RAW_SENSOR}</li>
1535 * <li>{@link android.graphics.ImageFormat#RAW10 RAW10}</li>
1536 * <li>{@link android.graphics.ImageFormat#RAW12 RAW12}</li>
Igor Murashkin78712a82014-05-27 18:32:18 -07001537 * </ul>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001538 * <p>LEGACY mode devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> LEGACY)
1539 * never support raw streams.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001540 * <p><b>Range of valid values:</b><br></p>
1541 * <p>&gt;= 0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001542 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -07001543 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001544 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkin78712a82014-05-27 18:32:18 -07001545 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
1546 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001547 @PublicKey
1548 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -07001549 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_RAW =
1550 new Key<Integer>("android.request.maxNumOutputRaw", int.class);
1551
1552 /**
1553 * <p>The maximum numbers of different types of output streams
1554 * that can be configured and used simultaneously by a camera device
1555 * for any processed (but not-stalling) formats.</p>
1556 * <p>This value contains the max number of output simultaneous
1557 * streams for any processed (but not-stalling) formats.</p>
1558 * <p>This lists the upper bound of the number of output streams supported by
1559 * the camera device. Using more streams simultaneously may require more hardware and
1560 * CPU resources that will consume more power. The image format for this kind of an output stream can
1561 * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p>
1562 * <p>Processed (but not-stalling) is defined as any non-RAW format without a stall duration.
1563 * Typically:</p>
1564 * <ul>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07001565 * <li>{@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888}</li>
1566 * <li>{@link android.graphics.ImageFormat#NV21 NV21}</li>
1567 * <li>{@link android.graphics.ImageFormat#YV12 YV12}</li>
1568 * <li>Implementation-defined formats, i.e. {@link android.hardware.camera2.params.StreamConfigurationMap#isOutputSupportedFor(Class) }</li>
Igor Murashkin78712a82014-05-27 18:32:18 -07001569 * </ul>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07001570 * <p>For full guarantees, query {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } with a
1571 * processed format -- it will return 0 for a non-stalling stream.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001572 * <p>LEGACY devices will support at least 2 processing/non-stalling streams.</p>
1573 * <p><b>Range of valid values:</b><br></p>
1574 * <p>&gt;= 3
1575 * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>);
1576 * &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 -07001577 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -07001578 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001579 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkin78712a82014-05-27 18:32:18 -07001580 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
1581 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001582 @PublicKey
1583 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -07001584 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC =
1585 new Key<Integer>("android.request.maxNumOutputProc", int.class);
1586
1587 /**
1588 * <p>The maximum numbers of different types of output streams
1589 * that can be configured and used simultaneously by a camera device
1590 * for any processed (and stalling) formats.</p>
1591 * <p>This value contains the max number of output simultaneous
1592 * streams for any processed (but not-stalling) formats.</p>
1593 * <p>This lists the upper bound of the number of output streams supported by
1594 * the camera device. Using more streams simultaneously may require more hardware and
1595 * CPU resources that will consume more power. The image format for this kind of an output stream can
1596 * 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 -07001597 * <p>A processed and stalling format is defined as any non-RAW format with a stallDurations
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08001598 * &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 -07001599 * <p>For full guarantees, query {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } with a
1600 * processed format -- it will return a non-0 value for a stalling stream.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001601 * <p>LEGACY devices will support up to 1 processing/stalling stream.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001602 * <p><b>Range of valid values:</b><br></p>
1603 * <p>&gt;= 1</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001604 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -07001605 *
1606 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
1607 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001608 @PublicKey
1609 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -07001610 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC_STALLING =
1611 new Key<Integer>("android.request.maxNumOutputProcStalling", int.class);
1612
1613 /**
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001614 * <p>The maximum numbers of any type of input streams
1615 * that can be configured and used simultaneously by a camera device.</p>
1616 * <p>When set to 0, it means no input stream is supported.</p>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07001617 * <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
1618 * input stream, there must be at least one output stream configured to to receive the
1619 * reprocessed images.</p>
Zhijun He0e99c222015-01-29 15:26:05 -08001620 * <p>When an input stream and some output streams are used in a reprocessing request,
1621 * only the input buffer will be used to produce these output stream buffers, and a
1622 * new sensor image will not be captured.</p>
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001623 * <p>For example, for Zero Shutter Lag (ZSL) still capture use case, the input
Chien-Yu Chen8062d312015-05-12 14:24:10 -07001624 * stream image format will be PRIVATE, the associated output stream image format
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001625 * should be JPEG.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001626 * <p><b>Range of valid values:</b><br></p>
1627 * <p>0 or 1.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001628 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1629 * <p><b>Full capability</b> -
1630 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1631 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1632 *
1633 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001634 */
Zhijun He0e99c222015-01-29 15:26:05 -08001635 @PublicKey
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001636 public static final Key<Integer> REQUEST_MAX_NUM_INPUT_STREAMS =
1637 new Key<Integer>("android.request.maxNumInputStreams", int.class);
1638
1639 /**
Igor Murashkinc127f052014-01-17 18:06:02 -08001640 * <p>Specifies the number of maximum pipeline stages a frame
1641 * has to go through from when it's exposed to when it's available
1642 * to the framework.</p>
1643 * <p>A typical minimum value for this is 2 (one stage to expose,
1644 * one stage to readout) from the sensor. The ISP then usually adds
1645 * its own stages to do custom HW processing. Further stages may be
1646 * added by SW processing.</p>
1647 * <p>Depending on what settings are used (e.g. YUV, JPEG) and what
1648 * processing is enabled (e.g. face detection), the actual pipeline
1649 * depth (specified by {@link CaptureResult#REQUEST_PIPELINE_DEPTH android.request.pipelineDepth}) may be less than
1650 * the max pipeline depth.</p>
1651 * <p>A pipeline depth of X stages is equivalent to a pipeline latency of
1652 * X frame intervals.</p>
Zhijun Hefab663e2015-05-26 19:46:31 -07001653 * <p>This value will normally be 8 or less, however, for high speed capture session,
1654 * 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 -07001655 * <p>This key is available on all devices.</p>
Igor Murashkinc127f052014-01-17 18:06:02 -08001656 *
1657 * @see CaptureResult#REQUEST_PIPELINE_DEPTH
1658 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001659 @PublicKey
Igor Murashkinc127f052014-01-17 18:06:02 -08001660 public static final Key<Byte> REQUEST_PIPELINE_MAX_DEPTH =
1661 new Key<Byte>("android.request.pipelineMaxDepth", byte.class);
1662
1663 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001664 * <p>Defines how many sub-components
Igor Murashkin2086b582014-01-17 18:30:59 -08001665 * a result will be composed of.</p>
1666 * <p>In order to combat the pipeline latency, partial results
1667 * may be delivered to the application layer from the camera device as
1668 * soon as they are available.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001669 * <p>Optional; defaults to 1. A value of 1 means that partial
1670 * results are not supported, and only the final TotalCaptureResult will
1671 * be produced by the camera device.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001672 * <p>A typical use case for this might be: after requesting an
1673 * auto-focus (AF) lock the new AF state might be available 50%
1674 * of the way through the pipeline. The camera device could
1675 * then immediately dispatch this state via a partial result to
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001676 * the application, and the rest of the metadata via later
1677 * partial results.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001678 * <p><b>Range of valid values:</b><br>
1679 * &gt;= 1</p>
Zhijun He1420de42014-07-17 17:45:54 -07001680 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin2086b582014-01-17 18:30:59 -08001681 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001682 @PublicKey
Igor Murashkin2086b582014-01-17 18:30:59 -08001683 public static final Key<Integer> REQUEST_PARTIAL_RESULT_COUNT =
1684 new Key<Integer>("android.request.partialResultCount", int.class);
1685
1686 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001687 * <p>List of capabilities that this camera device
Igor Murashkine46c0da2014-02-07 18:34:37 -08001688 * advertises as fully supporting.</p>
1689 * <p>A capability is a contract that the camera device makes in order
1690 * to be able to satisfy one or more use cases.</p>
1691 * <p>Listing a capability guarantees that the whole set of features
1692 * required to support a common use will all be available.</p>
1693 * <p>Using a subset of the functionality provided by an unsupported
1694 * capability may be possible on a specific camera device implementation;
1695 * to do this query each of android.request.availableRequestKeys,
1696 * android.request.availableResultKeys,
1697 * android.request.availableCharacteristicsKeys.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001698 * <p>The following capabilities are guaranteed to be available on
1699 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL devices:</p>
1700 * <ul>
1701 * <li>MANUAL_SENSOR</li>
Zhijun Hedf9b7472014-06-04 13:42:41 -07001702 * <li>MANUAL_POST_PROCESSING</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001703 * </ul>
1704 * <p>Other capabilities may be available on either FULL or LIMITED
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001705 * devices, but the application should query this key to be sure.</p>
1706 * <p><b>Possible values:</b>
1707 * <ul>
1708 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE BACKWARD_COMPATIBLE}</li>
1709 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR MANUAL_SENSOR}</li>
1710 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING MANUAL_POST_PROCESSING}</li>
1711 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_RAW RAW}</li>
Chien-Yu Chen8062d312015-05-12 14:24:10 -07001712 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING PRIVATE_REPROCESSING}</li>
Ruben Brunk0c22e692014-11-11 12:00:34 -08001713 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS READ_SENSOR_SETTINGS}</li>
Eino-Ville Talvala126a7462014-11-04 16:31:01 -08001714 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE BURST_CAPTURE}</li>
Zhijun He0e99c222015-01-29 15:26:05 -08001715 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING YUV_REPROCESSING}</li>
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -07001716 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT DEPTH_OUTPUT}</li>
Zhijun Hefab663e2015-05-26 19:46:31 -07001717 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO CONSTRAINED_HIGH_SPEED_VIDEO}</li>
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001718 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING MOTION_TRACKING}</li>
Shuzhen Wang23d29382017-11-26 17:24:56 -08001719 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA LOGICAL_MULTI_CAMERA}</li>
Shuzhen Wang51248bf2018-03-22 00:04:45 -07001720 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME MONOCHROME}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001721 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001722 * <p>This key is available on all devices.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001723 *
1724 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -07001725 * @see #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE
Igor Murashkine46c0da2014-02-07 18:34:37 -08001726 * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR
Zhijun He50f72432014-05-28 13:52:04 -07001727 * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING
Eino-Ville Talvala611fece2014-07-10 17:29:38 -07001728 * @see #REQUEST_AVAILABLE_CAPABILITIES_RAW
Chien-Yu Chen8062d312015-05-12 14:24:10 -07001729 * @see #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING
Ruben Brunk0c22e692014-11-11 12:00:34 -08001730 * @see #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS
Eino-Ville Talvala126a7462014-11-04 16:31:01 -08001731 * @see #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE
Zhijun He0e99c222015-01-29 15:26:05 -08001732 * @see #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -07001733 * @see #REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT
Zhijun Hefab663e2015-05-26 19:46:31 -07001734 * @see #REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001735 * @see #REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING
Shuzhen Wang23d29382017-11-26 17:24:56 -08001736 * @see #REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA
Shuzhen Wang51248bf2018-03-22 00:04:45 -07001737 * @see #REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME
Igor Murashkine46c0da2014-02-07 18:34:37 -08001738 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001739 @PublicKey
Zhijun He421ddbe2014-05-29 13:41:49 -07001740 public static final Key<int[]> REQUEST_AVAILABLE_CAPABILITIES =
1741 new Key<int[]>("android.request.availableCapabilities", int[].class);
Igor Murashkine46c0da2014-02-07 18:34:37 -08001742
1743 /**
1744 * <p>A list of all keys that the camera device has available
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07001745 * to use with {@link android.hardware.camera2.CaptureRequest }.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001746 * <p>Attempting to set a key into a CaptureRequest that is not
1747 * listed here will result in an invalid request and will be rejected
1748 * by the camera device.</p>
1749 * <p>This field can be used to query the feature set of a camera device
1750 * at a more granular level than capabilities. This is especially
1751 * important for optional keys that are not listed under any capability
1752 * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001753 * <p>This key is available on all devices.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001754 *
1755 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1756 * @hide
1757 */
1758 public static final Key<int[]> REQUEST_AVAILABLE_REQUEST_KEYS =
1759 new Key<int[]>("android.request.availableRequestKeys", int[].class);
1760
1761 /**
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08001762 * <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 -08001763 * <p>Attempting to get a key from a CaptureResult that is not
1764 * listed here will always return a <code>null</code> value. Getting a key from
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001765 * a CaptureResult that is listed here will generally never return a <code>null</code>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001766 * value.</p>
1767 * <p>The following keys may return <code>null</code> unless they are enabled:</p>
1768 * <ul>
Ruben Brunk57493682014-05-27 18:58:08 -07001769 * <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 -08001770 * </ul>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001771 * <p>(Those sometimes-null keys will nevertheless be listed here
Igor Murashkine46c0da2014-02-07 18:34:37 -08001772 * if they are available.)</p>
1773 * <p>This field can be used to query the feature set of a camera device
1774 * at a more granular level than capabilities. This is especially
1775 * important for optional keys that are not listed under any capability
1776 * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001777 * <p>This key is available on all devices.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001778 *
1779 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Igor Murashkine46c0da2014-02-07 18:34:37 -08001780 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
1781 * @hide
1782 */
1783 public static final Key<int[]> REQUEST_AVAILABLE_RESULT_KEYS =
1784 new Key<int[]>("android.request.availableResultKeys", int[].class);
1785
1786 /**
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08001787 * <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 -08001788 * <p>This entry follows the same rules as
1789 * android.request.availableResultKeys (except that it applies for
1790 * CameraCharacteristics instead of CaptureResult). See above for more
1791 * details.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001792 * <p>This key is available on all devices.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001793 * @hide
1794 */
1795 public static final Key<int[]> REQUEST_AVAILABLE_CHARACTERISTICS_KEYS =
1796 new Key<int[]>("android.request.availableCharacteristicsKeys", int[].class);
1797
1798 /**
Emilian Peev75a55702017-11-07 16:09:59 +00001799 * <p>A subset of the available request keys that the camera device
1800 * can pass as part of the capture session initialization.</p>
1801 * <p>This is a subset of android.request.availableRequestKeys which
1802 * contains a list of keys that are difficult to apply per-frame and
1803 * can result in unexpected delays when modified during the capture session
1804 * lifetime. Typical examples include parameters that require a
1805 * time-consuming hardware re-configuration or internal camera pipeline
1806 * change. For performance reasons we advise clients to pass their initial
Chien-Yu Chena1d1d5b2018-01-03 12:14:53 -08001807 * values as part of
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001808 * {@link SessionConfiguration#setSessionParameters }.
Chien-Yu Chena1d1d5b2018-01-03 12:14:53 -08001809 * Once the camera capture session is enabled it is also recommended to avoid
Emilian Peev75a55702017-11-07 16:09:59 +00001810 * changing them from their initial values set in
1811 * {@link SessionConfiguration#setSessionParameters }.
1812 * Control over session parameters can still be exerted in capture requests
1813 * but clients should be aware and expect delays during their application.
1814 * An example usage scenario could look like this:</p>
1815 * <ul>
1816 * <li>The camera client starts by quering the session parameter key list via
1817 * {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys }.</li>
1818 * <li>Before triggering the capture session create sequence, a capture request
Chien-Yu Chena1d1d5b2018-01-03 12:14:53 -08001819 * must be built via
1820 * {@link CameraDevice#createCaptureRequest }
1821 * using an appropriate template matching the particular use case.</li>
Emilian Peev75a55702017-11-07 16:09:59 +00001822 * <li>The client should go over the list of session parameters and check
1823 * whether some of the keys listed matches with the parameters that
1824 * they intend to modify as part of the first capture request.</li>
1825 * <li>If there is no such match, the capture request can be passed
Chien-Yu Chena1d1d5b2018-01-03 12:14:53 -08001826 * unmodified to
1827 * {@link SessionConfiguration#setSessionParameters }.</li>
Emilian Peev75a55702017-11-07 16:09:59 +00001828 * <li>If matches do exist, the client should update the respective values
Chien-Yu Chena1d1d5b2018-01-03 12:14:53 -08001829 * and pass the request to
1830 * {@link SessionConfiguration#setSessionParameters }.</li>
Emilian Peev75a55702017-11-07 16:09:59 +00001831 * <li>After the capture session initialization completes the session parameter
1832 * key list can continue to serve as reference when posting or updating
1833 * further requests. As mentioned above further changes to session
1834 * parameters should ideally be avoided, if updates are necessary
1835 * however clients could expect a delay/glitch during the
1836 * parameter switch.</li>
1837 * </ul>
1838 * <p>This key is available on all devices.</p>
1839 * @hide
1840 */
1841 public static final Key<int[]> REQUEST_AVAILABLE_SESSION_KEYS =
1842 new Key<int[]>("android.request.availableSessionKeys", int[].class);
1843
1844 /**
Emilian Peev2100ae72018-01-12 16:56:25 +00001845 * <p>A subset of the available request keys that can be overriden for
1846 * physical devices backing a logical multi-camera.</p>
1847 * <p>This is a subset of android.request.availableRequestKeys which contains a list
1848 * of keys that can be overriden using {@link CaptureRequest.Builder#setPhysicalCameraKey }.
1849 * The respective value of such request key can be obtained by calling
1850 * {@link CaptureRequest.Builder#getPhysicalCameraKey }. Capture requests that contain
1851 * individual physical device requests must be built via
Emilian Peevf60f4fb2018-02-08 17:40:48 +00001852 * {@link android.hardware.camera2.CameraDevice#createCaptureRequest(int, Set)}.</p>
Emilian Peev2100ae72018-01-12 16:56:25 +00001853 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1854 * <p><b>Limited capability</b> -
1855 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1856 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1857 *
1858 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1859 * @hide
1860 */
1861 public static final Key<int[]> REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS =
1862 new Key<int[]>("android.request.availablePhysicalCameraRequestKeys", int[].class);
1863
1864 /**
Zhijun Hef3b16df2014-01-17 13:37:59 -08001865 * <p>The list of image formats that are supported by this
Igor Murashkin418f6df2014-02-07 18:20:48 -08001866 * camera device for output streams.</p>
Zhijun Hef3b16df2014-01-17 13:37:59 -08001867 * <p>All camera devices will support JPEG and YUV_420_888 formats.</p>
1868 * <p>When set to YUV_420_888, application can access the YUV420 data directly.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001869 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07001870 * @deprecated
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001871 * <p>Not used in HALv3 or newer</p>
1872
Igor Murashkin9c595172014-05-12 13:56:20 -07001873 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001874 */
Igor Murashkin9c595172014-05-12 13:56:20 -07001875 @Deprecated
Igor Murashkinb519cc52013-07-02 11:23:44 -07001876 public static final Key<int[]> SCALER_AVAILABLE_FORMATS =
1877 new Key<int[]>("android.scaler.availableFormats", int[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001878
1879 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001880 * <p>The minimum frame duration that is supported
Igor Murashkin9c595172014-05-12 13:56:20 -07001881 * for each resolution in android.scaler.availableJpegSizes.</p>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001882 * <p>This corresponds to the minimum steady-state frame duration when only
1883 * that JPEG stream is active and captured in a burst, with all
1884 * processing (typically in android.*.mode) set to FAST.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08001885 * <p>When multiple streams are configured, the minimum
1886 * frame duration will be &gt;= max(individual stream min
1887 * durations)</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001888 * <p><b>Units</b>: Nanoseconds</p>
1889 * <p><b>Range of valid values:</b><br>
1890 * TODO: Remove property.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001891 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07001892 * @deprecated
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001893 * <p>Not used in HALv3 or newer</p>
1894
Igor Murashkin9c595172014-05-12 13:56:20 -07001895 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001896 */
Igor Murashkin9c595172014-05-12 13:56:20 -07001897 @Deprecated
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001898 public static final Key<long[]> SCALER_AVAILABLE_JPEG_MIN_DURATIONS =
1899 new Key<long[]>("android.scaler.availableJpegMinDurations", long[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001900
1901 /**
Zhijun Hef3b16df2014-01-17 13:37:59 -08001902 * <p>The JPEG resolutions that are supported by this camera device.</p>
1903 * <p>The resolutions are listed as <code>(width, height)</code> pairs. All camera devices will support
1904 * 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 -07001905 * <p><b>Range of valid values:</b><br>
1906 * TODO: Remove property.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001907 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Zhijun Hef3b16df2014-01-17 13:37:59 -08001908 *
1909 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Igor Murashkin9c595172014-05-12 13:56:20 -07001910 * @deprecated
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001911 * <p>Not used in HALv3 or newer</p>
1912
Igor Murashkin9c595172014-05-12 13:56:20 -07001913 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001914 */
Igor Murashkin9c595172014-05-12 13:56:20 -07001915 @Deprecated
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07001916 public static final Key<android.util.Size[]> SCALER_AVAILABLE_JPEG_SIZES =
1917 new Key<android.util.Size[]>("android.scaler.availableJpegSizes", android.util.Size[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001918
1919 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001920 * <p>The maximum ratio between both active area width
1921 * and crop region width, and active area height and
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001922 * crop region height, for {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001923 * <p>This represents the maximum amount of zooming possible by
1924 * the camera device, or equivalently, the minimum cropping
1925 * window size.</p>
1926 * <p>Crop regions that have a width or height that is smaller
1927 * than this ratio allows will be rounded up to the minimum
1928 * allowed size by the camera device.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001929 * <p><b>Units</b>: Zoom scale factor</p>
1930 * <p><b>Range of valid values:</b><br>
1931 * &gt;=1</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001932 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001933 *
1934 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001935 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001936 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001937 public static final Key<Float> SCALER_AVAILABLE_MAX_DIGITAL_ZOOM =
1938 new Key<Float>("android.scaler.availableMaxDigitalZoom", float.class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001939
1940 /**
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001941 * <p>For each available processed output size (defined in
Igor Murashkin9c595172014-05-12 13:56:20 -07001942 * android.scaler.availableProcessedSizes), this property lists the
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001943 * minimum supportable frame duration for that size.</p>
1944 * <p>This should correspond to the frame duration when only that processed
1945 * stream is active, with all processing (typically in android.*.mode)
1946 * set to FAST.</p>
1947 * <p>When multiple streams are configured, the minimum frame duration will
1948 * be &gt;= max(individual stream min durations).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001949 * <p><b>Units</b>: Nanoseconds</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001950 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07001951 * @deprecated
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001952 * <p>Not used in HALv3 or newer</p>
1953
Igor Murashkin9c595172014-05-12 13:56:20 -07001954 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001955 */
Igor Murashkin9c595172014-05-12 13:56:20 -07001956 @Deprecated
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001957 public static final Key<long[]> SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS =
1958 new Key<long[]>("android.scaler.availableProcessedMinDurations", long[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001959
1960 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001961 * <p>The resolutions available for use with
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001962 * processed output streams, such as YV12, NV12, and
1963 * platform opaque YUV/RGB streams to the GPU or video
Zhijun Hef3b16df2014-01-17 13:37:59 -08001964 * encoders.</p>
1965 * <p>The resolutions are listed as <code>(width, height)</code> pairs.</p>
1966 * <p>For a given use case, the actual maximum supported resolution
1967 * may be lower than what is listed here, depending on the destination
1968 * Surface for the image data. For example, for recording video,
1969 * the video encoder chosen may have a maximum size limit (e.g. 1080p)
1970 * smaller than what the camera (e.g. maximum resolution is 3264x2448)
1971 * can provide.</p>
1972 * <p>Please reference the documentation for the image data destination to
1973 * check if it limits the maximum size for image data.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001974 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07001975 * @deprecated
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07001976 * <p>Not used in HALv3 or newer</p>
1977
Igor Murashkin9c595172014-05-12 13:56:20 -07001978 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001979 */
Igor Murashkin9c595172014-05-12 13:56:20 -07001980 @Deprecated
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07001981 public static final Key<android.util.Size[]> SCALER_AVAILABLE_PROCESSED_SIZES =
1982 new Key<android.util.Size[]>("android.scaler.availableProcessedSizes", android.util.Size[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001983
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001984 /**
Igor Murashkin418f6df2014-02-07 18:20:48 -08001985 * <p>The mapping of image formats that are supported by this
1986 * camera device for input streams, to their corresponding output formats.</p>
1987 * <p>All camera devices with at least 1
Zhijun He0e99c222015-01-29 15:26:05 -08001988 * {@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} will have at least one
Igor Murashkin418f6df2014-02-07 18:20:48 -08001989 * available input format.</p>
1990 * <p>The camera device will support the following map of formats,
Zhijun He0e99c222015-01-29 15:26:05 -08001991 * if its dependent capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}) is supported:</p>
Igor Murashkin418f6df2014-02-07 18:20:48 -08001992 * <table>
1993 * <thead>
1994 * <tr>
1995 * <th align="left">Input Format</th>
1996 * <th align="left">Output Format</th>
1997 * <th align="left">Capability</th>
1998 * </tr>
1999 * </thead>
2000 * <tbody>
2001 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002002 * <td align="left">{@link android.graphics.ImageFormat#PRIVATE }</td>
2003 * <td align="left">{@link android.graphics.ImageFormat#JPEG }</td>
Chien-Yu Chen8062d312015-05-12 14:24:10 -07002004 * <td align="left">PRIVATE_REPROCESSING</td>
Igor Murashkin418f6df2014-02-07 18:20:48 -08002005 * </tr>
2006 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002007 * <td align="left">{@link android.graphics.ImageFormat#PRIVATE }</td>
2008 * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
Chien-Yu Chen8062d312015-05-12 14:24:10 -07002009 * <td align="left">PRIVATE_REPROCESSING</td>
Igor Murashkin418f6df2014-02-07 18:20:48 -08002010 * </tr>
2011 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002012 * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
2013 * <td align="left">{@link android.graphics.ImageFormat#JPEG }</td>
Zhijun He0e99c222015-01-29 15:26:05 -08002014 * <td align="left">YUV_REPROCESSING</td>
2015 * </tr>
2016 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002017 * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
2018 * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
Zhijun He0e99c222015-01-29 15:26:05 -08002019 * <td align="left">YUV_REPROCESSING</td>
Igor Murashkin418f6df2014-02-07 18:20:48 -08002020 * </tr>
2021 * </tbody>
2022 * </table>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002023 * <p>PRIVATE refers to a device-internal format that is not directly application-visible. A
Chien-Yu Chen8062d312015-05-12 14:24:10 -07002024 * PRIVATE input surface can be acquired by {@link android.media.ImageReader#newInstance }
2025 * with {@link android.graphics.ImageFormat#PRIVATE } as the format.</p>
2026 * <p>For a PRIVATE_REPROCESSING-capable camera device, using the PRIVATE format as either input
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002027 * 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 -08002028 * <p>Attempting to configure an input stream with output streams not
2029 * listed as available in this map is not valid.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002030 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002031 *
Zhijun He0e99c222015-01-29 15:26:05 -08002032 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2033 * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
Igor Murashkin9c595172014-05-12 13:56:20 -07002034 * @hide
Igor Murashkin418f6df2014-02-07 18:20:48 -08002035 */
Chien-Yu Chen0a551f12015-04-03 17:57:35 -07002036 public static final Key<android.hardware.camera2.params.ReprocessFormatsMap> SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP =
2037 new Key<android.hardware.camera2.params.ReprocessFormatsMap>("android.scaler.availableInputOutputFormatsMap", android.hardware.camera2.params.ReprocessFormatsMap.class);
Igor Murashkin418f6df2014-02-07 18:20:48 -08002038
2039 /**
Igor Murashkina23ffb52014-02-07 18:52:34 -08002040 * <p>The available stream configurations that this
2041 * camera device supports
2042 * (i.e. format, width, height, output/input stream).</p>
2043 * <p>The configurations are listed as <code>(format, width, height, input?)</code>
2044 * tuples.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002045 * <p>For a given use case, the actual maximum supported resolution
2046 * may be lower than what is listed here, depending on the destination
2047 * Surface for the image data. For example, for recording video,
2048 * the video encoder chosen may have a maximum size limit (e.g. 1080p)
2049 * smaller than what the camera (e.g. maximum resolution is 3264x2448)
2050 * can provide.</p>
2051 * <p>Please reference the documentation for the image data destination to
2052 * check if it limits the maximum size for image data.</p>
2053 * <p>Not all output formats may be supported in a configuration with
2054 * an input stream of a particular format. For more details, see
Igor Murashkin9c595172014-05-12 13:56:20 -07002055 * android.scaler.availableInputOutputFormatsMap.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002056 * <p>The following table describes the minimum required output stream
2057 * configurations based on the hardware level
2058 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p>
2059 * <table>
2060 * <thead>
2061 * <tr>
2062 * <th align="center">Format</th>
2063 * <th align="center">Size</th>
2064 * <th align="center">Hardware Level</th>
2065 * <th align="center">Notes</th>
2066 * </tr>
2067 * </thead>
2068 * <tbody>
2069 * <tr>
2070 * <td align="center">JPEG</td>
2071 * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td>
2072 * <td align="center">Any</td>
2073 * <td align="center"></td>
2074 * </tr>
2075 * <tr>
2076 * <td align="center">JPEG</td>
2077 * <td align="center">1920x1080 (1080p)</td>
2078 * <td align="center">Any</td>
2079 * <td align="center">if 1080p &lt;= activeArraySize</td>
2080 * </tr>
2081 * <tr>
2082 * <td align="center">JPEG</td>
2083 * <td align="center">1280x720 (720)</td>
2084 * <td align="center">Any</td>
2085 * <td align="center">if 720p &lt;= activeArraySize</td>
2086 * </tr>
2087 * <tr>
2088 * <td align="center">JPEG</td>
2089 * <td align="center">640x480 (480p)</td>
2090 * <td align="center">Any</td>
2091 * <td align="center">if 480p &lt;= activeArraySize</td>
2092 * </tr>
2093 * <tr>
2094 * <td align="center">JPEG</td>
2095 * <td align="center">320x240 (240p)</td>
2096 * <td align="center">Any</td>
2097 * <td align="center">if 240p &lt;= activeArraySize</td>
2098 * </tr>
2099 * <tr>
2100 * <td align="center">YUV_420_888</td>
2101 * <td align="center">all output sizes available for JPEG</td>
2102 * <td align="center">FULL</td>
2103 * <td align="center"></td>
2104 * </tr>
2105 * <tr>
2106 * <td align="center">YUV_420_888</td>
2107 * <td align="center">all output sizes available for JPEG, up to the maximum video size</td>
2108 * <td align="center">LIMITED</td>
2109 * <td align="center"></td>
2110 * </tr>
2111 * <tr>
2112 * <td align="center">IMPLEMENTATION_DEFINED</td>
2113 * <td align="center">same as YUV_420_888</td>
2114 * <td align="center">Any</td>
2115 * <td align="center"></td>
2116 * </tr>
2117 * </tbody>
2118 * </table>
2119 * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional
2120 * mandatory stream configurations on a per-capability basis.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002121 * <p>This key is available on all devices.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002122 *
2123 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2124 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Igor Murashkina23ffb52014-02-07 18:52:34 -08002125 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Igor Murashkin9c595172014-05-12 13:56:20 -07002126 * @hide
Igor Murashkina23ffb52014-02-07 18:52:34 -08002127 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002128 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> SCALER_AVAILABLE_STREAM_CONFIGURATIONS =
2129 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.scaler.availableStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
Igor Murashkina23ffb52014-02-07 18:52:34 -08002130
2131 /**
2132 * <p>This lists the minimum frame duration for each
2133 * format/size combination.</p>
2134 * <p>This should correspond to the frame duration when only that
2135 * stream is active, with all processing (typically in android.*.mode)
2136 * set to either OFF or FAST.</p>
2137 * <p>When multiple streams are used in a request, the minimum frame
2138 * duration will be max(individual stream min durations).</p>
2139 * <p>The minimum frame duration of a stream (of a particular format, size)
2140 * is the same regardless of whether the stream is input or output.</p>
2141 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and
Igor Murashkin9c595172014-05-12 13:56:20 -07002142 * android.scaler.availableStallDurations for more details about
Igor Murashkina23ffb52014-02-07 18:52:34 -08002143 * calculating the max frame rate.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002144 * <p><b>Units</b>: (format, width, height, ns) x n</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002145 * <p>This key is available on all devices.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002146 *
Igor Murashkina23ffb52014-02-07 18:52:34 -08002147 * @see CaptureRequest#SENSOR_FRAME_DURATION
Igor Murashkin9c595172014-05-12 13:56:20 -07002148 * @hide
Igor Murashkina23ffb52014-02-07 18:52:34 -08002149 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002150 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_MIN_FRAME_DURATIONS =
2151 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
Igor Murashkina23ffb52014-02-07 18:52:34 -08002152
2153 /**
2154 * <p>This lists the maximum stall duration for each
Zhijun He513f7c32015-04-24 18:23:54 -07002155 * output format/size combination.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002156 * <p>A stall duration is how much extra time would get added
2157 * to the normal minimum frame duration for a repeating request
2158 * that has streams with non-zero stall.</p>
2159 * <p>For example, consider JPEG captures which have the following
2160 * characteristics:</p>
2161 * <ul>
2162 * <li>JPEG streams act like processed YUV streams in requests for which
2163 * they are not included; in requests in which they are directly
2164 * referenced, they act as JPEG streams. This is because supporting a
2165 * JPEG stream requires the underlying YUV data to always be ready for
2166 * use by a JPEG encoder, but the encoder will only be used (and impact
2167 * frame duration) on requests that actually reference a JPEG stream.</li>
2168 * <li>The JPEG processor can run concurrently to the rest of the camera
2169 * pipeline, but cannot process more than 1 capture at a time.</li>
2170 * </ul>
2171 * <p>In other words, using a repeating YUV request would result
2172 * in a steady frame rate (let's say it's 30 FPS). If a single
2173 * JPEG request is submitted periodically, the frame rate will stay
2174 * at 30 FPS (as long as we wait for the previous JPEG to return each
2175 * time). If we try to submit a repeating YUV + JPEG request, then
2176 * the frame rate will drop from 30 FPS.</p>
2177 * <p>In general, submitting a new request with a non-0 stall time
2178 * stream will <em>not</em> cause a frame rate drop unless there are still
2179 * outstanding buffers for that stream from previous requests.</p>
2180 * <p>Submitting a repeating request with streams (call this <code>S</code>)
2181 * is the same as setting the minimum frame duration from
2182 * the normal minimum frame duration corresponding to <code>S</code>, added with
2183 * the maximum stall duration for <code>S</code>.</p>
2184 * <p>If interleaving requests with and without a stall duration,
2185 * a request will stall by the maximum of the remaining times
2186 * for each can-stall stream with outstanding buffers.</p>
2187 * <p>This means that a stalling request will not have an exposure start
2188 * until the stall has completed.</p>
2189 * <p>This should correspond to the stall duration when only that stream is
2190 * active, with all processing (typically in android.*.mode) set to FAST
2191 * or OFF. Setting any of the processing modes to HIGH_QUALITY
2192 * effectively results in an indeterminate stall duration for all
2193 * streams in a request (the regular stall calculation rules are
2194 * ignored).</p>
2195 * <p>The following formats may always have a stall duration:</p>
2196 * <ul>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002197 * <li>{@link android.graphics.ImageFormat#JPEG }</li>
2198 * <li>{@link android.graphics.ImageFormat#RAW_SENSOR }</li>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002199 * </ul>
2200 * <p>The following formats will never have a stall duration:</p>
2201 * <ul>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002202 * <li>{@link android.graphics.ImageFormat#YUV_420_888 }</li>
2203 * <li>{@link android.graphics.ImageFormat#RAW10 }</li>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08002204 * <li>{@link android.graphics.ImageFormat#RAW12 }</li>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002205 * </ul>
2206 * <p>All other formats may or may not have an allowed stall duration on
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002207 * a per-capability basis; refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
Igor Murashkina23ffb52014-02-07 18:52:34 -08002208 * for more details.</p>
2209 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} for more information about
2210 * calculating the max frame rate (absent stalls).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002211 * <p><b>Units</b>: (format, width, height, ns) x n</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002212 * <p>This key is available on all devices.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002213 *
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002214 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Igor Murashkina23ffb52014-02-07 18:52:34 -08002215 * @see CaptureRequest#SENSOR_FRAME_DURATION
Igor Murashkin9c595172014-05-12 13:56:20 -07002216 * @hide
Igor Murashkina23ffb52014-02-07 18:52:34 -08002217 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002218 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_STALL_DURATIONS =
2219 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
2220
2221 /**
2222 * <p>The available stream configurations that this
2223 * camera device supports; also includes the minimum frame durations
2224 * and the stall durations for each format/size combination.</p>
2225 * <p>All camera devices will support sensor maximum resolution (defined by
2226 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) for the JPEG format.</p>
2227 * <p>For a given use case, the actual maximum supported resolution
2228 * may be lower than what is listed here, depending on the destination
2229 * Surface for the image data. For example, for recording video,
2230 * the video encoder chosen may have a maximum size limit (e.g. 1080p)
2231 * smaller than what the camera (e.g. maximum resolution is 3264x2448)
2232 * can provide.</p>
2233 * <p>Please reference the documentation for the image data destination to
2234 * check if it limits the maximum size for image data.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07002235 * <p>The following table describes the minimum required output stream
2236 * configurations based on the hardware level
2237 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p>
2238 * <table>
2239 * <thead>
2240 * <tr>
2241 * <th align="center">Format</th>
2242 * <th align="center">Size</th>
2243 * <th align="center">Hardware Level</th>
2244 * <th align="center">Notes</th>
2245 * </tr>
2246 * </thead>
2247 * <tbody>
2248 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002249 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td>
Yin-Chia Yeh56830462015-07-08 14:26:05 -07002250 * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} (*1)</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002251 * <td align="center">Any</td>
2252 * <td align="center"></td>
2253 * </tr>
2254 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002255 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002256 * <td align="center">1920x1080 (1080p)</td>
2257 * <td align="center">Any</td>
2258 * <td align="center">if 1080p &lt;= activeArraySize</td>
2259 * </tr>
2260 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002261 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td>
Yin-Chia Yeh56830462015-07-08 14:26:05 -07002262 * <td align="center">1280x720 (720p)</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002263 * <td align="center">Any</td>
2264 * <td align="center">if 720p &lt;= activeArraySize</td>
2265 * </tr>
2266 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002267 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002268 * <td align="center">640x480 (480p)</td>
2269 * <td align="center">Any</td>
2270 * <td align="center">if 480p &lt;= activeArraySize</td>
2271 * </tr>
2272 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002273 * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002274 * <td align="center">320x240 (240p)</td>
2275 * <td align="center">Any</td>
2276 * <td align="center">if 240p &lt;= activeArraySize</td>
2277 * </tr>
2278 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002279 * <td align="center">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002280 * <td align="center">all output sizes available for JPEG</td>
2281 * <td align="center">FULL</td>
2282 * <td align="center"></td>
2283 * </tr>
2284 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002285 * <td align="center">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002286 * <td align="center">all output sizes available for JPEG, up to the maximum video size</td>
2287 * <td align="center">LIMITED</td>
2288 * <td align="center"></td>
2289 * </tr>
2290 * <tr>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002291 * <td align="center">{@link android.graphics.ImageFormat#PRIVATE }</td>
Igor Murashkin9c595172014-05-12 13:56:20 -07002292 * <td align="center">same as YUV_420_888</td>
2293 * <td align="center">Any</td>
2294 * <td align="center"></td>
2295 * </tr>
2296 * </tbody>
2297 * </table>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002298 * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} and {@link android.hardware.camera2.CameraDevice#createCaptureSession } for additional mandatory
2299 * stream configurations on a per-capability basis.</p>
Yin-Chia Yeh56830462015-07-08 14:26:05 -07002300 * <p>*1: For JPEG format, the sizes may be restricted by below conditions:</p>
2301 * <ul>
2302 * <li>The HAL may choose the aspect ratio of each Jpeg size to be one of well known ones
2303 * (e.g. 4:3, 16:9, 3:2 etc.). If the sensor maximum resolution
2304 * (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) has an aspect ratio other than these,
2305 * it does not have to be included in the supported JPEG sizes.</li>
2306 * <li>Some hardware JPEG encoders may have pixel boundary alignment requirements, such as
2307 * the dimensions being a multiple of 16.
2308 * Therefore, the maximum JPEG size may be smaller than sensor maximum resolution.
2309 * However, the largest JPEG size will be as close as possible to the sensor maximum
2310 * resolution given above constraints. It is required that after aspect ratio adjustments,
2311 * additional size reduction due to other issues must be less than 3% in area. For example,
2312 * if the sensor maximum resolution is 3280x2464, if the maximum JPEG size has aspect
2313 * ratio 4:3, and the JPEG encoder alignment requirement is 16, the maximum JPEG size will be
2314 * 3264x2448.</li>
2315 * </ul>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002316 * <p>This key is available on all devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07002317 *
2318 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2319 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2320 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
2321 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002322 @PublicKey
2323 @SyntheticKey
Igor Murashkin9c595172014-05-12 13:56:20 -07002324 public static final Key<android.hardware.camera2.params.StreamConfigurationMap> SCALER_STREAM_CONFIGURATION_MAP =
2325 new Key<android.hardware.camera2.params.StreamConfigurationMap>("android.scaler.streamConfigurationMap", android.hardware.camera2.params.StreamConfigurationMap.class);
Igor Murashkina23ffb52014-02-07 18:52:34 -08002326
2327 /**
Zhijun He14986152014-05-22 21:17:37 -07002328 * <p>The crop type that this camera device supports.</p>
2329 * <p>When passing a non-centered crop region ({@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}) to a camera
2330 * device that only supports CENTER_ONLY cropping, the camera device will move the
2331 * crop region to the center of the sensor active array ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize})
2332 * and keep the crop region width and height unchanged. The camera device will return the
2333 * final used crop region in metadata result {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
2334 * <p>Camera devices that support FREEFORM cropping will support any crop region that
2335 * is inside of the active array. The camera device will apply the same crop region and
2336 * 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 -07002337 * <p>LEGACY capability devices will only support CENTER_ONLY cropping.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002338 * <p><b>Possible values:</b>
2339 * <ul>
2340 * <li>{@link #SCALER_CROPPING_TYPE_CENTER_ONLY CENTER_ONLY}</li>
2341 * <li>{@link #SCALER_CROPPING_TYPE_FREEFORM FREEFORM}</li>
2342 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002343 * <p>This key is available on all devices.</p>
Zhijun He14986152014-05-22 21:17:37 -07002344 *
Zhijun He14986152014-05-22 21:17:37 -07002345 * @see CaptureRequest#SCALER_CROP_REGION
2346 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
2347 * @see #SCALER_CROPPING_TYPE_CENTER_ONLY
2348 * @see #SCALER_CROPPING_TYPE_FREEFORM
2349 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002350 @PublicKey
Zhijun He14986152014-05-22 21:17:37 -07002351 public static final Key<Integer> SCALER_CROPPING_TYPE =
2352 new Key<Integer>("android.scaler.croppingType", int.class);
2353
2354 /**
Ruben Brunk224eb3a2015-06-15 17:32:06 -07002355 * <p>The area of the image sensor which corresponds to active pixels after any geometric
2356 * distortion correction has been applied.</p>
2357 * <p>This is the rectangle representing the size of the active region of the sensor (i.e.
2358 * the region that actually receives light from the scene) after any geometric correction
2359 * has been applied, and should be treated as the maximum size in pixels of any of the
2360 * image output formats aside from the raw formats.</p>
2361 * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of
2362 * the full pixel array, and the size of the full pixel array is given by
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002363 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
Ruben Brunk224eb3a2015-06-15 17:32:06 -07002364 * <p>The coordinate system for most other keys that list pixel coordinates, including
2365 * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, is defined relative to the active array rectangle given in
2366 * this field, with <code>(0, 0)</code> being the top-left of this rectangle.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002367 * <p>The active array may be smaller than the full pixel array, since the full array may
Ruben Brunk224eb3a2015-06-15 17:32:06 -07002368 * include black calibration pixels or other inactive regions, and geometric correction
2369 * resulting in scaling or cropping may have been applied.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002370 * <p><b>Units</b>: Pixel coordinates on the image sensor</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002371 * <p>This key is available on all devices.</p>
2372 *
Ruben Brunk224eb3a2015-06-15 17:32:06 -07002373 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002374 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002375 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002376 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002377 public static final Key<android.graphics.Rect> SENSOR_INFO_ACTIVE_ARRAY_SIZE =
2378 new Key<android.graphics.Rect>("android.sensor.info.activeArraySize", android.graphics.Rect.class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002379
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002380 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002381 * <p>Range of sensitivities for {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} supported by this
2382 * camera device.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002383 * <p>The values are the standard ISO sensitivity values,
2384 * as defined in ISO 12232:2006.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002385 * <p><b>Range of valid values:</b><br>
2386 * Min &lt;= 100, Max &gt;= 800</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002387 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2388 * <p><b>Full capability</b> -
2389 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2390 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002391 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002392 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002393 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002394 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002395 @PublicKey
Ruben Brunk57493682014-05-27 18:58:08 -07002396 public static final Key<android.util.Range<Integer>> SENSOR_INFO_SENSITIVITY_RANGE =
2397 new Key<android.util.Range<Integer>>("android.sensor.info.sensitivityRange", new TypeReference<android.util.Range<Integer>>() {{ }});
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002398
2399 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002400 * <p>The arrangement of color filters on sensor;
Zhijun Hed1784962014-04-08 17:41:46 -07002401 * represents the colors in the top-left 2x2 section of
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002402 * the sensor, in reading order.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002403 * <p><b>Possible values:</b>
2404 * <ul>
2405 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB RGGB}</li>
2406 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG GRBG}</li>
2407 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG GBRG}</li>
2408 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR BGGR}</li>
2409 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB RGB}</li>
2410 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002411 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2412 * <p><b>Full capability</b> -
2413 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2414 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
2415 *
2416 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun Hed1784962014-04-08 17:41:46 -07002417 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB
2418 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG
2419 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG
2420 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR
2421 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB
2422 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002423 @PublicKey
Zhijun Hed1784962014-04-08 17:41:46 -07002424 public static final Key<Integer> SENSOR_INFO_COLOR_FILTER_ARRANGEMENT =
2425 new Key<Integer>("android.sensor.info.colorFilterArrangement", int.class);
2426
2427 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002428 * <p>The range of image exposure times for {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} supported
2429 * by this camera device.</p>
2430 * <p><b>Units</b>: Nanoseconds</p>
2431 * <p><b>Range of valid values:</b><br>
2432 * The minimum exposure time will be less than 100 us. For FULL
Zhijun He28288ca2014-06-25 15:49:13 -07002433 * capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL),
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002434 * the maximum exposure time will be greater than 100ms.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002435 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2436 * <p><b>Full capability</b> -
2437 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2438 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Igor Murashkin6b7ddc42014-02-03 14:39:19 -08002439 *
Zhijun He28288ca2014-06-25 15:49:13 -07002440 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkin6b7ddc42014-02-03 14:39:19 -08002441 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002442 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002443 @PublicKey
Ruben Brunk57493682014-05-27 18:58:08 -07002444 public static final Key<android.util.Range<Long>> SENSOR_INFO_EXPOSURE_TIME_RANGE =
2445 new Key<android.util.Range<Long>>("android.sensor.info.exposureTimeRange", new TypeReference<android.util.Range<Long>>() {{ }});
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002446
2447 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002448 * <p>The maximum possible frame duration (minimum frame rate) for
2449 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} that is supported this camera device.</p>
2450 * <p>Attempting to use frame durations beyond the maximum will result in the frame
2451 * duration being clipped to the maximum. See that control for a full definition of frame
2452 * durations.</p>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07002453 * <p>Refer to {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration }
2454 * for the minimum frame duration values.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002455 * <p><b>Units</b>: Nanoseconds</p>
2456 * <p><b>Range of valid values:</b><br>
2457 * For FULL capability devices
2458 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL), at least 100ms.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002459 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2460 * <p><b>Full capability</b> -
2461 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2462 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Igor Murashkin6b7ddc42014-02-03 14:39:19 -08002463 *
Zhijun He28288ca2014-06-25 15:49:13 -07002464 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002465 * @see CaptureRequest#SENSOR_FRAME_DURATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002466 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002467 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002468 public static final Key<Long> SENSOR_INFO_MAX_FRAME_DURATION =
2469 new Key<Long>("android.sensor.info.maxFrameDuration", long.class);
2470
2471 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002472 * <p>The physical dimensions of the full pixel
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002473 * array.</p>
2474 * <p>This is the physical size of the sensor pixel
2475 * array defined by {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002476 * <p><b>Units</b>: Millimeters</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002477 * <p>This key is available on all devices.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002478 *
2479 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002480 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002481 @PublicKey
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07002482 public static final Key<android.util.SizeF> SENSOR_INFO_PHYSICAL_SIZE =
2483 new Key<android.util.SizeF>("android.sensor.info.physicalSize", android.util.SizeF.class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002484
2485 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002486 * <p>Dimensions of the full pixel array, possibly
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002487 * including black calibration pixels.</p>
Ruben Brunk224eb3a2015-06-15 17:32:06 -07002488 * <p>The pixel count of the full pixel array of the image sensor, which covers
2489 * {@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize} area. This represents the full pixel dimensions of
2490 * the raw buffers produced by this sensor.</p>
2491 * <p>If a camera device supports raw sensor formats, either this or
2492 * {@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 -08002493 * output formats listed in {@link android.hardware.camera2.params.StreamConfigurationMap }
2494 * (this depends on whether or not the image sensor returns buffers containing pixels that
2495 * are not part of the active array region for blacklevel calibration or other purposes).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002496 * <p>Some parts of the full pixel array may not receive light from the scene,
Ruben Brunk224eb3a2015-06-15 17:32:06 -07002497 * or be otherwise inactive. The {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} key
2498 * defines the rectangle of active pixels that will be included in processed image
2499 * formats.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002500 * <p><b>Units</b>: Pixels</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002501 * <p>This key is available on all devices.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002502 *
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002503 * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE
Ruben Brunk224eb3a2015-06-15 17:32:06 -07002504 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002505 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002506 @PublicKey
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07002507 public static final Key<android.util.Size> SENSOR_INFO_PIXEL_ARRAY_SIZE =
2508 new Key<android.util.Size>("android.sensor.info.pixelArraySize", android.util.Size.class);
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002509
2510 /**
Ruben Brunke60e29552014-02-18 10:44:17 -08002511 * <p>Maximum raw value output by sensor.</p>
2512 * <p>This specifies the fully-saturated encoding level for the raw
2513 * sample values from the sensor. This is typically caused by the
2514 * sensor becoming highly non-linear or clipping. The minimum for
2515 * each channel is specified by the offset in the
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002516 * {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} key.</p>
Ruben Brunke60e29552014-02-18 10:44:17 -08002517 * <p>The white level is typically determined either by sensor bit depth
Ruben Brunke89b1202014-03-24 17:10:35 -07002518 * (8-14 bits is expected), or by the point where the sensor response
Ruben Brunke60e29552014-02-18 10:44:17 -08002519 * becomes too non-linear to be useful. The default value for this is
2520 * maximum representable value for a 16-bit raw sample (2^16 - 1).</p>
Zhijun Hecd950b62015-11-12 17:47:52 -08002521 * <p>The white level values of captured images may vary for different
2522 * capture settings (e.g., {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}). This key
2523 * represents a coarse approximation for such case. It is recommended
2524 * to use {@link CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL android.sensor.dynamicWhiteLevel} for captures when supported
2525 * by the camera device, which provides more accurate white level values.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002526 * <p><b>Range of valid values:</b><br>
2527 * &gt; 255 (8-bit output)</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002528 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunke60e29552014-02-18 10:44:17 -08002529 *
2530 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
Zhijun Hecd950b62015-11-12 17:47:52 -08002531 * @see CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL
2532 * @see CaptureRequest#SENSOR_SENSITIVITY
Ruben Brunke60e29552014-02-18 10:44:17 -08002533 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002534 @PublicKey
Ruben Brunke60e29552014-02-18 10:44:17 -08002535 public static final Key<Integer> SENSOR_INFO_WHITE_LEVEL =
2536 new Key<Integer>("android.sensor.info.whiteLevel", int.class);
2537
2538 /**
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07002539 * <p>The time base source for sensor capture start timestamps.</p>
2540 * <p>The timestamps provided for captures are always in nanoseconds and monotonic, but
2541 * may not based on a time source that can be compared to other system time sources.</p>
2542 * <p>This characteristic defines the source for the timestamps, and therefore whether they
2543 * can be compared against other system time sources/timestamps.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002544 * <p><b>Possible values:</b>
2545 * <ul>
2546 * <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN UNKNOWN}</li>
2547 * <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME REALTIME}</li>
2548 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002549 * <p>This key is available on all devices.</p>
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07002550 * @see #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN
2551 * @see #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME
Zhijun He45fa43a12014-06-13 18:29:37 -07002552 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002553 @PublicKey
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07002554 public static final Key<Integer> SENSOR_INFO_TIMESTAMP_SOURCE =
2555 new Key<Integer>("android.sensor.info.timestampSource", int.class);
Zhijun He45fa43a12014-06-13 18:29:37 -07002556
2557 /**
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08002558 * <p>Whether the RAW images output from this camera device are subject to
2559 * lens shading correction.</p>
2560 * <p>If TRUE, all images produced by the camera device in the RAW image formats will
2561 * have lens shading correction already applied to it. If FALSE, the images will
2562 * not be adjusted for lens shading correction.
2563 * See {@link CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW android.request.maxNumOutputRaw} for a list of RAW image formats.</p>
2564 * <p>This key will be <code>null</code> for all devices do not report this information.
2565 * Devices with RAW capability will always report this information in this key.</p>
2566 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2567 *
2568 * @see CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW
2569 */
2570 @PublicKey
2571 public static final Key<Boolean> SENSOR_INFO_LENS_SHADING_APPLIED =
2572 new Key<Boolean>("android.sensor.info.lensShadingApplied", boolean.class);
2573
2574 /**
Ruben Brunk1b02df42015-07-01 12:53:45 -07002575 * <p>The area of the image sensor which corresponds to active pixels prior to the
2576 * application of any geometric distortion correction.</p>
2577 * <p>This is the rectangle representing the size of the active region of the sensor (i.e.
2578 * the region that actually receives light from the scene) before any geometric correction
2579 * has been applied, and should be treated as the active region rectangle for any of the
2580 * raw formats. All metadata associated with raw processing (e.g. the lens shading
2581 * correction map, and radial distortion fields) treats the top, left of this rectangle as
2582 * the origin, (0,0).</p>
2583 * <p>The size of this region determines the maximum field of view and the maximum number of
2584 * pixels that an image from this sensor can contain, prior to the application of
2585 * geometric distortion correction. The effective maximum pixel dimensions of a
2586 * post-distortion-corrected image is given by the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}
2587 * field, and the effective maximum field of view for a post-distortion-corrected image
2588 * can be calculated by applying the geometric distortion correction fields to this
2589 * rectangle, and cropping to the rectangle given in {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
2590 * <p>E.g. to calculate position of a pixel, (x,y), in a processed YUV output image with the
2591 * dimensions in {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} given the position of a pixel,
2592 * (x', y'), in the raw pixel array with dimensions give in
2593 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}:</p>
2594 * <ol>
2595 * <li>Choose a pixel (x', y') within the active array region of the raw buffer given in
2596 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}, otherwise this pixel is considered
2597 * to be outside of the FOV, and will not be shown in the processed output image.</li>
2598 * <li>Apply geometric distortion correction to get the post-distortion pixel coordinate,
2599 * (x_i, y_i). When applying geometric correction metadata, note that metadata for raw
2600 * buffers is defined relative to the top, left of the
2601 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} rectangle.</li>
2602 * <li>If the resulting corrected pixel coordinate is within the region given in
2603 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, then the position of this pixel in the
2604 * processed output image buffer is <code>(x_i - activeArray.left, y_i - activeArray.top)</code>,
2605 * when the top, left coordinate of that buffer is treated as (0, 0).</li>
2606 * </ol>
2607 * <p>Thus, for pixel x',y' = (25, 25) on a sensor where {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}
2608 * is (100,100), {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} is (10, 10, 100, 100),
2609 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} is (20, 20, 80, 80), and the geometric distortion
2610 * correction doesn't change the pixel coordinate, the resulting pixel selected in
2611 * pixel coordinates would be x,y = (25, 25) relative to the top,left of the raw buffer
2612 * with dimensions given in {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}, and would be (5, 5)
2613 * relative to the top,left of post-processed YUV output buffer with dimensions given in
2614 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
2615 * <p>The currently supported fields that correct for geometric distortion are:</p>
2616 * <ol>
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07002617 * <li>{@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}.</li>
Ruben Brunk1b02df42015-07-01 12:53:45 -07002618 * </ol>
2619 * <p>If all of the geometric distortion fields are no-ops, this rectangle will be the same
2620 * as the post-distortion-corrected rectangle given in
2621 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
2622 * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of
2623 * the full pixel array, and the size of the full pixel array is given by
2624 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
2625 * <p>The pre-correction active array may be smaller than the full pixel array, since the
2626 * full array may include black calibration pixels or other inactive regions.</p>
2627 * <p><b>Units</b>: Pixel coordinates on the image sensor</p>
2628 * <p>This key is available on all devices.</p>
2629 *
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07002630 * @see CameraCharacteristics#LENS_DISTORTION
Ruben Brunk1b02df42015-07-01 12:53:45 -07002631 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
2632 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
2633 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
2634 */
2635 @PublicKey
2636 public static final Key<android.graphics.Rect> SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE =
2637 new Key<android.graphics.Rect>("android.sensor.info.preCorrectionActiveArraySize", android.graphics.Rect.class);
2638
2639 /**
Ruben Brunk7c062362014-04-15 23:53:53 -07002640 * <p>The standard reference illuminant used as the scene light source when
2641 * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1},
2642 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and
2643 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} matrices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002644 * <p>The values in this key correspond to the values defined for the
Ruben Brunk7c062362014-04-15 23:53:53 -07002645 * EXIF LightSource tag. These illuminants are standard light sources
2646 * that are often used calibrating camera devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002647 * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1},
Ruben Brunk7c062362014-04-15 23:53:53 -07002648 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and
2649 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} will also be present.</p>
2650 * <p>Some devices may choose to provide a second set of calibration
2651 * information for improved quality, including
2652 * {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2} and its corresponding matrices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002653 * <p><b>Possible values:</b>
2654 * <ul>
2655 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT DAYLIGHT}</li>
2656 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT FLUORESCENT}</li>
2657 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN TUNGSTEN}</li>
2658 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLASH FLASH}</li>
2659 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER FINE_WEATHER}</li>
2660 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER CLOUDY_WEATHER}</li>
2661 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_SHADE SHADE}</li>
2662 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT DAYLIGHT_FLUORESCENT}</li>
2663 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT DAY_WHITE_FLUORESCENT}</li>
2664 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT COOL_WHITE_FLUORESCENT}</li>
2665 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT WHITE_FLUORESCENT}</li>
2666 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A STANDARD_A}</li>
2667 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B STANDARD_B}</li>
2668 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C STANDARD_C}</li>
2669 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D55 D55}</li>
2670 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D65 D65}</li>
2671 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D75 D75}</li>
2672 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D50 D50}</li>
2673 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN ISO_STUDIO_TUNGSTEN}</li>
2674 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002675 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunk7c062362014-04-15 23:53:53 -07002676 *
2677 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1
2678 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM1
2679 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX1
2680 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
2681 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT
2682 * @see #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT
2683 * @see #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN
2684 * @see #SENSOR_REFERENCE_ILLUMINANT1_FLASH
2685 * @see #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER
2686 * @see #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER
2687 * @see #SENSOR_REFERENCE_ILLUMINANT1_SHADE
2688 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT
2689 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT
2690 * @see #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT
2691 * @see #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT
2692 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A
2693 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B
2694 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C
2695 * @see #SENSOR_REFERENCE_ILLUMINANT1_D55
2696 * @see #SENSOR_REFERENCE_ILLUMINANT1_D65
2697 * @see #SENSOR_REFERENCE_ILLUMINANT1_D75
2698 * @see #SENSOR_REFERENCE_ILLUMINANT1_D50
2699 * @see #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN
2700 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002701 @PublicKey
Ruben Brunk7c062362014-04-15 23:53:53 -07002702 public static final Key<Integer> SENSOR_REFERENCE_ILLUMINANT1 =
2703 new Key<Integer>("android.sensor.referenceIlluminant1", int.class);
2704
2705 /**
2706 * <p>The standard reference illuminant used as the scene light source when
2707 * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2},
2708 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and
2709 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} matrices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002710 * <p>See {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1} for more details.</p>
2711 * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2},
Ruben Brunk7c062362014-04-15 23:53:53 -07002712 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and
2713 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} will also be present.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002714 * <p><b>Range of valid values:</b><br>
2715 * Any value listed in {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002716 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunk7c062362014-04-15 23:53:53 -07002717 *
2718 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2
2719 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM2
2720 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX2
2721 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
2722 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002723 @PublicKey
Ruben Brunk7c062362014-04-15 23:53:53 -07002724 public static final Key<Byte> SENSOR_REFERENCE_ILLUMINANT2 =
2725 new Key<Byte>("android.sensor.referenceIlluminant2", byte.class);
2726
2727 /**
2728 * <p>A per-device calibration transform matrix that maps from the
2729 * reference sensor colorspace to the actual device sensor colorspace.</p>
2730 * <p>This matrix is used to correct for per-device variations in the
2731 * sensor colorspace, and is used for processing raw buffer data.</p>
2732 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
2733 * contains a per-device calibration transform that maps colors
2734 * from reference sensor color space (i.e. the "golden module"
2735 * colorspace) into this camera device's native sensor color
2736 * space under the first reference illuminant
2737 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p>
2738 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2739 *
2740 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
2741 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002742 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07002743 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM1 =
2744 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform1", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07002745
2746 /**
2747 * <p>A per-device calibration transform matrix that maps from the
2748 * reference sensor colorspace to the actual device sensor colorspace
2749 * (this is the colorspace of the raw buffer data).</p>
2750 * <p>This matrix is used to correct for per-device variations in the
2751 * sensor colorspace, and is used for processing raw buffer data.</p>
2752 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
2753 * contains a per-device calibration transform that maps colors
2754 * from reference sensor color space (i.e. the "golden module"
2755 * colorspace) into this camera device's native sensor color
2756 * space under the second reference illuminant
2757 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p>
2758 * <p>This matrix will only be present if the second reference
2759 * illuminant is present.</p>
2760 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2761 *
2762 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
2763 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002764 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07002765 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM2 =
2766 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform2", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07002767
2768 /**
2769 * <p>A matrix that transforms color values from CIE XYZ color space to
2770 * reference sensor color space.</p>
2771 * <p>This matrix is used to convert from the standard CIE XYZ color
2772 * space to the reference sensor colorspace, and is used when processing
2773 * raw buffer data.</p>
2774 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
2775 * contains a color transform matrix that maps colors from the CIE
2776 * XYZ color space to the reference sensor color space (i.e. the
2777 * "golden module" colorspace) under the first reference illuminant
2778 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p>
2779 * <p>The white points chosen in both the reference sensor color space
2780 * and the CIE XYZ colorspace when calculating this transform will
2781 * match the standard white point for the first reference illuminant
2782 * (i.e. no chromatic adaptation will be applied by this transform).</p>
2783 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2784 *
2785 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
2786 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002787 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07002788 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM1 =
2789 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform1", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07002790
2791 /**
2792 * <p>A matrix that transforms color values from CIE XYZ color space to
2793 * reference sensor color space.</p>
2794 * <p>This matrix is used to convert from the standard CIE XYZ color
2795 * space to the reference sensor colorspace, and is used when processing
2796 * raw buffer data.</p>
2797 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
2798 * contains a color transform matrix that maps colors from the CIE
2799 * XYZ color space to the reference sensor color space (i.e. the
2800 * "golden module" colorspace) under the second reference illuminant
2801 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p>
2802 * <p>The white points chosen in both the reference sensor color space
2803 * and the CIE XYZ colorspace when calculating this transform will
2804 * match the standard white point for the second reference illuminant
2805 * (i.e. no chromatic adaptation will be applied by this transform).</p>
2806 * <p>This matrix will only be present if the second reference
2807 * illuminant is present.</p>
2808 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2809 *
2810 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
2811 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002812 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07002813 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM2 =
2814 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform2", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07002815
2816 /**
2817 * <p>A matrix that transforms white balanced camera colors from the reference
2818 * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
2819 * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
2820 * is used when processing raw buffer data.</p>
2821 * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
2822 * a color transform matrix that maps white balanced colors from the
2823 * reference sensor color space to the CIE XYZ color space with a D50 white
2824 * point.</p>
2825 * <p>Under the first reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1})
2826 * this matrix is chosen so that the standard white point for this reference
2827 * illuminant in the reference sensor colorspace is mapped to D50 in the
2828 * CIE XYZ colorspace.</p>
2829 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2830 *
2831 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
2832 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002833 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07002834 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX1 =
2835 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix1", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07002836
2837 /**
2838 * <p>A matrix that transforms white balanced camera colors from the reference
2839 * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
2840 * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
2841 * is used when processing raw buffer data.</p>
2842 * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
2843 * a color transform matrix that maps white balanced colors from the
2844 * reference sensor color space to the CIE XYZ color space with a D50 white
2845 * point.</p>
2846 * <p>Under the second reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2})
2847 * this matrix is chosen so that the standard white point for this reference
2848 * illuminant in the reference sensor colorspace is mapped to D50 in the
2849 * CIE XYZ colorspace.</p>
2850 * <p>This matrix will only be present if the second reference
2851 * illuminant is present.</p>
2852 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2853 *
2854 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
2855 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002856 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07002857 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX2 =
2858 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix2", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07002859
2860 /**
Ruben Brunk67b47022014-02-07 15:26:29 -08002861 * <p>A fixed black level offset for each of the color filter arrangement
2862 * (CFA) mosaic channels.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002863 * <p>This key specifies the zero light value for each of the CFA mosaic
Ruben Brunke60e29552014-02-18 10:44:17 -08002864 * channels in the camera sensor. The maximal value output by the
2865 * 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 -07002866 * <p>The values are given in the same order as channels listed for the CFA
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002867 * layout key (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}), i.e. the
Ruben Brunk52842e72014-06-05 13:16:45 -07002868 * nth value given corresponds to the black level offset for the nth
2869 * color channel listed in the CFA.</p>
Zhijun Hecd950b62015-11-12 17:47:52 -08002870 * <p>The black level values of captured images may vary for different
2871 * capture settings (e.g., {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}). This key
2872 * represents a coarse approximation for such case. It is recommended to
2873 * use {@link CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL android.sensor.dynamicBlackLevel} or use pixels from
2874 * {@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions} directly for captures when
2875 * supported by the camera device, which provides more accurate black
2876 * level values. For raw capture in particular, it is recommended to use
2877 * pixels from {@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions} to calculate black
2878 * level values for each frame.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002879 * <p><b>Range of valid values:</b><br>
2880 * &gt;= 0 for each.</p>
Ruben Brunk1ef676f2014-02-07 16:08:38 -08002881 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunke60e29552014-02-18 10:44:17 -08002882 *
Zhijun Hecd950b62015-11-12 17:47:52 -08002883 * @see CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL
Ruben Brunk52842e72014-06-05 13:16:45 -07002884 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
Ruben Brunke60e29552014-02-18 10:44:17 -08002885 * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL
Zhijun Hecd950b62015-11-12 17:47:52 -08002886 * @see CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS
2887 * @see CaptureRequest#SENSOR_SENSITIVITY
Ruben Brunk67b47022014-02-07 15:26:29 -08002888 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002889 @PublicKey
Ruben Brunk52842e72014-06-05 13:16:45 -07002890 public static final Key<android.hardware.camera2.params.BlackLevelPattern> SENSOR_BLACK_LEVEL_PATTERN =
2891 new Key<android.hardware.camera2.params.BlackLevelPattern>("android.sensor.blackLevelPattern", android.hardware.camera2.params.BlackLevelPattern.class);
Ruben Brunk67b47022014-02-07 15:26:29 -08002892
2893 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002894 * <p>Maximum sensitivity that is implemented
Zhijun He153ac102014-02-03 12:25:12 -08002895 * purely through analog gain.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002896 * <p>For {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} values less than or
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002897 * equal to this, all applied gain must be analog. For
Zhijun He153ac102014-02-03 12:25:12 -08002898 * values above this, the gain applied can be a mix of analog and
2899 * digital.</p>
Igor Murashkin3242f4f2014-01-15 12:27:41 -08002900 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002901 * <p><b>Full capability</b> -
2902 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2903 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Alex Raye83c4eb2013-10-02 17:14:36 -07002904 *
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002905 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08002906 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002907 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002908 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002909 public static final Key<Integer> SENSOR_MAX_ANALOG_SENSITIVITY =
2910 new Key<Integer>("android.sensor.maxAnalogSensitivity", int.class);
2911
2912 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002913 * <p>Clockwise angle through which the output image needs to be rotated to be
2914 * upright on the device screen in its native orientation.</p>
2915 * <p>Also defines the direction of rolling shutter readout, which is from top to bottom in
2916 * the sensor's coordinate system.</p>
2917 * <p><b>Units</b>: Degrees of clockwise rotation; always a multiple of
2918 * 90</p>
2919 * <p><b>Range of valid values:</b><br>
2920 * 0, 90, 180, 270</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002921 * <p>This key is available on all devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002922 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002923 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002924 public static final Key<Integer> SENSOR_ORIENTATION =
2925 new Key<Integer>("android.sensor.orientation", int.class);
2926
2927 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002928 * <p>List of sensor test pattern modes for {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}
2929 * supported by this camera device.</p>
2930 * <p>Defaults to OFF, and always includes OFF if defined.</p>
2931 * <p><b>Range of valid values:</b><br>
2932 * Any value listed in {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}</p>
Igor Murashkinc127f052014-01-17 18:06:02 -08002933 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002934 *
2935 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
Igor Murashkinc127f052014-01-17 18:06:02 -08002936 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002937 @PublicKey
Zhijun Hea4866242014-03-27 23:51:34 -07002938 public static final Key<int[]> SENSOR_AVAILABLE_TEST_PATTERN_MODES =
2939 new Key<int[]>("android.sensor.availableTestPatternModes", int[].class);
Igor Murashkinc127f052014-01-17 18:06:02 -08002940
2941 /**
Zhijun Hecd950b62015-11-12 17:47:52 -08002942 * <p>List of disjoint rectangles indicating the sensor
2943 * optically shielded black pixel regions.</p>
2944 * <p>In most camera sensors, the active array is surrounded by some
2945 * optically shielded pixel areas. By blocking light, these pixels
2946 * provides a reliable black reference for black level compensation
2947 * in active array region.</p>
2948 * <p>This key provides a list of disjoint rectangles specifying the
2949 * regions of optically shielded (with metal shield) black pixel
2950 * regions if the camera device is capable of reading out these black
2951 * pixels in the output raw images. In comparison to the fixed black
2952 * level values reported by {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern}, this key
2953 * may provide a more accurate way for the application to calculate
2954 * black level of each captured raw images.</p>
2955 * <p>When this key is reported, the {@link CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL android.sensor.dynamicBlackLevel} and
2956 * {@link CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL android.sensor.dynamicWhiteLevel} will also be reported.</p>
2957 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2958 *
2959 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
2960 * @see CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL
2961 * @see CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL
2962 */
2963 @PublicKey
2964 public static final Key<android.graphics.Rect[]> SENSOR_OPTICAL_BLACK_REGIONS =
2965 new Key<android.graphics.Rect[]>("android.sensor.opticalBlackRegions", android.graphics.Rect[].class);
2966
2967 /**
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08002968 * <p>List of lens shading modes for {@link CaptureRequest#SHADING_MODE android.shading.mode} that are supported by this camera device.</p>
2969 * <p>This list contains lens shading modes that can be set for the camera device.
2970 * Camera devices that support the MANUAL_POST_PROCESSING capability will always
2971 * list OFF and FAST mode. This includes all FULL level devices.
2972 * LEGACY devices will always only support FAST mode.</p>
2973 * <p><b>Range of valid values:</b><br>
2974 * Any value listed in {@link CaptureRequest#SHADING_MODE android.shading.mode}</p>
2975 * <p>This key is available on all devices.</p>
2976 *
2977 * @see CaptureRequest#SHADING_MODE
2978 */
2979 @PublicKey
2980 public static final Key<int[]> SHADING_AVAILABLE_MODES =
2981 new Key<int[]>("android.shading.availableModes", int[].class);
2982
2983 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002984 * <p>List of face detection modes for {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} that are
2985 * supported by this camera device.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002986 * <p>OFF is always supported.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002987 * <p><b>Range of valid values:</b><br>
2988 * Any value listed in {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002989 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002990 *
2991 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002992 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002993 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07002994 public static final Key<int[]> STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES =
2995 new Key<int[]>("android.statistics.info.availableFaceDetectModes", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002996
2997 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002998 * <p>The maximum number of simultaneously detectable
2999 * faces.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003000 * <p><b>Range of valid values:</b><br>
3001 * 0 for cameras without available face detection; otherwise:
3002 * <code>&gt;=4</code> for LIMITED or FULL hwlevel devices or
3003 * <code>&gt;0</code> for LEGACY devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003004 * <p>This key is available on all devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003005 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003006 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003007 public static final Key<Integer> STATISTICS_INFO_MAX_FACE_COUNT =
3008 new Key<Integer>("android.statistics.info.maxFaceCount", int.class);
3009
3010 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003011 * <p>List of hot pixel map output modes for {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode} that are
3012 * supported by this camera device.</p>
3013 * <p>If no hotpixel map output is available for this camera device, this will contain only
3014 * <code>false</code>.</p>
3015 * <p>ON is always supported on devices with the RAW capability.</p>
3016 * <p><b>Range of valid values:</b><br>
3017 * Any value listed in {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003018 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08003019 *
3020 * @see CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE
3021 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003022 @PublicKey
Ruben Brunk9d454fd2014-03-04 14:11:52 -08003023 public static final Key<boolean[]> STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES =
3024 new Key<boolean[]>("android.statistics.info.availableHotPixelMapModes", boolean[].class);
3025
3026 /**
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003027 * <p>List of lens shading map output modes for {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} that
3028 * are supported by this camera device.</p>
3029 * <p>If no lens shading map output is available for this camera device, this key will
3030 * contain only OFF.</p>
3031 * <p>ON is always supported on devices with the RAW capability.
3032 * LEGACY mode devices will always only support OFF.</p>
3033 * <p><b>Range of valid values:</b><br>
3034 * Any value listed in {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode}</p>
3035 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3036 *
3037 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
3038 */
3039 @PublicKey
Yin-Chia Yeh656931d2015-05-22 16:37:27 -07003040 public static final Key<int[]> STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES =
3041 new Key<int[]>("android.statistics.info.availableLensShadingMapModes", int[].class);
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003042
3043 /**
Chien-Yu Chenc9cf5b92018-01-18 12:24:40 -08003044 * <p>List of OIS data output modes for {@link CaptureRequest#STATISTICS_OIS_DATA_MODE android.statistics.oisDataMode} that
3045 * are supported by this camera device.</p>
3046 * <p>If no OIS data output is available for this camera device, this key will
3047 * contain only OFF.</p>
3048 * <p><b>Range of valid values:</b><br>
3049 * Any value listed in {@link CaptureRequest#STATISTICS_OIS_DATA_MODE android.statistics.oisDataMode}</p>
3050 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3051 *
3052 * @see CaptureRequest#STATISTICS_OIS_DATA_MODE
3053 */
3054 @PublicKey
3055 public static final Key<int[]> STATISTICS_INFO_AVAILABLE_OIS_DATA_MODES =
3056 new Key<int[]>("android.statistics.info.availableOisDataModes", int[].class);
3057
3058 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003059 * <p>Maximum number of supported points in the
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003060 * tonemap curve that can be used for {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003061 * <p>If the actual number of points provided by the application (in {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}*) is
3062 * less than this maximum, the camera device will resample the curve to its internal
3063 * representation, using linear interpolation.</p>
Igor Murashkine0060932014-01-17 17:24:11 -08003064 * <p>The output curves in the result metadata may have a different number
3065 * of points than the input curves, and will represent the actual
3066 * hardware curves used as closely as possible when linearly interpolated.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003067 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3068 * <p><b>Full capability</b> -
3069 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3070 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Igor Murashkine0060932014-01-17 17:24:11 -08003071 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003072 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003073 * @see CaptureRequest#TONEMAP_CURVE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003074 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003075 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003076 public static final Key<Integer> TONEMAP_MAX_CURVE_POINTS =
3077 new Key<Integer>("android.tonemap.maxCurvePoints", int.class);
3078
3079 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003080 * <p>List of tonemapping modes for {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} that are supported by this camera
3081 * device.</p>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08003082 * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always contain
3083 * at least one of below mode combinations:</p>
3084 * <ul>
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07003085 * <li>CONTRAST_CURVE, FAST and HIGH_QUALITY</li>
3086 * <li>GAMMA_VALUE, PRESET_CURVE, FAST and HIGH_QUALITY</li>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08003087 * </ul>
3088 * <p>This includes all FULL level devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003089 * <p><b>Range of valid values:</b><br>
3090 * Any value listed in {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003091 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3092 * <p><b>Full capability</b> -
3093 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3094 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08003095 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003096 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk6dc379c2014-03-04 15:04:00 -08003097 * @see CaptureRequest#TONEMAP_MODE
3098 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003099 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07003100 public static final Key<int[]> TONEMAP_AVAILABLE_TONE_MAP_MODES =
3101 new Key<int[]>("android.tonemap.availableToneMapModes", int[].class);
Ruben Brunk6dc379c2014-03-04 15:04:00 -08003102
3103 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003104 * <p>A list of camera LEDs that are available on this system.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003105 * <p><b>Possible values:</b>
3106 * <ul>
3107 * <li>{@link #LED_AVAILABLE_LEDS_TRANSMIT TRANSMIT}</li>
3108 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003109 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003110 * @see #LED_AVAILABLE_LEDS_TRANSMIT
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003111 * @hide
3112 */
3113 public static final Key<int[]> LED_AVAILABLE_LEDS =
3114 new Key<int[]>("android.led.availableLeds", int[].class);
3115
3116 /**
Igor Murashkine46c0da2014-02-07 18:34:37 -08003117 * <p>Generally classifies the overall set of the camera device functionality.</p>
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08003118 * <p>The supported hardware level is a high-level description of the camera device's
3119 * capabilities, summarizing several capabilities into one field. Each level adds additional
3120 * features to the previous one, and is always a strict superset of the previous level.
3121 * The ordering is <code>LEGACY &lt; LIMITED &lt; FULL &lt; LEVEL_3</code>.</p>
3122 * <p>Starting from <code>LEVEL_3</code>, the level enumerations are guaranteed to be in increasing
3123 * numerical value as well. To check if a given device is at least at a given hardware level,
3124 * the following code snippet can be used:</p>
3125 * <pre><code>// Returns true if the device supports the required hardware level, or better.
3126 * boolean isHardwareLevelSupported(CameraCharacteristics c, int requiredLevel) {
3127 * int deviceLevel = c.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
3128 * if (deviceLevel == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY) {
3129 * return requiredLevel == deviceLevel;
3130 * }
3131 * // deviceLevel is not LEGACY, can use numerical sort
3132 * return requiredLevel &lt;= deviceLevel;
3133 * }
3134 * </code></pre>
3135 * <p>At a high level, the levels are:</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08003136 * <ul>
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08003137 * <li><code>LEGACY</code> devices operate in a backwards-compatibility mode for older
3138 * Android devices, and have very limited capabilities.</li>
3139 * <li><code>LIMITED</code> devices represent the
3140 * baseline feature set, and may also include additional capabilities that are
3141 * subsets of <code>FULL</code>.</li>
3142 * <li><code>FULL</code> devices additionally support per-frame manual control of sensor, flash, lens and
3143 * post-processing settings, and image capture at a high rate.</li>
3144 * <li><code>LEVEL_3</code> devices additionally support YUV reprocessing and RAW image capture, along
3145 * with additional output stream configurations.</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -08003146 * </ul>
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08003147 * <p>See the individual level enums for full descriptions of the supported capabilities. The
3148 * {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} entry describes the device's capabilities at a
3149 * finer-grain level, if needed. In addition, many controls have their available settings or
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003150 * ranges defined in individual entries from {@link android.hardware.camera2.CameraCharacteristics }.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003151 * <p>Some features are not part of any particular hardware level or capability and must be
3152 * queried separately. These include:</p>
3153 * <ul>
3154 * <li>Calibrated timestamps ({@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} <code>==</code> REALTIME)</li>
3155 * <li>Precision lens control ({@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} <code>==</code> CALIBRATED)</li>
3156 * <li>Face detection ({@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes})</li>
3157 * <li>Optical or electrical image stabilization
3158 * ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization},
3159 * {@link CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES android.control.availableVideoStabilizationModes})</li>
3160 * </ul>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003161 * <p><b>Possible values:</b>
3162 * <ul>
3163 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED}</li>
3164 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL}</li>
3165 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY LEGACY}</li>
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08003166 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_3 3}</li>
Yin-Chia Yeh43cea5a2018-01-19 11:38:12 -08003167 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL EXTERNAL}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003168 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003169 * <p>This key is available on all devices.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08003170 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003171 * @see CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES
3172 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
3173 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
Igor Murashkine46c0da2014-02-07 18:34:37 -08003174 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003175 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
3176 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003177 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED
3178 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_FULL
Ruben Brunk4a61a862014-07-01 16:00:26 -07003179 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY
Eino-Ville Talvala7c6d73f2016-01-21 13:55:11 -08003180 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_3
Yin-Chia Yeh43cea5a2018-01-19 11:38:12 -08003181 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003182 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003183 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003184 public static final Key<Integer> INFO_SUPPORTED_HARDWARE_LEVEL =
3185 new Key<Integer>("android.info.supportedHardwareLevel", int.class);
3186
Igor Murashkin3865a842014-01-17 18:18:39 -08003187 /**
Chien-Yu Chena1d1d5b2018-01-03 12:14:53 -08003188 * <p>A short string for manufacturer version information about the camera device, such as
3189 * ISP hardware, sensors, etc.</p>
3190 * <p>This can be used in {@link android.media.ExifInterface#TAG_IMAGE_DESCRIPTION TAG_IMAGE_DESCRIPTION}
3191 * in jpeg EXIF. This key may be absent if no version information is available on the
3192 * device.</p>
3193 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3194 */
3195 @PublicKey
3196 public static final Key<String> INFO_VERSION =
3197 new Key<String>("android.info.version", String.class);
3198
3199 /**
Igor Murashkin3865a842014-01-17 18:18:39 -08003200 * <p>The maximum number of frames that can occur after a request
3201 * (different than the previous) has been submitted, and before the
Chien-Yu Chen161a76c2015-06-26 11:23:55 -07003202 * result's state becomes synchronized.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08003203 * <p>This defines the maximum distance (in number of metadata results),
Chien-Yu Chen161a76c2015-06-26 11:23:55 -07003204 * between the frame number of the request that has new controls to apply
3205 * and the frame number of the result that has all the controls applied.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08003206 * <p>In other words this acts as an upper boundary for how many frames
3207 * must occur before the camera device knows for a fact that the new
3208 * submitted camera settings have been applied in outgoing frames.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003209 * <p><b>Units</b>: Frame counts</p>
3210 * <p><b>Possible values:</b>
3211 * <ul>
3212 * <li>{@link #SYNC_MAX_LATENCY_PER_FRAME_CONTROL PER_FRAME_CONTROL}</li>
3213 * <li>{@link #SYNC_MAX_LATENCY_UNKNOWN UNKNOWN}</li>
3214 * </ul></p>
3215 * <p><b>Available values for this device:</b><br>
3216 * A positive value, PER_FRAME_CONTROL, or UNKNOWN.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003217 * <p>This key is available on all devices.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08003218 * @see #SYNC_MAX_LATENCY_PER_FRAME_CONTROL
3219 * @see #SYNC_MAX_LATENCY_UNKNOWN
3220 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003221 @PublicKey
Igor Murashkin3865a842014-01-17 18:18:39 -08003222 public static final Key<Integer> SYNC_MAX_LATENCY =
3223 new Key<Integer>("android.sync.maxLatency", int.class);
3224
Eino-Ville Talvala24c369e2015-02-23 15:55:55 -08003225 /**
Zhijun He513f7c32015-04-24 18:23:54 -07003226 * <p>The maximal camera capture pipeline stall (in unit of frame count) introduced by a
3227 * reprocess capture request.</p>
3228 * <p>The key describes the maximal interference that one reprocess (input) request
3229 * can introduce to the camera simultaneous streaming of regular (output) capture
3230 * requests, including repeating requests.</p>
3231 * <p>When a reprocessing capture request is submitted while a camera output repeating request
3232 * (e.g. preview) is being served by the camera device, it may preempt the camera capture
3233 * pipeline for at least one frame duration so that the camera device is unable to process
3234 * the following capture request in time for the next sensor start of exposure boundary.
3235 * When this happens, the application may observe a capture time gap (longer than one frame
3236 * duration) between adjacent capture output frames, which usually exhibits as preview
3237 * glitch if the repeating request output targets include a preview surface. This key gives
3238 * the worst-case number of frame stall introduced by one reprocess request with any kind of
3239 * formats/sizes combination.</p>
3240 * <p>If this key reports 0, it means a reprocess request doesn't introduce any glitch to the
3241 * ongoing camera repeating request outputs, as if this reprocess request is never issued.</p>
Chien-Yu Chen8062d312015-05-12 14:24:10 -07003242 * <p>This key is supported if the camera device supports PRIVATE or YUV reprocessing (
3243 * i.e. {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains PRIVATE_REPROCESSING or
Zhijun He513f7c32015-04-24 18:23:54 -07003244 * YUV_REPROCESSING).</p>
3245 * <p><b>Units</b>: Number of frames.</p>
3246 * <p><b>Range of valid values:</b><br>
3247 * &lt;= 4</p>
3248 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3249 * <p><b>Limited capability</b> -
3250 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3251 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3252 *
3253 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3254 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
3255 */
3256 @PublicKey
3257 public static final Key<Integer> REPROCESS_MAX_CAPTURE_STALL =
3258 new Key<Integer>("android.reprocess.maxCaptureStall", int.class);
3259
3260 /**
Eino-Ville Talvala24c369e2015-02-23 15:55:55 -08003261 * <p>The available depth dataspace stream
3262 * configurations that this camera device supports
3263 * (i.e. format, width, height, output/input stream).</p>
3264 * <p>These are output stream configurations for use with
3265 * dataSpace HAL_DATASPACE_DEPTH. The configurations are
3266 * listed as <code>(format, width, height, input?)</code> tuples.</p>
3267 * <p>Only devices that support depth output for at least
3268 * the HAL_PIXEL_FORMAT_Y16 dense depth map may include
3269 * this entry.</p>
3270 * <p>A device that also supports the HAL_PIXEL_FORMAT_BLOB
3271 * sparse depth point cloud must report a single entry for
3272 * the format in this list as <code>(HAL_PIXEL_FORMAT_BLOB,
3273 * android.depth.maxDepthSamples, 1, OUTPUT)</code> in addition to
3274 * the entries for HAL_PIXEL_FORMAT_Y16.</p>
3275 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3276 * <p><b>Limited capability</b> -
3277 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3278 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3279 *
3280 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3281 * @hide
3282 */
3283 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS =
3284 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.depth.availableDepthStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
3285
3286 /**
3287 * <p>This lists the minimum frame duration for each
3288 * format/size combination for depth output formats.</p>
3289 * <p>This should correspond to the frame duration when only that
3290 * stream is active, with all processing (typically in android.*.mode)
3291 * set to either OFF or FAST.</p>
3292 * <p>When multiple streams are used in a request, the minimum frame
3293 * duration will be max(individual stream min durations).</p>
3294 * <p>The minimum frame duration of a stream (of a particular format, size)
3295 * is the same regardless of whether the stream is input or output.</p>
3296 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and
3297 * android.scaler.availableStallDurations for more details about
3298 * calculating the max frame rate.</p>
Eino-Ville Talvala24c369e2015-02-23 15:55:55 -08003299 * <p><b>Units</b>: (format, width, height, ns) x n</p>
3300 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3301 * <p><b>Limited capability</b> -
3302 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3303 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3304 *
3305 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3306 * @see CaptureRequest#SENSOR_FRAME_DURATION
3307 * @hide
3308 */
3309 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS =
3310 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
3311
3312 /**
3313 * <p>This lists the maximum stall duration for each
Zhijun He513f7c32015-04-24 18:23:54 -07003314 * output format/size combination for depth streams.</p>
Eino-Ville Talvala24c369e2015-02-23 15:55:55 -08003315 * <p>A stall duration is how much extra time would get added
3316 * to the normal minimum frame duration for a repeating request
3317 * that has streams with non-zero stall.</p>
3318 * <p>This functions similarly to
3319 * android.scaler.availableStallDurations for depth
3320 * streams.</p>
3321 * <p>All depth output stream formats may have a nonzero stall
3322 * duration.</p>
3323 * <p><b>Units</b>: (format, width, height, ns) x n</p>
3324 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3325 * <p><b>Limited capability</b> -
3326 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3327 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3328 *
3329 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3330 * @hide
3331 */
3332 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS =
3333 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
3334
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -07003335 /**
3336 * <p>Indicates whether a capture request may target both a
3337 * DEPTH16 / DEPTH_POINT_CLOUD output, and normal color outputs (such as
3338 * YUV_420_888, JPEG, or RAW) simultaneously.</p>
3339 * <p>If TRUE, including both depth and color outputs in a single
3340 * capture request is not supported. An application must interleave color
3341 * and depth requests. If FALSE, a single request can target both types
3342 * of output.</p>
3343 * <p>Typically, this restriction exists on camera devices that
3344 * need to emit a specific pattern or wavelength of light to
3345 * measure depth values, which causes the color image to be
3346 * corrupted during depth measurement.</p>
3347 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3348 * <p><b>Limited capability</b> -
3349 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3350 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3351 *
3352 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3353 */
3354 @PublicKey
3355 public static final Key<Boolean> DEPTH_DEPTH_IS_EXCLUSIVE =
3356 new Key<Boolean>("android.depth.depthIsExclusive", boolean.class);
3357
Shuzhen Wang23d29382017-11-26 17:24:56 -08003358 /**
3359 * <p>String containing the ids of the underlying physical cameras.</p>
3360 * <p>For a logical camera, this is concatenation of all underlying physical camera ids.
3361 * The null terminator for physical camera id must be preserved so that the whole string
3362 * can be tokenized using '\0' to generate list of physical camera ids.</p>
3363 * <p>For example, if the physical camera ids of the logical camera are "2" and "3", the
3364 * value of this tag will be ['2', '\0', '3', '\0'].</p>
3365 * <p>The number of physical camera ids must be no less than 2.</p>
3366 * <p><b>Units</b>: UTF-8 null-terminated string</p>
3367 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3368 * <p><b>Limited capability</b> -
3369 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3370 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3371 *
3372 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3373 * @hide
3374 */
3375 public static final Key<byte[]> LOGICAL_MULTI_CAMERA_PHYSICAL_IDS =
3376 new Key<byte[]>("android.logicalMultiCamera.physicalIds", byte[].class);
3377
3378 /**
3379 * <p>The accuracy of frame timestamp synchronization between physical cameras</p>
3380 * <p>The accuracy of the frame timestamp synchronization determines the physical cameras'
3381 * ability to start exposure at the same time. If the sensorSyncType is CALIBRATED,
3382 * the physical camera sensors usually run in master-slave mode so that their shutter
3383 * time is synchronized. For APPROXIMATE sensorSyncType, the camera sensors usually run in
3384 * master-master mode, and there could be offset between their start of exposure.</p>
3385 * <p>In both cases, all images generated for a particular capture request still carry the same
3386 * timestamps, so that they can be used to look up the matching frame number and
3387 * onCaptureStarted callback.</p>
3388 * <p><b>Possible values:</b>
3389 * <ul>
3390 * <li>{@link #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE APPROXIMATE}</li>
3391 * <li>{@link #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED CALIBRATED}</li>
3392 * </ul></p>
3393 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3394 * <p><b>Limited capability</b> -
3395 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3396 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3397 *
3398 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
3399 * @see #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE
3400 * @see #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED
3401 */
3402 @PublicKey
3403 public static final Key<Integer> LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE =
3404 new Key<Integer>("android.logicalMultiCamera.sensorSyncType", int.class);
3405
Eino-Ville Talvala41670722018-03-13 19:43:07 -07003406 /**
3407 * <p>List of distortion correction modes for {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} that are
3408 * supported by this camera device.</p>
3409 * <p>No device is required to support this API; such devices will always list only 'OFF'.
3410 * All devices that support this API will list both FAST and HIGH_QUALITY.</p>
3411 * <p><b>Range of valid values:</b><br>
3412 * Any value listed in {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode}</p>
3413 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3414 *
3415 * @see CaptureRequest#DISTORTION_CORRECTION_MODE
3416 */
3417 @PublicKey
3418 public static final Key<int[]> DISTORTION_CORRECTION_AVAILABLE_MODES =
3419 new Key<int[]>("android.distortionCorrection.availableModes", int[].class);
3420
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003421 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
3422 * End generated code
3423 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
Igor Murashkin6c76f582014-07-15 17:19:49 -07003424
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003425
3426
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08003427}