android: camera_device: Fix sensor frame duration

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@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
This commit is contained in:
Paul Elder 2021-05-19 19:46:45 +09:00
parent 19772ffe10
commit 3beb1accac

View file

@ -2306,6 +2306,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[] = {