libcamera: camera_sensor: Add accessors for sensor ID

Add an accessors so that the sensor ID can be used outside CameraSensor.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Niklas Söderlund
2020-08-04 17:50:11 +02:00
parent f23e6127ad
commit 082a5b2dfe
2 changed files with 11 additions and 0 deletions

View File

@@ -47,6 +47,7 @@ public:
int init();
const std::string &model() const { return model_; }
const std::string &id() const { return id_; }
const MediaEntity *entity() const { return entity_; }
const std::vector<unsigned int> &mbusCodes() const { return mbusCodes_; }
const std::vector<Size> &sizes() const { return sizes_; }

View File

@@ -290,6 +290,16 @@ int CameraSensor::init()
* \return The sensor model name
*/
/**
* \fn CameraSensor::id()
* \brief Retrieve the sensor ID
*
* The sensor ID is a free-form string that uniquely identifies the sensor in
* the system. The ID satisfies the requirements to be used as a camera ID.
*
* \return The sensor ID
*/
/**
* \fn CameraSensor::entity()
* \brief Retrieve the sensor media entity