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>
This commit is contained in:
@@ -22,6 +22,7 @@ class MediaObject
|
||||
{
|
||||
public:
|
||||
MediaDevice *device() { return dev_; }
|
||||
const MediaDevice *device() const { return dev_; }
|
||||
unsigned int id() const { return id_; }
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user