From f23e6127ad073a99d4374929f95aac9d3f24dba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Wed, 15 Jul 2020 17:31:46 +0200 Subject: libcamera: camera_sensor: Generate a sensor ID MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- include/libcamera/internal/camera_sensor.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') 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 subdev_; unsigned int pad_; std::string model_; + std::string id_; V4L2Subdevice::Formats formats_; Size resolution_; -- cgit v1.2.1