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.
|
|
#ifndef __SERVA_VIDEO_COMPOSER_HEADER__
#define __SERVA_VIDEO_COMPOSER_HEADER__
#include "../common/serverDataBinder.h"
#include "../../components/base/basicThread.h"
#include "../../components/base/basicLIBAV.h"
#include "servaSessionManager.h"
#define VIDEO_COMPOSER_NA 0x00
#define VIDEO_COMPOSER_ERR 0xFF
#define VIDEO_COMPOSER_INIT 0x01
#define VIDEO_COMPOSER_LOK 0x02
#define VIDEO_COMPOSER_ROK 0x04
#define VIDEO_COMPOSER_L_DONE 0x40
#define VIDEO_COMPOSER_R_DONE 0x80
#define VIDEO_COMPOSER_DONE 0xC0
#define VIDEO_STAGE_NO_VIDEO 0x00
#define VIDEO_STAGE_BEFORE_VIDEO 0x01
#define VIDEO_STAGE_VIDEO_STREAM 0x02
#define VIDEO_STAGE_BEETWEEN_VIDEOS 0x03
#define VIDEO_STAGE_END 0x04
typedef struct S_VIDEO_PART_INFO{ uint64_t id; uint32_t sts; uint16_t sms; float fps; char uuid[65]; char ext[6];}VIDEO_PART_INFO;
typedef std::vector<VIDEO_PART_INFO *> V_VP_INFO;
class servaVideoComposer: public basicThread { private: basicLogCollection * m_pLog; serverDataBinder * m_pDBC; DBC_MEDIA_COMPOSER_DATA m_sComposerSettings; uint64_t m_uComposerRecordId; uint8_t m_bComposerStatus; uint64_t m_nSessionID; uint8_t m_bLStage; uint8_t m_bRStage; uint64_t m_uLModuleID; uint64_t m_uRModuleID; cv::Mat m_oNoVideoMat; SESSION_DATA * m_pSessionData; V_VP_INFO m_vLVideoQueue; V_VP_INFO m_vRVideoQueue; char m_cUUID[65]; char m_cLOutPath[MAX_PATH_LEN]; char m_cROutPath[MAX_PATH_LEN]; bool loadLeftQueue(); bool loadRightQueue(); void finishupCompose(); protected: virtual void m_fThreadProc(void); public: explicit servaVideoComposer( uint64_t session_id ); ~servaVideoComposer(); bool compose(); bool isFinished(); uint8_t getStatus();};
typedef std::vector<servaVideoComposer*> V_VIDEO_COMPOSERS;
#endif
|