| | |
| | | |
| | | void c_ffmpeg_run_gb28181(const cffmpeg h){ |
| | | Wrapper *s = (Wrapper*)h; |
| | | s->GB28181(); |
| | | s->gb28181(); |
| | | } |
| | | |
| | | char * c_ffmpeg_get_gb28181_pic(const char *rtspUrl, int *retDataLen){ |
| | | char * c_ffmpeg_get_gb28181_pic(const char *rtspUrl, int *retDataLen, const int tt){ |
| | | char * retData = (char *)malloc(sizeof(char) * 3000000); |
| | | int flag = GetGb28181Pic(rtspUrl, retData, retDataLen); |
| | | int flag = GetGb28181Pic(rtspUrl, retData, retDataLen, tt); |
| | | if(flag == -1){ |
| | | free(retData); |
| | | *retDataLen = 0; |
| | |
| | | return s->GetPacket(data, size, key); |
| | | } |
| | | |
| | | int c_ffmpeg_set_devid(const cffmpeg h, const int devid){ |
| | | Wrapper *s = (Wrapper*)h; |
| | | return s->SetDevID(devid); |
| | | } |
| | | |
| | | void c_ffmpeg_release_buf(void* buf){ |
| | | if (buf){ |
| | | free(buf); |
| | | } |
| | | } |
| | | |
| | | // pic encoder |
| | | void *c_ffmpeg_create_encoder(const int w, const int h, const int fps, const int br, const int pix_fmt, const int scale_flag, const int gi){ |
| | | return CreateEncoder(w, h, fps, br, pix_fmt, scale_flag, gi); |