| | |
| | | // return -1, "" |
| | | // } |
| | | path := C.GoString(p) |
| | | fmt.Println("Go get info : ", path, " len: ", l) |
| | | defer C.free(unsafe.Pointer(p)) |
| | | C.free(unsafe.Pointer(p)) |
| | | |
| | | return int(i), C.GoString(p) |
| | | fmt.Println("Go get info : ", path, " len: ", l) |
| | | |
| | | return int(i), path |
| | | } |
| | | |
| | | // BuildDecoder build decoder |
| | |
| | | //callback to frame index and path |
| | | if(func_rec_info_){ |
| | | func_rec_info_(file_frame_index_, file_path_); |
| | | logIt("recoder index %d, file name %s\n", file_frame_index_, file_path_.c_str()); |
| | | // logIt("recoder index %d, file name %s\n", file_frame_index_, file_path_.c_str()); |
| | | }else{ |
| | | logIt("recorder has no func_rec_info"); |
| | | // logIt("recorder has no func_rec_info"); |
| | | } |
| | | } |
| | | |
| | |
| | | std::string p; |
| | | s->GetInfoRecorder(i, p); |
| | | |
| | | printf("cffmpeg get info : index : %d, file : %s\n", i, p.c_str()); |
| | | |
| | | // printf("cffmpeg get info : index : %d, file : %s\n", i, p.c_str()); |
| | | |
| | | *index = i; |
| | | *length = p.length(); |
| | | char *path = (char*)malloc(*length + 1); |
| | |
| | | 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()); |
| | | // logIt("go get info index: %d, file: %s\n", index, path.c_str()); |
| | | } |
| | | |
| | | ////////decoder |