blob: 8f7aed4f5919af73ef716e30f8a8a789eff7755c [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 Talvala70c22072013-08-27 12:09:04 -070019import android.hardware.camera2.impl.CameraMetadataNative;
Igor Murashkin6c76f582014-07-15 17:19:49 -070020import android.hardware.camera2.impl.PublicKey;
21import android.hardware.camera2.impl.SyntheticKey;
Igor Murashkind6d65152014-05-19 16:31:02 -070022import android.hardware.camera2.utils.TypeReference;
Igor Murashkin72f9f0a2014-05-14 15:46:10 -070023import android.util.Rational;
Eino-Ville Talvala70c22072013-08-27 12:09:04 -070024
Igor Murashkin7a36a0f2013-09-10 18:13:09 -070025import java.util.Collections;
26import java.util.List;
27
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080028/**
29 * <p>The properties describing a
30 * {@link CameraDevice CameraDevice}.</p>
31 *
32 * <p>These properties are fixed for a given CameraDevice, and can be queried
33 * through the {@link CameraManager CameraManager}
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -070034 * interface with {@link CameraManager#getCameraCharacteristics}.</p>
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080035 *
Ruben Brunkf967a542014-04-28 16:31:11 -070036 * <p>{@link CameraCharacteristics} objects are immutable.</p>
37 *
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080038 * @see CameraDevice
39 * @see CameraManager
40 */
Igor Murashkind6d65152014-05-19 16:31:02 -070041public final class CameraCharacteristics extends CameraMetadata<CameraCharacteristics.Key<?>> {
42
43 /**
44 * A {@code Key} is used to do camera characteristics field lookups with
45 * {@link CameraCharacteristics#get}.
46 *
47 * <p>For example, to get the stream configuration map:
48 * <code><pre>
49 * StreamConfigurationMap map = cameraCharacteristics.get(
50 * CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);
51 * </pre></code>
52 * </p>
53 *
54 * <p>To enumerate over all possible keys for {@link CameraCharacteristics}, see
55 * {@link CameraCharacteristics#getKeys()}.</p>
56 *
57 * @see CameraCharacteristics#get
58 * @see CameraCharacteristics#getKeys()
59 */
60 public static final class Key<T> {
61 private final CameraMetadataNative.Key<T> mKey;
62
63 /**
64 * Visible for testing and vendor extensions only.
65 *
66 * @hide
67 */
68 public Key(String name, Class<T> type) {
69 mKey = new CameraMetadataNative.Key<T>(name, type);
70 }
71
72 /**
73 * Visible for testing and vendor extensions only.
74 *
75 * @hide
76 */
77 public Key(String name, TypeReference<T> typeReference) {
78 mKey = new CameraMetadataNative.Key<T>(name, typeReference);
79 }
80
81 /**
82 * Return a camelCase, period separated name formatted like:
83 * {@code "root.section[.subsections].name"}.
84 *
85 * <p>Built-in keys exposed by the Android SDK are always prefixed with {@code "android."};
86 * keys that are device/platform-specific are prefixed with {@code "com."}.</p>
87 *
88 * <p>For example, {@code CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP} would
89 * have a name of {@code "android.scaler.streamConfigurationMap"}; whereas a device
90 * specific key might look like {@code "com.google.nexus.data.private"}.</p>
91 *
92 * @return String representation of the key name
93 */
94 public String getName() {
95 return mKey.getName();
96 }
97
98 /**
99 * {@inheritDoc}
100 */
101 @Override
102 public final int hashCode() {
103 return mKey.hashCode();
104 }
105
106 /**
107 * {@inheritDoc}
108 */
109 @SuppressWarnings("unchecked")
110 @Override
111 public final boolean equals(Object o) {
112 return o instanceof Key && ((Key<T>)o).mKey.equals(mKey);
113 }
114
115 /**
116 * Visible for CameraMetadataNative implementation only; do not use.
117 *
118 * TODO: Make this private or remove it altogether.
119 *
120 * @hide
121 */
122 public CameraMetadataNative.Key<T> getNativeKey() {
123 return mKey;
124 }
125
126 @SuppressWarnings({
127 "unused", "unchecked"
128 })
129 private Key(CameraMetadataNative.Key<?> nativeKey) {
130 mKey = (CameraMetadataNative.Key<T>) nativeKey;
131 }
132 }
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700133
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700134 private final CameraMetadataNative mProperties;
Igor Murashkincc542a42014-06-25 11:52:23 -0700135 private List<CameraCharacteristics.Key<?>> mKeys;
Igor Murashkind6d65152014-05-19 16:31:02 -0700136 private List<CaptureRequest.Key<?>> mAvailableRequestKeys;
137 private List<CaptureResult.Key<?>> mAvailableResultKeys;
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700138
139 /**
140 * Takes ownership of the passed-in properties object
141 * @hide
142 */
Igor Murashkin68f40062013-09-10 12:15:54 -0700143 public CameraCharacteristics(CameraMetadataNative properties) {
Igor Murashkind6d65152014-05-19 16:31:02 -0700144 mProperties = CameraMetadataNative.move(properties);
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700145 }
146
Ruben Brunkf967a542014-04-28 16:31:11 -0700147 /**
148 * Returns a copy of the underlying {@link CameraMetadataNative}.
149 * @hide
150 */
151 public CameraMetadataNative getNativeCopy() {
152 return new CameraMetadataNative(mProperties);
153 }
154
Igor Murashkind6d65152014-05-19 16:31:02 -0700155 /**
156 * Get a camera characteristics field value.
157 *
158 * <p>The field definitions can be
159 * found in {@link CameraCharacteristics}.</p>
160 *
161 * <p>Querying the value for the same key more than once will return a value
162 * which is equal to the previous queried value.</p>
163 *
164 * @throws IllegalArgumentException if the key was not valid
165 *
166 * @param key The characteristics field to read.
167 * @return The value of that key, or {@code null} if the field is not set.
168 */
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700169 public <T> T get(Key<T> key) {
170 return mProperties.get(key);
171 }
172
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700173 /**
Igor Murashkind6d65152014-05-19 16:31:02 -0700174 * {@inheritDoc}
175 * @hide
176 */
177 @SuppressWarnings("unchecked")
178 @Override
179 protected <T> T getProtected(Key<?> key) {
180 return (T) mProperties.get(key);
181 }
182
183 /**
184 * {@inheritDoc}
185 * @hide
186 */
187 @SuppressWarnings("unchecked")
188 @Override
189 protected Class<Key<?>> getKeyClass() {
190 Object thisClass = Key.class;
191 return (Class<Key<?>>)thisClass;
192 }
193
194 /**
195 * {@inheritDoc}
196 */
197 @Override
198 public List<Key<?>> getKeys() {
Igor Murashkincc542a42014-06-25 11:52:23 -0700199 // List of keys is immutable; cache the results after we calculate them
200 if (mKeys != null) {
201 return mKeys;
202 }
203
204 int[] filterTags = get(REQUEST_AVAILABLE_CHARACTERISTICS_KEYS);
205 if (filterTags == null) {
206 throw new AssertionError("android.request.availableCharacteristicsKeys must be non-null"
207 + " in the characteristics");
208 }
209
210 mKeys = Collections.unmodifiableList(
211 getKeysStatic(getClass(), getKeyClass(), this, filterTags));
212 return mKeys;
Igor Murashkind6d65152014-05-19 16:31:02 -0700213 }
214
215 /**
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700216 * Returns the list of keys supported by this {@link CameraDevice} for querying
217 * with a {@link CaptureRequest}.
218 *
219 * <p>The list returned is not modifiable, so any attempts to modify it will throw
220 * a {@code UnsupportedOperationException}.</p>
221 *
222 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
223 *
Igor Murashkin68f40062013-09-10 12:15:54 -0700224 * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700225 * {@link #getKeys()} instead.</p>
226 *
227 * @return List of keys supported by this CameraDevice for CaptureRequests.
228 */
Igor Murashkind6d65152014-05-19 16:31:02 -0700229 @SuppressWarnings({"unchecked"})
230 public List<CaptureRequest.Key<?>> getAvailableCaptureRequestKeys() {
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700231 if (mAvailableRequestKeys == null) {
Igor Murashkind6d65152014-05-19 16:31:02 -0700232 Object crKey = CaptureRequest.Key.class;
233 Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey;
234
Igor Murashkincc542a42014-06-25 11:52:23 -0700235 int[] filterTags = get(REQUEST_AVAILABLE_REQUEST_KEYS);
236 if (filterTags == null) {
237 throw new AssertionError("android.request.availableRequestKeys must be non-null "
238 + "in the characteristics");
239 }
240 mAvailableRequestKeys =
241 getAvailableKeyList(CaptureRequest.class, crKeyTyped, filterTags);
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700242 }
243 return mAvailableRequestKeys;
244 }
245
246 /**
247 * Returns the list of keys supported by this {@link CameraDevice} for querying
248 * with a {@link CaptureResult}.
249 *
250 * <p>The list returned is not modifiable, so any attempts to modify it will throw
251 * a {@code UnsupportedOperationException}.</p>
252 *
253 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
254 *
Igor Murashkin68f40062013-09-10 12:15:54 -0700255 * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700256 * {@link #getKeys()} instead.</p>
257 *
258 * @return List of keys supported by this CameraDevice for CaptureResults.
259 */
Igor Murashkind6d65152014-05-19 16:31:02 -0700260 @SuppressWarnings({"unchecked"})
261 public List<CaptureResult.Key<?>> getAvailableCaptureResultKeys() {
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700262 if (mAvailableResultKeys == null) {
Igor Murashkind6d65152014-05-19 16:31:02 -0700263 Object crKey = CaptureResult.Key.class;
264 Class<CaptureResult.Key<?>> crKeyTyped = (Class<CaptureResult.Key<?>>)crKey;
265
Igor Murashkincc542a42014-06-25 11:52:23 -0700266 int[] filterTags = get(REQUEST_AVAILABLE_RESULT_KEYS);
267 if (filterTags == null) {
268 throw new AssertionError("android.request.availableResultKeys must be non-null "
269 + "in the characteristics");
270 }
271 mAvailableResultKeys = getAvailableKeyList(CaptureResult.class, crKeyTyped, filterTags);
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700272 }
273 return mAvailableResultKeys;
274 }
275
276 /**
277 * Returns the list of keys supported by this {@link CameraDevice} by metadataClass.
278 *
279 * <p>The list returned is not modifiable, so any attempts to modify it will throw
280 * a {@code UnsupportedOperationException}.</p>
281 *
282 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
283 *
284 * @param metadataClass The subclass of CameraMetadata that you want to get the keys for.
Igor Murashkind6d65152014-05-19 16:31:02 -0700285 * @param keyClass The class of the metadata key, e.g. CaptureRequest.Key.class
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700286 *
287 * @return List of keys supported by this CameraDevice for metadataClass.
288 *
289 * @throws IllegalArgumentException if metadataClass is not a subclass of CameraMetadata
290 */
Igor Murashkind6d65152014-05-19 16:31:02 -0700291 private <TKey> List<TKey>
Igor Murashkincc542a42014-06-25 11:52:23 -0700292 getAvailableKeyList(Class<?> metadataClass, Class<TKey> keyClass, int[] filterTags) {
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700293
294 if (metadataClass.equals(CameraMetadata.class)) {
295 throw new AssertionError(
296 "metadataClass must be a strict subclass of CameraMetadata");
297 } else if (!CameraMetadata.class.isAssignableFrom(metadataClass)) {
298 throw new AssertionError(
299 "metadataClass must be a subclass of CameraMetadata");
300 }
301
Igor Murashkind6d65152014-05-19 16:31:02 -0700302 List<TKey> staticKeyList = CameraCharacteristics.<TKey>getKeysStatic(
Igor Murashkincc542a42014-06-25 11:52:23 -0700303 metadataClass, keyClass, /*instance*/null, filterTags);
Igor Murashkind6d65152014-05-19 16:31:02 -0700304 return Collections.unmodifiableList(staticKeyList);
Igor Murashkin7a36a0f2013-09-10 18:13:09 -0700305 }
306
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700307 /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
308 * The key entries below this point are generated from metadata
309 * definitions in /system/media/camera/docs. Do not modify by hand or
310 * modify the comment blocks at the start or end.
311 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800312
313 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700314 * <p>List of aberration correction modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode} that are
315 * supported by this camera device.</p>
316 * <p>This key lists the valid modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}. If no
317 * aberration correction modes are available for a device, this list will solely include
Yin-Chia Yeh941aac02015-01-06 10:32:47 -0800318 * OFF mode. All camera devices will support either OFF or FAST mode.</p>
319 * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always list
320 * OFF mode. This includes all FULL level devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700321 * <p>LEGACY devices will always only support FAST mode.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700322 * <p><b>Range of valid values:</b><br>
323 * Any value listed in {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700324 * <p>This key is available on all devices.</p>
Zhijun Hea05e59d2014-07-08 18:27:47 -0700325 *
Zhijun He9e4e4392014-08-18 11:12:32 -0700326 * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
Zhijun Hea05e59d2014-07-08 18:27:47 -0700327 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700328 @PublicKey
Zhijun He9e4e4392014-08-18 11:12:32 -0700329 public static final Key<int[]> COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES =
330 new Key<int[]>("android.colorCorrection.availableAberrationModes", int[].class);
Zhijun Hea05e59d2014-07-08 18:27:47 -0700331
332 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700333 * <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 -0800334 * supported by this camera device.</p>
335 * <p>Not all of the auto-exposure anti-banding modes may be
336 * supported by a given camera device. This field lists the
337 * valid anti-banding modes that the application may request
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700338 * for this camera device with the
Yin-Chia Yeh7b2cae62014-11-25 11:54:18 -0800339 * {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} control.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700340 * <p><b>Range of valid values:</b><br>
341 * Any value listed in {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700342 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700343 *
344 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800345 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700346 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700347 public static final Key<int[]> CONTROL_AE_AVAILABLE_ANTIBANDING_MODES =
348 new Key<int[]>("android.control.aeAvailableAntibandingModes", int[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800349
350 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700351 * <p>List of auto-exposure modes for {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} that are supported by this camera
352 * device.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800353 * <p>Not all the auto-exposure modes may be supported by a
354 * given camera device, especially if no flash unit is
355 * available. This entry lists the valid modes for
356 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} for this camera device.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700357 * <p>All camera devices support ON, and all camera devices with flash
358 * units support ON_AUTO_FLASH and ON_ALWAYS_FLASH.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -0800359 * <p>FULL mode camera devices always support OFF mode,
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800360 * which enables application control of camera exposure time,
361 * sensitivity, and frame duration.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700362 * <p>LEGACY mode camera devices never support OFF mode.
363 * LIMITED mode devices support OFF if they support the MANUAL_SENSOR
364 * capability.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700365 * <p><b>Range of valid values:</b><br>
366 * Any value listed in {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700367 * <p>This key is available on all devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800368 *
369 * @see CaptureRequest#CONTROL_AE_MODE
370 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700371 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700372 public static final Key<int[]> CONTROL_AE_AVAILABLE_MODES =
373 new Key<int[]>("android.control.aeAvailableModes", int[].class);
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800374
375 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700376 * <p>List of frame rate ranges for {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} supported by
377 * this camera device.</p>
378 * <p>For devices at the LIMITED level or above, this list will include at least (30, 30) for
379 * constant-framerate recording.</p>
380 * <p><b>Units</b>: Frames per second (FPS)</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700381 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700382 *
383 * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800384 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700385 @PublicKey
Igor Murashkin78712a82014-05-27 18:32:18 -0700386 public static final Key<android.util.Range<Integer>[]> CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES =
387 new Key<android.util.Range<Integer>[]>("android.control.aeAvailableTargetFpsRanges", new TypeReference<android.util.Range<Integer>[]>() {{ }});
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800388
389 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700390 * <p>Maximum and minimum exposure compensation values for
391 * {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}, in counts of {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep},
392 * that are supported by this camera device.</p>
393 * <p><b>Range of valid values:</b><br></p>
Zhijun Hef1745ce2015-02-04 13:55:14 -0800394 * <p>Range [0,0] indicates that exposure compensation is not supported.</p>
395 * <p>For LIMITED and FULL devices, range must follow below requirements if exposure
396 * compensation is supported (<code>range != [0, 0]</code>):</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700397 * <p><code>Min.exposure compensation * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} &lt;= -2 EV</code></p>
398 * <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 -0800399 * <p>LEGACY devices may support a smaller range than this.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700400 * <p>This key is available on all devices.</p>
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -0800401 *
402 * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700403 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800404 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700405 @PublicKey
Igor Murashkin78712a82014-05-27 18:32:18 -0700406 public static final Key<android.util.Range<Integer>> CONTROL_AE_COMPENSATION_RANGE =
407 new Key<android.util.Range<Integer>>("android.control.aeCompensationRange", new TypeReference<android.util.Range<Integer>>() {{ }});
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800408
409 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700410 * <p>Smallest step by which the exposure compensation
411 * can be changed.</p>
412 * <p>This is the unit for {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}. For example, if this key has
413 * 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
414 * that the target EV offset for the auto-exposure routine is -1 EV.</p>
415 * <p>One unit of EV compensation changes the brightness of the captured image by a factor
416 * of two. +1 EV doubles the image brightness, while -1 EV halves the image brightness.</p>
417 * <p><b>Units</b>: Exposure Value (EV)</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700418 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700419 *
420 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800421 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700422 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700423 public static final Key<Rational> CONTROL_AE_COMPENSATION_STEP =
424 new Key<Rational>("android.control.aeCompensationStep", Rational.class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800425
426 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700427 * <p>List of auto-focus (AF) modes for {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} that are
428 * supported by this camera device.</p>
Zhijun He78146ec2014-01-14 18:12:13 -0800429 * <p>Not all the auto-focus modes may be supported by a
430 * given camera device. This entry lists the valid modes for
431 * {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} for this camera device.</p>
Ruben Brunk6f387092014-09-22 16:13:54 -0700432 * <p>All LIMITED and FULL mode camera devices will support OFF mode, and all
433 * camera devices with adjustable focuser units
434 * (<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 -0700435 * <p>LEGACY devices will support OFF mode only if they support
436 * focusing to infinity (by also setting {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} to
437 * <code>0.0f</code>).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700438 * <p><b>Range of valid values:</b><br>
439 * Any value listed in {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700440 * <p>This key is available on all devices.</p>
Zhijun He78146ec2014-01-14 18:12:13 -0800441 *
442 * @see CaptureRequest#CONTROL_AF_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700443 * @see CaptureRequest#LENS_FOCUS_DISTANCE
Zhijun He78146ec2014-01-14 18:12:13 -0800444 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800445 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700446 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700447 public static final Key<int[]> CONTROL_AF_AVAILABLE_MODES =
448 new Key<int[]>("android.control.afAvailableModes", int[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800449
450 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700451 * <p>List of color effects for {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode} that are supported by this camera
452 * device.</p>
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -0800453 * <p>This list contains the color effect modes that can be applied to
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700454 * images produced by the camera device.
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -0800455 * Implementations are not expected to be consistent across all devices.
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700456 * If no color effect modes are available for a device, this will only list
457 * OFF.</p>
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -0800458 * <p>A color effect will only be applied if
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700459 * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF. OFF is always included in this list.</p>
460 * <p>This control has no effect on the operation of other control routines such
461 * as auto-exposure, white balance, or focus.</p>
462 * <p><b>Range of valid values:</b><br>
463 * Any value listed in {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700464 * <p>This key is available on all devices.</p>
Ruben Brunk5f1dcfe2014-01-17 16:42:51 -0800465 *
466 * @see CaptureRequest#CONTROL_EFFECT_MODE
467 * @see CaptureRequest#CONTROL_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700468 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700469 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700470 public static final Key<int[]> CONTROL_AVAILABLE_EFFECTS =
471 new Key<int[]>("android.control.availableEffects", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700472
473 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700474 * <p>List of scene modes for {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} that are supported by this camera
475 * device.</p>
Ruben Brunk8237d342014-01-17 15:33:02 -0800476 * <p>This list contains scene modes that can be set for the camera device.
477 * Only scene modes that have been fully implemented for the
478 * camera device may be included here. Implementations are not expected
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700479 * to be consistent across all devices.</p>
480 * <p>If no scene modes are supported by the camera device, this
481 * will be set to DISABLED. Otherwise DISABLED will not be listed.</p>
482 * <p>FACE_PRIORITY is always listed if face detection is
483 * supported (i.e.<code>{@link CameraCharacteristics#STATISTICS_INFO_MAX_FACE_COUNT android.statistics.info.maxFaceCount} &gt;
484 * 0</code>).</p>
485 * <p><b>Range of valid values:</b><br>
486 * Any value listed in {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700487 * <p>This key is available on all devices.</p>
Ruben Brunk8237d342014-01-17 15:33:02 -0800488 *
489 * @see CaptureRequest#CONTROL_SCENE_MODE
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700490 * @see CameraCharacteristics#STATISTICS_INFO_MAX_FACE_COUNT
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700491 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700492 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700493 public static final Key<int[]> CONTROL_AVAILABLE_SCENE_MODES =
494 new Key<int[]>("android.control.availableSceneModes", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700495
496 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700497 * <p>List of video stabilization modes for {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}
498 * that are supported by this camera device.</p>
499 * <p>OFF will always be listed.</p>
500 * <p><b>Range of valid values:</b><br>
501 * Any value listed in {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700502 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700503 *
504 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700505 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700506 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700507 public static final Key<int[]> CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES =
508 new Key<int[]>("android.control.availableVideoStabilizationModes", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700509
510 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700511 * <p>List of auto-white-balance modes for {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} that are supported by this
512 * camera device.</p>
Zhijun He399f05d2014-01-15 11:31:30 -0800513 * <p>Not all the auto-white-balance modes may be supported by a
514 * given camera device. This entry lists the valid modes for
515 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} for this camera device.</p>
516 * <p>All camera devices will support ON mode.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700517 * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always support OFF
518 * mode, which enables application control of white balance, by using
519 * {@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
520 * mode camera devices.</p>
521 * <p><b>Range of valid values:</b><br>
522 * Any value listed in {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700523 * <p>This key is available on all devices.</p>
Zhijun He399f05d2014-01-15 11:31:30 -0800524 *
Zhijun He399f05d2014-01-15 11:31:30 -0800525 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -0800526 * @see CaptureRequest#COLOR_CORRECTION_MODE
527 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
528 * @see CaptureRequest#CONTROL_AWB_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700529 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700530 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700531 public static final Key<int[]> CONTROL_AWB_AVAILABLE_MODES =
532 new Key<int[]>("android.control.awbAvailableModes", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700533
534 /**
Ruben Brunk90bc34e2014-02-03 17:54:24 -0800535 * <p>List of the maximum number of regions that can be used for metering in
536 * auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF);
537 * this corresponds to the the maximum number of elements in
538 * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}, {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions},
539 * and {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700540 * <p><b>Range of valid values:</b><br></p>
541 * <p>Value must be &gt;= 0 for each element. For full-capability devices
542 * this value must be &gt;= 1 for AE and AF. The order of the elements is:
543 * <code>(AE, AWB, AF)</code>.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700544 * <p>This key is available on all devices.</p>
Ruben Brunk90bc34e2014-02-03 17:54:24 -0800545 *
546 * @see CaptureRequest#CONTROL_AE_REGIONS
547 * @see CaptureRequest#CONTROL_AF_REGIONS
548 * @see CaptureRequest#CONTROL_AWB_REGIONS
Igor Murashkin78712a82014-05-27 18:32:18 -0700549 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700550 */
Ruben Brunk90bc34e2014-02-03 17:54:24 -0800551 public static final Key<int[]> CONTROL_MAX_REGIONS =
552 new Key<int[]>("android.control.maxRegions", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700553
554 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700555 * <p>The maximum number of metering regions that can be used by the auto-exposure (AE)
556 * routine.</p>
557 * <p>This corresponds to the the maximum allowed number of elements in
Igor Murashkin78712a82014-05-27 18:32:18 -0700558 * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700559 * <p><b>Range of valid values:</b><br>
560 * Value will be &gt;= 0. For FULL-capability devices, this
561 * value will be &gt;= 1.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700562 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -0700563 *
564 * @see CaptureRequest#CONTROL_AE_REGIONS
565 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700566 @PublicKey
567 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -0700568 public static final Key<Integer> CONTROL_MAX_REGIONS_AE =
569 new Key<Integer>("android.control.maxRegionsAe", int.class);
570
571 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700572 * <p>The maximum number of metering regions that can be used by the auto-white balance (AWB)
573 * routine.</p>
574 * <p>This corresponds to the the maximum allowed number of elements in
Igor Murashkin78712a82014-05-27 18:32:18 -0700575 * {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700576 * <p><b>Range of valid values:</b><br>
577 * Value will be &gt;= 0.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700578 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -0700579 *
580 * @see CaptureRequest#CONTROL_AWB_REGIONS
581 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700582 @PublicKey
583 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -0700584 public static final Key<Integer> CONTROL_MAX_REGIONS_AWB =
585 new Key<Integer>("android.control.maxRegionsAwb", int.class);
586
587 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700588 * <p>The maximum number of metering regions that can be used by the auto-focus (AF) routine.</p>
589 * <p>This corresponds to the the maximum allowed number of elements in
Igor Murashkin78712a82014-05-27 18:32:18 -0700590 * {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700591 * <p><b>Range of valid values:</b><br>
592 * Value will be &gt;= 0. For FULL-capability devices, this
593 * value will be &gt;= 1.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700594 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -0700595 *
596 * @see CaptureRequest#CONTROL_AF_REGIONS
597 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700598 @PublicKey
599 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -0700600 public static final Key<Integer> CONTROL_MAX_REGIONS_AF =
601 new Key<Integer>("android.control.maxRegionsAf", int.class);
602
603 /**
Zhijun Hee0404182014-06-26 13:17:09 -0700604 * <p>List of available high speed video size and fps range configurations
605 * supported by the camera device, in the format of (width, height, fps_min, fps_max).</p>
606 * <p>When HIGH_SPEED_VIDEO is supported in {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes},
607 * this metadata will list the supported high speed video size and fps range
608 * configurations. All the sizes listed in this configuration will be a subset
609 * of the sizes reported by StreamConfigurationMap#getOutputSizes for processed
610 * non-stalling formats.</p>
611 * <p>For the high speed video use case, where the application will set
612 * {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} to HIGH_SPEED_VIDEO in capture requests, the application must
613 * select the video size and fps range from this metadata to configure the recording and
614 * preview streams and setup the recording requests. For example, if the application intends
615 * to do high speed recording, it can select the maximum size reported by this metadata to
616 * configure output streams. Once the size is selected, application can filter this metadata
617 * 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 -0700618 * recording requests. Note that for the use case of multiple output streams, application
619 * must select one unique size from this metadata to use. Otherwise a request error might
620 * occur.</p>
Zhijun Hee0404182014-06-26 13:17:09 -0700621 * <p>For normal video recording use case, where some application will NOT set
622 * {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} to HIGH_SPEED_VIDEO in capture requests, the fps ranges
623 * reported in this metadata must not be used to setup capture requests, or it will cause
624 * request error.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700625 * <p><b>Range of valid values:</b><br></p>
626 * <p>For each configuration, the fps_max &gt;= 60fps.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700627 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
628 * <p><b>Limited capability</b> -
629 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
630 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun Hee0404182014-06-26 13:17:09 -0700631 *
632 * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES
633 * @see CaptureRequest#CONTROL_SCENE_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700634 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun Hee0404182014-06-26 13:17:09 -0700635 * @hide
636 */
Yin-Chia Yeh12da1402014-07-15 10:37:31 -0700637 public static final Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]> CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS =
638 new Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]>("android.control.availableHighSpeedVideoConfigurations", android.hardware.camera2.params.HighSpeedVideoConfiguration[].class);
Zhijun Hee0404182014-06-26 13:17:09 -0700639
640 /**
Yin-Chia Yehdc0ba092015-02-20 15:52:06 -0800641 * <p>Whether the camera device supports {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</p>
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700642 * <p>Devices with MANUAL_SENSOR capability or BURST_CAPTURE capability will always
643 * list <code>true</code>. This includes FULL devices.</p>
Yin-Chia Yehdc0ba092015-02-20 15:52:06 -0800644 * <p>This key is available on all devices.</p>
645 *
646 * @see CaptureRequest#CONTROL_AE_LOCK
647 */
648 @PublicKey
649 public static final Key<Boolean> CONTROL_AE_LOCK_AVAILABLE =
650 new Key<Boolean>("android.control.aeLockAvailable", boolean.class);
651
652 /**
653 * <p>Whether the camera device supports {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</p>
Yin-Chia Yeh7e3e4312015-04-02 14:34:30 -0700654 * <p>Devices with MANUAL_POST_PROCESSING capability or BURST_CAPTURE capability will
655 * always list <code>true</code>. This includes FULL devices.</p>
Yin-Chia Yehdc0ba092015-02-20 15:52:06 -0800656 * <p>This key is available on all devices.</p>
657 *
658 * @see CaptureRequest#CONTROL_AWB_LOCK
659 */
660 @PublicKey
661 public static final Key<Boolean> CONTROL_AWB_LOCK_AVAILABLE =
662 new Key<Boolean>("android.control.awbLockAvailable", boolean.class);
663
664 /**
665 * <p>List of control modes for {@link CaptureRequest#CONTROL_MODE android.control.mode} that are supported by this camera
666 * device.</p>
667 * <p>This list contains control modes that can be set for the camera device.
668 * LEGACY mode devices will always support AUTO mode. LIMITED and FULL
669 * devices will always support OFF, AUTO modes.</p>
670 * <p><b>Range of valid values:</b><br>
671 * Any value listed in {@link CaptureRequest#CONTROL_MODE android.control.mode}</p>
672 * <p>This key is available on all devices.</p>
673 *
674 * @see CaptureRequest#CONTROL_MODE
675 */
676 @PublicKey
677 public static final Key<int[]> CONTROL_AVAILABLE_MODES =
678 new Key<int[]>("android.control.availableModes", int[].class);
679
680 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700681 * <p>List of edge enhancement modes for {@link CaptureRequest#EDGE_MODE android.edge.mode} that are supported by this camera
682 * device.</p>
683 * <p>Full-capability camera devices must always support OFF; all devices will list FAST.</p>
684 * <p><b>Range of valid values:</b><br>
685 * Any value listed in {@link CaptureRequest#EDGE_MODE android.edge.mode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700686 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
687 * <p><b>Full capability</b> -
688 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
689 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -0800690 *
691 * @see CaptureRequest#EDGE_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700692 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk6dc379c2014-03-04 15:04:00 -0800693 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700694 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700695 public static final Key<int[]> EDGE_AVAILABLE_EDGE_MODES =
696 new Key<int[]>("android.edge.availableEdgeModes", int[].class);
Ruben Brunk6dc379c2014-03-04 15:04:00 -0800697
698 /**
Zhijun Heca1b73a2014-02-03 12:39:53 -0800699 * <p>Whether this camera device has a
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700700 * flash unit.</p>
701 * <p>Will be <code>false</code> if no flash is available.</p>
702 * <p>If there is no flash unit, none of the flash controls do
703 * anything.
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700704 * This key is available on all devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700705 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700706 @PublicKey
Zhijun Heca1b73a2014-02-03 12:39:53 -0800707 public static final Key<Boolean> FLASH_INFO_AVAILABLE =
708 new Key<Boolean>("android.flash.info.available", boolean.class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700709
710 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700711 * <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 -0800712 * camera device.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -0800713 * <p>FULL mode camera devices will always support FAST.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700714 * <p><b>Range of valid values:</b><br>
715 * Any value listed in {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700716 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -0800717 *
718 * @see CaptureRequest#HOT_PIXEL_MODE
719 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700720 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700721 public static final Key<int[]> HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES =
722 new Key<int[]>("android.hotPixel.availableHotPixelModes", int[].class);
Ruben Brunk9d454fd2014-03-04 14:11:52 -0800723
724 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700725 * <p>List of JPEG thumbnail sizes for {@link CaptureRequest#JPEG_THUMBNAIL_SIZE android.jpeg.thumbnailSize} supported by this
726 * camera device.</p>
727 * <p>This list will include at least one non-zero resolution, plus <code>(0,0)</code> for indicating no
728 * thumbnail should be generated.</p>
Zhijun He5f2a47f2014-01-16 15:44:41 -0800729 * <p>Below condiditions will be satisfied for this size list:</p>
Zhijun He5a9ff372013-12-26 11:49:09 -0800730 * <ul>
Zhijun He5f2a47f2014-01-16 15:44:41 -0800731 * <li>The sizes will be sorted by increasing pixel area (width x height).
732 * If several resolutions have the same area, they will be sorted by increasing width.</li>
733 * <li>The aspect ratio of the largest thumbnail size will be same as the
Igor Murashkin9c595172014-05-12 13:56:20 -0700734 * aspect ratio of largest JPEG output size in android.scaler.availableStreamConfigurations.
Zhijun He5a9ff372013-12-26 11:49:09 -0800735 * The largest size is defined as the size that has the largest pixel area
736 * in a given size list.</li>
Igor Murashkin9c595172014-05-12 13:56:20 -0700737 * <li>Each output JPEG size in android.scaler.availableStreamConfigurations will have at least
Zhijun He5a9ff372013-12-26 11:49:09 -0800738 * one corresponding size that has the same aspect ratio in availableThumbnailSizes,
739 * and vice versa.</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700740 * <li>All non-<code>(0, 0)</code> sizes will have non-zero widths and heights.
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700741 * This key is available on all devices.</li>
Zhijun He5a9ff372013-12-26 11:49:09 -0800742 * </ul>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700743 *
744 * @see CaptureRequest#JPEG_THUMBNAIL_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700745 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700746 @PublicKey
Igor Murashkin72f9f0a2014-05-14 15:46:10 -0700747 public static final Key<android.util.Size[]> JPEG_AVAILABLE_THUMBNAIL_SIZES =
748 new Key<android.util.Size[]>("android.jpeg.availableThumbnailSizes", android.util.Size[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700749
750 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700751 * <p>List of aperture size values for {@link CaptureRequest#LENS_APERTURE android.lens.aperture} that are
752 * supported by this camera device.</p>
753 * <p>If the camera device doesn't support a variable lens aperture,
754 * this list will contain only one value, which is the fixed aperture size.</p>
755 * <p>If the camera device supports a variable aperture, the aperture values
Zhijun Hefb46c642014-01-14 17:57:23 -0800756 * in this list will be sorted in ascending order.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700757 * <p><b>Units</b>: The aperture f-number</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700758 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
759 * <p><b>Full capability</b> -
760 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
761 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
762 *
763 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700764 * @see CaptureRequest#LENS_APERTURE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700765 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700766 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700767 public static final Key<float[]> LENS_INFO_AVAILABLE_APERTURES =
768 new Key<float[]>("android.lens.info.availableApertures", float[].class);
769
770 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700771 * <p>List of neutral density filter values for
772 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} that are supported by this camera device.</p>
773 * <p>If a neutral density filter is not supported by this camera device,
774 * this list will contain only 0. Otherwise, this list will include every
775 * filter density supported by the camera device, in ascending order.</p>
776 * <p><b>Units</b>: Exposure value (EV)</p>
777 * <p><b>Range of valid values:</b><br></p>
778 * <p>Values are &gt;= 0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700779 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
780 * <p><b>Full capability</b> -
781 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
782 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk855bae42014-01-17 10:30:32 -0800783 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700784 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk855bae42014-01-17 10:30:32 -0800785 * @see CaptureRequest#LENS_FILTER_DENSITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700786 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700787 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700788 public static final Key<float[]> LENS_INFO_AVAILABLE_FILTER_DENSITIES =
789 new Key<float[]>("android.lens.info.availableFilterDensities", float[].class);
790
791 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700792 * <p>List of focal lengths for {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength} that are supported by this camera
793 * device.</p>
794 * <p>If optical zoom is not supported, this list will only contain
795 * a single value corresponding to the fixed focal length of the
796 * device. Otherwise, this list will include every focal length supported
797 * by the camera device, in ascending order.</p>
798 * <p><b>Units</b>: Millimeters</p>
799 * <p><b>Range of valid values:</b><br></p>
800 * <p>Values are &gt; 0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700801 * <p>This key is available on all devices.</p>
Ruben Brunka20f4c22014-01-17 15:21:13 -0800802 *
803 * @see CaptureRequest#LENS_FOCAL_LENGTH
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700804 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700805 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700806 public static final Key<float[]> LENS_INFO_AVAILABLE_FOCAL_LENGTHS =
807 new Key<float[]>("android.lens.info.availableFocalLengths", float[].class);
808
809 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700810 * <p>List of optical image stabilization (OIS) modes for
811 * {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} that are supported by this camera device.</p>
812 * <p>If OIS is not supported by a given camera device, this list will
Ruben Brunk00849b32014-01-17 18:30:23 -0800813 * contain only OFF.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700814 * <p><b>Range of valid values:</b><br>
815 * Any value listed in {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700816 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
817 * <p><b>Limited capability</b> -
818 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
819 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk00849b32014-01-17 18:30:23 -0800820 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700821 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk00849b32014-01-17 18:30:23 -0800822 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700823 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700824 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700825 public static final Key<int[]> LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION =
826 new Key<int[]>("android.lens.info.availableOpticalStabilization", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700827
828 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700829 * <p>Hyperfocal distance for this lens.</p>
Zhijun Heff413932014-02-07 15:44:30 -0800830 * <p>If the lens is not fixed focus, the camera device will report this
831 * 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 -0700832 * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p>
833 * <p><b>Range of valid values:</b><br>
834 * If lens is fixed focus, &gt;= 0. If lens has focuser unit, the value is
835 * within <code>(0.0f, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code></p>
836 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
837 * <p><b>Limited capability</b> -
838 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
839 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
840 *
841 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
842 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
843 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
844 */
845 @PublicKey
846 public static final Key<Float> LENS_INFO_HYPERFOCAL_DISTANCE =
847 new Key<Float>("android.lens.info.hyperfocalDistance", float.class);
848
849 /**
850 * <p>Shortest distance from frontmost surface
851 * of the lens that can be brought into sharp focus.</p>
852 * <p>If the lens is fixed-focus, this will be
853 * 0.</p>
854 * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p>
855 * <p><b>Range of valid values:</b><br>
856 * &gt;= 0</p>
Zhijun Heff413932014-02-07 15:44:30 -0800857 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700858 * <p><b>Limited capability</b> -
859 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
860 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun Heff413932014-02-07 15:44:30 -0800861 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700862 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun Heff413932014-02-07 15:44:30 -0800863 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700864 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700865 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700866 public static final Key<Float> LENS_INFO_MINIMUM_FOCUS_DISTANCE =
867 new Key<Float>("android.lens.info.minimumFocusDistance", float.class);
868
869 /**
Igor Murashkin7a9b30e2013-12-11 13:31:38 -0800870 * <p>Dimensions of lens shading map.</p>
871 * <p>The map should be on the order of 30-40 rows and columns, and
872 * must be smaller than 64x64.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700873 * <p><b>Range of valid values:</b><br>
874 * Both values &gt;= 1</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700875 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
876 * <p><b>Full capability</b> -
877 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
878 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
879 *
880 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk57493682014-05-27 18:58:08 -0700881 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700882 */
Igor Murashkin72f9f0a2014-05-14 15:46:10 -0700883 public static final Key<android.util.Size> LENS_INFO_SHADING_MAP_SIZE =
884 new Key<android.util.Size>("android.lens.info.shadingMapSize", android.util.Size.class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700885
886 /**
Zhijun Heff413932014-02-07 15:44:30 -0800887 * <p>The lens focus distance calibration quality.</p>
888 * <p>The lens focus distance calibration quality determines the reliability of
889 * focus related metadata entries, i.e. {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
890 * {@link CaptureResult#LENS_FOCUS_RANGE android.lens.focusRange}, {@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}, and
891 * {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700892 * <p>APPROXIMATE and CALIBRATED devices report the focus metadata in
893 * units of diopters (1/meter), so <code>0.0f</code> represents focusing at infinity,
894 * and increasing positive numbers represent focusing closer and closer
895 * to the camera device. The focus distance control also uses diopters
896 * on these devices.</p>
897 * <p>UNCALIBRATED devices do not use units that are directly comparable
898 * to any real physical measurement, but <code>0.0f</code> still represents farthest
899 * focus, and {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} represents the
900 * nearest focus the device can achieve.</p>
901 * <p><b>Possible values:</b>
902 * <ul>
903 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED UNCALIBRATED}</li>
904 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE APPROXIMATE}</li>
905 * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED CALIBRATED}</li>
906 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700907 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
908 * <p><b>Limited capability</b> -
909 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
910 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun Heff413932014-02-07 15:44:30 -0800911 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700912 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun Heff413932014-02-07 15:44:30 -0800913 * @see CaptureRequest#LENS_FOCUS_DISTANCE
914 * @see CaptureResult#LENS_FOCUS_RANGE
915 * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE
916 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
917 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED
918 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE
919 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED
920 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700921 @PublicKey
Zhijun Heff413932014-02-07 15:44:30 -0800922 public static final Key<Integer> LENS_INFO_FOCUS_DISTANCE_CALIBRATION =
923 new Key<Integer>("android.lens.info.focusDistanceCalibration", int.class);
924
925 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -0800926 * <p>Direction the camera faces relative to
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700927 * device screen.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700928 * <p><b>Possible values:</b>
929 * <ul>
930 * <li>{@link #LENS_FACING_FRONT FRONT}</li>
931 * <li>{@link #LENS_FACING_BACK BACK}</li>
Zhijun He503e8152015-01-12 15:16:56 -0800932 * <li>{@link #LENS_FACING_EXTERNAL EXTERNAL}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700933 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700934 * <p>This key is available on all devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700935 * @see #LENS_FACING_FRONT
936 * @see #LENS_FACING_BACK
Zhijun He503e8152015-01-12 15:16:56 -0800937 * @see #LENS_FACING_EXTERNAL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700938 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700939 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700940 public static final Key<Integer> LENS_FACING =
941 new Key<Integer>("android.lens.facing", int.class);
942
943 /**
Eino-Ville Talvala046a9782015-04-08 20:05:56 +0000944 * <p>The orientation of the camera relative to the sensor
945 * coordinate system.</p>
946 * <p>The four coefficients that describe the quarternion
947 * rotation from the Android sensor coordinate system to a
948 * camera-aligned coordinate system where the X-axis is
949 * aligned with the long side of the image sensor, the Y-axis
950 * is aligned with the short side of the image sensor, and
951 * the Z-axis is aligned with the optical axis of the sensor.</p>
952 * <p>To convert from the quarternion coefficients <code>(x,y,z,w)</code>
953 * to the axis of rotation <code>(a_x, a_y, a_z)</code> and rotation
954 * amount <code>theta</code>, the following formulas can be used:</p>
955 * <pre><code> theta = 2 * acos(w)
956 * a_x = x / sin(theta/2)
957 * a_y = y / sin(theta/2)
958 * a_z = z / sin(theta/2)
959 * </code></pre>
960 * <p>To create a 3x3 rotation matrix that applies the rotation
961 * defined by this quarternion, the following matrix can be
962 * used:</p>
963 * <pre><code>R = [ 1 - 2y^2 - 2z^2, 2xy - 2zw, 2xz + 2yw,
964 * 2xy + 2zw, 1 - 2x^2 - 2z^2, 2yz - 2xw,
965 * 2xz - 2yw, 2yz + 2xw, 1 - 2x^2 - 2y^2 ]
966 * </code></pre>
967 * <p>This matrix can then be used to apply the rotation to a
968 * column vector point with</p>
969 * <p><code>p' = Rp</code></p>
970 * <p>where <code>p</code> is in the device sensor coordinate system, and
971 * <code>p'</code> is in the camera-oriented coordinate system.</p>
972 * <p><b>Units</b>:
973 * Quarternion coefficients</p>
974 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
975 */
976 @PublicKey
977 public static final Key<float[]> LENS_POSE_ROTATION =
978 new Key<float[]>("android.lens.poseRotation", float[].class);
979
980 /**
981 * <p>Position of the camera optical center.</p>
982 * <p>As measured in the device sensor coordinate system, the
983 * position of the camera device's optical center, as a
984 * three-dimensional vector <code>(x,y,z)</code>.</p>
985 * <p>To transform a world position to a camera-device centered
986 * coordinate system, the position must be translated by this
987 * vector and then rotated by {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}.</p>
988 * <p><b>Units</b>: Meters</p>
989 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
990 *
991 * @see CameraCharacteristics#LENS_POSE_ROTATION
992 */
993 @PublicKey
994 public static final Key<float[]> LENS_POSE_TRANSLATION =
995 new Key<float[]>("android.lens.poseTranslation", float[].class);
996
997 /**
998 * <p>The parameters for this camera device's intrinsic
999 * calibration.</p>
1000 * <p>The five calibration parameters that describe the
1001 * transform from camera-centric 3D coordinates to sensor
1002 * pixel coordinates:</p>
1003 * <pre><code>[f_x, f_y, c_x, c_y, s]
1004 * </code></pre>
1005 * <p>Where <code>f_x</code> and <code>f_y</code> are the horizontal and vertical
1006 * focal lengths, <code>[c_x, c_y]</code> is the position of the optical
1007 * axis, and <code>s</code> is a skew parameter for the sensor plane not
1008 * being aligned with the lens plane.</p>
1009 * <p>These are typically used within a transformation matrix K:</p>
1010 * <pre><code>K = [ f_x, s, c_x,
1011 * 0, f_y, c_y,
1012 * 0 0, 1 ]
1013 * </code></pre>
1014 * <p>which can then be combined with the camera pose rotation
1015 * <code>R</code> and translation <code>t</code> ({@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} and
1016 * {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}, respective) to calculate the
1017 * complete transform from world coordinates to pixel
1018 * coordinates:</p>
1019 * <pre><code>P = [ K 0 * [ R t
1020 * 0 1 ] 0 1 ]
1021 * </code></pre>
1022 * <p>and with <code>p_w</code> being a point in the world coordinate system
1023 * and <code>p_s</code> being a point in the camera active pixel array
1024 * coordinate system, and with the mapping including the
1025 * homogeneous division by z:</p>
1026 * <pre><code> p_h = (x_h, y_h, z_h) = P p_w
1027 * p_s = p_h / z_h
1028 * </code></pre>
1029 * <p>so <code>[x_s, y_s]</code> is the pixel coordinates of the world
1030 * point, <code>z_s = 1</code>, and <code>w_s</code> is a measurement of disparity
1031 * (depth) in pixel coordinates.</p>
1032 * <p><b>Units</b>:
1033 * Pixels in the android.sensor.activeArraySize coordinate
1034 * system.</p>
1035 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1036 *
1037 * @see CameraCharacteristics#LENS_POSE_ROTATION
1038 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
1039 */
1040 @PublicKey
1041 public static final Key<float[]> LENS_INTRINSIC_CALIBRATION =
1042 new Key<float[]>("android.lens.intrinsicCalibration", float[].class);
1043
1044 /**
1045 * <p>The correction coefficients to correct for this camera device's
1046 * radial lens distortion.</p>
1047 * <p>Three cofficients <code>[kappa_1, kappa_2, kappa_3]</code> that
1048 * can be used to correct the lens's radial geometric
1049 * distortion with the mapping equations:</p>
1050 * <pre><code> x_c = x_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 )
1051 * y_c = y_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 )
1052 * </code></pre>
1053 * <p>where <code>[x_i, y_i]</code> are normalized coordinates with <code>(0,0)</code>
1054 * at the lens optical center, and <code>[-1, 1]</code> are the edges of
1055 * the active pixel array; and where <code>[x_c, y_c]</code> are the
1056 * corrected normalized coordinates with radial distortion
1057 * removed; and <code>r^2 = x_i^2 + y_i^2</code>.</p>
1058 * <p><b>Units</b>:
1059 * Coefficients for a 6th-degree even radial polynomial.</p>
1060 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1061 */
1062 @PublicKey
1063 public static final Key<float[]> LENS_RADIAL_DISTORTION =
1064 new Key<float[]>("android.lens.radialDistortion", float[].class);
1065
1066 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001067 * <p>List of noise reduction modes for {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode} that are supported
1068 * by this camera device.</p>
1069 * <p>Full-capability camera devices will always support OFF and FAST.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001070 * <p>Legacy-capability camera devices will only support FAST mode.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001071 * <p><b>Range of valid values:</b><br>
1072 * Any value listed in {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001073 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1074 * <p><b>Limited capability</b> -
1075 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1076 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001077 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001078 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001079 * @see CaptureRequest#NOISE_REDUCTION_MODE
1080 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001081 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07001082 public static final Key<int[]> NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES =
1083 new Key<int[]>("android.noiseReduction.availableNoiseReductionModes", int[].class);
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001084
1085 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001086 * <p>If set to 1, the HAL will always split result
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001087 * metadata for a single capture into multiple buffers,
Igor Murashkinace5bf02013-12-10 17:36:40 -08001088 * returned using multiple process_capture_result calls.</p>
1089 * <p>Does not need to be listed in static
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001090 * metadata. Support for partial results will be reworked in
1091 * future versions of camera service. This quirk will stop
1092 * working at that point; DO NOT USE without careful
Igor Murashkinace5bf02013-12-10 17:36:40 -08001093 * consideration of future support.</p>
Igor Murashkin3242f4f2014-01-15 12:27:41 -08001094 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07001095 * @deprecated
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001096 * @hide
1097 */
Igor Murashkin9c595172014-05-12 13:56:20 -07001098 @Deprecated
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001099 public static final Key<Byte> QUIRKS_USE_PARTIAL_RESULT =
1100 new Key<Byte>("android.quirks.usePartialResult", byte.class);
1101
1102 /**
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001103 * <p>The maximum numbers of different types of output streams
1104 * that can be configured and used simultaneously by a camera device.</p>
1105 * <p>This is a 3 element tuple that contains the max number of output simultaneous
Zhijun Hea4d0a8f2014-04-29 12:35:27 -07001106 * streams for raw sensor, processed (but not stalling), and processed (and stalling)
1107 * formats respectively. For example, assuming that JPEG is typically a processed and
1108 * stalling stream, if max raw sensor format output stream number is 1, max YUV streams
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001109 * number is 3, and max JPEG stream number is 2, then this tuple should be <code>(1, 3, 2)</code>.</p>
1110 * <p>This lists the upper bound of the number of output streams supported by
1111 * the camera device. Using more streams simultaneously may require more hardware and
Igor Murashkin78712a82014-05-27 18:32:18 -07001112 * CPU resources that will consume more power. The image format for an output stream can
Igor Murashkin9c595172014-05-12 13:56:20 -07001113 * be any supported format provided by android.scaler.availableStreamConfigurations.
1114 * The formats defined in android.scaler.availableStreamConfigurations can be catergorized
Zhijun Hea4d0a8f2014-04-29 12:35:27 -07001115 * into the 3 stream types as below:</p>
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001116 * <ul>
Zhijun Hea4d0a8f2014-04-29 12:35:27 -07001117 * <li>Processed (but stalling): any non-RAW format with a stallDurations &gt; 0.
1118 * Typically JPEG format (ImageFormat#JPEG).</li>
Yin-Chia Yeh11d444f2015-03-20 16:47:02 -07001119 * <li>Raw formats: ImageFormat#RAW_SENSOR, ImageFormat#RAW10, ImageFormat#RAW12,
1120 * and ImageFormat#RAW_OPAQUE.</li>
Zhijun Hea4d0a8f2014-04-29 12:35:27 -07001121 * <li>Processed (but not-stalling): any non-RAW format without a stall duration.
1122 * Typically ImageFormat#YUV_420_888, ImageFormat#NV21, ImageFormat#YV12.</li>
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001123 * </ul>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001124 * <p><b>Range of valid values:</b><br></p>
1125 * <p>For processed (and stalling) format streams, &gt;= 1.</p>
1126 * <p>For Raw format (either stalling or non-stalling) streams, &gt;= 0.</p>
1127 * <p>For processed (but not stalling) format streams, &gt;= 3
1128 * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>);
1129 * &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 -07001130 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001131 *
1132 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkin78712a82014-05-27 18:32:18 -07001133 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001134 */
1135 public static final Key<int[]> REQUEST_MAX_NUM_OUTPUT_STREAMS =
1136 new Key<int[]>("android.request.maxNumOutputStreams", int[].class);
1137
1138 /**
Igor Murashkin78712a82014-05-27 18:32:18 -07001139 * <p>The maximum numbers of different types of output streams
1140 * that can be configured and used simultaneously by a camera device
1141 * for any <code>RAW</code> formats.</p>
1142 * <p>This value contains the max number of output simultaneous
1143 * streams from the raw sensor.</p>
1144 * <p>This lists the upper bound of the number of output streams supported by
1145 * the camera device. Using more streams simultaneously may require more hardware and
1146 * CPU resources that will consume more power. The image format for this kind of an output stream can
1147 * be any <code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p>
1148 * <p>In particular, a <code>RAW</code> format is typically one of:</p>
1149 * <ul>
1150 * <li>ImageFormat#RAW_SENSOR</li>
Zhijun Heea1727c2014-07-04 10:01:02 -07001151 * <li>ImageFormat#RAW10</li>
Yin-Chia Yeh11d444f2015-03-20 16:47:02 -07001152 * <li>ImageFormat#RAW12</li>
Igor Murashkin78712a82014-05-27 18:32:18 -07001153 * <li>Opaque <code>RAW</code></li>
1154 * </ul>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001155 * <p>LEGACY mode devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> LEGACY)
1156 * never support raw streams.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001157 * <p><b>Range of valid values:</b><br></p>
1158 * <p>&gt;= 0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001159 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -07001160 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001161 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkin78712a82014-05-27 18:32:18 -07001162 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
1163 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001164 @PublicKey
1165 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -07001166 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_RAW =
1167 new Key<Integer>("android.request.maxNumOutputRaw", int.class);
1168
1169 /**
1170 * <p>The maximum numbers of different types of output streams
1171 * that can be configured and used simultaneously by a camera device
1172 * for any processed (but not-stalling) formats.</p>
1173 * <p>This value contains the max number of output simultaneous
1174 * streams for any processed (but not-stalling) formats.</p>
1175 * <p>This lists the upper bound of the number of output streams supported by
1176 * the camera device. Using more streams simultaneously may require more hardware and
1177 * CPU resources that will consume more power. The image format for this kind of an output stream can
1178 * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p>
1179 * <p>Processed (but not-stalling) is defined as any non-RAW format without a stall duration.
1180 * Typically:</p>
1181 * <ul>
1182 * <li>ImageFormat#YUV_420_888</li>
1183 * <li>ImageFormat#NV21</li>
1184 * <li>ImageFormat#YV12</li>
1185 * <li>Implementation-defined formats, i.e. StreamConfiguration#isOutputSupportedFor(Class)</li>
1186 * </ul>
1187 * <p>For full guarantees, query StreamConfigurationMap#getOutputStallDuration with
1188 * a processed format -- it will return 0 for a non-stalling stream.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001189 * <p>LEGACY devices will support at least 2 processing/non-stalling streams.</p>
1190 * <p><b>Range of valid values:</b><br></p>
1191 * <p>&gt;= 3
1192 * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>);
1193 * &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 -07001194 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -07001195 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001196 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkin78712a82014-05-27 18:32:18 -07001197 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
1198 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001199 @PublicKey
1200 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -07001201 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC =
1202 new Key<Integer>("android.request.maxNumOutputProc", int.class);
1203
1204 /**
1205 * <p>The maximum numbers of different types of output streams
1206 * that can be configured and used simultaneously by a camera device
1207 * for any processed (and stalling) formats.</p>
1208 * <p>This value contains the max number of output simultaneous
1209 * streams for any processed (but not-stalling) formats.</p>
1210 * <p>This lists the upper bound of the number of output streams supported by
1211 * the camera device. Using more streams simultaneously may require more hardware and
1212 * CPU resources that will consume more power. The image format for this kind of an output stream can
1213 * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p>
1214 * <p>A processed and stalling format is defined as any non-RAW format with a stallDurations &gt; 0.
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001215 * Typically only the <code>JPEG</code> format (ImageFormat#JPEG) is a stalling format.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -07001216 * <p>For full guarantees, query StreamConfigurationMap#getOutputStallDuration with
1217 * a processed format -- it will return a non-0 value for a stalling stream.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001218 * <p>LEGACY devices will support up to 1 processing/stalling stream.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001219 * <p><b>Range of valid values:</b><br></p>
1220 * <p>&gt;= 1</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001221 * <p>This key is available on all devices.</p>
Igor Murashkin78712a82014-05-27 18:32:18 -07001222 *
1223 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
1224 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001225 @PublicKey
1226 @SyntheticKey
Igor Murashkin78712a82014-05-27 18:32:18 -07001227 public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC_STALLING =
1228 new Key<Integer>("android.request.maxNumOutputProcStalling", int.class);
1229
1230 /**
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001231 * <p>The maximum numbers of any type of input streams
1232 * that can be configured and used simultaneously by a camera device.</p>
1233 * <p>When set to 0, it means no input stream is supported.</p>
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001234 * <p>The image format for a input stream can be any supported
Chien-Yu Chen0a551f12015-04-03 17:57:35 -07001235 * format returned by StreamConfigurationMap#getInputFormats. When using an
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001236 * input stream, there must be at least one output stream
1237 * configured to to receive the reprocessed images.</p>
Zhijun He0e99c222015-01-29 15:26:05 -08001238 * <p>When an input stream and some output streams are used in a reprocessing request,
1239 * only the input buffer will be used to produce these output stream buffers, and a
1240 * new sensor image will not be captured.</p>
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001241 * <p>For example, for Zero Shutter Lag (ZSL) still capture use case, the input
Zhijun He0e99c222015-01-29 15:26:05 -08001242 * stream image format will be OPAQUE, the associated output stream image format
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001243 * should be JPEG.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001244 * <p><b>Range of valid values:</b><br></p>
1245 * <p>0 or 1.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001246 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1247 * <p><b>Full capability</b> -
1248 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1249 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1250 *
1251 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001252 */
Zhijun He0e99c222015-01-29 15:26:05 -08001253 @PublicKey
Zhijun Hea5a0cac2014-02-05 07:55:44 -08001254 public static final Key<Integer> REQUEST_MAX_NUM_INPUT_STREAMS =
1255 new Key<Integer>("android.request.maxNumInputStreams", int.class);
1256
1257 /**
Igor Murashkinc127f052014-01-17 18:06:02 -08001258 * <p>Specifies the number of maximum pipeline stages a frame
1259 * has to go through from when it's exposed to when it's available
1260 * to the framework.</p>
1261 * <p>A typical minimum value for this is 2 (one stage to expose,
1262 * one stage to readout) from the sensor. The ISP then usually adds
1263 * its own stages to do custom HW processing. Further stages may be
1264 * added by SW processing.</p>
1265 * <p>Depending on what settings are used (e.g. YUV, JPEG) and what
1266 * processing is enabled (e.g. face detection), the actual pipeline
1267 * depth (specified by {@link CaptureResult#REQUEST_PIPELINE_DEPTH android.request.pipelineDepth}) may be less than
1268 * the max pipeline depth.</p>
1269 * <p>A pipeline depth of X stages is equivalent to a pipeline latency of
1270 * X frame intervals.</p>
1271 * <p>This value will be 8 or less.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001272 * <p>This key is available on all devices.</p>
Igor Murashkinc127f052014-01-17 18:06:02 -08001273 *
1274 * @see CaptureResult#REQUEST_PIPELINE_DEPTH
1275 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001276 @PublicKey
Igor Murashkinc127f052014-01-17 18:06:02 -08001277 public static final Key<Byte> REQUEST_PIPELINE_MAX_DEPTH =
1278 new Key<Byte>("android.request.pipelineMaxDepth", byte.class);
1279
1280 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001281 * <p>Defines how many sub-components
Igor Murashkin2086b582014-01-17 18:30:59 -08001282 * a result will be composed of.</p>
1283 * <p>In order to combat the pipeline latency, partial results
1284 * may be delivered to the application layer from the camera device as
1285 * soon as they are available.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001286 * <p>Optional; defaults to 1. A value of 1 means that partial
1287 * results are not supported, and only the final TotalCaptureResult will
1288 * be produced by the camera device.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001289 * <p>A typical use case for this might be: after requesting an
1290 * auto-focus (AF) lock the new AF state might be available 50%
1291 * of the way through the pipeline. The camera device could
1292 * then immediately dispatch this state via a partial result to
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001293 * the application, and the rest of the metadata via later
1294 * partial results.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001295 * <p><b>Range of valid values:</b><br>
1296 * &gt;= 1</p>
Zhijun He1420de42014-07-17 17:45:54 -07001297 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin2086b582014-01-17 18:30:59 -08001298 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001299 @PublicKey
Igor Murashkin2086b582014-01-17 18:30:59 -08001300 public static final Key<Integer> REQUEST_PARTIAL_RESULT_COUNT =
1301 new Key<Integer>("android.request.partialResultCount", int.class);
1302
1303 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001304 * <p>List of capabilities that this camera device
Igor Murashkine46c0da2014-02-07 18:34:37 -08001305 * advertises as fully supporting.</p>
1306 * <p>A capability is a contract that the camera device makes in order
1307 * to be able to satisfy one or more use cases.</p>
1308 * <p>Listing a capability guarantees that the whole set of features
1309 * required to support a common use will all be available.</p>
1310 * <p>Using a subset of the functionality provided by an unsupported
1311 * capability may be possible on a specific camera device implementation;
1312 * to do this query each of android.request.availableRequestKeys,
1313 * android.request.availableResultKeys,
1314 * android.request.availableCharacteristicsKeys.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001315 * <p>The following capabilities are guaranteed to be available on
1316 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL devices:</p>
1317 * <ul>
1318 * <li>MANUAL_SENSOR</li>
Zhijun Hedf9b7472014-06-04 13:42:41 -07001319 * <li>MANUAL_POST_PROCESSING</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001320 * </ul>
1321 * <p>Other capabilities may be available on either FULL or LIMITED
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001322 * devices, but the application should query this key to be sure.</p>
1323 * <p><b>Possible values:</b>
1324 * <ul>
1325 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE BACKWARD_COMPATIBLE}</li>
1326 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR MANUAL_SENSOR}</li>
1327 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING MANUAL_POST_PROCESSING}</li>
1328 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_RAW RAW}</li>
Zhijun He0e99c222015-01-29 15:26:05 -08001329 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_OPAQUE_REPROCESSING OPAQUE_REPROCESSING}</li>
Ruben Brunk0c22e692014-11-11 12:00:34 -08001330 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS READ_SENSOR_SETTINGS}</li>
Eino-Ville Talvala126a7462014-11-04 16:31:01 -08001331 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE BURST_CAPTURE}</li>
Zhijun He0e99c222015-01-29 15:26:05 -08001332 * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING YUV_REPROCESSING}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001333 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001334 * <p>This key is available on all devices.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001335 *
1336 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala08bc3b02014-07-09 10:07:36 -07001337 * @see #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE
Igor Murashkine46c0da2014-02-07 18:34:37 -08001338 * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR
Zhijun He50f72432014-05-28 13:52:04 -07001339 * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING
Eino-Ville Talvala611fece2014-07-10 17:29:38 -07001340 * @see #REQUEST_AVAILABLE_CAPABILITIES_RAW
Zhijun He0e99c222015-01-29 15:26:05 -08001341 * @see #REQUEST_AVAILABLE_CAPABILITIES_OPAQUE_REPROCESSING
Ruben Brunk0c22e692014-11-11 12:00:34 -08001342 * @see #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS
Eino-Ville Talvala126a7462014-11-04 16:31:01 -08001343 * @see #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE
Zhijun He0e99c222015-01-29 15:26:05 -08001344 * @see #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING
Igor Murashkine46c0da2014-02-07 18:34:37 -08001345 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001346 @PublicKey
Zhijun He421ddbe2014-05-29 13:41:49 -07001347 public static final Key<int[]> REQUEST_AVAILABLE_CAPABILITIES =
1348 new Key<int[]>("android.request.availableCapabilities", int[].class);
Igor Murashkine46c0da2014-02-07 18:34:37 -08001349
1350 /**
1351 * <p>A list of all keys that the camera device has available
1352 * to use with CaptureRequest.</p>
1353 * <p>Attempting to set a key into a CaptureRequest that is not
1354 * listed here will result in an invalid request and will be rejected
1355 * by the camera device.</p>
1356 * <p>This field can be used to query the feature set of a camera device
1357 * at a more granular level than capabilities. This is especially
1358 * important for optional keys that are not listed under any capability
1359 * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001360 * <p>This key is available on all devices.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001361 *
1362 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1363 * @hide
1364 */
1365 public static final Key<int[]> REQUEST_AVAILABLE_REQUEST_KEYS =
1366 new Key<int[]>("android.request.availableRequestKeys", int[].class);
1367
1368 /**
1369 * <p>A list of all keys that the camera device has available
1370 * to use with CaptureResult.</p>
1371 * <p>Attempting to get a key from a CaptureResult that is not
1372 * listed here will always return a <code>null</code> value. Getting a key from
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001373 * a CaptureResult that is listed here will generally never return a <code>null</code>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001374 * value.</p>
1375 * <p>The following keys may return <code>null</code> unless they are enabled:</p>
1376 * <ul>
Ruben Brunk57493682014-05-27 18:58:08 -07001377 * <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 -08001378 * </ul>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001379 * <p>(Those sometimes-null keys will nevertheless be listed here
Igor Murashkine46c0da2014-02-07 18:34:37 -08001380 * if they are available.)</p>
1381 * <p>This field can be used to query the feature set of a camera device
1382 * at a more granular level than capabilities. This is especially
1383 * important for optional keys that are not listed under any capability
1384 * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001385 * <p>This key is available on all devices.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001386 *
1387 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Igor Murashkine46c0da2014-02-07 18:34:37 -08001388 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
1389 * @hide
1390 */
1391 public static final Key<int[]> REQUEST_AVAILABLE_RESULT_KEYS =
1392 new Key<int[]>("android.request.availableResultKeys", int[].class);
1393
1394 /**
1395 * <p>A list of all keys that the camera device has available
1396 * to use with CameraCharacteristics.</p>
1397 * <p>This entry follows the same rules as
1398 * android.request.availableResultKeys (except that it applies for
1399 * CameraCharacteristics instead of CaptureResult). See above for more
1400 * details.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001401 * <p>This key is available on all devices.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08001402 * @hide
1403 */
1404 public static final Key<int[]> REQUEST_AVAILABLE_CHARACTERISTICS_KEYS =
1405 new Key<int[]>("android.request.availableCharacteristicsKeys", int[].class);
1406
1407 /**
Zhijun Hef3b16df2014-01-17 13:37:59 -08001408 * <p>The list of image formats that are supported by this
Igor Murashkin418f6df2014-02-07 18:20:48 -08001409 * camera device for output streams.</p>
Zhijun Hef3b16df2014-01-17 13:37:59 -08001410 * <p>All camera devices will support JPEG and YUV_420_888 formats.</p>
1411 * <p>When set to YUV_420_888, application can access the YUV420 data directly.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001412 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07001413 * @deprecated
1414 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001415 */
Igor Murashkin9c595172014-05-12 13:56:20 -07001416 @Deprecated
Igor Murashkinb519cc52013-07-02 11:23:44 -07001417 public static final Key<int[]> SCALER_AVAILABLE_FORMATS =
1418 new Key<int[]>("android.scaler.availableFormats", int[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001419
1420 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001421 * <p>The minimum frame duration that is supported
Igor Murashkin9c595172014-05-12 13:56:20 -07001422 * for each resolution in android.scaler.availableJpegSizes.</p>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001423 * <p>This corresponds to the minimum steady-state frame duration when only
1424 * that JPEG stream is active and captured in a burst, with all
1425 * processing (typically in android.*.mode) set to FAST.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08001426 * <p>When multiple streams are configured, the minimum
1427 * frame duration will be &gt;= max(individual stream min
1428 * durations)</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001429 * <p><b>Units</b>: Nanoseconds</p>
1430 * <p><b>Range of valid values:</b><br>
1431 * TODO: Remove property.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001432 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07001433 * @deprecated
1434 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001435 */
Igor Murashkin9c595172014-05-12 13:56:20 -07001436 @Deprecated
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001437 public static final Key<long[]> SCALER_AVAILABLE_JPEG_MIN_DURATIONS =
1438 new Key<long[]>("android.scaler.availableJpegMinDurations", long[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001439
1440 /**
Zhijun Hef3b16df2014-01-17 13:37:59 -08001441 * <p>The JPEG resolutions that are supported by this camera device.</p>
1442 * <p>The resolutions are listed as <code>(width, height)</code> pairs. All camera devices will support
1443 * 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 -07001444 * <p><b>Range of valid values:</b><br>
1445 * TODO: Remove property.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001446 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Zhijun Hef3b16df2014-01-17 13:37:59 -08001447 *
1448 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Igor Murashkin9c595172014-05-12 13:56:20 -07001449 * @deprecated
1450 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001451 */
Igor Murashkin9c595172014-05-12 13:56:20 -07001452 @Deprecated
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07001453 public static final Key<android.util.Size[]> SCALER_AVAILABLE_JPEG_SIZES =
1454 new Key<android.util.Size[]>("android.scaler.availableJpegSizes", android.util.Size[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001455
1456 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001457 * <p>The maximum ratio between both active area width
1458 * and crop region width, and active area height and
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001459 * crop region height, for {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001460 * <p>This represents the maximum amount of zooming possible by
1461 * the camera device, or equivalently, the minimum cropping
1462 * window size.</p>
1463 * <p>Crop regions that have a width or height that is smaller
1464 * than this ratio allows will be rounded up to the minimum
1465 * allowed size by the camera device.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001466 * <p><b>Units</b>: Zoom scale factor</p>
1467 * <p><b>Range of valid values:</b><br>
1468 * &gt;=1</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001469 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001470 *
1471 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001472 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001473 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001474 public static final Key<Float> SCALER_AVAILABLE_MAX_DIGITAL_ZOOM =
1475 new Key<Float>("android.scaler.availableMaxDigitalZoom", float.class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001476
1477 /**
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001478 * <p>For each available processed output size (defined in
Igor Murashkin9c595172014-05-12 13:56:20 -07001479 * android.scaler.availableProcessedSizes), this property lists the
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001480 * minimum supportable frame duration for that size.</p>
1481 * <p>This should correspond to the frame duration when only that processed
1482 * stream is active, with all processing (typically in android.*.mode)
1483 * set to FAST.</p>
1484 * <p>When multiple streams are configured, the minimum frame duration will
1485 * be &gt;= max(individual stream min durations).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001486 * <p><b>Units</b>: Nanoseconds</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001487 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07001488 * @deprecated
1489 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001490 */
Igor Murashkin9c595172014-05-12 13:56:20 -07001491 @Deprecated
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001492 public static final Key<long[]> SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS =
1493 new Key<long[]>("android.scaler.availableProcessedMinDurations", long[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001494
1495 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001496 * <p>The resolutions available for use with
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001497 * processed output streams, such as YV12, NV12, and
1498 * platform opaque YUV/RGB streams to the GPU or video
Zhijun Hef3b16df2014-01-17 13:37:59 -08001499 * encoders.</p>
1500 * <p>The resolutions are listed as <code>(width, height)</code> pairs.</p>
1501 * <p>For a given use case, the actual maximum supported resolution
1502 * may be lower than what is listed here, depending on the destination
1503 * Surface for the image data. For example, for recording video,
1504 * the video encoder chosen may have a maximum size limit (e.g. 1080p)
1505 * smaller than what the camera (e.g. maximum resolution is 3264x2448)
1506 * can provide.</p>
1507 * <p>Please reference the documentation for the image data destination to
1508 * check if it limits the maximum size for image data.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001509 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07001510 * @deprecated
1511 * @hide
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001512 */
Igor Murashkin9c595172014-05-12 13:56:20 -07001513 @Deprecated
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07001514 public static final Key<android.util.Size[]> SCALER_AVAILABLE_PROCESSED_SIZES =
1515 new Key<android.util.Size[]>("android.scaler.availableProcessedSizes", android.util.Size[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001516
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001517 /**
Igor Murashkin418f6df2014-02-07 18:20:48 -08001518 * <p>The mapping of image formats that are supported by this
1519 * camera device for input streams, to their corresponding output formats.</p>
1520 * <p>All camera devices with at least 1
Zhijun He0e99c222015-01-29 15:26:05 -08001521 * {@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} will have at least one
Igor Murashkin418f6df2014-02-07 18:20:48 -08001522 * available input format.</p>
1523 * <p>The camera device will support the following map of formats,
Zhijun He0e99c222015-01-29 15:26:05 -08001524 * if its dependent capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}) is supported:</p>
Igor Murashkin418f6df2014-02-07 18:20:48 -08001525 * <table>
1526 * <thead>
1527 * <tr>
1528 * <th align="left">Input Format</th>
1529 * <th align="left">Output Format</th>
1530 * <th align="left">Capability</th>
1531 * </tr>
1532 * </thead>
1533 * <tbody>
1534 * <tr>
Chien-Yu Chen0a551f12015-04-03 17:57:35 -07001535 * <td align="left">PRIVATE (ImageFormat#PRIVATE)</td>
Igor Murashkin418f6df2014-02-07 18:20:48 -08001536 * <td align="left">JPEG</td>
Zhijun He0e99c222015-01-29 15:26:05 -08001537 * <td align="left">OPAQUE_REPROCESSING</td>
Igor Murashkin418f6df2014-02-07 18:20:48 -08001538 * </tr>
1539 * <tr>
Chien-Yu Chen0a551f12015-04-03 17:57:35 -07001540 * <td align="left">PRIVATE</td>
Igor Murashkin418f6df2014-02-07 18:20:48 -08001541 * <td align="left">YUV_420_888</td>
Zhijun He0e99c222015-01-29 15:26:05 -08001542 * <td align="left">OPAQUE_REPROCESSING</td>
Igor Murashkin418f6df2014-02-07 18:20:48 -08001543 * </tr>
1544 * <tr>
Igor Murashkin418f6df2014-02-07 18:20:48 -08001545 * <td align="left">YUV_420_888</td>
Igor Murashkin418f6df2014-02-07 18:20:48 -08001546 * <td align="left">JPEG</td>
Zhijun He0e99c222015-01-29 15:26:05 -08001547 * <td align="left">YUV_REPROCESSING</td>
1548 * </tr>
1549 * <tr>
1550 * <td align="left">YUV_420_888</td>
1551 * <td align="left">YUV_420_888</td>
1552 * <td align="left">YUV_REPROCESSING</td>
Igor Murashkin418f6df2014-02-07 18:20:48 -08001553 * </tr>
1554 * </tbody>
1555 * </table>
Chien-Yu Chen0a551f12015-04-03 17:57:35 -07001556 * <p>PRIVATE refers to a device-internal format that is not directly application-visible.
1557 * A PRIVATE input surface can be acquired by
1558 * ImageReader.newOpaqueInstance(width, height, maxImages).
1559 * For a OPAQUE_REPROCESSING-capable camera device, using the PRIVATE format
Igor Murashkin418f6df2014-02-07 18:20:48 -08001560 * as either input or output will never hurt maximum frame rate (i.e.
Chien-Yu Chen0a551f12015-04-03 17:57:35 -07001561 * StreamConfigurationMap#getOutputStallDuration(format, size) is always 0),
1562 * where format is ImageFormat#PRIVATE.</p>
Igor Murashkin418f6df2014-02-07 18:20:48 -08001563 * <p>Attempting to configure an input stream with output streams not
1564 * listed as available in this map is not valid.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001565 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001566 *
Zhijun He0e99c222015-01-29 15:26:05 -08001567 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1568 * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
Igor Murashkin9c595172014-05-12 13:56:20 -07001569 * @hide
Igor Murashkin418f6df2014-02-07 18:20:48 -08001570 */
Chien-Yu Chen0a551f12015-04-03 17:57:35 -07001571 public static final Key<android.hardware.camera2.params.ReprocessFormatsMap> SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP =
1572 new Key<android.hardware.camera2.params.ReprocessFormatsMap>("android.scaler.availableInputOutputFormatsMap", android.hardware.camera2.params.ReprocessFormatsMap.class);
Igor Murashkin418f6df2014-02-07 18:20:48 -08001573
1574 /**
Igor Murashkina23ffb52014-02-07 18:52:34 -08001575 * <p>The available stream configurations that this
1576 * camera device supports
1577 * (i.e. format, width, height, output/input stream).</p>
1578 * <p>The configurations are listed as <code>(format, width, height, input?)</code>
1579 * tuples.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08001580 * <p>For a given use case, the actual maximum supported resolution
1581 * may be lower than what is listed here, depending on the destination
1582 * Surface for the image data. For example, for recording video,
1583 * the video encoder chosen may have a maximum size limit (e.g. 1080p)
1584 * smaller than what the camera (e.g. maximum resolution is 3264x2448)
1585 * can provide.</p>
1586 * <p>Please reference the documentation for the image data destination to
1587 * check if it limits the maximum size for image data.</p>
1588 * <p>Not all output formats may be supported in a configuration with
1589 * an input stream of a particular format. For more details, see
Igor Murashkin9c595172014-05-12 13:56:20 -07001590 * android.scaler.availableInputOutputFormatsMap.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08001591 * <p>The following table describes the minimum required output stream
1592 * configurations based on the hardware level
1593 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p>
1594 * <table>
1595 * <thead>
1596 * <tr>
1597 * <th align="center">Format</th>
1598 * <th align="center">Size</th>
1599 * <th align="center">Hardware Level</th>
1600 * <th align="center">Notes</th>
1601 * </tr>
1602 * </thead>
1603 * <tbody>
1604 * <tr>
1605 * <td align="center">JPEG</td>
1606 * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td>
1607 * <td align="center">Any</td>
1608 * <td align="center"></td>
1609 * </tr>
1610 * <tr>
1611 * <td align="center">JPEG</td>
1612 * <td align="center">1920x1080 (1080p)</td>
1613 * <td align="center">Any</td>
1614 * <td align="center">if 1080p &lt;= activeArraySize</td>
1615 * </tr>
1616 * <tr>
1617 * <td align="center">JPEG</td>
1618 * <td align="center">1280x720 (720)</td>
1619 * <td align="center">Any</td>
1620 * <td align="center">if 720p &lt;= activeArraySize</td>
1621 * </tr>
1622 * <tr>
1623 * <td align="center">JPEG</td>
1624 * <td align="center">640x480 (480p)</td>
1625 * <td align="center">Any</td>
1626 * <td align="center">if 480p &lt;= activeArraySize</td>
1627 * </tr>
1628 * <tr>
1629 * <td align="center">JPEG</td>
1630 * <td align="center">320x240 (240p)</td>
1631 * <td align="center">Any</td>
1632 * <td align="center">if 240p &lt;= activeArraySize</td>
1633 * </tr>
1634 * <tr>
1635 * <td align="center">YUV_420_888</td>
1636 * <td align="center">all output sizes available for JPEG</td>
1637 * <td align="center">FULL</td>
1638 * <td align="center"></td>
1639 * </tr>
1640 * <tr>
1641 * <td align="center">YUV_420_888</td>
1642 * <td align="center">all output sizes available for JPEG, up to the maximum video size</td>
1643 * <td align="center">LIMITED</td>
1644 * <td align="center"></td>
1645 * </tr>
1646 * <tr>
1647 * <td align="center">IMPLEMENTATION_DEFINED</td>
1648 * <td align="center">same as YUV_420_888</td>
1649 * <td align="center">Any</td>
1650 * <td align="center"></td>
1651 * </tr>
1652 * </tbody>
1653 * </table>
1654 * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional
1655 * mandatory stream configurations on a per-capability basis.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001656 * <p>This key is available on all devices.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08001657 *
1658 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1659 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Igor Murashkina23ffb52014-02-07 18:52:34 -08001660 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Igor Murashkin9c595172014-05-12 13:56:20 -07001661 * @hide
Igor Murashkina23ffb52014-02-07 18:52:34 -08001662 */
Igor Murashkin9c595172014-05-12 13:56:20 -07001663 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> SCALER_AVAILABLE_STREAM_CONFIGURATIONS =
1664 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.scaler.availableStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
Igor Murashkina23ffb52014-02-07 18:52:34 -08001665
1666 /**
1667 * <p>This lists the minimum frame duration for each
1668 * format/size combination.</p>
1669 * <p>This should correspond to the frame duration when only that
1670 * stream is active, with all processing (typically in android.*.mode)
1671 * set to either OFF or FAST.</p>
1672 * <p>When multiple streams are used in a request, the minimum frame
1673 * duration will be max(individual stream min durations).</p>
1674 * <p>The minimum frame duration of a stream (of a particular format, size)
1675 * is the same regardless of whether the stream is input or output.</p>
1676 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and
Igor Murashkin9c595172014-05-12 13:56:20 -07001677 * android.scaler.availableStallDurations for more details about
Igor Murashkina23ffb52014-02-07 18:52:34 -08001678 * calculating the max frame rate.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07001679 * <p>(Keep in sync with
1680 * StreamConfigurationMap#getOutputMinFrameDuration)</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001681 * <p><b>Units</b>: (format, width, height, ns) x n</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001682 * <p>This key is available on all devices.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08001683 *
Igor Murashkina23ffb52014-02-07 18:52:34 -08001684 * @see CaptureRequest#SENSOR_FRAME_DURATION
Igor Murashkin9c595172014-05-12 13:56:20 -07001685 * @hide
Igor Murashkina23ffb52014-02-07 18:52:34 -08001686 */
Igor Murashkin9c595172014-05-12 13:56:20 -07001687 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_MIN_FRAME_DURATIONS =
1688 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
Igor Murashkina23ffb52014-02-07 18:52:34 -08001689
1690 /**
1691 * <p>This lists the maximum stall duration for each
1692 * format/size combination.</p>
1693 * <p>A stall duration is how much extra time would get added
1694 * to the normal minimum frame duration for a repeating request
1695 * that has streams with non-zero stall.</p>
1696 * <p>For example, consider JPEG captures which have the following
1697 * characteristics:</p>
1698 * <ul>
1699 * <li>JPEG streams act like processed YUV streams in requests for which
1700 * they are not included; in requests in which they are directly
1701 * referenced, they act as JPEG streams. This is because supporting a
1702 * JPEG stream requires the underlying YUV data to always be ready for
1703 * use by a JPEG encoder, but the encoder will only be used (and impact
1704 * frame duration) on requests that actually reference a JPEG stream.</li>
1705 * <li>The JPEG processor can run concurrently to the rest of the camera
1706 * pipeline, but cannot process more than 1 capture at a time.</li>
1707 * </ul>
1708 * <p>In other words, using a repeating YUV request would result
1709 * in a steady frame rate (let's say it's 30 FPS). If a single
1710 * JPEG request is submitted periodically, the frame rate will stay
1711 * at 30 FPS (as long as we wait for the previous JPEG to return each
1712 * time). If we try to submit a repeating YUV + JPEG request, then
1713 * the frame rate will drop from 30 FPS.</p>
1714 * <p>In general, submitting a new request with a non-0 stall time
1715 * stream will <em>not</em> cause a frame rate drop unless there are still
1716 * outstanding buffers for that stream from previous requests.</p>
1717 * <p>Submitting a repeating request with streams (call this <code>S</code>)
1718 * is the same as setting the minimum frame duration from
1719 * the normal minimum frame duration corresponding to <code>S</code>, added with
1720 * the maximum stall duration for <code>S</code>.</p>
1721 * <p>If interleaving requests with and without a stall duration,
1722 * a request will stall by the maximum of the remaining times
1723 * for each can-stall stream with outstanding buffers.</p>
1724 * <p>This means that a stalling request will not have an exposure start
1725 * until the stall has completed.</p>
1726 * <p>This should correspond to the stall duration when only that stream is
1727 * active, with all processing (typically in android.*.mode) set to FAST
1728 * or OFF. Setting any of the processing modes to HIGH_QUALITY
1729 * effectively results in an indeterminate stall duration for all
1730 * streams in a request (the regular stall calculation rules are
1731 * ignored).</p>
1732 * <p>The following formats may always have a stall duration:</p>
1733 * <ul>
Zhijun Heea1727c2014-07-04 10:01:02 -07001734 * <li>ImageFormat#JPEG</li>
1735 * <li>ImageFormat#RAW_SENSOR</li>
Igor Murashkina23ffb52014-02-07 18:52:34 -08001736 * </ul>
1737 * <p>The following formats will never have a stall duration:</p>
1738 * <ul>
Zhijun Heea1727c2014-07-04 10:01:02 -07001739 * <li>ImageFormat#YUV_420_888</li>
Igor Murashkina23ffb52014-02-07 18:52:34 -08001740 * </ul>
1741 * <p>All other formats may or may not have an allowed stall duration on
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001742 * a per-capability basis; refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
Igor Murashkina23ffb52014-02-07 18:52:34 -08001743 * for more details.</p>
1744 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} for more information about
1745 * calculating the max frame rate (absent stalls).</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07001746 * <p>(Keep up to date with
1747 * StreamConfigurationMap#getOutputStallDuration(int, Size) )</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001748 * <p><b>Units</b>: (format, width, height, ns) x n</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001749 * <p>This key is available on all devices.</p>
Igor Murashkina23ffb52014-02-07 18:52:34 -08001750 *
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001751 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Igor Murashkina23ffb52014-02-07 18:52:34 -08001752 * @see CaptureRequest#SENSOR_FRAME_DURATION
Igor Murashkin9c595172014-05-12 13:56:20 -07001753 * @hide
Igor Murashkina23ffb52014-02-07 18:52:34 -08001754 */
Igor Murashkin9c595172014-05-12 13:56:20 -07001755 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_STALL_DURATIONS =
1756 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
1757
1758 /**
1759 * <p>The available stream configurations that this
1760 * camera device supports; also includes the minimum frame durations
1761 * and the stall durations for each format/size combination.</p>
1762 * <p>All camera devices will support sensor maximum resolution (defined by
1763 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) for the JPEG format.</p>
1764 * <p>For a given use case, the actual maximum supported resolution
1765 * may be lower than what is listed here, depending on the destination
1766 * Surface for the image data. For example, for recording video,
1767 * the video encoder chosen may have a maximum size limit (e.g. 1080p)
1768 * smaller than what the camera (e.g. maximum resolution is 3264x2448)
1769 * can provide.</p>
1770 * <p>Please reference the documentation for the image data destination to
1771 * check if it limits the maximum size for image data.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07001772 * <p>The following table describes the minimum required output stream
1773 * configurations based on the hardware level
1774 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p>
1775 * <table>
1776 * <thead>
1777 * <tr>
1778 * <th align="center">Format</th>
1779 * <th align="center">Size</th>
1780 * <th align="center">Hardware Level</th>
1781 * <th align="center">Notes</th>
1782 * </tr>
1783 * </thead>
1784 * <tbody>
1785 * <tr>
1786 * <td align="center">JPEG</td>
1787 * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td>
1788 * <td align="center">Any</td>
1789 * <td align="center"></td>
1790 * </tr>
1791 * <tr>
1792 * <td align="center">JPEG</td>
1793 * <td align="center">1920x1080 (1080p)</td>
1794 * <td align="center">Any</td>
1795 * <td align="center">if 1080p &lt;= activeArraySize</td>
1796 * </tr>
1797 * <tr>
1798 * <td align="center">JPEG</td>
1799 * <td align="center">1280x720 (720)</td>
1800 * <td align="center">Any</td>
1801 * <td align="center">if 720p &lt;= activeArraySize</td>
1802 * </tr>
1803 * <tr>
1804 * <td align="center">JPEG</td>
1805 * <td align="center">640x480 (480p)</td>
1806 * <td align="center">Any</td>
1807 * <td align="center">if 480p &lt;= activeArraySize</td>
1808 * </tr>
1809 * <tr>
1810 * <td align="center">JPEG</td>
1811 * <td align="center">320x240 (240p)</td>
1812 * <td align="center">Any</td>
1813 * <td align="center">if 240p &lt;= activeArraySize</td>
1814 * </tr>
1815 * <tr>
1816 * <td align="center">YUV_420_888</td>
1817 * <td align="center">all output sizes available for JPEG</td>
1818 * <td align="center">FULL</td>
1819 * <td align="center"></td>
1820 * </tr>
1821 * <tr>
1822 * <td align="center">YUV_420_888</td>
1823 * <td align="center">all output sizes available for JPEG, up to the maximum video size</td>
1824 * <td align="center">LIMITED</td>
1825 * <td align="center"></td>
1826 * </tr>
1827 * <tr>
1828 * <td align="center">IMPLEMENTATION_DEFINED</td>
1829 * <td align="center">same as YUV_420_888</td>
1830 * <td align="center">Any</td>
1831 * <td align="center"></td>
1832 * </tr>
1833 * </tbody>
1834 * </table>
1835 * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional
1836 * mandatory stream configurations on a per-capability basis.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001837 * <p>This key is available on all devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07001838 *
1839 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1840 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1841 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
1842 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001843 @PublicKey
1844 @SyntheticKey
Igor Murashkin9c595172014-05-12 13:56:20 -07001845 public static final Key<android.hardware.camera2.params.StreamConfigurationMap> SCALER_STREAM_CONFIGURATION_MAP =
1846 new Key<android.hardware.camera2.params.StreamConfigurationMap>("android.scaler.streamConfigurationMap", android.hardware.camera2.params.StreamConfigurationMap.class);
Igor Murashkina23ffb52014-02-07 18:52:34 -08001847
1848 /**
Zhijun He14986152014-05-22 21:17:37 -07001849 * <p>The crop type that this camera device supports.</p>
1850 * <p>When passing a non-centered crop region ({@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}) to a camera
1851 * device that only supports CENTER_ONLY cropping, the camera device will move the
1852 * crop region to the center of the sensor active array ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize})
1853 * and keep the crop region width and height unchanged. The camera device will return the
1854 * final used crop region in metadata result {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
1855 * <p>Camera devices that support FREEFORM cropping will support any crop region that
1856 * is inside of the active array. The camera device will apply the same crop region and
1857 * return the final used crop region in capture result metadata {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
1858 * <p>FULL capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL) will support
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001859 * FREEFORM cropping. LEGACY capability devices will only support CENTER_ONLY cropping.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001860 * <p><b>Possible values:</b>
1861 * <ul>
1862 * <li>{@link #SCALER_CROPPING_TYPE_CENTER_ONLY CENTER_ONLY}</li>
1863 * <li>{@link #SCALER_CROPPING_TYPE_FREEFORM FREEFORM}</li>
1864 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001865 * <p>This key is available on all devices.</p>
Zhijun He14986152014-05-22 21:17:37 -07001866 *
1867 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1868 * @see CaptureRequest#SCALER_CROP_REGION
1869 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
1870 * @see #SCALER_CROPPING_TYPE_CENTER_ONLY
1871 * @see #SCALER_CROPPING_TYPE_FREEFORM
1872 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001873 @PublicKey
Zhijun He14986152014-05-22 21:17:37 -07001874 public static final Key<Integer> SCALER_CROPPING_TYPE =
1875 new Key<Integer>("android.scaler.croppingType", int.class);
1876
1877 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001878 * <p>The area of the image sensor which corresponds to
Zhijun He153ac102014-02-03 12:25:12 -08001879 * active pixels.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001880 * <p>This is the region of the sensor that actually receives light from the scene.
1881 * Therefore, the size of this region determines the maximum field of view and the maximum
1882 * number of pixels that an image from this sensor can contain.</p>
1883 * <p>The rectangle is defined in terms of the full pixel array; (0,0) is the top-left of the
1884 * full pixel array, and the size of the full pixel array is given by
1885 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
1886 * <p>Most other keys listing pixel coordinates have their coordinate systems based on the
1887 * active array, with <code>(0, 0)</code> being the top-left of the active array rectangle.</p>
1888 * <p>The active array may be smaller than the full pixel array, since the full array may
1889 * include black calibration pixels or other inactive regions.</p>
1890 * <p><b>Units</b>: Pixel coordinates on the image sensor</p>
1891 * <p><b>Range of valid values:</b><br></p>
1892 * <p>This key is available on all devices.</p>
1893 *
1894 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001895 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001896 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001897 public static final Key<android.graphics.Rect> SENSOR_INFO_ACTIVE_ARRAY_SIZE =
1898 new Key<android.graphics.Rect>("android.sensor.info.activeArraySize", android.graphics.Rect.class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001899
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001900 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001901 * <p>Range of sensitivities for {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} supported by this
1902 * camera device.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001903 * <p>The values are the standard ISO sensitivity values,
1904 * as defined in ISO 12232:2006.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001905 * <p><b>Range of valid values:</b><br>
1906 * Min &lt;= 100, Max &gt;= 800</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001907 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1908 * <p><b>Full capability</b> -
1909 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1910 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001911 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001912 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001913 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001914 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001915 @PublicKey
Ruben Brunk57493682014-05-27 18:58:08 -07001916 public static final Key<android.util.Range<Integer>> SENSOR_INFO_SENSITIVITY_RANGE =
1917 new Key<android.util.Range<Integer>>("android.sensor.info.sensitivityRange", new TypeReference<android.util.Range<Integer>>() {{ }});
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001918
1919 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001920 * <p>The arrangement of color filters on sensor;
Zhijun Hed1784962014-04-08 17:41:46 -07001921 * represents the colors in the top-left 2x2 section of
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001922 * the sensor, in reading order.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001923 * <p><b>Possible values:</b>
1924 * <ul>
1925 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB RGGB}</li>
1926 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG GRBG}</li>
1927 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG GBRG}</li>
1928 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR BGGR}</li>
1929 * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB RGB}</li>
1930 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001931 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1932 * <p><b>Full capability</b> -
1933 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1934 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1935 *
1936 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun Hed1784962014-04-08 17:41:46 -07001937 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB
1938 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG
1939 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG
1940 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR
1941 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB
1942 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001943 @PublicKey
Zhijun Hed1784962014-04-08 17:41:46 -07001944 public static final Key<Integer> SENSOR_INFO_COLOR_FILTER_ARRANGEMENT =
1945 new Key<Integer>("android.sensor.info.colorFilterArrangement", int.class);
1946
1947 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001948 * <p>The range of image exposure times for {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} supported
1949 * by this camera device.</p>
1950 * <p><b>Units</b>: Nanoseconds</p>
1951 * <p><b>Range of valid values:</b><br>
1952 * The minimum exposure time will be less than 100 us. For FULL
Zhijun He28288ca2014-06-25 15:49:13 -07001953 * capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL),
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001954 * the maximum exposure time will be greater than 100ms.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001955 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1956 * <p><b>Full capability</b> -
1957 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1958 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Igor Murashkin6b7ddc42014-02-03 14:39:19 -08001959 *
Zhijun He28288ca2014-06-25 15:49:13 -07001960 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkin6b7ddc42014-02-03 14:39:19 -08001961 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001962 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001963 @PublicKey
Ruben Brunk57493682014-05-27 18:58:08 -07001964 public static final Key<android.util.Range<Long>> SENSOR_INFO_EXPOSURE_TIME_RANGE =
1965 new Key<android.util.Range<Long>>("android.sensor.info.exposureTimeRange", new TypeReference<android.util.Range<Long>>() {{ }});
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001966
1967 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001968 * <p>The maximum possible frame duration (minimum frame rate) for
1969 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} that is supported this camera device.</p>
1970 * <p>Attempting to use frame durations beyond the maximum will result in the frame
1971 * duration being clipped to the maximum. See that control for a full definition of frame
1972 * durations.</p>
1973 * <p>Refer to StreamConfigurationMap#getOutputMinFrameDuration(int,Size) for the minimum
1974 * frame duration values.</p>
1975 * <p><b>Units</b>: Nanoseconds</p>
1976 * <p><b>Range of valid values:</b><br>
1977 * For FULL capability devices
1978 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL), at least 100ms.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001979 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1980 * <p><b>Full capability</b> -
1981 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1982 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Igor Murashkin6b7ddc42014-02-03 14:39:19 -08001983 *
Zhijun He28288ca2014-06-25 15:49:13 -07001984 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001985 * @see CaptureRequest#SENSOR_FRAME_DURATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001986 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001987 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001988 public static final Key<Long> SENSOR_INFO_MAX_FRAME_DURATION =
1989 new Key<Long>("android.sensor.info.maxFrameDuration", long.class);
1990
1991 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001992 * <p>The physical dimensions of the full pixel
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001993 * array.</p>
1994 * <p>This is the physical size of the sensor pixel
1995 * array defined by {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001996 * <p><b>Units</b>: Millimeters</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001997 * <p>This key is available on all devices.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001998 *
1999 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002000 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002001 @PublicKey
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07002002 public static final Key<android.util.SizeF> SENSOR_INFO_PHYSICAL_SIZE =
2003 new Key<android.util.SizeF>("android.sensor.info.physicalSize", android.util.SizeF.class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002004
2005 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002006 * <p>Dimensions of the full pixel array, possibly
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002007 * including black calibration pixels.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002008 * <p>The pixel count of the full pixel array,
2009 * which covers {@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize} area.</p>
2010 * <p>If a camera device supports raw sensor formats, either this
2011 * or {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} is the maximum output
2012 * raw size listed in {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.
2013 * If a size corresponding to pixelArraySize is listed, the resulting
2014 * raw sensor image will include black pixels.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002015 * <p>Some parts of the full pixel array may not receive light from the scene,
2016 * or are otherwise inactive. The {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} key
2017 * defines the rectangle of active pixels that actually forms an image.</p>
2018 * <p><b>Units</b>: Pixels</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002019 * <p>This key is available on all devices.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002020 *
2021 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
2022 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
2023 * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002024 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002025 @PublicKey
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07002026 public static final Key<android.util.Size> SENSOR_INFO_PIXEL_ARRAY_SIZE =
2027 new Key<android.util.Size>("android.sensor.info.pixelArraySize", android.util.Size.class);
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002028
2029 /**
Ruben Brunke60e29552014-02-18 10:44:17 -08002030 * <p>Maximum raw value output by sensor.</p>
2031 * <p>This specifies the fully-saturated encoding level for the raw
2032 * sample values from the sensor. This is typically caused by the
2033 * sensor becoming highly non-linear or clipping. The minimum for
2034 * each channel is specified by the offset in the
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002035 * {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} key.</p>
Ruben Brunke60e29552014-02-18 10:44:17 -08002036 * <p>The white level is typically determined either by sensor bit depth
Ruben Brunke89b1202014-03-24 17:10:35 -07002037 * (8-14 bits is expected), or by the point where the sensor response
Ruben Brunke60e29552014-02-18 10:44:17 -08002038 * becomes too non-linear to be useful. The default value for this is
2039 * maximum representable value for a 16-bit raw sample (2^16 - 1).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002040 * <p><b>Range of valid values:</b><br>
2041 * &gt; 255 (8-bit output)</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002042 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunke60e29552014-02-18 10:44:17 -08002043 *
2044 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
2045 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002046 @PublicKey
Ruben Brunke60e29552014-02-18 10:44:17 -08002047 public static final Key<Integer> SENSOR_INFO_WHITE_LEVEL =
2048 new Key<Integer>("android.sensor.info.whiteLevel", int.class);
2049
2050 /**
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07002051 * <p>The time base source for sensor capture start timestamps.</p>
2052 * <p>The timestamps provided for captures are always in nanoseconds and monotonic, but
2053 * may not based on a time source that can be compared to other system time sources.</p>
2054 * <p>This characteristic defines the source for the timestamps, and therefore whether they
2055 * can be compared against other system time sources/timestamps.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002056 * <p><b>Possible values:</b>
2057 * <ul>
2058 * <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN UNKNOWN}</li>
2059 * <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME REALTIME}</li>
2060 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002061 * <p>This key is available on all devices.</p>
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07002062 * @see #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN
2063 * @see #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME
Zhijun He45fa43a12014-06-13 18:29:37 -07002064 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002065 @PublicKey
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07002066 public static final Key<Integer> SENSOR_INFO_TIMESTAMP_SOURCE =
2067 new Key<Integer>("android.sensor.info.timestampSource", int.class);
Zhijun He45fa43a12014-06-13 18:29:37 -07002068
2069 /**
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08002070 * <p>Whether the RAW images output from this camera device are subject to
2071 * lens shading correction.</p>
2072 * <p>If TRUE, all images produced by the camera device in the RAW image formats will
2073 * have lens shading correction already applied to it. If FALSE, the images will
2074 * not be adjusted for lens shading correction.
2075 * See {@link CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW android.request.maxNumOutputRaw} for a list of RAW image formats.</p>
2076 * <p>This key will be <code>null</code> for all devices do not report this information.
2077 * Devices with RAW capability will always report this information in this key.</p>
2078 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2079 *
2080 * @see CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW
2081 */
2082 @PublicKey
2083 public static final Key<Boolean> SENSOR_INFO_LENS_SHADING_APPLIED =
2084 new Key<Boolean>("android.sensor.info.lensShadingApplied", boolean.class);
2085
2086 /**
Ruben Brunk7c062362014-04-15 23:53:53 -07002087 * <p>The standard reference illuminant used as the scene light source when
2088 * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1},
2089 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and
2090 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} matrices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002091 * <p>The values in this key correspond to the values defined for the
Ruben Brunk7c062362014-04-15 23:53:53 -07002092 * EXIF LightSource tag. These illuminants are standard light sources
2093 * that are often used calibrating camera devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002094 * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1},
Ruben Brunk7c062362014-04-15 23:53:53 -07002095 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and
2096 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} will also be present.</p>
2097 * <p>Some devices may choose to provide a second set of calibration
2098 * information for improved quality, including
2099 * {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2} and its corresponding matrices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002100 * <p><b>Possible values:</b>
2101 * <ul>
2102 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT DAYLIGHT}</li>
2103 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT FLUORESCENT}</li>
2104 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN TUNGSTEN}</li>
2105 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLASH FLASH}</li>
2106 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER FINE_WEATHER}</li>
2107 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER CLOUDY_WEATHER}</li>
2108 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_SHADE SHADE}</li>
2109 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT DAYLIGHT_FLUORESCENT}</li>
2110 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT DAY_WHITE_FLUORESCENT}</li>
2111 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT COOL_WHITE_FLUORESCENT}</li>
2112 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT WHITE_FLUORESCENT}</li>
2113 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A STANDARD_A}</li>
2114 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B STANDARD_B}</li>
2115 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C STANDARD_C}</li>
2116 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D55 D55}</li>
2117 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D65 D65}</li>
2118 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D75 D75}</li>
2119 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D50 D50}</li>
2120 * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN ISO_STUDIO_TUNGSTEN}</li>
2121 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002122 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunk7c062362014-04-15 23:53:53 -07002123 *
2124 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1
2125 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM1
2126 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX1
2127 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
2128 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT
2129 * @see #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT
2130 * @see #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN
2131 * @see #SENSOR_REFERENCE_ILLUMINANT1_FLASH
2132 * @see #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER
2133 * @see #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER
2134 * @see #SENSOR_REFERENCE_ILLUMINANT1_SHADE
2135 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT
2136 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT
2137 * @see #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT
2138 * @see #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT
2139 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A
2140 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B
2141 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C
2142 * @see #SENSOR_REFERENCE_ILLUMINANT1_D55
2143 * @see #SENSOR_REFERENCE_ILLUMINANT1_D65
2144 * @see #SENSOR_REFERENCE_ILLUMINANT1_D75
2145 * @see #SENSOR_REFERENCE_ILLUMINANT1_D50
2146 * @see #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN
2147 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002148 @PublicKey
Ruben Brunk7c062362014-04-15 23:53:53 -07002149 public static final Key<Integer> SENSOR_REFERENCE_ILLUMINANT1 =
2150 new Key<Integer>("android.sensor.referenceIlluminant1", int.class);
2151
2152 /**
2153 * <p>The standard reference illuminant used as the scene light source when
2154 * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2},
2155 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and
2156 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} matrices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002157 * <p>See {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1} for more details.</p>
2158 * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2},
Ruben Brunk7c062362014-04-15 23:53:53 -07002159 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and
2160 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} will also be present.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002161 * <p><b>Range of valid values:</b><br>
2162 * Any value listed in {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002163 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunk7c062362014-04-15 23:53:53 -07002164 *
2165 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2
2166 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM2
2167 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX2
2168 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
2169 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002170 @PublicKey
Ruben Brunk7c062362014-04-15 23:53:53 -07002171 public static final Key<Byte> SENSOR_REFERENCE_ILLUMINANT2 =
2172 new Key<Byte>("android.sensor.referenceIlluminant2", byte.class);
2173
2174 /**
2175 * <p>A per-device calibration transform matrix that maps from the
2176 * reference sensor colorspace to the actual device sensor colorspace.</p>
2177 * <p>This matrix is used to correct for per-device variations in the
2178 * sensor colorspace, and is used for processing raw buffer data.</p>
2179 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
2180 * contains a per-device calibration transform that maps colors
2181 * from reference sensor color space (i.e. the "golden module"
2182 * colorspace) into this camera device's native sensor color
2183 * space under the first reference illuminant
2184 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p>
2185 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2186 *
2187 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
2188 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002189 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07002190 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM1 =
2191 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform1", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07002192
2193 /**
2194 * <p>A per-device calibration transform matrix that maps from the
2195 * reference sensor colorspace to the actual device sensor colorspace
2196 * (this is the colorspace of the raw buffer data).</p>
2197 * <p>This matrix is used to correct for per-device variations in the
2198 * sensor colorspace, and is used for processing raw buffer data.</p>
2199 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
2200 * contains a per-device calibration transform that maps colors
2201 * from reference sensor color space (i.e. the "golden module"
2202 * colorspace) into this camera device's native sensor color
2203 * space under the second reference illuminant
2204 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p>
2205 * <p>This matrix will only be present if the second reference
2206 * illuminant is present.</p>
2207 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2208 *
2209 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
2210 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002211 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07002212 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM2 =
2213 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform2", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07002214
2215 /**
2216 * <p>A matrix that transforms color values from CIE XYZ color space to
2217 * reference sensor color space.</p>
2218 * <p>This matrix is used to convert from the standard CIE XYZ color
2219 * space to the reference sensor colorspace, and is used when processing
2220 * raw buffer data.</p>
2221 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
2222 * contains a color transform matrix that maps colors from the CIE
2223 * XYZ color space to the reference sensor color space (i.e. the
2224 * "golden module" colorspace) under the first reference illuminant
2225 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p>
2226 * <p>The white points chosen in both the reference sensor color space
2227 * and the CIE XYZ colorspace when calculating this transform will
2228 * match the standard white point for the first reference illuminant
2229 * (i.e. no chromatic adaptation will be applied by this transform).</p>
2230 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2231 *
2232 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
2233 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002234 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07002235 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM1 =
2236 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform1", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07002237
2238 /**
2239 * <p>A matrix that transforms color values from CIE XYZ color space to
2240 * reference sensor color space.</p>
2241 * <p>This matrix is used to convert from the standard CIE XYZ color
2242 * space to the reference sensor colorspace, and is used when processing
2243 * raw buffer data.</p>
2244 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
2245 * contains a color transform matrix that maps colors from the CIE
2246 * XYZ color space to the reference sensor color space (i.e. the
2247 * "golden module" colorspace) under the second reference illuminant
2248 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p>
2249 * <p>The white points chosen in both the reference sensor color space
2250 * and the CIE XYZ colorspace when calculating this transform will
2251 * match the standard white point for the second reference illuminant
2252 * (i.e. no chromatic adaptation will be applied by this transform).</p>
2253 * <p>This matrix will only be present if the second reference
2254 * illuminant is present.</p>
2255 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2256 *
2257 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
2258 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002259 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07002260 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM2 =
2261 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform2", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07002262
2263 /**
2264 * <p>A matrix that transforms white balanced camera colors from the reference
2265 * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
2266 * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
2267 * is used when processing raw buffer data.</p>
2268 * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
2269 * a color transform matrix that maps white balanced colors from the
2270 * reference sensor color space to the CIE XYZ color space with a D50 white
2271 * point.</p>
2272 * <p>Under the first reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1})
2273 * this matrix is chosen so that the standard white point for this reference
2274 * illuminant in the reference sensor colorspace is mapped to D50 in the
2275 * CIE XYZ colorspace.</p>
2276 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2277 *
2278 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
2279 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002280 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07002281 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX1 =
2282 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix1", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07002283
2284 /**
2285 * <p>A matrix that transforms white balanced camera colors from the reference
2286 * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
2287 * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
2288 * is used when processing raw buffer data.</p>
2289 * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
2290 * a color transform matrix that maps white balanced colors from the
2291 * reference sensor color space to the CIE XYZ color space with a D50 white
2292 * point.</p>
2293 * <p>Under the second reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2})
2294 * this matrix is chosen so that the standard white point for this reference
2295 * illuminant in the reference sensor colorspace is mapped to D50 in the
2296 * CIE XYZ colorspace.</p>
2297 * <p>This matrix will only be present if the second reference
2298 * illuminant is present.</p>
2299 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2300 *
2301 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
2302 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002303 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07002304 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX2 =
2305 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix2", android.hardware.camera2.params.ColorSpaceTransform.class);
Ruben Brunk7c062362014-04-15 23:53:53 -07002306
2307 /**
Ruben Brunk67b47022014-02-07 15:26:29 -08002308 * <p>A fixed black level offset for each of the color filter arrangement
2309 * (CFA) mosaic channels.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002310 * <p>This key specifies the zero light value for each of the CFA mosaic
Ruben Brunke60e29552014-02-18 10:44:17 -08002311 * channels in the camera sensor. The maximal value output by the
2312 * 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 -07002313 * <p>The values are given in the same order as channels listed for the CFA
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002314 * layout key (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}), i.e. the
Ruben Brunk52842e72014-06-05 13:16:45 -07002315 * nth value given corresponds to the black level offset for the nth
2316 * color channel listed in the CFA.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002317 * <p><b>Range of valid values:</b><br>
2318 * &gt;= 0 for each.</p>
Ruben Brunk1ef676f2014-02-07 16:08:38 -08002319 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunke60e29552014-02-18 10:44:17 -08002320 *
Ruben Brunk52842e72014-06-05 13:16:45 -07002321 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
Ruben Brunke60e29552014-02-18 10:44:17 -08002322 * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL
Ruben Brunk67b47022014-02-07 15:26:29 -08002323 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002324 @PublicKey
Ruben Brunk52842e72014-06-05 13:16:45 -07002325 public static final Key<android.hardware.camera2.params.BlackLevelPattern> SENSOR_BLACK_LEVEL_PATTERN =
2326 new Key<android.hardware.camera2.params.BlackLevelPattern>("android.sensor.blackLevelPattern", android.hardware.camera2.params.BlackLevelPattern.class);
Ruben Brunk67b47022014-02-07 15:26:29 -08002327
2328 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002329 * <p>Maximum sensitivity that is implemented
Zhijun He153ac102014-02-03 12:25:12 -08002330 * purely through analog gain.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002331 * <p>For {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} values less than or
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002332 * equal to this, all applied gain must be analog. For
Zhijun He153ac102014-02-03 12:25:12 -08002333 * values above this, the gain applied can be a mix of analog and
2334 * digital.</p>
Igor Murashkin3242f4f2014-01-15 12:27:41 -08002335 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002336 * <p><b>Full capability</b> -
2337 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2338 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Alex Raye83c4eb2013-10-02 17:14:36 -07002339 *
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002340 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08002341 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002342 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002343 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002344 public static final Key<Integer> SENSOR_MAX_ANALOG_SENSITIVITY =
2345 new Key<Integer>("android.sensor.maxAnalogSensitivity", int.class);
2346
2347 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002348 * <p>Clockwise angle through which the output image needs to be rotated to be
2349 * upright on the device screen in its native orientation.</p>
2350 * <p>Also defines the direction of rolling shutter readout, which is from top to bottom in
2351 * the sensor's coordinate system.</p>
2352 * <p><b>Units</b>: Degrees of clockwise rotation; always a multiple of
2353 * 90</p>
2354 * <p><b>Range of valid values:</b><br>
2355 * 0, 90, 180, 270</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002356 * <p>This key is available on all devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002357 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002358 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002359 public static final Key<Integer> SENSOR_ORIENTATION =
2360 new Key<Integer>("android.sensor.orientation", int.class);
2361
2362 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002363 * <p>List of sensor test pattern modes for {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}
2364 * supported by this camera device.</p>
2365 * <p>Defaults to OFF, and always includes OFF if defined.</p>
2366 * <p><b>Range of valid values:</b><br>
2367 * Any value listed in {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}</p>
Igor Murashkinc127f052014-01-17 18:06:02 -08002368 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002369 *
2370 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
Igor Murashkinc127f052014-01-17 18:06:02 -08002371 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002372 @PublicKey
Zhijun Hea4866242014-03-27 23:51:34 -07002373 public static final Key<int[]> SENSOR_AVAILABLE_TEST_PATTERN_MODES =
2374 new Key<int[]>("android.sensor.availableTestPatternModes", int[].class);
Igor Murashkinc127f052014-01-17 18:06:02 -08002375
2376 /**
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08002377 * <p>List of lens shading modes for {@link CaptureRequest#SHADING_MODE android.shading.mode} that are supported by this camera device.</p>
2378 * <p>This list contains lens shading modes that can be set for the camera device.
2379 * Camera devices that support the MANUAL_POST_PROCESSING capability will always
2380 * list OFF and FAST mode. This includes all FULL level devices.
2381 * LEGACY devices will always only support FAST mode.</p>
2382 * <p><b>Range of valid values:</b><br>
2383 * Any value listed in {@link CaptureRequest#SHADING_MODE android.shading.mode}</p>
2384 * <p>This key is available on all devices.</p>
2385 *
2386 * @see CaptureRequest#SHADING_MODE
2387 */
2388 @PublicKey
2389 public static final Key<int[]> SHADING_AVAILABLE_MODES =
2390 new Key<int[]>("android.shading.availableModes", int[].class);
2391
2392 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002393 * <p>List of face detection modes for {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} that are
2394 * supported by this camera device.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002395 * <p>OFF is always supported.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002396 * <p><b>Range of valid values:</b><br>
2397 * Any value listed in {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002398 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002399 *
2400 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002401 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002402 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07002403 public static final Key<int[]> STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES =
2404 new Key<int[]>("android.statistics.info.availableFaceDetectModes", int[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002405
2406 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002407 * <p>The maximum number of simultaneously detectable
2408 * faces.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002409 * <p><b>Range of valid values:</b><br>
2410 * 0 for cameras without available face detection; otherwise:
2411 * <code>&gt;=4</code> for LIMITED or FULL hwlevel devices or
2412 * <code>&gt;0</code> for LEGACY devices.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002413 * <p>This key is available on all devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002414 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002415 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002416 public static final Key<Integer> STATISTICS_INFO_MAX_FACE_COUNT =
2417 new Key<Integer>("android.statistics.info.maxFaceCount", int.class);
2418
2419 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002420 * <p>List of hot pixel map output modes for {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode} that are
2421 * supported by this camera device.</p>
2422 * <p>If no hotpixel map output is available for this camera device, this will contain only
2423 * <code>false</code>.</p>
2424 * <p>ON is always supported on devices with the RAW capability.</p>
2425 * <p><b>Range of valid values:</b><br>
2426 * Any value listed in {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002427 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08002428 *
2429 * @see CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE
2430 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002431 @PublicKey
Ruben Brunk9d454fd2014-03-04 14:11:52 -08002432 public static final Key<boolean[]> STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES =
2433 new Key<boolean[]>("android.statistics.info.availableHotPixelMapModes", boolean[].class);
2434
2435 /**
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08002436 * <p>List of lens shading map output modes for {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} that
2437 * are supported by this camera device.</p>
2438 * <p>If no lens shading map output is available for this camera device, this key will
2439 * contain only OFF.</p>
2440 * <p>ON is always supported on devices with the RAW capability.
2441 * LEGACY mode devices will always only support OFF.</p>
2442 * <p><b>Range of valid values:</b><br>
2443 * Any value listed in {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode}</p>
2444 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2445 *
2446 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
2447 */
2448 @PublicKey
2449 public static final Key<byte[]> STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES =
2450 new Key<byte[]>("android.statistics.info.availableLensShadingMapModes", byte[].class);
2451
2452 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002453 * <p>Maximum number of supported points in the
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07002454 * tonemap curve that can be used for {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002455 * <p>If the actual number of points provided by the application (in {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}*) is
2456 * less than this maximum, the camera device will resample the curve to its internal
2457 * representation, using linear interpolation.</p>
Igor Murashkine0060932014-01-17 17:24:11 -08002458 * <p>The output curves in the result metadata may have a different number
2459 * of points than the input curves, and will represent the actual
2460 * hardware curves used as closely as possible when linearly interpolated.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002461 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2462 * <p><b>Full capability</b> -
2463 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2464 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Igor Murashkine0060932014-01-17 17:24:11 -08002465 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002466 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07002467 * @see CaptureRequest#TONEMAP_CURVE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002468 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002469 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002470 public static final Key<Integer> TONEMAP_MAX_CURVE_POINTS =
2471 new Key<Integer>("android.tonemap.maxCurvePoints", int.class);
2472
2473 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002474 * <p>List of tonemapping modes for {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} that are supported by this camera
2475 * device.</p>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002476 * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always contain
2477 * at least one of below mode combinations:</p>
2478 * <ul>
Yin-Chia Yehfba08dd2015-04-02 14:05:14 -07002479 * <li>CONTRAST_CURVE, FAST and HIGH_QUALITY</li>
2480 * <li>GAMMA_VALUE, PRESET_CURVE, FAST and HIGH_QUALITY</li>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08002481 * </ul>
2482 * <p>This includes all FULL level devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002483 * <p><b>Range of valid values:</b><br>
2484 * Any value listed in {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002485 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2486 * <p><b>Full capability</b> -
2487 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2488 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08002489 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002490 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk6dc379c2014-03-04 15:04:00 -08002491 * @see CaptureRequest#TONEMAP_MODE
2492 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002493 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -07002494 public static final Key<int[]> TONEMAP_AVAILABLE_TONE_MAP_MODES =
2495 new Key<int[]>("android.tonemap.availableToneMapModes", int[].class);
Ruben Brunk6dc379c2014-03-04 15:04:00 -08002496
2497 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002498 * <p>A list of camera LEDs that are available on this system.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002499 * <p><b>Possible values:</b>
2500 * <ul>
2501 * <li>{@link #LED_AVAILABLE_LEDS_TRANSMIT TRANSMIT}</li>
2502 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002503 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002504 * @see #LED_AVAILABLE_LEDS_TRANSMIT
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002505 * @hide
2506 */
2507 public static final Key<int[]> LED_AVAILABLE_LEDS =
2508 new Key<int[]>("android.led.availableLeds", int[].class);
2509
2510 /**
Igor Murashkine46c0da2014-02-07 18:34:37 -08002511 * <p>Generally classifies the overall set of the camera device functionality.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002512 * <p>Camera devices will come in three flavors: LEGACY, LIMITED and FULL.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002513 * <p>A FULL device will support below capabilities:</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08002514 * <ul>
Eino-Ville Talvala126a7462014-11-04 16:31:01 -08002515 * <li>30fps operation at maximum resolution (== sensor resolution) is preferred, more than
2516 * 20fps is required, for at least uncompressed YUV
2517 * output. ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains BURST_CAPTURE)</li>
Zhijun He50f72432014-05-28 13:52:04 -07002518 * <li>Per frame control ({@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} <code>==</code> PER_FRAME_CONTROL)</li>
2519 * <li>Manual sensor control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains MANUAL_SENSOR)</li>
Eino-Ville Talvala126a7462014-11-04 16:31:01 -08002520 * <li>Manual post-processing control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
2521 * MANUAL_POST_PROCESSING)</li>
Zhijun He28288ca2014-06-25 15:49:13 -07002522 * <li>Arbitrary cropping region ({@link CameraCharacteristics#SCALER_CROPPING_TYPE android.scaler.croppingType} <code>==</code> FREEFORM)</li>
Eino-Ville Talvala126a7462014-11-04 16:31:01 -08002523 * <li>At least 3 processed (but not stalling) format output streams
2524 * ({@link CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_PROC android.request.maxNumOutputProc} <code>&gt;=</code> 3)</li>
Zhijun He28288ca2014-06-25 15:49:13 -07002525 * <li>The required stream configuration defined in android.scaler.availableStreamConfigurations</li>
2526 * <li>The required exposure time range defined in {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
2527 * <li>The required maxFrameDuration defined in {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li>
Igor Murashkine46c0da2014-02-07 18:34:37 -08002528 * </ul>
2529 * <p>A LIMITED device may have some or none of the above characteristics.
2530 * To find out more refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002531 * <p>Some features are not part of any particular hardware level or capability and must be
2532 * queried separately. These include:</p>
2533 * <ul>
2534 * <li>Calibrated timestamps ({@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} <code>==</code> REALTIME)</li>
2535 * <li>Precision lens control ({@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} <code>==</code> CALIBRATED)</li>
2536 * <li>Face detection ({@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes})</li>
2537 * <li>Optical or electrical image stabilization
2538 * ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization},
2539 * {@link CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES android.control.availableVideoStabilizationModes})</li>
2540 * </ul>
Ruben Brunk4a61a862014-07-01 16:00:26 -07002541 * <p>A LEGACY device does not support per-frame control, manual sensor control, manual
2542 * post-processing, arbitrary cropping regions, and has relaxed performance constraints.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002543 * <p>Each higher level supports everything the lower level supports
2544 * in this order: FULL <code>&gt;</code> LIMITED <code>&gt;</code> LEGACY.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002545 * <p><b>Possible values:</b>
2546 * <ul>
2547 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED}</li>
2548 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL}</li>
2549 * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY LEGACY}</li>
2550 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002551 * <p>This key is available on all devices.</p>
Igor Murashkine46c0da2014-02-07 18:34:37 -08002552 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002553 * @see CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES
2554 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
2555 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
Igor Murashkine46c0da2014-02-07 18:34:37 -08002556 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
Zhijun He28288ca2014-06-25 15:49:13 -07002557 * @see CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_PROC
2558 * @see CameraCharacteristics#SCALER_CROPPING_TYPE
2559 * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
2560 * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002561 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
2562 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
Zhijun He50f72432014-05-28 13:52:04 -07002563 * @see CameraCharacteristics#SYNC_MAX_LATENCY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002564 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED
2565 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_FULL
Ruben Brunk4a61a862014-07-01 16:00:26 -07002566 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002567 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002568 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002569 public static final Key<Integer> INFO_SUPPORTED_HARDWARE_LEVEL =
2570 new Key<Integer>("android.info.supportedHardwareLevel", int.class);
2571
Igor Murashkin3865a842014-01-17 18:18:39 -08002572 /**
2573 * <p>The maximum number of frames that can occur after a request
2574 * (different than the previous) has been submitted, and before the
2575 * result's state becomes synchronized (by setting
2576 * android.sync.frameNumber to a non-negative value).</p>
2577 * <p>This defines the maximum distance (in number of metadata results),
2578 * between android.sync.frameNumber and the equivalent
Igor Murashkinbdf366c2014-07-25 16:54:20 -07002579 * frame number for that result.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08002580 * <p>In other words this acts as an upper boundary for how many frames
2581 * must occur before the camera device knows for a fact that the new
2582 * submitted camera settings have been applied in outgoing frames.</p>
2583 * <p>For example if the distance was 2,</p>
2584 * <pre><code>initial request = X (repeating)
2585 * request1 = X
2586 * request2 = Y
2587 * request3 = Y
2588 * request4 = Y
2589 *
2590 * where requestN has frameNumber N, and the first of the repeating
2591 * initial request's has frameNumber F (and F &lt; 1).
2592 *
2593 * initial result = X' + { android.sync.frameNumber == F }
2594 * result1 = X' + { android.sync.frameNumber == F }
2595 * result2 = X' + { android.sync.frameNumber == CONVERGING }
2596 * result3 = X' + { android.sync.frameNumber == CONVERGING }
2597 * result4 = X' + { android.sync.frameNumber == 2 }
2598 *
2599 * where resultN has frameNumber N.
2600 * </code></pre>
2601 * <p>Since <code>result4</code> has a <code>frameNumber == 4</code> and
2602 * <code>android.sync.frameNumber == 2</code>, the distance is clearly
2603 * <code>4 - 2 = 2</code>.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002604 * <p><b>Units</b>: Frame counts</p>
2605 * <p><b>Possible values:</b>
2606 * <ul>
2607 * <li>{@link #SYNC_MAX_LATENCY_PER_FRAME_CONTROL PER_FRAME_CONTROL}</li>
2608 * <li>{@link #SYNC_MAX_LATENCY_UNKNOWN UNKNOWN}</li>
2609 * </ul></p>
2610 * <p><b>Available values for this device:</b><br>
2611 * A positive value, PER_FRAME_CONTROL, or UNKNOWN.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002612 * <p>This key is available on all devices.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08002613 * @see #SYNC_MAX_LATENCY_PER_FRAME_CONTROL
2614 * @see #SYNC_MAX_LATENCY_UNKNOWN
2615 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002616 @PublicKey
Igor Murashkin3865a842014-01-17 18:18:39 -08002617 public static final Key<Integer> SYNC_MAX_LATENCY =
2618 new Key<Integer>("android.sync.maxLatency", int.class);
2619
Eino-Ville Talvala24c369e2015-02-23 15:55:55 -08002620 /**
2621 * <p>The available depth dataspace stream
2622 * configurations that this camera device supports
2623 * (i.e. format, width, height, output/input stream).</p>
2624 * <p>These are output stream configurations for use with
2625 * dataSpace HAL_DATASPACE_DEPTH. The configurations are
2626 * listed as <code>(format, width, height, input?)</code> tuples.</p>
2627 * <p>Only devices that support depth output for at least
2628 * the HAL_PIXEL_FORMAT_Y16 dense depth map may include
2629 * this entry.</p>
2630 * <p>A device that also supports the HAL_PIXEL_FORMAT_BLOB
2631 * sparse depth point cloud must report a single entry for
2632 * the format in this list as <code>(HAL_PIXEL_FORMAT_BLOB,
2633 * android.depth.maxDepthSamples, 1, OUTPUT)</code> in addition to
2634 * the entries for HAL_PIXEL_FORMAT_Y16.</p>
2635 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2636 * <p><b>Limited capability</b> -
2637 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
2638 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
2639 *
2640 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2641 * @hide
2642 */
2643 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS =
2644 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.depth.availableDepthStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
2645
2646 /**
2647 * <p>This lists the minimum frame duration for each
2648 * format/size combination for depth output formats.</p>
2649 * <p>This should correspond to the frame duration when only that
2650 * stream is active, with all processing (typically in android.*.mode)
2651 * set to either OFF or FAST.</p>
2652 * <p>When multiple streams are used in a request, the minimum frame
2653 * duration will be max(individual stream min durations).</p>
2654 * <p>The minimum frame duration of a stream (of a particular format, size)
2655 * is the same regardless of whether the stream is input or output.</p>
2656 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and
2657 * android.scaler.availableStallDurations for more details about
2658 * calculating the max frame rate.</p>
2659 * <p>(Keep in sync with
2660 * StreamConfigurationMap#getOutputMinFrameDuration)</p>
2661 * <p><b>Units</b>: (format, width, height, ns) x n</p>
2662 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2663 * <p><b>Limited capability</b> -
2664 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
2665 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
2666 *
2667 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2668 * @see CaptureRequest#SENSOR_FRAME_DURATION
2669 * @hide
2670 */
2671 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS =
2672 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
2673
2674 /**
2675 * <p>This lists the maximum stall duration for each
2676 * format/size combination for depth streams.</p>
2677 * <p>A stall duration is how much extra time would get added
2678 * to the normal minimum frame duration for a repeating request
2679 * that has streams with non-zero stall.</p>
2680 * <p>This functions similarly to
2681 * android.scaler.availableStallDurations for depth
2682 * streams.</p>
2683 * <p>All depth output stream formats may have a nonzero stall
2684 * duration.</p>
2685 * <p><b>Units</b>: (format, width, height, ns) x n</p>
2686 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2687 * <p><b>Limited capability</b> -
2688 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
2689 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
2690 *
2691 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2692 * @hide
2693 */
2694 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS =
2695 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
2696
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002697 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
2698 * End generated code
2699 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
Igor Murashkin6c76f582014-07-15 17:19:49 -07002700
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002701
2702
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002703}