From 1f005df2f3ff78458f332f9bf1cf2e78b6a8e8e4 Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期四, 26 九月 2019 14:43:52 +0800
Subject: [PATCH] bug fix audio codec

---
 libcffmpeg.h |   21 +++++++++------------
 1 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/libcffmpeg.h b/libcffmpeg.h
index cbcf14c..47e7b5c 100644
--- a/libcffmpeg.h
+++ b/libcffmpeg.h
@@ -10,20 +10,19 @@
 
 typedef void* cffmpeg;
 
-typedef cffmpeg(*lib_cffmpeg_create)();
+typedef cffmpeg(*lib_cffmpeg_create)(const int, const char*);
 typedef void (*lib_cffmpeg_destroy)(const cffmpeg);
 typedef void (*lib_cffmpeg_run)(const cffmpeg, const char*);
 typedef void (*lib_cffmpeg_scale)(const cffmpeg, const int, const int, const int);
 typedef void (*lib_cffmpeg_gb28181)(const cffmpeg);
 typedef void (*lib_cffmpeg_cpu)(const cffmpeg);
-typedef void (*lib_cffmpeg_recorder)(const cffmpeg, const char*, const char*, int, int);
+typedef void (*lib_cffmpeg_recorder)(const cffmpeg, const char*, const char*, int, int, int);
 typedef void (*lib_cffmpeg_fire_recorder)(const cffmpeg, const char*, const int64_t);
-typedef char*(*lib_cffmpeg_info_recorder)(const cffmpeg, int*, int*);
-typedef char*(*lib_cffmpeg_rec_id)(const cffmpeg, const char*, int*);
+typedef void (*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*, int64_t*);
 typedef void*(*lib_cffmpeg_avpacket)(const cffmpeg, int*, int*);
-typedef void*(*lib_cffmpeg_decode_jpeg)(const cffmpeg, const char*, int*, int*);
+typedef void*(*lib_cffmpeg_decode)(const char*, const int, int*, int*);
 
 static lib_cffmpeg_create              fn_create = NULL;
 static lib_cffmpeg_destroy             fn_destroy = NULL;
@@ -34,30 +33,28 @@
 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_rec_id              fn_rec_id = 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_jpeg         fn_dec_jpeg = NULL;
+static lib_cffmpeg_decode              fn_decode = NULL;
 
 typedef void* libcffmpeg;
 libcffmpeg init_libcffmpeg(const char *so_file);
 void release_libcffmpeg(libcffmpeg lib);
 
-cffmpeg wrap_fn_create();
+cffmpeg wrap_fn_create(const int log, const char *logfile);
 void wrap_fn_destroy(const cffmpeg h);
 void wrap_fn_run(const cffmpeg h, const char* input);
 void wrap_fn_scale(const cffmpeg h, const int wid, const int hei, const int flags);
 void wrap_fn_run_gb28181(const cffmpeg h);
 void wrap_fn_use_cpu(const cffmpeg h);
-void wrap_fn_recorder(const cffmpeg h, const char* id, const char* dir, int mind, int maxd);
+void wrap_fn_recorder(const cffmpeg h, const char* id, const char* dir, int mind, int maxd, int audio);
 void wrap_fn_fire_recorder(const cffmpeg h, const char *sid, const int64_t id);
-char* wrap_fn_info_recorder(const cffmpeg, int* index, int* length);
-char* wrap_fn_rec_id(const cffmpeg h, const char* path, int*length);
+void wrap_fn_info_recorder(const cffmpeg, int* index, char** recid, int* recidLen, char** fpath, int* pathLen);
 void wrap_fn_decoder(const cffmpeg h);
 void* wrap_fn_decoder_pic(const cffmpeg h, int* wid, int* hei, int64_t *id);
 void* wrap_fn_get_avpacket(const cffmpeg h, int* size, int* key);
-void* wrap_fn_decode_jpeg(const cffmpeg h, const char* file, int* wid, int* hei);
+void* wrap_fn_decode(const char* file, const int gb, int* wid, int* hei);
 
 
 // for encoder

--
Gitblit v1.8.0