| | |
| | | s->FireRecorder(sid, id); |
| | | } |
| | | |
| | | char* c_ffmpeg_get_info_recorder(const cffmpeg h, char **sid, int *index, int *length){ |
| | | char* c_ffmpeg_get_info_recorder(const cffmpeg h, int *index, int *length){ |
| | | Wrapper *s = (Wrapper*)h; |
| | | int i; |
| | | std::string p; |
| | | std::string id; |
| | | s->GetInfoRecorder(id, i, p); |
| | | s->GetInfoRecorder(i, p); |
| | | |
| | | // printf("cffmpeg get info : index : %d, file : %s\n", i, p.c_str()); |
| | | |
| | |
| | | char *path = (char*)malloc(*length + 1); |
| | | memcpy(path, p.c_str(), *length); |
| | | path[*length] = '\0'; |
| | | |
| | | *sid = (char*)malloc(id.length()+1); |
| | | memcpy(*sid, id.c_str(), id.length()); |
| | | *sid[id.length()] = '\0'; |
| | | |
| | | return path; |
| | | } |
| | | |
| | | char* c_ffmpeg_get_rec_id(const cffmpeg h, const char* p, int *length){ |
| | | Wrapper *s = (Wrapper*)h; |
| | | std::string id = s->GetRecorderID(p); |
| | | *length = id.length(); |
| | | char *i = (char*)malloc(*length+1); |
| | | memcpy(i, id.c_str(), *length); |
| | | i[*length] = '\0'; |
| | | return i; |
| | | } |
| | | |
| | | void c_ffmpeg_build_decoder(const cffmpeg h){ |
| | | Wrapper *s = (Wrapper*)h; |
| | | s->BuildDecoder(); |