libcamera: media_object: Set devnode in MediaEntity
The MediaEntity::setDeviceNode() function was designed to set the device node path associated with a MediaEntity. The function was there, but the devnode_ member field was never actually set. Fix this. While at there add a getter method for the devnode_ member as it will soon be used. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
ec53057f0a
commit
5c85ef5883
2 changed files with 12 additions and 0 deletions
|
@ -85,6 +85,7 @@ class MediaEntity : public MediaObject
|
||||||
public:
|
public:
|
||||||
const std::string &name() const { return name_; }
|
const std::string &name() const { return name_; }
|
||||||
unsigned int function() const { return function_; }
|
unsigned int function() const { return function_; }
|
||||||
|
const std::string &devnode() const { return devnode_; }
|
||||||
unsigned int deviceMajor() const { return major_; }
|
unsigned int deviceMajor() const { return major_; }
|
||||||
unsigned int deviceMinor() const { return minor_; }
|
unsigned int deviceMinor() const { return minor_; }
|
||||||
|
|
||||||
|
|
|
@ -263,6 +263,15 @@ void MediaPad::addLink(MediaLink *link)
|
||||||
* \return The entity's function
|
* \return The entity's function
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \fn MediaEntity::devnode()
|
||||||
|
* \brief Retrieve the entity's device node path, if any
|
||||||
|
*
|
||||||
|
* \sa int setDeviceNode()
|
||||||
|
*
|
||||||
|
* \return The entity's device node path, or an empty string if it is not set
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \fn MediaEntity::deviceMajor()
|
* \fn MediaEntity::deviceMajor()
|
||||||
* \brief Retrieve the major number of the interface associated with the entity
|
* \brief Retrieve the major number of the interface associated with the entity
|
||||||
|
@ -330,6 +339,8 @@ int MediaEntity::setDeviceNode(const std::string &devnode)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
devnode_ = devnode;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue