[libcamera-devel] [PATCH v3 2/3] android: camera_device: Fix sensor frame duration

Jacopo Mondi jacopo at jmondi.org
Tue May 25 12:24:07 CEST 2021


Hi Paul,

On Tue, May 25, 2021 at 06:18:11PM +0900, Paul Elder wrote:
> The sensor frame duration should be set by IPA. Get the information for
> the result metadata from libcamera.
>
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>

Thanks
  j

> ---
>  src/android/camera_device.cpp | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> index 0eea2b95..70173424 100644
> --- a/src/android/camera_device.cpp
> +++ b/src/android/camera_device.cpp
> @@ -2252,6 +2252,12 @@ CameraDevice::getResultMetadata(const Camera3RequestDescriptor &descriptor) cons
>  		resultMetadata->addEntry(ANDROID_SENSOR_EXPOSURE_TIME, exposure);
>  	}
>
> +	if (metadata.contains(controls::FrameDuration)) {
> +		int64_t duration = metadata.get(controls::FrameDuration) * 1000;
> +		resultMetadata->addEntry(ANDROID_SENSOR_FRAME_DURATION,
> +					 duration);
> +	}
> +
>  	if (metadata.contains(controls::ScalerCrop)) {
>  		Rectangle crop = metadata.get(controls::ScalerCrop);
>  		int32_t cropRect[] = {
> --
> 2.27.0
>


More information about the libcamera-devel mailing list