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