libcamera: media_device: Expose media device API version number
Add a MediaDevice::version() function to expose the media device API version number. This can be useful to support driver API changes in pipeline handlers. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
@@ -40,6 +40,7 @@ public:
|
||||
const std::string driver() const { return driver_; }
|
||||
const std::string deviceNode() const { return deviceNode_; }
|
||||
const std::string model() const { return model_; }
|
||||
unsigned int version() const { return version_; }
|
||||
|
||||
const std::vector<MediaEntity *> &entities() const { return entities_; }
|
||||
MediaEntity *getEntityByName(const std::string &name) const;
|
||||
|
||||
@@ -314,6 +314,15 @@ done:
|
||||
* \return The MediaDevice model name
|
||||
*/
|
||||
|
||||
/**
|
||||
* \fn MediaDevice::version()
|
||||
* \brief Retrieve the media device API version
|
||||
*
|
||||
* The version is formatted with the KERNEL_VERSION() macro.
|
||||
*
|
||||
* \return The MediaDevice API version
|
||||
*/
|
||||
|
||||
/**
|
||||
* \fn MediaDevice::entities()
|
||||
* \brief Retrieve the list of entities in the media graph
|
||||
|
||||
Reference in New Issue
Block a user