diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-12-14 21:17:04 +0100 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2021-01-29 15:35:28 +0100 |
commit | d8595ebf2009891f30a964c65198a7a0a065af70 (patch) | |
tree | eb125029afd7b3448de0ab15c1b2df590a19670a | |
parent | 82eb3f7e6dc5e5ba3897ad07b1a3e037d2bc38c6 (diff) |
libcamera: camera_sensor: Expose the camera device
Expose the device backing the CameraSensor instance.
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r-- | include/libcamera/internal/camera_sensor.h | 2 | ||||
-rw-r--r-- | src/libcamera/camera_sensor.cpp | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h index fed36bf2..bf83d531 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 ca33c009..2d150434 100644 --- a/src/libcamera/camera_sensor.cpp +++ b/src/libcamera/camera_sensor.cpp @@ -642,6 +642,13 @@ int CameraSensor::setControls(ControlList *ctrls) } /** + * \fn CameraSensor::device() + * \brief Retrieve the camera sensor device + * \todo Remove this function by integrating DelayedControl with CameraSensor + * \return The camera sensor device + */ + +/** * \fn CameraSensor::properties() * \brief Retrieve the camera sensor properties * \return The list of camera sensor properties |