From f6aa35eedbc76e7467a68dbe3aba63ec8cb352a5 Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期五, 26 七月 2019 10:51:03 +0800 Subject: [PATCH] add log --- csrc/cffmpeg.cpp | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/csrc/cffmpeg.cpp b/csrc/cffmpeg.cpp index b78313e..05be1a3 100644 --- a/csrc/cffmpeg.cpp +++ b/csrc/cffmpeg.cpp @@ -63,9 +63,9 @@ int i; std::string p; s->GetInfoRecorder(i, p); - if(i < 0){ - return NULL; - } + + printf("cffmpeg get info : index : %d, file : %s\n", i, p.c_str()); + *index = i; *length = p.length(); char *path = (char*)malloc(*length + 1); @@ -86,6 +86,13 @@ s->GetPicDecoder(&data, wid, hei); return data; } + +void* c_ffmpeg_get_avpacket(const cffmpeg h, int *size, int *key){ + Wrapper *s = (Wrapper*)h; + unsigned char *data = NULL; + s->GetPacket(&data, size, key); + return data; +} /////////////////////active api void c_ffmpeg_active_recorder(const cffmpeg h, const char *dir, int mind, int maxd, rec_func fn){ -- Gitblit v1.8.0