| | |
| | | s->GB28181(); |
| | | } |
| | | |
| | | char * c_ffmpeg_get_gb28181_pic(const char *rtspUrl, int *retDataLen){ |
| | | char * retData = (char *)malloc(sizeof(char) * 3000000); |
| | | int flag = GetGb28181Pic(rtspUrl, retData, retDataLen); |
| | | if(flag == -1){ |
| | | free(retData); |
| | | *retDataLen = 0; |
| | | return NULL; |
| | | } |
| | | |
| | | return retData; |
| | | } |
| | | |
| | | void c_ffmepg_use_cpu(const cffmpeg h){ |
| | | Wrapper *s = (Wrapper*)h; |
| | | s->CPUDec(); |
| | |
| | | |
| | | |
| | | //////passive api |
| | | void c_ffmpeg_open_recorder(const cffmpeg h){ |
| | | Wrapper *s = (Wrapper*)h; |
| | | s->OpenRecorder(); |
| | | } |
| | | void c_ffmpeg_set_record_duration(const cffmpeg h, const int min, const int max){ |
| | | Wrapper *s = (Wrapper*)h; |
| | | s->SetRecMinCacheTime(min); |
| | |
| | | |
| | | void c_ffmpeg_build_decoder(const cffmpeg h){ |
| | | Wrapper *s = (Wrapper*)h; |
| | | s->BuildDecoder(); |
| | | s->OpenDecoder(); |
| | | } |
| | | |
| | | void* c_ffmpeg_get_pic_decoder(const cffmpeg h, int *wid, int *hei, int *format, int *length, int64_t *id){ |
| | |
| | | return data; |
| | | } |
| | | |
| | | void c_ffmpeg_close_stream(const cffmpeg h){ |
| | | Wrapper *s = (Wrapper*)h; |
| | | s->CloseStream(); |
| | | } |
| | | |
| | | void* c_ffmpeg_get_avpacket(const cffmpeg h, int *size, int *key){ |
| | | Wrapper *s = (Wrapper*)h; |
| | | unsigned char *data = NULL; |