| | |
| | | return fn_decoder_pic(h, wid, hei, format, length, id); |
| | | } |
| | | |
| | | void wrap_fn_close_stream(void *lib, const cffmpeg h){ |
| | | if (!fn_close_stream){ |
| | | fn_close_stream = (lib_cffmpeg_close_stream)dlsym(lib, "c_ffmpeg_close_stream"); |
| | | if (!fn_close_stream) return; |
| | | } |
| | | fn_close_stream(h); |
| | | } |
| | | |
| | | void* wrap_fn_get_avpacket(void *lib, const cffmpeg h, int* size, int* key){ |
| | | if(!fn_get_avpacket){ |
| | | fn_get_avpacket = (lib_cffmpeg_avpacket)dlsym(lib, "c_ffmpeg_get_avpacket"); |
| | |
| | | } |
| | | |
| | | // for encoder |
| | | 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){ |
| | | if (!fn_create_encoder){ |
| | | fn_create_encoder = (lib_cffmpeg_create_encoder)dlsym(lib, "c_ffmpeg_create_encoder"); |
| | | release_if_err(fn_create_encoder, lib); |
| | | } |
| | | return fn_create_encoder(w, h, fps, br, scale_flag, gi); |
| | | return fn_create_encoder(w, h, fps, br, pix_fmt, scale_flag, gi); |
| | | } |
| | | |
| | | void wrap_fn_destroy_encoder(void *lib, const cencoder h){ |