FileDocCategorySizeDatePackage
CameraCharacteristics.javaAPI DocAndroid 5.1 API127720Thu Mar 12 22:22:10 GMT 2015android.hardware.camera2

CameraCharacteristics

public final class CameraCharacteristics extends CameraMetadata

The properties describing a {@link CameraDevice CameraDevice}.

These properties are fixed for a given CameraDevice, and can be queried through the {@link CameraManager CameraManager} interface with {@link CameraManager#getCameraCharacteristics}.

{@link CameraCharacteristics} objects are immutable.

see
CameraDevice
see
CameraManager

Fields Summary
private final android.hardware.camera2.impl.CameraMetadataNative
mProperties
private List
mKeys
private List
mAvailableRequestKeys
private List
mAvailableResultKeys
public static final Key
COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES

List of aberration correction modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode} that are supported by this camera device.

This key lists the valid modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}. If no aberration correction modes are available for a device, this list will solely include OFF mode. All camera devices will support either OFF or FAST mode.

Camera devices that support the MANUAL_POST_PROCESSING capability will always list OFF mode. This includes all FULL level devices.

LEGACY devices will always only support FAST mode.

Range of valid values:
Any value listed in {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}

This key is available on all devices.

public static final Key
CONTROL_AE_AVAILABLE_ANTIBANDING_MODES

List of auto-exposure antibanding modes for {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} that are supported by this camera device.

Not all of the auto-exposure anti-banding modes may be supported by a given camera device. This field lists the valid anti-banding modes that the application may request for this camera device with the {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} control.

Range of valid values:
Any value listed in {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode}

This key is available on all devices.

public static final Key
CONTROL_AE_AVAILABLE_MODES

List of auto-exposure modes for {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} that are supported by this camera device.

Not all the auto-exposure modes may be supported by a given camera device, especially if no flash unit is available. This entry lists the valid modes for {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} for this camera device.

All camera devices support ON, and all camera devices with flash units support ON_AUTO_FLASH and ON_ALWAYS_FLASH.

FULL mode camera devices always support OFF mode, which enables application control of camera exposure time, sensitivity, and frame duration.

LEGACY mode camera devices never support OFF mode. LIMITED mode devices support OFF if they support the MANUAL_SENSOR capability.

Range of valid values:
Any value listed in {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}

This key is available on all devices.

public static final Key
CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES

List of frame rate ranges for {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} supported by this camera device.

For devices at the LIMITED level or above, this list will include at least (30, 30) for constant-framerate recording.

Units: Frames per second (FPS)

This key is available on all devices.

public static final Key
CONTROL_AE_COMPENSATION_RANGE

Maximum and minimum exposure compensation values for {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}, in counts of {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep}, that are supported by this camera device.

Range of valid values:

Range [0,0] indicates that exposure compensation is not supported.

For LIMITED and FULL devices, range must follow below requirements if exposure compensation is supported (range != [0, 0]):

Min.exposure compensation * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} <= -2 EV

Max.exposure compensation * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} >= 2 EV

LEGACY devices may support a smaller range than this.

This key is available on all devices.

public static final Key
CONTROL_AE_COMPENSATION_STEP

Smallest step by which the exposure compensation can be changed.

This is the unit for {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}. For example, if this key has a value of 1/2, then a setting of -2 for {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation} means that the target EV offset for the auto-exposure routine is -1 EV.

One unit of EV compensation changes the brightness of the captured image by a factor of two. +1 EV doubles the image brightness, while -1 EV halves the image brightness.

Units: Exposure Value (EV)

This key is available on all devices.

public static final Key
CONTROL_AF_AVAILABLE_MODES

List of auto-focus (AF) modes for {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} that are supported by this camera device.

Not all the auto-focus modes may be supported by a given camera device. This entry lists the valid modes for {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} for this camera device.

All LIMITED and FULL mode camera devices will support OFF mode, and all camera devices with adjustable focuser units ({@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} > 0) will support AUTO mode.

LEGACY devices will support OFF mode only if they support focusing to infinity (by also setting {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} to 0.0f).

Range of valid values:
Any value listed in {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}

This key is available on all devices.

public static final Key
CONTROL_AVAILABLE_EFFECTS

List of color effects for {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode} that are supported by this camera device.

This list contains the color effect modes that can be applied to images produced by the camera device. Implementations are not expected to be consistent across all devices. If no color effect modes are available for a device, this will only list OFF.

