| | |
| | | typedef void (*lib_cffmpeg_run)(const cffmpeg, const char*); |
| | | typedef int (*lib_cffmpeg_fps)(const cffmpeg); |
| | | typedef void (*lib_cffmpeg_gb28181)(const cffmpeg); |
| | | typedef char * (*lib_cffmpeg_get_gb28181_pic)(const char *rtspUrl, int *retDataLen, const int); |
| | | typedef void (*lib_cffmpeg_cpu)(const cffmpeg); |
| | | typedef void (*lib_cffmpeg_open_recorder)(const cffmpeg); |
| | | typedef void (*lib_cffmpeg_rec_duration)(const cffmpeg, const int, const int); |
| | | typedef void (*lib_cffmpeg_recorder)(const cffmpeg, const char*, const char*, const int64_t, int, int, int); |
| | | typedef void (*lib_cffmpeg_fire_recorder)(const cffmpeg, const char*, const int64_t); |
| | | typedef void (*lib_cffmpeg_info_recorder)(const cffmpeg, int*, char**, int*, char**, int*); |
| | | typedef int (*lib_cffmpeg_fire_recorder)(const cffmpeg, const char*, const int64_t); |
| | | typedef int (*lib_cffmpeg_info_recorder)(const cffmpeg, int*, char**, int*, char**, int*); |
| | | typedef void (*lib_cffmpeg_decoder)(const cffmpeg); |
| | | typedef void*(*lib_cffmpeg_pic)(const cffmpeg, int*, int*, int*, int*, int64_t*); |
| | | typedef int (*lib_cffmpeg_pic)(const cffmpeg, unsigned char**, int*, int*, int*, int*, int64_t*); |
| | | typedef void (*lib_cffmpeg_close_stream)(const cffmpeg); |
| | | typedef void*(*lib_cffmpeg_avpacket)(const cffmpeg, int*, int*); |
| | | typedef void*(*lib_cffmpeg_decode)(const char*, const int, int*, int*); |
| | | typedef int (*lib_cffmpeg_avpacket2)(const cffmpeg, unsigned char**, int*, int*); |
| | | typedef int (*lib_cffmpeg_devid)(const cffmpeg, const int devid); |
| | | typedef void(*lib_cffmpeg_release_buf) (void*); |
| | | |
| | | static lib_cffmpeg_create fn_create = NULL; |
| | | static lib_cffmpeg_create2 fn_create2 = NULL; |
| | |
| | | static lib_cffmpeg_run fn_run = NULL; |
| | | static lib_cffmpeg_fps fn_fps = NULL; |
| | | static lib_cffmpeg_gb28181 fn_gb28181 = NULL; |
| | | static lib_cffmpeg_get_gb28181_pic fn_get_gb28181_pic = NULL; |
| | | static lib_cffmpeg_cpu fn_cpu = NULL; |
| | | static lib_cffmpeg_open_recorder fn_open_recorder = NULL; |
| | | static lib_cffmpeg_rec_duration fn_rec_duration = NULL; |
| | | static lib_cffmpeg_recorder fn_recorder = NULL; |
| | | static lib_cffmpeg_fire_recorder fn_fire_recorder = NULL; |
| | | static lib_cffmpeg_info_recorder fn_info_recorder = NULL; |
| | | static lib_cffmpeg_decoder fn_decoder = NULL; |
| | | static lib_cffmpeg_pic fn_decoder_pic = NULL; |
| | | static lib_cffmpeg_close_stream fn_close_stream = NULL; |
| | | static lib_cffmpeg_avpacket fn_get_avpacket = NULL; |
| | | static lib_cffmpeg_decode fn_decode = NULL; |
| | | static lib_cffmpeg_avpacket2 fn_get_avpacket2 = NULL; |
| | | static lib_cffmpeg_devid fn_set_devid = NULL; |
| | | static lib_cffmpeg_release_buf fn_release_buf = NULL; |
| | | |
| | | typedef void* libcffmpeg; |
| | | libcffmpeg init_libcffmpeg(const char *so_file); |
| | |
| | | void wrap_fn_run(void *lib, const cffmpeg h, const char* input); |
| | | int wrap_fn_fps(void *lib, const cffmpeg h); |
| | | void wrap_fn_run_gb28181(void *lib, const cffmpeg h); |
| | | char * wrap_fn_get_gb28181_pic(void *lib, const char *rtspUrl, int *retDataLen, const int tt); |
| | | void wrap_fn_use_cpu(void *lib, const cffmpeg h); |
| | | void wrap_fn_open_rec(void *lib, const cffmpeg h); |
| | | void wrap_fn_rec_duration(void *lib, const cffmpeg h, const int min, const int max); |
| | | void wrap_fn_recorder(void *lib, const cffmpeg h, const char* id, const char* dir, const int64_t fid, int mind, int maxd, int audio); |
| | | void wrap_fn_fire_recorder(void *lib, const cffmpeg h, const char *sid, const int64_t id); |
| | | void wrap_fn_info_recorder(void *lib, const cffmpeg, int* index, char** recid, int* recidLen, char** fpath, int* pathLen); |
| | | int wrap_fn_fire_recorder(void *lib, const cffmpeg h, const char *sid, const int64_t id); |
| | | int wrap_fn_info_recorder(void *lib, const cffmpeg, int* index, char** recid, int* recidLen, char** fpath, int* pathLen); |
| | | void wrap_fn_decoder(void *lib, const cffmpeg 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); |
| | | void wrap_fn_close_stream(void *lib, const cffmpeg h); |
| | | void* wrap_fn_get_avpacket(void *lib, const cffmpeg h, int* size, int* key); |
| | | void* wrap_fn_decode(void *lib, const char* file, const int gb, int* wid, int* hei); |
| | | int wrap_fn_get_avpacket2(void *lib, const cffmpeg h, unsigned char **data, int* size, int* key); |
| | | int wrap_fn_set_devid(void *lib, const cffmpeg h, const int devid); |
| | | void wrap_fn_release_buf(void *lib, void *buf); |
| | | |
| | | // for encoder |
| | | typedef void* cencoder; |
| | | typedef cencoder (*lib_cffmpeg_create_encoder)(const int w, const int h, const int fps, const int br, const int scale_flag, const int gi); |
| | | typedef cencoder (*lib_cffmpeg_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); |
| | | typedef void (*lib_cffmpeg_destroy_encoder)(cencoder h); |
| | | typedef int (*lib_cffmpeg_encode)(cencoder hdl, uint8_t *in, const int w, const int h, uint8_t **out, int *size, int *key); |
| | | |
| | |
| | | static lib_cffmpeg_destroy_encoder fn_destroy_encoder = NULL; |
| | | static lib_cffmpeg_encode fn_encode = NULL; |
| | | |
| | | cencoder wrap_fn_create_encoder(void *lib, const int w, const int h, const int fps, const int br, const int scale_flag, const int gi); |
| | | 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); |
| | | void wrap_fn_destroy_encoder(void *lib, const cencoder h); |
| | | void* wrap_fn_encode(void *lib, cencoder hdl, void *in, const int w, const int h, int *out_size, int *key); |
| | | |
| | | |
| | | // for conv |
| | | typedef void *cconv; |
| | | typedef cconv (*lib_cffmpeg_create_conv)(const int, const int, const int, const int, const int, const int, const int); |
| | | typedef void* (*lib_cffmpeg_conv)(const cconv, uint8_t *in); |
| | | typedef void (*lib_cffmpeg_destroy_conv)(const cconv); |
| | | |
| | | static lib_cffmpeg_create_conv fn_create_conv = NULL; |
| | | static lib_cffmpeg_destroy_conv fn_destroy_conv = NULL; |
| | | static lib_cffmpeg_conv fn_conv = NULL; |
| | | |
| | | cconv wrap_fn_create_conv(void *lib, const int srcW, const int srcH, const int srcFormat, |
| | | const int dstW, const int dstH, const int dstFormat, const int flag); |
| | | void wrap_fn_destroy_conv(void *lib, const cconv h); |
| | | void* wrap_fn_conv(void *lib, const cconv h, uint8_t *in); |
| | | |
| | | #ifdef __cplusplus |
| | | } |