video analysis2.0拆分,ffmpeg封装go接口库
zhangmeng
2019-09-26 1f005df2f3ff78458f332f9bf1cf2e78b6a8e8e4
csrc/cffmpeg.cpp
@@ -17,8 +17,10 @@
using namespace cffmpeg_wrap;
cffmpeg c_ffmpeg_create(){
    return new Wrapper;
cffmpeg c_ffmpeg_create(const int log, const char *logfile){
    bool logit = false;
    if (log) logit = true;
    return new Wrapper(logit, logfile);
}
void c_ffmpeg_destroy(const cffmpeg h){
@@ -103,12 +105,8 @@
}
/////////////////////test
void* c_ffmpeg_decode_jpeg(const char *file, int *wid, int *hei){
    uint8_t *p = DecodeJPEG(file, wid, hei);
    if(!p){
        *wid = *hei = 0;
    }
    return p;
void* c_ffmpeg_decode(const char *file, const int gb, int *wid, int *hei){
    return Decode(file, gb, wid, hei);
}
// pic encoder