libcamera: internal: camera_sensor: Add accessor for mountingOrientation_

To properly handle the orientation in the dewarper, the mounting
orientation of the sensor needs to be queryable. Add that.

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
This commit is contained in:
Stefan Klug
2025-11-25 17:28:33 +01:00
parent ff1908a7a1
commit 9df164fa42
4 changed files with 10 additions and 0 deletions

View File

@@ -73,6 +73,7 @@ public:
virtual int sensorInfo(IPACameraSensorInfo *info) const = 0;
virtual Transform computeTransform(Orientation *orientation) const = 0;
virtual BayerFormat::Order bayerOrder(Transform t) const = 0;
virtual Orientation mountingOrientation() const = 0;
virtual const ControlInfoMap &controls() const = 0;
virtual ControlList getControls(Span<const uint32_t> ids) = 0;

View File

@@ -331,6 +331,13 @@ int CameraSensor::setEmbeddedDataEnabled(bool enable)
* \return The Bayer order produced by the sensor when the Transform is applied
*/
/**
* \fn CameraSensor::mountingOrientation()
* \brief Fetch the mounting orientation of the sensor
*
* \return The mounting orientation of the sensor
*/
/**
* \fn CameraSensor::controls()
* \brief Retrieve the supported V4L2 controls and their information

View File

@@ -88,6 +88,7 @@ public:
int sensorInfo(IPACameraSensorInfo *info) const override;
Transform computeTransform(Orientation *orientation) const override;
BayerFormat::Order bayerOrder(Transform t) const override;
Orientation mountingOrientation() const override { return mountingOrientation_; }
const ControlInfoMap &controls() const override;
ControlList getControls(Span<const uint32_t> ids) override;

View File

@@ -94,6 +94,7 @@ public:
int sensorInfo(IPACameraSensorInfo *info) const override;
Transform computeTransform(Orientation *orientation) const override;
BayerFormat::Order bayerOrder(Transform t) const override;
Orientation mountingOrientation() const override { return mountingOrientation_; }
const ControlInfoMap &controls() const override;
ControlList getControls(Span<const uint32_t> ids) override;