diff options
Diffstat (limited to 'include')
-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 c5618f7c1408..f16ffe70f7a6 100644 --- a/include/media/media-entity.h +++ b/include/media/media-entity.h @@ -860,6 +860,24 @@ struct media_link *media_entity_find_link(struct media_pad *source, struct media_pad *media_pad_remote_pad_first(const struct media_pad *pad); /** + * media_pad_remote_pad_unique - Find a remote pad connected to a pad + * @pad: The pad + * + * Search for and return a remote pad connected to @pad through an enabled + * link. If multiple (or no) remote pads are found, an error is returned. + * + * The uniqueness constraint makes this helper function suitable for entities + * that support a single active source at a time on a given pad. + * + * Return: A pointer to the remote pad, or one of the following error pointers + * if an error occurs: + * + * * -ENOTUNIQ - Multiple links are enabled + * * -ENOLINK - No connected pad found + */ +struct media_pad *media_pad_remote_pad_unique(const struct media_pad *pad); + +/** * media_entity_remote_pad_unique - Find a remote pad connected to an entity * @entity: The entity * @type: The type of pad to find (MEDIA_PAD_FL_SINK or MEDIA_PAD_FL_SOURCE) |