@@ -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 */
@@ -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 */