libcamera: v4l2_subdevice: Rename deviceName() method
Rename the 'deviceName()' method to 'entityName()' as it actually returns the name of the entity backing the v4l2 subdevice. While at it, make the names getter methods return a const reference instead of returning by copy. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
@@ -37,8 +37,8 @@ public:
|
||||
bool isOpen() const;
|
||||
void close();
|
||||
|
||||
std::string deviceNode() const { return entity_->deviceNode(); }
|
||||
std::string deviceName() const { return entity_->name(); }
|
||||
const std::string &deviceNode() const { return entity_->deviceNode(); }
|
||||
const std::string &entityName() const { return entity_->name(); }
|
||||
|
||||
int setCrop(unsigned int pad, Rectangle *rect);
|
||||
int setCompose(unsigned int pad, Rectangle *rect);
|
||||
|
||||
@@ -166,7 +166,7 @@ void V4L2Subdevice::close()
|
||||
*/
|
||||
|
||||
/**
|
||||
* \fn V4L2Subdevice::deviceName()
|
||||
* \fn V4L2Subdevice::entityName()
|
||||
* \brief Retrieve the name of the media entity associated with the subdevice
|
||||
*
|
||||
* \return The name of the media entity the subdevice is associated to
|
||||
@@ -315,7 +315,7 @@ int V4L2Subdevice::setFormat(unsigned int pad, V4L2SubdeviceFormat *format)
|
||||
|
||||
std::string V4L2Subdevice::logPrefix() const
|
||||
{
|
||||
return "'" + deviceName() + "'";
|
||||
return "'" + entityName() + "'";
|
||||
}
|
||||
|
||||
int V4L2Subdevice::enumPadSizes(unsigned int pad,unsigned int code,
|
||||
|
||||
Reference in New Issue
Block a user