summaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
Diffstat (limited to 'include/media')
-rw-r--r--include/media/media-entity.h15
-rw-r--r--include/media/v4l2-dev.h14
2 files changed, 29 insertions, 0 deletions
diff --git a/include/media/media-entity.h b/include/media/media-entity.h
index aaf276f765cf..a77933afaa48 100644
--- a/include/media/media-entity.h
+++ b/include/media/media-entity.h
@@ -100,10 +100,12 @@ struct media_graph {
/**
* struct media_pipeline - Media pipeline related information
*
+ * @allocated: Media pipeline allocated and freed by the framework
* @start_count: Media pipeline start - stop count
* @graph: Media graph walk during pipeline start / stop
*/
struct media_pipeline {
+ bool allocated;
int start_count;
struct media_graph graph;
};
@@ -1093,6 +1095,19 @@ void media_pipeline_stop(struct media_entity *entity);
void __media_pipeline_stop(struct media_entity *entity);
/**
+ * media_pipeline_alloc_start - Mark a pipeline as streaming
+ * @entity: Starting entity
+ *
+ * media_pipeline_alloc_start() is similar to media_pipeline_start() but instead
+ * of working on a given pipeline the function will use an existing pipeline if
+ * the entity is already part of a pipeline, or allocate a new pipeline.
+ *
+ * Calls to media_pipeline_alloc_start() must be matched with
+ * media_pipeline_stop().
+ */
+__must_check int media_pipeline_alloc_start(struct media_entity *entity);
+
+/**
* media_devnode_create() - creates and initializes a device node interface
*
* @mdev: pointer to struct &media_device
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index 494685872254..643da0740ab0 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -608,6 +608,20 @@ void video_device_pipeline_stop(struct video_device *vdev);
void __video_device_pipeline_stop(struct video_device *vdev);
/**
+ * video_device_pipeline_alloc_start - Mark a pipeline as streaming
+ * @vdev: Starting video device
+ *
+ * video_device_pipeline_alloc_start() is similar to video_device_pipeline_start()
+ * but instead of working on a given pipeline the function will use an
+ * existing pipeline if the video device is already part of a pipeline, or
+ * allocate a new pipeline.
+ *
+ * Calls to video_device_pipeline_alloc_start() must be matched with
+ * video_device_pipeline_stop().
+ */
+__must_check int video_device_pipeline_alloc_start(struct video_device *vdev);
+
+/**
* video_device_pipeline - Get the media pipeline a video device is part of
* @vdev: The video device
*