summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-07-21 15:30:43 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-07-23 16:31:41 +0200
commita8a2048ab0541d7a9743bc7f0db91229cc34f320 (patch)
tree6c14dc98689719a62609c31b6460f02653c4d2ea /include
parent4a5b0df9841f7d19d706adbefb2f2cbb4ea8569b (diff)
libcamera: v4l2_videodevice: Add using statement for format map
Define a using statement for the format maps returned by V4L2Device::formats() and use it in all call sites. There is no functional change in this patch. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/v4l2_videodevice.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h
index fb4c0aab..40ed87e1 100644
--- a/include/libcamera/internal/v4l2_videodevice.h
+++ b/include/libcamera/internal/v4l2_videodevice.h
@@ -168,6 +168,8 @@ public:
class V4L2VideoDevice : public V4L2Device
{
public:
+ using Formats = std::map<V4L2PixelFormat, std::vector<SizeRange>>;
+
explicit V4L2VideoDevice(const std::string &deviceNode);
explicit V4L2VideoDevice(const MediaEntity *entity);
V4L2VideoDevice(const V4L2VideoDevice &) = delete;
@@ -188,7 +190,7 @@ public:
int getFormat(V4L2DeviceFormat *format);
int tryFormat(V4L2DeviceFormat *format);
int setFormat(V4L2DeviceFormat *format);
- std::map<V4L2PixelFormat, std::vector<SizeRange>> formats(uint32_t code = 0);
+ Formats formats(uint32_t code = 0);
int setSelection(unsigned int target, Rectangle *rect);