summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-07-15 17:31:46 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-08-05 20:07:13 +0200
commitf23e6127ad073a99d4374929f95aac9d3f24dba8 (patch)
tree112c84da0ecf4a12a42322a592e39baa8f2c0ae8 /include
parent1869d1b312e27cd34bb837b61ff674532afbc842 (diff)
libcamera: camera_sensor: Generate a sensor ID
The ID is generated from information in the firmware description of the sensor if available or from module and model information if the sensor is virtual (for example VIMC). 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>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/camera_sensor.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h
index 06c8292c..0f65fca4 100644
--- a/include/libcamera/internal/camera_sensor.h
+++ b/include/libcamera/internal/camera_sensor.h
@@ -67,11 +67,14 @@ protected:
std::string logPrefix() const override;
private:
+ int generateId();
+
const MediaEntity *entity_;
std::unique_ptr<V4L2Subdevice> subdev_;
unsigned int pad_;
std::string model_;
+ std::string id_;
V4L2Subdevice::Formats formats_;
Size resolution_;