[libcamera-devel,3/5] android: camera_device: Add (max, max) FPS range

Message ID 20200725164243.168297-4-jacopo@jmondi.org
State Superseded, archived
Delegated to: Jacopo Mondi
Headers show
Series
  • android: cts: Fix Manual and VideoRecording templates
Related show

Commit Message

Jacopo Mondi July 25, 2020, 4:42 p.m. UTC
Add to the static camera characteristics metadata pack an additional
FPS range entry which report the (max, max) FPS range, which is now
fixed to 30 frames per second.

The (max, max) FPS range will be used to construct the request
template for the video recording capture intent, which requires the
FPS range to be a single value.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 src/android/camera_device.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Niklas Söderlund July 28, 2020, 11:59 p.m. UTC | #1
Hi Jacopo,

Thanks for your work.

On 2020-07-25 18:42:41 +0200, Jacopo Mondi wrote:
> Add to the static camera characteristics metadata pack an additional
> FPS range entry which report the (max, max) FPS range, which is now
> fixed to 30 frames per second.
> 
> The (max, max) FPS range will be used to construct the request
> template for the video recording capture intent, which requires the
> FPS range to be a single value.
> 
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> 

> ---
>  src/android/camera_device.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> index de18d1dbe299..ca746b685c26 100644
> --- a/src/android/camera_device.cpp
> +++ b/src/android/camera_device.cpp
> @@ -377,7 +377,7 @@ std::tuple<uint32_t, uint32_t> CameraDevice::calculateStaticMetadataSize()
>  	 * Currently: 50 entries, 647 bytes of static metadata
>  	 */
>  	uint32_t numEntries = 50;
> -	uint32_t byteSize = 671;
> +	uint32_t byteSize = 679;
>  
>  	/*
>  	 * Calculate space occupation in bytes for dynamically built metadata
> @@ -446,6 +446,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
>  
>  	std::vector<int32_t> availableAeFpsTarget = {
>  		15, 30,
> +		30, 30,
>  	};
>  	staticMetadata_->addEntry(ANDROID_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES,
>  				  availableAeFpsTarget.data(),
> -- 
> 2.27.0
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index de18d1dbe299..ca746b685c26 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -377,7 +377,7 @@  std::tuple<uint32_t, uint32_t> CameraDevice::calculateStaticMetadataSize()
 	 * Currently: 50 entries, 647 bytes of static metadata
 	 */
 	uint32_t numEntries = 50;
-	uint32_t byteSize = 671;
+	uint32_t byteSize = 679;
 
 	/*
 	 * Calculate space occupation in bytes for dynamically built metadata
@@ -446,6 +446,7 @@  const camera_metadata_t *CameraDevice::getStaticMetadata()
 
 	std::vector<int32_t> availableAeFpsTarget = {
 		15, 30,
+		30, 30,
 	};
 	staticMetadata_->addEntry(ANDROID_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES,
 				  availableAeFpsTarget.data(),