summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo.mondi@ideasonboard.com>2023-09-21 18:55:39 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2023-09-27 14:35:42 +0300
commit1602043e626eee55944820dd17a242e352f9ab1f (patch)
tree8116b10a4cb46a4dd7929672f8ae561f11c4db55 /include
parent9780f46f64070cc40405ab678797334e251458a4 (diff)
libcamera: camera: Introduce SensorConfiguration
Introduce SensorConfiguration in the libcamera API. The SensorConfiguration is part of the CameraConfiguration class and allows applications to control the sensor settings. Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/camera.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h
index 004bc894..decf4ec0 100644
--- a/include/libcamera/camera.h
+++ b/include/libcamera/camera.h
@@ -9,6 +9,7 @@
#include <initializer_list>
#include <memory>
+#include <optional>
#include <set>
#include <stdint.h>
#include <string>
@@ -19,6 +20,7 @@
#include <libcamera/base/signal.h>
#include <libcamera/controls.h>
+#include <libcamera/geometry.h>
#include <libcamera/request.h>
#include <libcamera/stream.h>
#include <libcamera/transform.h>
@@ -30,6 +32,30 @@ class FrameBufferAllocator;
class PipelineHandler;
class Request;
+class SensorConfiguration
+{
+public:
+ unsigned int bitDepth = 0;
+
+ Rectangle analogCrop;
+
+ struct {
+ unsigned int binX = 1;
+ unsigned int binY = 1;
+ } binning;
+
+ struct {
+ unsigned int xOddInc = 1;
+ unsigned int xEvenInc = 1;
+ unsigned int yOddInc = 1;
+ unsigned int yEvenInc = 1;
+ } skipping;
+
+ Size outputSize;
+
+ bool isValid() const;
+};
+
class CameraConfiguration
{
public:
@@ -66,6 +92,7 @@ public:
bool empty() const;
std::size_t size() const;
+ std::optional<SensorConfiguration> sensorConfig;
Transform transform;
protected: