| | |
| | | if(lib){ |
| | | fn_create = (lib_cffmpeg_create)dlsym(lib, "c_ffmpeg_create"); |
| | | release_if_err(fn_create, lib); |
| | | fn_create2 = (lib_cffmpeg_create)dlsym(lib, "c_ffmpeg_create2"); |
| | | release_if_err(fn_create2, lib); |
| | | fn_destroy = (lib_cffmpeg_destroy)dlsym(lib, "c_ffmpeg_destroy"); |
| | | release_if_err(fn_destroy, lib); |
| | | fn_run = (lib_cffmpeg_run)dlsym(lib, "c_ffmpeg_run"); |
| | |
| | | release_if_err(fn_decoder_pic, lib); |
| | | fn_get_avpacket = (lib_cffmpeg_avpacket)dlsym(lib, "c_ffmpeg_get_avpacket"); |
| | | release_if_err(fn_get_avpacket, lib); |
| | | fn_dec_jpeg = (lib_cffmpeg_decode_jpeg)dlsym(lib, "c_ffmpeg_decode_jpeg"); |
| | | release_if_err(fn_dec_jpeg, lib); |
| | | fn_decode = (lib_cffmpeg_decode)dlsym(lib, "c_ffmpeg_decode"); |
| | | release_if_err(fn_decode, lib); |
| | | |
| | | fn_create_encoder = (lib_cffmpeg_create_encoder)dlsym(lib, "c_ffmpeg_create_encoder"); |
| | | release_if_err(fn_create_encoder, lib); |
| | |
| | | |
| | | cffmpeg wrap_fn_create(){ |
| | | return fn_create(); |
| | | } |
| | | |
| | | cffmpeg wrap_fn_create2(const char *logfile){ |
| | | return fn_create2(logfile); |
| | | } |
| | | |
| | | void wrap_fn_destroy(const cffmpeg h){ |
| | |
| | | return fn_get_avpacket(h, size, key); |
| | | } |
| | | |
| | | void* wrap_fn_decode_jpeg(const char* file, int* wid, int* hei){ |
| | | return fn_dec_jpeg(file, wid, hei); |
| | | // return val: -1 open error; -2, find stream error; -3, converter create error |
| | | void* wrap_fn_decode(const char* file, const int gb, int* wid, int* hei){ |
| | | return fn_decode(file, gb, wid, hei); |
| | | } |
| | | |
| | | // for encoder |