| | |
| | | fn_rec_duration(h, min, max); |
| | | } |
| | | |
| | | void wrap_fn_fire_recorder(void *lib, const cffmpeg h, const char* sid, const int64_t id){ |
| | | int wrap_fn_fire_recorder(void *lib, const cffmpeg h, const char* sid, const int64_t id){ |
| | | if (!fn_fire_recorder){ |
| | | fn_fire_recorder = (lib_cffmpeg_fire_recorder)dlsym(lib, "c_ffmpeg_fire_recorder"); |
| | | if (!fn_fire_recorder) return; |
| | | } |
| | | fn_fire_recorder(h, sid, id); |
| | | return fn_fire_recorder(h, sid, id); |
| | | } |
| | | |
| | | void wrap_fn_info_recorder(void *lib, const cffmpeg h, int* index, char** recid, int* recidLen, char** fpath, int* pathLen){ |
| | | int wrap_fn_info_recorder(void *lib, const cffmpeg h, int* index, char** recid, int* recidLen, char** fpath, int* pathLen){ |
| | | if (!fn_info_recorder){ |
| | | fn_info_recorder = (lib_cffmpeg_info_recorder)dlsym(lib, "c_ffmpeg_get_info_recorder"); |
| | | if (!fn_info_recorder) return; |
| | |
| | | fn_decoder(h); |
| | | } |
| | | |
| | | void* wrap_fn_decoder_pic(void *lib, const cffmpeg h, int *wid, int *hei, int *format, int *length, int64_t *id){ |
| | | int wrap_fn_decoder_pic(void *lib, const cffmpeg h, unsigned char** data, int *wid, int *hei, int *format, int *length, int64_t *id){ |
| | | if (!fn_decoder_pic){ |
| | | fn_decoder_pic = (lib_cffmpeg_pic)dlsym(lib, "c_ffmpeg_get_pic_decoder"); |
| | | release_if_err(fn_decoder_pic, lib); |
| | | } |
| | | return fn_decoder_pic(h, wid, hei, format, length, id); |
| | | return fn_decoder_pic(h, data, wid, hei, format, length, id); |
| | | } |
| | | |
| | | void wrap_fn_close_stream(void *lib, const cffmpeg h){ |
| | |
| | | return fn_get_avpacket(h, size, key); |
| | | } |
| | | |
| | | int wrap_fn_get_avpacket2(void *lib, const cffmpeg h, unsigned char **data, int* size, int* key){ |
| | | if(!fn_get_avpacket2){ |
| | | fn_get_avpacket2 = (lib_cffmpeg_avpacket2)dlsym(lib, "c_ffmpeg_get_avpacket2"); |
| | | release_if_err(fn_get_avpacket2, lib); |
| | | } |
| | | return fn_get_avpacket2(h, data, size, key); |
| | | } |
| | | // for encoder |
| | | cencoder wrap_fn_create_encoder(void *lib, const int w, const int h, const int fps, const int br, const int pix_fmt, const int scale_flag, const int gi){ |
| | | if (!fn_create_encoder){ |