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