treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / media / platform / vimc / vimc-streamer.h
blobfe3c51f15fad67f44edccc171b525718a41883bd
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3 * vimc-streamer.h Virtual Media Controller Driver
5 * Copyright (C) 2018 Lucas A. M. Magalhães <lucmaga@gmail.com>
7 */
9 #ifndef _VIMC_STREAMER_H_
10 #define _VIMC_STREAMER_H_
12 #include <media/media-device.h>
14 #include "vimc-common.h"
16 #define VIMC_STREAMER_PIPELINE_MAX_SIZE 16
18 /**
19 * struct vimc_stream - struct that represents a stream in the pipeline
21 * @pipe: the media pipeline object associated with this stream
22 * @ved_pipeline: array containing all the entities participating in the
23 * stream. The order is from a video device (usually a capture device) where
24 * stream_on was called, to the entity generating the first base image to be
25 * processed in the pipeline.
26 * @pipe_size: size of @ved_pipeline
27 * @kthread: thread that generates the frames of the stream.
29 * When the user call stream_on in a video device, struct vimc_stream is
30 * used to keep track of all entities and subdevices that generates and
31 * process frames for the stream.
33 struct vimc_stream {
34 struct media_pipeline pipe;
35 struct vimc_ent_device *ved_pipeline[VIMC_STREAMER_PIPELINE_MAX_SIZE];
36 unsigned int pipe_size;
37 struct task_struct *kthread;
40 int vimc_streamer_s_stream(struct vimc_stream *stream,
41 struct vimc_ent_device *ved,
42 int enable);
44 #endif //_VIMC_STREAMER_H_