DvppDecoderApi.h 1.05 KB
#include<string>
#include <pthread.h>

#include "depend_headers.h"
#include "../interface/AbstractDecoder.h"

using namespace std;

class DvppDecoder;

class DvppDecoderApi : public AbstractDecoder {
public:
    DvppDecoderApi();
    ~DvppDecoderApi();
    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 getOutResolution( int &width, int &height );

    bool isSurport(FFDecConfig& cfg);

    int getCachedQueueLength();

    float fps();

    DeviceMemory* snapshot();

    DECODER_TYPE getDecoderType(){ return DECODER_TYPE_DVPP; }
    void setName(string nm);
    string getName();

    void setPostDecArg(const void* postDecArg);
    void setFinishedDecArg(const void* finishedDecArg);

    void doRecode(RecoderInfo& recoderInfo);

    void set_mq_callback(std::function<bool(const char *msg)> mq_publish);
private:
    DvppDecoder* m_pDecoder;
};