diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-08-31 16:13:31 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-09-24 09:12:35 +0200 |
commit | 72b603357ae461c0f19ca05d6624b4afd5c74b47 (patch) | |
tree | 564599089a7740d6a8a767f1307816898b8cc396 /include/media | |
parent | 612589a35e99fcbb7c85d8ba21b01f0249cc188d (diff) | |
download | linux-72b603357ae461c0f19ca05d6624b4afd5c74b47.tar.bz2 |
media: mc: entity: Add media_entity_pipeline() to access the media pipeline
Replace direct access to the pipe field in drivers with a new helper
function. This will allow easier refactoring of media pipeline handling
in the MC core behind the scenes without affecting drivers.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/media-entity.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/media/media-entity.h b/include/media/media-entity.h index 1030e45e8ee6..aaf276f765cf 100644 --- a/include/media/media-entity.h +++ b/include/media/media-entity.h @@ -949,6 +949,24 @@ static inline bool media_entity_is_streaming(const struct media_entity *entity) } /** + * media_entity_pipeline - Get the media pipeline an entity is part of + * @entity: The entity + * + * This function returns the media pipeline that an entity has been associated + * with when constructing the pipeline with media_pipeline_start(). The pointer + * remains valid until media_pipeline_stop() is called. + * + * In general, entities can be part of multiple pipelines, when carrying + * multiple streams (either on different pads, or on the same pad using + * multiplexed streams). This function is to be used only for entities that + * do not support multiple pipelines. + * + * Return: The media_pipeline the entity is part of, or NULL if the entity is + * not part of any pipeline. + */ +struct media_pipeline *media_entity_pipeline(struct media_entity *entity); + +/** * media_entity_get_fwnode_pad - Get pad number from fwnode * * @entity: The entity |