From 01d9022b47e5e20f39ca1115d334c43774378dfc Mon Sep 17 00:00:00 2001 From: zhangmeng <zhangmeng@aiiot.com> Date: 星期三, 25 三月 2020 13:56:16 +0800 Subject: [PATCH] add log for local video --- csrc/wrapper.cpp | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/csrc/wrapper.cpp b/csrc/wrapper.cpp index a46886b..8ca7b16 100644 --- a/csrc/wrapper.cpp +++ b/csrc/wrapper.cpp @@ -234,6 +234,10 @@ logIt("read packet error, id: %lld", id); break; } + if (exist){ + // 璁板綍瑙g爜鐨勬枃浠舵湁澶氬皯甯� + file_frame++; + } // 闈為煶瑙嗛 if (in->notVideoAudio(&data->getAVPacket())){ continue; @@ -261,8 +265,6 @@ //鏈湴鏂囦欢澶揩sleep涓�涓� if (exist){ usleep(wTime); - // 璁板綍瑙g爜鐨勬枃浠舵湁澶氬皯甯� - file_frame++; } } @@ -271,13 +273,17 @@ if (exist) { // 涓夋涓�甯ч兘娌¤В鍑烘潵锛岄��鍑� if (file_frame == 0 && file_rebootime < 3){ + logIt("libcffmpeg.so-> run %lld time, current frames %lld", file_rebootime, file_frame); continue; } // 鏈�灏忛渶瑕佽В鍑哄灏戝抚 if (file_frame < min_duration_ * fps_){ + logIt("libcffmpeg.so-> run %lld time, current frames %lld, mind %d, fps: %d", + file_rebootime, file_frame, min_duration_, fps_); continue; } - logIt("libcffmpeg.so-> local file %s run %lld time, all frames %lld", input_url_.c_str(), file_rebootime, file_frame); + logIt("libcffmpeg.so-> local file %s run %lld time, all frames %lld, mind %d, fps: %d", + input_url_.c_str(), file_rebootime, file_frame, min_duration_, fps_); file_finished_ = true; break; } -- Gitblit v1.8.0