video analysis2.0拆分,ffmpeg封装go接口库
chenshijun
2019-07-17 803388b511d31b9e25f6829298bb12e06323474c
libcffmpeg.h
@@ -56,6 +56,22 @@
void wrap_fn_active_decoder(const cffmpeg h, dec_func fn);
void* wrap_fn_decode_jpeg(const cffmpeg h, const char* file, 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);
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_create_encoder fn_create_encoder = NULL;
static lib_cffmpeg_destroy_encoder fn_destroy_encoder = NULL;
static lib_cffmpeg_encode fn_encode = NULL;
cencoder wrap_fn_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(const cencoder h);
void* wrap_fn_encode(cencoder hdl, void *in, const int w, const int h, int *out_size, int *key);
#ifdef __cplusplus
}
#endif