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 /include | |
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 'include')
-rw-r--r-- | include/libcamera/internal/media_object.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/libcamera/internal/media_object.h b/include/libcamera/internal/media_object.h index 90c63598..b1572968 100644 --- a/include/libcamera/internal/media_object.h +++ b/include/libcamera/internal/media_object.h @@ -104,6 +104,7 @@ public: unsigned int deviceMinor() const { return minor_; } const std::vector<MediaPad *> &pads() const { return pads_; } + const std::vector<MediaEntity *> ancillaryEntities() const { return ancillaryEntities_; } const MediaPad *getPadByIndex(unsigned int index) const; const MediaPad *getPadById(unsigned int id) const; @@ -120,6 +121,8 @@ private: void addPad(MediaPad *pad); + void addAncillaryEntity(MediaEntity *ancillaryEntity); + std::string name_; unsigned int function_; unsigned int flags_; @@ -129,6 +132,7 @@ private: unsigned int minor_; std::vector<MediaPad *> pads_; + std::vector<MediaEntity *> ancillaryEntities_; }; } /* namespace libcamera */ |