[libcamera-devel] [PATCH v4 5/8] libcamera: camera_sensor: Expose the camera device
Niklas Söderlund
niklas.soderlund at ragnatech.se
Tue Dec 15 01:48:08 CET 2020
Expose the device backing the CameraSensor instance.
Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
---
* Changes since v3
- New, needed to be able to move the DelayedControls handling out of
CameraSensor.
---
include/libcamera/internal/camera_sensor.h | 2 ++
src/libcamera/camera_sensor.cpp | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h
index f80d836161a564e7..a70e024aa327f69b 100644
--- a/include/libcamera/internal/camera_sensor.h
+++ b/include/libcamera/internal/camera_sensor.h
@@ -61,6 +61,8 @@ public:
ControlList getControls(const std::vector<uint32_t> &ids);
int setControls(ControlList *ctrls);
+ V4L2Subdevice *device() { return subdev_.get(); }
+
const ControlList &properties() const { return properties_; }
int sensorInfo(CameraSensorInfo *info) const;
diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp
index 1628ba9c892b0eaf..df45b2b803617bfd 100644
--- a/src/libcamera/camera_sensor.cpp
+++ b/src/libcamera/camera_sensor.cpp
@@ -486,6 +486,12 @@ ControlList CameraSensor::getControls(const std::vector<uint32_t> &ids)
return subdev_->getControls(ids);
}
+/**
+ * \fn CameraSensor::device()
+ * \brief Retrieve the camera sensor device
+ * \return The camera sensor device
+ */
+
/**
* \fn CameraSensor::properties()
* \brief Retrieve the camera sensor properties
--
2.29.2
More information about the libcamera-devel
mailing list