video analysis2.0拆分,ffmpeg封装go接口库
zhangmeng
2019-07-26 f6aa35eedbc76e7467a68dbe3aba63ec8cb352a5
add log
3个文件已修改
15 ■■■■ 已修改文件
apipassive.go 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
csrc/cffmpeg.cpp 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
csrc/wrapper.cpp 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
apipassive.go
@@ -26,10 +26,10 @@
    var l C.int
    p := C.wrap_fn_info_recorder(h.ffmpeg, &i, &l)
    if p == nil {
        return -1, ""
    }
    C.free(unsafe.Pointer(p))
    // if p == nil {
    //     return -1, ""
    // }
    defer C.free(unsafe.Pointer(p))
    return int(i), C.GoString(p)
}
csrc/cffmpeg.cpp
@@ -63,9 +63,9 @@
    int i;
    std::string p;
    s->GetInfoRecorder(i, p);
    if(p.empty()){
        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);
csrc/wrapper.cpp
@@ -292,6 +292,7 @@
        index = info.file_frame_index;
        path = info.file_path;
        list_rec_.pop_front();
        logIt("go get info index: %d, file: %s\n", index, path.c_str());
    }
    ////////decoder