@@ -54,6 +54,11 @@ public:
const std::vector<unsigned int> &mbusCodes() const { return mbusCodes_; }
const std::vector<Size> &sizes() const { return sizes_; }
Size resolution() const;
+ const std::vector<int32_t> &availableTestPatternModes() const
+ {
+ return availableTestPatternModes_;
+ }
+
V4L2SubdeviceFormat getFormat(const std::vector<unsigned int> &mbusCodes,
const Size &size) const;
@@ -89,6 +94,7 @@ private:
V4L2Subdevice::Formats formats_;
std::vector<unsigned int> mbusCodes_;
std::vector<Size> sizes_;
+ std::vector<int32_t> availableTestPatternModes_;
Size pixelArraySize_;
Rectangle activeArea_;
@@ -262,6 +262,8 @@ int CameraSensor::init()
}
}
+ availableTestPatternModes_ = subdev_->getAvailableTestPatternModes();
+
ret = validateSensorDriver();
if (ret)
return ret;
@@ -548,6 +550,12 @@ int CameraSensor::initProperties()
* \return The supported frame sizes sorted in increasing order
*/
+/**
+ * \fn CameraSensor::availableTestPatternModes()
+ * \brief Retrieve the test pattern modes supported by the camera sensor
+ * \return The available test pattern modes.
+ */
+
/**
* \brief Retrieve the camera sensor resolution
*
This adds a getter function for available test pattern modes. The available test pattern modes are initialized one time on CameraSensor::init(). Signed-off-by: Hirokazu Honda <hiroh@chromium.org> --- include/libcamera/internal/camera_sensor.h | 6 ++++++ src/libcamera/camera_sensor.cpp | 8 ++++++++ 2 files changed, 14 insertions(+)