vimc-streamer.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * vimc-streamer.h Virtual Media Controller Driver
  4. *
  5. * Copyright (C) 2018 Lucas A. M. Magalhães <[email protected]>
  6. *
  7. */
  8. #ifndef _VIMC_STREAMER_H_
  9. #define _VIMC_STREAMER_H_
  10. #include <media/media-device.h>
  11. #include "vimc-common.h"
  12. #define VIMC_STREAMER_PIPELINE_MAX_SIZE 16
  13. /**
  14. * struct vimc_stream - struct that represents a stream in the pipeline
  15. *
  16. * @pipe: the media pipeline object associated with this stream
  17. * @ved_pipeline: array containing all the entities participating in the
  18. * stream. The order is from a video device (usually a
  19. * capture device) where stream_on was called, to the
  20. * entity generating the first base image to be
  21. * processed in the pipeline.
  22. * @pipe_size: size of @ved_pipeline
  23. * @kthread: thread that generates the frames of the stream.
  24. *
  25. * When the user call stream_on in a video device, struct vimc_stream is
  26. * used to keep track of all entities and subdevices that generates and
  27. * process frames for the stream.
  28. */
  29. struct vimc_stream {
  30. struct media_pipeline pipe;
  31. struct vimc_ent_device *ved_pipeline[VIMC_STREAMER_PIPELINE_MAX_SIZE];
  32. unsigned int pipe_size;
  33. struct task_struct *kthread;
  34. };
  35. int vimc_streamer_s_stream(struct vimc_stream *stream,
  36. struct vimc_ent_device *ved,
  37. int enable);
  38. #endif //_VIMC_STREAMER_H_