[libcamera-devel] [PATCH v2 4/6] android: camera_capabilities: Fix the type of the capability vector
Jacopo Mondi
jacopo at jmondi.org
Tue Dec 21 13:46:09 CET 2021
Hi again
On Tue, Dec 21, 2021 at 11:55:18AM +0000, Kieran Bingham wrote:
> Quoting Jacopo Mondi (2021-12-21 10:42:43)
> > Hi Paul,
> >
> > On Mon, Dec 20, 2021 at 05:26:27PM -0600, Paul Elder wrote:
> > > The type of elements of the capability vector that is set in the static
> > > metadata must be uint8_t. The enum will not suffice, as it is int32_t.
> > > Fix this.
> > >
> > > Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
> > > Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> > > ---
> > > src/android/camera_capabilities.cpp | 3 ++-
> > > 1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
> > > index 6d383486..ea2aaf58 100644
> > > --- a/src/android/camera_capabilities.cpp
> > > +++ b/src/android/camera_capabilities.cpp
> > > @@ -1389,7 +1389,8 @@ int CameraCapabilities::initializeStaticMetadata()
> > >
> > > /* Check capabilities */
> > > capabilities_ = computeCapabilities();
> > > - std::vector<camera_metadata_enum_android_request_available_capabilities>
> > > + /* This *must* uint8_t. */
>
> Still missing the 'be' that I highlighted in a previous version though
> ;-)
Do we need the comment at all ?
>
> --
> Kieran
>
>
> > > + std::vector<uint8_t>
> > > capsVec(capabilities_.begin(), capabilities_.end());
> >
> > android.request.availableCapabilities is indeed documented as [byte x n]
> >
> > Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>
> >
> > Thanks
> > j
> >
> > > staticMetadata_->addEntry(ANDROID_REQUEST_AVAILABLE_CAPABILITIES, capsVec);
> > >
> > > --
> > > 2.27.0
> > >
More information about the libcamera-devel
mailing list