libcamera: media_object: Add functions to entities
Media entities convey information about their main function in the 'function' field of 'struct media_v2_entity'. Store the main function in the MediaEntity function_ class member and provide a getter function for that. While at there update comments, keep the MediaPad description in sync with the MediaEntity one and remove a stale TODO entry. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
@@ -84,6 +84,7 @@ class MediaEntity : public MediaObject
|
||||
{
|
||||
public:
|
||||
const std::string &name() const { return name_; }
|
||||
unsigned int function() const { return function_; }
|
||||
unsigned int deviceMajor() const { return major_; }
|
||||
unsigned int deviceMinor() const { return minor_; }
|
||||
|
||||
@@ -103,6 +104,7 @@ private:
|
||||
~MediaEntity();
|
||||
|
||||
std::string name_;
|
||||
unsigned int function_;
|
||||
std::string devnode_;
|
||||
unsigned int major_;
|
||||
unsigned int minor_;
|
||||
|
||||
Reference in New Issue
Block a user