Message ID | 20200501164332.24517-1-laurent.pinchart@ideasonboard.com |
---|---|
State | Accepted |
Commit | 554cbc0fa8984ce7109c3b85d13900a890e8563e |
Headers | show |
Series |
|
Related | show |
Hi Laurent, Thanks for your work. On 2020-05-01 19:43:31 +0300, Laurent Pinchart wrote: > 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> > --- > src/libcamera/include/media_device.h | 1 + > src/libcamera/media_device.cpp | 9 +++++++++ > 2 files changed, 10 insertions(+) > > diff --git a/src/libcamera/include/media_device.h b/src/libcamera/include/media_device.h > index 44a59e70139e..4d9f76618ec0 100644 > --- a/src/libcamera/include/media_device.h > +++ b/src/libcamera/include/media_device.h > @@ -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; > diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp > index 0d6b5efd9e7a..d4e7e1002224 100644 > --- a/src/libcamera/media_device.cpp > +++ b/src/libcamera/media_device.cpp > @@ -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 > -- > Regards, > > Laurent Pinchart > > _______________________________________________ > libcamera-devel mailing list > libcamera-devel@lists.libcamera.org > https://lists.libcamera.org/listinfo/libcamera-devel
diff --git a/src/libcamera/include/media_device.h b/src/libcamera/include/media_device.h index 44a59e70139e..4d9f76618ec0 100644 --- a/src/libcamera/include/media_device.h +++ b/src/libcamera/include/media_device.h @@ -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; diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp index 0d6b5efd9e7a..d4e7e1002224 100644 --- a/src/libcamera/media_device.cpp +++ b/src/libcamera/media_device.cpp @@ -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
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> --- src/libcamera/include/media_device.h | 1 + src/libcamera/media_device.cpp | 9 +++++++++ 2 files changed, 10 insertions(+)