video analysis2.0拆分,ffmpeg封装go接口库
zhangmeng
2019-10-23 98d01a35d01aa0b0f172590da545d489fc49637d
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);