[libcamera-devel] [PATCH] android: capabilities: Add exposure time keys only if available
Kieran Bingham
kieran.bingham at ideasonboard.com
Thu Nov 18 11:02:46 CET 2021
Quoting Paul Elder (2021-11-18 09:52:40)
> The exposure time range static metadata key and the exposure time
> request and result keys are not required for non-FULL hardware levels.
> Since we already have checks for them in the capability detector, only
> add them if the libcamera camera supports it.
>
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
LGTM,
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> ---
> src/android/camera_capabilities.cpp | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
> index 6e46f163..105d5b4f 100644
> --- a/src/android/camera_capabilities.cpp
> +++ b/src/android/camera_capabilities.cpp
> @@ -812,7 +812,6 @@ int CameraCapabilities::initializeStaticMetadata()
> ANDROID_SENSOR_AVAILABLE_TEST_PATTERN_MODES,
> ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE,
> ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT,
> - ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE,
> ANDROID_SENSOR_INFO_MAX_FRAME_DURATION,
> ANDROID_SENSOR_INFO_PHYSICAL_SIZE,
> ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE,
> @@ -890,7 +889,6 @@ int CameraCapabilities::initializeStaticMetadata()
> ANDROID_NOISE_REDUCTION_MODE,
> ANDROID_REQUEST_PIPELINE_DEPTH,
> ANDROID_SCALER_CROP_REGION,
> - ANDROID_SENSOR_EXPOSURE_TIME,
> ANDROID_SENSOR_FRAME_DURATION,
> ANDROID_SENSOR_ROLLING_SHUTTER_SKEW,
> ANDROID_SENSOR_TEST_PATTERN_MODE,
> @@ -1106,6 +1104,10 @@ int CameraCapabilities::initializeStaticMetadata()
>
> staticMetadata_->addEntry(ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE,
> exposureTimeRange, 2);
> +
> + availableCharacteristicsKeys_.insert(ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE);
> + availableRequestKeys_.insert(ANDROID_SENSOR_EXPOSURE_TIME);
> + availableResultKeys_.insert(ANDROID_SENSOR_EXPOSURE_TIME);
> }
>
> staticMetadata_->addEntry(ANDROID_SENSOR_ORIENTATION, orientation_);
> --
> 2.27.0
>
More information about the libcamera-devel
mailing list