A color effect will only be applied if {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF. OFF is always included in this list.

This control has no effect on the operation of other control routines such as auto-exposure, white balance, or focus.

Range of valid values:
Any value listed in {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}

This key is available on all devices.

public static final Key
CONTROL_AVAILABLE_SCENE_MODES

List of scene modes for {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} that are supported by this camera device.

This list contains scene modes that can be set for the camera device. Only scene modes that have been fully implemented for the camera device may be included here. Implementations are not expected to be consistent across all devices.

If no scene modes are supported by the camera device, this will be set to DISABLED. Otherwise DISABLED will not be listed.

FACE_PRIORITY is always listed if face detection is supported (i.e.{@link CameraCharacteristics#STATISTICS_INFO_MAX_FACE_COUNT android.statistics.info.maxFaceCount} > 0).

Range of valid values:
Any value listed in {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode}

This key is available on all devices.

public static final Key
CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES

List of video stabilization modes for {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode} that are supported by this camera device.

OFF will always be listed.

Range of valid values:
Any value listed in {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}

This key is available on all devices.

public static final Key
CONTROL_AWB_AVAILABLE_MODES

List of auto-white-balance modes for {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} that are supported by this camera device.

Not all the auto-white-balance modes may be supported by a given camera device. This entry lists the valid modes for {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} for this camera device.

All camera devices will support ON mode.

Camera devices that support the MANUAL_POST_PROCESSING capability will always support OFF mode, which enables application control of white balance, by using {@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 mode camera devices.

Range of valid values:
Any value listed in {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}

This key is available on all devices.

public static final Key
CONTROL_MAX_REGIONS

List of the maximum number of regions that can be used for metering in auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF); this corresponds to the the maximum number of elements in {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}, {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}, and {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.

Range of valid values:

Value must be >= 0 for each element. For full-capability devices this value must be >= 1 for AE and AF. The order of the elements is: (AE, AWB, AF).

This key is available on all devices.

public static final Key
CONTROL_MAX_REGIONS_AE

The maximum number of metering regions that can be used by the auto-exposure (AE) routine.

This corresponds to the the maximum allowed number of elements in {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}.

Range of valid values:
Value will be >= 0. For FULL-capability devices, this value will be >= 1.

This key is available on all devices.

public static final Key
CONTROL_MAX_REGIONS_AWB

The maximum number of metering regions that can be used by the auto-white balance (AWB) routine.

This corresponds to the the maximum allowed number of elements in {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}.

Range of valid values:
Value will be >= 0.

This key is available on all devices.

public static final Key
CONTROL_MAX_REGIONS_AF

The maximum number of metering regions that can be used by the auto-focus (AF) routine.

This corresponds to the the maximum allowed number of elements in {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.

Range of valid values:
Value will be >= 0. For FULL-capability devices, this value will be >= 1.

This key is available on all devices.

public static final Key
CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS

List of available high speed video size and fps range configurations supported by the camera device, in the format of (width, height, fps_min, fps_max).

When HIGH_SPEED_VIDEO is supported in {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}, this metadata will list the supported high speed video size and fps range configurations. All the sizes listed in this configuration will be a subset of the sizes reported by StreamConfigurationMap#getOutputSizes for processed non-stalling formats.

For the high speed video use case, where the application will set {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} to HIGH_SPEED_VIDEO in capture requests, the application must select the video size and fps range from this metadata to configure the recording and preview streams and setup the recording requests. For example, if the application intends to do high speed recording, it can select the maximum size reported by this metadata to configure output streams. Once the size is selected, application can filter this metadata by selected size and get the supported fps ranges, and use these fps ranges to setup the recording requests. Note that for the use case of multiple output streams, application must select one unique size from this metadata to use. Otherwise a request error might occur.

For normal video recording use case, where some application will NOT set {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} to HIGH_SPEED_VIDEO in capture requests, the fps ranges reported in this metadata must not be used to setup capture requests, or it will cause request error.

Range of valid values:

For each configuration, the fps_max >= 60fps.

Optional - This value may be {@code null} on some devices.

Limited capability - Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key

public static final Key
EDGE_AVAILABLE_EDGE_MODES

List of edge enhancement modes for {@link CaptureRequest#EDGE_MODE android.edge.mode} that are supported by this camera device.

Full-capability camera devices must always support OFF; all devices will list FAST.

Range of valid values:
Any value listed in {@link CaptureRequest#EDGE_MODE android.edge.mode}

Optional - This value may be {@code null} on some devices.

Full capability - Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key

public static final Key
FLASH_INFO_AVAILABLE

Whether this camera device has a flash unit.

Will be false if no flash is available.

If there is no flash unit, none of the flash controls do anything. This key is available on all devices.

public static final Key
HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES

List of hot pixel correction modes for {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode} that are supported by this camera device.

FULL mode camera devices will always support FAST.

Range of valid values:
Any value listed in {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode}

Optional - This value may be {@code null} on some devices.

public static final Key
JPEG_AVAILABLE_THUMBNAIL_SIZES

List of JPEG thumbnail sizes for {@link CaptureRequest#JPEG_THUMBNAIL_SIZE android.jpeg.thumbnailSize} supported by this camera device.

This list will include at least one non-zero resolution, plus (0,0) for indicating no thumbnail should be generated.

Below condiditions will be satisfied for this size list:

  • The sizes will be sorted by increasing pixel area (width x height). If several resolutions have the same area, they will be sorted by increasing width.
  • The aspect ratio of the largest thumbnail size will be same as the aspect ratio of largest JPEG output size in android.scaler.availableStreamConfigurations. The largest size is defined as the size that has the largest pixel area in a given size list.
  • Each output JPEG size in android.scaler.availableStreamConfigurations will have at least one corresponding size that has the same aspect ratio in availableThumbnailSizes, and vice versa.
  • All non-(0, 0) sizes will have non-zero widths and heights. This key is available on all devices.
public static final Key
LENS_INFO_AVAILABLE_APERTURES

List of aperture size values for {@link CaptureRequest#LENS_APERTURE android.lens.aperture} that are supported by this camera device.

If the camera device doesn't support a variable lens aperture, this list will contain only one value, which is the fixed aperture size.

If the camera device supports a variable aperture, the aperture values in this list will be sorted in ascending order.

Units: The aperture f-number

Optional - This value may be {@code null} on some devices.

Full capability - Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key

public static final Key
LENS_INFO_AVAILABLE_FILTER_DENSITIES

List of neutral density filter values for {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} that are supported by this camera device.

If a neutral density filter is not supported by this camera device, this list will contain only 0. Otherwise, this list will include every filter density supported by the camera device, in ascending order.

Units: Exposure value (EV)

Range of valid values:

Values are >= 0

Optional - This value may be {@code null} on some devices.

Full capability - Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key

public static final Key
LENS_INFO_AVAILABLE_FOCAL_LENGTHS

List of focal lengths for {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength} that are supported by this camera device.

If optical zoom is not supported, this list will only contain a single value corresponding to the fixed focal length of the device. Otherwise, this list will include every focal length supported by the camera device, in ascending order.

Units: Millimeters

Range of valid values:

Values are > 0

This key is available on all devices.

public static final Key
LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION

List of optical image stabilization (OIS) modes for {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} that are supported by this camera device.

If OIS is not supported by a given camera device, this list will contain only OFF.

Range of valid values:
Any value listed in {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}

Optional - This value may be {@code null} on some devices.

Limited capability - Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key

public static final Key
LENS_INFO_HYPERFOCAL_DISTANCE

Hyperfocal distance for this lens.

If the lens is not fixed focus, the camera device will report this field when {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} is APPROXIMATE or CALIBRATED.

Units: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details

Range of valid values:
If lens is fixed focus, >= 0. If lens has focuser unit, the value is within (0.0f, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]

Optional - This value may be {@code null} on some devices.

Limited capability - Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key

public static final Key
LENS_INFO_MINIMUM_FOCUS_DISTANCE

Shortest distance from frontmost surface of the lens that can be brought into sharp focus.

If the lens is fixed-focus, this will be 0.

Units: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details

Range of valid values:
>= 0

Optional - This value may be {@code null} on some devices.

Limited capability - Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key

public static final Key
LENS_INFO_SHADING_MAP_SIZE

Dimensions of lens shading map.

The map should be on the order of 30-40 rows and columns, and must be smaller than 64x64.

Range of valid values:
Both values >= 1

Optional - This value may be {@code null} on some devices.

Full capability - Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key

public static final Key
LENS_INFO_FOCUS_DISTANCE_CALIBRATION

The lens focus distance calibration quality.

The lens focus distance calibration quality determines the reliability of focus related metadata entries, i.e. {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}, {@link CaptureResult#LENS_FOCUS_RANGE android.lens.focusRange}, {@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}, and {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}.

APPROXIMATE and CALIBRATED devices report the focus metadata in units of diopters (1/meter), so 0.0f represents focusing at infinity, and increasing positive numbers represent focusing closer and closer to the camera device. The focus distance control also uses diopters on these devices.

UNCALIBRATED devices do not use units that are directly comparable to any real physical measurement, but 0.0f still represents farthest focus, and {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} represents the nearest focus the device can achieve.

Possible values:

  • {@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED UNCALIBRATED}
  • {@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE APPROXIMATE}
  • {@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED CALIBRATED}

Optional - This value may be {@code null} on some devices.

Limited capability - Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key

public static final Key
LENS_FACING

Direction the camera faces relative to device screen.

Possible values:

  • {@link #LENS_FACING_FRONT FRONT}
  • {@link #LENS_FACING_BACK BACK}

This key is available on all devices.

public static final Key
NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES

List of noise reduction modes for {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode} that are supported by this camera device.

Full-capability camera devices will always support OFF and FAST.

Legacy-capability camera devices will only support FAST mode.

Range of valid values:
Any value listed in {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}

Optional - This value may be {@code null} on some devices.

Limited capability - Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key

public static final Key
QUIRKS_USE_PARTIAL_RESULT

If set to 1, the HAL will always split result metadata for a single capture into multiple buffers, returned using multiple process_capture_result calls.

Does not need to be listed in static metadata. Support for partial results will be reworked in future versions of camera service. This quirk will stop working at that point; DO NOT USE without careful consideration of future support.

Optional - This value may be {@code null} on some devices.

public static final Key
REQUEST_MAX_NUM_OUTPUT_STREAMS

The maximum numbers of different types of output streams that can be configured and used simultaneously by a camera device.

This is a 3 element tuple that contains the max number of output simultaneous streams for raw sensor, processed (but not stalling), and processed (and stalling) formats respectively. For example, assuming that JPEG is typically a processed and stalling stream, if max raw sensor format output stream number is 1, max YUV streams number is 3, and max JPEG stream number is 2, then this tuple should be (1, 3, 2).

This lists the upper bound of the number of output streams supported by the camera device. Using more streams simultaneously may require more hardware and CPU resources that will consume more power. The image format for an output stream can be any supported format provided by android.scaler.availableStreamConfigurations. The formats defined in android.scaler.availableStreamConfigurations can be catergorized into the 3 stream types as below:

  • Processed (but stalling): any non-RAW format with a stallDurations > 0. Typically JPEG format (ImageFormat#JPEG).
  • Raw formats: ImageFormat#RAW_SENSOR, ImageFormat#RAW10 and ImageFormat#RAW_OPAQUE.
  • Processed (but not-stalling): any non-RAW format without a stall duration. Typically ImageFormat#YUV_420_888, ImageFormat#NV21, ImageFormat#YV12.

Range of valid values:

For processed (and stalling) format streams, >= 1.

For Raw format (either stalling or non-stalling) streams, >= 0.

For processed (but not stalling) format streams, >= 3 for FULL mode devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL); >= 2 for LIMITED mode devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == LIMITED).

This key is available on all devices.

public static final Key
REQUEST_MAX_NUM_OUTPUT_RAW

The maximum numbers of different types of output streams that can be configured and used simultaneously by a camera device for any RAW formats.

This value contains the max number of output simultaneous streams from the raw sensor.

This lists the upper bound of the number of output streams supported by the camera device. Using more streams simultaneously may require more hardware and CPU resources that will consume more power. The image format for this kind of an output stream can be any RAW and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.

In particular, a RAW format is typically one of:

  • ImageFormat#RAW_SENSOR
  • ImageFormat#RAW10
  • Opaque RAW

LEGACY mode devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == LEGACY) never support raw streams.

Range of valid values:

>= 0

This key is available on all devices.

public static final Key
REQUEST_MAX_NUM_OUTPUT_PROC

The maximum numbers of different types of output streams that can be configured and used simultaneously by a camera device for any processed (but not-stalling) formats.

This value contains the max number of output simultaneous streams for any processed (but not-stalling) formats.

This lists the upper bound of the number of output streams supported by the camera device. Using more streams simultaneously may require more hardware and CPU resources that will consume more power. The image format for this kind of an output stream can be any non-RAW and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.

Processed (but not-stalling) is defined as any non-RAW format without a stall duration. Typically:

  • ImageFormat#YUV_420_888
  • ImageFormat#NV21
  • ImageFormat#YV12
  • Implementation-defined formats, i.e. StreamConfiguration#isOutputSupportedFor(Class)

For full guarantees, query StreamConfigurationMap#getOutputStallDuration with a processed format -- it will return 0 for a non-stalling stream.

LEGACY devices will support at least 2 processing/non-stalling streams.

Range of valid values:

>= 3 for FULL mode devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL); >= 2 for LIMITED mode devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == LIMITED).

This key is available on all devices.

public static final Key
REQUEST_MAX_NUM_OUTPUT_PROC_STALLING

The maximum numbers of different types of output streams that can be configured and used simultaneously by a camera device for any processed (and stalling) formats.

This value contains the max number of output simultaneous streams for any processed (but not-stalling) formats.

This lists the upper bound of the number of output streams supported by the camera device. Using more streams simultaneously may require more hardware and CPU resources that will consume more power. The image format for this kind of an output stream can be any non-RAW and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.

A processed and stalling format is defined as any non-RAW format with a stallDurations > 0. Typically only the JPEG format (ImageFormat#JPEG) is a stalling format.

For full guarantees, query StreamConfigurationMap#getOutputStallDuration with a processed format -- it will return a non-0 value for a stalling stream.

LEGACY devices will support up to 1 processing/stalling stream.

Range of valid values:

>= 1

This key is available on all devices.

public static final Key
REQUEST_MAX_NUM_INPUT_STREAMS

The maximum numbers of any type of input streams that can be configured and used simultaneously by a camera device.

When set to 0, it means no input stream is supported.

The image format for a input stream can be any supported format provided by android.scaler.availableInputOutputFormatsMap. When using an input stream, there must be at least one output stream configured to to receive the reprocessed images.

For example, for Zero Shutter Lag (ZSL) still capture use case, the input stream image format will be RAW_OPAQUE, the associated output stream image format should be JPEG.

Range of valid values:

0 or 1.

Optional - This value may be {@code null} on some devices.

Full capability - Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key

public static final Key
REQUEST_PIPELINE_MAX_DEPTH

Specifies the number of maximum pipeline stages a frame has to go through from when it's exposed to when it's available to the framework.

A typical minimum value for this is 2 (one stage to expose, one stage to readout) from the sensor. The ISP then usually adds its own stages to do custom HW processing. Further stages may be added by SW processing.

Depending on what settings are used (e.g. YUV, JPEG) and what processing is enabled (e.g. face detection), the actual pipeline depth (specified by {@link CaptureResult#REQUEST_PIPELINE_DEPTH android.request.pipelineDepth}) may be less than the max pipeline depth.

A pipeline depth of X stages is equivalent to a pipeline latency of X frame intervals.

This value will be 8 or less.

This key is available on all devices.

public static final Key
REQUEST_PARTIAL_RESULT_COUNT

Defines how many sub-components a result will be composed of.

In order to combat the pipeline latency, partial results may be delivered to the application layer from the camera device as soon as they are available.

Optional; defaults to 1. A value of 1 means that partial results are not supported, and only the final TotalCaptureResult will be produced by the camera device.

A typical use case for this might be: after requesting an auto-focus (AF) lock the new AF state might be available 50% of the way through the pipeline. The camera device could then immediately dispatch this state via a partial result to the application, and the rest of the metadata via later partial results.

Range of valid values:
>= 1

Optional - This value may be {@code null} on some devices.

public static final Key
REQUEST_AVAILABLE_CAPABILITIES

List of capabilities that this camera device advertises as fully supporting.

A capability is a contract that the camera device makes in order to be able to satisfy one or more use cases.

Listing a capability guarantees that the whole set of features required to support a common use will all be available.

Using a subset of the functionality provided by an unsupported capability may be possible on a specific camera device implementation; to do this query each of android.request.availableRequestKeys, android.request.availableResultKeys, android.request.availableCharacteristicsKeys.

The following capabilities are guaranteed to be available on {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL devices:

  • MANUAL_SENSOR
  • MANUAL_POST_PROCESSING

Other capabilities may be available on either FULL or LIMITED devices, but the application should query this key to be sure.

Possible values:

  • {@link #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE BACKWARD_COMPATIBLE}
  • {@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR MANUAL_SENSOR}
  • {@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING MANUAL_POST_PROCESSING}
  • {@link #REQUEST_AVAILABLE_CAPABILITIES_RAW RAW}
  • {@link #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS READ_SENSOR_SETTINGS}
  • {@link #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE BURST_CAPTURE}

This key is available on all devices.

public static final Key
REQUEST_AVAILABLE_REQUEST_KEYS

A list of all keys that the camera device has available to use with CaptureRequest.

Attempting to set a key into a CaptureRequest that is not listed here will result in an invalid request and will be rejected by the camera device.

This field can be used to query the feature set of a camera device at a more granular level than capabilities. This is especially important for optional keys that are not listed under any capability in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.

This key is available on all devices.

public static final Key
REQUEST_AVAILABLE_RESULT_KEYS

A list of all keys that the camera device has available to use with CaptureResult.

Attempting to get a key from a CaptureResult that is not listed here will always return a null value. Getting a key from a CaptureResult that is listed here will generally never return a null value.

The following keys may return null unless they are enabled:

  • android.statistics.lensShadingMap (non-null iff {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON)

(Those sometimes-null keys will nevertheless be listed here if they are available.)

This field can be used to query the feature set of a camera device at a more granular level than capabilities. This is especially important for optional keys that are not listed under any capability in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.

This key is available on all devices.

public static final Key
REQUEST_AVAILABLE_CHARACTERISTICS_KEYS

A list of all keys that the camera device has available to use with CameraCharacteristics.

This entry follows the same rules as android.request.availableResultKeys (except that it applies for CameraCharacteristics instead of CaptureResult). See above for more details.

This key is available on all devices.

public static final Key
SCALER_AVAILABLE_FORMATS

The list of image formats that are supported by this camera device for output streams.

All camera devices will support JPEG and YUV_420_888 formats.

When set to YUV_420_888, application can access the YUV420 data directly.

Optional - This value may be {@code null} on some devices.

public static final Key
SCALER_AVAILABLE_JPEG_MIN_DURATIONS

The minimum frame duration that is supported for each resolution in android.scaler.availableJpegSizes.

This corresponds to the minimum steady-state frame duration when only that JPEG stream is active and captured in a burst, with all processing (typically in android.*.mode) set to FAST.

When multiple streams are configured, the minimum frame duration will be >= max(individual stream min durations)

Units: Nanoseconds

Range of valid values:
TODO: Remove property.

Optional - This value may be {@code null} on some devices.

public static final Key
SCALER_AVAILABLE_JPEG_SIZES

The JPEG resolutions that are supported by this camera device.

The resolutions are listed as (width, height) pairs. All camera devices will support sensor maximum resolution (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}).

Range of valid values:
TODO: Remove property.

Optional - This value may be {@code null} on some devices.

public static final Key
SCALER_AVAILABLE_MAX_DIGITAL_ZOOM

The maximum ratio between both active area width and crop region width, and active area height and crop region height, for {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.

This represents the maximum amount of zooming possible by the camera device, or equivalently, the minimum cropping window size.

Crop regions that have a width or height that is smaller than this ratio allows will be rounded up to the minimum allowed size by the camera device.

Units: Zoom scale factor

Range of valid values:
>=1

This key is available on all devices.

public static final Key
SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS

For each available processed output size (defined in android.scaler.availableProcessedSizes), this property lists the minimum supportable frame duration for that size.

This should correspond to the frame duration when only that processed stream is active, with all processing (typically in android.*.mode) set to FAST.

When multiple streams are configured, the minimum frame duration will be >= max(individual stream min durations).

Units: Nanoseconds

Optional - This value may be {@code null} on some devices.

public static final Key
SCALER_AVAILABLE_PROCESSED_SIZES

The resolutions available for use with processed output streams, such as YV12, NV12, and platform opaque YUV/RGB streams to the GPU or video encoders.

The resolutions are listed as (width, height) pairs.

For a given use case, the actual maximum supported resolution may be lower than what is listed here, depending on the destination Surface for the image data. For example, for recording video, the video encoder chosen may have a maximum size limit (e.g. 1080p) smaller than what the camera (e.g. maximum resolution is 3264x2448) can provide.

Please reference the documentation for the image data destination to check if it limits the maximum size for image data.

Optional - This value may be {@code null} on some devices.

public static final Key
SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP

The mapping of image formats that are supported by this camera device for input streams, to their corresponding output formats.

All camera devices with at least 1 android.request.maxNumInputStreams will have at least one available input format.

The camera device will support the following map of formats, if its dependent capability is supported:

Input Format Output Format Capability
RAW_OPAQUE JPEG ZSL
RAW_OPAQUE YUV_420_888 ZSL
RAW_OPAQUE RAW16 RAW
RAW16 YUV_420_888 RAW
RAW16 JPEG RAW

For ZSL-capable camera devices, using the RAW_OPAQUE format as either input or output will never hurt maximum frame rate (i.e. StreamConfigurationMap#getOutputStallDuration(int,Size) for a format = RAW_OPAQUE is always 0).

Attempting to configure an input stream with output streams not listed as available in this map is not valid.

TODO: typedef to ReprocessFormatMap

Optional - This value may be {@code null} on some devices.

Full capability - Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key

public static final Key
SCALER_AVAILABLE_STREAM_CONFIGURATIONS

The available stream configurations that this camera device supports (i.e. format, width, height, output/input stream).

The configurations are listed as (format, width, height, input?) tuples.

For a given use case, the actual maximum supported resolution may be lower than what is listed here, depending on the destination Surface for the image data. For example, for recording video, the video encoder chosen may have a maximum size limit (e.g. 1080p) smaller than what the camera (e.g. maximum resolution is 3264x2448) can provide.

Please reference the documentation for the image data destination to check if it limits the maximum size for image data.

Not all output formats may be supported in a configuration with an input stream of a particular format. For more details, see android.scaler.availableInputOutputFormatsMap.

The following table describes the minimum required output stream configurations based on the hardware level ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):

Format Size Hardware Level Notes
JPEG {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} Any
JPEG 1920x1080 (1080p) Any if 1080p <= activeArraySize
JPEG 1280x720 (720) Any if 720p <= activeArraySize
JPEG 640x480 (480p) Any if 480p <= activeArraySize
JPEG 320x240 (240p) Any if 240p <= activeArraySize
YUV_420_888 all output sizes available for JPEG FULL
YUV_420_888 all output sizes available for JPEG, up to the maximum video size LIMITED
IMPLEMENTATION_DEFINED same as YUV_420_888 Any

Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional mandatory stream configurations on a per-capability basis.

This key is available on all devices.

public static final Key
SCALER_AVAILABLE_MIN_FRAME_DURATIONS

This lists the minimum frame duration for each format/size combination.

This should correspond to the frame duration when only that stream is active, with all processing (typically in android.*.mode) set to either OFF or FAST.

When multiple streams are used in a request, the minimum frame duration will be max(individual stream min durations).

The minimum frame duration of a stream (of a particular format, size) is the same regardless of whether the stream is input or output.

See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and android.scaler.availableStallDurations for more details about calculating the max frame rate.

(Keep in sync with StreamConfigurationMap#getOutputMinFrameDuration)

Units: (format, width, height, ns) x n

This key is available on all devices.

public static final Key
SCALER_AVAILABLE_STALL_DURATIONS

This lists the maximum stall duration for each format/size combination.

A stall duration is how much extra time would get added to the normal minimum frame duration for a repeating request that has streams with non-zero stall.

For example, consider JPEG captures which have the following characteristics:

  • JPEG streams act like processed YUV streams in requests for which they are not included; in requests in which they are directly referenced, they act as JPEG streams. This is because supporting a JPEG stream requires the underlying YUV data to always be ready for use by a JPEG encoder, but the encoder will only be used (and impact frame duration) on requests that actually reference a JPEG stream.
  • The JPEG processor can run concurrently to the rest of the camera pipeline, but cannot process more than 1 capture at a time.

In other words, using a repeating YUV request would result in a steady frame rate (let's say it's 30 FPS). If a single JPEG request is submitted periodically, the frame rate will stay at 30 FPS (as long as we wait for the previous JPEG to return each time). If we try to submit a repeating YUV + JPEG request, then the frame rate will drop from 30 FPS.

In general, submitting a new request with a non-0 stall time stream will not cause a frame rate drop unless there are still outstanding buffers for that stream from previous requests.

Submitting a repeating request with streams (call this S) is the same as setting the minimum frame duration from the normal minimum frame duration corresponding to S, added with the maximum stall duration for S.

If interleaving requests with and without a stall duration, a request will stall by the maximum of the remaining times for each can-stall stream with outstanding buffers.

This means that a stalling request will not have an exposure start until the stall has completed.

This should correspond to the stall duration when only that stream is active, with all processing (typically in android.*.mode) set to FAST or OFF. Setting any of the processing modes to HIGH_QUALITY effectively results in an indeterminate stall duration for all streams in a request (the regular stall calculation rules are ignored).

The following formats may always have a stall duration:

  • ImageFormat#JPEG
  • ImageFormat#RAW_SENSOR

The following formats will never have a stall duration:

  • ImageFormat#YUV_420_888

All other formats may or may not have an allowed stall duration on a per-capability basis; refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for more details.

See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} for more information about calculating the max frame rate (absent stalls).

(Keep up to date with StreamConfigurationMap#getOutputStallDuration(int, Size) )

Units: (format, width, height, ns) x n

This key is available on all devices.

public static final Key
SCALER_STREAM_CONFIGURATION_MAP

The available stream configurations that this camera device supports; also includes the minimum frame durations and the stall durations for each format/size combination.

All camera devices will support sensor maximum resolution (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) for the JPEG format.

For a given use case, the actual maximum supported resolution may be lower than what is listed here, depending on the destination Surface for the image data. For example, for recording video, the video encoder chosen may have a maximum size limit (e.g. 1080p) smaller than what the camera (e.g. maximum resolution is 3264x2448) can provide.

Please reference the documentation for the image data destination to check if it limits the maximum size for image data.

The following table describes the minimum required output stream configurations based on the hardware level ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):

Format Size Hardware Level Notes
JPEG {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} Any
JPEG 1920x1080 (1080p) Any if 1080p <= activeArraySize
JPEG 1280x720 (720) Any if 720p <= activeArraySize
JPEG 640x480 (480p) Any if 480p <= activeArraySize
JPEG 320x240 (240p) Any if 240p <= activeArraySize
YUV_420_888 all output sizes available for JPEG FULL
YUV_420_888 all output sizes available for JPEG, up to the maximum video size LIMITED
IMPLEMENTATION_DEFINED same as YUV_420_888 Any

Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional mandatory stream configurations on a per-capability basis.

This key is available on all devices.

public static final Key
SCALER_CROPPING_TYPE

The crop type that this camera device supports.

When passing a non-centered crop region ({@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}) to a camera device that only supports CENTER_ONLY cropping, the camera device will move the crop region to the center of the sensor active array ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) and keep the crop region width and height unchanged. The camera device will return the final used crop region in metadata result {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.

Camera devices that support FREEFORM cropping will support any crop region that is inside of the active array. The camera device will apply the same crop region and return the final used crop region in capture result metadata {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.

FULL capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL) will support FREEFORM cropping. LEGACY capability devices will only support CENTER_ONLY cropping.

Possible values:

  • {@link #SCALER_CROPPING_TYPE_CENTER_ONLY CENTER_ONLY}
  • {@link #SCALER_CROPPING_TYPE_FREEFORM FREEFORM}

This key is available on all devices.

public static final Key
SENSOR_INFO_ACTIVE_ARRAY_SIZE

The area of the image sensor which corresponds to active pixels.

This is the region of the sensor that actually receives light from the scene. Therefore, the size of this region determines the maximum field of view and the maximum number of pixels that an image from this sensor can contain.

The rectangle is defined in terms of the full pixel array; (0,0) is the top-left of the full pixel array, and the size of the full pixel array is given by {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.

Most other keys listing pixel coordinates have their coordinate systems based on the active array, with (0, 0) being the top-left of the active array rectangle.

The active array may be smaller than the full pixel array, since the full array may include black calibration pixels or other inactive regions.

Units: Pixel coordinates on the image sensor

Range of valid values:

This key is available on all devices.

public static final Key
SENSOR_INFO_SENSITIVITY_RANGE

Range of sensitivities for {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} supported by this camera device.

The values are the standard ISO sensitivity values, as defined in ISO 12232:2006.

Range of valid values:
Min <= 100, Max >= 800

Optional - This value may be {@code null} on some devices.

Full capability - Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key

public static final Key
SENSOR_INFO_COLOR_FILTER_ARRANGEMENT

The arrangement of color filters on sensor; represents the colors in the top-left 2x2 section of the sensor, in reading order.

Possible values:

  • {@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB RGGB}
  • {@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG GRBG}
  • {@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG GBRG}
  • {@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR BGGR}
  • {@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB RGB}

Optional - This value may be {@code null} on some devices.

Full capability - Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key

public static final Key
SENSOR_INFO_EXPOSURE_TIME_RANGE

The range of image exposure times for {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} supported by this camera device.

Units: Nanoseconds

Range of valid values:
The minimum exposure time will be less than 100 us. For FULL capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL), the maximum exposure time will be greater than 100ms.

Optional - This value may be {@code null} on some devices.

Full capability - Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key

public static final Key
SENSOR_INFO_MAX_FRAME_DURATION

The maximum possible frame duration (minimum frame rate) for {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} that is supported this camera device.

Attempting to use frame durations beyond the maximum will result in the frame duration being clipped to the maximum. See that control for a full definition of frame durations.

Refer to StreamConfigurationMap#getOutputMinFrameDuration(int,Size) for the minimum frame duration values.

Units: Nanoseconds

Range of valid values:
For FULL capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL), at least 100ms.

Optional - This value may be {@code null} on some devices.

Full capability - Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key

public static final Key
SENSOR_INFO_PHYSICAL_SIZE

The physical dimensions of the full pixel array.

This is the physical size of the sensor pixel array defined by {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.

Units: Millimeters

This key is available on all devices.

public static final Key
SENSOR_INFO_PIXEL_ARRAY_SIZE

Dimensions of the full pixel array, possibly including black calibration pixels.

The pixel count of the full pixel array, which covers {@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize} area.

If a camera device supports raw sensor formats, either this or {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} is the maximum output raw size listed in {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}. If a size corresponding to pixelArraySize is listed, the resulting raw sensor image will include black pixels.

Some parts of the full pixel array may not receive light from the scene, or are otherwise inactive. The {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} key defines the rectangle of active pixels that actually forms an image.

Units: Pixels

This key is available on all devices.

public static final Key
SENSOR_INFO_WHITE_LEVEL

Maximum raw value output by sensor.

This specifies the fully-saturated encoding level for the raw sample values from the sensor. This is typically caused by the sensor becoming highly non-linear or clipping. The minimum for each channel is specified by the offset in the {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} key.

The white level is typically determined either by sensor bit depth (8-14 bits is expected), or by the point where the sensor response becomes too non-linear to be useful. The default value for this is maximum representable value for a 16-bit raw sample (2^16 - 1).

Range of valid values:
> 255 (8-bit output)

Optional - This value may be {@code null} on some devices.

public static final Key
SENSOR_INFO_TIMESTAMP_SOURCE

The time base source for sensor capture start timestamps.

The timestamps provided for captures are always in nanoseconds and monotonic, but may not based on a time source that can be compared to other system time sources.

This characteristic defines the source for the timestamps, and therefore whether they can be compared against other system time sources/timestamps.

Possible values:

  • {@link #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN UNKNOWN}
  • {@link #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME REALTIME}

This key is available on all devices.

public static final Key
SENSOR_REFERENCE_ILLUMINANT1

The standard reference illuminant used as the scene light source when calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1}, {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} matrices.

The values in this key correspond to the values defined for the EXIF LightSource tag. These illuminants are standard light sources that are often used calibrating camera devices.

If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1}, {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} will also be present.

Some devices may choose to provide a second set of calibration information for improved quality, including {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2} and its corresponding matrices.

Possible values:

  • {@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT DAYLIGHT}
  • {@link #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT FLUORESCENT}
  • {@link #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN TUNGSTEN}
  • {@link #SENSOR_REFERENCE_ILLUMINANT1_FLASH FLASH}
  • {@link #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER FINE_WEATHER}
  • {@link #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER CLOUDY_WEATHER}
  • {@link #SENSOR_REFERENCE_ILLUMINANT1_SHADE SHADE}
  • {@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT DAYLIGHT_FLUORESCENT}
  • {@link #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT DAY_WHITE_FLUORESCENT}
  • {@link #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT COOL_WHITE_FLUORESCENT}
  • {@link #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT WHITE_FLUORESCENT}
  • {@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A STANDARD_A}
  • {@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B STANDARD_B}
  • {@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C STANDARD_C}
  • {@link #SENSOR_REFERENCE_ILLUMINANT1_D55 D55}
  • {@link #SENSOR_REFERENCE_ILLUMINANT1_D65 D65}
  • {@link #SENSOR_REFERENCE_ILLUMINANT1_D75 D75}
  • {@link #SENSOR_REFERENCE_ILLUMINANT1_D50 D50}
  • {@link #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN ISO_STUDIO_TUNGSTEN}

Optional - This value may be {@code null} on some devices.

public static final Key
SENSOR_REFERENCE_ILLUMINANT2

The standard reference illuminant used as the scene light source when calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2}, {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} matrices.

See {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1} for more details.

If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2}, {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} will also be present.

Range of valid values:
Any value listed in {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}

Optional - This value may be {@code null} on some devices.

public static final Key
SENSOR_CALIBRATION_TRANSFORM1

A per-device calibration transform matrix that maps from the reference sensor colorspace to the actual device sensor colorspace.

This matrix is used to correct for per-device variations in the sensor colorspace, and is used for processing raw buffer data.

The matrix is expressed as a 3x3 matrix in row-major-order, and contains a per-device calibration transform that maps colors from reference sensor color space (i.e. the "golden module" colorspace) into this camera device's native sensor color space under the first reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).

Optional - This value may be {@code null} on some devices.

public static final Key
SENSOR_CALIBRATION_TRANSFORM2

A per-device calibration transform matrix that maps from the reference sensor colorspace to the actual device sensor colorspace (this is the colorspace of the raw buffer data).

This matrix is used to correct for per-device variations in the sensor colorspace, and is used for processing raw buffer data.

The matrix is expressed as a 3x3 matrix in row-major-order, and contains a per-device calibration transform that maps colors from reference sensor color space (i.e. the "golden module" colorspace) into this camera device's native sensor color space under the second reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).

This matrix will only be present if the second reference illuminant is present.

Optional - This value may be {@code null} on some devices.

public static final Key
SENSOR_COLOR_TRANSFORM1

A matrix that transforms color values from CIE XYZ color space to reference sensor color space.

This matrix is used to convert from the standard CIE XYZ color space to the reference sensor colorspace, and is used when processing raw buffer data.

The matrix is expressed as a 3x3 matrix in row-major-order, and contains a color transform matrix that maps colors from the CIE XYZ color space to the reference sensor color space (i.e. the "golden module" colorspace) under the first reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).

The white points chosen in both the reference sensor color space and the CIE XYZ colorspace when calculating this transform will match the standard white point for the first reference illuminant (i.e. no chromatic adaptation will be applied by this transform).

Optional - This value may be {@code null} on some devices.

public static final Key
SENSOR_COLOR_TRANSFORM2

A matrix that transforms color values from CIE XYZ color space to reference sensor color space.

This matrix is used to convert from the standard CIE XYZ color space to the reference sensor colorspace, and is used when processing raw buffer data.

The matrix is expressed as a 3x3 matrix in row-major-order, and contains a color transform matrix that maps colors from the CIE XYZ color space to the reference sensor color space (i.e. the "golden module" colorspace) under the second reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).

The white points chosen in both the reference sensor color space and the CIE XYZ colorspace when calculating this transform will match the standard white point for the second reference illuminant (i.e. no chromatic adaptation will be applied by this transform).

This matrix will only be present if the second reference illuminant is present.

Optional - This value may be {@code null} on some devices.

public static final Key
SENSOR_FORWARD_MATRIX1

A matrix that transforms white balanced camera colors from the reference sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.

This matrix is used to convert to the standard CIE XYZ colorspace, and is used when processing raw buffer data.

This matrix is expressed as a 3x3 matrix in row-major-order, and contains a color transform matrix that maps white balanced colors from the reference sensor color space to the CIE XYZ color space with a D50 white point.

Under the first reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}) this matrix is chosen so that the standard white point for this reference illuminant in the reference sensor colorspace is mapped to D50 in the CIE XYZ colorspace.

Optional - This value may be {@code null} on some devices.

public static final Key
SENSOR_FORWARD_MATRIX2

A matrix that transforms white balanced camera colors from the reference sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.

This matrix is used to convert to the standard CIE XYZ colorspace, and is used when processing raw buffer data.

This matrix is expressed as a 3x3 matrix in row-major-order, and contains a color transform matrix that maps white balanced colors from the reference sensor color space to the CIE XYZ color space with a D50 white point.

Under the second reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}) this matrix is chosen so that the standard white point for this reference illuminant in the reference sensor colorspace is mapped to D50 in the CIE XYZ colorspace.

This matrix will only be present if the second reference illuminant is present.

Optional - This value may be {@code null} on some devices.

public static final Key
SENSOR_BLACK_LEVEL_PATTERN

A fixed black level offset for each of the color filter arrangement (CFA) mosaic channels.

This key specifies the zero light value for each of the CFA mosaic channels in the camera sensor. The maximal value output by the sensor is represented by the value in {@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}.

The values are given in the same order as channels listed for the CFA layout key (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}), i.e. the nth value given corresponds to the black level offset for the nth color channel listed in the CFA.

Range of valid values:
>= 0 for each.

Optional - This value may be {@code null} on some devices.

public static final Key
SENSOR_MAX_ANALOG_SENSITIVITY

Maximum sensitivity that is implemented purely through analog gain.

For {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} values less than or equal to this, all applied gain must be analog. For values above this, the gain applied can be a mix of analog and digital.

Optional - This value may be {@code null} on some devices.

Full capability - Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key

public static final Key
SENSOR_ORIENTATION

Clockwise angle through which the output image needs to be rotated to be upright on the device screen in its native orientation.

Also defines the direction of rolling shutter readout, which is from top to bottom in the sensor's coordinate system.

Units: Degrees of clockwise rotation; always a multiple of 90

Range of valid values:
0, 90, 180, 270

This key is available on all devices.

public static final Key
SENSOR_AVAILABLE_TEST_PATTERN_MODES

List of sensor test pattern modes for {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode} supported by this camera device.

Defaults to OFF, and always includes OFF if defined.

Range of valid values:
Any value listed in {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}

Optional - This value may be {@code null} on some devices.

public static final Key
STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES

List of face detection modes for {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} that are supported by this camera device.

OFF is always supported.

Range of valid values:
Any value listed in {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}

This key is available on all devices.

public static final Key
STATISTICS_INFO_MAX_FACE_COUNT

The maximum number of simultaneously detectable faces.

Range of valid values:
0 for cameras without available face detection; otherwise: >=4 for LIMITED or FULL hwlevel devices or >0 for LEGACY devices.

This key is available on all devices.

public static final Key
STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES

List of hot pixel map output modes for {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode} that are supported by this camera device.

If no hotpixel map output is available for this camera device, this will contain only false.

ON is always supported on devices with the RAW capability.

Range of valid values:
Any value listed in {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode}

Optional - This value may be {@code null} on some devices.

public static final Key
TONEMAP_MAX_CURVE_POINTS

Maximum number of supported points in the tonemap curve that can be used for {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.

If the actual number of points provided by the application (in {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}*) is less than this maximum, the camera device will resample the curve to its internal representation, using linear interpolation.

The output curves in the result metadata may have a different number of points than the input curves, and will represent the actual hardware curves used as closely as possible when linearly interpolated.

Optional - This value may be {@code null} on some devices.

Full capability - Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key

public static final Key
TONEMAP_AVAILABLE_TONE_MAP_MODES

List of tonemapping modes for {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} that are supported by this camera device.

Camera devices that support the MANUAL_POST_PROCESSING capability will always list CONTRAST_CURVE and FAST. This includes all FULL level devices.

Range of valid values:
Any value listed in {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}

Optional - This value may be {@code null} on some devices.

Full capability - Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key

public static final Key
LED_AVAILABLE_LEDS

A list of camera LEDs that are available on this system.

Possible values:

  • {@link #LED_AVAILABLE_LEDS_TRANSMIT TRANSMIT}

Optional - This value may be {@code null} on some devices.

public static final Key
INFO_SUPPORTED_HARDWARE_LEVEL

Generally classifies the overall set of the camera device functionality.

Camera devices will come in three flavors: LEGACY, LIMITED and FULL.

A FULL device will support below capabilities:

  • 30fps operation at maximum resolution (== sensor resolution) is preferred, more than 20fps is required, for at least uncompressed YUV output. ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains BURST_CAPTURE)
  • Per frame control ({@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} == PER_FRAME_CONTROL)
  • Manual sensor control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains MANUAL_SENSOR)
  • Manual post-processing control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains MANUAL_POST_PROCESSING)
  • Arbitrary cropping region ({@link CameraCharacteristics#SCALER_CROPPING_TYPE android.scaler.croppingType} == FREEFORM)
  • At least 3 processed (but not stalling) format output streams ({@link CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_PROC android.request.maxNumOutputProc} >= 3)
  • The required stream configuration defined in android.scaler.availableStreamConfigurations
  • The required exposure time range defined in {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}
  • The required maxFrameDuration defined in {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}

A LIMITED device may have some or none of the above characteristics. To find out more refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.

Some features are not part of any particular hardware level or capability and must be queried separately. These include:

  • Calibrated timestamps ({@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} == REALTIME)
  • Precision lens control ({@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} == CALIBRATED)
  • Face detection ({@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes})
  • Optical or electrical image stabilization ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization}, {@link CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES android.control.availableVideoStabilizationModes})

A LEGACY device does not support per-frame control, manual sensor control, manual post-processing, arbitrary cropping regions, and has relaxed performance constraints.

Each higher level supports everything the lower level supports in this order: FULL > LIMITED > LEGACY.

Possible values:

  • {@link #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED}
  • {@link #INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL}
  • {@link #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY LEGACY}

This key is available on all devices.

public static final Key
SYNC_MAX_LATENCY

The maximum number of frames that can occur after a request (different than the previous) has been submitted, and before the result's state becomes synchronized (by setting android.sync.frameNumber to a non-negative value).

This defines the maximum distance (in number of metadata results), between android.sync.frameNumber and the equivalent frame number for that result.

In other words this acts as an upper boundary for how many frames must occur before the camera device knows for a fact that the new submitted camera settings have been applied in outgoing frames.

For example if the distance was 2,

initial request = X (repeating)
request1 = X
request2 = Y
request3 = Y
request4 = Y

where requestN has frameNumber N, and the first of the repeating
initial request's has frameNumber F (and F < 1).

initial result = X' + { android.sync.frameNumber == F }
result1 = X' + { android.sync.frameNumber == F }
result2 = X' + { android.sync.frameNumber == CONVERGING }
result3 = X' + { android.sync.frameNumber == CONVERGING }
result4 = X' + { android.sync.frameNumber == 2 }

where resultN has frameNumber N.

Since result4 has a frameNumber == 4 and android.sync.frameNumber == 2, the distance is clearly 4 - 2 = 2.

Units: Frame counts

Possible values:

  • {@link #SYNC_MAX_LATENCY_PER_FRAME_CONTROL PER_FRAME_CONTROL}
  • {@link #SYNC_MAX_LATENCY_UNKNOWN UNKNOWN}

Available values for this device:
A positive value, PER_FRAME_CONTROL, or UNKNOWN.

This key is available on all devices.

Constructors Summary
public CameraCharacteristics(android.hardware.camera2.impl.CameraMetadataNative properties)
Takes ownership of the passed-in properties object

hide

        mProperties = CameraMetadataNative.move(properties);
    
Methods Summary
public Tget(android.hardware.camera2.CameraCharacteristics$Key key)
Get a camera characteristics field value.

The field definitions can be found in {@link CameraCharacteristics}.

Querying the value for the same key more than once will return a value which is equal to the previous queried value.

throws
IllegalArgumentException if the key was not valid
param
key The characteristics field to read.
return
The value of that key, or {@code null} if the field is not set.

        return mProperties.get(key);
    
public java.util.ListgetAvailableCaptureRequestKeys()
Returns the list of keys supported by this {@link CameraDevice} for querying with a {@link CaptureRequest}.

The list returned is not modifiable, so any attempts to modify it will throw a {@code UnsupportedOperationException}.

Each key is only listed once in the list. The order of the keys is undefined.

Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use {@link #getKeys()} instead.

return
List of keys supported by this CameraDevice for CaptureRequests.

        if (mAvailableRequestKeys == null) {
            Object crKey = CaptureRequest.Key.class;
            Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey;

            int[] filterTags = get(REQUEST_AVAILABLE_REQUEST_KEYS);
            if (filterTags == null) {
                throw new AssertionError("android.request.availableRequestKeys must be non-null "
                        + "in the characteristics");
            }
            mAvailableRequestKeys =
                    getAvailableKeyList(CaptureRequest.class, crKeyTyped, filterTags);
        }
        return mAvailableRequestKeys;
    
public java.util.ListgetAvailableCaptureResultKeys()
Returns the list of keys supported by this {@link CameraDevice} for querying with a {@link CaptureResult}.

The list returned is not modifiable, so any attempts to modify it will throw a {@code UnsupportedOperationException}.

Each key is only listed once in the list. The order of the keys is undefined.

Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use {@link #getKeys()} instead.

return
List of keys supported by this CameraDevice for CaptureResults.

        if (mAvailableResultKeys == null) {
            Object crKey = CaptureResult.Key.class;
            Class<CaptureResult.Key<?>> crKeyTyped = (Class<CaptureResult.Key<?>>)crKey;

            int[] filterTags = get(REQUEST_AVAILABLE_RESULT_KEYS);
            if (filterTags == null) {
                throw new AssertionError("android.request.availableResultKeys must be non-null "
                        + "in the characteristics");
            }
            mAvailableResultKeys = getAvailableKeyList(CaptureResult.class, crKeyTyped, filterTags);
        }
        return mAvailableResultKeys;
    
private java.util.ListgetAvailableKeyList(java.lang.Class metadataClass, java.lang.Class keyClass, int[] filterTags)
Returns the list of keys supported by this {@link CameraDevice} by metadataClass.

The list returned is not modifiable, so any attempts to modify it will throw a {@code UnsupportedOperationException}.

Each key is only listed once in the list. The order of the keys is undefined.

param
metadataClass The subclass of CameraMetadata that you want to get the keys for.
param
keyClass The class of the metadata key, e.g. CaptureRequest.Key.class
return
List of keys supported by this CameraDevice for metadataClass.
throws
IllegalArgumentException if metadataClass is not a subclass of CameraMetadata


        if (metadataClass.equals(CameraMetadata.class)) {
            throw new AssertionError(
                    "metadataClass must be a strict subclass of CameraMetadata");
        } else if (!CameraMetadata.class.isAssignableFrom(metadataClass)) {
            throw new AssertionError(
                    "metadataClass must be a subclass of CameraMetadata");
        }

        List<TKey> staticKeyList = CameraCharacteristics.<TKey>getKeysStatic(
                metadataClass, keyClass, /*instance*/null, filterTags);
        return Collections.unmodifiableList(staticKeyList);
    
protected java.lang.ClassgetKeyClass()
{@inheritDoc}

hide

        Object thisClass = Key.class;
        return (Class<Key<?>>)thisClass;
    
public java.util.ListgetKeys()
{@inheritDoc}

        // List of keys is immutable; cache the results after we calculate them
        if (mKeys != null) {
            return mKeys;
        }

        int[] filterTags = get(REQUEST_AVAILABLE_CHARACTERISTICS_KEYS);
        if (filterTags == null) {
            throw new AssertionError("android.request.availableCharacteristicsKeys must be non-null"
                    + " in the characteristics");
        }

        mKeys = Collections.unmodifiableList(
                getKeysStatic(getClass(), getKeyClass(), this, filterTags));
        return mKeys;
    
public android.hardware.camera2.impl.CameraMetadataNativegetNativeCopy()
Returns a copy of the underlying {@link CameraMetadataNative}.

hide

        return new CameraMetadataNative(mProperties);
    
protected TgetProtected(android.hardware.camera2.CameraCharacteristics$Key key)
{@inheritDoc}

hide

        return (T) mProperties.get(key);