vimc-streamer.h 888 B

123456789101112131415161718192021222324252627282930313233343536373839
  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 <lucmaga@gmail.com>
  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. struct vimc_stream {
  14. struct media_pipeline pipe;
  15. struct vimc_ent_device *ved_pipeline[VIMC_STREAMER_PIPELINE_MAX_SIZE];
  16. unsigned int pipe_size;
  17. u8 *frame;
  18. struct task_struct *kthread;
  19. };
  20. /**
  21. * vimc_streamer_s_streamer - start/stop the stream
  22. *
  23. * @stream: the pointer to the stream to start or stop
  24. * @ved: The last entity of the streamer pipeline
  25. * @enable: any non-zero number start the stream, zero stop
  26. *
  27. */
  28. int vimc_streamer_s_stream(struct vimc_stream *stream,
  29. struct vimc_ent_device *ved,
  30. int enable);
  31. #endif //_VIMC_STREAMER_H_