CameraCharacteristics.java revision 9c595174ccaaf3d36315c4a100e47ee4369073f6
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 17package android.hardware.camera2; 18 19import android.hardware.camera2.impl.CameraMetadataNative; 20 21import java.util.Collections; 22import java.util.List; 23 24/** 25 * <p>The properties describing a 26 * {@link CameraDevice CameraDevice}.</p> 27 * 28 * <p>These properties are fixed for a given CameraDevice, and can be queried 29 * through the {@link CameraManager CameraManager} 30 * interface in addition to through the CameraDevice interface.</p> 31 * 32 * @see CameraDevice 33 * @see CameraManager 34 */ 35public final class CameraCharacteristics extends CameraMetadata { 36 37 private final CameraMetadataNative mProperties; 38 private List<Key<?>> mAvailableRequestKeys; 39 private List<Key<?>> mAvailableResultKeys; 40 41 /** 42 * Takes ownership of the passed-in properties object 43 * @hide 44 */ 45 public CameraCharacteristics(CameraMetadataNative properties) { 46 mProperties = properties; 47 } 48 49 @Override 50 public <T> T get(Key<T> key) { 51 return mProperties.get(key); 52 } 53 54 /** 55 * Returns the list of keys supported by this {@link CameraDevice} for querying 56 * with a {@link CaptureRequest}. 57 * 58 * <p>The list returned is not modifiable, so any attempts to modify it will throw 59 * a {@code UnsupportedOperationException}.</p> 60 * 61 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> 62 * 63 * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use 64 * {@link #getKeys()} instead.</p> 65 * 66 * @return List of keys supported by this CameraDevice for CaptureRequests. 67 */ 68 public List<Key<?>> getAvailableCaptureRequestKeys() { 69 if (mAvailableRequestKeys == null) { 70 mAvailableRequestKeys = getAvailableKeyList(CaptureRequest.class); 71 } 72 return mAvailableRequestKeys; 73 } 74 75 /** 76 * Returns the list of keys supported by this {@link CameraDevice} for querying 77 * with a {@link CaptureResult}. 78 * 79 * <p>The list returned is not modifiable, so any attempts to modify it will throw 80 * a {@code UnsupportedOperationException}.</p> 81 * 82 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> 83 * 84 * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use 85 * {@link #getKeys()} instead.</p> 86 * 87 * @return List of keys supported by this CameraDevice for CaptureResults. 88 */ 89 public List<Key<?>> getAvailableCaptureResultKeys() { 90 if (mAvailableResultKeys == null) { 91 mAvailableResultKeys = getAvailableKeyList(CaptureResult.class); 92 } 93 return mAvailableResultKeys; 94 } 95 96 /** 97 * Returns the list of keys supported by this {@link CameraDevice} by metadataClass. 98 * 99 * <p>The list returned is not modifiable, so any attempts to modify it will throw 100 * a {@code UnsupportedOperationException}.</p> 101 * 102 * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> 103 * 104 * @param metadataClass The subclass of CameraMetadata that you want to get the keys for. 105 * 106 * @return List of keys supported by this CameraDevice for metadataClass. 107 * 108 * @throws IllegalArgumentException if metadataClass is not a subclass of CameraMetadata 109 */ 110 private <T extends CameraMetadata> List<Key<?>> getAvailableKeyList(Class<T> metadataClass) { 111 112 if (metadataClass.equals(CameraMetadata.class)) { 113 throw new AssertionError( 114 "metadataClass must be a strict subclass of CameraMetadata"); 115 } else if (!CameraMetadata.class.isAssignableFrom(metadataClass)) { 116 throw new AssertionError( 117 "metadataClass must be a subclass of CameraMetadata"); 118 } 119 120 return Collections.unmodifiableList(getKeysStatic(metadataClass, /*instance*/null)); 121 } 122 123 /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 124 * The key entries below this point are generated from metadata 125 * definitions in /system/media/camera/docs. Do not modify by hand or 126 * modify the comment blocks at the start or end. 127 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/ 128 129 130 /** 131 * <p>The set of auto-exposure antibanding modes that are 132 * supported by this camera device.</p> 133 * <p>Not all of the auto-exposure anti-banding modes may be 134 * supported by a given camera device. This field lists the 135 * valid anti-banding modes that the application may request 136 * for this camera device; they must include AUTO.</p> 137 */ 138 public static final Key<byte[]> CONTROL_AE_AVAILABLE_ANTIBANDING_MODES = 139 new Key<byte[]>("android.control.aeAvailableAntibandingModes", byte[].class); 140 141 /** 142 * <p>The set of auto-exposure modes that are supported by this 143 * camera device.</p> 144 * <p>Not all the auto-exposure modes may be supported by a 145 * given camera device, especially if no flash unit is 146 * available. This entry lists the valid modes for 147 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} for this camera device.</p> 148 * <p>All camera devices support ON, and all camera devices with 149 * flash units support ON_AUTO_FLASH and 150 * ON_ALWAYS_FLASH.</p> 151 * <p>FULL mode camera devices always support OFF mode, 152 * which enables application control of camera exposure time, 153 * sensitivity, and frame duration.</p> 154 * 155 * @see CaptureRequest#CONTROL_AE_MODE 156 */ 157 public static final Key<byte[]> CONTROL_AE_AVAILABLE_MODES = 158 new Key<byte[]>("android.control.aeAvailableModes", byte[].class); 159 160 /** 161 * <p>List of frame rate ranges supported by the 162 * AE algorithm/hardware</p> 163 */ 164 public static final Key<int[]> CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES = 165 new Key<int[]>("android.control.aeAvailableTargetFpsRanges", int[].class); 166 167 /** 168 * <p>Maximum and minimum exposure compensation 169 * setting, in counts of 170 * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep}.</p> 171 * 172 * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP 173 */ 174 public static final Key<int[]> CONTROL_AE_COMPENSATION_RANGE = 175 new Key<int[]>("android.control.aeCompensationRange", int[].class); 176 177 /** 178 * <p>Smallest step by which exposure compensation 179 * can be changed</p> 180 */ 181 public static final Key<Rational> CONTROL_AE_COMPENSATION_STEP = 182 new Key<Rational>("android.control.aeCompensationStep", Rational.class); 183 184 /** 185 * <p>List of AF modes that can be 186 * selected with {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}.</p> 187 * <p>Not all the auto-focus modes may be supported by a 188 * given camera device. This entry lists the valid modes for 189 * {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} for this camera device.</p> 190 * <p>All camera devices will support OFF mode, and all camera devices with 191 * adjustable focuser units (<code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} > 0</code>) 192 * will support AUTO mode.</p> 193 * 194 * @see CaptureRequest#CONTROL_AF_MODE 195 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 196 */ 197 public static final Key<byte[]> CONTROL_AF_AVAILABLE_MODES = 198 new Key<byte[]>("android.control.afAvailableModes", byte[].class); 199 200 /** 201 * <p>List containing the subset of color effects 202 * specified in {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode} that is supported by 203 * this device.</p> 204 * <p>This list contains the color effect modes that can be applied to 205 * images produced by the camera device. Only modes that have 206 * been fully implemented for the current device may be included here. 207 * Implementations are not expected to be consistent across all devices. 208 * If no color effect modes are available for a device, this should 209 * simply be set to OFF.</p> 210 * <p>A color effect will only be applied if 211 * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF.</p> 212 * 213 * @see CaptureRequest#CONTROL_EFFECT_MODE 214 * @see CaptureRequest#CONTROL_MODE 215 */ 216 public static final Key<byte[]> CONTROL_AVAILABLE_EFFECTS = 217 new Key<byte[]>("android.control.availableEffects", byte[].class); 218 219 /** 220 * <p>List containing a subset of scene modes 221 * specified in {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode}.</p> 222 * <p>This list contains scene modes that can be set for the camera device. 223 * Only scene modes that have been fully implemented for the 224 * camera device may be included here. Implementations are not expected 225 * to be consistent across all devices. If no scene modes are supported 226 * by the camera device, this will be set to <code>[DISABLED]</code>.</p> 227 * 228 * @see CaptureRequest#CONTROL_SCENE_MODE 229 */ 230 public static final Key<byte[]> CONTROL_AVAILABLE_SCENE_MODES = 231 new Key<byte[]>("android.control.availableSceneModes", byte[].class); 232 233 /** 234 * <p>List of video stabilization modes that can 235 * be supported</p> 236 */ 237 public static final Key<byte[]> CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES = 238 new Key<byte[]>("android.control.availableVideoStabilizationModes", byte[].class); 239 240 /** 241 * <p>The set of auto-white-balance modes ({@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}) 242 * that are supported by this camera device.</p> 243 * <p>Not all the auto-white-balance modes may be supported by a 244 * given camera device. This entry lists the valid modes for 245 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} for this camera device.</p> 246 * <p>All camera devices will support ON mode.</p> 247 * <p>FULL mode camera devices will always support OFF mode, 248 * which enables application control of white balance, by using 249 * {@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).</p> 250 * 251 * @see CaptureRequest#COLOR_CORRECTION_GAINS 252 * @see CaptureRequest#COLOR_CORRECTION_MODE 253 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 254 * @see CaptureRequest#CONTROL_AWB_MODE 255 */ 256 public static final Key<byte[]> CONTROL_AWB_AVAILABLE_MODES = 257 new Key<byte[]>("android.control.awbAvailableModes", byte[].class); 258 259 /** 260 * <p>List of the maximum number of regions that can be used for metering in 261 * auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF); 262 * this corresponds to the the maximum number of elements in 263 * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}, {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}, 264 * and {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p> 265 * 266 * @see CaptureRequest#CONTROL_AE_REGIONS 267 * @see CaptureRequest#CONTROL_AF_REGIONS 268 * @see CaptureRequest#CONTROL_AWB_REGIONS 269 */ 270 public static final Key<int[]> CONTROL_MAX_REGIONS = 271 new Key<int[]>("android.control.maxRegions", int[].class); 272 273 /** 274 * <p>The set of edge enhancement modes supported by this camera device.</p> 275 * <p>This tag lists the valid modes for {@link CaptureRequest#EDGE_MODE android.edge.mode}.</p> 276 * <p>Full-capability camera devices must always support OFF and FAST.</p> 277 * 278 * @see CaptureRequest#EDGE_MODE 279 */ 280 public static final Key<byte[]> EDGE_AVAILABLE_EDGE_MODES = 281 new Key<byte[]>("android.edge.availableEdgeModes", byte[].class); 282 283 /** 284 * <p>Whether this camera device has a 285 * flash.</p> 286 * <p>If no flash, none of the flash controls do 287 * anything. All other metadata should return 0.</p> 288 */ 289 public static final Key<Boolean> FLASH_INFO_AVAILABLE = 290 new Key<Boolean>("android.flash.info.available", boolean.class); 291 292 /** 293 * <p>The set of hot pixel correction modes that are supported by this 294 * camera device.</p> 295 * <p>This tag lists valid modes for {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode}.</p> 296 * <p>FULL mode camera devices will always support FAST.</p> 297 * 298 * @see CaptureRequest#HOT_PIXEL_MODE 299 */ 300 public static final Key<byte[]> HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES = 301 new Key<byte[]>("android.hotPixel.availableHotPixelModes", byte[].class); 302 303 /** 304 * <p>Supported resolutions for the JPEG thumbnail</p> 305 * <p>Below condiditions will be satisfied for this size list:</p> 306 * <ul> 307 * <li>The sizes will be sorted by increasing pixel area (width x height). 308 * If several resolutions have the same area, they will be sorted by increasing width.</li> 309 * <li>The aspect ratio of the largest thumbnail size will be same as the 310 * aspect ratio of largest JPEG output size in android.scaler.availableStreamConfigurations. 311 * The largest size is defined as the size that has the largest pixel area 312 * in a given size list.</li> 313 * <li>Each output JPEG size in android.scaler.availableStreamConfigurations will have at least 314 * one corresponding size that has the same aspect ratio in availableThumbnailSizes, 315 * and vice versa.</li> 316 * <li>All non (0, 0) sizes will have non-zero widths and heights.</li> 317 * </ul> 318 */ 319 public static final Key<android.hardware.camera2.Size[]> JPEG_AVAILABLE_THUMBNAIL_SIZES = 320 new Key<android.hardware.camera2.Size[]>("android.jpeg.availableThumbnailSizes", android.hardware.camera2.Size[].class); 321 322 /** 323 * <p>List of supported aperture 324 * values.</p> 325 * <p>If the camera device doesn't support variable apertures, 326 * listed value will be the fixed aperture.</p> 327 * <p>If the camera device supports variable apertures, the aperture value 328 * in this list will be sorted in ascending order.</p> 329 */ 330 public static final Key<float[]> LENS_INFO_AVAILABLE_APERTURES = 331 new Key<float[]>("android.lens.info.availableApertures", float[].class); 332 333 /** 334 * <p>List of supported neutral density filter values for 335 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity}.</p> 336 * <p>If changing {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} is not supported, 337 * availableFilterDensities must contain only 0. Otherwise, this 338 * list contains only the exact filter density values available on 339 * this camera device.</p> 340 * 341 * @see CaptureRequest#LENS_FILTER_DENSITY 342 */ 343 public static final Key<float[]> LENS_INFO_AVAILABLE_FILTER_DENSITIES = 344 new Key<float[]>("android.lens.info.availableFilterDensities", float[].class); 345 346 /** 347 * <p>The available focal lengths for this device for use with 348 * {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}.</p> 349 * <p>If optical zoom is not supported, this will only report 350 * a single value corresponding to the static focal length of the 351 * device. Otherwise, this will report every focal length supported 352 * by the device.</p> 353 * 354 * @see CaptureRequest#LENS_FOCAL_LENGTH 355 */ 356 public static final Key<float[]> LENS_INFO_AVAILABLE_FOCAL_LENGTHS = 357 new Key<float[]>("android.lens.info.availableFocalLengths", float[].class); 358 359 /** 360 * <p>List containing a subset of the optical image 361 * stabilization (OIS) modes specified in 362 * {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}.</p> 363 * <p>If OIS is not implemented for a given camera device, this should 364 * contain only OFF.</p> 365 * 366 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 367 */ 368 public static final Key<byte[]> LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION = 369 new Key<byte[]>("android.lens.info.availableOpticalStabilization", byte[].class); 370 371 /** 372 * <p>Optional. Hyperfocal distance for this lens.</p> 373 * <p>If the lens is not fixed focus, the camera device will report this 374 * field when {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} is APPROXIMATE or CALIBRATED.</p> 375 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 376 * 377 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION 378 */ 379 public static final Key<Float> LENS_INFO_HYPERFOCAL_DISTANCE = 380 new Key<Float>("android.lens.info.hyperfocalDistance", float.class); 381 382 /** 383 * <p>Shortest distance from frontmost surface 384 * of the lens that can be focused correctly.</p> 385 * <p>If the lens is fixed-focus, this should be 386 * 0.</p> 387 */ 388 public static final Key<Float> LENS_INFO_MINIMUM_FOCUS_DISTANCE = 389 new Key<Float>("android.lens.info.minimumFocusDistance", float.class); 390 391 /** 392 * <p>Dimensions of lens shading map.</p> 393 * <p>The map should be on the order of 30-40 rows and columns, and 394 * must be smaller than 64x64.</p> 395 */ 396 public static final Key<android.hardware.camera2.Size> LENS_INFO_SHADING_MAP_SIZE = 397 new Key<android.hardware.camera2.Size>("android.lens.info.shadingMapSize", android.hardware.camera2.Size.class); 398 399 /** 400 * <p>The lens focus distance calibration quality.</p> 401 * <p>The lens focus distance calibration quality determines the reliability of 402 * focus related metadata entries, i.e. {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}, 403 * {@link CaptureResult#LENS_FOCUS_RANGE android.lens.focusRange}, {@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}, and 404 * {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}.</p> 405 * 406 * @see CaptureRequest#LENS_FOCUS_DISTANCE 407 * @see CaptureResult#LENS_FOCUS_RANGE 408 * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE 409 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 410 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED 411 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE 412 * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED 413 */ 414 public static final Key<Integer> LENS_INFO_FOCUS_DISTANCE_CALIBRATION = 415 new Key<Integer>("android.lens.info.focusDistanceCalibration", int.class); 416 417 /** 418 * <p>Direction the camera faces relative to 419 * device screen</p> 420 * @see #LENS_FACING_FRONT 421 * @see #LENS_FACING_BACK 422 */ 423 public static final Key<Integer> LENS_FACING = 424 new Key<Integer>("android.lens.facing", int.class); 425 426 /** 427 * <p>The set of noise reduction modes supported by this camera device.</p> 428 * <p>This tag lists the valid modes for {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}.</p> 429 * <p>Full-capability camera devices must laways support OFF and FAST.</p> 430 * 431 * @see CaptureRequest#NOISE_REDUCTION_MODE 432 */ 433 public static final Key<byte[]> NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES = 434 new Key<byte[]>("android.noiseReduction.availableNoiseReductionModes", byte[].class); 435 436 /** 437 * <p>If set to 1, the HAL will always split result 438 * metadata for a single capture into multiple buffers, 439 * returned using multiple process_capture_result calls.</p> 440 * <p>Does not need to be listed in static 441 * metadata. Support for partial results will be reworked in 442 * future versions of camera service. This quirk will stop 443 * working at that point; DO NOT USE without careful 444 * consideration of future support.</p> 445 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 446 * @deprecated 447 * @hide 448 */ 449 @Deprecated 450 public static final Key<Byte> QUIRKS_USE_PARTIAL_RESULT = 451 new Key<Byte>("android.quirks.usePartialResult", byte.class); 452 453 /** 454 * <p>The maximum numbers of different types of output streams 455 * that can be configured and used simultaneously by a camera device.</p> 456 * <p>This is a 3 element tuple that contains the max number of output simultaneous 457 * streams for raw sensor, processed (but not stalling), and processed (and stalling) 458 * formats respectively. For example, assuming that JPEG is typically a processed and 459 * stalling stream, if max raw sensor format output stream number is 1, max YUV streams 460 * number is 3, and max JPEG stream number is 2, then this tuple should be <code>(1, 3, 2)</code>.</p> 461 * <p>This lists the upper bound of the number of output streams supported by 462 * the camera device. Using more streams simultaneously may require more hardware and 463 * CPU resources that will consume more power. The image format for a output stream can 464 * be any supported format provided by android.scaler.availableStreamConfigurations. 465 * The formats defined in android.scaler.availableStreamConfigurations can be catergorized 466 * into the 3 stream types as below:</p> 467 * <ul> 468 * <li>Processed (but stalling): any non-RAW format with a stallDurations > 0. 469 * Typically JPEG format (ImageFormat#JPEG).</li> 470 * <li>Raw formats: ImageFormat#RAW_SENSOR and ImageFormat#RAW_OPAQUE.</li> 471 * <li>Processed (but not-stalling): any non-RAW format without a stall duration. 472 * Typically ImageFormat#YUV_420_888, ImageFormat#NV21, ImageFormat#YV12.</li> 473 * </ul> 474 */ 475 public static final Key<int[]> REQUEST_MAX_NUM_OUTPUT_STREAMS = 476 new Key<int[]>("android.request.maxNumOutputStreams", int[].class); 477 478 /** 479 * <p>The maximum numbers of any type of input streams 480 * that can be configured and used simultaneously by a camera device.</p> 481 * <p>When set to 0, it means no input stream is supported.</p> 482 * <p>The image format for a input stream can be any supported 483 * format provided by 484 * android.scaler.availableInputOutputFormatsMap. When using an 485 * input stream, there must be at least one output stream 486 * configured to to receive the reprocessed images.</p> 487 * <p>For example, for Zero Shutter Lag (ZSL) still capture use case, the input 488 * stream image format will be RAW_OPAQUE, the associated output stream image format 489 * should be JPEG.</p> 490 */ 491 public static final Key<Integer> REQUEST_MAX_NUM_INPUT_STREAMS = 492 new Key<Integer>("android.request.maxNumInputStreams", int.class); 493 494 /** 495 * <p>Specifies the number of maximum pipeline stages a frame 496 * has to go through from when it's exposed to when it's available 497 * to the framework.</p> 498 * <p>A typical minimum value for this is 2 (one stage to expose, 499 * one stage to readout) from the sensor. The ISP then usually adds 500 * its own stages to do custom HW processing. Further stages may be 501 * added by SW processing.</p> 502 * <p>Depending on what settings are used (e.g. YUV, JPEG) and what 503 * processing is enabled (e.g. face detection), the actual pipeline 504 * depth (specified by {@link CaptureResult#REQUEST_PIPELINE_DEPTH android.request.pipelineDepth}) may be less than 505 * the max pipeline depth.</p> 506 * <p>A pipeline depth of X stages is equivalent to a pipeline latency of 507 * X frame intervals.</p> 508 * <p>This value will be 8 or less.</p> 509 * 510 * @see CaptureResult#REQUEST_PIPELINE_DEPTH 511 */ 512 public static final Key<Byte> REQUEST_PIPELINE_MAX_DEPTH = 513 new Key<Byte>("android.request.pipelineMaxDepth", byte.class); 514 515 /** 516 * <p>Optional. Defaults to 1. Defines how many sub-components 517 * a result will be composed of.</p> 518 * <p>In order to combat the pipeline latency, partial results 519 * may be delivered to the application layer from the camera device as 520 * soon as they are available.</p> 521 * <p>A value of 1 means that partial results are not supported.</p> 522 * <p>A typical use case for this might be: after requesting an AF lock the 523 * new AF state might be available 50% of the way through the pipeline. 524 * The camera device could then immediately dispatch this state via a 525 * partial result to the framework/application layer, and the rest of 526 * the metadata via later partial results.</p> 527 */ 528 public static final Key<Integer> REQUEST_PARTIAL_RESULT_COUNT = 529 new Key<Integer>("android.request.partialResultCount", int.class); 530 531 /** 532 * <p>List of capabilities that the camera device 533 * advertises as fully supporting.</p> 534 * <p>A capability is a contract that the camera device makes in order 535 * to be able to satisfy one or more use cases.</p> 536 * <p>Listing a capability guarantees that the whole set of features 537 * required to support a common use will all be available.</p> 538 * <p>Using a subset of the functionality provided by an unsupported 539 * capability may be possible on a specific camera device implementation; 540 * to do this query each of android.request.availableRequestKeys, 541 * android.request.availableResultKeys, 542 * android.request.availableCharacteristicsKeys.</p> 543 * <p>XX: Maybe these should go into {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} 544 * as a table instead?</p> 545 * <p>The following capabilities are guaranteed to be available on 546 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL devices:</p> 547 * <ul> 548 * <li>MANUAL_SENSOR</li> 549 * <li>ZSL</li> 550 * </ul> 551 * <p>Other capabilities may be available on either FULL or LIMITED 552 * devices, but the app. should query this field to be sure.</p> 553 * 554 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 555 * @see #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE 556 * @see #REQUEST_AVAILABLE_CAPABILITIES_OPTIONAL 557 * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR 558 * @see #REQUEST_AVAILABLE_CAPABILITIES_GCAM 559 * @see #REQUEST_AVAILABLE_CAPABILITIES_ZSL 560 * @see #REQUEST_AVAILABLE_CAPABILITIES_DNG 561 */ 562 public static final Key<Integer> REQUEST_AVAILABLE_CAPABILITIES = 563 new Key<Integer>("android.request.availableCapabilities", int.class); 564 565 /** 566 * <p>A list of all keys that the camera device has available 567 * to use with CaptureRequest.</p> 568 * <p>Attempting to set a key into a CaptureRequest that is not 569 * listed here will result in an invalid request and will be rejected 570 * by the camera device.</p> 571 * <p>This field can be used to query the feature set of a camera device 572 * at a more granular level than capabilities. This is especially 573 * important for optional keys that are not listed under any capability 574 * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p> 575 * <p>TODO: This should be used by #getAvailableCaptureRequestKeys.</p> 576 * 577 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 578 * @hide 579 */ 580 public static final Key<int[]> REQUEST_AVAILABLE_REQUEST_KEYS = 581 new Key<int[]>("android.request.availableRequestKeys", int[].class); 582 583 /** 584 * <p>A list of all keys that the camera device has available 585 * to use with CaptureResult.</p> 586 * <p>Attempting to get a key from a CaptureResult that is not 587 * listed here will always return a <code>null</code> value. Getting a key from 588 * a CaptureResult that is listed here must never return a <code>null</code> 589 * value.</p> 590 * <p>The following keys may return <code>null</code> unless they are enabled:</p> 591 * <ul> 592 * <li>{@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap} (non-null iff {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON)</li> 593 * </ul> 594 * <p>(Those sometimes-null keys should nevertheless be listed here 595 * if they are available.)</p> 596 * <p>This field can be used to query the feature set of a camera device 597 * at a more granular level than capabilities. This is especially 598 * important for optional keys that are not listed under any capability 599 * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p> 600 * <p>TODO: This should be used by #getAvailableCaptureResultKeys.</p> 601 * 602 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 603 * @see CaptureResult#STATISTICS_LENS_SHADING_MAP 604 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 605 * @hide 606 */ 607 public static final Key<int[]> REQUEST_AVAILABLE_RESULT_KEYS = 608 new Key<int[]>("android.request.availableResultKeys", int[].class); 609 610 /** 611 * <p>A list of all keys that the camera device has available 612 * to use with CameraCharacteristics.</p> 613 * <p>This entry follows the same rules as 614 * android.request.availableResultKeys (except that it applies for 615 * CameraCharacteristics instead of CaptureResult). See above for more 616 * details.</p> 617 * <p>TODO: This should be used by CameraCharacteristics#getKeys.</p> 618 * @hide 619 */ 620 public static final Key<int[]> REQUEST_AVAILABLE_CHARACTERISTICS_KEYS = 621 new Key<int[]>("android.request.availableCharacteristicsKeys", int[].class); 622 623 /** 624 * <p>The list of image formats that are supported by this 625 * camera device for output streams.</p> 626 * <p>All camera devices will support JPEG and YUV_420_888 formats.</p> 627 * <p>When set to YUV_420_888, application can access the YUV420 data directly.</p> 628 * @deprecated 629 * @hide 630 */ 631 @Deprecated 632 public static final Key<int[]> SCALER_AVAILABLE_FORMATS = 633 new Key<int[]>("android.scaler.availableFormats", int[].class); 634 635 /** 636 * <p>The minimum frame duration that is supported 637 * for each resolution in android.scaler.availableJpegSizes.</p> 638 * <p>This corresponds to the minimum steady-state frame duration when only 639 * that JPEG stream is active and captured in a burst, with all 640 * processing (typically in android.*.mode) set to FAST.</p> 641 * <p>When multiple streams are configured, the minimum 642 * frame duration will be >= max(individual stream min 643 * durations)</p> 644 * @deprecated 645 * @hide 646 */ 647 @Deprecated 648 public static final Key<long[]> SCALER_AVAILABLE_JPEG_MIN_DURATIONS = 649 new Key<long[]>("android.scaler.availableJpegMinDurations", long[].class); 650 651 /** 652 * <p>The JPEG resolutions that are supported by this camera device.</p> 653 * <p>The resolutions are listed as <code>(width, height)</code> pairs. All camera devices will support 654 * sensor maximum resolution (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}).</p> 655 * 656 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 657 * @deprecated 658 * @hide 659 */ 660 @Deprecated 661 public static final Key<android.hardware.camera2.Size[]> SCALER_AVAILABLE_JPEG_SIZES = 662 new Key<android.hardware.camera2.Size[]>("android.scaler.availableJpegSizes", android.hardware.camera2.Size[].class); 663 664 /** 665 * <p>The maximum ratio between active area width 666 * and crop region width, or between active area height and 667 * crop region height, if the crop region height is larger 668 * than width</p> 669 */ 670 public static final Key<Float> SCALER_AVAILABLE_MAX_DIGITAL_ZOOM = 671 new Key<Float>("android.scaler.availableMaxDigitalZoom", float.class); 672 673 /** 674 * <p>For each available processed output size (defined in 675 * android.scaler.availableProcessedSizes), this property lists the 676 * minimum supportable frame duration for that size.</p> 677 * <p>This should correspond to the frame duration when only that processed 678 * stream is active, with all processing (typically in android.*.mode) 679 * set to FAST.</p> 680 * <p>When multiple streams are configured, the minimum frame duration will 681 * be >= max(individual stream min durations).</p> 682 * @deprecated 683 * @hide 684 */ 685 @Deprecated 686 public static final Key<long[]> SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS = 687 new Key<long[]>("android.scaler.availableProcessedMinDurations", long[].class); 688 689 /** 690 * <p>The resolutions available for use with 691 * processed output streams, such as YV12, NV12, and 692 * platform opaque YUV/RGB streams to the GPU or video 693 * encoders.</p> 694 * <p>The resolutions are listed as <code>(width, height)</code> pairs.</p> 695 * <p>For a given use case, the actual maximum supported resolution 696 * may be lower than what is listed here, depending on the destination 697 * Surface for the image data. For example, for recording video, 698 * the video encoder chosen may have a maximum size limit (e.g. 1080p) 699 * smaller than what the camera (e.g. maximum resolution is 3264x2448) 700 * can provide.</p> 701 * <p>Please reference the documentation for the image data destination to 702 * check if it limits the maximum size for image data.</p> 703 * @deprecated 704 * @hide 705 */ 706 @Deprecated 707 public static final Key<android.hardware.camera2.Size[]> SCALER_AVAILABLE_PROCESSED_SIZES = 708 new Key<android.hardware.camera2.Size[]>("android.scaler.availableProcessedSizes", android.hardware.camera2.Size[].class); 709 710 /** 711 * <p>The mapping of image formats that are supported by this 712 * camera device for input streams, to their corresponding output formats.</p> 713 * <p>All camera devices with at least 1 714 * {@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} will have at least one 715 * available input format.</p> 716 * <p>The camera device will support the following map of formats, 717 * if its dependent capability is supported:</p> 718 * <table> 719 * <thead> 720 * <tr> 721 * <th align="left">Input Format</th> 722 * <th align="left">Output Format</th> 723 * <th align="left">Capability</th> 724 * </tr> 725 * </thead> 726 * <tbody> 727 * <tr> 728 * <td align="left">RAW_OPAQUE</td> 729 * <td align="left">JPEG</td> 730 * <td align="left">ZSL</td> 731 * </tr> 732 * <tr> 733 * <td align="left">RAW_OPAQUE</td> 734 * <td align="left">YUV_420_888</td> 735 * <td align="left">ZSL</td> 736 * </tr> 737 * <tr> 738 * <td align="left">RAW_OPAQUE</td> 739 * <td align="left">RAW16</td> 740 * <td align="left">DNG</td> 741 * </tr> 742 * <tr> 743 * <td align="left">RAW16</td> 744 * <td align="left">YUV_420_888</td> 745 * <td align="left">DNG</td> 746 * </tr> 747 * <tr> 748 * <td align="left">RAW16</td> 749 * <td align="left">JPEG</td> 750 * <td align="left">DNG</td> 751 * </tr> 752 * </tbody> 753 * </table> 754 * <p>For ZSL-capable camera devices, using the RAW_OPAQUE format 755 * as either input or output will never hurt maximum frame rate (i.e. 756 * StreamConfigurationMap#getOutputStallDuration(int,Size) 757 * for a <code>format =</code> RAW_OPAQUE is always 0).</p> 758 * <p>Attempting to configure an input stream with output streams not 759 * listed as available in this map is not valid.</p> 760 * <p>TODO: typedef to ReprocessFormatMap</p> 761 * 762 * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS 763 * @hide 764 */ 765 public static final Key<int[]> SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP = 766 new Key<int[]>("android.scaler.availableInputOutputFormatsMap", int[].class); 767 768 /** 769 * <p>The available stream configurations that this 770 * camera device supports 771 * (i.e. format, width, height, output/input stream).</p> 772 * <p>The configurations are listed as <code>(format, width, height, input?)</code> 773 * tuples.</p> 774 * <p>All camera devices will support sensor maximum resolution (defined by 775 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) for the JPEG format.</p> 776 * <p>For a given use case, the actual maximum supported resolution 777 * may be lower than what is listed here, depending on the destination 778 * Surface for the image data. For example, for recording video, 779 * the video encoder chosen may have a maximum size limit (e.g. 1080p) 780 * smaller than what the camera (e.g. maximum resolution is 3264x2448) 781 * can provide.</p> 782 * <p>Please reference the documentation for the image data destination to 783 * check if it limits the maximum size for image data.</p> 784 * <p>Not all output formats may be supported in a configuration with 785 * an input stream of a particular format. For more details, see 786 * android.scaler.availableInputOutputFormatsMap.</p> 787 * <p>The following table describes the minimum required output stream 788 * configurations based on the hardware level 789 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p> 790 * <table> 791 * <thead> 792 * <tr> 793 * <th align="center">Format</th> 794 * <th align="center">Size</th> 795 * <th align="center">Hardware Level</th> 796 * <th align="center">Notes</th> 797 * </tr> 798 * </thead> 799 * <tbody> 800 * <tr> 801 * <td align="center">JPEG</td> 802 * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td> 803 * <td align="center">Any</td> 804 * <td align="center"></td> 805 * </tr> 806 * <tr> 807 * <td align="center">JPEG</td> 808 * <td align="center">1920x1080 (1080p)</td> 809 * <td align="center">Any</td> 810 * <td align="center">if 1080p <= activeArraySize</td> 811 * </tr> 812 * <tr> 813 * <td align="center">JPEG</td> 814 * <td align="center">1280x720 (720)</td> 815 * <td align="center">Any</td> 816 * <td align="center">if 720p <= activeArraySize</td> 817 * </tr> 818 * <tr> 819 * <td align="center">JPEG</td> 820 * <td align="center">640x480 (480p)</td> 821 * <td align="center">Any</td> 822 * <td align="center">if 480p <= activeArraySize</td> 823 * </tr> 824 * <tr> 825 * <td align="center">JPEG</td> 826 * <td align="center">320x240 (240p)</td> 827 * <td align="center">Any</td> 828 * <td align="center">if 240p <= activeArraySize</td> 829 * </tr> 830 * <tr> 831 * <td align="center">YUV_420_888</td> 832 * <td align="center">all output sizes available for JPEG</td> 833 * <td align="center">FULL</td> 834 * <td align="center"></td> 835 * </tr> 836 * <tr> 837 * <td align="center">YUV_420_888</td> 838 * <td align="center">all output sizes available for JPEG, up to the maximum video size</td> 839 * <td align="center">LIMITED</td> 840 * <td align="center"></td> 841 * </tr> 842 * <tr> 843 * <td align="center">IMPLEMENTATION_DEFINED</td> 844 * <td align="center">same as YUV_420_888</td> 845 * <td align="center">Any</td> 846 * <td align="center"></td> 847 * </tr> 848 * </tbody> 849 * </table> 850 * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional 851 * mandatory stream configurations on a per-capability basis.</p> 852 * 853 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 854 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 855 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 856 * @hide 857 */ 858 public static final Key<android.hardware.camera2.params.StreamConfiguration[]> SCALER_AVAILABLE_STREAM_CONFIGURATIONS = 859 new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.scaler.availableStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class); 860 861 /** 862 * <p>This lists the minimum frame duration for each 863 * format/size combination.</p> 864 * <p>This should correspond to the frame duration when only that 865 * stream is active, with all processing (typically in android.*.mode) 866 * set to either OFF or FAST.</p> 867 * <p>When multiple streams are used in a request, the minimum frame 868 * duration will be max(individual stream min durations).</p> 869 * <p>The minimum frame duration of a stream (of a particular format, size) 870 * is the same regardless of whether the stream is input or output.</p> 871 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and 872 * android.scaler.availableStallDurations for more details about 873 * calculating the max frame rate.</p> 874 * <p>(Keep in sync with 875 * StreamConfigurationMap#getOutputMinFrameDuration)</p> 876 * 877 * @see CaptureRequest#SENSOR_FRAME_DURATION 878 * @hide 879 */ 880 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_MIN_FRAME_DURATIONS = 881 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); 882 883 /** 884 * <p>This lists the maximum stall duration for each 885 * format/size combination.</p> 886 * <p>A stall duration is how much extra time would get added 887 * to the normal minimum frame duration for a repeating request 888 * that has streams with non-zero stall.</p> 889 * <p>For example, consider JPEG captures which have the following 890 * characteristics:</p> 891 * <ul> 892 * <li>JPEG streams act like processed YUV streams in requests for which 893 * they are not included; in requests in which they are directly 894 * referenced, they act as JPEG streams. This is because supporting a 895 * JPEG stream requires the underlying YUV data to always be ready for 896 * use by a JPEG encoder, but the encoder will only be used (and impact 897 * frame duration) on requests that actually reference a JPEG stream.</li> 898 * <li>The JPEG processor can run concurrently to the rest of the camera 899 * pipeline, but cannot process more than 1 capture at a time.</li> 900 * </ul> 901 * <p>In other words, using a repeating YUV request would result 902 * in a steady frame rate (let's say it's 30 FPS). If a single 903 * JPEG request is submitted periodically, the frame rate will stay 904 * at 30 FPS (as long as we wait for the previous JPEG to return each 905 * time). If we try to submit a repeating YUV + JPEG request, then 906 * the frame rate will drop from 30 FPS.</p> 907 * <p>In general, submitting a new request with a non-0 stall time 908 * stream will <em>not</em> cause a frame rate drop unless there are still 909 * outstanding buffers for that stream from previous requests.</p> 910 * <p>Submitting a repeating request with streams (call this <code>S</code>) 911 * is the same as setting the minimum frame duration from 912 * the normal minimum frame duration corresponding to <code>S</code>, added with 913 * the maximum stall duration for <code>S</code>.</p> 914 * <p>If interleaving requests with and without a stall duration, 915 * a request will stall by the maximum of the remaining times 916 * for each can-stall stream with outstanding buffers.</p> 917 * <p>This means that a stalling request will not have an exposure start 918 * until the stall has completed.</p> 919 * <p>This should correspond to the stall duration when only that stream is 920 * active, with all processing (typically in android.*.mode) set to FAST 921 * or OFF. Setting any of the processing modes to HIGH_QUALITY 922 * effectively results in an indeterminate stall duration for all 923 * streams in a request (the regular stall calculation rules are 924 * ignored).</p> 925 * <p>The following formats may always have a stall duration:</p> 926 * <ul> 927 * <li>JPEG</li> 928 * <li>RAW16</li> 929 * </ul> 930 * <p>The following formats will never have a stall duration:</p> 931 * <ul> 932 * <li>YUV_420_888</li> 933 * <li>IMPLEMENTATION_DEFINED</li> 934 * </ul> 935 * <p>All other formats may or may not have an allowed stall duration on 936 * a per-capability basis; refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} 937 * for more details.</p> 938 * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} for more information about 939 * calculating the max frame rate (absent stalls).</p> 940 * <p>(Keep up to date with 941 * StreamConfigurationMap#getOutputStallDuration(int, Size) )</p> 942 * 943 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 944 * @see CaptureRequest#SENSOR_FRAME_DURATION 945 * @hide 946 */ 947 public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_STALL_DURATIONS = 948 new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); 949 950 /** 951 * <p>The available stream configurations that this 952 * camera device supports; also includes the minimum frame durations 953 * and the stall durations for each format/size combination.</p> 954 * <p>All camera devices will support sensor maximum resolution (defined by 955 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) for the JPEG format.</p> 956 * <p>For a given use case, the actual maximum supported resolution 957 * may be lower than what is listed here, depending on the destination 958 * Surface for the image data. For example, for recording video, 959 * the video encoder chosen may have a maximum size limit (e.g. 1080p) 960 * smaller than what the camera (e.g. maximum resolution is 3264x2448) 961 * can provide.</p> 962 * <p>Please reference the documentation for the image data destination to 963 * check if it limits the maximum size for image data.</p> 964 * <p>Not all output formats may be supported in a configuration with 965 * an input stream of a particular format. For more details, see 966 * android.scaler.availableInputOutputFormatsMap.</p> 967 * <p>The following table describes the minimum required output stream 968 * configurations based on the hardware level 969 * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p> 970 * <table> 971 * <thead> 972 * <tr> 973 * <th align="center">Format</th> 974 * <th align="center">Size</th> 975 * <th align="center">Hardware Level</th> 976 * <th align="center">Notes</th> 977 * </tr> 978 * </thead> 979 * <tbody> 980 * <tr> 981 * <td align="center">JPEG</td> 982 * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td> 983 * <td align="center">Any</td> 984 * <td align="center"></td> 985 * </tr> 986 * <tr> 987 * <td align="center">JPEG</td> 988 * <td align="center">1920x1080 (1080p)</td> 989 * <td align="center">Any</td> 990 * <td align="center">if 1080p <= activeArraySize</td> 991 * </tr> 992 * <tr> 993 * <td align="center">JPEG</td> 994 * <td align="center">1280x720 (720)</td> 995 * <td align="center">Any</td> 996 * <td align="center">if 720p <= activeArraySize</td> 997 * </tr> 998 * <tr> 999 * <td align="center">JPEG</td> 1000 * <td align="center">640x480 (480p)</td> 1001 * <td align="center">Any</td> 1002 * <td align="center">if 480p <= activeArraySize</td> 1003 * </tr> 1004 * <tr> 1005 * <td align="center">JPEG</td> 1006 * <td align="center">320x240 (240p)</td> 1007 * <td align="center">Any</td> 1008 * <td align="center">if 240p <= activeArraySize</td> 1009 * </tr> 1010 * <tr> 1011 * <td align="center">YUV_420_888</td> 1012 * <td align="center">all output sizes available for JPEG</td> 1013 * <td align="center">FULL</td> 1014 * <td align="center"></td> 1015 * </tr> 1016 * <tr> 1017 * <td align="center">YUV_420_888</td> 1018 * <td align="center">all output sizes available for JPEG, up to the maximum video size</td> 1019 * <td align="center">LIMITED</td> 1020 * <td align="center"></td> 1021 * </tr> 1022 * <tr> 1023 * <td align="center">IMPLEMENTATION_DEFINED</td> 1024 * <td align="center">same as YUV_420_888</td> 1025 * <td align="center">Any</td> 1026 * <td align="center"></td> 1027 * </tr> 1028 * </tbody> 1029 * </table> 1030 * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional 1031 * mandatory stream configurations on a per-capability basis.</p> 1032 * 1033 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1034 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1035 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 1036 */ 1037 public static final Key<android.hardware.camera2.params.StreamConfigurationMap> SCALER_STREAM_CONFIGURATION_MAP = 1038 new Key<android.hardware.camera2.params.StreamConfigurationMap>("android.scaler.streamConfigurationMap", android.hardware.camera2.params.StreamConfigurationMap.class); 1039 1040 /** 1041 * <p>Area of raw data which corresponds to only 1042 * active pixels.</p> 1043 * <p>It is smaller or equal to 1044 * sensor full pixel array, which could include the black calibration pixels.</p> 1045 */ 1046 public static final Key<android.graphics.Rect> SENSOR_INFO_ACTIVE_ARRAY_SIZE = 1047 new Key<android.graphics.Rect>("android.sensor.info.activeArraySize", android.graphics.Rect.class); 1048 1049 /** 1050 * <p>Range of valid sensitivities</p> 1051 */ 1052 public static final Key<int[]> SENSOR_INFO_SENSITIVITY_RANGE = 1053 new Key<int[]>("android.sensor.info.sensitivityRange", int[].class); 1054 1055 /** 1056 * <p>Arrangement of color filters on sensor; 1057 * represents the colors in the top-left 2x2 section of 1058 * the sensor, in reading order</p> 1059 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB 1060 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG 1061 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG 1062 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR 1063 * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB 1064 */ 1065 public static final Key<Integer> SENSOR_INFO_COLOR_FILTER_ARRANGEMENT = 1066 new Key<Integer>("android.sensor.info.colorFilterArrangement", int.class); 1067 1068 /** 1069 * <p>Range of valid exposure 1070 * times used by {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}.</p> 1071 * 1072 * @see CaptureRequest#SENSOR_EXPOSURE_TIME 1073 */ 1074 public static final Key<long[]> SENSOR_INFO_EXPOSURE_TIME_RANGE = 1075 new Key<long[]>("android.sensor.info.exposureTimeRange", long[].class); 1076 1077 /** 1078 * <p>Maximum possible frame duration (minimum frame 1079 * rate).</p> 1080 * <p>The largest possible {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} 1081 * that will be accepted by the camera device. Attempting to use 1082 * frame durations beyond the maximum will result in the frame duration 1083 * being clipped to the maximum. See that control 1084 * for a full definition of frame durations.</p> 1085 * <p>Refer to 1086 * StreamConfigurationMap#getOutputMinFrameDuration(int,Size) 1087 * for the minimum frame duration values.</p> 1088 * 1089 * @see CaptureRequest#SENSOR_FRAME_DURATION 1090 */ 1091 public static final Key<Long> SENSOR_INFO_MAX_FRAME_DURATION = 1092 new Key<Long>("android.sensor.info.maxFrameDuration", long.class); 1093 1094 /** 1095 * <p>The physical dimensions of the full pixel 1096 * array</p> 1097 * <p>Needed for FOV calculation for old API</p> 1098 */ 1099 public static final Key<float[]> SENSOR_INFO_PHYSICAL_SIZE = 1100 new Key<float[]>("android.sensor.info.physicalSize", float[].class); 1101 1102 /** 1103 * <p>Dimensions of full pixel array, possibly 1104 * including black calibration pixels.</p> 1105 * <p>Maximum output resolution for raw format must 1106 * match this in 1107 * android.scaler.availableStreamConfigurations.</p> 1108 */ 1109 public static final Key<android.hardware.camera2.Size> SENSOR_INFO_PIXEL_ARRAY_SIZE = 1110 new Key<android.hardware.camera2.Size>("android.sensor.info.pixelArraySize", android.hardware.camera2.Size.class); 1111 1112 /** 1113 * <p>Maximum raw value output by sensor.</p> 1114 * <p>This specifies the fully-saturated encoding level for the raw 1115 * sample values from the sensor. This is typically caused by the 1116 * sensor becoming highly non-linear or clipping. The minimum for 1117 * each channel is specified by the offset in the 1118 * {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} tag.</p> 1119 * <p>The white level is typically determined either by sensor bit depth 1120 * (8-14 bits is expected), or by the point where the sensor response 1121 * becomes too non-linear to be useful. The default value for this is 1122 * maximum representable value for a 16-bit raw sample (2^16 - 1).</p> 1123 * 1124 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN 1125 */ 1126 public static final Key<Integer> SENSOR_INFO_WHITE_LEVEL = 1127 new Key<Integer>("android.sensor.info.whiteLevel", int.class); 1128 1129 /** 1130 * <p>The standard reference illuminant used as the scene light source when 1131 * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1}, 1132 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and 1133 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} matrices.</p> 1134 * <p>The values in this tag correspond to the values defined for the 1135 * EXIF LightSource tag. These illuminants are standard light sources 1136 * that are often used calibrating camera devices.</p> 1137 * <p>If this tag is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1}, 1138 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and 1139 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} will also be present.</p> 1140 * <p>Some devices may choose to provide a second set of calibration 1141 * information for improved quality, including 1142 * {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2} and its corresponding matrices.</p> 1143 * 1144 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 1145 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 1146 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX1 1147 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 1148 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT 1149 * @see #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT 1150 * @see #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN 1151 * @see #SENSOR_REFERENCE_ILLUMINANT1_FLASH 1152 * @see #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER 1153 * @see #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER 1154 * @see #SENSOR_REFERENCE_ILLUMINANT1_SHADE 1155 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT 1156 * @see #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT 1157 * @see #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT 1158 * @see #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT 1159 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A 1160 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B 1161 * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C 1162 * @see #SENSOR_REFERENCE_ILLUMINANT1_D55 1163 * @see #SENSOR_REFERENCE_ILLUMINANT1_D65 1164 * @see #SENSOR_REFERENCE_ILLUMINANT1_D75 1165 * @see #SENSOR_REFERENCE_ILLUMINANT1_D50 1166 * @see #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN 1167 */ 1168 public static final Key<Integer> SENSOR_REFERENCE_ILLUMINANT1 = 1169 new Key<Integer>("android.sensor.referenceIlluminant1", int.class); 1170 1171 /** 1172 * <p>The standard reference illuminant used as the scene light source when 1173 * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2}, 1174 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and 1175 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} matrices.</p> 1176 * <p>See {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1} for more details. 1177 * Valid values for this are the same as those given for the first 1178 * reference illuminant.</p> 1179 * <p>If this tag is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2}, 1180 * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and 1181 * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} will also be present.</p> 1182 * 1183 * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 1184 * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 1185 * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX2 1186 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1187 */ 1188 public static final Key<Byte> SENSOR_REFERENCE_ILLUMINANT2 = 1189 new Key<Byte>("android.sensor.referenceIlluminant2", byte.class); 1190 1191 /** 1192 * <p>A per-device calibration transform matrix that maps from the 1193 * reference sensor colorspace to the actual device sensor colorspace.</p> 1194 * <p>This matrix is used to correct for per-device variations in the 1195 * sensor colorspace, and is used for processing raw buffer data.</p> 1196 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and 1197 * contains a per-device calibration transform that maps colors 1198 * from reference sensor color space (i.e. the "golden module" 1199 * colorspace) into this camera device's native sensor color 1200 * space under the first reference illuminant 1201 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p> 1202 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1203 * 1204 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1205 */ 1206 public static final Key<Rational[]> SENSOR_CALIBRATION_TRANSFORM1 = 1207 new Key<Rational[]>("android.sensor.calibrationTransform1", Rational[].class); 1208 1209 /** 1210 * <p>A per-device calibration transform matrix that maps from the 1211 * reference sensor colorspace to the actual device sensor colorspace 1212 * (this is the colorspace of the raw buffer data).</p> 1213 * <p>This matrix is used to correct for per-device variations in the 1214 * sensor colorspace, and is used for processing raw buffer data.</p> 1215 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and 1216 * contains a per-device calibration transform that maps colors 1217 * from reference sensor color space (i.e. the "golden module" 1218 * colorspace) into this camera device's native sensor color 1219 * space under the second reference illuminant 1220 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p> 1221 * <p>This matrix will only be present if the second reference 1222 * illuminant is present.</p> 1223 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1224 * 1225 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 1226 */ 1227 public static final Key<Rational[]> SENSOR_CALIBRATION_TRANSFORM2 = 1228 new Key<Rational[]>("android.sensor.calibrationTransform2", Rational[].class); 1229 1230 /** 1231 * <p>A matrix that transforms color values from CIE XYZ color space to 1232 * reference sensor color space.</p> 1233 * <p>This matrix is used to convert from the standard CIE XYZ color 1234 * space to the reference sensor colorspace, and is used when processing 1235 * raw buffer data.</p> 1236 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and 1237 * contains a color transform matrix that maps colors from the CIE 1238 * XYZ color space to the reference sensor color space (i.e. the 1239 * "golden module" colorspace) under the first reference illuminant 1240 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p> 1241 * <p>The white points chosen in both the reference sensor color space 1242 * and the CIE XYZ colorspace when calculating this transform will 1243 * match the standard white point for the first reference illuminant 1244 * (i.e. no chromatic adaptation will be applied by this transform).</p> 1245 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1246 * 1247 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1248 */ 1249 public static final Key<Rational[]> SENSOR_COLOR_TRANSFORM1 = 1250 new Key<Rational[]>("android.sensor.colorTransform1", Rational[].class); 1251 1252 /** 1253 * <p>A matrix that transforms color values from CIE XYZ color space to 1254 * reference sensor color space.</p> 1255 * <p>This matrix is used to convert from the standard CIE XYZ color 1256 * space to the reference sensor colorspace, and is used when processing 1257 * raw buffer data.</p> 1258 * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and 1259 * contains a color transform matrix that maps colors from the CIE 1260 * XYZ color space to the reference sensor color space (i.e. the 1261 * "golden module" colorspace) under the second reference illuminant 1262 * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p> 1263 * <p>The white points chosen in both the reference sensor color space 1264 * and the CIE XYZ colorspace when calculating this transform will 1265 * match the standard white point for the second reference illuminant 1266 * (i.e. no chromatic adaptation will be applied by this transform).</p> 1267 * <p>This matrix will only be present if the second reference 1268 * illuminant is present.</p> 1269 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1270 * 1271 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 1272 */ 1273 public static final Key<Rational[]> SENSOR_COLOR_TRANSFORM2 = 1274 new Key<Rational[]>("android.sensor.colorTransform2", Rational[].class); 1275 1276 /** 1277 * <p>A matrix that transforms white balanced camera colors from the reference 1278 * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p> 1279 * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and 1280 * is used when processing raw buffer data.</p> 1281 * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains 1282 * a color transform matrix that maps white balanced colors from the 1283 * reference sensor color space to the CIE XYZ color space with a D50 white 1284 * point.</p> 1285 * <p>Under the first reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}) 1286 * this matrix is chosen so that the standard white point for this reference 1287 * illuminant in the reference sensor colorspace is mapped to D50 in the 1288 * CIE XYZ colorspace.</p> 1289 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1290 * 1291 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 1292 */ 1293 public static final Key<Rational[]> SENSOR_FORWARD_MATRIX1 = 1294 new Key<Rational[]>("android.sensor.forwardMatrix1", Rational[].class); 1295 1296 /** 1297 * <p>A matrix that transforms white balanced camera colors from the reference 1298 * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p> 1299 * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and 1300 * is used when processing raw buffer data.</p> 1301 * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains 1302 * a color transform matrix that maps white balanced colors from the 1303 * reference sensor color space to the CIE XYZ color space with a D50 white 1304 * point.</p> 1305 * <p>Under the second reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}) 1306 * this matrix is chosen so that the standard white point for this reference 1307 * illuminant in the reference sensor colorspace is mapped to D50 in the 1308 * CIE XYZ colorspace.</p> 1309 * <p>This matrix will only be present if the second reference 1310 * illuminant is present.</p> 1311 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1312 * 1313 * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 1314 */ 1315 public static final Key<Rational[]> SENSOR_FORWARD_MATRIX2 = 1316 new Key<Rational[]>("android.sensor.forwardMatrix2", Rational[].class); 1317 1318 /** 1319 * <p>Gain factor from electrons to raw units when 1320 * ISO=100</p> 1321 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1322 * <p><b>Full capability</b> - 1323 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 1324 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1325 * 1326 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1327 */ 1328 public static final Key<Rational> SENSOR_BASE_GAIN_FACTOR = 1329 new Key<Rational>("android.sensor.baseGainFactor", Rational.class); 1330 1331 /** 1332 * <p>A fixed black level offset for each of the color filter arrangement 1333 * (CFA) mosaic channels.</p> 1334 * <p>This tag specifies the zero light value for each of the CFA mosaic 1335 * channels in the camera sensor. The maximal value output by the 1336 * sensor is represented by the value in {@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}.</p> 1337 * <p>The values are given in row-column scan order, with the first value 1338 * corresponding to the element of the CFA in row=0, column=0.</p> 1339 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1340 * 1341 * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL 1342 */ 1343 public static final Key<int[]> SENSOR_BLACK_LEVEL_PATTERN = 1344 new Key<int[]>("android.sensor.blackLevelPattern", int[].class); 1345 1346 /** 1347 * <p>Maximum sensitivity that is implemented 1348 * purely through analog gain.</p> 1349 * <p>For {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} values less than or 1350 * equal to this, all applied gain must be analog. For 1351 * values above this, the gain applied can be a mix of analog and 1352 * digital.</p> 1353 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1354 * <p><b>Full capability</b> - 1355 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 1356 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1357 * 1358 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1359 * @see CaptureRequest#SENSOR_SENSITIVITY 1360 */ 1361 public static final Key<Integer> SENSOR_MAX_ANALOG_SENSITIVITY = 1362 new Key<Integer>("android.sensor.maxAnalogSensitivity", int.class); 1363 1364 /** 1365 * <p>Clockwise angle through which the output 1366 * image needs to be rotated to be upright on the device 1367 * screen in its native orientation. Also defines the 1368 * direction of rolling shutter readout, which is from top 1369 * to bottom in the sensor's coordinate system</p> 1370 */ 1371 public static final Key<Integer> SENSOR_ORIENTATION = 1372 new Key<Integer>("android.sensor.orientation", int.class); 1373 1374 /** 1375 * <p>Optional. Defaults to [OFF]. Lists the supported test 1376 * pattern modes for {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}.</p> 1377 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1378 * 1379 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 1380 */ 1381 public static final Key<int[]> SENSOR_AVAILABLE_TEST_PATTERN_MODES = 1382 new Key<int[]>("android.sensor.availableTestPatternModes", int[].class); 1383 1384 /** 1385 * <p>Which face detection modes are available, 1386 * if any</p> 1387 * <p>OFF means face detection is disabled, it must 1388 * be included in the list.</p> 1389 * <p>SIMPLE means the device supports the 1390 * android.statistics.faceRectangles and 1391 * android.statistics.faceScores outputs.</p> 1392 * <p>FULL means the device additionally supports the 1393 * android.statistics.faceIds and 1394 * android.statistics.faceLandmarks outputs.</p> 1395 */ 1396 public static final Key<byte[]> STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES = 1397 new Key<byte[]>("android.statistics.info.availableFaceDetectModes", byte[].class); 1398 1399 /** 1400 * <p>Maximum number of simultaneously detectable 1401 * faces</p> 1402 */ 1403 public static final Key<Integer> STATISTICS_INFO_MAX_FACE_COUNT = 1404 new Key<Integer>("android.statistics.info.maxFaceCount", int.class); 1405 1406 /** 1407 * <p>The set of hot pixel map output modes supported by this camera device.</p> 1408 * <p>This tag lists valid output modes for {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode}.</p> 1409 * <p>If no hotpixel map is available for this camera device, this will contain 1410 * only OFF. If the hotpixel map is available, this should include both 1411 * the ON and OFF options.</p> 1412 * 1413 * @see CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE 1414 */ 1415 public static final Key<boolean[]> STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES = 1416 new Key<boolean[]>("android.statistics.info.availableHotPixelMapModes", boolean[].class); 1417 1418 /** 1419 * <p>Maximum number of supported points in the 1420 * tonemap curve that can be used for {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed}, or 1421 * {@link CaptureRequest#TONEMAP_CURVE_GREEN android.tonemap.curveGreen}, or {@link CaptureRequest#TONEMAP_CURVE_BLUE android.tonemap.curveBlue}.</p> 1422 * <p>If the actual number of points provided by the application (in 1423 * android.tonemap.curve*) is less than max, the camera device will 1424 * resample the curve to its internal representation, using linear 1425 * interpolation.</p> 1426 * <p>The output curves in the result metadata may have a different number 1427 * of points than the input curves, and will represent the actual 1428 * hardware curves used as closely as possible when linearly interpolated.</p> 1429 * 1430 * @see CaptureRequest#TONEMAP_CURVE_BLUE 1431 * @see CaptureRequest#TONEMAP_CURVE_GREEN 1432 * @see CaptureRequest#TONEMAP_CURVE_RED 1433 */ 1434 public static final Key<Integer> TONEMAP_MAX_CURVE_POINTS = 1435 new Key<Integer>("android.tonemap.maxCurvePoints", int.class); 1436 1437 /** 1438 * <p>The set of tonemapping modes supported by this camera device.</p> 1439 * <p>This tag lists the valid modes for {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}.</p> 1440 * <p>Full-capability camera devices must always support CONTRAST_CURVE and 1441 * FAST.</p> 1442 * 1443 * @see CaptureRequest#TONEMAP_MODE 1444 */ 1445 public static final Key<byte[]> TONEMAP_AVAILABLE_TONE_MAP_MODES = 1446 new Key<byte[]>("android.tonemap.availableToneMapModes", byte[].class); 1447 1448 /** 1449 * <p>A list of camera LEDs that are available on this system.</p> 1450 * @see #LED_AVAILABLE_LEDS_TRANSMIT 1451 * @hide 1452 */ 1453 public static final Key<int[]> LED_AVAILABLE_LEDS = 1454 new Key<int[]>("android.led.availableLeds", int[].class); 1455 1456 /** 1457 * <p>Generally classifies the overall set of the camera device functionality.</p> 1458 * <p>Camera devices will come in two flavors: LIMITED and FULL.</p> 1459 * <p>A FULL device has the most support possible and will enable the 1460 * widest range of use cases such as:</p> 1461 * <ul> 1462 * <li>30 FPS at maximum resolution (== sensor resolution)</li> 1463 * <li>Per frame control</li> 1464 * <li>Manual sensor control</li> 1465 * <li>Zero Shutter Lag (ZSL)</li> 1466 * </ul> 1467 * <p>A LIMITED device may have some or none of the above characteristics. 1468 * To find out more refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p> 1469 * 1470 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 1471 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED 1472 * @see #INFO_SUPPORTED_HARDWARE_LEVEL_FULL 1473 */ 1474 public static final Key<Integer> INFO_SUPPORTED_HARDWARE_LEVEL = 1475 new Key<Integer>("android.info.supportedHardwareLevel", int.class); 1476 1477 /** 1478 * <p>The maximum number of frames that can occur after a request 1479 * (different than the previous) has been submitted, and before the 1480 * result's state becomes synchronized (by setting 1481 * android.sync.frameNumber to a non-negative value).</p> 1482 * <p>This defines the maximum distance (in number of metadata results), 1483 * between android.sync.frameNumber and the equivalent 1484 * android.request.frameCount.</p> 1485 * <p>In other words this acts as an upper boundary for how many frames 1486 * must occur before the camera device knows for a fact that the new 1487 * submitted camera settings have been applied in outgoing frames.</p> 1488 * <p>For example if the distance was 2,</p> 1489 * <pre><code>initial request = X (repeating) 1490 * request1 = X 1491 * request2 = Y 1492 * request3 = Y 1493 * request4 = Y 1494 * 1495 * where requestN has frameNumber N, and the first of the repeating 1496 * initial request's has frameNumber F (and F < 1). 1497 * 1498 * initial result = X' + { android.sync.frameNumber == F } 1499 * result1 = X' + { android.sync.frameNumber == F } 1500 * result2 = X' + { android.sync.frameNumber == CONVERGING } 1501 * result3 = X' + { android.sync.frameNumber == CONVERGING } 1502 * result4 = X' + { android.sync.frameNumber == 2 } 1503 * 1504 * where resultN has frameNumber N. 1505 * </code></pre> 1506 * <p>Since <code>result4</code> has a <code>frameNumber == 4</code> and 1507 * <code>android.sync.frameNumber == 2</code>, the distance is clearly 1508 * <code>4 - 2 = 2</code>.</p> 1509 * @see #SYNC_MAX_LATENCY_PER_FRAME_CONTROL 1510 * @see #SYNC_MAX_LATENCY_UNKNOWN 1511 */ 1512 public static final Key<Integer> SYNC_MAX_LATENCY = 1513 new Key<Integer>("android.sync.maxLatency", int.class); 1514 1515 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 1516 * End generated code 1517 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/ 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527} 1528