media: vimc: Add vimc-streamer for stream control

Add a linear pipeline logic for the stream control. It's created by
walking backwards on the entity graph. When the stream starts it will
simply loop through the pipeline calling the respective process_frame
function of each entity.

Fixes: f2fe89061d ("vimc: Virtual Media Controller core, capture
and sensor")

Cc: stable@vger.kernel.org # for v4.20
Signed-off-by: Lucas A. M. Magalhães <lucmaga@gmail.com>
Acked-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil-cisco@xs4all.nl: fixed small space-after-tab issue in the patch]
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
Lucas A. M. Magalhães
2019-01-21 20:05:01 -05:00
committed by Mauro Carvalho Chehab
parent 276c1f066b
commit adc589d2a2
9 changed files with 260 additions and 147 deletions

View File

@@ -115,23 +115,12 @@ struct vimc_pix_map {
struct vimc_ent_device {
struct media_entity *ent;
struct media_pad *pads;
void (*process_frame)(struct vimc_ent_device *ved,
struct media_pad *sink, const void *frame);
void * (*process_frame)(struct vimc_ent_device *ved,
const void *frame);
void (*vdev_get_format)(struct vimc_ent_device *ved,
struct v4l2_pix_format *fmt);
};
/**
* vimc_propagate_frame - propagate a frame through the topology
*
* @src: the source pad where the frame is being originated
* @frame: the frame to be propagated
*
* This function will call the process_frame callback from the vimc_ent_device
* struct of the nodes directly connected to the @src pad
*/
int vimc_propagate_frame(struct media_pad *src, const void *frame);
/**
* vimc_pads_init - initialize pads
*