V4l2Output.h 977 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /* ---------------------------------------------------------------------------
  2. ** This software is in the public domain, furnished "as is", without technical
  3. ** support, and with no warranty, express or implied, as to its usefulness for
  4. ** any purpose.
  5. **
  6. ** V4l2Output.h
  7. **
  8. ** V4L2 Output wrapper
  9. **
  10. ** -------------------------------------------------------------------------*/
  11. #ifndef V4L2_OUTPUT
  12. #define V4L2_OUTPUT
  13. #include "V4l2Access.h"
  14. // ---------------------------------
  15. // V4L2 Output
  16. // ---------------------------------
  17. class V4l2Output : public V4l2Access
  18. {
  19. protected:
  20. V4l2Output(V4l2Device* device);
  21. public:
  22. static V4l2Output* create(const V4L2DeviceParameters & param, IoType iotype = V4l2Access::IOTYPE_MMAP);
  23. ~V4l2Output();
  24. size_t write(char* buffer, size_t bufferSize);
  25. int isWritable(timeval* tv);
  26. bool startPartialWrite(void);
  27. size_t writePartial(char* buffer, size_t bufferSize);
  28. bool endPartialWrite(void);
  29. };
  30. #endif