[libcamera-devel] [PATCH] android: camera_capabilities: Ensure PixelArrayActiveAreas exists before accessing

Kieran Bingham kieran.bingham at ideasonboard.com
Thu Jul 15 16:29:37 CEST 2021


Hi Laurent,

On 15/07/2021 15:06, Laurent Pinchart wrote:
> Hi Kieran,
> 
> Thank you for the patch.
> 
> On Thu, Jul 15, 2021 at 03:00:11PM +0100, Kieran Bingham wrote:
>> The VIVID pipline handler does not set this. It's likely that the
>> UVC pipeline will not either.
>>
>> If not present, we must not access it.
> 
> Wasn't this considered as a mandatory property ?

By android - or by us?

Can this property be identified on a UVC camera?

Or should we just report the biggest frame size in the pipeline handler
if it's not something we can otherwise determine?

I had thought mandatory properties were going to have a flag in the yaml
- but I don't see it here (or anywhere though).

Do we already define mandatory properties in another location?
--
Kieran


> 
>> Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
>> ---
>>  src/android/camera_capabilities.cpp | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
>> index 6b5edb66fad2..dfc961affe46 100644
>> --- a/src/android/camera_capabilities.cpp
>> +++ b/src/android/camera_capabilities.cpp
>> @@ -589,7 +589,7 @@ int CameraCapabilities::initializeStaticMetadata()
>>  					  physicalSize);
>>  	}
>>  
>> -	{
>> +	if (properties.contains(properties::PixelArrayActiveAreas)) {
>>  		const Span<const Rectangle> &rects =
>>  			properties.get(properties::PixelArrayActiveAreas);
>>  		std::vector<int32_t> data{
> 


More information about the libcamera-devel mailing list