summaryrefslogtreecommitdiff
path: root/src/libcamera/v4l2_videodevice.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-30 03:16:53 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-30 14:44:59 +0300
commit09044794b4e7c33dd6d4dbef765f3e3641a00d94 (patch)
tree4fbab490c4061e50752d3b111c6330add6970c48 /src/libcamera/v4l2_videodevice.cpp
parent25a101846d02af48c53109038a891f2aeb1ac8db (diff)
libcamera: v4l2_pixelformat: Move V4L2PixelFormat to a new file
Move the V4L2PixelFormat class to a new file to prepare for additional changes that will make it grow. No functional modification is included. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/libcamera/v4l2_videodevice.cpp')
-rw-r--r--src/libcamera/v4l2_videodevice.cpp77
1 files changed, 0 insertions, 77 deletions
diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
index e8d4f17d..21df4f52 100644
--- a/src/libcamera/v4l2_videodevice.cpp
+++ b/src/libcamera/v4l2_videodevice.cpp
@@ -279,83 +279,6 @@ bool V4L2BufferCache::Entry::operator==(const FrameBuffer &buffer) const
}
/**
- * \class V4L2PixelFormat
- * \brief V4L2 pixel format FourCC wrapper
- *
- * The V4L2PixelFormat class describes the pixel format of a V4L2 buffer. It
- * wraps the V4L2 numerical FourCC, and shall be used in all APIs that deal with
- * V4L2 pixel formats. Its purpose is to prevent unintentional confusion of
- * V4L2 and DRM FourCCs in code by catching implicit conversion attempts at
- * compile time.
- *
- * To achieve this goal, construction of a V4L2PixelFormat from an integer value
- * is explicit. To retrieve the integer value of a V4L2PixelFormat, both the
- * explicit value() and implicit uint32_t conversion operators may be used.
- */
-
-/**
- * \fn V4L2PixelFormat::V4L2PixelFormat()
- * \brief Construct a V4L2PixelFormat with an invalid format
- *
- * V4L2PixelFormat instances constructed with the default constructor are
- * invalid, calling the isValid() function returns false.
- */
-
-/**
- * \fn V4L2PixelFormat::V4L2PixelFormat(uint32_t fourcc)
- * \brief Construct a V4L2PixelFormat from a FourCC value
- * \param[in] fourcc The pixel format FourCC numerical value
- */
-
-/**
- * \fn bool V4L2PixelFormat::isValid() const
- * \brief Check if the pixel format is valid
- *
- * V4L2PixelFormat instances constructed with the default constructor are
- * invalid. Instances constructed with a FourCC defined in the V4L2 API are
- * valid. The behaviour is undefined otherwise.
- *
- * \return True if the pixel format is valid, false otherwise
- */
-
-/**
- * \fn uint32_t V4L2PixelFormat::fourcc() const
- * \brief Retrieve the pixel format FourCC numerical value
- * \return The pixel format FourCC numerical value
- */
-
-/**
- * \fn V4L2PixelFormat::operator uint32_t() const
- * \brief Convert to the pixel format FourCC numerical value
- * \return The pixel format FourCC numerical value
- */
-
-/**
- * \brief Assemble and return a string describing the pixel format
- * \return A string describing the pixel format
- */
-std::string V4L2PixelFormat::toString() const
-{
- if (fourcc_ == 0)
- return "<INVALID>";
-
- char ss[8] = { static_cast<char>(fourcc_ & 0x7f),
- static_cast<char>((fourcc_ >> 8) & 0x7f),
- static_cast<char>((fourcc_ >> 16) & 0x7f),
- static_cast<char>((fourcc_ >> 24) & 0x7f) };
-
- for (unsigned int i = 0; i < 4; i++) {
- if (!isprint(ss[i]))
- ss[i] = '.';
- }
-
- if (fourcc_ & (1 << 31))
- strcat(ss, "-BE");
-
- return ss;
-}
-
-/**
* \class V4L2DeviceFormat
* \brief The V4L2 video device image format and sizes
*