video analysis2.0拆分,ffmpeg封装go接口库
zhangmeng
2019-07-26 e84510254860e916cbb48ec3de4557b14a99d76c
csrc/cffmpeg.cpp
@@ -63,9 +63,9 @@
    int i;
    std::string p;
    s->GetInfoRecorder(i, p);
    if(i < 0){
        return NULL;
    }
    printf("cffmpeg get info : index : %d, file : %s\n", i, p.c_str());
    *index = i;
    *length = p.length();
    char *path = (char*)malloc(*length + 1);
@@ -86,6 +86,13 @@
    s->GetPicDecoder(&data, wid, hei);
    return data;
}
void* c_ffmpeg_get_avpacket(const cffmpeg h, int *size, int *key){
    Wrapper *s = (Wrapper*)h;
    unsigned char *data = NULL;
    s->GetPacket(&data, size, key);
    return data;
}
/////////////////////active api
void c_ffmpeg_active_recorder(const cffmpeg h, const char *dir, int mind, int maxd, 
                                    rec_func fn){