libcamera: MediaEntity: expose the entity flags

The media entity flags can be useful for pipeline handlers to find the
default device in a media graph which is marked with the
MEDIA_ENT_FL_DEFAULT flag. This will be especially useful for the UVC
pipeline handler where the entity names differ per device.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Niklas Söderlund
2019-01-23 15:42:49 +01:00
parent d3f18625bc
commit 6013b58fee
2 changed files with 14 additions and 1 deletions
+2
View File
@@ -85,6 +85,7 @@ class MediaEntity : public MediaObject
public:
const std::string &name() const { return name_; }
unsigned int function() const { return function_; }
unsigned int flags() const { return flags_; }
const std::string &deviceNode() const { return deviceNode_; }
unsigned int deviceMajor() const { return major_; }
unsigned int deviceMinor() const { return minor_; }
@@ -106,6 +107,7 @@ private:
std::string name_;
unsigned int function_;
unsigned int flags_;
std::string deviceNode_;
unsigned int major_;
unsigned int minor_;