summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/include/media_device.h2
-rw-r--r--src/libcamera/media_device.cpp7
2 files changed, 9 insertions, 0 deletions
diff --git a/src/libcamera/include/media_device.h b/src/libcamera/include/media_device.h
index ba3046dd..8a7b9489 100644
--- a/src/libcamera/include/media_device.h
+++ b/src/libcamera/include/media_device.h
@@ -36,6 +36,7 @@ public:
const std::string driver() const { return driver_; }
const std::string deviceNode() const { return deviceNode_; }
+ const std::string model() const { return model_; }
const std::vector<MediaEntity *> &entities() const { return entities_; }
MediaEntity *getEntityByName(const std::string &name) const;
@@ -50,6 +51,7 @@ public:
private:
std::string driver_;
std::string deviceNode_;
+ std::string model_;
int fd_;
bool valid_;
bool acquired_;
diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp
index 81c6a773..b12e7143 100644
--- a/src/libcamera/media_device.cpp
+++ b/src/libcamera/media_device.cpp
@@ -166,6 +166,7 @@ int MediaDevice::open()
}
driver_ = info.driver;
+ model_ = info.model;
return 0;
}
@@ -291,6 +292,12 @@ int MediaDevice::populate()
*/
/**
+ * \fn MediaDevice::model()
+ * \brief Retrieve the media device model name
+ * \return The MediaDevice model name
+ */
+
+/**
* \fn MediaDevice::entities()
* \brief Retrieve the list of entities in the media graph
* \return The list of MediaEntities registered in the MediaDevice