diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2019-01-23 15:42:49 +0100 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2019-01-25 15:14:03 +0100 |
commit | 6013b58fee4b442bce0d3672de4e459a73487280 (patch) | |
tree | 21ff44ef87fd6e95c2135f1a6a316602e48509e8 /src/libcamera/media_object.cpp | |
parent | d3f18625bcc3d69eeb6c951ee8872f99b6077dd3 (diff) |
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>
Diffstat (limited to 'src/libcamera/media_object.cpp')
-rw-r--r-- | src/libcamera/media_object.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/libcamera/media_object.cpp b/src/libcamera/media_object.cpp index baf9aeaa..f6abcd86 100644 --- a/src/libcamera/media_object.cpp +++ b/src/libcamera/media_object.cpp @@ -266,6 +266,16 @@ void MediaPad::addLink(MediaLink *link) */ /** + * \fn MediaEntity::flags() + * \brief Retrieve the entity's flags + * + * Media entity flags are expressed using the MEDIA_ENT_FL_* macros + * defined by the Media Controller API. + * + * \return The entity's flags + */ + +/** * \fn MediaEntity::deviceNode() * \brief Retrieve the entity's device node path, if any * @@ -358,7 +368,8 @@ MediaEntity::MediaEntity(MediaDevice *dev, const struct media_v2_entity *entity, unsigned int major, unsigned int minor) : MediaObject(dev, entity->id), name_(entity->name), - function_(entity->function), major_(major), minor_(minor) + function_(entity->function), flags_(entity->flags), + major_(major), minor_(minor) { } |