libcamera: media_pipeline: Add accessor for MediaPipeline list of entities
Exposes internal MediaEntity::Entity list to help extracting more information regarding linked entities. For example, when the pad index of the last device in the list need to be retrieved from the media pipeline user. Exposes as const to with a dedicated access to prevent any corruption from user. Then it is still protected so as when the list was private. Since MediaPipeline::Entity needs also to be moved to public, then need to add some documentation in cpp source. Existing documentation from header file is applied when available. Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com> Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
committed by
Kieran Bingham
parent
3c17d1fbb2
commit
056613cb12
@@ -23,36 +23,21 @@ struct V4L2SubdeviceFormat;
|
||||
class MediaPipeline
|
||||
{
|
||||
public:
|
||||
struct Entity {
|
||||
MediaEntity *entity;
|
||||
bool supportsRouting;
|
||||
const MediaPad *sink;
|
||||
const MediaPad *source;
|
||||
MediaLink *sourceLink;
|
||||
};
|
||||
|
||||
int init(MediaEntity *source, std::string_view sink);
|
||||
int initLinks();
|
||||
int configure(CameraSensor *sensor, V4L2SubdeviceFormat *);
|
||||
|
||||
private:
|
||||
struct Entity {
|
||||
/* The media entity, always valid. */
|
||||
MediaEntity *entity;
|
||||
/*
|
||||
* Whether or not the entity is a subdev that supports the
|
||||
* routing API.
|
||||
*/
|
||||
bool supportsRouting;
|
||||
/*
|
||||
* The local sink pad connected to the upstream entity, null for
|
||||
* the camera sensor at the beginning of the pipeline.
|
||||
*/
|
||||
const MediaPad *sink;
|
||||
/*
|
||||
* The local source pad connected to the downstream entity, null
|
||||
* for the video node at the end of the pipeline.
|
||||
*/
|
||||
const MediaPad *source;
|
||||
/*
|
||||
* The link on the source pad, to the downstream entity, null
|
||||
* for the video node at the end of the pipeline.
|
||||
*/
|
||||
MediaLink *sourceLink;
|
||||
};
|
||||
const std::list<Entity> &entities() const { return entities_; }
|
||||
|
||||
private:
|
||||
std::list<Entity> entities_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user