diff options
author | Hirokazu Honda <hiroh@chromium.org> | 2021-12-06 14:49:17 +0900 |
---|---|---|
committer | Jacopo Mondi <jacopo@jmondi.org> | 2021-12-06 17:41:46 +0100 |
commit | e1b70e764fdeaaf423ec22776100be40e59bb0c3 (patch) | |
tree | 36d0d48bba2076b65efb27d7965373fe3958b2b0 /include | |
parent | 5148c0aa7e5957628c4fe6b8b9bca9e923e608ce (diff) |
libcamera: camera_sensor: Enable to set a test pattern mode
This adds a function to set a camera sensor driver a test pattern
mode. CameraSensor initializes the test pattern mode by Off.
Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/internal/camera_sensor.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h index bb70ed9e..2fa11567 100644 --- a/include/libcamera/internal/camera_sensor.h +++ b/include/libcamera/internal/camera_sensor.h @@ -29,6 +29,8 @@ class BayerFormat; class CameraLens; class MediaEntity; +struct CameraSensorProperties; + class CameraSensor : protected Loggable { public: @@ -47,6 +49,7 @@ public: { return testPatternModes_; } + int setTestPatternMode(controls::draft::TestPatternModeEnum mode); V4L2SubdeviceFormat getFormat(const std::vector<unsigned int> &mbusCodes, const Size &size) const; @@ -75,15 +78,16 @@ private: int validateSensorDriver(); void initVimcDefaultProperties(); void initStaticProperties(); - void initTestPatternModes( - const std::map<controls::draft::TestPatternModeEnum, int32_t> - &testPatternModeMap); + void initTestPatternModes(); int initProperties(); + int applyTestPatternMode(controls::draft::TestPatternModeEnum mode); const MediaEntity *entity_; std::unique_ptr<V4L2Subdevice> subdev_; unsigned int pad_; + const CameraSensorProperties *staticProps_; + std::string model_; std::string id_; @@ -91,6 +95,7 @@ private: std::vector<unsigned int> mbusCodes_; std::vector<Size> sizes_; std::vector<controls::draft::TestPatternModeEnum> testPatternModes_; + controls::draft::TestPatternModeEnum testPatternMode_; Size pixelArraySize_; Rectangle activeArea_; |