diff options
author | Daniel Scally <dan.scally@ideasonboard.com> | 2024-11-15 07:46:27 +0000 |
---|---|---|
committer | Daniel Scally <dan.scally@ideasonboard.com> | 2024-11-27 10:52:12 +0000 |
commit | ca64f0514a98efc6d9eb32348e601523a6908661 (patch) | |
tree | 4fc5d77f90bf3964fe0437c000870697ab64a6f0 /include | |
parent | f5db8497327963854fce63e9200e7ffc95ef238b (diff) |
libcamera: camera_sensor_properties: Add sensor control delays
Add properties covering the sensor control application delays to both
the static CameraSensorProperties definitions. The values used are
taken from Raspberry Pi's CamHelper class definitions. Where no more
specific values are known the delay struct is defined as empty and
defaults supplied through the getter function.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/internal/camera_sensor.h | 2 | ||||
-rw-r--r-- | include/libcamera/internal/camera_sensor_properties.h | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h index 8aafd82e..d030e254 100644 --- a/include/libcamera/internal/camera_sensor.h +++ b/include/libcamera/internal/camera_sensor.h @@ -21,6 +21,7 @@ #include <libcamera/transform.h> #include "libcamera/internal/bayer_format.h" +#include "libcamera/internal/camera_sensor_properties.h" #include "libcamera/internal/v4l2_subdevice.h" namespace libcamera { @@ -73,6 +74,7 @@ public: virtual const std::vector<controls::draft::TestPatternModeEnum> & testPatternModes() const = 0; virtual int setTestPatternMode(controls::draft::TestPatternModeEnum mode) = 0; + virtual const CameraSensorProperties::SensorDelays &sensorDelays() = 0; }; class CameraSensorFactoryBase diff --git a/include/libcamera/internal/camera_sensor_properties.h b/include/libcamera/internal/camera_sensor_properties.h index 480ac121..d7d4dab6 100644 --- a/include/libcamera/internal/camera_sensor_properties.h +++ b/include/libcamera/internal/camera_sensor_properties.h @@ -8,6 +8,7 @@ #pragma once #include <map> +#include <stdint.h> #include <string> #include <libcamera/control_ids.h> @@ -16,10 +17,18 @@ namespace libcamera { struct CameraSensorProperties { + struct SensorDelays { + uint8_t exposureDelay; + uint8_t gainDelay; + uint8_t vblankDelay; + uint8_t hblankDelay; + }; + static const CameraSensorProperties *get(const std::string &sensor); Size unitCellSize; std::map<controls::draft::TestPatternModeEnum, int32_t> testPatternModes; + SensorDelays sensorDelays; }; } /* namespace libcamera */ |