diff options
author | Daniel Scally <djrscally@gmail.com> | 2022-03-03 23:49:48 +0000 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2022-03-15 17:20:59 +0000 |
commit | 9490c664b57a6cf47fa6af2687f7180d78d24c6d (patch) | |
tree | 87a2aa9d5efec9f79c4e7f3cf9a20b8a71bee2e1 /src | |
parent | b608984e78824f8738a089136721b1fe54016248 (diff) |
libcamera: Add members to MediaEntity to support ancillary entities
With kernel support for ancillary links, we can describe the
relationship between two devices represented individually as instances
of MediaEntity. As the only property of that relationship is its
existence, describe those relationships in libcamera simply as a
vector of MediaEntity pointers to the ancillary devices.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Scally <djrscally@gmail.com>
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/media_object.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libcamera/media_object.cpp b/src/libcamera/media_object.cpp index f425d044..c78f4758 100644 --- a/src/libcamera/media_object.cpp +++ b/src/libcamera/media_object.cpp @@ -423,4 +423,19 @@ void MediaEntity::addPad(MediaPad *pad) pads_.push_back(pad); } +/** + * \brief Add a MediaEntity to the list of ancillary entities + * \param[in] ancillaryEntity The instance of MediaEntity to add + */ +void MediaEntity::addAncillaryEntity(MediaEntity *ancillaryEntity) +{ + ancillaryEntities_.push_back(ancillaryEntity); +} + +/** + * \fn MediaEntity::ancillaryEntities() + * \brief Retrieve all ancillary entities of the entity + * \return The list of the entity's ancillary entities + */ + } /* namespace libcamera */ |