mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-24 17:15:07 +03:00
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>
This commit is contained in:
parent
d60fb23258
commit
7941903d62
2 changed files with 116 additions and 1 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue