diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2020-03-31 13:01:19 +0200 |
---|---|---|
committer | Jacopo Mondi <jacopo@jmondi.org> | 2020-04-28 22:25:22 +0200 |
commit | 5db1426b6016d50e95dd922e7af1c30d26751323 (patch) | |
tree | f5e0447ec7ca2b0c4dc4c48141a2419b6e2b19d1 /src/libcamera/include | |
parent | 56baa28a791dee950b27479d4407ad699567a795 (diff) |
libcamera: v4l2_subdevice: Add format information
Define a map of static information associated with a media bus code.
Start by reporting the bits-per-pixel for each media bus code defined by
the V4L2 kernel API, to later expand it when necessary.
Add to the V4L2SubdeviceFormat class a method to return the bits per
pixel, retrieved by inspecting the static map of format information.
While at it, remove a rogue map inclusion from header file.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/libcamera/include')
-rw-r--r-- | src/libcamera/include/v4l2_subdevice.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcamera/include/v4l2_subdevice.h b/src/libcamera/include/v4l2_subdevice.h index 27ba5b17..d0e565db 100644 --- a/src/libcamera/include/v4l2_subdevice.h +++ b/src/libcamera/include/v4l2_subdevice.h @@ -7,7 +7,6 @@ #ifndef __LIBCAMERA_V4L2_SUBDEVICE_H__ #define __LIBCAMERA_V4L2_SUBDEVICE_H__ -#include <map> #include <string> #include <vector> @@ -27,6 +26,7 @@ struct V4L2SubdeviceFormat { Size size; const std::string toString() const; + uint8_t bitsPerPixel() const; }; class V4L2Subdevice : public V4L2Device |