[libcamera-devel] [PATCH v2 2/2] android: Check if Stream configurations were generated correctly
Javier Martinez Canillas
javierm at redhat.com
Tue Oct 5 08:04:18 CEST 2021
Thanks Hiro and Jacobo for the feedback.
On 10/4/21 10:41, Jacopo Mondi wrote:
> Hi Javier,
[snip]
>
> Hence, if we get to generate a config for a role we know there's a
> supported compatible format.
>
Agreed, that's why I used "could lead to..." (I first wrote "will lead")
but the function should not attempt to dereference a pointer that may be
NULL and rely on the caller to only call it when is safe.
[snip]
>> +
>> StreamConfiguration &cfg = cameraConfig->at(0);
>> const StreamFormats &formats = cfg.formats();
>> - std::vector<Size> supportedResolutions = formats.sizes(pixelFormat);
>> + supportedResolutions = formats.sizes(pixelFormat);
>
> Hiro's right, not required, but I prefer your way as it makes
> initializeRawResolutions more similar to initializeYUVResolutions
>
Yes, I did if for consistency between the two functions. I don't have a
strong opinion really, I'm happy to change if you believe that's better.
Best regards,
--
Javier Martinez Canillas
Linux Engineering
Red Hat
More information about the libcamera-devel
mailing list