| | |
| | | |
| | | |
| | | //////passive api |
| | | void c_ffmpeg_build_recorder(const cffmpeg h, const char *dir, int mind, int maxd){ |
| | | void c_ffmpeg_build_recorder(const cffmpeg h, const char* id, const char *dir, int mind, int maxd){ |
| | | Wrapper *s = (Wrapper*)h; |
| | | s->BuildRecorder(dir, mind, maxd); |
| | | s->BuildRecorder(id, dir, mind, maxd); |
| | | } |
| | | |
| | | void c_ffmpeg_fire_recorder(const cffmpeg h, const int64_t id){ |
| | | void c_ffmpeg_fire_recorder(const cffmpeg h, const char* sid, const int64_t id){ |
| | | Wrapper *s = (Wrapper*)h; |
| | | s->FireRecorder(id); |
| | | s->FireRecorder(sid, id); |
| | | } |
| | | |
| | | char* c_ffmpeg_get_info_recorder(const cffmpeg h, int *index, int *length){ |
| | | char* c_ffmpeg_get_info_recorder(const cffmpeg h, char **sid, int *index, int *length){ |
| | | Wrapper *s = (Wrapper*)h; |
| | | int i; |
| | | std::string p; |
| | | s->GetInfoRecorder(i, p); |
| | | std::string id; |
| | | s->GetInfoRecorder(id, i, p); |
| | | |
| | | // printf("cffmpeg get info : index : %d, file : %s\n", i, p.c_str()); |
| | | |
| | |
| | | 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; |
| | | } |
| | | |