summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-02-26 12:53:01 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-03-15 12:54:58 +0200
commit7941903d628a4511fc1cd63ab0df291d70c99bbd (patch)
treef9e136a23ab0329de9cfe22ec7af6e72adc4cb69 /include
parentd60fb232588efe9f9aee001faaab35bf5f46bec1 (diff)
libcamera: v4l2_subdevice: Extend MediaBusFormatInfo with metadata formats
Not all media bus formats describe image formats. Extend the MediaBusFormatInfo class with a type member to indicate if the format corresponds to image data or metadata, and add the (only) metatdata format supported by the kernel to the known mediaBusFormatInfo. The kernel doesn't (yet) have any metadata format specific to sensor embedded data. This is being addressed in the V4L2 API. In preparation for embedded data support, already introduce the EmbeddedData type here. Corresponding formats will be added when available. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/v4l2_subdevice.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h
index a4df9ddf..c9aa90e0 100644
--- a/include/libcamera/internal/v4l2_subdevice.h
+++ b/include/libcamera/internal/v4l2_subdevice.h
@@ -32,12 +32,19 @@ class MediaDevice;
class MediaBusFormatInfo
{
public:
+ enum class Type {
+ Image,
+ Metadata,
+ EmbeddedData,
+ };
+
bool isValid() const { return code != 0; }
static const MediaBusFormatInfo &info(uint32_t code);
const char *name;
uint32_t code;
+ Type type;
unsigned int bitsPerPixel;
PixelFormatInfo::ColourEncoding colourEncoding;
};