#include #include "depend_headers.h" #include "CircularQueue.hpp" #include "FFReceiver.h" #include "DvppDec.h" using namespace std; class DvppDecoder{ public: DvppDecoder(); ~DvppDecoder(); bool init(FFDecConfig cfg); void close(); bool start(); void pause(); void resume(); void setDecKeyframe(bool bKeyframe); bool isRunning(); bool isFinished(); bool isPausing(); bool getResolution( int &width, int &height ); bool isSurport(FFDecConfig& cfg); float fps(); void setName(string nm){ m_dec_name = nm; } string getName(){ return m_dec_name; } FFImgInfo* snapshot(); void setPostDecArg(const void* postDecArg); void setFinishedDecArg(const void* finishedDecArg); int getCachedQueueLength(); public: void taskFinishing(); private: FFDecConfig m_cfg; string m_dec_name; CircularQueue *m_pktQueueptr; FFReceiver m_receiver; DvppDec m_decoder; const void * m_finishedDecArg; DECODE_FINISHED_CALLBACK decode_finished_cbk; bool m_bFinished{false}; };