/* * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.hardware.camera2; import android.annotation.FlaggedApi; import android.annotation.NonNull; import android.annotation.Nullable; import android.compat.annotation.UnsupportedAppUsage; import android.hardware.camera2.impl.CameraMetadataNative; import android.hardware.camera2.impl.ExtensionKey; import android.hardware.camera2.impl.PublicKey; import android.hardware.camera2.impl.SyntheticKey; import android.hardware.camera2.params.DeviceStateSensorOrientationMap; import android.hardware.camera2.params.RecommendedStreamConfigurationMap; import android.hardware.camera2.params.SessionConfiguration; import android.hardware.camera2.utils.TypeReference; import android.os.Build; import android.util.Log; import android.util.Rational; import com.android.internal.annotations.GuardedBy; import com.android.internal.camera.flags.Flags; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; /** *
The properties describing a * {@link CameraDevice CameraDevice}.
* *These properties are primarily fixed for a given CameraDevice, and can be queried * through the {@link CameraManager CameraManager} * interface with {@link CameraManager#getCameraCharacteristics}. Beginning with API level 32, some * properties such as {@link #SENSOR_ORIENTATION} may change dynamically based on the state of the * device. For information on whether a specific value is fixed, see the documentation for its key. *
* *When obtained by a client that does not hold the CAMERA permission, some metadata values are * not included. The list of keys that require the permission is given by * {@link #getKeysNeedingPermission}.
* *{@link CameraCharacteristics} objects are immutable.
* * @see CameraDevice * @see CameraManager */ public final class CameraCharacteristics extends CameraMetadataFor example, to get the stream configuration map:
*
*
* StreamConfigurationMap map = cameraCharacteristics.get(
* CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);
*
To enumerate over all possible keys for {@link CameraCharacteristics}, see * {@link CameraCharacteristics#getKeys()}.
* * @see CameraCharacteristics#get * @see CameraCharacteristics#getKeys() */ public static final class KeyNormally, applications should use the existing Key definitions in * {@link CameraCharacteristics}, and not need to construct their own Key objects. However, * they may be useful for testing purposes and for defining custom camera * characteristics.
*/ public Key(@NonNull String name, @NonNull ClassBuilt-in keys exposed by the Android SDK are always prefixed with {@code "android."}; * keys that are device/platform-specific are prefixed with {@code "com."}.
* *For example, {@code CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP} would * have a name of {@code "android.scaler.streamConfigurationMap"}; whereas a device * specific key might look like {@code "com.google.nexus.data.private"}.
* * @return String representation of the key name */ @NonNull public String getName() { return mKey.getName(); } /** * Return vendor tag id. * * @hide */ public long getVendorId() { return mKey.getVendorId(); } /** * {@inheritDoc} */ @Override public final int hashCode() { return mKey.hashCode(); } /** * {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public final boolean equals(Object o) { return o instanceof Key && ((Key{@code "CameraCharacteristics.Key(%s)"}, where {@code %s} represents * the name of this key as returned by {@link #getName}.
* * @return string representation of {@link Key} */ @NonNull @Override public String toString() { return String.format("CameraCharacteristics.Key(%s)", mKey.getName()); } /** * Visible for CameraMetadataNative implementation only; do not use. * * TODO: Make this private or remove it altogether. * * @hide */ @UnsupportedAppUsage public CameraMetadataNative.KeyCheck whether a given property value needs to be overridden in some specific * case.
* * @param key The characteristics field to override. * @return The value of overridden property, or {@code null} if the property doesn't need an * override. */ @Nullable privateThe field definitions can be * found in {@link CameraCharacteristics}.
* * @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. */ @Nullable publicReturns a subset of the list returned by {@link #getKeys} with all keys that * require camera clients to obtain the {@link android.Manifest.permission#CAMERA} permission. *
* *If an application calls {@link CameraManager#getCameraCharacteristics} without holding the * {@link android.Manifest.permission#CAMERA} permission, * all keys in this list will not be available, and calling {@link #get} will * return null for those keys. If the application obtains the * {@link android.Manifest.permission#CAMERA} permission, then the * CameraCharacteristics from a call to a subsequent * {@link CameraManager#getCameraCharacteristics} will have the keys available.
* *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.
* * @return List of camera characteristic keys that require the * {@link android.Manifest.permission#CAMERA} permission. The list can be empty in case * there are no currently present keys that need additional permission. */ public @NonNull ListRetrieve camera device recommended stream configuration map * {@link RecommendedStreamConfigurationMap} for a given use case.
* *The stream configurations advertised here are efficient in terms of power and performance * for common use cases like preview, video, snapshot, etc. The recommended maps are usually * only small subsets of the exhaustive list provided in * {@link #SCALER_STREAM_CONFIGURATION_MAP} and suggested for a particular use case by the * camera device implementation. For further information about the expected configurations in * various scenarios please refer to: *
For example on how this can be used by camera clients to find out the maximum recommended * preview and snapshot resolution, consider the following pseudo-code: *
*
* public static Size getMaxSize(Size... sizes) {
* if (sizes == null || sizes.length == 0) {
* throw new IllegalArgumentException("sizes was empty");
* }
*
* Size sz = sizes[0];
* for (Size size : sizes) {
* if (size.getWidth() * size.getHeight() > sz.getWidth() * sz.getHeight()) {
* sz = size;
* }
* }
*
* return sz;
* }
*
* CameraCharacteristics characteristics =
* cameraManager.getCameraCharacteristics(cameraId);
* RecommendedStreamConfigurationMap previewConfig =
* characteristics.getRecommendedStreamConfigurationMap(
* RecommendedStreamConfigurationMap.USECASE_PREVIEW);
* RecommendedStreamConfigurationMap snapshotConfig =
* characteristics.getRecommendedStreamConfigurationMap(
* RecommendedStreamConfigurationMap.USECASE_SNAPSHOT);
*
* if ((previewConfig != null) && (snapshotConfig != null)) {
*
* Set snapshotSizeSet = snapshotConfig.getOutputSizes(
* ImageFormat.JPEG);
* Size[] snapshotSizes = new Size[snapshotSizeSet.size()];
* snapshotSizes = snapshotSizeSet.toArray(snapshotSizes);
* Size suggestedMaxJpegSize = getMaxSize(snapshotSizes);
*
* Set previewSizeSet = snapshotConfig.getOutputSizes(
* ImageFormat.PRIVATE);
* Size[] previewSizes = new Size[previewSizeSet.size()];
* previewSizes = previewSizeSet.toArray(previewSizes);
* Size suggestedMaxPreviewSize = getMaxSize(previewSizes);
* }
*
*
*
* Similar logic can be used for other use cases as well.
* *Support for recommended stream configurations is optional. In case there a no * suggested configurations for the particular use case, please refer to * {@link #SCALER_STREAM_CONFIGURATION_MAP} for the exhaustive available list.
* * @param usecase Use case id. * * @throws IllegalArgumentException In case the use case argument is invalid. * @return Valid {@link RecommendedStreamConfigurationMap} or null in case the camera device * doesn't have any recommendation for this use case or the recommended configurations * are invalid. */ public @Nullable RecommendedStreamConfigurationMap getRecommendedStreamConfigurationMap( @RecommendedStreamConfigurationMap.RecommendedUsecase int usecase) { if (((usecase >= RecommendedStreamConfigurationMap.USECASE_PREVIEW) && (usecase <= RecommendedStreamConfigurationMap.USECASE_10BIT_OUTPUT)) || ((usecase >= RecommendedStreamConfigurationMap.USECASE_VENDOR_START) && (usecase < RecommendedStreamConfigurationMap.MAX_USECASE_COUNT))) { if (mRecommendedConfigurations == null) { mRecommendedConfigurations = mProperties.getRecommendedStreamConfigurations(); if (mRecommendedConfigurations == null) { return null; } } return mRecommendedConfigurations.get(usecase); } throw new IllegalArgumentException(String.format("Invalid use case: %d", usecase)); } /** *Returns a subset of {@link #getAvailableCaptureRequestKeys} keys that the * camera device can pass as part of the capture session initialization.
* *This list includes keys that are difficult to apply per-frame and * can result in unexpected delays when modified during the capture session * lifetime. Typical examples include parameters that require a * time-consuming hardware re-configuration or internal camera pipeline * change. For performance reasons we suggest clients to pass their initial * values as part of {@link SessionConfiguration#setSessionParameters}. Once * the camera capture session is enabled it is also recommended to avoid * changing them from their initial values set in * {@link SessionConfiguration#setSessionParameters }. * Control over session parameters can still be exerted in capture requests * but clients should be aware and expect delays during their application. * An example usage scenario could look like this:
*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.
* * @return List of keys that can be passed during capture session initialization. In case the * camera device doesn't support such keys the list can be null. */ @SuppressWarnings({"unchecked"}) public ListGet the keys in Camera Characteristics whose values are capture session specific. * The session specific characteristics can be acquired by calling * CameraDevice.getSessionCharacteristics().
* *Note that getAvailableSessionKeys returns the CaptureRequest keys that are difficult to * apply per-frame, whereas this function returns CameraCharacteristics keys that are dependent * on a particular SessionConfiguration.
* * @return List of CameraCharacteristic keys containing characterisitics specific to a session * configuration. If {@link #INFO_SESSION_CONFIGURATION_QUERY_VERSION} is * {@link Build.VERSION_CODES#VANILLA_ICE_CREAM}, then this list will only contain * CONTROL_ZOOM_RATIO_RANGE and SCALER_AVAILABLE_MAX_DIGITAL_ZOOM * * @see INFO_SESSION_CONFIGURATION_QUERY_VERSION */ @NonNull @FlaggedApi(Flags.FLAG_FEATURE_COMBINATION_QUERY) public ListReturns a subset of {@link #getAvailableCaptureRequestKeys} keys that can * be overridden for physical devices backing a logical multi-camera.
* *This is a subset of android.request.availableRequestKeys which contains a list * of keys that can be overridden using {@link CaptureRequest.Builder#setPhysicalCameraKey }. * The respective value of such request key can be obtained by calling * {@link CaptureRequest.Builder#getPhysicalCameraKey }. Capture requests that contain * individual physical device requests must be built via * {@link android.hardware.camera2.CameraDevice#createCaptureRequest(int, Set)}.
* *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.
* * @return List of keys that can be overridden in individual physical device requests. * In case the camera device doesn't support such keys the list can be null. */ @SuppressWarnings({"unchecked"}) public ListThe 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. */ @SuppressWarnings({"unchecked"}) @NonNull public ListThe 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. */ @SuppressWarnings({"unchecked"}) @NonNull public ListThe 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 * @param filterTags An array of tags to be used for filtering * @param includeSynthetic Include public synthetic tag by default. * * @return List of keys supported by this CameraDevice for metadataClass. * * @throws IllegalArgumentException if metadataClass is not a subclass of CameraMetadata */A camera device is a logical camera if it has * REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA capability. If the camera device * doesn't have the capability, the return value will be an empty set.
* *Prior to API level 29, all returned IDs are guaranteed to be returned by {@link * CameraManager#getCameraIdList}, and can be opened directly by * {@link CameraManager#openCamera}. Starting from API level 29, for each of the returned ID, * if it's also returned by {@link CameraManager#getCameraIdList}, it can be used as a * standalone camera by {@link CameraManager#openCamera}. Otherwise, the camera ID can only be * used as part of the current logical camera.
* *The set returned is not modifiable, so any attempts to modify it will throw * a {@code UnsupportedOperationException}.
* * @return Set of physical camera ids for this logical camera device. */ @NonNull public SetList 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.
* * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE */ @PublicKey @NonNull public static final KeyList 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.
* * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE */ @PublicKey @NonNull public static final KeyList 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.
* * @see CaptureRequest#CONTROL_AE_MODE */ @PublicKey @NonNull public static final KeyList of frame rate ranges for {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} supported by * this camera device.
*For devices at the LEGACY level or above:
*For constant-framerate recording, for each normal
* {@link android.media.CamcorderProfile CamcorderProfile}, that is, a
* {@link android.media.CamcorderProfile CamcorderProfile} that has
* {@link android.media.CamcorderProfile#quality quality} in
* the range [{@link android.media.CamcorderProfile#QUALITY_LOW QUALITY_LOW},
* {@link android.media.CamcorderProfile#QUALITY_2160P QUALITY_2160P}], if the profile is
* supported by the device and has
* {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} x
, this list will
* always include (x
,x
).
Also, a camera device must either not support any
* {@link android.media.CamcorderProfile CamcorderProfile},
* or support at least one
* normal {@link android.media.CamcorderProfile CamcorderProfile} that has
* {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} x
>= 24.
For devices at the LIMITED level or above:
*max
, max
) where max
= the maximum output frame rate of the maximum YUV_420_888
* output size.min
, max
) and
* (max
, max
) where min
<= 15 and max
= the maximum output frame rate of the
* maximum YUV_420_888 output size.Units: Frames per second (FPS)
*This key is available on all devices.
* * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT */ @PublicKey @NonNull public static final KeyMaximum 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.
* * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION */ @PublicKey @NonNull public static final KeySmallest 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.
* * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION */ @PublicKey @NonNull public static final KeyList 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.
* * @see CaptureRequest#CONTROL_AF_MODE * @see CaptureRequest#LENS_FOCUS_DISTANCE * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE */ @PublicKey @NonNull public static final KeyList 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.
* * @see CaptureRequest#CONTROL_EFFECT_MODE * @see CaptureRequest#CONTROL_MODE */ @PublicKey @NonNull public static final KeyList 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.
* * @see CaptureRequest#CONTROL_SCENE_MODE * @see CameraCharacteristics#STATISTICS_INFO_MAX_FACE_COUNT */ @PublicKey @NonNull public static final KeyList 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.
* * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE */ @PublicKey @NonNull public static final KeyList 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.
* * @see CaptureRequest#COLOR_CORRECTION_GAINS * @see CaptureRequest#COLOR_CORRECTION_MODE * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM * @see CaptureRequest#CONTROL_AWB_MODE */ @PublicKey @NonNull public static final KeyList 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 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.
* * @see CaptureRequest#CONTROL_AE_REGIONS * @see CaptureRequest#CONTROL_AF_REGIONS * @see CaptureRequest#CONTROL_AWB_REGIONS * @hide */ public static final KeyThe maximum number of metering regions that can be used by the auto-exposure (AE) * routine.
*This corresponds to 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.
* * @see CaptureRequest#CONTROL_AE_REGIONS */ @PublicKey @NonNull @SyntheticKey public static final KeyThe maximum number of metering regions that can be used by the auto-white balance (AWB) * routine.
*This corresponds to 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.
* * @see CaptureRequest#CONTROL_AWB_REGIONS */ @PublicKey @NonNull @SyntheticKey public static final KeyThe maximum number of metering regions that can be used by the auto-focus (AF) routine.
*This corresponds to 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.
* * @see CaptureRequest#CONTROL_AF_REGIONS */ @PublicKey @NonNull @SyntheticKey public static final KeyList of available high speed video size, fps range and max batch size configurations * supported by the camera device, in the format of (width, height, fps_min, fps_max, batch_size_max).
*When CONSTRAINED_HIGH_SPEED_VIDEO is supported in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}, * this metadata will list the supported high speed video size, fps range and max batch size * configurations. All the sizes listed in this configuration will be a subset of the sizes * reported by {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } * for processed non-stalling formats.
*For the high speed video use case, 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 (e.g., preview and recording streams * must have the same size). Otherwise, the high speed capture session creation will fail.
*The min and max fps will be multiple times of 30fps.
*High speed video streaming extends significant performance pressure to camera hardware, * to achieve efficient high speed streaming, the camera device may have to aggregate * multiple frames together and send to camera device for processing where the request * controls are same for all the frames in this batch. Max batch size indicates * the max possible number of frames the camera device will group together for this high * speed stream configuration. This max batch size will be used to generate a high speed * recording request list by * {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList }. * The max batch size for each configuration will satisfy below conditions:
*The camera device doesn't have to support batch mode to achieve high speed video recording, * in such case, batch_size_max will be reported as 1 in each configuration entry.
*This fps ranges in this configuration list can only be used to create requests * that are submitted to a high speed camera capture session created by * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }. * The fps ranges reported in this metadata must not be used to setup capture requests for * normal capture session, or it will cause request error.
*Range of valid values:
For each configuration, the fps_max >= 120fps.
*Optional - The value for this key 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
* * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES * @hide */ public static final KeyWhether the camera device supports {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}
*Devices with MANUAL_SENSOR capability or BURST_CAPTURE capability will always
* list true
. This includes FULL devices.
This key is available on all devices.
* * @see CaptureRequest#CONTROL_AE_LOCK */ @PublicKey @NonNull public static final KeyWhether the camera device supports {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}
*Devices with MANUAL_POST_PROCESSING capability or BURST_CAPTURE capability will
* always list true
. This includes FULL devices.
This key is available on all devices.
* * @see CaptureRequest#CONTROL_AWB_LOCK */ @PublicKey @NonNull public static final KeyList of control modes for {@link CaptureRequest#CONTROL_MODE android.control.mode} that are supported by this camera * device.
*This list contains control modes that can be set for the camera device. * LEGACY mode devices will always support AUTO mode. LIMITED and FULL * devices will always support OFF, AUTO modes.
*Range of valid values:
* Any value listed in {@link CaptureRequest#CONTROL_MODE android.control.mode}
This key is available on all devices.
* * @see CaptureRequest#CONTROL_MODE */ @PublicKey @NonNull public static final KeyRange of boosts for {@link CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST android.control.postRawSensitivityBoost} supported * by this camera device.
*Devices support post RAW sensitivity boost will advertise * {@link CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST android.control.postRawSensitivityBoost} key for controlling * post RAW sensitivity boost.
*This key will be null
for devices that do not support any RAW format
* outputs. For devices that do support RAW format outputs, this key will always
* present, and if a device does not support post RAW sensitivity boost, it will
* list (100, 100)
in this key.
Units: ISO arithmetic units, the same as {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}
*Optional - The value for this key may be {@code null} on some devices.
* * @see CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST * @see CaptureRequest#SENSOR_SENSITIVITY */ @PublicKey @NonNull public static final KeyThe list of extended scene modes for {@link CaptureRequest#CONTROL_EXTENDED_SCENE_MODE android.control.extendedSceneMode} that are supported * by this camera device, and each extended scene mode's maximum streaming (non-stall) size * with effect.
*For DISABLED mode, the camera behaves normally with no extended scene mode enabled.
*For BOKEH_STILL_CAPTURE mode, the maximum streaming dimension specifies the limit * under which bokeh is effective when capture intent is PREVIEW. Note that when capture * intent is PREVIEW, the bokeh effect may not be as high in quality compared to * STILL_CAPTURE intent in order to maintain reasonable frame rate. The maximum streaming * dimension must be one of the YUV_420_888 or PRIVATE resolutions in * availableStreamConfigurations, or (0, 0) if preview bokeh is not supported. If the * application configures a stream larger than the maximum streaming dimension, bokeh * effect may not be applied for this stream for PREVIEW intent.
*For BOKEH_CONTINUOUS mode, the maximum streaming dimension specifies the limit under * which bokeh is effective. This dimension must be one of the YUV_420_888 or PRIVATE * resolutions in availableStreamConfigurations, and if the sensor maximum resolution is * larger than or equal to 1080p, the maximum streaming dimension must be at least 1080p. * If the application configures a stream with larger dimension, the stream may not have * bokeh effect applied.
*Units: (mode, width, height)
*Optional - The value for this key 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
* * @see CaptureRequest#CONTROL_EXTENDED_SCENE_MODE * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL * @hide */ public static final KeyThe ranges of supported zoom ratio for non-DISABLED {@link CaptureRequest#CONTROL_EXTENDED_SCENE_MODE android.control.extendedSceneMode}.
*When extended scene mode is set, the camera device may have limited range of zoom ratios * compared to when extended scene mode is DISABLED. This tag lists the zoom ratio ranges * for all supported non-DISABLED extended scene modes, in the same order as in * android.control.availableExtended.
*Range [1.0, 1.0] means that no zoom (optical or digital) is supported.
*Units: (minZoom, maxZoom)
*Optional - The value for this key 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
* * @see CaptureRequest#CONTROL_EXTENDED_SCENE_MODE * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL * @hide */ public static final KeyThe list of extended scene modes for {@link CaptureRequest#CONTROL_EXTENDED_SCENE_MODE android.control.extendedSceneMode} that * are supported by this camera device, and each extended scene mode's capabilities such * as maximum streaming size, and supported zoom ratio ranges.
*For DISABLED mode, the camera behaves normally with no extended scene mode enabled.
*For BOKEH_STILL_CAPTURE mode, the maximum streaming dimension specifies the limit * under which bokeh is effective when capture intent is PREVIEW. Note that when capture * intent is PREVIEW, the bokeh effect may not be as high quality compared to STILL_CAPTURE * intent in order to maintain reasonable frame rate. The maximum streaming dimension must * be one of the YUV_420_888 or PRIVATE resolutions in availableStreamConfigurations, or * (0, 0) if preview bokeh is not supported. If the application configures a stream * larger than the maximum streaming dimension, bokeh effect may not be applied for this * stream for PREVIEW intent.
*For BOKEH_CONTINUOUS mode, the maximum streaming dimension specifies the limit under * which bokeh is effective. This dimension must be one of the YUV_420_888 or PRIVATE * resolutions in availableStreamConfigurations, and if the sensor maximum resolution is * larger than or equal to 1080p, the maximum streaming dimension must be at least 1080p. * If the application configures a stream with larger dimension, the stream may not have * bokeh effect applied.
*When extended scene mode is set, the camera device may have limited range of zoom ratios * compared to when the mode is DISABLED. availableExtendedSceneModeCapabilities lists the * zoom ranges for all supported extended modes. A range of (1.0, 1.0) means that no zoom * (optical or digital) is supported.
*Optional - The value for this key may be {@code null} on some devices.
* * @see CaptureRequest#CONTROL_EXTENDED_SCENE_MODE */ @PublicKey @NonNull @SyntheticKey public static final KeyMinimum and maximum zoom ratios supported by this camera device.
*If the camera device supports zoom-out from 1x zoom, minZoom will be less than 1.0, and * setting {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} to values less than 1.0 increases the camera's field * of view.
*Units: A pair of zoom ratio in floating-points: (minZoom, maxZoom)
*Range of valid values:
maxZoom >= 1.0 >= minZoom
*Optional - The value for this key 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
* * @see CaptureRequest#CONTROL_ZOOM_RATIO * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL */ @PublicKey @NonNull public static final KeyList of available high speed video size, fps range and max batch size configurations * supported by the camera device, in the format of * (width, height, fps_min, fps_max, batch_size_max), * when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.
*Analogous to android.control.availableHighSpeedVideoConfigurations, for configurations * which are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.
*Range of valid values:
For each configuration, the fps_max >= 120fps.
*Optional - The value for this key may be {@code null} on some devices.
* * @see CaptureRequest#SENSOR_PIXEL_MODE * @hide */ public static final KeyList of available settings overrides supported by the camera device that can * be used to speed up certain controls.
*When not all controls within a CaptureRequest are required to take effect * at the same time on the outputs, the camera device may apply certain request keys sooner * to improve latency. This list contains such supported settings overrides. Each settings * override corresponds to a set of CaptureRequest keys that can be sped up when applying.
*A supported settings override can be passed in via * {@link android.hardware.camera2.CaptureRequest#CONTROL_SETTINGS_OVERRIDE }, and the * CaptureRequest keys corresponding to the override are applied as soon as possible, not * bound by per-frame synchronization. See {@link CaptureRequest#CONTROL_SETTINGS_OVERRIDE android.control.settingsOverride} for the * CaptureRequest keys for each override.
*OFF is always included in this list.
*Range of valid values:
* Any value listed in {@link CaptureRequest#CONTROL_SETTINGS_OVERRIDE android.control.settingsOverride}
Optional - The value for this key may be {@code null} on some devices.
* * @see CaptureRequest#CONTROL_SETTINGS_OVERRIDE */ @PublicKey @NonNull public static final KeyWhether the camera device supports {@link CaptureRequest#CONTROL_AUTOFRAMING android.control.autoframing}.
*Will be false
if auto-framing is not available.
Optional - The value for this key 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
* * @see CaptureRequest#CONTROL_AUTOFRAMING * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL */ @PublicKey @NonNull public static final KeyThe operating luminance range of low light boost measured in lux (lx).
*Range of valid values:
The lower bound indicates the lowest scene luminance value the AE mode * 'ON_LOW_LIGHT_BOOST_BRIGHTNESS_PRIORITY' can operate within. Scenes of lower luminance * than this may receive less brightening, increased noise, or artifacts.
*The upper bound indicates the luminance threshold at the point when the mode is enabled. * For example, 'Range[0.3, 30.0]' defines 0.3 lux being the lowest scene luminance the * mode can reliably support. 30.0 lux represents the threshold when this mode is * activated. Scenes measured at less than or equal to 30 lux will activate low light * boost.
*If this key is defined, then the AE mode 'ON_LOW_LIGHT_BOOST_BRIGHTNESS_PRIORITY' will * also be present.
*Optional - The value for this key may be {@code null} on some devices.
*/ @PublicKey @NonNull @FlaggedApi(Flags.FLAG_CAMERA_AE_MODE_LOW_LIGHT_BOOST) public static final KeyList 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; camera devices that support * YUV_REPROCESSING or PRIVATE_REPROCESSING will list ZERO_SHUTTER_LAG; all devices will * list FAST.
*Range of valid values:
* Any value listed in {@link CaptureRequest#EDGE_MODE android.edge.mode}
Optional - The value for this key 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
* * @see CaptureRequest#EDGE_MODE * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL */ @PublicKey @NonNull public static final KeyWhether 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.
*/ @PublicKey @NonNull public static final KeyMaximum flashlight brightness level.
*If this value is greater than 1, then the device supports controlling the * flashlight brightness level via * {@link android.hardware.camera2.CameraManager#turnOnTorchWithStrengthLevel }. * If this value is equal to 1, flashlight brightness control is not supported. * The value for this key will be null for devices with no flash unit.
*The maximum value is guaranteed to be safe to use for an indefinite duration in * terms of device flashlight lifespan, but may be too bright for comfort for many * use cases. Use the default torch brightness value to avoid problems with an * over-bright flashlight.
*Optional - The value for this key may be {@code null} on some devices.
*/ @PublicKey @NonNull public static final KeyDefault flashlight brightness level to be set via * {@link android.hardware.camera2.CameraManager#turnOnTorchWithStrengthLevel }.
*If flash unit is available this will be greater than or equal to 1 and less
* or equal to {@link CameraCharacteristics#FLASH_INFO_STRENGTH_MAXIMUM_LEVEL android.flash.info.strengthMaximumLevel}
.
Setting flashlight brightness above the default level
* (i.e.{@link CameraCharacteristics#FLASH_INFO_STRENGTH_DEFAULT_LEVEL android.flash.info.strengthDefaultLevel}
) may make the device more
* likely to reach thermal throttling conditions and slow down, or drain the
* battery quicker than normal. To minimize such issues, it is recommended to
* start the flashlight at this default brightness until a user explicitly requests
* a brighter level.
* Note that the value for this key will be null for devices with no flash unit.
* The default level should always be > 0.
Optional - The value for this key may be {@code null} on some devices.
* * @see CameraCharacteristics#FLASH_INFO_STRENGTH_DEFAULT_LEVEL * @see CameraCharacteristics#FLASH_INFO_STRENGTH_MAXIMUM_LEVEL */ @PublicKey @NonNull public static final KeyMaximum flash brightness level for manual flash control in SINGLE mode.
*Maximum flash brightness level in camera capture mode and * {@link CaptureRequest#FLASH_MODE android.flash.mode} set to SINGLE. * Value will be > 1 if the manual flash strength control feature is supported, * otherwise the value will be equal to 1. * Note that this level is just a number of supported levels (the granularity of control). * There is no actual physical power units tied to this level.
*This key is available on all devices.
* * @see CaptureRequest#FLASH_MODE */ @PublicKey @NonNull @FlaggedApi(Flags.FLAG_CAMERA_MANUAL_FLASH_STRENGTH_CONTROL) public static final KeyDefault flash brightness level for manual flash control in SINGLE mode.
*If flash unit is available this will be greater than or equal to 1 and less
* or equal to android.flash.info.singleStrengthMaxLevel
.
* Note for devices that do not support the manual flash strength control
* feature, this level will always be equal to 1.
This key is available on all devices.
*/ @PublicKey @NonNull @FlaggedApi(Flags.FLAG_CAMERA_MANUAL_FLASH_STRENGTH_CONTROL) public static final KeyMaximum flash brightness level for manual flash control in TORCH mode
*Maximum flash brightness level in camera capture mode and * {@link CaptureRequest#FLASH_MODE android.flash.mode} set to TORCH. * Value will be > 1 if the manual flash strength control feature is supported, * otherwise the value will be equal to 1.
*Note that this level is just a number of supported levels(the granularity of control). * There is no actual physical power units tied to this level. * There is no relation between android.flash.info.torchStrengthMaxLevel and * android.flash.info.singleStrengthMaxLevel i.e. the ratio of * android.flash.info.torchStrengthMaxLevel:android.flash.info.singleStrengthMaxLevel * is not guaranteed to be the ratio of actual brightness.
*This key is available on all devices.
* * @see CaptureRequest#FLASH_MODE */ @PublicKey @NonNull @FlaggedApi(Flags.FLAG_CAMERA_MANUAL_FLASH_STRENGTH_CONTROL) public static final KeyDefault flash brightness level for manual flash control in TORCH mode
*If flash unit is available this will be greater than or equal to 1 and less * or equal to android.flash.info.torchStrengthMaxLevel. * Note for the devices that do not support the manual flash strength control feature, * this level will always be equal to 1.
*This key is available on all devices.
*/ @PublicKey @NonNull @FlaggedApi(Flags.FLAG_CAMERA_MANUAL_FLASH_STRENGTH_CONTROL) public static final KeyList 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 - The value for this key may be {@code null} on some devices.
* * @see CaptureRequest#HOT_PIXEL_MODE */ @PublicKey @NonNull public static final KeyList 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 conditions will be satisfied for this size list:
*(0, 0)
sizes will have non-zero widths and heights.This list is also used as supported thumbnail sizes for HEIC image format capture.
*This key is available on all devices.
* * @see CaptureRequest#JPEG_THUMBNAIL_SIZE */ @PublicKey @NonNull public static final KeyList 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 - The value for this key 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
* * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL * @see CaptureRequest#LENS_APERTURE */ @PublicKey @NonNull public static final KeyList 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 - The value for this key 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
* * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL * @see CaptureRequest#LENS_FILTER_DENSITY */ @PublicKey @NonNull public static final KeyList 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.
* * @see CaptureRequest#LENS_FOCAL_LENGTH */ @PublicKey @NonNull public static final KeyList 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 - The value for this key 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
* * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE */ @PublicKey @NonNull public static final KeyHyperfocal 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 - The value for this key 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
*Permission {@link android.Manifest.permission#CAMERA } is needed to access this property
* * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE */ @PublicKey @NonNull public static final KeyShortest 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 - The value for this key 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
*Permission {@link android.Manifest.permission#CAMERA } is needed to access this property
* * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION */ @PublicKey @NonNull public static final KeyDimensions 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 - The value for this key 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
* * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL * @hide */ public static final KeyThe 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:
*Optional - The value for this key 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
* * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL * @see CaptureRequest#LENS_FOCUS_DISTANCE * @see CaptureResult#LENS_FOCUS_RANGE * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED */ @PublicKey @NonNull public static final KeyDirection the camera faces relative to * device screen.
*Possible values:
*This key is available on all devices.
* @see #LENS_FACING_FRONT * @see #LENS_FACING_BACK * @see #LENS_FACING_EXTERNAL */ @PublicKey @NonNull public static final KeyThe orientation of the camera relative to the sensor * coordinate system.
*The four coefficients that describe the quaternion * rotation from the Android sensor coordinate system to a * camera-aligned coordinate system where the X-axis is * aligned with the long side of the image sensor, the Y-axis * is aligned with the short side of the image sensor, and * the Z-axis is aligned with the optical axis of the sensor.
*To convert from the quaternion coefficients (x,y,z,w)
* to the axis of rotation (a_x, a_y, a_z)
and rotation
* amount theta
, the following formulas can be used:
theta = 2 * acos(w)
* a_x = x / sin(theta/2)
* a_y = y / sin(theta/2)
* a_z = z / sin(theta/2)
*
* To create a 3x3 rotation matrix that applies the rotation * defined by this quaternion, the following matrix can be * used:
*R = [ 1 - 2y^2 - 2z^2, 2xy - 2zw, 2xz + 2yw,
* 2xy + 2zw, 1 - 2x^2 - 2z^2, 2yz - 2xw,
* 2xz - 2yw, 2yz + 2xw, 1 - 2x^2 - 2y^2 ]
*
* This matrix can then be used to apply the rotation to a * column vector point with
*p' = Rp
where p
is in the device sensor coordinate system, and
* p'
is in the camera-oriented coordinate system.
If {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is UNDEFINED, the quaternion rotation cannot * be accurately represented by the camera device, and will be represented by * default values matching its default facing.
*Units: * Quaternion coefficients
*Optional - The value for this key may be {@code null} on some devices.
*Permission {@link android.Manifest.permission#CAMERA } is needed to access this property
* * @see CameraCharacteristics#LENS_POSE_REFERENCE */ @PublicKey @NonNull public static final KeyPosition of the camera optical center.
*The position of the camera device's lens optical center,
* as a three-dimensional vector (x,y,z)
.
Prior to Android P, or when {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is PRIMARY_CAMERA, this position * is relative to the optical center of the largest camera device facing in the same * direction as this camera, in the {@link android.hardware.SensorEvent Android sensor * coordinate axes}. Note that only the axis definitions are shared with the sensor * coordinate system, but not the origin.
*If this device is the largest or only camera device with a given facing, then this
* position will be (0, 0, 0)
; a camera device with a lens optical center located 3 cm
* from the main sensor along the +X axis (to the right from the user's perspective) will
* report (0.03, 0, 0)
. Note that this means that, for many computer vision
* applications, the position needs to be negated to convert it to a translation from the
* camera to the origin.
To transform a pixel coordinates between two cameras facing the same direction, first * the source camera {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} must be corrected for. Then the source * camera {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} needs to be applied, followed by the * {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the source camera, the translation of the source camera * relative to the destination camera, the {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the destination * camera, and finally the inverse of {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} of the destination * camera. This obtains a radial-distortion-free coordinate in the destination camera pixel * coordinates.
*To compare this against a real image from the destination camera, the destination camera * image then needs to be corrected for radial distortion before comparison or sampling.
*When {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is GYROSCOPE, then this position is relative to * the center of the primary gyroscope on the device. The axis definitions are the same as * with PRIMARY_CAMERA.
*When {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is UNDEFINED, this position cannot be accurately
* represented by the camera device, and will be represented as (0, 0, 0)
.
When {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is AUTOMOTIVE, then this position is relative to the * origin of the automotive sensor coordinate system, which is at the center of the rear * axle.
*Units: Meters
*Optional - The value for this key may be {@code null} on some devices.
*Permission {@link android.Manifest.permission#CAMERA } is needed to access this property
* * @see CameraCharacteristics#LENS_DISTORTION * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION * @see CameraCharacteristics#LENS_POSE_REFERENCE * @see CameraCharacteristics#LENS_POSE_ROTATION */ @PublicKey @NonNull public static final KeyThe parameters for this camera device's intrinsic * calibration.
*The five calibration parameters that describe the * transform from camera-centric 3D coordinates to sensor * pixel coordinates:
*[f_x, f_y, c_x, c_y, s]
*
* Where f_x
and f_y
are the horizontal and vertical
* focal lengths, [c_x, c_y]
is the position of the optical
* axis, and s
is a skew parameter for the sensor plane not
* being aligned with the lens plane.
These are typically used within a transformation matrix K:
*K = [ f_x, s, c_x,
* 0, f_y, c_y,
* 0 0, 1 ]
*
* which can then be combined with the camera pose rotation
* R
and translation t
({@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} and
* {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}, respectively) to calculate the
* complete transform from world coordinates to pixel
* coordinates:
P = [ K 0 * [ R -Rt
* 0 1 ] 0 1 ]
*
* (Note the negation of poseTranslation when mapping from camera * to world coordinates, and multiplication by the rotation).
*With p_w
being a point in the world coordinate system
* and p_s
being a point in the camera active pixel array
* coordinate system, and with the mapping including the
* homogeneous division by z:
p_h = (x_h, y_h, z_h) = P p_w
* p_s = p_h / z_h
*
* so [x_s, y_s]
is the pixel coordinates of the world
* point, z_s = 1
, and w_s
is a measurement of disparity
* (depth) in pixel coordinates.
Note that the coordinate system for this transform is the
* {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} system,
* where (0,0)
is the top-left of the
* preCorrectionActiveArraySize rectangle. Once the pose and
* intrinsic calibration transforms have been applied to a
* world point, then the {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}
* transform needs to be applied, and the result adjusted to
* be in the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} coordinate
* system (where (0, 0)
is the top-left of the
* activeArraySize rectangle), to determine the final pixel
* coordinate of the world point for processed (non-RAW)
* output buffers.
For camera devices, the center of pixel (x,y)
is located at
* coordinate (x + 0.5, y + 0.5)
. So on a device with a
* precorrection active array of size (10,10)
, the valid pixel
* indices go from (0,0)-(9,9)
, and an perfectly-built camera would
* have an optical center at the exact center of the pixel grid, at
* coordinates (5.0, 5.0)
, which is the top-left corner of pixel
* (5,5)
.
Units: * Pixels in the * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} * coordinate system.
*Optional - The value for this key may be {@code null} on some devices.
*Permission {@link android.Manifest.permission#CAMERA } is needed to access this property
* * @see CameraCharacteristics#LENS_DISTORTION * @see CameraCharacteristics#LENS_POSE_ROTATION * @see CameraCharacteristics#LENS_POSE_TRANSLATION * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE */ @PublicKey @NonNull public static final KeyThe correction coefficients to correct for this camera device's * radial and tangential lens distortion.
*Four radial distortion coefficients [kappa_0, kappa_1, kappa_2,
* kappa_3]
and two tangential distortion coefficients
* [kappa_4, kappa_5]
that can be used to correct the
* lens's geometric distortion with the mapping equations:
x_c = x_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
* kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
* y_c = y_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
* kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
*
* Here, [x_c, y_c]
are the coordinates to sample in the
* input image that correspond to the pixel values in the
* corrected image at the coordinate [x_i, y_i]
:
correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
*
* The pixel coordinates are defined in a normalized
* coordinate system related to the
* {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} calibration fields.
* Both [x_i, y_i]
and [x_c, y_c]
have (0,0)
at the
* lens optical center [c_x, c_y]
. The maximum magnitudes
* of both x and y coordinates are normalized to be 1 at the
* edge further from the optical center, so the range
* for both dimensions is -1 <= x <= 1
.
Finally, r
represents the radial distance from the
* optical center, r^2 = x_i^2 + y_i^2
, and its magnitude
* is therefore no larger than |r| <= sqrt(2)
.
The distortion model used is the Brown-Conrady model.
*Units: * Unitless coefficients.
*Optional - The value for this key may be {@code null} on some devices.
*Permission {@link android.Manifest.permission#CAMERA } is needed to access this property
* * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION * @deprecated *This field was inconsistently defined in terms of its * normalization. Use {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} instead.
* * @see CameraCharacteristics#LENS_DISTORTION */ @Deprecated @PublicKey @NonNull public static final KeyThe origin for {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}, and the accuracy of * {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation} and {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}.
*Different calibration methods and use cases can produce better or worse results * depending on the selected coordinate origin.
*Possible values:
*Optional - The value for this key may be {@code null} on some devices.
*Permission {@link android.Manifest.permission#CAMERA } is needed to access this property
* * @see CameraCharacteristics#LENS_POSE_ROTATION * @see CameraCharacteristics#LENS_POSE_TRANSLATION * @see #LENS_POSE_REFERENCE_PRIMARY_CAMERA * @see #LENS_POSE_REFERENCE_GYROSCOPE * @see #LENS_POSE_REFERENCE_UNDEFINED * @see #LENS_POSE_REFERENCE_AUTOMOTIVE */ @PublicKey @NonNull public static final KeyThe correction coefficients to correct for this camera device's * radial and tangential lens distortion.
*Replaces the deprecated {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion} field, which was * inconsistently defined.
*Three radial distortion coefficients [kappa_1, kappa_2,
* kappa_3]
and two tangential distortion coefficients
* [kappa_4, kappa_5]
that can be used to correct the
* lens's geometric distortion with the mapping equations:
x_c = x_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
* kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
* y_c = y_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
* kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
*
* Here, [x_c, y_c]
are the coordinates to sample in the
* input image that correspond to the pixel values in the
* corrected image at the coordinate [x_i, y_i]
:
correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
*
* The pixel coordinates are defined in a coordinate system
* related to the {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}
* calibration fields; see that entry for details of the mapping stages.
* Both [x_i, y_i]
and [x_c, y_c]
* have (0,0)
at the lens optical center [c_x, c_y]
, and
* the range of the coordinates depends on the focal length
* terms of the intrinsic calibration.
Finally, r
represents the radial distance from the
* optical center, r^2 = x_i^2 + y_i^2
.
The distortion model used is the Brown-Conrady model.
*Units: * Unitless coefficients.
*Optional - The value for this key may be {@code null} on some devices.
*Permission {@link android.Manifest.permission#CAMERA } is needed to access this property
* * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION * @see CameraCharacteristics#LENS_RADIAL_DISTORTION */ @PublicKey @NonNull public static final KeyThe correction coefficients to correct for this camera device's * radial and tangential lens distortion for a * CaptureRequest with {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} set to * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.
*Analogous to {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}, when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.
*Units: * Unitless coefficients.
*Optional - The value for this key may be {@code null} on some devices.
*Permission {@link android.Manifest.permission#CAMERA } is needed to access this property
* * @see CameraCharacteristics#LENS_DISTORTION * @see CaptureRequest#SENSOR_PIXEL_MODE */ @PublicKey @NonNull public static final KeyThe parameters for this camera device's intrinsic * calibration when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.
*Analogous to {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}, when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.
*Units: * Pixels in the * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION android.sensor.info.preCorrectionActiveArraySizeMaximumResolution} * coordinate system.
*Optional - The value for this key may be {@code null} on some devices.
*Permission {@link android.Manifest.permission#CAMERA } is needed to access this property
* * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION * @see CaptureRequest#SENSOR_PIXEL_MODE */ @PublicKey @NonNull public static final KeyList 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.
*Camera devices that support YUV_REPROCESSING or PRIVATE_REPROCESSING will support * ZERO_SHUTTER_LAG.
*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 - The value for this key 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
* * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL * @see CaptureRequest#NOISE_REDUCTION_MODE */ @PublicKey @NonNull public static final KeyIf 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 - The value for this key may be {@code null} on some devices.
* @deprecated *Not used in HALv3 or newer; replaced by better partials mechanism
* @hide */ @Deprecated public static final KeyThe 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 categorized * into the 3 stream types as below:
*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.
* * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL * @hide */ public static final KeyThe 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:
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.
* * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP */ @PublicKey @NonNull @SyntheticKey public static final KeyThe 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:
*For full guarantees, query {@link android.hardware.camera2.params.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.
* * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP */ @PublicKey @NonNull @SyntheticKey public static final KeyThe 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 {@link android.graphics.ImageFormat#JPEG JPEG format} is a stalling format.
*For full guarantees, query {@link android.hardware.camera2.params.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.
* * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP */ @PublicKey @NonNull @SyntheticKey public static final KeyThe 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 returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }. When using an * input stream, there must be at least one output stream configured to to receive the * reprocessed images.
*When an input stream and some output streams are used in a reprocessing request, * only the input buffer will be used to produce these output stream buffers, and a * new sensor image will not be captured.
*For example, for Zero Shutter Lag (ZSL) still capture use case, the input * stream image format will be PRIVATE, the associated output stream image format * should be JPEG.
*Range of valid values:
0 or 1.
*Optional - The value for this key 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
* * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL */ @PublicKey @NonNull public static final KeySpecifies 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 normally be 8 or less, however, for high speed capture session, * the max pipeline depth will be up to 8 x size of high speed capture request list.
*This key is available on all devices.
* * @see CaptureResult#REQUEST_PIPELINE_DEPTH */ @PublicKey @NonNull public static final KeyDefines 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 - The value for this key may be {@code null} on some devices.
*/ @PublicKey @NonNull public static final KeyList 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:
Other capabilities may be available on either FULL or LIMITED * devices, but the application should query this key to be sure.
*Possible values:
*This key is available on all devices.
* * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL * @see #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING * @see #REQUEST_AVAILABLE_CAPABILITIES_RAW * @see #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING * @see #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS * @see #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE * @see #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING * @see #REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT * @see #REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO * @see #REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING * @see #REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA * @see #REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME * @see #REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA * @see #REQUEST_AVAILABLE_CAPABILITIES_SYSTEM_CAMERA * @see #REQUEST_AVAILABLE_CAPABILITIES_OFFLINE_PROCESSING * @see #REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR * @see #REQUEST_AVAILABLE_CAPABILITIES_REMOSAIC_REPROCESSING * @see #REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT * @see #REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE * @see #REQUEST_AVAILABLE_CAPABILITIES_COLOR_SPACE_PROFILES */ @PublicKey @NonNull public static final KeyA list of all keys that the camera device has available * to use with {@link android.hardware.camera2.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.
* * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES * @hide */ public static final KeyA list of all keys that the camera device has available to use with {@link android.hardware.camera2.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:
(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.
* * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE * @hide */ public static final KeyA list of all keys that the camera device has available to use with {@link android.hardware.camera2.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.
* @hide */ public static final KeyA subset of the available request keys that the camera device * can pass as part of the capture session initialization.
*This is a subset of android.request.availableRequestKeys which * contains a list of keys that are difficult to apply per-frame and * can result in unexpected delays when modified during the capture session * lifetime. Typical examples include parameters that require a * time-consuming hardware re-configuration or internal camera pipeline * change. For performance reasons we advise clients to pass their initial * values as part of * {@link SessionConfiguration#setSessionParameters }. * Once the camera capture session is enabled it is also recommended to avoid * changing them from their initial values set in * {@link SessionConfiguration#setSessionParameters }. * Control over session parameters can still be exerted in capture requests * but clients should be aware and expect delays during their application. * An example usage scenario could look like this:
*This key is available on all devices.
* @hide */ public static final KeyA subset of the available request keys that can be overridden for * physical devices backing a logical multi-camera.
*This is a subset of android.request.availableRequestKeys which contains a list * of keys that can be overridden using * {@link android.hardware.camera2.CaptureRequest.Builder#setPhysicalCameraKey }. * The respective value of such request key can be obtained by calling * {@link android.hardware.camera2.CaptureRequest.Builder#getPhysicalCameraKey }. * Capture requests that contain individual physical device requests must be built via * {@link android.hardware.camera2.CameraDevice#createCaptureRequest(int, Set)}.
*Optional - The value for this key 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
* * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL * @hide */ public static final KeyA list of camera characteristics keys that are only available * in case the camera client has camera permission.
*The entry contains a subset of * {@link android.hardware.camera2.CameraCharacteristics#getKeys } that require camera clients * to acquire the {@link android.Manifest.permission#CAMERA } permission before calling * {@link android.hardware.camera2.CameraManager#getCameraCharacteristics }. If the * permission is not held by the camera client, then the values of the respective properties * will not be present in {@link android.hardware.camera2.CameraCharacteristics }.
*This key is available on all devices.
* @hide */ public static final KeyDevices supporting the 10-bit output capability * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT } * must list their supported dynamic range profiles along with capture request * constraints for specific profile combinations.
*Camera clients can retrieve the list of supported 10-bit dynamic range profiles by calling * {@link android.hardware.camera2.params.DynamicRangeProfiles#getSupportedProfiles }. * Any of them can be configured by setting OutputConfiguration dynamic range profile in * {@link android.hardware.camera2.params.OutputConfiguration#setDynamicRangeProfile }. * Clients can also check if there are any constraints that limit the combination * of supported profiles that can be referenced within a single capture request by calling * {@link android.hardware.camera2.params.DynamicRangeProfiles#getProfileCaptureRequestConstraints }.
*Optional - The value for this key may be {@code null} on some devices.
*/ @PublicKey @NonNull @SyntheticKey public static final KeyA map of all available 10-bit dynamic range profiles along with their * capture request constraints.
*Devices supporting the 10-bit output capability * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT } * must list their supported dynamic range profiles. In case the camera is not able to * support every possible profile combination within a single capture request, then the * constraints must be listed here as well.
*Possible values:
*Optional - The value for this key may be {@code null} on some devices.
* @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HLG10 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10 * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10_PLUS * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF_PO * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM_PO * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF_PO * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM_PO * @see #REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_MAX * @hide */ public static final KeyRecommended 10-bit dynamic range profile.
*Devices supporting the 10-bit output capability * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT } * must list a 10-bit supported dynamic range profile that is expected to perform * optimally in terms of image quality, power and performance. * The value advertised can be used as a hint by camera clients when configuring the dynamic * range profile when calling * {@link android.hardware.camera2.params.OutputConfiguration#setDynamicRangeProfile }.
*Optional - The value for this key may be {@code null} on some devices.
*/ @PublicKey @NonNull public static final KeyAn interface for querying the color space profiles supported by a camera device.
*A color space profile is a combination of a color space, an image format, and a dynamic * range profile. Camera clients can retrieve the list of supported color spaces by calling * {@link android.hardware.camera2.params.ColorSpaceProfiles#getSupportedColorSpaces } or * {@link android.hardware.camera2.params.ColorSpaceProfiles#getSupportedColorSpacesForDynamicRange }. * If a camera does not support the * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT } * capability, the dynamic range profile will always be * {@link android.hardware.camera2.params.DynamicRangeProfiles#STANDARD }. Color space * capabilities are queried in combination with an {@link android.graphics.ImageFormat }. * If a camera client wants to know the general color space capabilities of a camera device * regardless of image format, it can specify {@link android.graphics.ImageFormat#UNKNOWN }. * The color space for a session can be configured by setting the SessionConfiguration * color space via {@link android.hardware.camera2.params.SessionConfiguration#setColorSpace }.
*Optional - The value for this key may be {@code null} on some devices.
*/ @PublicKey @NonNull @SyntheticKey public static final KeyA list of all possible color space profiles supported by a camera device.
*A color space profile is a combination of a color space, an image format, and a dynamic range * profile. If a camera does not support the * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT } * capability, the dynamic range profile will always be * {@link android.hardware.camera2.params.DynamicRangeProfiles#STANDARD }. Camera clients can * use {@link android.hardware.camera2.params.SessionConfiguration#setColorSpace } to select * a color space.
*Possible values:
*Optional - The value for this key may be {@code null} on some devices.
* @see #REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_UNSPECIFIED * @see #REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_SRGB * @see #REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_DISPLAY_P3 * @see #REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_BT2020_HLG * @hide */ public static final KeyThe 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 - The value for this key may be {@code null} on some devices.
* @deprecated *Not used in HALv3 or newer
* @hide */ @Deprecated public static final KeyThe 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 - The value for this key may be {@code null} on some devices.
* @deprecated *Not used in HALv3 or newer
* @hide */ @Deprecated public static final KeyThe 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 - The value for this key may be {@code null} on some devices.
* * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE * @deprecated *Not used in HALv3 or newer
* @hide */ @Deprecated public static final KeyThe 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.
*Starting from API level 30, when using {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio} to zoom in or out, * the application must use {@link CameraCharacteristics#CONTROL_ZOOM_RATIO_RANGE android.control.zoomRatioRange} to query both the minimum and * maximum zoom ratio.
*Units: Zoom scale factor
*Range of valid values:
* >=1
This key is available on all devices.
* * @see CaptureRequest#CONTROL_ZOOM_RATIO * @see CameraCharacteristics#CONTROL_ZOOM_RATIO_RANGE * @see CaptureRequest#SCALER_CROP_REGION */ @PublicKey @NonNull public static final KeyFor 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 - The value for this key may be {@code null} on some devices.
* @deprecated *Not used in HALv3 or newer
* @hide */ @Deprecated public static final KeyThe 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 - The value for this key may be {@code null} on some devices.
* @deprecated *Not used in HALv3 or newer
* @hide */ @Deprecated public static final KeyThe 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 * {@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS 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 ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}) is supported:
*Input Format | *Output Format | *Capability | *
---|---|---|
{@link android.graphics.ImageFormat#PRIVATE } | *{@link android.graphics.ImageFormat#JPEG } | *PRIVATE_REPROCESSING | *
{@link android.graphics.ImageFormat#PRIVATE } | *{@link android.graphics.ImageFormat#YUV_420_888 } | *PRIVATE_REPROCESSING | *
{@link android.graphics.ImageFormat#YUV_420_888 } | *{@link android.graphics.ImageFormat#JPEG } | *YUV_REPROCESSING | *
{@link android.graphics.ImageFormat#YUV_420_888 } | *{@link android.graphics.ImageFormat#YUV_420_888 } | *YUV_REPROCESSING | *
PRIVATE refers to a device-internal format that is not directly application-visible. A * PRIVATE input surface can be acquired by {@link android.media.ImageReader#newInstance } * with {@link android.graphics.ImageFormat#PRIVATE } as the format.
*For a PRIVATE_REPROCESSING-capable camera device, using the PRIVATE format as either input * or output will never hurt maximum frame rate (i.e. {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration getOutputStallDuration(ImageFormat.PRIVATE, size)} is always 0),
*Attempting to configure an input stream with output streams not * listed as available in this map is not valid.
*Additionally, if the camera device is MONOCHROME with Y8 support, it will also support * the following map of formats if its dependent capability * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}) is supported:
*Input Format | *Output Format | *Capability | *
---|---|---|
{@link android.graphics.ImageFormat#PRIVATE } | *{@link android.graphics.ImageFormat#Y8 } | *PRIVATE_REPROCESSING | *
{@link android.graphics.ImageFormat#Y8 } | *{@link android.graphics.ImageFormat#JPEG } | *YUV_REPROCESSING | *
{@link android.graphics.ImageFormat#Y8 } | *{@link android.graphics.ImageFormat#Y8 } | *YUV_REPROCESSING | *
Optional - The value for this key may be {@code null} on some devices.
* * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS * @hide */ public static final KeyThe 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.
*For applications targeting SDK version older than 31, 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 | ** |
For applications targeting SDK version 31 or newer, if the mobile device declares to be * media performance class 12 or higher by setting * {@link android.os.Build.VERSION#MEDIA_PERFORMANCE_CLASS } to be 31 or larger, * the primary camera devices (first rear/front camera in the camera ID list) will not * support JPEG sizes smaller than 1080p. If the application configures a JPEG stream * smaller than 1080p, the camera device will round up the JPEG image size to at least * 1080p. The requirements for IMPLEMENTATION_DEFINED and YUV_420_888 stay the same. * This new minimum required output stream configurations are illustrated by the table below:
*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 | *
YUV_420_888 | *{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} | *FULL | ** |
YUV_420_888 | *1920x1080 (1080p) | *FULL | *if 1080p <= activeArraySize | *
YUV_420_888 | *1280x720 (720) | *FULL | *if 720p <= activeArraySize | *
YUV_420_888 | *640x480 (480p) | *FULL | *if 480p <= activeArraySize | *
YUV_420_888 | *320x240 (240p) | *FULL | *if 240p <= activeArraySize | *
YUV_420_888 | *all output sizes available for FULL hardware level, up to the maximum video size | *LIMITED | ** |
IMPLEMENTATION_DEFINED | *same as YUV_420_888 | *Any | ** |
For applications targeting SDK version 31 or newer, if the mobile device doesn't declare * to be media performance class 12 or better by setting * {@link android.os.Build.VERSION#MEDIA_PERFORMANCE_CLASS } to be 31 or larger, * or if the camera device isn't a primary rear/front camera, the minimum required output * stream configurations are the same as for applications targeting SDK version older than * 31.
*Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional * mandatory stream configurations on a per-capability basis.
*Exception on 176x144 (QCIF) resolution: camera devices usually have a fixed capability for * downscaling from larger resolution to smaller, and the QCIF resolution sometimes is not * fully supported due to this limitation on devices with high-resolution image sensors. * Therefore, trying to configure a QCIF resolution stream together with any other * stream larger than 1920x1080 resolution (either width or height) might not be supported, * and capture session creation will fail if it is not.
*This key is available on all devices.
* * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE * @hide */ public static final KeyThis 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).
*See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and * android.scaler.availableStallDurations for more details about * calculating the max frame rate.
*Units: (format, width, height, ns) x n
*This key is available on all devices.
* * @see CaptureRequest#SENSOR_FRAME_DURATION * @hide */ public static final KeyThis lists the maximum stall duration for each * output 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:
*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:
*The following formats will never have a stall duration:
*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).
*Units: (format, width, height, ns) x n
*This key is available on all devices.
* * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES * @see CaptureRequest#SENSOR_FRAME_DURATION * @hide */ public static final KeyThe 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.
*For applications targeting SDK version older than 31, 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 | *
---|---|---|---|
{@link android.graphics.ImageFormat#JPEG } | *{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} (*1) | *Any | ** |
{@link android.graphics.ImageFormat#JPEG } | *1920x1080 (1080p) | *Any | *if 1080p <= activeArraySize | *
{@link android.graphics.ImageFormat#JPEG } | *1280x720 (720p) | *Any | *if 720p <= activeArraySize | *
{@link android.graphics.ImageFormat#JPEG } | *640x480 (480p) | *Any | *if 480p <= activeArraySize | *
{@link android.graphics.ImageFormat#JPEG } | *320x240 (240p) | *Any | *if 240p <= activeArraySize | *
{@link android.graphics.ImageFormat#YUV_420_888 } | *all output sizes available for JPEG | *FULL | ** |
{@link android.graphics.ImageFormat#YUV_420_888 } | *all output sizes available for JPEG, up to the maximum video size | *LIMITED | ** |
{@link android.graphics.ImageFormat#PRIVATE } | *same as YUV_420_888 | *Any | ** |
For applications targeting SDK version 31 or newer, if the mobile device declares to be * media performance class 12 or higher by setting * {@link android.os.Build.VERSION#MEDIA_PERFORMANCE_CLASS } to be 31 or larger, * the primary camera devices (first rear/front camera in the camera ID list) will not * support JPEG sizes smaller than 1080p. If the application configures a JPEG stream * smaller than 1080p, the camera device will round up the JPEG image size to at least * 1080p. The requirements for IMPLEMENTATION_DEFINED and YUV_420_888 stay the same. * This new minimum required output stream configurations are illustrated by the table below:
*Format | *Size | *Hardware Level | *Notes | *
---|---|---|---|
{@link android.graphics.ImageFormat#JPEG } | *{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} (*1) | *Any | ** |
{@link android.graphics.ImageFormat#JPEG } | *1920x1080 (1080p) | *Any | *if 1080p <= activeArraySize | *
{@link android.graphics.ImageFormat#YUV_420_888 } | *{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} | *FULL | ** |
{@link android.graphics.ImageFormat#YUV_420_888 } | *1920x1080 (1080p) | *FULL | *if 1080p <= activeArraySize | *
{@link android.graphics.ImageFormat#YUV_420_888 } | *1280x720 (720) | *FULL | *if 720p <= activeArraySize | *
{@link android.graphics.ImageFormat#YUV_420_888 } | *640x480 (480p) | *FULL | *if 480p <= activeArraySize | *
{@link android.graphics.ImageFormat#YUV_420_888 } | *320x240 (240p) | *FULL | *if 240p <= activeArraySize | *
{@link android.graphics.ImageFormat#YUV_420_888 } | *all output sizes available for FULL hardware level, up to the maximum video size | *LIMITED | ** |
{@link android.graphics.ImageFormat#PRIVATE } | *same as YUV_420_888 | *Any | ** |
For applications targeting SDK version 31 or newer, if the mobile device doesn't declare * to be media performance class 12 or better by setting * {@link android.os.Build.VERSION#MEDIA_PERFORMANCE_CLASS } to be 31 or larger, * or if the camera device isn't a primary rear/front camera, the minimum required output * stream configurations are the same as for applications targeting SDK version older than * 31.
*Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} and * the table * for additional mandatory stream configurations on a per-capability basis.
**1: For JPEG format, the sizes may be restricted by below conditions:
*Exception on 176x144 (QCIF) resolution: camera devices usually have a fixed capability on * downscaling from larger resolution to smaller ones, and the QCIF resolution can sometimes * not be fully supported due to this limitation on devices with high-resolution image * sensors. Therefore, trying to configure a QCIF resolution stream together with any other * stream larger than 1920x1080 resolution (either width or height) might not be supported, * and capture session creation will fail if it is not.
*This key is available on all devices.
* * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE */ @PublicKey @NonNull @SyntheticKey public static final KeyThe 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}.
*Starting from API level 30,
*LEGACY capability devices will only support CENTER_ONLY cropping.
*Possible values:
*This key is available on all devices.
* * @see CaptureRequest#CONTROL_ZOOM_RATIO * @see CaptureRequest#SCALER_CROP_REGION * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE * @see #SCALER_CROPPING_TYPE_CENTER_ONLY * @see #SCALER_CROPPING_TYPE_FREEFORM */ @PublicKey @NonNull public static final KeyRecommended stream configurations for common client use cases.
*Optional subset of the android.scaler.availableStreamConfigurations that contains * similar tuples listed as * (i.e. width, height, format, output/input stream, usecase bit field). * Camera devices will be able to suggest particular stream configurations which are * power and performance efficient for specific use cases. For more information about * retrieving the suggestions see * {@link android.hardware.camera2.CameraCharacteristics#getRecommendedStreamConfigurationMap }.
*Optional - The value for this key may be {@code null} on some devices.
* @hide */ public static final KeyRecommended mappings of image formats that are supported by this * camera device for input streams, to their corresponding output formats.
*This is a recommended subset of the complete list of mappings found in * android.scaler.availableInputOutputFormatsMap. The same requirements apply here as well. * The list however doesn't need to contain all available and supported mappings. Instead of * this developers must list only recommended and efficient entries. * If set, the information will be available in the ZERO_SHUTTER_LAG recommended stream * configuration see * {@link android.hardware.camera2.CameraCharacteristics#getRecommendedStreamConfigurationMap }.
*Optional - The value for this key may be {@code null} on some devices.
* @hide */ public static final KeyAn array of mandatory stream combinations generated according to the camera device * {@link android.hardware.camera2.CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL } * and {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES }. * This is an app-readable conversion of the mandatory stream combination * tables.
*The array of * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is * generated according to the documented * guideline. * based on specific device level and capabilities. * Clients can use the array as a quick reference to find an appropriate camera stream * combination. * As per documentation, the stream combinations with given PREVIEW, RECORD and * MAXIMUM resolutions and anything smaller from the list given by * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } are * guaranteed to work. * For a physical camera not independently exposed in * {@link android.hardware.camera2.CameraManager#getCameraIdList }, the mandatory stream * combinations for that physical camera Id are also generated, so that the application can * configure them as physical streams via the logical camera. * The mandatory stream combination array will be {@code null} in case the device is not * backward compatible.
*Optional - The value for this key 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
* * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL */ @PublicKey @NonNull @SyntheticKey public static final KeyAn array of mandatory concurrent stream combinations. * This is an app-readable conversion of the concurrent mandatory stream combination * tables.
*The array of * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is * generated according to the documented * guideline * for each device which has its Id present in the set returned by * {@link android.hardware.camera2.CameraManager#getConcurrentCameraIds }. * Clients can use the array as a quick reference to find an appropriate camera stream * combination. * The mandatory stream combination array will be {@code null} in case the device is not a * part of at least one set of combinations returned by * {@link android.hardware.camera2.CameraManager#getConcurrentCameraIds }.
*Optional - The value for this key may be {@code null} on some devices.
*/ @PublicKey @NonNull @SyntheticKey public static final KeyList of rotate-and-crop modes for {@link CaptureRequest#SCALER_ROTATE_AND_CROP android.scaler.rotateAndCrop} that are supported by this camera device.
*This entry lists the valid modes for {@link CaptureRequest#SCALER_ROTATE_AND_CROP android.scaler.rotateAndCrop} for this camera device.
*Starting with API level 30, all devices will list at least ROTATE_AND_CROP_NONE
.
* Devices with support for rotate-and-crop will additionally list at least
* ROTATE_AND_CROP_AUTO
and ROTATE_AND_CROP_90
.
Range of valid values:
* Any value listed in {@link CaptureRequest#SCALER_ROTATE_AND_CROP android.scaler.rotateAndCrop}
Optional - The value for this key may be {@code null} on some devices.
* * @see CaptureRequest#SCALER_ROTATE_AND_CROP */ @PublicKey @NonNull public static final KeyDefault YUV/PRIVATE size to use for requesting secure image buffers.
*This entry lists the default size supported in the secure camera mode. This entry is * optional on devices support the SECURE_IMAGE_DATA capability. This entry will be null * if the camera device does not list SECURE_IMAGE_DATA capability.
*When the key is present, only a PRIVATE/YUV output of the specified size is guaranteed * to be supported by the camera HAL in the secure camera mode. Any other format or * resolutions might not be supported. Use * {@link CameraDevice#isSessionConfigurationSupported } * API to query if a secure session configuration is supported if the device supports this * API.
*If this key returns null on a device with SECURE_IMAGE_DATA capability, the application * can assume all output sizes listed in the * {@link android.hardware.camera2.params.StreamConfigurationMap } * are supported.
*Units: Pixels
*Optional - The value for this key may be {@code null} on some devices.
*/ @PublicKey @NonNull public static final KeyThe available multi-resolution stream configurations that this * physical camera device supports * (i.e. format, width, height, output/input stream).
*This list contains a subset of the parent logical camera's multi-resolution stream * configurations which belong to this physical camera, and it will advertise and will only * advertise the maximum supported resolutions for a particular format.
*If this camera device isn't a physical camera device constituting a logical camera, * but a standalone {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR } * camera, this field represents the multi-resolution input/output stream configurations of * default mode and max resolution modes. The sizes will be the maximum resolution of a * particular format for default mode and max resolution mode.
*This field will only be advertised if the device is a physical camera of a * logical multi-camera device or an ultra high resolution sensor camera. For a logical * multi-camera, the camera API will derive the logical camera’s multi-resolution stream * configurations from all physical cameras. For an ultra high resolution sensor camera, this * is used directly as the camera’s multi-resolution stream configurations.
*Optional - The value for this key 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
* * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL * @hide */ public static final KeyThe multi-resolution stream configurations supported by this logical camera * or ultra high resolution sensor camera device.
*Multi-resolution streams can be used by a LOGICAL_MULTI_CAMERA or an * ULTRA_HIGH_RESOLUTION_SENSOR camera where the images sent or received can vary in * resolution per frame. This is useful in cases where the camera device's effective full * resolution changes depending on factors such as the current zoom level, lighting * condition, focus distance, or pixel mode.
*To use multi-resolution output streams, the supported formats can be queried by {@link android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getOutputFormats }. * A {@link android.hardware.camera2.MultiResolutionImageReader } can then be created for a * supported format with the MultiResolutionStreamInfo group queried by {@link android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getOutputInfo }.
*If a camera device supports multi-resolution output streams for a particular format, for * each of its mandatory stream combinations, the camera device will support using a * MultiResolutionImageReader for the MAXIMUM stream of supported formats. Refer to * the table * for additional details.
*To use multi-resolution input streams, the supported formats can be queried by {@link android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getInputFormats }. * A reprocessable CameraCaptureSession can then be created using an {@link android.hardware.camera2.params.InputConfiguration InputConfiguration} constructed with * the input MultiResolutionStreamInfo group, queried by {@link android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getInputInfo }.
*If a camera device supports multi-resolution {@code YUV} input and multi-resolution * {@code YUV} output, or multi-resolution {@code PRIVATE} input and multi-resolution * {@code PRIVATE} output, {@code JPEG} and {@code YUV} are guaranteed to be supported * multi-resolution output stream formats. Refer to * the table * for details about the additional mandatory stream combinations in this case.
*Optional - The value for this key may be {@code null} on some devices.
*/ @PublicKey @NonNull @SyntheticKey public static final KeyThe available stream configurations that this * camera device supports (i.e. format, width, height, output/input stream) for a * CaptureRequest with {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} set to * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.
*Analogous to android.scaler.availableStreamConfigurations, for configurations * which are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.
*Not all output formats may be supported in a configuration with * an input stream of a particular format. For more details, see * android.scaler.availableInputOutputFormatsMapMaximumResolution.
*Optional - The value for this key may be {@code null} on some devices.
* * @see CaptureRequest#SENSOR_PIXEL_MODE * @hide */ public static final KeyThis lists the minimum frame duration for each * format/size combination when the camera device is sent a CaptureRequest with * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} set to * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.
*Analogous to android.scaler.availableMinFrameDurations, for configurations * which are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.
*When multiple streams are used in a request (if supported, when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} * is set to * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }), the * minimum frame duration will be max(individual stream min durations).
*See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and * android.scaler.availableStallDurationsMaximumResolution for more details about * calculating the max frame rate.
*Units: (format, width, height, ns) x n
*Optional - The value for this key may be {@code null} on some devices.
* * @see CaptureRequest#SENSOR_FRAME_DURATION * @see CaptureRequest#SENSOR_PIXEL_MODE * @hide */ public static final KeyThis lists the maximum stall duration for each * output format/size combination when CaptureRequests are submitted with * {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} set to * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }
*Analogous to android.scaler.availableMinFrameDurations, for configurations * which are applicable when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }.
*Units: (format, width, height, ns) x n
*Optional - The value for this key may be {@code null} on some devices.
* * @see CaptureRequest#SENSOR_PIXEL_MODE * @hide */ public static final Key