You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.2 KiB

​
​
​
​
8 months ago
​
​
​
​
​
​
8 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
8 months ago
​
8 months ago
​
​
​
8 months ago
​
​
​
8 months ago
​
​
​
​
​
  1. #ifndef __SERVA_VIDEO_COMPOSER_HEADER__
  2. #define __SERVA_VIDEO_COMPOSER_HEADER__
  3. #include "../common/serverDataBinder.h"
  4. #include "../../components/base/basicThread.h"
  5. #include "../../components/base/basicLIBAV.h"
  6. #include "servaSessionManager.h"
  7. #define VIDEO_COMPOSER_NA 0x00
  8. #define VIDEO_COMPOSER_ERR 0xFF
  9. #define VIDEO_COMPOSER_INIT 0x01
  10. #define VIDEO_COMPOSER_LOK 0x02
  11. #define VIDEO_COMPOSER_ROK 0x04
  12. #define VIDEO_COMPOSER_L_DONE 0x40
  13. #define VIDEO_COMPOSER_R_DONE 0x80
  14. #define VIDEO_COMPOSER_DONE 0xC0
  15. #define VIDEO_STAGE_NO_VIDEO 0x00
  16. #define VIDEO_STAGE_BEFORE_VIDEO 0x01
  17. #define VIDEO_STAGE_VIDEO_STREAM 0x02
  18. #define VIDEO_STAGE_BEETWEEN_VIDEOS 0x03
  19. #define VIDEO_STAGE_END 0x04
  20. typedef struct S_VIDEO_PART_INFO{
  21. uint64_t id;
  22. uint32_t sts;
  23. uint16_t sms;
  24. float fps;
  25. char uuid[65];
  26. char ext[6];
  27. }VIDEO_PART_INFO;
  28. typedef std::vector<VIDEO_PART_INFO *> V_VP_INFO;
  29. class servaVideoComposer: public basicThread {
  30. private:
  31. basicLogCollection * m_pLog;
  32. serverDataBinder * m_pDBC;
  33. DBC_MEDIA_COMPOSER_DATA m_sComposerSettings;
  34. uint8_t m_bComposerStatus;
  35. uint64_t m_nSessionID;
  36. uint8_t m_bLStage;
  37. uint8_t m_bRStage;
  38. uint64_t m_uLModuleID;
  39. uint64_t m_uRModuleID;
  40. cv::Mat m_oNoVideoMat;
  41. SESSION_DATA * m_pSessionData;
  42. V_VP_INFO m_vLVideoQueue;
  43. V_VP_INFO m_vRVideoQueue;
  44. char m_cLOutPath[MAX_PATH_LEN];
  45. char m_cROutPath[MAX_PATH_LEN];
  46. bool loadLeftQueue();
  47. bool loadRightQueue();
  48. void finishupCompose();
  49. protected:
  50. virtual void m_fThreadProc(void);
  51. public:
  52. explicit servaVideoComposer( uint64_t session_id );
  53. ~servaVideoComposer();
  54. bool compose();
  55. uint8_t getStatus();
  56. };
  57. #endif