summaryrefslogtreecommitdiff
path: root/src/libcamera/v4l2_subdevice.cpp
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2019-03-12 12:03:22 +0100
committerJacopo Mondi <jacopo@jmondi.org>2019-04-02 11:02:38 +0200
commit8dcd871fec82270c3bd8f0d0d02f39a9cb2ffc14 (patch)
treec364d2b793d0b0b0d59b7a17a13219e178504323 /src/libcamera/v4l2_subdevice.cpp
parentee8127523879b2573893545f35c0f94b7d9f5deb (diff)
libcamera: formats: Define FormatEnum type
Add an internal format.h and format.cpp files to collect libcamera image format related types, helpers and structures. Define and document the FormatEnum type, used to enumerate pixel image formats and associated image resolutions. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/libcamera/v4l2_subdevice.cpp')
-rw-r--r--src/libcamera/v4l2_subdevice.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
index cf873487..8260e6eb 100644
--- a/src/libcamera/v4l2_subdevice.cpp
+++ b/src/libcamera/v4l2_subdevice.cpp
@@ -210,10 +210,9 @@ int V4L2Subdevice::setCompose(unsigned int pad, Rectangle *rect)
* \return A map of image formats associated with a list of image sizes, or
* an empty map on error or if the pad does not exist
*/
-const std::map<unsigned int, std::vector<SizeRange>>
-V4L2Subdevice::formats(unsigned int pad)
+FormatEnum V4L2Subdevice::formats(unsigned int pad)
{
- std::map<unsigned int, std::vector<SizeRange>> formatMap = {};
+ FormatEnum formatMap = {};
struct v4l2_subdev_mbus_code_enum mbusEnum = {};
int ret;