video analysis2.0拆分,ffmpeg封装go接口库
chenshijun
2019-12-03 0e021985f483e593c6ef872b8bcbe299566c7dd2
csrc/wrapper.hpp
@@ -50,6 +50,8 @@
        void CPUDec(){cpu_ = 1;}
        void AudioSwitch(const bool a);
        void SetRecMinCacheTime(const int mind);
        int GetFPS(){return fps_;}
    public: //decoder
        void BuildDecoder();
        void GetPicDecoder(unsigned char **data, int *w, int *h, int *format, int *length, int64_t *id);
@@ -74,6 +76,7 @@
        // 录像请求缓存,等待runstream后添加
        std::function<void()> fn_rec_lazy_;
        bool logit_;
        int fps_;
    };
    uint8_t* Decode(const char *file, const int gb, int *w, int *h);
@@ -86,6 +89,8 @@
                          const int dstW, const int dstH, const int dstFormat, const int flag);
    uint8_t *Convert(void *h, uint8_t *src);
    void DestoryConvertor(void *h);
    int GetGb28181Pic(const char *filename, char *retData, int *retDataLen);
}
#endif