capture_op.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #pragma once
  2. #include "../include/api.h"
  3. typedef struct
  4. {
  5. /* User accessible pointer */
  6. unsigned char * start;
  7. /* Buffer length */
  8. unsigned int size;
  9. /* File descriptor of NvBuffer */
  10. int dmabuff_fd;
  11. } nv_buffer;
  12. typedef struct
  13. {
  14. /* Camera v4l2 context */
  15. // char cam_dev[16];
  16. int cam_fd;
  17. // int cam_fd1;
  18. // int fd_r;
  19. unsigned int cam_pixfmt;
  20. unsigned int cam_w;
  21. unsigned int cam_h;
  22. // unsigned int frame;
  23. /* Global buffer ptr */
  24. nv_buffer * g_buff;
  25. bool capture_dmabuf;
  26. /* EGL renderer
  27. NvEglRenderer *renderer; */
  28. // int render_dmabuf_fd;
  29. int fps;
  30. /* CUDA processing
  31. bool enable_cuda;
  32. EGLDisplay egl_display;
  33. EGLImageKHR egl_image;*/
  34. /* MJPEG decoding
  35. NvJPEGDecoder *jpegdec;*/
  36. /* Verbose option */
  37. bool enable_verbose;
  38. Gsml_Info m_Gsml_Info;
  39. } context_t;
  40. class CaptureOp
  41. {
  42. public:
  43. CaptureOp(RenderPosition type,int32_t index);
  44. RenderPosition GetType();
  45. int32_t GetIndex();
  46. bool IsForward();
  47. void SetForward(bool b);
  48. context_t* _ctx0=nullptr;
  49. context_t* _ctx1=nullptr;
  50. private:
  51. RenderPosition _type;
  52. bool _forward;
  53. int32_t _index;
  54. };