summaryrefslogtreecommitdiff
path: root/src/libcamera/v4l2_videodevice.cpp
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 /src/libcamera/v4l2_videodevice.cpp
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 'src/libcamera/v4l2_videodevice.cpp')
-rw-r--r--src/libcamera/v4l2_videodevice.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
index e0d22012..652677ff 100644
--- a/src/libcamera/v4l2_videodevice.cpp
+++ b/src/libcamera/v4l2_videodevice.cpp
@@ -462,6 +462,11 @@ const std::string V4L2DeviceFormat::toString() const
*/
/**
+ * \typedef V4L2VideoDevice::Formats
+ * \brief A map of supported V4L2 pixel formats to frame sizes
+ */
+
+/**
* \brief Construct a V4L2VideoDevice
* \param[in] deviceNode The file-system path to the video device node
*/
@@ -951,9 +956,9 @@ int V4L2VideoDevice::trySetFormatSingleplane(V4L2DeviceFormat *format, bool set)
*
* \return A list of the supported video device formats
*/
-std::map<V4L2PixelFormat, std::vector<SizeRange>> V4L2VideoDevice::formats(uint32_t code)
+V4L2VideoDevice::Formats V4L2VideoDevice::formats(uint32_t code)
{
- std::map<V4L2PixelFormat, std::vector<SizeRange>> formats;
+ Formats formats;
for (V4L2PixelFormat pixelFormat : enumPixelformats(code)) {
std::vector<SizeRange> sizes = enumSizes(pixelFormat);