Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2013 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Eino-Ville Talvala | 2f1a2e4 | 2013-07-25 17:12:05 -0700 | [diff] [blame] | 17 | package android.hardware.camera2; |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 18 | |
Eino-Ville Talvala | 8b90557 | 2015-05-14 15:43:01 -0700 | [diff] [blame] | 19 | import android.annotation.NonNull; |
| 20 | import android.annotation.Nullable; |
Eino-Ville Talvala | 70c2207 | 2013-08-27 12:09:04 -0700 | [diff] [blame] | 21 | import android.hardware.camera2.impl.CameraMetadataNative; |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 22 | import android.hardware.camera2.impl.PublicKey; |
| 23 | import android.hardware.camera2.impl.SyntheticKey; |
Emilian Peev | 75a5570 | 2017-11-07 16:09:59 +0000 | [diff] [blame] | 24 | import android.hardware.camera2.params.SessionConfiguration; |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 25 | import android.hardware.camera2.utils.TypeReference; |
Igor Murashkin | 72f9f0a | 2014-05-14 15:46:10 -0700 | [diff] [blame] | 26 | import android.util.Rational; |
Eino-Ville Talvala | 70c2207 | 2013-08-27 12:09:04 -0700 | [diff] [blame] | 27 | |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 28 | import java.util.Collections; |
| 29 | import java.util.List; |
| 30 | |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 31 | /** |
| 32 | * <p>The properties describing a |
| 33 | * {@link CameraDevice CameraDevice}.</p> |
| 34 | * |
| 35 | * <p>These properties are fixed for a given CameraDevice, and can be queried |
| 36 | * through the {@link CameraManager CameraManager} |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 37 | * interface with {@link CameraManager#getCameraCharacteristics}.</p> |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 38 | * |
Ruben Brunk | f967a54 | 2014-04-28 16:31:11 -0700 | [diff] [blame] | 39 | * <p>{@link CameraCharacteristics} objects are immutable.</p> |
| 40 | * |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 41 | * @see CameraDevice |
| 42 | * @see CameraManager |
| 43 | */ |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 44 | public final class CameraCharacteristics extends CameraMetadata<CameraCharacteristics.Key<?>> { |
| 45 | |
| 46 | /** |
| 47 | * A {@code Key} is used to do camera characteristics field lookups with |
| 48 | * {@link CameraCharacteristics#get}. |
| 49 | * |
| 50 | * <p>For example, to get the stream configuration map: |
| 51 | * <code><pre> |
| 52 | * StreamConfigurationMap map = cameraCharacteristics.get( |
| 53 | * CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP); |
| 54 | * </pre></code> |
| 55 | * </p> |
| 56 | * |
| 57 | * <p>To enumerate over all possible keys for {@link CameraCharacteristics}, see |
| 58 | * {@link CameraCharacteristics#getKeys()}.</p> |
| 59 | * |
| 60 | * @see CameraCharacteristics#get |
| 61 | * @see CameraCharacteristics#getKeys() |
| 62 | */ |
| 63 | public static final class Key<T> { |
| 64 | private final CameraMetadataNative.Key<T> mKey; |
| 65 | |
| 66 | /** |
| 67 | * Visible for testing and vendor extensions only. |
| 68 | * |
| 69 | * @hide |
| 70 | */ |
Emilian Peev | de62d84 | 2017-03-23 19:20:40 +0000 | [diff] [blame] | 71 | public Key(String name, Class<T> type, long vendorId) { |
| 72 | mKey = new CameraMetadataNative.Key<T>(name, type, vendorId); |
| 73 | } |
| 74 | |
| 75 | /** |
| 76 | * Visible for testing and vendor extensions only. |
| 77 | * |
| 78 | * @hide |
| 79 | */ |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 80 | public Key(String name, Class<T> type) { |
| 81 | mKey = new CameraMetadataNative.Key<T>(name, type); |
| 82 | } |
| 83 | |
| 84 | /** |
| 85 | * Visible for testing and vendor extensions only. |
| 86 | * |
| 87 | * @hide |
| 88 | */ |
| 89 | public Key(String name, TypeReference<T> typeReference) { |
| 90 | mKey = new CameraMetadataNative.Key<T>(name, typeReference); |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * Return a camelCase, period separated name formatted like: |
| 95 | * {@code "root.section[.subsections].name"}. |
| 96 | * |
| 97 | * <p>Built-in keys exposed by the Android SDK are always prefixed with {@code "android."}; |
| 98 | * keys that are device/platform-specific are prefixed with {@code "com."}.</p> |
| 99 | * |
| 100 | * <p>For example, {@code CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP} would |
| 101 | * have a name of {@code "android.scaler.streamConfigurationMap"}; whereas a device |
| 102 | * specific key might look like {@code "com.google.nexus.data.private"}.</p> |
| 103 | * |
| 104 | * @return String representation of the key name |
| 105 | */ |
Eino-Ville Talvala | 8b90557 | 2015-05-14 15:43:01 -0700 | [diff] [blame] | 106 | @NonNull |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 107 | public String getName() { |
| 108 | return mKey.getName(); |
| 109 | } |
| 110 | |
| 111 | /** |
Emilian Peev | de62d84 | 2017-03-23 19:20:40 +0000 | [diff] [blame] | 112 | * Return vendor tag id. |
| 113 | * |
| 114 | * @hide |
| 115 | */ |
| 116 | public long getVendorId() { |
| 117 | return mKey.getVendorId(); |
| 118 | } |
| 119 | |
| 120 | /** |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 121 | * {@inheritDoc} |
| 122 | */ |
| 123 | @Override |
| 124 | public final int hashCode() { |
| 125 | return mKey.hashCode(); |
| 126 | } |
| 127 | |
| 128 | /** |
| 129 | * {@inheritDoc} |
| 130 | */ |
| 131 | @SuppressWarnings("unchecked") |
| 132 | @Override |
| 133 | public final boolean equals(Object o) { |
| 134 | return o instanceof Key && ((Key<T>)o).mKey.equals(mKey); |
| 135 | } |
| 136 | |
| 137 | /** |
Chien-Yu Chen | 12a8385 | 2015-07-07 12:17:22 -0700 | [diff] [blame] | 138 | * Return this {@link Key} as a string representation. |
| 139 | * |
| 140 | * <p>{@code "CameraCharacteristics.Key(%s)"}, where {@code %s} represents |
| 141 | * the name of this key as returned by {@link #getName}.</p> |
| 142 | * |
| 143 | * @return string representation of {@link Key} |
| 144 | */ |
| 145 | @NonNull |
| 146 | @Override |
| 147 | public String toString() { |
| 148 | return String.format("CameraCharacteristics.Key(%s)", mKey.getName()); |
| 149 | } |
| 150 | |
| 151 | /** |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 152 | * Visible for CameraMetadataNative implementation only; do not use. |
| 153 | * |
| 154 | * TODO: Make this private or remove it altogether. |
| 155 | * |
| 156 | * @hide |
| 157 | */ |
| 158 | public CameraMetadataNative.Key<T> getNativeKey() { |
| 159 | return mKey; |
| 160 | } |
| 161 | |
| 162 | @SuppressWarnings({ |
| 163 | "unused", "unchecked" |
| 164 | }) |
| 165 | private Key(CameraMetadataNative.Key<?> nativeKey) { |
| 166 | mKey = (CameraMetadataNative.Key<T>) nativeKey; |
| 167 | } |
| 168 | } |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 169 | |
Eino-Ville Talvala | 70c2207 | 2013-08-27 12:09:04 -0700 | [diff] [blame] | 170 | private final CameraMetadataNative mProperties; |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 171 | private List<CameraCharacteristics.Key<?>> mKeys; |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 172 | private List<CaptureRequest.Key<?>> mAvailableRequestKeys; |
Emilian Peev | 75a5570 | 2017-11-07 16:09:59 +0000 | [diff] [blame] | 173 | private List<CaptureRequest.Key<?>> mAvailableSessionKeys; |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 174 | private List<CaptureResult.Key<?>> mAvailableResultKeys; |
Eino-Ville Talvala | 70c2207 | 2013-08-27 12:09:04 -0700 | [diff] [blame] | 175 | |
| 176 | /** |
| 177 | * Takes ownership of the passed-in properties object |
| 178 | * @hide |
| 179 | */ |
Igor Murashkin | 68f4006 | 2013-09-10 12:15:54 -0700 | [diff] [blame] | 180 | public CameraCharacteristics(CameraMetadataNative properties) { |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 181 | mProperties = CameraMetadataNative.move(properties); |
Emilian Peev | de62d84 | 2017-03-23 19:20:40 +0000 | [diff] [blame] | 182 | setNativeInstance(mProperties); |
Eino-Ville Talvala | 70c2207 | 2013-08-27 12:09:04 -0700 | [diff] [blame] | 183 | } |
| 184 | |
Ruben Brunk | f967a54 | 2014-04-28 16:31:11 -0700 | [diff] [blame] | 185 | /** |
| 186 | * Returns a copy of the underlying {@link CameraMetadataNative}. |
| 187 | * @hide |
| 188 | */ |
| 189 | public CameraMetadataNative getNativeCopy() { |
| 190 | return new CameraMetadataNative(mProperties); |
| 191 | } |
| 192 | |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 193 | /** |
| 194 | * Get a camera characteristics field value. |
| 195 | * |
| 196 | * <p>The field definitions can be |
| 197 | * found in {@link CameraCharacteristics}.</p> |
| 198 | * |
| 199 | * <p>Querying the value for the same key more than once will return a value |
| 200 | * which is equal to the previous queried value.</p> |
| 201 | * |
| 202 | * @throws IllegalArgumentException if the key was not valid |
| 203 | * |
| 204 | * @param key The characteristics field to read. |
| 205 | * @return The value of that key, or {@code null} if the field is not set. |
| 206 | */ |
Eino-Ville Talvala | 8b90557 | 2015-05-14 15:43:01 -0700 | [diff] [blame] | 207 | @Nullable |
Eino-Ville Talvala | 70c2207 | 2013-08-27 12:09:04 -0700 | [diff] [blame] | 208 | public <T> T get(Key<T> key) { |
| 209 | return mProperties.get(key); |
| 210 | } |
| 211 | |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 212 | /** |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 213 | * {@inheritDoc} |
| 214 | * @hide |
| 215 | */ |
| 216 | @SuppressWarnings("unchecked") |
| 217 | @Override |
| 218 | protected <T> T getProtected(Key<?> key) { |
| 219 | return (T) mProperties.get(key); |
| 220 | } |
| 221 | |
| 222 | /** |
| 223 | * {@inheritDoc} |
| 224 | * @hide |
| 225 | */ |
| 226 | @SuppressWarnings("unchecked") |
| 227 | @Override |
| 228 | protected Class<Key<?>> getKeyClass() { |
| 229 | Object thisClass = Key.class; |
| 230 | return (Class<Key<?>>)thisClass; |
| 231 | } |
| 232 | |
| 233 | /** |
| 234 | * {@inheritDoc} |
| 235 | */ |
Eino-Ville Talvala | 8b90557 | 2015-05-14 15:43:01 -0700 | [diff] [blame] | 236 | @NonNull |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 237 | @Override |
| 238 | public List<Key<?>> getKeys() { |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 239 | // List of keys is immutable; cache the results after we calculate them |
| 240 | if (mKeys != null) { |
| 241 | return mKeys; |
| 242 | } |
| 243 | |
| 244 | int[] filterTags = get(REQUEST_AVAILABLE_CHARACTERISTICS_KEYS); |
| 245 | if (filterTags == null) { |
| 246 | throw new AssertionError("android.request.availableCharacteristicsKeys must be non-null" |
| 247 | + " in the characteristics"); |
| 248 | } |
| 249 | |
| 250 | mKeys = Collections.unmodifiableList( |
Emilian Peev | de62d84 | 2017-03-23 19:20:40 +0000 | [diff] [blame] | 251 | getKeys(getClass(), getKeyClass(), this, filterTags)); |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 252 | return mKeys; |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 253 | } |
| 254 | |
| 255 | /** |
Emilian Peev | 75a5570 | 2017-11-07 16:09:59 +0000 | [diff] [blame] | 256 | * <p>Returns a subset of {@link #getAvailableCaptureRequestKeys} keys that the |
| 257 | * camera device can pass as part of the capture session initialization.</p> |
| 258 | * |
| 259 | * <p>This list includes keys that are difficult to apply per-frame and |
| 260 | * can result in unexpected delays when modified during the capture session |
| 261 | * lifetime. Typical examples include parameters that require a |
| 262 | * time-consuming hardware re-configuration or internal camera pipeline |
| 263 | * change. For performance reasons we suggest clients to pass their initial |
| 264 | * values as part of {@link SessionConfiguration#setSessionParameters}. Once |
| 265 | * the camera capture session is enabled it is also recommended to avoid |
| 266 | * changing them from their initial values set in |
| 267 | * {@link SessionConfiguration#setSessionParameters }. |
| 268 | * Control over session parameters can still be exerted in capture requests |
| 269 | * but clients should be aware and expect delays during their application. |
| 270 | * An example usage scenario could look like this:</p> |
| 271 | * <ul> |
| 272 | * <li>The camera client starts by quering the session parameter key list via |
| 273 | * {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys }.</li> |
| 274 | * <li>Before triggering the capture session create sequence, a capture request |
| 275 | * must be built via {@link CameraDevice#createCaptureRequest } using an |
| 276 | * appropriate template matching the particular use case.</li> |
| 277 | * <li>The client should go over the list of session parameters and check |
| 278 | * whether some of the keys listed matches with the parameters that |
| 279 | * they intend to modify as part of the first capture request.</li> |
| 280 | * <li>If there is no such match, the capture request can be passed |
| 281 | * unmodified to {@link SessionConfiguration#setSessionParameters }.</li> |
| 282 | * <li>If matches do exist, the client should update the respective values |
| 283 | * and pass the request to {@link SessionConfiguration#setSessionParameters }.</li> |
| 284 | * <li>After the capture session initialization completes the session parameter |
| 285 | * key list can continue to serve as reference when posting or updating |
| 286 | * further requests. As mentioned above further changes to session |
| 287 | * parameters should ideally be avoided, if updates are necessary |
| 288 | * however clients could expect a delay/glitch during the |
| 289 | * parameter switch.</li> |
| 290 | * </ul> |
| 291 | * |
| 292 | * <p>The list returned is not modifiable, so any attempts to modify it will throw |
| 293 | * a {@code UnsupportedOperationException}.</p> |
| 294 | * |
| 295 | * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> |
| 296 | * |
| 297 | * @return List of keys that can be passed during capture session initialization. In case the |
| 298 | * camera device doesn't support such keys the list can be null. |
| 299 | */ |
| 300 | @SuppressWarnings({"unchecked"}) |
| 301 | public List<CaptureRequest.Key<?>> getAvailableSessionKeys() { |
| 302 | if (mAvailableSessionKeys == null) { |
| 303 | Object crKey = CaptureRequest.Key.class; |
| 304 | Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey; |
| 305 | |
| 306 | int[] filterTags = get(REQUEST_AVAILABLE_SESSION_KEYS); |
| 307 | if (filterTags == null) { |
| 308 | return null; |
| 309 | } |
| 310 | mAvailableSessionKeys = |
| 311 | getAvailableKeyList(CaptureRequest.class, crKeyTyped, filterTags); |
| 312 | } |
| 313 | return mAvailableSessionKeys; |
| 314 | } |
| 315 | |
| 316 | /** |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 317 | * Returns the list of keys supported by this {@link CameraDevice} for querying |
| 318 | * with a {@link CaptureRequest}. |
| 319 | * |
| 320 | * <p>The list returned is not modifiable, so any attempts to modify it will throw |
| 321 | * a {@code UnsupportedOperationException}.</p> |
| 322 | * |
| 323 | * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> |
| 324 | * |
Igor Murashkin | 68f4006 | 2013-09-10 12:15:54 -0700 | [diff] [blame] | 325 | * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 326 | * {@link #getKeys()} instead.</p> |
| 327 | * |
| 328 | * @return List of keys supported by this CameraDevice for CaptureRequests. |
| 329 | */ |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 330 | @SuppressWarnings({"unchecked"}) |
Eino-Ville Talvala | 8b90557 | 2015-05-14 15:43:01 -0700 | [diff] [blame] | 331 | @NonNull |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 332 | public List<CaptureRequest.Key<?>> getAvailableCaptureRequestKeys() { |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 333 | if (mAvailableRequestKeys == null) { |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 334 | Object crKey = CaptureRequest.Key.class; |
| 335 | Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey; |
| 336 | |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 337 | int[] filterTags = get(REQUEST_AVAILABLE_REQUEST_KEYS); |
| 338 | if (filterTags == null) { |
| 339 | throw new AssertionError("android.request.availableRequestKeys must be non-null " |
| 340 | + "in the characteristics"); |
| 341 | } |
| 342 | mAvailableRequestKeys = |
| 343 | getAvailableKeyList(CaptureRequest.class, crKeyTyped, filterTags); |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 344 | } |
| 345 | return mAvailableRequestKeys; |
| 346 | } |
| 347 | |
| 348 | /** |
| 349 | * Returns the list of keys supported by this {@link CameraDevice} for querying |
| 350 | * with a {@link CaptureResult}. |
| 351 | * |
| 352 | * <p>The list returned is not modifiable, so any attempts to modify it will throw |
| 353 | * a {@code UnsupportedOperationException}.</p> |
| 354 | * |
| 355 | * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> |
| 356 | * |
Igor Murashkin | 68f4006 | 2013-09-10 12:15:54 -0700 | [diff] [blame] | 357 | * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 358 | * {@link #getKeys()} instead.</p> |
| 359 | * |
| 360 | * @return List of keys supported by this CameraDevice for CaptureResults. |
| 361 | */ |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 362 | @SuppressWarnings({"unchecked"}) |
Eino-Ville Talvala | 8b90557 | 2015-05-14 15:43:01 -0700 | [diff] [blame] | 363 | @NonNull |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 364 | public List<CaptureResult.Key<?>> getAvailableCaptureResultKeys() { |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 365 | if (mAvailableResultKeys == null) { |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 366 | Object crKey = CaptureResult.Key.class; |
| 367 | Class<CaptureResult.Key<?>> crKeyTyped = (Class<CaptureResult.Key<?>>)crKey; |
| 368 | |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 369 | int[] filterTags = get(REQUEST_AVAILABLE_RESULT_KEYS); |
| 370 | if (filterTags == null) { |
| 371 | throw new AssertionError("android.request.availableResultKeys must be non-null " |
| 372 | + "in the characteristics"); |
| 373 | } |
| 374 | mAvailableResultKeys = getAvailableKeyList(CaptureResult.class, crKeyTyped, filterTags); |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 375 | } |
| 376 | return mAvailableResultKeys; |
| 377 | } |
| 378 | |
| 379 | /** |
| 380 | * Returns the list of keys supported by this {@link CameraDevice} by metadataClass. |
| 381 | * |
| 382 | * <p>The list returned is not modifiable, so any attempts to modify it will throw |
| 383 | * a {@code UnsupportedOperationException}.</p> |
| 384 | * |
| 385 | * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> |
| 386 | * |
| 387 | * @param metadataClass The subclass of CameraMetadata that you want to get the keys for. |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 388 | * @param keyClass The class of the metadata key, e.g. CaptureRequest.Key.class |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 389 | * |
| 390 | * @return List of keys supported by this CameraDevice for metadataClass. |
| 391 | * |
| 392 | * @throws IllegalArgumentException if metadataClass is not a subclass of CameraMetadata |
| 393 | */ |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 394 | private <TKey> List<TKey> |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 395 | getAvailableKeyList(Class<?> metadataClass, Class<TKey> keyClass, int[] filterTags) { |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 396 | |
| 397 | if (metadataClass.equals(CameraMetadata.class)) { |
| 398 | throw new AssertionError( |
| 399 | "metadataClass must be a strict subclass of CameraMetadata"); |
| 400 | } else if (!CameraMetadata.class.isAssignableFrom(metadataClass)) { |
| 401 | throw new AssertionError( |
| 402 | "metadataClass must be a subclass of CameraMetadata"); |
| 403 | } |
| 404 | |
Emilian Peev | de62d84 | 2017-03-23 19:20:40 +0000 | [diff] [blame] | 405 | List<TKey> staticKeyList = getKeys( |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 406 | metadataClass, keyClass, /*instance*/null, filterTags); |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 407 | return Collections.unmodifiableList(staticKeyList); |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 408 | } |
| 409 | |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 410 | /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ |
| 411 | * The key entries below this point are generated from metadata |
| 412 | * definitions in /system/media/camera/docs. Do not modify by hand or |
| 413 | * modify the comment blocks at the start or end. |
| 414 | *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/ |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 415 | |
| 416 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 417 | * <p>List of aberration correction modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode} that are |
| 418 | * supported by this camera device.</p> |
| 419 | * <p>This key lists the valid modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}. If no |
| 420 | * aberration correction modes are available for a device, this list will solely include |
Yin-Chia Yeh | 941aac0 | 2015-01-06 10:32:47 -0800 | [diff] [blame] | 421 | * OFF mode. All camera devices will support either OFF or FAST mode.</p> |
| 422 | * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always list |
| 423 | * OFF mode. This includes all FULL level devices.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 424 | * <p>LEGACY devices will always only support FAST mode.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 425 | * <p><b>Range of valid values:</b><br> |
| 426 | * Any value listed in {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 427 | * <p>This key is available on all devices.</p> |
Zhijun He | a05e59d | 2014-07-08 18:27:47 -0700 | [diff] [blame] | 428 | * |
Zhijun He | 9e4e439 | 2014-08-18 11:12:32 -0700 | [diff] [blame] | 429 | * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE |
Zhijun He | a05e59d | 2014-07-08 18:27:47 -0700 | [diff] [blame] | 430 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 431 | @PublicKey |
Zhijun He | 9e4e439 | 2014-08-18 11:12:32 -0700 | [diff] [blame] | 432 | public static final Key<int[]> COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES = |
| 433 | new Key<int[]>("android.colorCorrection.availableAberrationModes", int[].class); |
Zhijun He | a05e59d | 2014-07-08 18:27:47 -0700 | [diff] [blame] | 434 | |
| 435 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 436 | * <p>List of auto-exposure antibanding modes for {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} that are |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 437 | * supported by this camera device.</p> |
| 438 | * <p>Not all of the auto-exposure anti-banding modes may be |
| 439 | * supported by a given camera device. This field lists the |
| 440 | * valid anti-banding modes that the application may request |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 441 | * for this camera device with the |
Yin-Chia Yeh | 7b2cae6 | 2014-11-25 11:54:18 -0800 | [diff] [blame] | 442 | * {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} control.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 443 | * <p><b>Range of valid values:</b><br> |
| 444 | * Any value listed in {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 445 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 446 | * |
| 447 | * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 448 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 449 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 450 | public static final Key<int[]> CONTROL_AE_AVAILABLE_ANTIBANDING_MODES = |
| 451 | new Key<int[]>("android.control.aeAvailableAntibandingModes", int[].class); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 452 | |
| 453 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 454 | * <p>List of auto-exposure modes for {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} that are supported by this camera |
| 455 | * device.</p> |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 456 | * <p>Not all the auto-exposure modes may be supported by a |
| 457 | * given camera device, especially if no flash unit is |
| 458 | * available. This entry lists the valid modes for |
| 459 | * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} for this camera device.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 460 | * <p>All camera devices support ON, and all camera devices with flash |
| 461 | * units support ON_AUTO_FLASH and ON_ALWAYS_FLASH.</p> |
Ruben Brunk | 9d454fd | 2014-03-04 14:11:52 -0800 | [diff] [blame] | 462 | * <p>FULL mode camera devices always support OFF mode, |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 463 | * which enables application control of camera exposure time, |
| 464 | * sensitivity, and frame duration.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 465 | * <p>LEGACY mode camera devices never support OFF mode. |
| 466 | * LIMITED mode devices support OFF if they support the MANUAL_SENSOR |
| 467 | * capability.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 468 | * <p><b>Range of valid values:</b><br> |
| 469 | * Any value listed in {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 470 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 471 | * |
| 472 | * @see CaptureRequest#CONTROL_AE_MODE |
| 473 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 474 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 475 | public static final Key<int[]> CONTROL_AE_AVAILABLE_MODES = |
| 476 | new Key<int[]>("android.control.aeAvailableModes", int[].class); |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 477 | |
| 478 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 479 | * <p>List of frame rate ranges for {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} supported by |
| 480 | * this camera device.</p> |
Yin-Chia Yeh | 5855162 | 2015-05-21 11:27:06 -0700 | [diff] [blame] | 481 | * <p>For devices at the LEGACY level or above:</p> |
| 482 | * <ul> |
Yin-Chia Yeh | 5fdf0a1 | 2015-11-20 15:39:36 -0800 | [diff] [blame] | 483 | * <li> |
| 484 | * <p>For constant-framerate recording, for each normal |
| 485 | * {@link android.media.CamcorderProfile CamcorderProfile}, that is, a |
Yin-Chia Yeh | 5855162 | 2015-05-21 11:27:06 -0700 | [diff] [blame] | 486 | * {@link android.media.CamcorderProfile CamcorderProfile} that has |
| 487 | * {@link android.media.CamcorderProfile#quality quality} in |
| 488 | * the range [{@link android.media.CamcorderProfile#QUALITY_LOW QUALITY_LOW}, |
| 489 | * {@link android.media.CamcorderProfile#QUALITY_2160P QUALITY_2160P}], if the profile is |
| 490 | * supported by the device and has |
| 491 | * {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} <code>x</code>, this list will |
Yin-Chia Yeh | 5fdf0a1 | 2015-11-20 15:39:36 -0800 | [diff] [blame] | 492 | * always include (<code>x</code>,<code>x</code>).</p> |
| 493 | * </li> |
| 494 | * <li> |
| 495 | * <p>Also, a camera device must either not support any |
| 496 | * {@link android.media.CamcorderProfile CamcorderProfile}, |
| 497 | * or support at least one |
| 498 | * normal {@link android.media.CamcorderProfile CamcorderProfile} that has |
| 499 | * {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} <code>x</code> >= 24.</p> |
| 500 | * </li> |
Yin-Chia Yeh | 5855162 | 2015-05-21 11:27:06 -0700 | [diff] [blame] | 501 | * </ul> |
| 502 | * <p>For devices at the LIMITED level or above:</p> |
| 503 | * <ul> |
| 504 | * <li>For YUV_420_888 burst capture use case, this list will always include (<code>min</code>, <code>max</code>) |
| 505 | * and (<code>max</code>, <code>max</code>) where <code>min</code> <= 15 and <code>max</code> = the maximum output frame rate of the |
| 506 | * maximum YUV_420_888 output size.</li> |
| 507 | * </ul> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 508 | * <p><b>Units</b>: Frames per second (FPS)</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 509 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 510 | * |
| 511 | * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 512 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 513 | @PublicKey |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 514 | public static final Key<android.util.Range<Integer>[]> CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES = |
| 515 | new Key<android.util.Range<Integer>[]>("android.control.aeAvailableTargetFpsRanges", new TypeReference<android.util.Range<Integer>[]>() {{ }}); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 516 | |
| 517 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 518 | * <p>Maximum and minimum exposure compensation values for |
| 519 | * {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}, in counts of {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep}, |
| 520 | * that are supported by this camera device.</p> |
| 521 | * <p><b>Range of valid values:</b><br></p> |
Zhijun He | f1745ce | 2015-02-04 13:55:14 -0800 | [diff] [blame] | 522 | * <p>Range [0,0] indicates that exposure compensation is not supported.</p> |
| 523 | * <p>For LIMITED and FULL devices, range must follow below requirements if exposure |
| 524 | * compensation is supported (<code>range != [0, 0]</code>):</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 525 | * <p><code>Min.exposure compensation * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} <= -2 EV</code></p> |
| 526 | * <p><code>Max.exposure compensation * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} >= 2 EV</code></p> |
Zhijun He | f1745ce | 2015-02-04 13:55:14 -0800 | [diff] [blame] | 527 | * <p>LEGACY devices may support a smaller range than this.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 528 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | d8fd679 | 2014-02-10 12:41:04 -0800 | [diff] [blame] | 529 | * |
| 530 | * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 531 | * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 532 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 533 | @PublicKey |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 534 | public static final Key<android.util.Range<Integer>> CONTROL_AE_COMPENSATION_RANGE = |
| 535 | new Key<android.util.Range<Integer>>("android.control.aeCompensationRange", new TypeReference<android.util.Range<Integer>>() {{ }}); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 536 | |
| 537 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 538 | * <p>Smallest step by which the exposure compensation |
| 539 | * can be changed.</p> |
| 540 | * <p>This is the unit for {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}. For example, if this key has |
| 541 | * 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 |
| 542 | * that the target EV offset for the auto-exposure routine is -1 EV.</p> |
| 543 | * <p>One unit of EV compensation changes the brightness of the captured image by a factor |
| 544 | * of two. +1 EV doubles the image brightness, while -1 EV halves the image brightness.</p> |
| 545 | * <p><b>Units</b>: Exposure Value (EV)</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 546 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 547 | * |
| 548 | * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 549 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 550 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 551 | public static final Key<Rational> CONTROL_AE_COMPENSATION_STEP = |
| 552 | new Key<Rational>("android.control.aeCompensationStep", Rational.class); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 553 | |
| 554 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 555 | * <p>List of auto-focus (AF) modes for {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} that are |
| 556 | * supported by this camera device.</p> |
Zhijun He | 78146ec | 2014-01-14 18:12:13 -0800 | [diff] [blame] | 557 | * <p>Not all the auto-focus modes may be supported by a |
| 558 | * given camera device. This entry lists the valid modes for |
| 559 | * {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} for this camera device.</p> |
Ruben Brunk | 6f38709 | 2014-09-22 16:13:54 -0700 | [diff] [blame] | 560 | * <p>All LIMITED and FULL mode camera devices will support OFF mode, and all |
| 561 | * camera devices with adjustable focuser units |
| 562 | * (<code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} > 0</code>) will support AUTO mode.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 563 | * <p>LEGACY devices will support OFF mode only if they support |
| 564 | * focusing to infinity (by also setting {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} to |
| 565 | * <code>0.0f</code>).</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 566 | * <p><b>Range of valid values:</b><br> |
| 567 | * Any value listed in {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 568 | * <p>This key is available on all devices.</p> |
Zhijun He | 78146ec | 2014-01-14 18:12:13 -0800 | [diff] [blame] | 569 | * |
| 570 | * @see CaptureRequest#CONTROL_AF_MODE |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 571 | * @see CaptureRequest#LENS_FOCUS_DISTANCE |
Zhijun He | 78146ec | 2014-01-14 18:12:13 -0800 | [diff] [blame] | 572 | * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 573 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 574 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 575 | public static final Key<int[]> CONTROL_AF_AVAILABLE_MODES = |
| 576 | new Key<int[]>("android.control.afAvailableModes", int[].class); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 577 | |
| 578 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 579 | * <p>List of color effects for {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode} that are supported by this camera |
| 580 | * device.</p> |
Ruben Brunk | 5f1dcfe | 2014-01-17 16:42:51 -0800 | [diff] [blame] | 581 | * <p>This list contains the color effect modes that can be applied to |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 582 | * images produced by the camera device. |
Ruben Brunk | 5f1dcfe | 2014-01-17 16:42:51 -0800 | [diff] [blame] | 583 | * Implementations are not expected to be consistent across all devices. |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 584 | * If no color effect modes are available for a device, this will only list |
| 585 | * OFF.</p> |
Ruben Brunk | 5f1dcfe | 2014-01-17 16:42:51 -0800 | [diff] [blame] | 586 | * <p>A color effect will only be applied if |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 587 | * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF. OFF is always included in this list.</p> |
| 588 | * <p>This control has no effect on the operation of other control routines such |
| 589 | * as auto-exposure, white balance, or focus.</p> |
| 590 | * <p><b>Range of valid values:</b><br> |
| 591 | * Any value listed in {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 592 | * <p>This key is available on all devices.</p> |
Ruben Brunk | 5f1dcfe | 2014-01-17 16:42:51 -0800 | [diff] [blame] | 593 | * |
| 594 | * @see CaptureRequest#CONTROL_EFFECT_MODE |
| 595 | * @see CaptureRequest#CONTROL_MODE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 596 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 597 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 598 | public static final Key<int[]> CONTROL_AVAILABLE_EFFECTS = |
| 599 | new Key<int[]>("android.control.availableEffects", int[].class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 600 | |
| 601 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 602 | * <p>List of scene modes for {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} that are supported by this camera |
| 603 | * device.</p> |
Ruben Brunk | 8237d34 | 2014-01-17 15:33:02 -0800 | [diff] [blame] | 604 | * <p>This list contains scene modes that can be set for the camera device. |
| 605 | * Only scene modes that have been fully implemented for the |
| 606 | * camera device may be included here. Implementations are not expected |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 607 | * to be consistent across all devices.</p> |
| 608 | * <p>If no scene modes are supported by the camera device, this |
| 609 | * will be set to DISABLED. Otherwise DISABLED will not be listed.</p> |
| 610 | * <p>FACE_PRIORITY is always listed if face detection is |
| 611 | * supported (i.e.<code>{@link CameraCharacteristics#STATISTICS_INFO_MAX_FACE_COUNT android.statistics.info.maxFaceCount} > |
| 612 | * 0</code>).</p> |
| 613 | * <p><b>Range of valid values:</b><br> |
| 614 | * Any value listed in {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 615 | * <p>This key is available on all devices.</p> |
Ruben Brunk | 8237d34 | 2014-01-17 15:33:02 -0800 | [diff] [blame] | 616 | * |
| 617 | * @see CaptureRequest#CONTROL_SCENE_MODE |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 618 | * @see CameraCharacteristics#STATISTICS_INFO_MAX_FACE_COUNT |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 619 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 620 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 621 | public static final Key<int[]> CONTROL_AVAILABLE_SCENE_MODES = |
| 622 | new Key<int[]>("android.control.availableSceneModes", int[].class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 623 | |
| 624 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 625 | * <p>List of video stabilization modes for {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode} |
| 626 | * that are supported by this camera device.</p> |
| 627 | * <p>OFF will always be listed.</p> |
| 628 | * <p><b>Range of valid values:</b><br> |
| 629 | * Any value listed in {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 630 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 631 | * |
| 632 | * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 633 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 634 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 635 | public static final Key<int[]> CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES = |
| 636 | new Key<int[]>("android.control.availableVideoStabilizationModes", int[].class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 637 | |
| 638 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 639 | * <p>List of auto-white-balance modes for {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} that are supported by this |
| 640 | * camera device.</p> |
Zhijun He | 399f05d | 2014-01-15 11:31:30 -0800 | [diff] [blame] | 641 | * <p>Not all the auto-white-balance modes may be supported by a |
| 642 | * given camera device. This entry lists the valid modes for |
| 643 | * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} for this camera device.</p> |
| 644 | * <p>All camera devices will support ON mode.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 645 | * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always support OFF |
| 646 | * mode, which enables application control of white balance, by using |
| 647 | * {@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 |
| 648 | * mode camera devices.</p> |
| 649 | * <p><b>Range of valid values:</b><br> |
| 650 | * Any value listed in {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 651 | * <p>This key is available on all devices.</p> |
Zhijun He | 399f05d | 2014-01-15 11:31:30 -0800 | [diff] [blame] | 652 | * |
Zhijun He | 399f05d | 2014-01-15 11:31:30 -0800 | [diff] [blame] | 653 | * @see CaptureRequest#COLOR_CORRECTION_GAINS |
Eino-Ville Talvala | 265b34c | 2014-01-16 16:18:52 -0800 | [diff] [blame] | 654 | * @see CaptureRequest#COLOR_CORRECTION_MODE |
| 655 | * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM |
| 656 | * @see CaptureRequest#CONTROL_AWB_MODE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 657 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 658 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 659 | public static final Key<int[]> CONTROL_AWB_AVAILABLE_MODES = |
| 660 | new Key<int[]>("android.control.awbAvailableModes", int[].class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 661 | |
| 662 | /** |
Ruben Brunk | 90bc34e | 2014-02-03 17:54:24 -0800 | [diff] [blame] | 663 | * <p>List of the maximum number of regions that can be used for metering in |
| 664 | * auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF); |
| 665 | * this corresponds to the the maximum number of elements in |
| 666 | * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}, {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}, |
| 667 | * and {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 668 | * <p><b>Range of valid values:</b><br></p> |
| 669 | * <p>Value must be >= 0 for each element. For full-capability devices |
| 670 | * this value must be >= 1 for AE and AF. The order of the elements is: |
| 671 | * <code>(AE, AWB, AF)</code>.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 672 | * <p>This key is available on all devices.</p> |
Ruben Brunk | 90bc34e | 2014-02-03 17:54:24 -0800 | [diff] [blame] | 673 | * |
| 674 | * @see CaptureRequest#CONTROL_AE_REGIONS |
| 675 | * @see CaptureRequest#CONTROL_AF_REGIONS |
| 676 | * @see CaptureRequest#CONTROL_AWB_REGIONS |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 677 | * @hide |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 678 | */ |
Ruben Brunk | 90bc34e | 2014-02-03 17:54:24 -0800 | [diff] [blame] | 679 | public static final Key<int[]> CONTROL_MAX_REGIONS = |
| 680 | new Key<int[]>("android.control.maxRegions", int[].class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 681 | |
| 682 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 683 | * <p>The maximum number of metering regions that can be used by the auto-exposure (AE) |
| 684 | * routine.</p> |
| 685 | * <p>This corresponds to the the maximum allowed number of elements in |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 686 | * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 687 | * <p><b>Range of valid values:</b><br> |
| 688 | * Value will be >= 0. For FULL-capability devices, this |
| 689 | * value will be >= 1.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 690 | * <p>This key is available on all devices.</p> |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 691 | * |
| 692 | * @see CaptureRequest#CONTROL_AE_REGIONS |
| 693 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 694 | @PublicKey |
| 695 | @SyntheticKey |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 696 | public static final Key<Integer> CONTROL_MAX_REGIONS_AE = |
| 697 | new Key<Integer>("android.control.maxRegionsAe", int.class); |
| 698 | |
| 699 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 700 | * <p>The maximum number of metering regions that can be used by the auto-white balance (AWB) |
| 701 | * routine.</p> |
| 702 | * <p>This corresponds to the the maximum allowed number of elements in |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 703 | * {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 704 | * <p><b>Range of valid values:</b><br> |
| 705 | * Value will be >= 0.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 706 | * <p>This key is available on all devices.</p> |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 707 | * |
| 708 | * @see CaptureRequest#CONTROL_AWB_REGIONS |
| 709 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 710 | @PublicKey |
| 711 | @SyntheticKey |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 712 | public static final Key<Integer> CONTROL_MAX_REGIONS_AWB = |
| 713 | new Key<Integer>("android.control.maxRegionsAwb", int.class); |
| 714 | |
| 715 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 716 | * <p>The maximum number of metering regions that can be used by the auto-focus (AF) routine.</p> |
| 717 | * <p>This corresponds to the the maximum allowed number of elements in |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 718 | * {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 719 | * <p><b>Range of valid values:</b><br> |
| 720 | * Value will be >= 0. For FULL-capability devices, this |
| 721 | * value will be >= 1.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 722 | * <p>This key is available on all devices.</p> |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 723 | * |
| 724 | * @see CaptureRequest#CONTROL_AF_REGIONS |
| 725 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 726 | @PublicKey |
| 727 | @SyntheticKey |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 728 | public static final Key<Integer> CONTROL_MAX_REGIONS_AF = |
| 729 | new Key<Integer>("android.control.maxRegionsAf", int.class); |
| 730 | |
| 731 | /** |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 732 | * <p>List of available high speed video size, fps range and max batch size configurations |
| 733 | * supported by the camera device, in the format of (width, height, fps_min, fps_max, batch_size_max).</p> |
Zhijun He | 3c1ff68 | 2015-06-23 09:21:43 -0700 | [diff] [blame] | 734 | * <p>When CONSTRAINED_HIGH_SPEED_VIDEO is supported in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}, |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 735 | * this metadata will list the supported high speed video size, fps range and max batch size |
| 736 | * configurations. All the sizes listed in this configuration will be a subset of the sizes |
| 737 | * reported by {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } |
| 738 | * for processed non-stalling formats.</p> |
| 739 | * <p>For the high speed video use case, the application must |
Zhijun He | e040418 | 2014-06-26 13:17:09 -0700 | [diff] [blame] | 740 | * select the video size and fps range from this metadata to configure the recording and |
| 741 | * preview streams and setup the recording requests. For example, if the application intends |
| 742 | * to do high speed recording, it can select the maximum size reported by this metadata to |
| 743 | * configure output streams. Once the size is selected, application can filter this metadata |
| 744 | * by selected size and get the supported fps ranges, and use these fps ranges to setup the |
Yin-Chia Yeh | 12da140 | 2014-07-15 10:37:31 -0700 | [diff] [blame] | 745 | * recording requests. Note that for the use case of multiple output streams, application |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 746 | * must select one unique size from this metadata to use (e.g., preview and recording streams |
| 747 | * must have the same size). Otherwise, the high speed capture session creation will fail.</p> |
| 748 | * <p>The min and max fps will be multiple times of 30fps.</p> |
| 749 | * <p>High speed video streaming extends significant performance pressue to camera hardware, |
| 750 | * to achieve efficient high speed streaming, the camera device may have to aggregate |
| 751 | * multiple frames together and send to camera device for processing where the request |
| 752 | * controls are same for all the frames in this batch. Max batch size indicates |
| 753 | * the max possible number of frames the camera device will group together for this high |
| 754 | * speed stream configuration. This max batch size will be used to generate a high speed |
| 755 | * recording request list by |
Eino-Ville Talvala | 639fffe | 2015-06-30 10:34:48 -0700 | [diff] [blame] | 756 | * {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList }. |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 757 | * The max batch size for each configuration will satisfy below conditions:</p> |
| 758 | * <ul> |
| 759 | * <li>Each max batch size will be a divisor of its corresponding fps_max / 30. For example, |
| 760 | * if max_fps is 300, max batch size will only be 1, 2, 5, or 10.</li> |
| 761 | * <li>The camera device may choose smaller internal batch size for each configuration, but |
| 762 | * the actual batch size will be a divisor of max batch size. For example, if the max batch |
| 763 | * size is 8, the actual batch size used by camera device will only be 1, 2, 4, or 8.</li> |
| 764 | * <li>The max batch size in each configuration entry must be no larger than 32.</li> |
| 765 | * </ul> |
| 766 | * <p>The camera device doesn't have to support batch mode to achieve high speed video recording, |
| 767 | * in such case, batch_size_max will be reported as 1 in each configuration entry.</p> |
| 768 | * <p>This fps ranges in this configuration list can only be used to create requests |
| 769 | * that are submitted to a high speed camera capture session created by |
| 770 | * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }. |
| 771 | * The fps ranges reported in this metadata must not be used to setup capture requests for |
| 772 | * normal capture session, or it will cause request error.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 773 | * <p><b>Range of valid values:</b><br></p> |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 774 | * <p>For each configuration, the fps_max >= 120fps.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 775 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 776 | * <p><b>Limited capability</b> - |
| 777 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 778 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Zhijun He | e040418 | 2014-06-26 13:17:09 -0700 | [diff] [blame] | 779 | * |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 780 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Zhijun He | 3c1ff68 | 2015-06-23 09:21:43 -0700 | [diff] [blame] | 781 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
Zhijun He | e040418 | 2014-06-26 13:17:09 -0700 | [diff] [blame] | 782 | * @hide |
| 783 | */ |
Yin-Chia Yeh | 12da140 | 2014-07-15 10:37:31 -0700 | [diff] [blame] | 784 | public static final Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]> CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS = |
| 785 | new Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]>("android.control.availableHighSpeedVideoConfigurations", android.hardware.camera2.params.HighSpeedVideoConfiguration[].class); |
Zhijun He | e040418 | 2014-06-26 13:17:09 -0700 | [diff] [blame] | 786 | |
| 787 | /** |
Yin-Chia Yeh | dc0ba09 | 2015-02-20 15:52:06 -0800 | [diff] [blame] | 788 | * <p>Whether the camera device supports {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</p> |
Yin-Chia Yeh | 7e3e431 | 2015-04-02 14:34:30 -0700 | [diff] [blame] | 789 | * <p>Devices with MANUAL_SENSOR capability or BURST_CAPTURE capability will always |
| 790 | * list <code>true</code>. This includes FULL devices.</p> |
Yin-Chia Yeh | dc0ba09 | 2015-02-20 15:52:06 -0800 | [diff] [blame] | 791 | * <p>This key is available on all devices.</p> |
| 792 | * |
| 793 | * @see CaptureRequest#CONTROL_AE_LOCK |
| 794 | */ |
| 795 | @PublicKey |
| 796 | public static final Key<Boolean> CONTROL_AE_LOCK_AVAILABLE = |
| 797 | new Key<Boolean>("android.control.aeLockAvailable", boolean.class); |
| 798 | |
| 799 | /** |
| 800 | * <p>Whether the camera device supports {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</p> |
Yin-Chia Yeh | 7e3e431 | 2015-04-02 14:34:30 -0700 | [diff] [blame] | 801 | * <p>Devices with MANUAL_POST_PROCESSING capability or BURST_CAPTURE capability will |
| 802 | * always list <code>true</code>. This includes FULL devices.</p> |
Yin-Chia Yeh | dc0ba09 | 2015-02-20 15:52:06 -0800 | [diff] [blame] | 803 | * <p>This key is available on all devices.</p> |
| 804 | * |
| 805 | * @see CaptureRequest#CONTROL_AWB_LOCK |
| 806 | */ |
| 807 | @PublicKey |
| 808 | public static final Key<Boolean> CONTROL_AWB_LOCK_AVAILABLE = |
| 809 | new Key<Boolean>("android.control.awbLockAvailable", boolean.class); |
| 810 | |
| 811 | /** |
| 812 | * <p>List of control modes for {@link CaptureRequest#CONTROL_MODE android.control.mode} that are supported by this camera |
| 813 | * device.</p> |
| 814 | * <p>This list contains control modes that can be set for the camera device. |
| 815 | * LEGACY mode devices will always support AUTO mode. LIMITED and FULL |
| 816 | * devices will always support OFF, AUTO modes.</p> |
| 817 | * <p><b>Range of valid values:</b><br> |
| 818 | * Any value listed in {@link CaptureRequest#CONTROL_MODE android.control.mode}</p> |
| 819 | * <p>This key is available on all devices.</p> |
| 820 | * |
| 821 | * @see CaptureRequest#CONTROL_MODE |
| 822 | */ |
| 823 | @PublicKey |
| 824 | public static final Key<int[]> CONTROL_AVAILABLE_MODES = |
| 825 | new Key<int[]>("android.control.availableModes", int[].class); |
| 826 | |
| 827 | /** |
Yin-Chia Yeh | 1ee1a0a | 2016-01-18 19:13:47 -0800 | [diff] [blame] | 828 | * <p>Range of boosts for {@link CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST android.control.postRawSensitivityBoost} supported |
| 829 | * by this camera device.</p> |
| 830 | * <p>Devices support post RAW sensitivity boost will advertise |
| 831 | * {@link CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST android.control.postRawSensitivityBoost} key for controling |
| 832 | * post RAW sensitivity boost.</p> |
| 833 | * <p>This key will be <code>null</code> for devices that do not support any RAW format |
| 834 | * outputs. For devices that do support RAW format outputs, this key will always |
| 835 | * present, and if a device does not support post RAW sensitivity boost, it will |
| 836 | * list <code>(100, 100)</code> in this key.</p> |
| 837 | * <p><b>Units</b>: ISO arithmetic units, the same as {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</p> |
| 838 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 839 | * |
| 840 | * @see CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST |
| 841 | * @see CaptureRequest#SENSOR_SENSITIVITY |
| 842 | */ |
| 843 | @PublicKey |
| 844 | public static final Key<android.util.Range<Integer>> CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE = |
| 845 | new Key<android.util.Range<Integer>>("android.control.postRawSensitivityBoostRange", new TypeReference<android.util.Range<Integer>>() {{ }}); |
| 846 | |
| 847 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 848 | * <p>List of edge enhancement modes for {@link CaptureRequest#EDGE_MODE android.edge.mode} that are supported by this camera |
| 849 | * device.</p> |
Chien-Yu Chen | 7233391 | 2015-07-08 11:55:19 -0700 | [diff] [blame] | 850 | * <p>Full-capability camera devices must always support OFF; camera devices that support |
| 851 | * YUV_REPROCESSING or PRIVATE_REPROCESSING will list ZERO_SHUTTER_LAG; all devices will |
| 852 | * list FAST.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 853 | * <p><b>Range of valid values:</b><br> |
| 854 | * Any value listed in {@link CaptureRequest#EDGE_MODE android.edge.mode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 855 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 856 | * <p><b>Full capability</b> - |
| 857 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 858 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Ruben Brunk | 6dc379c | 2014-03-04 15:04:00 -0800 | [diff] [blame] | 859 | * |
| 860 | * @see CaptureRequest#EDGE_MODE |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 861 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Ruben Brunk | 6dc379c | 2014-03-04 15:04:00 -0800 | [diff] [blame] | 862 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 863 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 864 | public static final Key<int[]> EDGE_AVAILABLE_EDGE_MODES = |
| 865 | new Key<int[]>("android.edge.availableEdgeModes", int[].class); |
Ruben Brunk | 6dc379c | 2014-03-04 15:04:00 -0800 | [diff] [blame] | 866 | |
| 867 | /** |
Zhijun He | ca1b73a | 2014-02-03 12:39:53 -0800 | [diff] [blame] | 868 | * <p>Whether this camera device has a |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 869 | * flash unit.</p> |
| 870 | * <p>Will be <code>false</code> if no flash is available.</p> |
| 871 | * <p>If there is no flash unit, none of the flash controls do |
| 872 | * anything. |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 873 | * This key is available on all devices.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 874 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 875 | @PublicKey |
Zhijun He | ca1b73a | 2014-02-03 12:39:53 -0800 | [diff] [blame] | 876 | public static final Key<Boolean> FLASH_INFO_AVAILABLE = |
| 877 | new Key<Boolean>("android.flash.info.available", boolean.class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 878 | |
| 879 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 880 | * <p>List of hot pixel correction modes for {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode} that are supported by this |
Ruben Brunk | 9d454fd | 2014-03-04 14:11:52 -0800 | [diff] [blame] | 881 | * camera device.</p> |
Ruben Brunk | 9d454fd | 2014-03-04 14:11:52 -0800 | [diff] [blame] | 882 | * <p>FULL mode camera devices will always support FAST.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 883 | * <p><b>Range of valid values:</b><br> |
| 884 | * Any value listed in {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 885 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Ruben Brunk | 9d454fd | 2014-03-04 14:11:52 -0800 | [diff] [blame] | 886 | * |
| 887 | * @see CaptureRequest#HOT_PIXEL_MODE |
| 888 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 889 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 890 | public static final Key<int[]> HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES = |
| 891 | new Key<int[]>("android.hotPixel.availableHotPixelModes", int[].class); |
Ruben Brunk | 9d454fd | 2014-03-04 14:11:52 -0800 | [diff] [blame] | 892 | |
| 893 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 894 | * <p>List of JPEG thumbnail sizes for {@link CaptureRequest#JPEG_THUMBNAIL_SIZE android.jpeg.thumbnailSize} supported by this |
| 895 | * camera device.</p> |
| 896 | * <p>This list will include at least one non-zero resolution, plus <code>(0,0)</code> for indicating no |
| 897 | * thumbnail should be generated.</p> |
Zhijun He | 5f2a47f | 2014-01-16 15:44:41 -0800 | [diff] [blame] | 898 | * <p>Below condiditions will be satisfied for this size list:</p> |
Zhijun He | 5a9ff37 | 2013-12-26 11:49:09 -0800 | [diff] [blame] | 899 | * <ul> |
Zhijun He | 5f2a47f | 2014-01-16 15:44:41 -0800 | [diff] [blame] | 900 | * <li>The sizes will be sorted by increasing pixel area (width x height). |
| 901 | * If several resolutions have the same area, they will be sorted by increasing width.</li> |
| 902 | * <li>The aspect ratio of the largest thumbnail size will be same as the |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 903 | * aspect ratio of largest JPEG output size in android.scaler.availableStreamConfigurations. |
Zhijun He | 5a9ff37 | 2013-12-26 11:49:09 -0800 | [diff] [blame] | 904 | * The largest size is defined as the size that has the largest pixel area |
| 905 | * in a given size list.</li> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 906 | * <li>Each output JPEG size in android.scaler.availableStreamConfigurations will have at least |
Zhijun He | 5a9ff37 | 2013-12-26 11:49:09 -0800 | [diff] [blame] | 907 | * one corresponding size that has the same aspect ratio in availableThumbnailSizes, |
| 908 | * and vice versa.</li> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 909 | * <li>All non-<code>(0, 0)</code> sizes will have non-zero widths and heights. |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 910 | * This key is available on all devices.</li> |
Zhijun He | 5a9ff37 | 2013-12-26 11:49:09 -0800 | [diff] [blame] | 911 | * </ul> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 912 | * |
| 913 | * @see CaptureRequest#JPEG_THUMBNAIL_SIZE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 914 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 915 | @PublicKey |
Igor Murashkin | 72f9f0a | 2014-05-14 15:46:10 -0700 | [diff] [blame] | 916 | public static final Key<android.util.Size[]> JPEG_AVAILABLE_THUMBNAIL_SIZES = |
| 917 | new Key<android.util.Size[]>("android.jpeg.availableThumbnailSizes", android.util.Size[].class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 918 | |
| 919 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 920 | * <p>List of aperture size values for {@link CaptureRequest#LENS_APERTURE android.lens.aperture} that are |
| 921 | * supported by this camera device.</p> |
| 922 | * <p>If the camera device doesn't support a variable lens aperture, |
| 923 | * this list will contain only one value, which is the fixed aperture size.</p> |
| 924 | * <p>If the camera device supports a variable aperture, the aperture values |
Zhijun He | fb46c64 | 2014-01-14 17:57:23 -0800 | [diff] [blame] | 925 | * in this list will be sorted in ascending order.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 926 | * <p><b>Units</b>: The aperture f-number</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 927 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 928 | * <p><b>Full capability</b> - |
| 929 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 930 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 931 | * |
| 932 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 933 | * @see CaptureRequest#LENS_APERTURE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 934 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 935 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 936 | public static final Key<float[]> LENS_INFO_AVAILABLE_APERTURES = |
| 937 | new Key<float[]>("android.lens.info.availableApertures", float[].class); |
| 938 | |
| 939 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 940 | * <p>List of neutral density filter values for |
| 941 | * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} that are supported by this camera device.</p> |
| 942 | * <p>If a neutral density filter is not supported by this camera device, |
| 943 | * this list will contain only 0. Otherwise, this list will include every |
| 944 | * filter density supported by the camera device, in ascending order.</p> |
| 945 | * <p><b>Units</b>: Exposure value (EV)</p> |
| 946 | * <p><b>Range of valid values:</b><br></p> |
| 947 | * <p>Values are >= 0</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 948 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 949 | * <p><b>Full capability</b> - |
| 950 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 951 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Ruben Brunk | 855bae4 | 2014-01-17 10:30:32 -0800 | [diff] [blame] | 952 | * |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 953 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Ruben Brunk | 855bae4 | 2014-01-17 10:30:32 -0800 | [diff] [blame] | 954 | * @see CaptureRequest#LENS_FILTER_DENSITY |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 955 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 956 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 957 | public static final Key<float[]> LENS_INFO_AVAILABLE_FILTER_DENSITIES = |
| 958 | new Key<float[]>("android.lens.info.availableFilterDensities", float[].class); |
| 959 | |
| 960 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 961 | * <p>List of focal lengths for {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength} that are supported by this camera |
| 962 | * device.</p> |
| 963 | * <p>If optical zoom is not supported, this list will only contain |
| 964 | * a single value corresponding to the fixed focal length of the |
| 965 | * device. Otherwise, this list will include every focal length supported |
| 966 | * by the camera device, in ascending order.</p> |
| 967 | * <p><b>Units</b>: Millimeters</p> |
| 968 | * <p><b>Range of valid values:</b><br></p> |
| 969 | * <p>Values are > 0</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 970 | * <p>This key is available on all devices.</p> |
Ruben Brunk | a20f4c2 | 2014-01-17 15:21:13 -0800 | [diff] [blame] | 971 | * |
| 972 | * @see CaptureRequest#LENS_FOCAL_LENGTH |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 973 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 974 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 975 | public static final Key<float[]> LENS_INFO_AVAILABLE_FOCAL_LENGTHS = |
| 976 | new Key<float[]>("android.lens.info.availableFocalLengths", float[].class); |
| 977 | |
| 978 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 979 | * <p>List of optical image stabilization (OIS) modes for |
| 980 | * {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} that are supported by this camera device.</p> |
| 981 | * <p>If OIS is not supported by a given camera device, this list will |
Ruben Brunk | 00849b3 | 2014-01-17 18:30:23 -0800 | [diff] [blame] | 982 | * contain only OFF.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 983 | * <p><b>Range of valid values:</b><br> |
| 984 | * Any value listed in {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 985 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 986 | * <p><b>Limited capability</b> - |
| 987 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 988 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Ruben Brunk | 00849b3 | 2014-01-17 18:30:23 -0800 | [diff] [blame] | 989 | * |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 990 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Ruben Brunk | 00849b3 | 2014-01-17 18:30:23 -0800 | [diff] [blame] | 991 | * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 992 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 993 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 994 | public static final Key<int[]> LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION = |
| 995 | new Key<int[]>("android.lens.info.availableOpticalStabilization", int[].class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 996 | |
| 997 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 998 | * <p>Hyperfocal distance for this lens.</p> |
Zhijun He | ff41393 | 2014-02-07 15:44:30 -0800 | [diff] [blame] | 999 | * <p>If the lens is not fixed focus, the camera device will report this |
| 1000 | * field when {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} is APPROXIMATE or CALIBRATED.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1001 | * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p> |
| 1002 | * <p><b>Range of valid values:</b><br> |
| 1003 | * If lens is fixed focus, >= 0. If lens has focuser unit, the value is |
| 1004 | * within <code>(0.0f, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code></p> |
| 1005 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1006 | * <p><b>Limited capability</b> - |
| 1007 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 1008 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 1009 | * |
| 1010 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
| 1011 | * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION |
| 1012 | * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE |
| 1013 | */ |
| 1014 | @PublicKey |
| 1015 | public static final Key<Float> LENS_INFO_HYPERFOCAL_DISTANCE = |
| 1016 | new Key<Float>("android.lens.info.hyperfocalDistance", float.class); |
| 1017 | |
| 1018 | /** |
| 1019 | * <p>Shortest distance from frontmost surface |
| 1020 | * of the lens that can be brought into sharp focus.</p> |
| 1021 | * <p>If the lens is fixed-focus, this will be |
| 1022 | * 0.</p> |
| 1023 | * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p> |
| 1024 | * <p><b>Range of valid values:</b><br> |
| 1025 | * >= 0</p> |
Zhijun He | ff41393 | 2014-02-07 15:44:30 -0800 | [diff] [blame] | 1026 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1027 | * <p><b>Limited capability</b> - |
| 1028 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 1029 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Zhijun He | ff41393 | 2014-02-07 15:44:30 -0800 | [diff] [blame] | 1030 | * |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1031 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Zhijun He | ff41393 | 2014-02-07 15:44:30 -0800 | [diff] [blame] | 1032 | * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1033 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1034 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1035 | public static final Key<Float> LENS_INFO_MINIMUM_FOCUS_DISTANCE = |
| 1036 | new Key<Float>("android.lens.info.minimumFocusDistance", float.class); |
| 1037 | |
| 1038 | /** |
Igor Murashkin | 7a9b30e | 2013-12-11 13:31:38 -0800 | [diff] [blame] | 1039 | * <p>Dimensions of lens shading map.</p> |
| 1040 | * <p>The map should be on the order of 30-40 rows and columns, and |
| 1041 | * must be smaller than 64x64.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1042 | * <p><b>Range of valid values:</b><br> |
| 1043 | * Both values >= 1</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1044 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1045 | * <p><b>Full capability</b> - |
| 1046 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 1047 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 1048 | * |
| 1049 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Ruben Brunk | 5749368 | 2014-05-27 18:58:08 -0700 | [diff] [blame] | 1050 | * @hide |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1051 | */ |
Igor Murashkin | 72f9f0a | 2014-05-14 15:46:10 -0700 | [diff] [blame] | 1052 | public static final Key<android.util.Size> LENS_INFO_SHADING_MAP_SIZE = |
| 1053 | new Key<android.util.Size>("android.lens.info.shadingMapSize", android.util.Size.class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1054 | |
| 1055 | /** |
Zhijun He | ff41393 | 2014-02-07 15:44:30 -0800 | [diff] [blame] | 1056 | * <p>The lens focus distance calibration quality.</p> |
| 1057 | * <p>The lens focus distance calibration quality determines the reliability of |
| 1058 | * focus related metadata entries, i.e. {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}, |
| 1059 | * {@link CaptureResult#LENS_FOCUS_RANGE android.lens.focusRange}, {@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}, and |
| 1060 | * {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1061 | * <p>APPROXIMATE and CALIBRATED devices report the focus metadata in |
| 1062 | * units of diopters (1/meter), so <code>0.0f</code> represents focusing at infinity, |
| 1063 | * and increasing positive numbers represent focusing closer and closer |
| 1064 | * to the camera device. The focus distance control also uses diopters |
| 1065 | * on these devices.</p> |
| 1066 | * <p>UNCALIBRATED devices do not use units that are directly comparable |
| 1067 | * to any real physical measurement, but <code>0.0f</code> still represents farthest |
| 1068 | * focus, and {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} represents the |
| 1069 | * nearest focus the device can achieve.</p> |
| 1070 | * <p><b>Possible values:</b> |
| 1071 | * <ul> |
| 1072 | * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED UNCALIBRATED}</li> |
| 1073 | * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE APPROXIMATE}</li> |
| 1074 | * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED CALIBRATED}</li> |
| 1075 | * </ul></p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1076 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1077 | * <p><b>Limited capability</b> - |
| 1078 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 1079 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Zhijun He | ff41393 | 2014-02-07 15:44:30 -0800 | [diff] [blame] | 1080 | * |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1081 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Zhijun He | ff41393 | 2014-02-07 15:44:30 -0800 | [diff] [blame] | 1082 | * @see CaptureRequest#LENS_FOCUS_DISTANCE |
| 1083 | * @see CaptureResult#LENS_FOCUS_RANGE |
| 1084 | * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE |
| 1085 | * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE |
| 1086 | * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED |
| 1087 | * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE |
| 1088 | * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED |
| 1089 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1090 | @PublicKey |
Zhijun He | ff41393 | 2014-02-07 15:44:30 -0800 | [diff] [blame] | 1091 | public static final Key<Integer> LENS_INFO_FOCUS_DISTANCE_CALIBRATION = |
| 1092 | new Key<Integer>("android.lens.info.focusDistanceCalibration", int.class); |
| 1093 | |
| 1094 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1095 | * <p>Direction the camera faces relative to |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1096 | * device screen.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1097 | * <p><b>Possible values:</b> |
| 1098 | * <ul> |
| 1099 | * <li>{@link #LENS_FACING_FRONT FRONT}</li> |
| 1100 | * <li>{@link #LENS_FACING_BACK BACK}</li> |
Zhijun He | 503e815 | 2015-01-12 15:16:56 -0800 | [diff] [blame] | 1101 | * <li>{@link #LENS_FACING_EXTERNAL EXTERNAL}</li> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1102 | * </ul></p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1103 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1104 | * @see #LENS_FACING_FRONT |
| 1105 | * @see #LENS_FACING_BACK |
Zhijun He | 503e815 | 2015-01-12 15:16:56 -0800 | [diff] [blame] | 1106 | * @see #LENS_FACING_EXTERNAL |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1107 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1108 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1109 | public static final Key<Integer> LENS_FACING = |
| 1110 | new Key<Integer>("android.lens.facing", int.class); |
| 1111 | |
| 1112 | /** |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1113 | * <p>The orientation of the camera relative to the sensor |
| 1114 | * coordinate system.</p> |
Eino-Ville Talvala | abf0b8b | 2015-08-19 16:21:15 -0700 | [diff] [blame] | 1115 | * <p>The four coefficients that describe the quaternion |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1116 | * rotation from the Android sensor coordinate system to a |
| 1117 | * camera-aligned coordinate system where the X-axis is |
| 1118 | * aligned with the long side of the image sensor, the Y-axis |
| 1119 | * is aligned with the short side of the image sensor, and |
| 1120 | * the Z-axis is aligned with the optical axis of the sensor.</p> |
Eino-Ville Talvala | abf0b8b | 2015-08-19 16:21:15 -0700 | [diff] [blame] | 1121 | * <p>To convert from the quaternion coefficients <code>(x,y,z,w)</code> |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1122 | * to the axis of rotation <code>(a_x, a_y, a_z)</code> and rotation |
| 1123 | * amount <code>theta</code>, the following formulas can be used:</p> |
| 1124 | * <pre><code> theta = 2 * acos(w) |
| 1125 | * a_x = x / sin(theta/2) |
| 1126 | * a_y = y / sin(theta/2) |
| 1127 | * a_z = z / sin(theta/2) |
| 1128 | * </code></pre> |
| 1129 | * <p>To create a 3x3 rotation matrix that applies the rotation |
Eino-Ville Talvala | abf0b8b | 2015-08-19 16:21:15 -0700 | [diff] [blame] | 1130 | * defined by this quaternion, the following matrix can be |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1131 | * used:</p> |
| 1132 | * <pre><code>R = [ 1 - 2y^2 - 2z^2, 2xy - 2zw, 2xz + 2yw, |
| 1133 | * 2xy + 2zw, 1 - 2x^2 - 2z^2, 2yz - 2xw, |
| 1134 | * 2xz - 2yw, 2yz + 2xw, 1 - 2x^2 - 2y^2 ] |
| 1135 | * </code></pre> |
| 1136 | * <p>This matrix can then be used to apply the rotation to a |
| 1137 | * column vector point with</p> |
| 1138 | * <p><code>p' = Rp</code></p> |
| 1139 | * <p>where <code>p</code> is in the device sensor coordinate system, and |
| 1140 | * <code>p'</code> is in the camera-oriented coordinate system.</p> |
| 1141 | * <p><b>Units</b>: |
Eino-Ville Talvala | abf0b8b | 2015-08-19 16:21:15 -0700 | [diff] [blame] | 1142 | * Quaternion coefficients</p> |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1143 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1144 | */ |
| 1145 | @PublicKey |
| 1146 | public static final Key<float[]> LENS_POSE_ROTATION = |
| 1147 | new Key<float[]>("android.lens.poseRotation", float[].class); |
| 1148 | |
| 1149 | /** |
| 1150 | * <p>Position of the camera optical center.</p> |
Eino-Ville Talvala | d3dbfb3 | 2015-05-29 17:17:04 -0700 | [diff] [blame] | 1151 | * <p>The position of the camera device's lens optical center, |
Eino-Ville Talvala | ec99efa | 2017-11-29 15:35:42 -0800 | [diff] [blame] | 1152 | * as a three-dimensional vector <code>(x,y,z)</code>.</p> |
| 1153 | * <p>Prior to Android P, or when {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is PRIMARY_CAMERA, this position |
| 1154 | * is relative to the optical center of the largest camera device facing in the same |
| 1155 | * direction as this camera, in the {@link android.hardware.SensorEvent Android sensor |
| 1156 | * coordinate axes}. Note that only the axis definitions are shared with the sensor |
| 1157 | * coordinate system, but not the origin.</p> |
| 1158 | * <p>If this device is the largest or only camera device with a given facing, then this |
| 1159 | * position will be <code>(0, 0, 0)</code>; a camera device with a lens optical center located 3 cm |
| 1160 | * from the main sensor along the +X axis (to the right from the user's perspective) will |
| 1161 | * report <code>(0.03, 0, 0)</code>.</p> |
| 1162 | * <p>To transform a pixel coordinates between two cameras facing the same direction, first |
| 1163 | * the source camera {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion} must be corrected for. Then the source |
| 1164 | * camera {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} needs to be applied, followed by the |
| 1165 | * {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the source camera, the translation of the source camera |
| 1166 | * relative to the destination camera, the {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the destination |
| 1167 | * camera, and finally the inverse of {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} of the destination |
| 1168 | * camera. This obtains a radial-distortion-free coordinate in the destination camera pixel |
| 1169 | * coordinates.</p> |
| 1170 | * <p>To compare this against a real image from the destination camera, the destination camera |
| 1171 | * image then needs to be corrected for radial distortion before comparison or sampling.</p> |
| 1172 | * <p>When {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is GYROSCOPE, then this position is relative to |
| 1173 | * the center of the primary gyroscope on the device.</p> |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1174 | * <p><b>Units</b>: Meters</p> |
| 1175 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1176 | * |
Eino-Ville Talvala | abf0b8b | 2015-08-19 16:21:15 -0700 | [diff] [blame] | 1177 | * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION |
Eino-Ville Talvala | ec99efa | 2017-11-29 15:35:42 -0800 | [diff] [blame] | 1178 | * @see CameraCharacteristics#LENS_POSE_REFERENCE |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1179 | * @see CameraCharacteristics#LENS_POSE_ROTATION |
Eino-Ville Talvala | abf0b8b | 2015-08-19 16:21:15 -0700 | [diff] [blame] | 1180 | * @see CameraCharacteristics#LENS_RADIAL_DISTORTION |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1181 | */ |
| 1182 | @PublicKey |
| 1183 | public static final Key<float[]> LENS_POSE_TRANSLATION = |
| 1184 | new Key<float[]>("android.lens.poseTranslation", float[].class); |
| 1185 | |
| 1186 | /** |
| 1187 | * <p>The parameters for this camera device's intrinsic |
| 1188 | * calibration.</p> |
| 1189 | * <p>The five calibration parameters that describe the |
| 1190 | * transform from camera-centric 3D coordinates to sensor |
| 1191 | * pixel coordinates:</p> |
| 1192 | * <pre><code>[f_x, f_y, c_x, c_y, s] |
| 1193 | * </code></pre> |
| 1194 | * <p>Where <code>f_x</code> and <code>f_y</code> are the horizontal and vertical |
| 1195 | * focal lengths, <code>[c_x, c_y]</code> is the position of the optical |
| 1196 | * axis, and <code>s</code> is a skew parameter for the sensor plane not |
| 1197 | * being aligned with the lens plane.</p> |
| 1198 | * <p>These are typically used within a transformation matrix K:</p> |
| 1199 | * <pre><code>K = [ f_x, s, c_x, |
| 1200 | * 0, f_y, c_y, |
| 1201 | * 0 0, 1 ] |
| 1202 | * </code></pre> |
| 1203 | * <p>which can then be combined with the camera pose rotation |
| 1204 | * <code>R</code> and translation <code>t</code> ({@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} and |
| 1205 | * {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}, respective) to calculate the |
| 1206 | * complete transform from world coordinates to pixel |
| 1207 | * coordinates:</p> |
| 1208 | * <pre><code>P = [ K 0 * [ R t |
| 1209 | * 0 1 ] 0 1 ] |
| 1210 | * </code></pre> |
| 1211 | * <p>and with <code>p_w</code> being a point in the world coordinate system |
| 1212 | * and <code>p_s</code> being a point in the camera active pixel array |
| 1213 | * coordinate system, and with the mapping including the |
| 1214 | * homogeneous division by z:</p> |
| 1215 | * <pre><code> p_h = (x_h, y_h, z_h) = P p_w |
| 1216 | * p_s = p_h / z_h |
| 1217 | * </code></pre> |
| 1218 | * <p>so <code>[x_s, y_s]</code> is the pixel coordinates of the world |
| 1219 | * point, <code>z_s = 1</code>, and <code>w_s</code> is a measurement of disparity |
| 1220 | * (depth) in pixel coordinates.</p> |
Eino-Ville Talvala | b8bd8ab | 2015-06-16 11:44:10 -0700 | [diff] [blame] | 1221 | * <p>Note that the coordinate system for this transform is the |
| 1222 | * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} system, |
| 1223 | * where <code>(0,0)</code> is the top-left of the |
| 1224 | * preCorrectionActiveArraySize rectangle. Once the pose and |
| 1225 | * intrinsic calibration transforms have been applied to a |
Eino-Ville Talvala | abf0b8b | 2015-08-19 16:21:15 -0700 | [diff] [blame] | 1226 | * world point, then the {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion} |
Eino-Ville Talvala | b8bd8ab | 2015-06-16 11:44:10 -0700 | [diff] [blame] | 1227 | * transform needs to be applied, and the result adjusted to |
| 1228 | * be in the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} coordinate |
| 1229 | * system (where <code>(0, 0)</code> is the top-left of the |
| 1230 | * activeArraySize rectangle), to determine the final pixel |
| 1231 | * coordinate of the world point for processed (non-RAW) |
| 1232 | * output buffers.</p> |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1233 | * <p><b>Units</b>: |
Eino-Ville Talvala | b8bd8ab | 2015-06-16 11:44:10 -0700 | [diff] [blame] | 1234 | * Pixels in the |
| 1235 | * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} |
| 1236 | * coordinate system.</p> |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1237 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1238 | * |
| 1239 | * @see CameraCharacteristics#LENS_POSE_ROTATION |
| 1240 | * @see CameraCharacteristics#LENS_POSE_TRANSLATION |
Eino-Ville Talvala | abf0b8b | 2015-08-19 16:21:15 -0700 | [diff] [blame] | 1241 | * @see CameraCharacteristics#LENS_RADIAL_DISTORTION |
Eino-Ville Talvala | 0b7b03b | 2015-04-13 17:29:52 -0700 | [diff] [blame] | 1242 | * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE |
Eino-Ville Talvala | b8bd8ab | 2015-06-16 11:44:10 -0700 | [diff] [blame] | 1243 | * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1244 | */ |
| 1245 | @PublicKey |
| 1246 | public static final Key<float[]> LENS_INTRINSIC_CALIBRATION = |
| 1247 | new Key<float[]>("android.lens.intrinsicCalibration", float[].class); |
| 1248 | |
| 1249 | /** |
| 1250 | * <p>The correction coefficients to correct for this camera device's |
Eino-Ville Talvala | 66c73ba | 2015-05-29 16:11:56 -0700 | [diff] [blame] | 1251 | * radial and tangential lens distortion.</p> |
Ruben Brunk | 02cd8cb | 2015-06-15 15:33:09 -0700 | [diff] [blame] | 1252 | * <p>Four radial distortion coefficients <code>[kappa_0, kappa_1, kappa_2, |
Eino-Ville Talvala | 66c73ba | 2015-05-29 16:11:56 -0700 | [diff] [blame] | 1253 | * kappa_3]</code> and two tangential distortion coefficients |
| 1254 | * <code>[kappa_4, kappa_5]</code> that can be used to correct the |
| 1255 | * lens's geometric distortion with the mapping equations:</p> |
Ruben Brunk | 02cd8cb | 2015-06-15 15:33:09 -0700 | [diff] [blame] | 1256 | * <pre><code> x_c = x_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + |
Eino-Ville Talvala | 66c73ba | 2015-05-29 16:11:56 -0700 | [diff] [blame] | 1257 | * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 ) |
Ruben Brunk | 02cd8cb | 2015-06-15 15:33:09 -0700 | [diff] [blame] | 1258 | * y_c = y_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + |
Eino-Ville Talvala | 66c73ba | 2015-05-29 16:11:56 -0700 | [diff] [blame] | 1259 | * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 ) |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1260 | * </code></pre> |
Eino-Ville Talvala | 66c73ba | 2015-05-29 16:11:56 -0700 | [diff] [blame] | 1261 | * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the |
| 1262 | * input image that correspond to the pixel values in the |
| 1263 | * corrected image at the coordinate <code>[x_i, y_i]</code>:</p> |
| 1264 | * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage) |
| 1265 | * </code></pre> |
| 1266 | * <p>The pixel coordinates are defined in a normalized |
| 1267 | * coordinate system related to the |
Eino-Ville Talvala | abf0b8b | 2015-08-19 16:21:15 -0700 | [diff] [blame] | 1268 | * {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} calibration fields. |
Eino-Ville Talvala | 66c73ba | 2015-05-29 16:11:56 -0700 | [diff] [blame] | 1269 | * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code> have <code>(0,0)</code> at the |
| 1270 | * lens optical center <code>[c_x, c_y]</code>. The maximum magnitudes |
| 1271 | * of both x and y coordinates are normalized to be 1 at the |
| 1272 | * edge further from the optical center, so the range |
| 1273 | * for both dimensions is <code>-1 <= x <= 1</code>.</p> |
| 1274 | * <p>Finally, <code>r</code> represents the radial distance from the |
| 1275 | * optical center, <code>r^2 = x_i^2 + y_i^2</code>, and its magnitude |
| 1276 | * is therefore no larger than <code>|r| <= sqrt(2)</code>.</p> |
| 1277 | * <p>The distortion model used is the Brown-Conrady model.</p> |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1278 | * <p><b>Units</b>: |
Eino-Ville Talvala | 66c73ba | 2015-05-29 16:11:56 -0700 | [diff] [blame] | 1279 | * Unitless coefficients.</p> |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1280 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Eino-Ville Talvala | abf0b8b | 2015-08-19 16:21:15 -0700 | [diff] [blame] | 1281 | * |
| 1282 | * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1283 | */ |
| 1284 | @PublicKey |
| 1285 | public static final Key<float[]> LENS_RADIAL_DISTORTION = |
| 1286 | new Key<float[]>("android.lens.radialDistortion", float[].class); |
| 1287 | |
| 1288 | /** |
Eino-Ville Talvala | ec99efa | 2017-11-29 15:35:42 -0800 | [diff] [blame] | 1289 | * <p>The origin for {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}.</p> |
| 1290 | * <p>Different calibration methods and use cases can produce better or worse results |
| 1291 | * depending on the selected coordinate origin.</p> |
| 1292 | * <p>For devices designed to support the MOTION_TRACKING capability, the GYROSCOPE origin |
| 1293 | * makes device calibration and later usage by applications combining camera and gyroscope |
| 1294 | * information together simpler.</p> |
| 1295 | * <p><b>Possible values:</b> |
| 1296 | * <ul> |
| 1297 | * <li>{@link #LENS_POSE_REFERENCE_PRIMARY_CAMERA PRIMARY_CAMERA}</li> |
| 1298 | * <li>{@link #LENS_POSE_REFERENCE_GYROSCOPE GYROSCOPE}</li> |
| 1299 | * </ul></p> |
| 1300 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1301 | * |
| 1302 | * @see CameraCharacteristics#LENS_POSE_TRANSLATION |
| 1303 | * @see #LENS_POSE_REFERENCE_PRIMARY_CAMERA |
| 1304 | * @see #LENS_POSE_REFERENCE_GYROSCOPE |
| 1305 | */ |
| 1306 | @PublicKey |
| 1307 | public static final Key<Integer> LENS_POSE_REFERENCE = |
| 1308 | new Key<Integer>("android.lens.poseReference", int.class); |
| 1309 | |
| 1310 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1311 | * <p>List of noise reduction modes for {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode} that are supported |
| 1312 | * by this camera device.</p> |
| 1313 | * <p>Full-capability camera devices will always support OFF and FAST.</p> |
Chien-Yu Chen | 7233391 | 2015-07-08 11:55:19 -0700 | [diff] [blame] | 1314 | * <p>Camera devices that support YUV_REPROCESSING or PRIVATE_REPROCESSING will support |
| 1315 | * ZERO_SHUTTER_LAG.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1316 | * <p>Legacy-capability camera devices will only support FAST mode.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1317 | * <p><b>Range of valid values:</b><br> |
| 1318 | * Any value listed in {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1319 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1320 | * <p><b>Limited capability</b> - |
| 1321 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 1322 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Ruben Brunk | 6dc379c | 2014-03-04 15:04:00 -0800 | [diff] [blame] | 1323 | * |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1324 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Ruben Brunk | 6dc379c | 2014-03-04 15:04:00 -0800 | [diff] [blame] | 1325 | * @see CaptureRequest#NOISE_REDUCTION_MODE |
| 1326 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1327 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 1328 | public static final Key<int[]> NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES = |
| 1329 | new Key<int[]>("android.noiseReduction.availableNoiseReductionModes", int[].class); |
Ruben Brunk | 6dc379c | 2014-03-04 15:04:00 -0800 | [diff] [blame] | 1330 | |
| 1331 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1332 | * <p>If set to 1, the HAL will always split result |
Eino-Ville Talvala | 7a31310 | 2013-11-07 14:45:06 -0800 | [diff] [blame] | 1333 | * metadata for a single capture into multiple buffers, |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1334 | * returned using multiple process_capture_result calls.</p> |
| 1335 | * <p>Does not need to be listed in static |
Eino-Ville Talvala | 7a31310 | 2013-11-07 14:45:06 -0800 | [diff] [blame] | 1336 | * metadata. Support for partial results will be reworked in |
| 1337 | * future versions of camera service. This quirk will stop |
| 1338 | * working at that point; DO NOT USE without careful |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1339 | * consideration of future support.</p> |
Igor Murashkin | 3242f4f | 2014-01-15 12:27:41 -0800 | [diff] [blame] | 1340 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1341 | * @deprecated |
Eino-Ville Talvala | 7a31310 | 2013-11-07 14:45:06 -0800 | [diff] [blame] | 1342 | * @hide |
| 1343 | */ |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1344 | @Deprecated |
Eino-Ville Talvala | 7a31310 | 2013-11-07 14:45:06 -0800 | [diff] [blame] | 1345 | public static final Key<Byte> QUIRKS_USE_PARTIAL_RESULT = |
| 1346 | new Key<Byte>("android.quirks.usePartialResult", byte.class); |
| 1347 | |
| 1348 | /** |
Zhijun He | a5a0cac | 2014-02-05 07:55:44 -0800 | [diff] [blame] | 1349 | * <p>The maximum numbers of different types of output streams |
| 1350 | * that can be configured and used simultaneously by a camera device.</p> |
| 1351 | * <p>This is a 3 element tuple that contains the max number of output simultaneous |
Zhijun He | a4d0a8f | 2014-04-29 12:35:27 -0700 | [diff] [blame] | 1352 | * streams for raw sensor, processed (but not stalling), and processed (and stalling) |
| 1353 | * formats respectively. For example, assuming that JPEG is typically a processed and |
| 1354 | * stalling stream, if max raw sensor format output stream number is 1, max YUV streams |
Zhijun He | a5a0cac | 2014-02-05 07:55:44 -0800 | [diff] [blame] | 1355 | * number is 3, and max JPEG stream number is 2, then this tuple should be <code>(1, 3, 2)</code>.</p> |
| 1356 | * <p>This lists the upper bound of the number of output streams supported by |
| 1357 | * the camera device. Using more streams simultaneously may require more hardware and |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1358 | * CPU resources that will consume more power. The image format for an output stream can |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1359 | * be any supported format provided by android.scaler.availableStreamConfigurations. |
| 1360 | * The formats defined in android.scaler.availableStreamConfigurations can be catergorized |
Zhijun He | a4d0a8f | 2014-04-29 12:35:27 -0700 | [diff] [blame] | 1361 | * into the 3 stream types as below:</p> |
Zhijun He | a5a0cac | 2014-02-05 07:55:44 -0800 | [diff] [blame] | 1362 | * <ul> |
Zhijun He | a4d0a8f | 2014-04-29 12:35:27 -0700 | [diff] [blame] | 1363 | * <li>Processed (but stalling): any non-RAW format with a stallDurations > 0. |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 1364 | * Typically {@link android.graphics.ImageFormat#JPEG JPEG format}.</li> |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 1365 | * <li>Raw formats: {@link android.graphics.ImageFormat#RAW_SENSOR RAW_SENSOR}, {@link android.graphics.ImageFormat#RAW10 RAW10}, or |
| 1366 | * {@link android.graphics.ImageFormat#RAW12 RAW12}.</li> |
| 1367 | * <li>Processed (but not-stalling): any non-RAW format without a stall duration. Typically |
| 1368 | * {@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888}, |
| 1369 | * {@link android.graphics.ImageFormat#NV21 NV21}, or {@link android.graphics.ImageFormat#YV12 YV12}.</li> |
Zhijun He | a5a0cac | 2014-02-05 07:55:44 -0800 | [diff] [blame] | 1370 | * </ul> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1371 | * <p><b>Range of valid values:</b><br></p> |
| 1372 | * <p>For processed (and stalling) format streams, >= 1.</p> |
| 1373 | * <p>For Raw format (either stalling or non-stalling) streams, >= 0.</p> |
| 1374 | * <p>For processed (but not stalling) format streams, >= 3 |
| 1375 | * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>); |
| 1376 | * >= 2 for LIMITED mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == LIMITED</code>).</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1377 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1378 | * |
| 1379 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1380 | * @hide |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1381 | */ |
| 1382 | public static final Key<int[]> REQUEST_MAX_NUM_OUTPUT_STREAMS = |
| 1383 | new Key<int[]>("android.request.maxNumOutputStreams", int[].class); |
| 1384 | |
| 1385 | /** |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1386 | * <p>The maximum numbers of different types of output streams |
| 1387 | * that can be configured and used simultaneously by a camera device |
| 1388 | * for any <code>RAW</code> formats.</p> |
| 1389 | * <p>This value contains the max number of output simultaneous |
| 1390 | * streams from the raw sensor.</p> |
| 1391 | * <p>This lists the upper bound of the number of output streams supported by |
| 1392 | * the camera device. Using more streams simultaneously may require more hardware and |
| 1393 | * CPU resources that will consume more power. The image format for this kind of an output stream can |
| 1394 | * be any <code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p> |
| 1395 | * <p>In particular, a <code>RAW</code> format is typically one of:</p> |
| 1396 | * <ul> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 1397 | * <li>{@link android.graphics.ImageFormat#RAW_SENSOR RAW_SENSOR}</li> |
| 1398 | * <li>{@link android.graphics.ImageFormat#RAW10 RAW10}</li> |
| 1399 | * <li>{@link android.graphics.ImageFormat#RAW12 RAW12}</li> |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1400 | * </ul> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1401 | * <p>LEGACY mode devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> LEGACY) |
| 1402 | * never support raw streams.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1403 | * <p><b>Range of valid values:</b><br></p> |
| 1404 | * <p>>= 0</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1405 | * <p>This key is available on all devices.</p> |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1406 | * |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1407 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1408 | * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP |
| 1409 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1410 | @PublicKey |
| 1411 | @SyntheticKey |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1412 | public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_RAW = |
| 1413 | new Key<Integer>("android.request.maxNumOutputRaw", int.class); |
| 1414 | |
| 1415 | /** |
| 1416 | * <p>The maximum numbers of different types of output streams |
| 1417 | * that can be configured and used simultaneously by a camera device |
| 1418 | * for any processed (but not-stalling) formats.</p> |
| 1419 | * <p>This value contains the max number of output simultaneous |
| 1420 | * streams for any processed (but not-stalling) formats.</p> |
| 1421 | * <p>This lists the upper bound of the number of output streams supported by |
| 1422 | * the camera device. Using more streams simultaneously may require more hardware and |
| 1423 | * CPU resources that will consume more power. The image format for this kind of an output stream can |
| 1424 | * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p> |
| 1425 | * <p>Processed (but not-stalling) is defined as any non-RAW format without a stall duration. |
| 1426 | * Typically:</p> |
| 1427 | * <ul> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 1428 | * <li>{@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888}</li> |
| 1429 | * <li>{@link android.graphics.ImageFormat#NV21 NV21}</li> |
| 1430 | * <li>{@link android.graphics.ImageFormat#YV12 YV12}</li> |
| 1431 | * <li>Implementation-defined formats, i.e. {@link android.hardware.camera2.params.StreamConfigurationMap#isOutputSupportedFor(Class) }</li> |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1432 | * </ul> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 1433 | * <p>For full guarantees, query {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } with a |
| 1434 | * processed format -- it will return 0 for a non-stalling stream.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1435 | * <p>LEGACY devices will support at least 2 processing/non-stalling streams.</p> |
| 1436 | * <p><b>Range of valid values:</b><br></p> |
| 1437 | * <p>>= 3 |
| 1438 | * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>); |
| 1439 | * >= 2 for LIMITED mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == LIMITED</code>).</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1440 | * <p>This key is available on all devices.</p> |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1441 | * |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1442 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1443 | * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP |
| 1444 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1445 | @PublicKey |
| 1446 | @SyntheticKey |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1447 | public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC = |
| 1448 | new Key<Integer>("android.request.maxNumOutputProc", int.class); |
| 1449 | |
| 1450 | /** |
| 1451 | * <p>The maximum numbers of different types of output streams |
| 1452 | * that can be configured and used simultaneously by a camera device |
| 1453 | * for any processed (and stalling) formats.</p> |
| 1454 | * <p>This value contains the max number of output simultaneous |
| 1455 | * streams for any processed (but not-stalling) formats.</p> |
| 1456 | * <p>This lists the upper bound of the number of output streams supported by |
| 1457 | * the camera device. Using more streams simultaneously may require more hardware and |
| 1458 | * CPU resources that will consume more power. The image format for this kind of an output stream can |
| 1459 | * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 1460 | * <p>A processed and stalling format is defined as any non-RAW format with a stallDurations |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 1461 | * > 0. Typically only the {@link android.graphics.ImageFormat#JPEG JPEG format} is a stalling format.</p> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 1462 | * <p>For full guarantees, query {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } with a |
| 1463 | * processed format -- it will return a non-0 value for a stalling stream.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1464 | * <p>LEGACY devices will support up to 1 processing/stalling stream.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1465 | * <p><b>Range of valid values:</b><br></p> |
| 1466 | * <p>>= 1</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1467 | * <p>This key is available on all devices.</p> |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1468 | * |
| 1469 | * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP |
| 1470 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1471 | @PublicKey |
| 1472 | @SyntheticKey |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1473 | public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC_STALLING = |
| 1474 | new Key<Integer>("android.request.maxNumOutputProcStalling", int.class); |
| 1475 | |
| 1476 | /** |
Zhijun He | a5a0cac | 2014-02-05 07:55:44 -0800 | [diff] [blame] | 1477 | * <p>The maximum numbers of any type of input streams |
| 1478 | * that can be configured and used simultaneously by a camera device.</p> |
| 1479 | * <p>When set to 0, it means no input stream is supported.</p> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 1480 | * <p>The image format for a input stream can be any supported format returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }. When using an |
| 1481 | * input stream, there must be at least one output stream configured to to receive the |
| 1482 | * reprocessed images.</p> |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 1483 | * <p>When an input stream and some output streams are used in a reprocessing request, |
| 1484 | * only the input buffer will be used to produce these output stream buffers, and a |
| 1485 | * new sensor image will not be captured.</p> |
Zhijun He | a5a0cac | 2014-02-05 07:55:44 -0800 | [diff] [blame] | 1486 | * <p>For example, for Zero Shutter Lag (ZSL) still capture use case, the input |
Chien-Yu Chen | 8062d31 | 2015-05-12 14:24:10 -0700 | [diff] [blame] | 1487 | * stream image format will be PRIVATE, the associated output stream image format |
Zhijun He | a5a0cac | 2014-02-05 07:55:44 -0800 | [diff] [blame] | 1488 | * should be JPEG.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1489 | * <p><b>Range of valid values:</b><br></p> |
| 1490 | * <p>0 or 1.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1491 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1492 | * <p><b>Full capability</b> - |
| 1493 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 1494 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 1495 | * |
| 1496 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Zhijun He | a5a0cac | 2014-02-05 07:55:44 -0800 | [diff] [blame] | 1497 | */ |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 1498 | @PublicKey |
Zhijun He | a5a0cac | 2014-02-05 07:55:44 -0800 | [diff] [blame] | 1499 | public static final Key<Integer> REQUEST_MAX_NUM_INPUT_STREAMS = |
| 1500 | new Key<Integer>("android.request.maxNumInputStreams", int.class); |
| 1501 | |
| 1502 | /** |
Igor Murashkin | c127f05 | 2014-01-17 18:06:02 -0800 | [diff] [blame] | 1503 | * <p>Specifies the number of maximum pipeline stages a frame |
| 1504 | * has to go through from when it's exposed to when it's available |
| 1505 | * to the framework.</p> |
| 1506 | * <p>A typical minimum value for this is 2 (one stage to expose, |
| 1507 | * one stage to readout) from the sensor. The ISP then usually adds |
| 1508 | * its own stages to do custom HW processing. Further stages may be |
| 1509 | * added by SW processing.</p> |
| 1510 | * <p>Depending on what settings are used (e.g. YUV, JPEG) and what |
| 1511 | * processing is enabled (e.g. face detection), the actual pipeline |
| 1512 | * depth (specified by {@link CaptureResult#REQUEST_PIPELINE_DEPTH android.request.pipelineDepth}) may be less than |
| 1513 | * the max pipeline depth.</p> |
| 1514 | * <p>A pipeline depth of X stages is equivalent to a pipeline latency of |
| 1515 | * X frame intervals.</p> |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 1516 | * <p>This value will normally be 8 or less, however, for high speed capture session, |
| 1517 | * the max pipeline depth will be up to 8 x size of high speed capture request list.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1518 | * <p>This key is available on all devices.</p> |
Igor Murashkin | c127f05 | 2014-01-17 18:06:02 -0800 | [diff] [blame] | 1519 | * |
| 1520 | * @see CaptureResult#REQUEST_PIPELINE_DEPTH |
| 1521 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1522 | @PublicKey |
Igor Murashkin | c127f05 | 2014-01-17 18:06:02 -0800 | [diff] [blame] | 1523 | public static final Key<Byte> REQUEST_PIPELINE_MAX_DEPTH = |
| 1524 | new Key<Byte>("android.request.pipelineMaxDepth", byte.class); |
| 1525 | |
| 1526 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1527 | * <p>Defines how many sub-components |
Igor Murashkin | 2086b58 | 2014-01-17 18:30:59 -0800 | [diff] [blame] | 1528 | * a result will be composed of.</p> |
| 1529 | * <p>In order to combat the pipeline latency, partial results |
| 1530 | * may be delivered to the application layer from the camera device as |
| 1531 | * soon as they are available.</p> |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1532 | * <p>Optional; defaults to 1. A value of 1 means that partial |
| 1533 | * results are not supported, and only the final TotalCaptureResult will |
| 1534 | * be produced by the camera device.</p> |
Eino-Ville Talvala | b67a3b3 | 2014-06-06 13:07:20 -0700 | [diff] [blame] | 1535 | * <p>A typical use case for this might be: after requesting an |
| 1536 | * auto-focus (AF) lock the new AF state might be available 50% |
| 1537 | * of the way through the pipeline. The camera device could |
| 1538 | * then immediately dispatch this state via a partial result to |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1539 | * the application, and the rest of the metadata via later |
| 1540 | * partial results.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1541 | * <p><b>Range of valid values:</b><br> |
| 1542 | * >= 1</p> |
Zhijun He | 1420de4 | 2014-07-17 17:45:54 -0700 | [diff] [blame] | 1543 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Igor Murashkin | 2086b58 | 2014-01-17 18:30:59 -0800 | [diff] [blame] | 1544 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1545 | @PublicKey |
Igor Murashkin | 2086b58 | 2014-01-17 18:30:59 -0800 | [diff] [blame] | 1546 | public static final Key<Integer> REQUEST_PARTIAL_RESULT_COUNT = |
| 1547 | new Key<Integer>("android.request.partialResultCount", int.class); |
| 1548 | |
| 1549 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1550 | * <p>List of capabilities that this camera device |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1551 | * advertises as fully supporting.</p> |
| 1552 | * <p>A capability is a contract that the camera device makes in order |
| 1553 | * to be able to satisfy one or more use cases.</p> |
| 1554 | * <p>Listing a capability guarantees that the whole set of features |
| 1555 | * required to support a common use will all be available.</p> |
| 1556 | * <p>Using a subset of the functionality provided by an unsupported |
| 1557 | * capability may be possible on a specific camera device implementation; |
| 1558 | * to do this query each of android.request.availableRequestKeys, |
| 1559 | * android.request.availableResultKeys, |
| 1560 | * android.request.availableCharacteristicsKeys.</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1561 | * <p>The following capabilities are guaranteed to be available on |
| 1562 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL devices:</p> |
| 1563 | * <ul> |
| 1564 | * <li>MANUAL_SENSOR</li> |
Zhijun He | df9b747 | 2014-06-04 13:42:41 -0700 | [diff] [blame] | 1565 | * <li>MANUAL_POST_PROCESSING</li> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1566 | * </ul> |
| 1567 | * <p>Other capabilities may be available on either FULL or LIMITED |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1568 | * devices, but the application should query this key to be sure.</p> |
| 1569 | * <p><b>Possible values:</b> |
| 1570 | * <ul> |
| 1571 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE BACKWARD_COMPATIBLE}</li> |
| 1572 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR MANUAL_SENSOR}</li> |
| 1573 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING MANUAL_POST_PROCESSING}</li> |
| 1574 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_RAW RAW}</li> |
Chien-Yu Chen | 8062d31 | 2015-05-12 14:24:10 -0700 | [diff] [blame] | 1575 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING PRIVATE_REPROCESSING}</li> |
Ruben Brunk | 0c22e69 | 2014-11-11 12:00:34 -0800 | [diff] [blame] | 1576 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS READ_SENSOR_SETTINGS}</li> |
Eino-Ville Talvala | 126a746 | 2014-11-04 16:31:01 -0800 | [diff] [blame] | 1577 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE BURST_CAPTURE}</li> |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 1578 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING YUV_REPROCESSING}</li> |
Eino-Ville Talvala | 0b7b03b | 2015-04-13 17:29:52 -0700 | [diff] [blame] | 1579 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT DEPTH_OUTPUT}</li> |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 1580 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO CONSTRAINED_HIGH_SPEED_VIDEO}</li> |
Eino-Ville Talvala | ec99efa | 2017-11-29 15:35:42 -0800 | [diff] [blame] | 1581 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING MOTION_TRACKING}</li> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1582 | * </ul></p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1583 | * <p>This key is available on all devices.</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1584 | * |
| 1585 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Eino-Ville Talvala | 08bc3b0 | 2014-07-09 10:07:36 -0700 | [diff] [blame] | 1586 | * @see #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1587 | * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR |
Zhijun He | 50f7243 | 2014-05-28 13:52:04 -0700 | [diff] [blame] | 1588 | * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING |
Eino-Ville Talvala | 611fece | 2014-07-10 17:29:38 -0700 | [diff] [blame] | 1589 | * @see #REQUEST_AVAILABLE_CAPABILITIES_RAW |
Chien-Yu Chen | 8062d31 | 2015-05-12 14:24:10 -0700 | [diff] [blame] | 1590 | * @see #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING |
Ruben Brunk | 0c22e69 | 2014-11-11 12:00:34 -0800 | [diff] [blame] | 1591 | * @see #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS |
Eino-Ville Talvala | 126a746 | 2014-11-04 16:31:01 -0800 | [diff] [blame] | 1592 | * @see #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 1593 | * @see #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING |
Eino-Ville Talvala | 0b7b03b | 2015-04-13 17:29:52 -0700 | [diff] [blame] | 1594 | * @see #REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 1595 | * @see #REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO |
Eino-Ville Talvala | ec99efa | 2017-11-29 15:35:42 -0800 | [diff] [blame] | 1596 | * @see #REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1597 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1598 | @PublicKey |
Zhijun He | 421ddbe | 2014-05-29 13:41:49 -0700 | [diff] [blame] | 1599 | public static final Key<int[]> REQUEST_AVAILABLE_CAPABILITIES = |
| 1600 | new Key<int[]>("android.request.availableCapabilities", int[].class); |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1601 | |
| 1602 | /** |
| 1603 | * <p>A list of all keys that the camera device has available |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 1604 | * to use with {@link android.hardware.camera2.CaptureRequest }.</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1605 | * <p>Attempting to set a key into a CaptureRequest that is not |
| 1606 | * listed here will result in an invalid request and will be rejected |
| 1607 | * by the camera device.</p> |
| 1608 | * <p>This field can be used to query the feature set of a camera device |
| 1609 | * at a more granular level than capabilities. This is especially |
| 1610 | * important for optional keys that are not listed under any capability |
| 1611 | * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1612 | * <p>This key is available on all devices.</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1613 | * |
| 1614 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 1615 | * @hide |
| 1616 | */ |
| 1617 | public static final Key<int[]> REQUEST_AVAILABLE_REQUEST_KEYS = |
| 1618 | new Key<int[]>("android.request.availableRequestKeys", int[].class); |
| 1619 | |
| 1620 | /** |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 1621 | * <p>A list of all keys that the camera device has available to use with {@link android.hardware.camera2.CaptureResult }.</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1622 | * <p>Attempting to get a key from a CaptureResult that is not |
| 1623 | * listed here will always return a <code>null</code> value. Getting a key from |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1624 | * a CaptureResult that is listed here will generally never return a <code>null</code> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1625 | * value.</p> |
| 1626 | * <p>The following keys may return <code>null</code> unless they are enabled:</p> |
| 1627 | * <ul> |
Ruben Brunk | 5749368 | 2014-05-27 18:58:08 -0700 | [diff] [blame] | 1628 | * <li>android.statistics.lensShadingMap (non-null iff {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON)</li> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1629 | * </ul> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1630 | * <p>(Those sometimes-null keys will nevertheless be listed here |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1631 | * if they are available.)</p> |
| 1632 | * <p>This field can be used to query the feature set of a camera device |
| 1633 | * at a more granular level than capabilities. This is especially |
| 1634 | * important for optional keys that are not listed under any capability |
| 1635 | * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1636 | * <p>This key is available on all devices.</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1637 | * |
| 1638 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1639 | * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE |
| 1640 | * @hide |
| 1641 | */ |
| 1642 | public static final Key<int[]> REQUEST_AVAILABLE_RESULT_KEYS = |
| 1643 | new Key<int[]>("android.request.availableResultKeys", int[].class); |
| 1644 | |
| 1645 | /** |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 1646 | * <p>A list of all keys that the camera device has available to use with {@link android.hardware.camera2.CameraCharacteristics }.</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1647 | * <p>This entry follows the same rules as |
| 1648 | * android.request.availableResultKeys (except that it applies for |
| 1649 | * CameraCharacteristics instead of CaptureResult). See above for more |
| 1650 | * details.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1651 | * <p>This key is available on all devices.</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1652 | * @hide |
| 1653 | */ |
| 1654 | public static final Key<int[]> REQUEST_AVAILABLE_CHARACTERISTICS_KEYS = |
| 1655 | new Key<int[]>("android.request.availableCharacteristicsKeys", int[].class); |
| 1656 | |
| 1657 | /** |
Emilian Peev | 75a5570 | 2017-11-07 16:09:59 +0000 | [diff] [blame] | 1658 | * <p>A subset of the available request keys that the camera device |
| 1659 | * can pass as part of the capture session initialization.</p> |
| 1660 | * <p>This is a subset of android.request.availableRequestKeys which |
| 1661 | * contains a list of keys that are difficult to apply per-frame and |
| 1662 | * can result in unexpected delays when modified during the capture session |
| 1663 | * lifetime. Typical examples include parameters that require a |
| 1664 | * time-consuming hardware re-configuration or internal camera pipeline |
| 1665 | * change. For performance reasons we advise clients to pass their initial |
Chien-Yu Chen | a1d1d5b | 2018-01-03 12:14:53 -0800 | [diff] [blame] | 1666 | * values as part of |
Eino-Ville Talvala | ec99efa | 2017-11-29 15:35:42 -0800 | [diff] [blame] | 1667 | * {@link SessionConfiguration#setSessionParameters }. |
Chien-Yu Chen | a1d1d5b | 2018-01-03 12:14:53 -0800 | [diff] [blame] | 1668 | * Once the camera capture session is enabled it is also recommended to avoid |
Emilian Peev | 75a5570 | 2017-11-07 16:09:59 +0000 | [diff] [blame] | 1669 | * changing them from their initial values set in |
| 1670 | * {@link SessionConfiguration#setSessionParameters }. |
| 1671 | * Control over session parameters can still be exerted in capture requests |
| 1672 | * but clients should be aware and expect delays during their application. |
| 1673 | * An example usage scenario could look like this:</p> |
| 1674 | * <ul> |
| 1675 | * <li>The camera client starts by quering the session parameter key list via |
| 1676 | * {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys }.</li> |
| 1677 | * <li>Before triggering the capture session create sequence, a capture request |
Chien-Yu Chen | a1d1d5b | 2018-01-03 12:14:53 -0800 | [diff] [blame] | 1678 | * must be built via |
| 1679 | * {@link CameraDevice#createCaptureRequest } |
| 1680 | * using an appropriate template matching the particular use case.</li> |
Emilian Peev | 75a5570 | 2017-11-07 16:09:59 +0000 | [diff] [blame] | 1681 | * <li>The client should go over the list of session parameters and check |
| 1682 | * whether some of the keys listed matches with the parameters that |
| 1683 | * they intend to modify as part of the first capture request.</li> |
| 1684 | * <li>If there is no such match, the capture request can be passed |
Chien-Yu Chen | a1d1d5b | 2018-01-03 12:14:53 -0800 | [diff] [blame] | 1685 | * unmodified to |
| 1686 | * {@link SessionConfiguration#setSessionParameters }.</li> |
Emilian Peev | 75a5570 | 2017-11-07 16:09:59 +0000 | [diff] [blame] | 1687 | * <li>If matches do exist, the client should update the respective values |
Chien-Yu Chen | a1d1d5b | 2018-01-03 12:14:53 -0800 | [diff] [blame] | 1688 | * and pass the request to |
| 1689 | * {@link SessionConfiguration#setSessionParameters }.</li> |
Emilian Peev | 75a5570 | 2017-11-07 16:09:59 +0000 | [diff] [blame] | 1690 | * <li>After the capture session initialization completes the session parameter |
| 1691 | * key list can continue to serve as reference when posting or updating |
| 1692 | * further requests. As mentioned above further changes to session |
| 1693 | * parameters should ideally be avoided, if updates are necessary |
| 1694 | * however clients could expect a delay/glitch during the |
| 1695 | * parameter switch.</li> |
| 1696 | * </ul> |
| 1697 | * <p>This key is available on all devices.</p> |
| 1698 | * @hide |
| 1699 | */ |
| 1700 | public static final Key<int[]> REQUEST_AVAILABLE_SESSION_KEYS = |
| 1701 | new Key<int[]>("android.request.availableSessionKeys", int[].class); |
| 1702 | |
| 1703 | /** |
Zhijun He | f3b16df | 2014-01-17 13:37:59 -0800 | [diff] [blame] | 1704 | * <p>The list of image formats that are supported by this |
Igor Murashkin | 418f6df | 2014-02-07 18:20:48 -0800 | [diff] [blame] | 1705 | * camera device for output streams.</p> |
Zhijun He | f3b16df | 2014-01-17 13:37:59 -0800 | [diff] [blame] | 1706 | * <p>All camera devices will support JPEG and YUV_420_888 formats.</p> |
| 1707 | * <p>When set to YUV_420_888, application can access the YUV420 data directly.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1708 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1709 | * @deprecated |
| 1710 | * @hide |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1711 | */ |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1712 | @Deprecated |
Igor Murashkin | b519cc5 | 2013-07-02 11:23:44 -0700 | [diff] [blame] | 1713 | public static final Key<int[]> SCALER_AVAILABLE_FORMATS = |
| 1714 | new Key<int[]>("android.scaler.availableFormats", int[].class); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1715 | |
| 1716 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1717 | * <p>The minimum frame duration that is supported |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1718 | * for each resolution in android.scaler.availableJpegSizes.</p> |
Igor Murashkin | 143aa0b | 2014-01-17 15:02:34 -0800 | [diff] [blame] | 1719 | * <p>This corresponds to the minimum steady-state frame duration when only |
| 1720 | * that JPEG stream is active and captured in a burst, with all |
| 1721 | * processing (typically in android.*.mode) set to FAST.</p> |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1722 | * <p>When multiple streams are configured, the minimum |
| 1723 | * frame duration will be >= max(individual stream min |
| 1724 | * durations)</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1725 | * <p><b>Units</b>: Nanoseconds</p> |
| 1726 | * <p><b>Range of valid values:</b><br> |
| 1727 | * TODO: Remove property.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1728 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1729 | * @deprecated |
| 1730 | * @hide |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1731 | */ |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1732 | @Deprecated |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1733 | public static final Key<long[]> SCALER_AVAILABLE_JPEG_MIN_DURATIONS = |
| 1734 | new Key<long[]>("android.scaler.availableJpegMinDurations", long[].class); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1735 | |
| 1736 | /** |
Zhijun He | f3b16df | 2014-01-17 13:37:59 -0800 | [diff] [blame] | 1737 | * <p>The JPEG resolutions that are supported by this camera device.</p> |
| 1738 | * <p>The resolutions are listed as <code>(width, height)</code> pairs. All camera devices will support |
| 1739 | * sensor maximum resolution (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}).</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1740 | * <p><b>Range of valid values:</b><br> |
| 1741 | * TODO: Remove property.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1742 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Zhijun He | f3b16df | 2014-01-17 13:37:59 -0800 | [diff] [blame] | 1743 | * |
| 1744 | * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1745 | * @deprecated |
| 1746 | * @hide |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1747 | */ |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1748 | @Deprecated |
Igor Murashkin | 72f9f0a | 2014-05-14 15:46:10 -0700 | [diff] [blame] | 1749 | public static final Key<android.util.Size[]> SCALER_AVAILABLE_JPEG_SIZES = |
| 1750 | new Key<android.util.Size[]>("android.scaler.availableJpegSizes", android.util.Size[].class); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1751 | |
| 1752 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1753 | * <p>The maximum ratio between both active area width |
| 1754 | * and crop region width, and active area height and |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1755 | * crop region height, for {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p> |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1756 | * <p>This represents the maximum amount of zooming possible by |
| 1757 | * the camera device, or equivalently, the minimum cropping |
| 1758 | * window size.</p> |
| 1759 | * <p>Crop regions that have a width or height that is smaller |
| 1760 | * than this ratio allows will be rounded up to the minimum |
| 1761 | * allowed size by the camera device.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1762 | * <p><b>Units</b>: Zoom scale factor</p> |
| 1763 | * <p><b>Range of valid values:</b><br> |
| 1764 | * >=1</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1765 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1766 | * |
| 1767 | * @see CaptureRequest#SCALER_CROP_REGION |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1768 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1769 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1770 | public static final Key<Float> SCALER_AVAILABLE_MAX_DIGITAL_ZOOM = |
| 1771 | new Key<Float>("android.scaler.availableMaxDigitalZoom", float.class); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1772 | |
| 1773 | /** |
Igor Murashkin | 143aa0b | 2014-01-17 15:02:34 -0800 | [diff] [blame] | 1774 | * <p>For each available processed output size (defined in |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1775 | * android.scaler.availableProcessedSizes), this property lists the |
Igor Murashkin | 143aa0b | 2014-01-17 15:02:34 -0800 | [diff] [blame] | 1776 | * minimum supportable frame duration for that size.</p> |
| 1777 | * <p>This should correspond to the frame duration when only that processed |
| 1778 | * stream is active, with all processing (typically in android.*.mode) |
| 1779 | * set to FAST.</p> |
| 1780 | * <p>When multiple streams are configured, the minimum frame duration will |
| 1781 | * be >= max(individual stream min durations).</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1782 | * <p><b>Units</b>: Nanoseconds</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1783 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1784 | * @deprecated |
| 1785 | * @hide |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1786 | */ |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1787 | @Deprecated |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1788 | public static final Key<long[]> SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS = |
| 1789 | new Key<long[]>("android.scaler.availableProcessedMinDurations", long[].class); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1790 | |
| 1791 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1792 | * <p>The resolutions available for use with |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1793 | * processed output streams, such as YV12, NV12, and |
| 1794 | * platform opaque YUV/RGB streams to the GPU or video |
Zhijun He | f3b16df | 2014-01-17 13:37:59 -0800 | [diff] [blame] | 1795 | * encoders.</p> |
| 1796 | * <p>The resolutions are listed as <code>(width, height)</code> pairs.</p> |
| 1797 | * <p>For a given use case, the actual maximum supported resolution |
| 1798 | * may be lower than what is listed here, depending on the destination |
| 1799 | * Surface for the image data. For example, for recording video, |
| 1800 | * the video encoder chosen may have a maximum size limit (e.g. 1080p) |
| 1801 | * smaller than what the camera (e.g. maximum resolution is 3264x2448) |
| 1802 | * can provide.</p> |
| 1803 | * <p>Please reference the documentation for the image data destination to |
| 1804 | * check if it limits the maximum size for image data.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1805 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1806 | * @deprecated |
| 1807 | * @hide |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1808 | */ |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1809 | @Deprecated |
Igor Murashkin | 72f9f0a | 2014-05-14 15:46:10 -0700 | [diff] [blame] | 1810 | public static final Key<android.util.Size[]> SCALER_AVAILABLE_PROCESSED_SIZES = |
| 1811 | new Key<android.util.Size[]>("android.scaler.availableProcessedSizes", android.util.Size[].class); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1812 | |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1813 | /** |
Igor Murashkin | 418f6df | 2014-02-07 18:20:48 -0800 | [diff] [blame] | 1814 | * <p>The mapping of image formats that are supported by this |
| 1815 | * camera device for input streams, to their corresponding output formats.</p> |
| 1816 | * <p>All camera devices with at least 1 |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 1817 | * {@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} will have at least one |
Igor Murashkin | 418f6df | 2014-02-07 18:20:48 -0800 | [diff] [blame] | 1818 | * available input format.</p> |
| 1819 | * <p>The camera device will support the following map of formats, |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 1820 | * if its dependent capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}) is supported:</p> |
Igor Murashkin | 418f6df | 2014-02-07 18:20:48 -0800 | [diff] [blame] | 1821 | * <table> |
| 1822 | * <thead> |
| 1823 | * <tr> |
| 1824 | * <th align="left">Input Format</th> |
| 1825 | * <th align="left">Output Format</th> |
| 1826 | * <th align="left">Capability</th> |
| 1827 | * </tr> |
| 1828 | * </thead> |
| 1829 | * <tbody> |
| 1830 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 1831 | * <td align="left">{@link android.graphics.ImageFormat#PRIVATE }</td> |
| 1832 | * <td align="left">{@link android.graphics.ImageFormat#JPEG }</td> |
Chien-Yu Chen | 8062d31 | 2015-05-12 14:24:10 -0700 | [diff] [blame] | 1833 | * <td align="left">PRIVATE_REPROCESSING</td> |
Igor Murashkin | 418f6df | 2014-02-07 18:20:48 -0800 | [diff] [blame] | 1834 | * </tr> |
| 1835 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 1836 | * <td align="left">{@link android.graphics.ImageFormat#PRIVATE }</td> |
| 1837 | * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td> |
Chien-Yu Chen | 8062d31 | 2015-05-12 14:24:10 -0700 | [diff] [blame] | 1838 | * <td align="left">PRIVATE_REPROCESSING</td> |
Igor Murashkin | 418f6df | 2014-02-07 18:20:48 -0800 | [diff] [blame] | 1839 | * </tr> |
| 1840 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 1841 | * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td> |
| 1842 | * <td align="left">{@link android.graphics.ImageFormat#JPEG }</td> |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 1843 | * <td align="left">YUV_REPROCESSING</td> |
| 1844 | * </tr> |
| 1845 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 1846 | * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td> |
| 1847 | * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td> |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 1848 | * <td align="left">YUV_REPROCESSING</td> |
Igor Murashkin | 418f6df | 2014-02-07 18:20:48 -0800 | [diff] [blame] | 1849 | * </tr> |
| 1850 | * </tbody> |
| 1851 | * </table> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 1852 | * <p>PRIVATE refers to a device-internal format that is not directly application-visible. A |
Chien-Yu Chen | 8062d31 | 2015-05-12 14:24:10 -0700 | [diff] [blame] | 1853 | * PRIVATE input surface can be acquired by {@link android.media.ImageReader#newInstance } |
| 1854 | * with {@link android.graphics.ImageFormat#PRIVATE } as the format.</p> |
| 1855 | * <p>For a PRIVATE_REPROCESSING-capable camera device, using the PRIVATE format as either input |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 1856 | * or output will never hurt maximum frame rate (i.e. {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration getOutputStallDuration(ImageFormat.PRIVATE, size)} is always 0),</p> |
Igor Murashkin | 418f6df | 2014-02-07 18:20:48 -0800 | [diff] [blame] | 1857 | * <p>Attempting to configure an input stream with output streams not |
| 1858 | * listed as available in this map is not valid.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1859 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1860 | * |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 1861 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 1862 | * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1863 | * @hide |
Igor Murashkin | 418f6df | 2014-02-07 18:20:48 -0800 | [diff] [blame] | 1864 | */ |
Chien-Yu Chen | 0a551f1 | 2015-04-03 17:57:35 -0700 | [diff] [blame] | 1865 | public static final Key<android.hardware.camera2.params.ReprocessFormatsMap> SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP = |
| 1866 | new Key<android.hardware.camera2.params.ReprocessFormatsMap>("android.scaler.availableInputOutputFormatsMap", android.hardware.camera2.params.ReprocessFormatsMap.class); |
Igor Murashkin | 418f6df | 2014-02-07 18:20:48 -0800 | [diff] [blame] | 1867 | |
| 1868 | /** |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 1869 | * <p>The available stream configurations that this |
| 1870 | * camera device supports |
| 1871 | * (i.e. format, width, height, output/input stream).</p> |
| 1872 | * <p>The configurations are listed as <code>(format, width, height, input?)</code> |
| 1873 | * tuples.</p> |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 1874 | * <p>For a given use case, the actual maximum supported resolution |
| 1875 | * may be lower than what is listed here, depending on the destination |
| 1876 | * Surface for the image data. For example, for recording video, |
| 1877 | * the video encoder chosen may have a maximum size limit (e.g. 1080p) |
| 1878 | * smaller than what the camera (e.g. maximum resolution is 3264x2448) |
| 1879 | * can provide.</p> |
| 1880 | * <p>Please reference the documentation for the image data destination to |
| 1881 | * check if it limits the maximum size for image data.</p> |
| 1882 | * <p>Not all output formats may be supported in a configuration with |
| 1883 | * an input stream of a particular format. For more details, see |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1884 | * android.scaler.availableInputOutputFormatsMap.</p> |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 1885 | * <p>The following table describes the minimum required output stream |
| 1886 | * configurations based on the hardware level |
| 1887 | * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p> |
| 1888 | * <table> |
| 1889 | * <thead> |
| 1890 | * <tr> |
| 1891 | * <th align="center">Format</th> |
| 1892 | * <th align="center">Size</th> |
| 1893 | * <th align="center">Hardware Level</th> |
| 1894 | * <th align="center">Notes</th> |
| 1895 | * </tr> |
| 1896 | * </thead> |
| 1897 | * <tbody> |
| 1898 | * <tr> |
| 1899 | * <td align="center">JPEG</td> |
| 1900 | * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td> |
| 1901 | * <td align="center">Any</td> |
| 1902 | * <td align="center"></td> |
| 1903 | * </tr> |
| 1904 | * <tr> |
| 1905 | * <td align="center">JPEG</td> |
| 1906 | * <td align="center">1920x1080 (1080p)</td> |
| 1907 | * <td align="center">Any</td> |
| 1908 | * <td align="center">if 1080p <= activeArraySize</td> |
| 1909 | * </tr> |
| 1910 | * <tr> |
| 1911 | * <td align="center">JPEG</td> |
| 1912 | * <td align="center">1280x720 (720)</td> |
| 1913 | * <td align="center">Any</td> |
| 1914 | * <td align="center">if 720p <= activeArraySize</td> |
| 1915 | * </tr> |
| 1916 | * <tr> |
| 1917 | * <td align="center">JPEG</td> |
| 1918 | * <td align="center">640x480 (480p)</td> |
| 1919 | * <td align="center">Any</td> |
| 1920 | * <td align="center">if 480p <= activeArraySize</td> |
| 1921 | * </tr> |
| 1922 | * <tr> |
| 1923 | * <td align="center">JPEG</td> |
| 1924 | * <td align="center">320x240 (240p)</td> |
| 1925 | * <td align="center">Any</td> |
| 1926 | * <td align="center">if 240p <= activeArraySize</td> |
| 1927 | * </tr> |
| 1928 | * <tr> |
| 1929 | * <td align="center">YUV_420_888</td> |
| 1930 | * <td align="center">all output sizes available for JPEG</td> |
| 1931 | * <td align="center">FULL</td> |
| 1932 | * <td align="center"></td> |
| 1933 | * </tr> |
| 1934 | * <tr> |
| 1935 | * <td align="center">YUV_420_888</td> |
| 1936 | * <td align="center">all output sizes available for JPEG, up to the maximum video size</td> |
| 1937 | * <td align="center">LIMITED</td> |
| 1938 | * <td align="center"></td> |
| 1939 | * </tr> |
| 1940 | * <tr> |
| 1941 | * <td align="center">IMPLEMENTATION_DEFINED</td> |
| 1942 | * <td align="center">same as YUV_420_888</td> |
| 1943 | * <td align="center">Any</td> |
| 1944 | * <td align="center"></td> |
| 1945 | * </tr> |
| 1946 | * </tbody> |
| 1947 | * </table> |
| 1948 | * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional |
| 1949 | * mandatory stream configurations on a per-capability basis.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1950 | * <p>This key is available on all devices.</p> |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 1951 | * |
| 1952 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
| 1953 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 1954 | * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1955 | * @hide |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 1956 | */ |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1957 | public static final Key<android.hardware.camera2.params.StreamConfiguration[]> SCALER_AVAILABLE_STREAM_CONFIGURATIONS = |
| 1958 | new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.scaler.availableStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class); |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 1959 | |
| 1960 | /** |
| 1961 | * <p>This lists the minimum frame duration for each |
| 1962 | * format/size combination.</p> |
| 1963 | * <p>This should correspond to the frame duration when only that |
| 1964 | * stream is active, with all processing (typically in android.*.mode) |
| 1965 | * set to either OFF or FAST.</p> |
| 1966 | * <p>When multiple streams are used in a request, the minimum frame |
| 1967 | * duration will be max(individual stream min durations).</p> |
| 1968 | * <p>The minimum frame duration of a stream (of a particular format, size) |
| 1969 | * is the same regardless of whether the stream is input or output.</p> |
| 1970 | * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1971 | * android.scaler.availableStallDurations for more details about |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 1972 | * calculating the max frame rate.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1973 | * <p><b>Units</b>: (format, width, height, ns) x n</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1974 | * <p>This key is available on all devices.</p> |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 1975 | * |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 1976 | * @see CaptureRequest#SENSOR_FRAME_DURATION |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1977 | * @hide |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 1978 | */ |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1979 | public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_MIN_FRAME_DURATIONS = |
| 1980 | new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 1981 | |
| 1982 | /** |
| 1983 | * <p>This lists the maximum stall duration for each |
Zhijun He | 513f7c3 | 2015-04-24 18:23:54 -0700 | [diff] [blame] | 1984 | * output format/size combination.</p> |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 1985 | * <p>A stall duration is how much extra time would get added |
| 1986 | * to the normal minimum frame duration for a repeating request |
| 1987 | * that has streams with non-zero stall.</p> |
| 1988 | * <p>For example, consider JPEG captures which have the following |
| 1989 | * characteristics:</p> |
| 1990 | * <ul> |
| 1991 | * <li>JPEG streams act like processed YUV streams in requests for which |
| 1992 | * they are not included; in requests in which they are directly |
| 1993 | * referenced, they act as JPEG streams. This is because supporting a |
| 1994 | * JPEG stream requires the underlying YUV data to always be ready for |
| 1995 | * use by a JPEG encoder, but the encoder will only be used (and impact |
| 1996 | * frame duration) on requests that actually reference a JPEG stream.</li> |
| 1997 | * <li>The JPEG processor can run concurrently to the rest of the camera |
| 1998 | * pipeline, but cannot process more than 1 capture at a time.</li> |
| 1999 | * </ul> |
| 2000 | * <p>In other words, using a repeating YUV request would result |
| 2001 | * in a steady frame rate (let's say it's 30 FPS). If a single |
| 2002 | * JPEG request is submitted periodically, the frame rate will stay |
| 2003 | * at 30 FPS (as long as we wait for the previous JPEG to return each |
| 2004 | * time). If we try to submit a repeating YUV + JPEG request, then |
| 2005 | * the frame rate will drop from 30 FPS.</p> |
| 2006 | * <p>In general, submitting a new request with a non-0 stall time |
| 2007 | * stream will <em>not</em> cause a frame rate drop unless there are still |
| 2008 | * outstanding buffers for that stream from previous requests.</p> |
| 2009 | * <p>Submitting a repeating request with streams (call this <code>S</code>) |
| 2010 | * is the same as setting the minimum frame duration from |
| 2011 | * the normal minimum frame duration corresponding to <code>S</code>, added with |
| 2012 | * the maximum stall duration for <code>S</code>.</p> |
| 2013 | * <p>If interleaving requests with and without a stall duration, |
| 2014 | * a request will stall by the maximum of the remaining times |
| 2015 | * for each can-stall stream with outstanding buffers.</p> |
| 2016 | * <p>This means that a stalling request will not have an exposure start |
| 2017 | * until the stall has completed.</p> |
| 2018 | * <p>This should correspond to the stall duration when only that stream is |
| 2019 | * active, with all processing (typically in android.*.mode) set to FAST |
| 2020 | * or OFF. Setting any of the processing modes to HIGH_QUALITY |
| 2021 | * effectively results in an indeterminate stall duration for all |
| 2022 | * streams in a request (the regular stall calculation rules are |
| 2023 | * ignored).</p> |
| 2024 | * <p>The following formats may always have a stall duration:</p> |
| 2025 | * <ul> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2026 | * <li>{@link android.graphics.ImageFormat#JPEG }</li> |
| 2027 | * <li>{@link android.graphics.ImageFormat#RAW_SENSOR }</li> |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2028 | * </ul> |
| 2029 | * <p>The following formats will never have a stall duration:</p> |
| 2030 | * <ul> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2031 | * <li>{@link android.graphics.ImageFormat#YUV_420_888 }</li> |
| 2032 | * <li>{@link android.graphics.ImageFormat#RAW10 }</li> |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 2033 | * <li>{@link android.graphics.ImageFormat#RAW12 }</li> |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2034 | * </ul> |
| 2035 | * <p>All other formats may or may not have an allowed stall duration on |
Eino-Ville Talvala | d8fd679 | 2014-02-10 12:41:04 -0800 | [diff] [blame] | 2036 | * a per-capability basis; refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2037 | * for more details.</p> |
| 2038 | * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} for more information about |
| 2039 | * calculating the max frame rate (absent stalls).</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2040 | * <p><b>Units</b>: (format, width, height, ns) x n</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2041 | * <p>This key is available on all devices.</p> |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2042 | * |
Eino-Ville Talvala | d8fd679 | 2014-02-10 12:41:04 -0800 | [diff] [blame] | 2043 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2044 | * @see CaptureRequest#SENSOR_FRAME_DURATION |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2045 | * @hide |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2046 | */ |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2047 | public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_STALL_DURATIONS = |
| 2048 | new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); |
| 2049 | |
| 2050 | /** |
| 2051 | * <p>The available stream configurations that this |
| 2052 | * camera device supports; also includes the minimum frame durations |
| 2053 | * and the stall durations for each format/size combination.</p> |
| 2054 | * <p>All camera devices will support sensor maximum resolution (defined by |
| 2055 | * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) for the JPEG format.</p> |
| 2056 | * <p>For a given use case, the actual maximum supported resolution |
| 2057 | * may be lower than what is listed here, depending on the destination |
| 2058 | * Surface for the image data. For example, for recording video, |
| 2059 | * the video encoder chosen may have a maximum size limit (e.g. 1080p) |
| 2060 | * smaller than what the camera (e.g. maximum resolution is 3264x2448) |
| 2061 | * can provide.</p> |
| 2062 | * <p>Please reference the documentation for the image data destination to |
| 2063 | * check if it limits the maximum size for image data.</p> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2064 | * <p>The following table describes the minimum required output stream |
| 2065 | * configurations based on the hardware level |
| 2066 | * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p> |
| 2067 | * <table> |
| 2068 | * <thead> |
| 2069 | * <tr> |
| 2070 | * <th align="center">Format</th> |
| 2071 | * <th align="center">Size</th> |
| 2072 | * <th align="center">Hardware Level</th> |
| 2073 | * <th align="center">Notes</th> |
| 2074 | * </tr> |
| 2075 | * </thead> |
| 2076 | * <tbody> |
| 2077 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2078 | * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td> |
Yin-Chia Yeh | 5683046 | 2015-07-08 14:26:05 -0700 | [diff] [blame] | 2079 | * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} (*1)</td> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2080 | * <td align="center">Any</td> |
| 2081 | * <td align="center"></td> |
| 2082 | * </tr> |
| 2083 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2084 | * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2085 | * <td align="center">1920x1080 (1080p)</td> |
| 2086 | * <td align="center">Any</td> |
| 2087 | * <td align="center">if 1080p <= activeArraySize</td> |
| 2088 | * </tr> |
| 2089 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2090 | * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td> |
Yin-Chia Yeh | 5683046 | 2015-07-08 14:26:05 -0700 | [diff] [blame] | 2091 | * <td align="center">1280x720 (720p)</td> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2092 | * <td align="center">Any</td> |
| 2093 | * <td align="center">if 720p <= activeArraySize</td> |
| 2094 | * </tr> |
| 2095 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2096 | * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2097 | * <td align="center">640x480 (480p)</td> |
| 2098 | * <td align="center">Any</td> |
| 2099 | * <td align="center">if 480p <= activeArraySize</td> |
| 2100 | * </tr> |
| 2101 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2102 | * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2103 | * <td align="center">320x240 (240p)</td> |
| 2104 | * <td align="center">Any</td> |
| 2105 | * <td align="center">if 240p <= activeArraySize</td> |
| 2106 | * </tr> |
| 2107 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2108 | * <td align="center">{@link android.graphics.ImageFormat#YUV_420_888 }</td> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2109 | * <td align="center">all output sizes available for JPEG</td> |
| 2110 | * <td align="center">FULL</td> |
| 2111 | * <td align="center"></td> |
| 2112 | * </tr> |
| 2113 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2114 | * <td align="center">{@link android.graphics.ImageFormat#YUV_420_888 }</td> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2115 | * <td align="center">all output sizes available for JPEG, up to the maximum video size</td> |
| 2116 | * <td align="center">LIMITED</td> |
| 2117 | * <td align="center"></td> |
| 2118 | * </tr> |
| 2119 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2120 | * <td align="center">{@link android.graphics.ImageFormat#PRIVATE }</td> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2121 | * <td align="center">same as YUV_420_888</td> |
| 2122 | * <td align="center">Any</td> |
| 2123 | * <td align="center"></td> |
| 2124 | * </tr> |
| 2125 | * </tbody> |
| 2126 | * </table> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2127 | * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} and {@link android.hardware.camera2.CameraDevice#createCaptureSession } for additional mandatory |
| 2128 | * stream configurations on a per-capability basis.</p> |
Yin-Chia Yeh | 5683046 | 2015-07-08 14:26:05 -0700 | [diff] [blame] | 2129 | * <p>*1: For JPEG format, the sizes may be restricted by below conditions:</p> |
| 2130 | * <ul> |
| 2131 | * <li>The HAL may choose the aspect ratio of each Jpeg size to be one of well known ones |
| 2132 | * (e.g. 4:3, 16:9, 3:2 etc.). If the sensor maximum resolution |
| 2133 | * (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) has an aspect ratio other than these, |
| 2134 | * it does not have to be included in the supported JPEG sizes.</li> |
| 2135 | * <li>Some hardware JPEG encoders may have pixel boundary alignment requirements, such as |
| 2136 | * the dimensions being a multiple of 16. |
| 2137 | * Therefore, the maximum JPEG size may be smaller than sensor maximum resolution. |
| 2138 | * However, the largest JPEG size will be as close as possible to the sensor maximum |
| 2139 | * resolution given above constraints. It is required that after aspect ratio adjustments, |
| 2140 | * additional size reduction due to other issues must be less than 3% in area. For example, |
| 2141 | * if the sensor maximum resolution is 3280x2464, if the maximum JPEG size has aspect |
| 2142 | * ratio 4:3, and the JPEG encoder alignment requirement is 16, the maximum JPEG size will be |
| 2143 | * 3264x2448.</li> |
| 2144 | * </ul> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2145 | * <p>This key is available on all devices.</p> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2146 | * |
| 2147 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
| 2148 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 2149 | * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE |
| 2150 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2151 | @PublicKey |
| 2152 | @SyntheticKey |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2153 | public static final Key<android.hardware.camera2.params.StreamConfigurationMap> SCALER_STREAM_CONFIGURATION_MAP = |
| 2154 | new Key<android.hardware.camera2.params.StreamConfigurationMap>("android.scaler.streamConfigurationMap", android.hardware.camera2.params.StreamConfigurationMap.class); |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2155 | |
| 2156 | /** |
Zhijun He | 1498615 | 2014-05-22 21:17:37 -0700 | [diff] [blame] | 2157 | * <p>The crop type that this camera device supports.</p> |
| 2158 | * <p>When passing a non-centered crop region ({@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}) to a camera |
| 2159 | * device that only supports CENTER_ONLY cropping, the camera device will move the |
| 2160 | * crop region to the center of the sensor active array ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) |
| 2161 | * and keep the crop region width and height unchanged. The camera device will return the |
| 2162 | * final used crop region in metadata result {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p> |
| 2163 | * <p>Camera devices that support FREEFORM cropping will support any crop region that |
| 2164 | * is inside of the active array. The camera device will apply the same crop region and |
| 2165 | * return the final used crop region in capture result metadata {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p> |
Eino-Ville Talvala | 81e8928 | 2015-06-30 16:34:24 -0700 | [diff] [blame] | 2166 | * <p>LEGACY capability devices will only support CENTER_ONLY cropping.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2167 | * <p><b>Possible values:</b> |
| 2168 | * <ul> |
| 2169 | * <li>{@link #SCALER_CROPPING_TYPE_CENTER_ONLY CENTER_ONLY}</li> |
| 2170 | * <li>{@link #SCALER_CROPPING_TYPE_FREEFORM FREEFORM}</li> |
| 2171 | * </ul></p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2172 | * <p>This key is available on all devices.</p> |
Zhijun He | 1498615 | 2014-05-22 21:17:37 -0700 | [diff] [blame] | 2173 | * |
Zhijun He | 1498615 | 2014-05-22 21:17:37 -0700 | [diff] [blame] | 2174 | * @see CaptureRequest#SCALER_CROP_REGION |
| 2175 | * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE |
| 2176 | * @see #SCALER_CROPPING_TYPE_CENTER_ONLY |
| 2177 | * @see #SCALER_CROPPING_TYPE_FREEFORM |
| 2178 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2179 | @PublicKey |
Zhijun He | 1498615 | 2014-05-22 21:17:37 -0700 | [diff] [blame] | 2180 | public static final Key<Integer> SCALER_CROPPING_TYPE = |
| 2181 | new Key<Integer>("android.scaler.croppingType", int.class); |
| 2182 | |
| 2183 | /** |
Ruben Brunk | 224eb3a | 2015-06-15 17:32:06 -0700 | [diff] [blame] | 2184 | * <p>The area of the image sensor which corresponds to active pixels after any geometric |
| 2185 | * distortion correction has been applied.</p> |
| 2186 | * <p>This is the rectangle representing the size of the active region of the sensor (i.e. |
| 2187 | * the region that actually receives light from the scene) after any geometric correction |
| 2188 | * has been applied, and should be treated as the maximum size in pixels of any of the |
| 2189 | * image output formats aside from the raw formats.</p> |
| 2190 | * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of |
| 2191 | * the full pixel array, and the size of the full pixel array is given by |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2192 | * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p> |
Ruben Brunk | 224eb3a | 2015-06-15 17:32:06 -0700 | [diff] [blame] | 2193 | * <p>The coordinate system for most other keys that list pixel coordinates, including |
| 2194 | * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, is defined relative to the active array rectangle given in |
| 2195 | * this field, with <code>(0, 0)</code> being the top-left of this rectangle.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2196 | * <p>The active array may be smaller than the full pixel array, since the full array may |
Ruben Brunk | 224eb3a | 2015-06-15 17:32:06 -0700 | [diff] [blame] | 2197 | * include black calibration pixels or other inactive regions, and geometric correction |
| 2198 | * resulting in scaling or cropping may have been applied.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2199 | * <p><b>Units</b>: Pixel coordinates on the image sensor</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2200 | * <p>This key is available on all devices.</p> |
| 2201 | * |
Ruben Brunk | 224eb3a | 2015-06-15 17:32:06 -0700 | [diff] [blame] | 2202 | * @see CaptureRequest#SCALER_CROP_REGION |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2203 | * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2204 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2205 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2206 | public static final Key<android.graphics.Rect> SENSOR_INFO_ACTIVE_ARRAY_SIZE = |
| 2207 | new Key<android.graphics.Rect>("android.sensor.info.activeArraySize", android.graphics.Rect.class); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 2208 | |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2209 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2210 | * <p>Range of sensitivities for {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} supported by this |
| 2211 | * camera device.</p> |
Eino-Ville Talvala | b67a3b3 | 2014-06-06 13:07:20 -0700 | [diff] [blame] | 2212 | * <p>The values are the standard ISO sensitivity values, |
| 2213 | * as defined in ISO 12232:2006.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2214 | * <p><b>Range of valid values:</b><br> |
| 2215 | * Min <= 100, Max >= 800</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2216 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2217 | * <p><b>Full capability</b> - |
| 2218 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 2219 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Eino-Ville Talvala | b67a3b3 | 2014-06-06 13:07:20 -0700 | [diff] [blame] | 2220 | * |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2221 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Eino-Ville Talvala | b67a3b3 | 2014-06-06 13:07:20 -0700 | [diff] [blame] | 2222 | * @see CaptureRequest#SENSOR_SENSITIVITY |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2223 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2224 | @PublicKey |
Ruben Brunk | 5749368 | 2014-05-27 18:58:08 -0700 | [diff] [blame] | 2225 | public static final Key<android.util.Range<Integer>> SENSOR_INFO_SENSITIVITY_RANGE = |
| 2226 | new Key<android.util.Range<Integer>>("android.sensor.info.sensitivityRange", new TypeReference<android.util.Range<Integer>>() {{ }}); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2227 | |
| 2228 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2229 | * <p>The arrangement of color filters on sensor; |
Zhijun He | d178496 | 2014-04-08 17:41:46 -0700 | [diff] [blame] | 2230 | * represents the colors in the top-left 2x2 section of |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2231 | * the sensor, in reading order.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2232 | * <p><b>Possible values:</b> |
| 2233 | * <ul> |
| 2234 | * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB RGGB}</li> |
| 2235 | * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG GRBG}</li> |
| 2236 | * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG GBRG}</li> |
| 2237 | * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR BGGR}</li> |
| 2238 | * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB RGB}</li> |
| 2239 | * </ul></p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2240 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2241 | * <p><b>Full capability</b> - |
| 2242 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 2243 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 2244 | * |
| 2245 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Zhijun He | d178496 | 2014-04-08 17:41:46 -0700 | [diff] [blame] | 2246 | * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB |
| 2247 | * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG |
| 2248 | * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG |
| 2249 | * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR |
| 2250 | * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB |
| 2251 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2252 | @PublicKey |
Zhijun He | d178496 | 2014-04-08 17:41:46 -0700 | [diff] [blame] | 2253 | public static final Key<Integer> SENSOR_INFO_COLOR_FILTER_ARRANGEMENT = |
| 2254 | new Key<Integer>("android.sensor.info.colorFilterArrangement", int.class); |
| 2255 | |
| 2256 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2257 | * <p>The range of image exposure times for {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} supported |
| 2258 | * by this camera device.</p> |
| 2259 | * <p><b>Units</b>: Nanoseconds</p> |
| 2260 | * <p><b>Range of valid values:</b><br> |
| 2261 | * The minimum exposure time will be less than 100 us. For FULL |
Zhijun He | 28288ca | 2014-06-25 15:49:13 -0700 | [diff] [blame] | 2262 | * capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL), |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2263 | * the maximum exposure time will be greater than 100ms.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2264 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2265 | * <p><b>Full capability</b> - |
| 2266 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 2267 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Igor Murashkin | 6b7ddc4 | 2014-02-03 14:39:19 -0800 | [diff] [blame] | 2268 | * |
Zhijun He | 28288ca | 2014-06-25 15:49:13 -0700 | [diff] [blame] | 2269 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Igor Murashkin | 6b7ddc4 | 2014-02-03 14:39:19 -0800 | [diff] [blame] | 2270 | * @see CaptureRequest#SENSOR_EXPOSURE_TIME |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2271 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2272 | @PublicKey |
Ruben Brunk | 5749368 | 2014-05-27 18:58:08 -0700 | [diff] [blame] | 2273 | public static final Key<android.util.Range<Long>> SENSOR_INFO_EXPOSURE_TIME_RANGE = |
| 2274 | new Key<android.util.Range<Long>>("android.sensor.info.exposureTimeRange", new TypeReference<android.util.Range<Long>>() {{ }}); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2275 | |
| 2276 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2277 | * <p>The maximum possible frame duration (minimum frame rate) for |
| 2278 | * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} that is supported this camera device.</p> |
| 2279 | * <p>Attempting to use frame durations beyond the maximum will result in the frame |
| 2280 | * duration being clipped to the maximum. See that control for a full definition of frame |
| 2281 | * durations.</p> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2282 | * <p>Refer to {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration } |
| 2283 | * for the minimum frame duration values.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2284 | * <p><b>Units</b>: Nanoseconds</p> |
| 2285 | * <p><b>Range of valid values:</b><br> |
| 2286 | * For FULL capability devices |
| 2287 | * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL), at least 100ms.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2288 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2289 | * <p><b>Full capability</b> - |
| 2290 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 2291 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Igor Murashkin | 6b7ddc4 | 2014-02-03 14:39:19 -0800 | [diff] [blame] | 2292 | * |
Zhijun He | 28288ca | 2014-06-25 15:49:13 -0700 | [diff] [blame] | 2293 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Eino-Ville Talvala | d8fd679 | 2014-02-10 12:41:04 -0800 | [diff] [blame] | 2294 | * @see CaptureRequest#SENSOR_FRAME_DURATION |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2295 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2296 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2297 | public static final Key<Long> SENSOR_INFO_MAX_FRAME_DURATION = |
| 2298 | new Key<Long>("android.sensor.info.maxFrameDuration", long.class); |
| 2299 | |
| 2300 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 2301 | * <p>The physical dimensions of the full pixel |
Eino-Ville Talvala | b67a3b3 | 2014-06-06 13:07:20 -0700 | [diff] [blame] | 2302 | * array.</p> |
| 2303 | * <p>This is the physical size of the sensor pixel |
| 2304 | * array defined by {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2305 | * <p><b>Units</b>: Millimeters</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2306 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | b67a3b3 | 2014-06-06 13:07:20 -0700 | [diff] [blame] | 2307 | * |
| 2308 | * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2309 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2310 | @PublicKey |
Yin-Chia Yeh | 8490ace | 2014-05-27 10:04:54 -0700 | [diff] [blame] | 2311 | public static final Key<android.util.SizeF> SENSOR_INFO_PHYSICAL_SIZE = |
| 2312 | new Key<android.util.SizeF>("android.sensor.info.physicalSize", android.util.SizeF.class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2313 | |
| 2314 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2315 | * <p>Dimensions of the full pixel array, possibly |
Ruben Brunk | eba1b3a | 2014-02-07 18:23:50 -0800 | [diff] [blame] | 2316 | * including black calibration pixels.</p> |
Ruben Brunk | 224eb3a | 2015-06-15 17:32:06 -0700 | [diff] [blame] | 2317 | * <p>The pixel count of the full pixel array of the image sensor, which covers |
| 2318 | * {@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize} area. This represents the full pixel dimensions of |
| 2319 | * the raw buffers produced by this sensor.</p> |
| 2320 | * <p>If a camera device supports raw sensor formats, either this or |
| 2321 | * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} is the maximum dimensions for the raw |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 2322 | * output formats listed in {@link android.hardware.camera2.params.StreamConfigurationMap } |
| 2323 | * (this depends on whether or not the image sensor returns buffers containing pixels that |
| 2324 | * are not part of the active array region for blacklevel calibration or other purposes).</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2325 | * <p>Some parts of the full pixel array may not receive light from the scene, |
Ruben Brunk | 224eb3a | 2015-06-15 17:32:06 -0700 | [diff] [blame] | 2326 | * or be otherwise inactive. The {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} key |
| 2327 | * defines the rectangle of active pixels that will be included in processed image |
| 2328 | * formats.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2329 | * <p><b>Units</b>: Pixels</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2330 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | b67a3b3 | 2014-06-06 13:07:20 -0700 | [diff] [blame] | 2331 | * |
Eino-Ville Talvala | b67a3b3 | 2014-06-06 13:07:20 -0700 | [diff] [blame] | 2332 | * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE |
Ruben Brunk | 224eb3a | 2015-06-15 17:32:06 -0700 | [diff] [blame] | 2333 | * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE |
Ruben Brunk | eba1b3a | 2014-02-07 18:23:50 -0800 | [diff] [blame] | 2334 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2335 | @PublicKey |
Igor Murashkin | 72f9f0a | 2014-05-14 15:46:10 -0700 | [diff] [blame] | 2336 | public static final Key<android.util.Size> SENSOR_INFO_PIXEL_ARRAY_SIZE = |
| 2337 | new Key<android.util.Size>("android.sensor.info.pixelArraySize", android.util.Size.class); |
Ruben Brunk | eba1b3a | 2014-02-07 18:23:50 -0800 | [diff] [blame] | 2338 | |
| 2339 | /** |
Ruben Brunk | e60e2955 | 2014-02-18 10:44:17 -0800 | [diff] [blame] | 2340 | * <p>Maximum raw value output by sensor.</p> |
| 2341 | * <p>This specifies the fully-saturated encoding level for the raw |
| 2342 | * sample values from the sensor. This is typically caused by the |
| 2343 | * sensor becoming highly non-linear or clipping. The minimum for |
| 2344 | * each channel is specified by the offset in the |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2345 | * {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} key.</p> |
Ruben Brunk | e60e2955 | 2014-02-18 10:44:17 -0800 | [diff] [blame] | 2346 | * <p>The white level is typically determined either by sensor bit depth |
Ruben Brunk | e89b120 | 2014-03-24 17:10:35 -0700 | [diff] [blame] | 2347 | * (8-14 bits is expected), or by the point where the sensor response |
Ruben Brunk | e60e2955 | 2014-02-18 10:44:17 -0800 | [diff] [blame] | 2348 | * becomes too non-linear to be useful. The default value for this is |
| 2349 | * maximum representable value for a 16-bit raw sample (2^16 - 1).</p> |
Zhijun He | cd950b6 | 2015-11-12 17:47:52 -0800 | [diff] [blame] | 2350 | * <p>The white level values of captured images may vary for different |
| 2351 | * capture settings (e.g., {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}). This key |
| 2352 | * represents a coarse approximation for such case. It is recommended |
| 2353 | * to use {@link CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL android.sensor.dynamicWhiteLevel} for captures when supported |
| 2354 | * by the camera device, which provides more accurate white level values.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2355 | * <p><b>Range of valid values:</b><br> |
| 2356 | * > 255 (8-bit output)</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2357 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Ruben Brunk | e60e2955 | 2014-02-18 10:44:17 -0800 | [diff] [blame] | 2358 | * |
| 2359 | * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN |
Zhijun He | cd950b6 | 2015-11-12 17:47:52 -0800 | [diff] [blame] | 2360 | * @see CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL |
| 2361 | * @see CaptureRequest#SENSOR_SENSITIVITY |
Ruben Brunk | e60e2955 | 2014-02-18 10:44:17 -0800 | [diff] [blame] | 2362 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2363 | @PublicKey |
Ruben Brunk | e60e2955 | 2014-02-18 10:44:17 -0800 | [diff] [blame] | 2364 | public static final Key<Integer> SENSOR_INFO_WHITE_LEVEL = |
| 2365 | new Key<Integer>("android.sensor.info.whiteLevel", int.class); |
| 2366 | |
| 2367 | /** |
Eino-Ville Talvala | abd9d3c | 2014-07-28 13:01:52 -0700 | [diff] [blame] | 2368 | * <p>The time base source for sensor capture start timestamps.</p> |
| 2369 | * <p>The timestamps provided for captures are always in nanoseconds and monotonic, but |
| 2370 | * may not based on a time source that can be compared to other system time sources.</p> |
| 2371 | * <p>This characteristic defines the source for the timestamps, and therefore whether they |
| 2372 | * can be compared against other system time sources/timestamps.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2373 | * <p><b>Possible values:</b> |
| 2374 | * <ul> |
| 2375 | * <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN UNKNOWN}</li> |
| 2376 | * <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME REALTIME}</li> |
| 2377 | * </ul></p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2378 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | abd9d3c | 2014-07-28 13:01:52 -0700 | [diff] [blame] | 2379 | * @see #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN |
| 2380 | * @see #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME |
Zhijun He | 45fa43a1 | 2014-06-13 18:29:37 -0700 | [diff] [blame] | 2381 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2382 | @PublicKey |
Eino-Ville Talvala | abd9d3c | 2014-07-28 13:01:52 -0700 | [diff] [blame] | 2383 | public static final Key<Integer> SENSOR_INFO_TIMESTAMP_SOURCE = |
| 2384 | new Key<Integer>("android.sensor.info.timestampSource", int.class); |
Zhijun He | 45fa43a1 | 2014-06-13 18:29:37 -0700 | [diff] [blame] | 2385 | |
| 2386 | /** |
Yin-Chia Yeh | e4aa283 | 2015-02-06 15:15:53 -0800 | [diff] [blame] | 2387 | * <p>Whether the RAW images output from this camera device are subject to |
| 2388 | * lens shading correction.</p> |
| 2389 | * <p>If TRUE, all images produced by the camera device in the RAW image formats will |
| 2390 | * have lens shading correction already applied to it. If FALSE, the images will |
| 2391 | * not be adjusted for lens shading correction. |
| 2392 | * See {@link CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW android.request.maxNumOutputRaw} for a list of RAW image formats.</p> |
| 2393 | * <p>This key will be <code>null</code> for all devices do not report this information. |
| 2394 | * Devices with RAW capability will always report this information in this key.</p> |
| 2395 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2396 | * |
| 2397 | * @see CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW |
| 2398 | */ |
| 2399 | @PublicKey |
| 2400 | public static final Key<Boolean> SENSOR_INFO_LENS_SHADING_APPLIED = |
| 2401 | new Key<Boolean>("android.sensor.info.lensShadingApplied", boolean.class); |
| 2402 | |
| 2403 | /** |
Ruben Brunk | 1b02df4 | 2015-07-01 12:53:45 -0700 | [diff] [blame] | 2404 | * <p>The area of the image sensor which corresponds to active pixels prior to the |
| 2405 | * application of any geometric distortion correction.</p> |
| 2406 | * <p>This is the rectangle representing the size of the active region of the sensor (i.e. |
| 2407 | * the region that actually receives light from the scene) before any geometric correction |
| 2408 | * has been applied, and should be treated as the active region rectangle for any of the |
| 2409 | * raw formats. All metadata associated with raw processing (e.g. the lens shading |
| 2410 | * correction map, and radial distortion fields) treats the top, left of this rectangle as |
| 2411 | * the origin, (0,0).</p> |
| 2412 | * <p>The size of this region determines the maximum field of view and the maximum number of |
| 2413 | * pixels that an image from this sensor can contain, prior to the application of |
| 2414 | * geometric distortion correction. The effective maximum pixel dimensions of a |
| 2415 | * post-distortion-corrected image is given by the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} |
| 2416 | * field, and the effective maximum field of view for a post-distortion-corrected image |
| 2417 | * can be calculated by applying the geometric distortion correction fields to this |
| 2418 | * rectangle, and cropping to the rectangle given in {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p> |
| 2419 | * <p>E.g. to calculate position of a pixel, (x,y), in a processed YUV output image with the |
| 2420 | * dimensions in {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} given the position of a pixel, |
| 2421 | * (x', y'), in the raw pixel array with dimensions give in |
| 2422 | * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}:</p> |
| 2423 | * <ol> |
| 2424 | * <li>Choose a pixel (x', y') within the active array region of the raw buffer given in |
| 2425 | * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}, otherwise this pixel is considered |
| 2426 | * to be outside of the FOV, and will not be shown in the processed output image.</li> |
| 2427 | * <li>Apply geometric distortion correction to get the post-distortion pixel coordinate, |
| 2428 | * (x_i, y_i). When applying geometric correction metadata, note that metadata for raw |
| 2429 | * buffers is defined relative to the top, left of the |
| 2430 | * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} rectangle.</li> |
| 2431 | * <li>If the resulting corrected pixel coordinate is within the region given in |
| 2432 | * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, then the position of this pixel in the |
| 2433 | * processed output image buffer is <code>(x_i - activeArray.left, y_i - activeArray.top)</code>, |
| 2434 | * when the top, left coordinate of that buffer is treated as (0, 0).</li> |
| 2435 | * </ol> |
| 2436 | * <p>Thus, for pixel x',y' = (25, 25) on a sensor where {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize} |
| 2437 | * is (100,100), {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} is (10, 10, 100, 100), |
| 2438 | * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} is (20, 20, 80, 80), and the geometric distortion |
| 2439 | * correction doesn't change the pixel coordinate, the resulting pixel selected in |
| 2440 | * pixel coordinates would be x,y = (25, 25) relative to the top,left of the raw buffer |
| 2441 | * with dimensions given in {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}, and would be (5, 5) |
| 2442 | * relative to the top,left of post-processed YUV output buffer with dimensions given in |
| 2443 | * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p> |
| 2444 | * <p>The currently supported fields that correct for geometric distortion are:</p> |
| 2445 | * <ol> |
Eino-Ville Talvala | abf0b8b | 2015-08-19 16:21:15 -0700 | [diff] [blame] | 2446 | * <li>{@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion}.</li> |
Ruben Brunk | 1b02df4 | 2015-07-01 12:53:45 -0700 | [diff] [blame] | 2447 | * </ol> |
| 2448 | * <p>If all of the geometric distortion fields are no-ops, this rectangle will be the same |
| 2449 | * as the post-distortion-corrected rectangle given in |
| 2450 | * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p> |
| 2451 | * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of |
| 2452 | * the full pixel array, and the size of the full pixel array is given by |
| 2453 | * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p> |
| 2454 | * <p>The pre-correction active array may be smaller than the full pixel array, since the |
| 2455 | * full array may include black calibration pixels or other inactive regions.</p> |
| 2456 | * <p><b>Units</b>: Pixel coordinates on the image sensor</p> |
| 2457 | * <p>This key is available on all devices.</p> |
| 2458 | * |
Eino-Ville Talvala | abf0b8b | 2015-08-19 16:21:15 -0700 | [diff] [blame] | 2459 | * @see CameraCharacteristics#LENS_RADIAL_DISTORTION |
Ruben Brunk | 1b02df4 | 2015-07-01 12:53:45 -0700 | [diff] [blame] | 2460 | * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE |
| 2461 | * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE |
| 2462 | * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE |
| 2463 | */ |
| 2464 | @PublicKey |
| 2465 | public static final Key<android.graphics.Rect> SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE = |
| 2466 | new Key<android.graphics.Rect>("android.sensor.info.preCorrectionActiveArraySize", android.graphics.Rect.class); |
| 2467 | |
| 2468 | /** |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2469 | * <p>The standard reference illuminant used as the scene light source when |
| 2470 | * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1}, |
| 2471 | * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and |
| 2472 | * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} matrices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2473 | * <p>The values in this key correspond to the values defined for the |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2474 | * EXIF LightSource tag. These illuminants are standard light sources |
| 2475 | * that are often used calibrating camera devices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2476 | * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1}, |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2477 | * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and |
| 2478 | * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} will also be present.</p> |
| 2479 | * <p>Some devices may choose to provide a second set of calibration |
| 2480 | * information for improved quality, including |
| 2481 | * {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2} and its corresponding matrices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2482 | * <p><b>Possible values:</b> |
| 2483 | * <ul> |
| 2484 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT DAYLIGHT}</li> |
| 2485 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT FLUORESCENT}</li> |
| 2486 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN TUNGSTEN}</li> |
| 2487 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLASH FLASH}</li> |
| 2488 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER FINE_WEATHER}</li> |
| 2489 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER CLOUDY_WEATHER}</li> |
| 2490 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_SHADE SHADE}</li> |
| 2491 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT DAYLIGHT_FLUORESCENT}</li> |
| 2492 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT DAY_WHITE_FLUORESCENT}</li> |
| 2493 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT COOL_WHITE_FLUORESCENT}</li> |
| 2494 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT WHITE_FLUORESCENT}</li> |
| 2495 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A STANDARD_A}</li> |
| 2496 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B STANDARD_B}</li> |
| 2497 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C STANDARD_C}</li> |
| 2498 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D55 D55}</li> |
| 2499 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D65 D65}</li> |
| 2500 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D75 D75}</li> |
| 2501 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D50 D50}</li> |
| 2502 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN ISO_STUDIO_TUNGSTEN}</li> |
| 2503 | * </ul></p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2504 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2505 | * |
| 2506 | * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 |
| 2507 | * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 |
| 2508 | * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX1 |
| 2509 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 |
| 2510 | * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT |
| 2511 | * @see #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT |
| 2512 | * @see #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN |
| 2513 | * @see #SENSOR_REFERENCE_ILLUMINANT1_FLASH |
| 2514 | * @see #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER |
| 2515 | * @see #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER |
| 2516 | * @see #SENSOR_REFERENCE_ILLUMINANT1_SHADE |
| 2517 | * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT |
| 2518 | * @see #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT |
| 2519 | * @see #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT |
| 2520 | * @see #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT |
| 2521 | * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A |
| 2522 | * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B |
| 2523 | * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C |
| 2524 | * @see #SENSOR_REFERENCE_ILLUMINANT1_D55 |
| 2525 | * @see #SENSOR_REFERENCE_ILLUMINANT1_D65 |
| 2526 | * @see #SENSOR_REFERENCE_ILLUMINANT1_D75 |
| 2527 | * @see #SENSOR_REFERENCE_ILLUMINANT1_D50 |
| 2528 | * @see #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN |
| 2529 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2530 | @PublicKey |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2531 | public static final Key<Integer> SENSOR_REFERENCE_ILLUMINANT1 = |
| 2532 | new Key<Integer>("android.sensor.referenceIlluminant1", int.class); |
| 2533 | |
| 2534 | /** |
| 2535 | * <p>The standard reference illuminant used as the scene light source when |
| 2536 | * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2}, |
| 2537 | * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and |
| 2538 | * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} matrices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2539 | * <p>See {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1} for more details.</p> |
| 2540 | * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2}, |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2541 | * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and |
| 2542 | * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} will also be present.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2543 | * <p><b>Range of valid values:</b><br> |
| 2544 | * Any value listed in {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2545 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2546 | * |
| 2547 | * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 |
| 2548 | * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 |
| 2549 | * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX2 |
| 2550 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 2551 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2552 | @PublicKey |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2553 | public static final Key<Byte> SENSOR_REFERENCE_ILLUMINANT2 = |
| 2554 | new Key<Byte>("android.sensor.referenceIlluminant2", byte.class); |
| 2555 | |
| 2556 | /** |
| 2557 | * <p>A per-device calibration transform matrix that maps from the |
| 2558 | * reference sensor colorspace to the actual device sensor colorspace.</p> |
| 2559 | * <p>This matrix is used to correct for per-device variations in the |
| 2560 | * sensor colorspace, and is used for processing raw buffer data.</p> |
| 2561 | * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and |
| 2562 | * contains a per-device calibration transform that maps colors |
| 2563 | * from reference sensor color space (i.e. the "golden module" |
| 2564 | * colorspace) into this camera device's native sensor color |
| 2565 | * space under the first reference illuminant |
| 2566 | * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p> |
| 2567 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2568 | * |
| 2569 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 2570 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2571 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 2572 | public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM1 = |
| 2573 | new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform1", android.hardware.camera2.params.ColorSpaceTransform.class); |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2574 | |
| 2575 | /** |
| 2576 | * <p>A per-device calibration transform matrix that maps from the |
| 2577 | * reference sensor colorspace to the actual device sensor colorspace |
| 2578 | * (this is the colorspace of the raw buffer data).</p> |
| 2579 | * <p>This matrix is used to correct for per-device variations in the |
| 2580 | * sensor colorspace, and is used for processing raw buffer data.</p> |
| 2581 | * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and |
| 2582 | * contains a per-device calibration transform that maps colors |
| 2583 | * from reference sensor color space (i.e. the "golden module" |
| 2584 | * colorspace) into this camera device's native sensor color |
| 2585 | * space under the second reference illuminant |
| 2586 | * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p> |
| 2587 | * <p>This matrix will only be present if the second reference |
| 2588 | * illuminant is present.</p> |
| 2589 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2590 | * |
| 2591 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 |
| 2592 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2593 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 2594 | public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM2 = |
| 2595 | new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform2", android.hardware.camera2.params.ColorSpaceTransform.class); |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2596 | |
| 2597 | /** |
| 2598 | * <p>A matrix that transforms color values from CIE XYZ color space to |
| 2599 | * reference sensor color space.</p> |
| 2600 | * <p>This matrix is used to convert from the standard CIE XYZ color |
| 2601 | * space to the reference sensor colorspace, and is used when processing |
| 2602 | * raw buffer data.</p> |
| 2603 | * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and |
| 2604 | * contains a color transform matrix that maps colors from the CIE |
| 2605 | * XYZ color space to the reference sensor color space (i.e. the |
| 2606 | * "golden module" colorspace) under the first reference illuminant |
| 2607 | * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p> |
| 2608 | * <p>The white points chosen in both the reference sensor color space |
| 2609 | * and the CIE XYZ colorspace when calculating this transform will |
| 2610 | * match the standard white point for the first reference illuminant |
| 2611 | * (i.e. no chromatic adaptation will be applied by this transform).</p> |
| 2612 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2613 | * |
| 2614 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 2615 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2616 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 2617 | public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM1 = |
| 2618 | new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform1", android.hardware.camera2.params.ColorSpaceTransform.class); |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2619 | |
| 2620 | /** |
| 2621 | * <p>A matrix that transforms color values from CIE XYZ color space to |
| 2622 | * reference sensor color space.</p> |
| 2623 | * <p>This matrix is used to convert from the standard CIE XYZ color |
| 2624 | * space to the reference sensor colorspace, and is used when processing |
| 2625 | * raw buffer data.</p> |
| 2626 | * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and |
| 2627 | * contains a color transform matrix that maps colors from the CIE |
| 2628 | * XYZ color space to the reference sensor color space (i.e. the |
| 2629 | * "golden module" colorspace) under the second reference illuminant |
| 2630 | * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p> |
| 2631 | * <p>The white points chosen in both the reference sensor color space |
| 2632 | * and the CIE XYZ colorspace when calculating this transform will |
| 2633 | * match the standard white point for the second reference illuminant |
| 2634 | * (i.e. no chromatic adaptation will be applied by this transform).</p> |
| 2635 | * <p>This matrix will only be present if the second reference |
| 2636 | * illuminant is present.</p> |
| 2637 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2638 | * |
| 2639 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 |
| 2640 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2641 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 2642 | public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM2 = |
| 2643 | new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform2", android.hardware.camera2.params.ColorSpaceTransform.class); |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2644 | |
| 2645 | /** |
| 2646 | * <p>A matrix that transforms white balanced camera colors from the reference |
| 2647 | * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p> |
| 2648 | * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and |
| 2649 | * is used when processing raw buffer data.</p> |
| 2650 | * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains |
| 2651 | * a color transform matrix that maps white balanced colors from the |
| 2652 | * reference sensor color space to the CIE XYZ color space with a D50 white |
| 2653 | * point.</p> |
| 2654 | * <p>Under the first reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}) |
| 2655 | * this matrix is chosen so that the standard white point for this reference |
| 2656 | * illuminant in the reference sensor colorspace is mapped to D50 in the |
| 2657 | * CIE XYZ colorspace.</p> |
| 2658 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2659 | * |
| 2660 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 2661 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2662 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 2663 | public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX1 = |
| 2664 | new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix1", android.hardware.camera2.params.ColorSpaceTransform.class); |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2665 | |
| 2666 | /** |
| 2667 | * <p>A matrix that transforms white balanced camera colors from the reference |
| 2668 | * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p> |
| 2669 | * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and |
| 2670 | * is used when processing raw buffer data.</p> |
| 2671 | * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains |
| 2672 | * a color transform matrix that maps white balanced colors from the |
| 2673 | * reference sensor color space to the CIE XYZ color space with a D50 white |
| 2674 | * point.</p> |
| 2675 | * <p>Under the second reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}) |
| 2676 | * this matrix is chosen so that the standard white point for this reference |
| 2677 | * illuminant in the reference sensor colorspace is mapped to D50 in the |
| 2678 | * CIE XYZ colorspace.</p> |
| 2679 | * <p>This matrix will only be present if the second reference |
| 2680 | * illuminant is present.</p> |
| 2681 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2682 | * |
| 2683 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 |
| 2684 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2685 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 2686 | public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX2 = |
| 2687 | new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix2", android.hardware.camera2.params.ColorSpaceTransform.class); |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2688 | |
| 2689 | /** |
Ruben Brunk | 67b4702 | 2014-02-07 15:26:29 -0800 | [diff] [blame] | 2690 | * <p>A fixed black level offset for each of the color filter arrangement |
| 2691 | * (CFA) mosaic channels.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2692 | * <p>This key specifies the zero light value for each of the CFA mosaic |
Ruben Brunk | e60e2955 | 2014-02-18 10:44:17 -0800 | [diff] [blame] | 2693 | * channels in the camera sensor. The maximal value output by the |
| 2694 | * sensor is represented by the value in {@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}.</p> |
Ruben Brunk | 52842e7 | 2014-06-05 13:16:45 -0700 | [diff] [blame] | 2695 | * <p>The values are given in the same order as channels listed for the CFA |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2696 | * layout key (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}), i.e. the |
Ruben Brunk | 52842e7 | 2014-06-05 13:16:45 -0700 | [diff] [blame] | 2697 | * nth value given corresponds to the black level offset for the nth |
| 2698 | * color channel listed in the CFA.</p> |
Zhijun He | cd950b6 | 2015-11-12 17:47:52 -0800 | [diff] [blame] | 2699 | * <p>The black level values of captured images may vary for different |
| 2700 | * capture settings (e.g., {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}). This key |
| 2701 | * represents a coarse approximation for such case. It is recommended to |
| 2702 | * use {@link CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL android.sensor.dynamicBlackLevel} or use pixels from |
| 2703 | * {@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions} directly for captures when |
| 2704 | * supported by the camera device, which provides more accurate black |
| 2705 | * level values. For raw capture in particular, it is recommended to use |
| 2706 | * pixels from {@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions} to calculate black |
| 2707 | * level values for each frame.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2708 | * <p><b>Range of valid values:</b><br> |
| 2709 | * >= 0 for each.</p> |
Ruben Brunk | 1ef676f | 2014-02-07 16:08:38 -0800 | [diff] [blame] | 2710 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Ruben Brunk | e60e2955 | 2014-02-18 10:44:17 -0800 | [diff] [blame] | 2711 | * |
Zhijun He | cd950b6 | 2015-11-12 17:47:52 -0800 | [diff] [blame] | 2712 | * @see CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL |
Ruben Brunk | 52842e7 | 2014-06-05 13:16:45 -0700 | [diff] [blame] | 2713 | * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT |
Ruben Brunk | e60e2955 | 2014-02-18 10:44:17 -0800 | [diff] [blame] | 2714 | * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL |
Zhijun He | cd950b6 | 2015-11-12 17:47:52 -0800 | [diff] [blame] | 2715 | * @see CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS |
| 2716 | * @see CaptureRequest#SENSOR_SENSITIVITY |
Ruben Brunk | 67b4702 | 2014-02-07 15:26:29 -0800 | [diff] [blame] | 2717 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2718 | @PublicKey |
Ruben Brunk | 52842e7 | 2014-06-05 13:16:45 -0700 | [diff] [blame] | 2719 | public static final Key<android.hardware.camera2.params.BlackLevelPattern> SENSOR_BLACK_LEVEL_PATTERN = |
| 2720 | new Key<android.hardware.camera2.params.BlackLevelPattern>("android.sensor.blackLevelPattern", android.hardware.camera2.params.BlackLevelPattern.class); |
Ruben Brunk | 67b4702 | 2014-02-07 15:26:29 -0800 | [diff] [blame] | 2721 | |
| 2722 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 2723 | * <p>Maximum sensitivity that is implemented |
Zhijun He | 153ac10 | 2014-02-03 12:25:12 -0800 | [diff] [blame] | 2724 | * purely through analog gain.</p> |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 2725 | * <p>For {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} values less than or |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2726 | * equal to this, all applied gain must be analog. For |
Zhijun He | 153ac10 | 2014-02-03 12:25:12 -0800 | [diff] [blame] | 2727 | * values above this, the gain applied can be a mix of analog and |
| 2728 | * digital.</p> |
Igor Murashkin | 3242f4f | 2014-01-15 12:27:41 -0800 | [diff] [blame] | 2729 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 2730 | * <p><b>Full capability</b> - |
| 2731 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 2732 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Alex Ray | e83c4eb | 2013-10-02 17:14:36 -0700 | [diff] [blame] | 2733 | * |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 2734 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Eino-Ville Talvala | 265b34c | 2014-01-16 16:18:52 -0800 | [diff] [blame] | 2735 | * @see CaptureRequest#SENSOR_SENSITIVITY |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2736 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2737 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2738 | public static final Key<Integer> SENSOR_MAX_ANALOG_SENSITIVITY = |
| 2739 | new Key<Integer>("android.sensor.maxAnalogSensitivity", int.class); |
| 2740 | |
| 2741 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2742 | * <p>Clockwise angle through which the output image needs to be rotated to be |
| 2743 | * upright on the device screen in its native orientation.</p> |
| 2744 | * <p>Also defines the direction of rolling shutter readout, which is from top to bottom in |
| 2745 | * the sensor's coordinate system.</p> |
| 2746 | * <p><b>Units</b>: Degrees of clockwise rotation; always a multiple of |
| 2747 | * 90</p> |
| 2748 | * <p><b>Range of valid values:</b><br> |
| 2749 | * 0, 90, 180, 270</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2750 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2751 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2752 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2753 | public static final Key<Integer> SENSOR_ORIENTATION = |
| 2754 | new Key<Integer>("android.sensor.orientation", int.class); |
| 2755 | |
| 2756 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2757 | * <p>List of sensor test pattern modes for {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode} |
| 2758 | * supported by this camera device.</p> |
| 2759 | * <p>Defaults to OFF, and always includes OFF if defined.</p> |
| 2760 | * <p><b>Range of valid values:</b><br> |
| 2761 | * Any value listed in {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}</p> |
Igor Murashkin | c127f05 | 2014-01-17 18:06:02 -0800 | [diff] [blame] | 2762 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Eino-Ville Talvala | d8fd679 | 2014-02-10 12:41:04 -0800 | [diff] [blame] | 2763 | * |
| 2764 | * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE |
Igor Murashkin | c127f05 | 2014-01-17 18:06:02 -0800 | [diff] [blame] | 2765 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2766 | @PublicKey |
Zhijun He | a486624 | 2014-03-27 23:51:34 -0700 | [diff] [blame] | 2767 | public static final Key<int[]> SENSOR_AVAILABLE_TEST_PATTERN_MODES = |
| 2768 | new Key<int[]>("android.sensor.availableTestPatternModes", int[].class); |
Igor Murashkin | c127f05 | 2014-01-17 18:06:02 -0800 | [diff] [blame] | 2769 | |
| 2770 | /** |
Zhijun He | cd950b6 | 2015-11-12 17:47:52 -0800 | [diff] [blame] | 2771 | * <p>List of disjoint rectangles indicating the sensor |
| 2772 | * optically shielded black pixel regions.</p> |
| 2773 | * <p>In most camera sensors, the active array is surrounded by some |
| 2774 | * optically shielded pixel areas. By blocking light, these pixels |
| 2775 | * provides a reliable black reference for black level compensation |
| 2776 | * in active array region.</p> |
| 2777 | * <p>This key provides a list of disjoint rectangles specifying the |
| 2778 | * regions of optically shielded (with metal shield) black pixel |
| 2779 | * regions if the camera device is capable of reading out these black |
| 2780 | * pixels in the output raw images. In comparison to the fixed black |
| 2781 | * level values reported by {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern}, this key |
| 2782 | * may provide a more accurate way for the application to calculate |
| 2783 | * black level of each captured raw images.</p> |
| 2784 | * <p>When this key is reported, the {@link CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL android.sensor.dynamicBlackLevel} and |
| 2785 | * {@link CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL android.sensor.dynamicWhiteLevel} will also be reported.</p> |
| 2786 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2787 | * |
| 2788 | * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN |
| 2789 | * @see CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL |
| 2790 | * @see CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL |
| 2791 | */ |
| 2792 | @PublicKey |
| 2793 | public static final Key<android.graphics.Rect[]> SENSOR_OPTICAL_BLACK_REGIONS = |
| 2794 | new Key<android.graphics.Rect[]>("android.sensor.opticalBlackRegions", android.graphics.Rect[].class); |
| 2795 | |
| 2796 | /** |
Yin-Chia Yeh | e4aa283 | 2015-02-06 15:15:53 -0800 | [diff] [blame] | 2797 | * <p>List of lens shading modes for {@link CaptureRequest#SHADING_MODE android.shading.mode} that are supported by this camera device.</p> |
| 2798 | * <p>This list contains lens shading modes that can be set for the camera device. |
| 2799 | * Camera devices that support the MANUAL_POST_PROCESSING capability will always |
| 2800 | * list OFF and FAST mode. This includes all FULL level devices. |
| 2801 | * LEGACY devices will always only support FAST mode.</p> |
| 2802 | * <p><b>Range of valid values:</b><br> |
| 2803 | * Any value listed in {@link CaptureRequest#SHADING_MODE android.shading.mode}</p> |
| 2804 | * <p>This key is available on all devices.</p> |
| 2805 | * |
| 2806 | * @see CaptureRequest#SHADING_MODE |
| 2807 | */ |
| 2808 | @PublicKey |
| 2809 | public static final Key<int[]> SHADING_AVAILABLE_MODES = |
| 2810 | new Key<int[]>("android.shading.availableModes", int[].class); |
| 2811 | |
| 2812 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2813 | * <p>List of face detection modes for {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} that are |
| 2814 | * supported by this camera device.</p> |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2815 | * <p>OFF is always supported.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2816 | * <p><b>Range of valid values:</b><br> |
| 2817 | * Any value listed in {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2818 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2819 | * |
| 2820 | * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2821 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2822 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 2823 | public static final Key<int[]> STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES = |
| 2824 | new Key<int[]>("android.statistics.info.availableFaceDetectModes", int[].class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2825 | |
| 2826 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2827 | * <p>The maximum number of simultaneously detectable |
| 2828 | * faces.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2829 | * <p><b>Range of valid values:</b><br> |
| 2830 | * 0 for cameras without available face detection; otherwise: |
| 2831 | * <code>>=4</code> for LIMITED or FULL hwlevel devices or |
| 2832 | * <code>>0</code> for LEGACY devices.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2833 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2834 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2835 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2836 | public static final Key<Integer> STATISTICS_INFO_MAX_FACE_COUNT = |
| 2837 | new Key<Integer>("android.statistics.info.maxFaceCount", int.class); |
| 2838 | |
| 2839 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2840 | * <p>List of hot pixel map output modes for {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode} that are |
| 2841 | * supported by this camera device.</p> |
| 2842 | * <p>If no hotpixel map output is available for this camera device, this will contain only |
| 2843 | * <code>false</code>.</p> |
| 2844 | * <p>ON is always supported on devices with the RAW capability.</p> |
| 2845 | * <p><b>Range of valid values:</b><br> |
| 2846 | * Any value listed in {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2847 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Ruben Brunk | 9d454fd | 2014-03-04 14:11:52 -0800 | [diff] [blame] | 2848 | * |
| 2849 | * @see CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE |
| 2850 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2851 | @PublicKey |
Ruben Brunk | 9d454fd | 2014-03-04 14:11:52 -0800 | [diff] [blame] | 2852 | public static final Key<boolean[]> STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES = |
| 2853 | new Key<boolean[]>("android.statistics.info.availableHotPixelMapModes", boolean[].class); |
| 2854 | |
| 2855 | /** |
Yin-Chia Yeh | e4aa283 | 2015-02-06 15:15:53 -0800 | [diff] [blame] | 2856 | * <p>List of lens shading map output modes for {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} that |
| 2857 | * are supported by this camera device.</p> |
| 2858 | * <p>If no lens shading map output is available for this camera device, this key will |
| 2859 | * contain only OFF.</p> |
| 2860 | * <p>ON is always supported on devices with the RAW capability. |
| 2861 | * LEGACY mode devices will always only support OFF.</p> |
| 2862 | * <p><b>Range of valid values:</b><br> |
| 2863 | * Any value listed in {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode}</p> |
| 2864 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2865 | * |
| 2866 | * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE |
| 2867 | */ |
| 2868 | @PublicKey |
Yin-Chia Yeh | 656931d | 2015-05-22 16:37:27 -0700 | [diff] [blame] | 2869 | public static final Key<int[]> STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES = |
| 2870 | new Key<int[]>("android.statistics.info.availableLensShadingMapModes", int[].class); |
Yin-Chia Yeh | e4aa283 | 2015-02-06 15:15:53 -0800 | [diff] [blame] | 2871 | |
| 2872 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 2873 | * <p>Maximum number of supported points in the |
Yin-Chia Yeh | 8490ace | 2014-05-27 10:04:54 -0700 | [diff] [blame] | 2874 | * tonemap curve that can be used for {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2875 | * <p>If the actual number of points provided by the application (in {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}*) is |
| 2876 | * less than this maximum, the camera device will resample the curve to its internal |
| 2877 | * representation, using linear interpolation.</p> |
Igor Murashkin | e006093 | 2014-01-17 17:24:11 -0800 | [diff] [blame] | 2878 | * <p>The output curves in the result metadata may have a different number |
| 2879 | * of points than the input curves, and will represent the actual |
| 2880 | * hardware curves used as closely as possible when linearly interpolated.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2881 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2882 | * <p><b>Full capability</b> - |
| 2883 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 2884 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Igor Murashkin | e006093 | 2014-01-17 17:24:11 -0800 | [diff] [blame] | 2885 | * |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2886 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Yin-Chia Yeh | 8490ace | 2014-05-27 10:04:54 -0700 | [diff] [blame] | 2887 | * @see CaptureRequest#TONEMAP_CURVE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2888 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2889 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2890 | public static final Key<Integer> TONEMAP_MAX_CURVE_POINTS = |
| 2891 | new Key<Integer>("android.tonemap.maxCurvePoints", int.class); |
| 2892 | |
| 2893 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2894 | * <p>List of tonemapping modes for {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} that are supported by this camera |
| 2895 | * device.</p> |
Yin-Chia Yeh | 956c52b | 2015-02-06 11:23:25 -0800 | [diff] [blame] | 2896 | * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always contain |
| 2897 | * at least one of below mode combinations:</p> |
| 2898 | * <ul> |
Yin-Chia Yeh | fba08dd | 2015-04-02 14:05:14 -0700 | [diff] [blame] | 2899 | * <li>CONTRAST_CURVE, FAST and HIGH_QUALITY</li> |
| 2900 | * <li>GAMMA_VALUE, PRESET_CURVE, FAST and HIGH_QUALITY</li> |
Yin-Chia Yeh | 956c52b | 2015-02-06 11:23:25 -0800 | [diff] [blame] | 2901 | * </ul> |
| 2902 | * <p>This includes all FULL level devices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2903 | * <p><b>Range of valid values:</b><br> |
| 2904 | * Any value listed in {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2905 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2906 | * <p><b>Full capability</b> - |
| 2907 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 2908 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Ruben Brunk | 6dc379c | 2014-03-04 15:04:00 -0800 | [diff] [blame] | 2909 | * |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2910 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Ruben Brunk | 6dc379c | 2014-03-04 15:04:00 -0800 | [diff] [blame] | 2911 | * @see CaptureRequest#TONEMAP_MODE |
| 2912 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2913 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 2914 | public static final Key<int[]> TONEMAP_AVAILABLE_TONE_MAP_MODES = |
| 2915 | new Key<int[]>("android.tonemap.availableToneMapModes", int[].class); |
Ruben Brunk | 6dc379c | 2014-03-04 15:04:00 -0800 | [diff] [blame] | 2916 | |
| 2917 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 2918 | * <p>A list of camera LEDs that are available on this system.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2919 | * <p><b>Possible values:</b> |
| 2920 | * <ul> |
| 2921 | * <li>{@link #LED_AVAILABLE_LEDS_TRANSMIT TRANSMIT}</li> |
| 2922 | * </ul></p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2923 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2924 | * @see #LED_AVAILABLE_LEDS_TRANSMIT |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2925 | * @hide |
| 2926 | */ |
| 2927 | public static final Key<int[]> LED_AVAILABLE_LEDS = |
| 2928 | new Key<int[]>("android.led.availableLeds", int[].class); |
| 2929 | |
| 2930 | /** |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 2931 | * <p>Generally classifies the overall set of the camera device functionality.</p> |
Eino-Ville Talvala | 7c6d73f | 2016-01-21 13:55:11 -0800 | [diff] [blame] | 2932 | * <p>The supported hardware level is a high-level description of the camera device's |
| 2933 | * capabilities, summarizing several capabilities into one field. Each level adds additional |
| 2934 | * features to the previous one, and is always a strict superset of the previous level. |
| 2935 | * The ordering is <code>LEGACY < LIMITED < FULL < LEVEL_3</code>.</p> |
| 2936 | * <p>Starting from <code>LEVEL_3</code>, the level enumerations are guaranteed to be in increasing |
| 2937 | * numerical value as well. To check if a given device is at least at a given hardware level, |
| 2938 | * the following code snippet can be used:</p> |
| 2939 | * <pre><code>// Returns true if the device supports the required hardware level, or better. |
| 2940 | * boolean isHardwareLevelSupported(CameraCharacteristics c, int requiredLevel) { |
| 2941 | * int deviceLevel = c.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL); |
| 2942 | * if (deviceLevel == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY) { |
| 2943 | * return requiredLevel == deviceLevel; |
| 2944 | * } |
| 2945 | * // deviceLevel is not LEGACY, can use numerical sort |
| 2946 | * return requiredLevel <= deviceLevel; |
| 2947 | * } |
| 2948 | * </code></pre> |
| 2949 | * <p>At a high level, the levels are:</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 2950 | * <ul> |
Eino-Ville Talvala | 7c6d73f | 2016-01-21 13:55:11 -0800 | [diff] [blame] | 2951 | * <li><code>LEGACY</code> devices operate in a backwards-compatibility mode for older |
| 2952 | * Android devices, and have very limited capabilities.</li> |
| 2953 | * <li><code>LIMITED</code> devices represent the |
| 2954 | * baseline feature set, and may also include additional capabilities that are |
| 2955 | * subsets of <code>FULL</code>.</li> |
| 2956 | * <li><code>FULL</code> devices additionally support per-frame manual control of sensor, flash, lens and |
| 2957 | * post-processing settings, and image capture at a high rate.</li> |
| 2958 | * <li><code>LEVEL_3</code> devices additionally support YUV reprocessing and RAW image capture, along |
| 2959 | * with additional output stream configurations.</li> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 2960 | * </ul> |
Eino-Ville Talvala | 7c6d73f | 2016-01-21 13:55:11 -0800 | [diff] [blame] | 2961 | * <p>See the individual level enums for full descriptions of the supported capabilities. The |
| 2962 | * {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} entry describes the device's capabilities at a |
| 2963 | * finer-grain level, if needed. In addition, many controls have their available settings or |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 2964 | * ranges defined in individual entries from {@link android.hardware.camera2.CameraCharacteristics }.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2965 | * <p>Some features are not part of any particular hardware level or capability and must be |
| 2966 | * queried separately. These include:</p> |
| 2967 | * <ul> |
| 2968 | * <li>Calibrated timestamps ({@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} <code>==</code> REALTIME)</li> |
| 2969 | * <li>Precision lens control ({@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} <code>==</code> CALIBRATED)</li> |
| 2970 | * <li>Face detection ({@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes})</li> |
| 2971 | * <li>Optical or electrical image stabilization |
| 2972 | * ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization}, |
| 2973 | * {@link CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES android.control.availableVideoStabilizationModes})</li> |
| 2974 | * </ul> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2975 | * <p><b>Possible values:</b> |
| 2976 | * <ul> |
| 2977 | * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED}</li> |
| 2978 | * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL}</li> |
| 2979 | * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY LEGACY}</li> |
Eino-Ville Talvala | 7c6d73f | 2016-01-21 13:55:11 -0800 | [diff] [blame] | 2980 | * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_3 3}</li> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2981 | * </ul></p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2982 | * <p>This key is available on all devices.</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 2983 | * |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2984 | * @see CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES |
| 2985 | * @see CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION |
| 2986 | * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 2987 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2988 | * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE |
| 2989 | * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2990 | * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED |
| 2991 | * @see #INFO_SUPPORTED_HARDWARE_LEVEL_FULL |
Ruben Brunk | 4a61a86 | 2014-07-01 16:00:26 -0700 | [diff] [blame] | 2992 | * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY |
Eino-Ville Talvala | 7c6d73f | 2016-01-21 13:55:11 -0800 | [diff] [blame] | 2993 | * @see #INFO_SUPPORTED_HARDWARE_LEVEL_3 |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2994 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2995 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2996 | public static final Key<Integer> INFO_SUPPORTED_HARDWARE_LEVEL = |
| 2997 | new Key<Integer>("android.info.supportedHardwareLevel", int.class); |
| 2998 | |
Igor Murashkin | 3865a84 | 2014-01-17 18:18:39 -0800 | [diff] [blame] | 2999 | /** |
Chien-Yu Chen | a1d1d5b | 2018-01-03 12:14:53 -0800 | [diff] [blame] | 3000 | * <p>A short string for manufacturer version information about the camera device, such as |
| 3001 | * ISP hardware, sensors, etc.</p> |
| 3002 | * <p>This can be used in {@link android.media.ExifInterface#TAG_IMAGE_DESCRIPTION TAG_IMAGE_DESCRIPTION} |
| 3003 | * in jpeg EXIF. This key may be absent if no version information is available on the |
| 3004 | * device.</p> |
| 3005 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 3006 | */ |
| 3007 | @PublicKey |
| 3008 | public static final Key<String> INFO_VERSION = |
| 3009 | new Key<String>("android.info.version", String.class); |
| 3010 | |
| 3011 | /** |
Igor Murashkin | 3865a84 | 2014-01-17 18:18:39 -0800 | [diff] [blame] | 3012 | * <p>The maximum number of frames that can occur after a request |
| 3013 | * (different than the previous) has been submitted, and before the |
Chien-Yu Chen | 161a76c | 2015-06-26 11:23:55 -0700 | [diff] [blame] | 3014 | * result's state becomes synchronized.</p> |
Igor Murashkin | 3865a84 | 2014-01-17 18:18:39 -0800 | [diff] [blame] | 3015 | * <p>This defines the maximum distance (in number of metadata results), |
Chien-Yu Chen | 161a76c | 2015-06-26 11:23:55 -0700 | [diff] [blame] | 3016 | * between the frame number of the request that has new controls to apply |
| 3017 | * and the frame number of the result that has all the controls applied.</p> |
Igor Murashkin | 3865a84 | 2014-01-17 18:18:39 -0800 | [diff] [blame] | 3018 | * <p>In other words this acts as an upper boundary for how many frames |
| 3019 | * must occur before the camera device knows for a fact that the new |
| 3020 | * submitted camera settings have been applied in outgoing frames.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 3021 | * <p><b>Units</b>: Frame counts</p> |
| 3022 | * <p><b>Possible values:</b> |
| 3023 | * <ul> |
| 3024 | * <li>{@link #SYNC_MAX_LATENCY_PER_FRAME_CONTROL PER_FRAME_CONTROL}</li> |
| 3025 | * <li>{@link #SYNC_MAX_LATENCY_UNKNOWN UNKNOWN}</li> |
| 3026 | * </ul></p> |
| 3027 | * <p><b>Available values for this device:</b><br> |
| 3028 | * A positive value, PER_FRAME_CONTROL, or UNKNOWN.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 3029 | * <p>This key is available on all devices.</p> |
Igor Murashkin | 3865a84 | 2014-01-17 18:18:39 -0800 | [diff] [blame] | 3030 | * @see #SYNC_MAX_LATENCY_PER_FRAME_CONTROL |
| 3031 | * @see #SYNC_MAX_LATENCY_UNKNOWN |
| 3032 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 3033 | @PublicKey |
Igor Murashkin | 3865a84 | 2014-01-17 18:18:39 -0800 | [diff] [blame] | 3034 | public static final Key<Integer> SYNC_MAX_LATENCY = |
| 3035 | new Key<Integer>("android.sync.maxLatency", int.class); |
| 3036 | |
Eino-Ville Talvala | 24c369e | 2015-02-23 15:55:55 -0800 | [diff] [blame] | 3037 | /** |
Zhijun He | 513f7c3 | 2015-04-24 18:23:54 -0700 | [diff] [blame] | 3038 | * <p>The maximal camera capture pipeline stall (in unit of frame count) introduced by a |
| 3039 | * reprocess capture request.</p> |
| 3040 | * <p>The key describes the maximal interference that one reprocess (input) request |
| 3041 | * can introduce to the camera simultaneous streaming of regular (output) capture |
| 3042 | * requests, including repeating requests.</p> |
| 3043 | * <p>When a reprocessing capture request is submitted while a camera output repeating request |
| 3044 | * (e.g. preview) is being served by the camera device, it may preempt the camera capture |
| 3045 | * pipeline for at least one frame duration so that the camera device is unable to process |
| 3046 | * the following capture request in time for the next sensor start of exposure boundary. |
| 3047 | * When this happens, the application may observe a capture time gap (longer than one frame |
| 3048 | * duration) between adjacent capture output frames, which usually exhibits as preview |
| 3049 | * glitch if the repeating request output targets include a preview surface. This key gives |
| 3050 | * the worst-case number of frame stall introduced by one reprocess request with any kind of |
| 3051 | * formats/sizes combination.</p> |
| 3052 | * <p>If this key reports 0, it means a reprocess request doesn't introduce any glitch to the |
| 3053 | * ongoing camera repeating request outputs, as if this reprocess request is never issued.</p> |
Chien-Yu Chen | 8062d31 | 2015-05-12 14:24:10 -0700 | [diff] [blame] | 3054 | * <p>This key is supported if the camera device supports PRIVATE or YUV reprocessing ( |
| 3055 | * i.e. {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains PRIVATE_REPROCESSING or |
Zhijun He | 513f7c3 | 2015-04-24 18:23:54 -0700 | [diff] [blame] | 3056 | * YUV_REPROCESSING).</p> |
| 3057 | * <p><b>Units</b>: Number of frames.</p> |
| 3058 | * <p><b>Range of valid values:</b><br> |
| 3059 | * <= 4</p> |
| 3060 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 3061 | * <p><b>Limited capability</b> - |
| 3062 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 3063 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 3064 | * |
| 3065 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
| 3066 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 3067 | */ |
| 3068 | @PublicKey |
| 3069 | public static final Key<Integer> REPROCESS_MAX_CAPTURE_STALL = |
| 3070 | new Key<Integer>("android.reprocess.maxCaptureStall", int.class); |
| 3071 | |
| 3072 | /** |
Eino-Ville Talvala | 24c369e | 2015-02-23 15:55:55 -0800 | [diff] [blame] | 3073 | * <p>The available depth dataspace stream |
| 3074 | * configurations that this camera device supports |
| 3075 | * (i.e. format, width, height, output/input stream).</p> |
| 3076 | * <p>These are output stream configurations for use with |
| 3077 | * dataSpace HAL_DATASPACE_DEPTH. The configurations are |
| 3078 | * listed as <code>(format, width, height, input?)</code> tuples.</p> |
| 3079 | * <p>Only devices that support depth output for at least |
| 3080 | * the HAL_PIXEL_FORMAT_Y16 dense depth map may include |
| 3081 | * this entry.</p> |
| 3082 | * <p>A device that also supports the HAL_PIXEL_FORMAT_BLOB |
| 3083 | * sparse depth point cloud must report a single entry for |
| 3084 | * the format in this list as <code>(HAL_PIXEL_FORMAT_BLOB, |
| 3085 | * android.depth.maxDepthSamples, 1, OUTPUT)</code> in addition to |
| 3086 | * the entries for HAL_PIXEL_FORMAT_Y16.</p> |
| 3087 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 3088 | * <p><b>Limited capability</b> - |
| 3089 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 3090 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 3091 | * |
| 3092 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
| 3093 | * @hide |
| 3094 | */ |
| 3095 | public static final Key<android.hardware.camera2.params.StreamConfiguration[]> DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS = |
| 3096 | new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.depth.availableDepthStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class); |
| 3097 | |
| 3098 | /** |
| 3099 | * <p>This lists the minimum frame duration for each |
| 3100 | * format/size combination for depth output formats.</p> |
| 3101 | * <p>This should correspond to the frame duration when only that |
| 3102 | * stream is active, with all processing (typically in android.*.mode) |
| 3103 | * set to either OFF or FAST.</p> |
| 3104 | * <p>When multiple streams are used in a request, the minimum frame |
| 3105 | * duration will be max(individual stream min durations).</p> |
| 3106 | * <p>The minimum frame duration of a stream (of a particular format, size) |
| 3107 | * is the same regardless of whether the stream is input or output.</p> |
| 3108 | * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and |
| 3109 | * android.scaler.availableStallDurations for more details about |
| 3110 | * calculating the max frame rate.</p> |
Eino-Ville Talvala | 24c369e | 2015-02-23 15:55:55 -0800 | [diff] [blame] | 3111 | * <p><b>Units</b>: (format, width, height, ns) x n</p> |
| 3112 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 3113 | * <p><b>Limited capability</b> - |
| 3114 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 3115 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 3116 | * |
| 3117 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
| 3118 | * @see CaptureRequest#SENSOR_FRAME_DURATION |
| 3119 | * @hide |
| 3120 | */ |
| 3121 | public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS = |
| 3122 | new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); |
| 3123 | |
| 3124 | /** |
| 3125 | * <p>This lists the maximum stall duration for each |
Zhijun He | 513f7c3 | 2015-04-24 18:23:54 -0700 | [diff] [blame] | 3126 | * output format/size combination for depth streams.</p> |
Eino-Ville Talvala | 24c369e | 2015-02-23 15:55:55 -0800 | [diff] [blame] | 3127 | * <p>A stall duration is how much extra time would get added |
| 3128 | * to the normal minimum frame duration for a repeating request |
| 3129 | * that has streams with non-zero stall.</p> |
| 3130 | * <p>This functions similarly to |
| 3131 | * android.scaler.availableStallDurations for depth |
| 3132 | * streams.</p> |
| 3133 | * <p>All depth output stream formats may have a nonzero stall |
| 3134 | * duration.</p> |
| 3135 | * <p><b>Units</b>: (format, width, height, ns) x n</p> |
| 3136 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 3137 | * <p><b>Limited capability</b> - |
| 3138 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 3139 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 3140 | * |
| 3141 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
| 3142 | * @hide |
| 3143 | */ |
| 3144 | public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS = |
| 3145 | new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); |
| 3146 | |
Eino-Ville Talvala | 0b7b03b | 2015-04-13 17:29:52 -0700 | [diff] [blame] | 3147 | /** |
| 3148 | * <p>Indicates whether a capture request may target both a |
| 3149 | * DEPTH16 / DEPTH_POINT_CLOUD output, and normal color outputs (such as |
| 3150 | * YUV_420_888, JPEG, or RAW) simultaneously.</p> |
| 3151 | * <p>If TRUE, including both depth and color outputs in a single |
| 3152 | * capture request is not supported. An application must interleave color |
| 3153 | * and depth requests. If FALSE, a single request can target both types |
| 3154 | * of output.</p> |
| 3155 | * <p>Typically, this restriction exists on camera devices that |
| 3156 | * need to emit a specific pattern or wavelength of light to |
| 3157 | * measure depth values, which causes the color image to be |
| 3158 | * corrupted during depth measurement.</p> |
| 3159 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 3160 | * <p><b>Limited capability</b> - |
| 3161 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 3162 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 3163 | * |
| 3164 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
| 3165 | */ |
| 3166 | @PublicKey |
| 3167 | public static final Key<Boolean> DEPTH_DEPTH_IS_EXCLUSIVE = |
| 3168 | new Key<Boolean>("android.depth.depthIsExclusive", boolean.class); |
| 3169 | |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 3170 | /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ |
| 3171 | * End generated code |
| 3172 | *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 3173 | |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 3174 | |
| 3175 | |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 3176 | } |