| | |
| | | typedef void (*lib_cffmpeg_decoder)(const cffmpeg); |
| | | typedef void*(*lib_cffmpeg_pic)(const cffmpeg, int*, int*, int*, int*, int64_t*); |
| | | typedef void*(*lib_cffmpeg_avpacket)(const cffmpeg, int*, int*); |
| | | typedef void*(*lib_cffmpeg_decode)(const char*, const int, int*, int*); |
| | | |
| | | static lib_cffmpeg_create fn_create = NULL; |
| | | static lib_cffmpeg_create2 fn_create2 = NULL; |
| | |
| | | static lib_cffmpeg_decoder fn_decoder = NULL; |
| | | static lib_cffmpeg_pic fn_decoder_pic = NULL; |
| | | static lib_cffmpeg_avpacket fn_get_avpacket = NULL; |
| | | static lib_cffmpeg_decode fn_decode = NULL; |
| | | |
| | | typedef void* libcffmpeg; |
| | | libcffmpeg init_libcffmpeg(const char *so_file); |
| | |
| | | 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); |
| | | 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); |
| | | // 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); |
| | |
| | | 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 |
| | | } |