From c65e40b8480ffb5f50e01a4e6713164c7194a937 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Thu, 19 Oct 2023 16:01:31 +0200 Subject: libcamera: Use CameraConfiguration::orientation Replace the usage of CameraConfiguration::transform with the newly introduced CameraConfiguration::orientation. Rework and rename the CameraSensor::validateTransform(transform) to CameraSensor::computeTransform(orientation), that given the desired image orientation computes the Transform that pipeline handlers should apply to the sensor to obtain it. Port all pipeline handlers to use the newly introduced function. This commit breaks existing applications as it removes the public CameraConfiguration::transform in favour of CameraConfiguration::orientation. Signed-off-by: Jacopo Mondi Reviewed-by: David Plowman Signed-off-by: Laurent Pinchart --- include/libcamera/camera.h | 2 -- include/libcamera/internal/camera_sensor.h | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'include/libcamera') diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h index a4536c72..ae35792d 100644 --- a/include/libcamera/camera.h +++ b/include/libcamera/camera.h @@ -24,7 +24,6 @@ #include #include #include -#include namespace libcamera { @@ -94,7 +93,6 @@ public: std::size_t size() const; std::optional sensorConfig; - Transform transform; Orientation orientation; protected: diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h index 0b2ece31..bcdb2d83 100644 --- a/include/libcamera/internal/camera_sensor.h +++ b/include/libcamera/internal/camera_sensor.h @@ -33,6 +33,8 @@ class SensorConfiguration; struct CameraSensorProperties; +enum class Orientation; + class CameraSensor : protected Loggable { public: @@ -76,7 +78,7 @@ public: CameraLens *focusLens() { return focusLens_.get(); } - Transform validateTransform(Transform *transform) const; + Transform computeTransform(Orientation *orientation) const; protected: std::string logPrefix() const override; -- cgit v1.2.1