Lines Matching full:stream
39 * vimc_streamer_pipeline_terminate - Disable stream in all ved in stream
41 * @stream: the pointer to the stream structure with the pipeline to be
44 * Calls s_stream to disable the stream in each entity of the pipeline
47 static void vimc_streamer_pipeline_terminate(struct vimc_stream *stream) in vimc_streamer_pipeline_terminate() argument
52 while (stream->pipe_size) { in vimc_streamer_pipeline_terminate()
53 stream->pipe_size--; in vimc_streamer_pipeline_terminate()
54 entity = stream->ved_pipeline[stream->pipe_size]->ent; in vimc_streamer_pipeline_terminate()
56 stream->ved_pipeline[stream->pipe_size] = NULL; in vimc_streamer_pipeline_terminate()
67 * vimc_streamer_pipeline_init - initializes the stream structure
69 * @stream: the pointer to the stream structure to be initialized
70 * @ved: the pointer to the vimc entity initializing the stream
72 * Initializes the stream structure. Walks through the entity graph to
74 * Calls s_stream to enable stream in all entities of the pipeline.
76 static int vimc_streamer_pipeline_init(struct vimc_stream *stream, in vimc_streamer_pipeline_init() argument
84 stream->pipe_size = 0; in vimc_streamer_pipeline_init()
85 while (stream->pipe_size < VIMC_STREAMER_PIPELINE_MAX_SIZE) { in vimc_streamer_pipeline_init()
87 vimc_streamer_pipeline_terminate(stream); in vimc_streamer_pipeline_init()
90 stream->ved_pipeline[stream->pipe_size++] = ved; in vimc_streamer_pipeline_init()
101 vimc_streamer_pipeline_terminate(stream); in vimc_streamer_pipeline_init()
113 vimc_streamer_pipeline_terminate(stream); in vimc_streamer_pipeline_init()
119 struct vimc_stream *stream = data; in vimc_streamer_thread() local
129 for (i = stream->pipe_size - 1; i >= 0; i--) { in vimc_streamer_thread()
130 stream->frame = stream->ved_pipeline[i]->process_frame( in vimc_streamer_thread()
131 stream->ved_pipeline[i], in vimc_streamer_thread()
132 stream->frame); in vimc_streamer_thread()
133 if (!stream->frame) in vimc_streamer_thread()
135 if (IS_ERR(stream->frame)) in vimc_streamer_thread()
146 int vimc_streamer_s_stream(struct vimc_stream *stream, in vimc_streamer_s_stream() argument
152 if (!stream || !ved) in vimc_streamer_s_stream()
156 if (stream->kthread) in vimc_streamer_s_stream()
159 ret = vimc_streamer_pipeline_init(stream, ved); in vimc_streamer_s_stream()
163 stream->kthread = kthread_run(vimc_streamer_thread, stream, in vimc_streamer_s_stream()
166 if (IS_ERR(stream->kthread)) in vimc_streamer_s_stream()
167 return PTR_ERR(stream->kthread); in vimc_streamer_s_stream()
170 if (!stream->kthread) in vimc_streamer_s_stream()
173 ret = kthread_stop(stream->kthread); in vimc_streamer_s_stream()
177 stream->kthread = NULL; in vimc_streamer_s_stream()
179 vimc_streamer_pipeline_terminate(stream); in vimc_streamer_s_stream()