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.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libcamera/include/media_device.h b/src/libcamera/include/media_device.h
index 8d491a87..9f45fc7a 100644
--- a/src/libcamera/include/media_device.h
+++ b/src/libcamera/include/media_device.h
@@ -38,7 +38,7 @@ public:
const std::string devnode() const { return devnode_; }
const std::vector<MediaEntity *> &entities() const { return entities_; }
- MediaEntity *getEntityByName(const std::string &name);
+ MediaEntity *getEntityByName(const std::string &name) const;
private:
std::string driver_;
diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp
index 18956519..4ff9ffe1 100644
--- a/src/libcamera/media_device.cpp
+++ b/src/libcamera/media_device.cpp
@@ -297,7 +297,7 @@ int MediaDevice::populate()
* \return The entity with \a name
* \return nullptr if no entity with \a name is found
*/
-MediaEntity *MediaDevice::getEntityByName(const std::string &name)
+MediaEntity *MediaDevice::getEntityByName(const std::string &name) const
{
for (MediaEntity *e : entities_)
if (e->name() == name)