From dcda73ec14a69d303456cb8ab4869410c29bd762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Wed, 1 Jul 2020 22:05:09 +0200 Subject: libcamera: v4l2_subdevice: Replace ImageFormats with a map MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the V4L2Subdevice usage of the ImageFormats class with a std::map and the utils::map_keys() helper. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Kieran Bingham --- include/libcamera/internal/v4l2_subdevice.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/libcamera/internal/v4l2_subdevice.h') 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>; + 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); -- cgit v1.2.1