diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-07-01 22:05:09 +0200 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-07-23 16:31:41 +0200 |
commit | dcda73ec14a69d303456cb8ab4869410c29bd762 (patch) | |
tree | da39c75d2825cac7b0fa73dcbb5d1626e6585233 /include/libcamera/internal/v4l2_subdevice.h | |
parent | d9295552b17c72c57357e901cd256bcf66528233 (diff) |
libcamera: v4l2_subdevice: Replace ImageFormats with a map
Replace the V4L2Subdevice usage of the ImageFormats class with a
std::map and the utils::map_keys() helper.
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'include/libcamera/internal/v4l2_subdevice.h')
-rw-r--r-- | include/libcamera/internal/v4l2_subdevice.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h index a3ecf123..02ee3e91 100644 --- a/include/libcamera/internal/v4l2_subdevice.h +++ b/include/libcamera/internal/v4l2_subdevice.h @@ -32,6 +32,8 @@ struct V4L2SubdeviceFormat { class V4L2Subdevice : public V4L2Device { public: + using Formats = std::map<unsigned int, std::vector<SizeRange>>; + enum Whence { ActiveFormat, TryFormat, @@ -51,7 +53,7 @@ public: int setSelection(unsigned int pad, unsigned int target, Rectangle *rect); - ImageFormats formats(unsigned int pad); + Formats formats(unsigned int pad); int getFormat(unsigned int pad, V4L2SubdeviceFormat *format, Whence whence = ActiveFormat); |