video analysis2.0拆分,ffmpeg封装go接口库
zhangmeng
2020-10-22 65eb475b323b3b9c28761b4e3009ab3d269963e1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "conf.hpp"
 
extern "C"{
#include <libavformat/avformat.h>
#include <libavfilter/avfilter.h>
#include <libavutil/error.h>
}
 
 
namespace ffwrapper{
 
    void makeTheWorld(){
        av_register_all();
        avfilter_register_all();
        avformat_network_init();
        av_log_set_level(AV_LOG_VERBOSE);
    }
 
    std::string getAVErrorDesc(const int code){
        char err[64];
        av_strerror(code, err, sizeof(err));
        return std::string(err);
    }
}