[libcamera-devel] [PATCH] android: camera_device: Simplify leftover CameraMetadata calls
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Thu Jun 17 07:08:13 CEST 2021
Hi Paul,
Thank you for the patch.
On Thu, Jun 17, 2021 at 01:57:13PM +0900, Paul Elder wrote:
> There were some CameraMetadata calls that were left in the old version.
> Update them.
>
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
> src/android/camera_device.cpp | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> index b8df7817..11d5c21b 100644
> --- a/src/android/camera_device.cpp
> +++ b/src/android/camera_device.cpp
> @@ -931,7 +931,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
> { 0, 1 }
> };
> staticMetadata_->addEntry(ANDROID_CONTROL_AE_COMPENSATION_STEP,
> - aeCompensationStep, 1);
> + aeCompensationStep);
>
> std::vector<uint8_t> availableAfModes = {
> ANDROID_CONTROL_AF_MODE_OFF,
> @@ -1153,7 +1153,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
> /* Statistics static metadata. */
> uint8_t faceDetectMode = ANDROID_STATISTICS_FACE_DETECT_MODE_OFF;
> staticMetadata_->addEntry(ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES,
> - &faceDetectMode, 1);
> + faceDetectMode);
>
> int32_t maxFaceCount = 0;
> staticMetadata_->addEntry(ANDROID_STATISTICS_INFO_MAX_FACE_COUNT,
> @@ -1273,8 +1273,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
> ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT);
> }
> staticMetadata_->addEntry(ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS,
> - availableStreamConfigurations.data(),
> - availableStreamConfigurations.size());
> + availableStreamConfigurations);
>
> std::vector<int64_t> availableStallDurations = {
> ANDROID_SCALER_AVAILABLE_FORMATS_BLOB, 2560, 1920, 33333333,
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list