summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2021-01-05 13:11:16 +0100
committerJacopo Mondi <jacopo@jmondi.org>2021-01-18 10:39:14 +0100
commita1a20998aca365a5835d534c49fc3cd4de7246ec (patch)
tree5246335c750f81d157366a7a4207425bd7f011b3 /include
parent89b495c054e5704bb68a1cbc876e575c91499b47 (diff)
libcamera: media_object: Add a const version of dev()
Add a const version of the MediaObject::dev() method to be able to retrieve a pointer to a const MediaDevice from a constant instance of a MediaObject sub-class. Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/media_object.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/libcamera/internal/media_object.h b/include/libcamera/internal/media_object.h
index 43a35bef..2b336961 100644
--- a/include/libcamera/internal/media_object.h
+++ b/include/libcamera/internal/media_object.h
@@ -22,6 +22,7 @@ class MediaObject
{
public:
MediaDevice *device() { return dev_; }
+ const MediaDevice *device() const { return dev_; }
unsigned int id() const { return id_; }
protected: