diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/internal/v4l2_device.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/libcamera/internal/v4l2_device.h b/include/libcamera/internal/v4l2_device.h index 8886b750..a52a5f2c 100644 --- a/include/libcamera/internal/v4l2_device.h +++ b/include/libcamera/internal/v4l2_device.h @@ -9,6 +9,7 @@ #include <map> #include <memory> +#include <optional> #include <vector> #include <linux/videodev2.h> @@ -18,6 +19,7 @@ #include <libcamera/base/span.h> #include <libcamera/base/unique_fd.h> +#include <libcamera/color_space.h> #include <libcamera/controls.h> namespace libcamera { @@ -56,6 +58,12 @@ protected: int fd() const { return fd_.get(); } + template<typename T> + static std::optional<ColorSpace> toColorSpace(const T &v4l2Format); + + template<typename T> + static int fromColorSpace(const std::optional<ColorSpace> &colorSpace, T &v4l2Format); + private: static ControlType v4l2CtrlType(uint32_t ctrlType); static std::unique_ptr<ControlId> v4l2ControlId(const v4l2_query_ext_ctrl &ctrl); |