libcamera: v4l2_device: Add META support in g/s_fmt

Add two operations to set and get format on devices implementing the
V4L2 Metadata Interface, identified by the META_OUTPUT or META_CAPTURE
capabilities.

While at it, sort get/setFormat operations alphabetically and unify
their style (eg. no empty line before ioctl).

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Jacopo Mondi
2019-05-24 09:06:58 +02:00
parent 81e004e0ff
commit 629e9301c5
2 changed files with 90 additions and 26 deletions
+5 -2
View File
@@ -150,12 +150,15 @@ protected:
std::string logPrefix() const;
private:
int getFormatSingleplane(V4L2DeviceFormat *format);
int setFormatSingleplane(V4L2DeviceFormat *format);
int getFormatMeta(V4L2DeviceFormat *format);
int setFormatMeta(V4L2DeviceFormat *format);
int getFormatMultiplane(V4L2DeviceFormat *format);
int setFormatMultiplane(V4L2DeviceFormat *format);
int getFormatSingleplane(V4L2DeviceFormat *format);
int setFormatSingleplane(V4L2DeviceFormat *format);
int requestBuffers(unsigned int count);
int createPlane(Buffer *buffer, unsigned int plane,
unsigned int length);