summaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-07-31 16:22:40 +0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-17 20:16:19 +0300
commit9d6d20e652c0d304f98de30d51805658f98ba27d (patch)
treea8b5a870f2ceb249c7d846fa9d78c06b50644477 /include/media
parentc1a37dd5e87dc6a4c37e5fc68d7b26fb4a3ef097 (diff)
downloadlinux-9d6d20e652c0d304f98de30d51805658f98ba27d.tar.xz
media: v4l2-mc: switch it to use the new approach to setup pipelines
Instead of relying on a static map for pids, use the new sig_type "taint" type to setup the pipelines with the same tipe between different entities. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/media-entity.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/media/media-entity.h b/include/media/media-entity.h
index b7a53f5d3e12..e5f6960d92f6 100644
--- a/include/media/media-entity.h
+++ b/include/media/media-entity.h
@@ -671,6 +671,24 @@ static inline void media_entity_cleanup(struct media_entity *entity) {}
#endif
/**
+ * media_get_pad_index() - retrieves a pad index from an entity
+ *
+ * @entity: entity where the pads belong
+ * @is_sink: true if the pad is a sink, false if it is a source
+ * @sig_type: type of signal of the pad to be search
+ *
+ * This helper function finds the first pad index inside an entity that
+ * satisfies both @is_sink and @sig_type conditions.
+ *
+ * Return:
+ *
+ * On success, return the pad number. If the pad was not found or the media
+ * entity is a NULL pointer, return -EINVAL.
+ */
+int media_get_pad_index(struct media_entity *entity, bool is_sink,
+ enum media_pad_signal_type sig_type);
+
+/**
* media_create_pad_link() - creates a link between two entities.
*
* @source: pointer to &media_entity of the source pad.