From 4132df89cdab9b068bb374c8e5781afb87960b75 Mon Sep 17 00:00:00 2001 From: qiuzhouwei Date: Mon, 28 Sep 2020 10:45:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8id,=E4=BF=AE=E6=94=B9=E4=BA=86record.cpp=E4=B8=ADmp4?= =?UTF-8?q?=E5=BD=95=E5=88=B6=E7=9A=84=E8=87=AA=E5=AE=9A=E4=B9=89=E5=BD=95?= =?UTF-8?q?=E5=88=B6=E8=B7=AF=E5=BE=84=EF=BC=8Cffmpegsource=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E8=B6=85=E6=97=B6=E6=97=B6=E9=97=B4=EF=BC=8Cwebhook?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E5=94=AF=E4=B8=80id=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/FFmpegSource.cpp | 3 ++- server/WebHook.cpp | 12 ++++++++++++ src/Common/config.cpp | 21 +++++++++++++++++++++ src/Common/config.h | 2 ++ src/Record/Recorder.cpp | 9 ++++++++- 5 files changed, 45 insertions(+), 2 deletions(-) diff --git a/server/FFmpegSource.cpp b/server/FFmpegSource.cpp index 21e87b41..4c3a1df2 100644 --- a/server/FFmpegSource.cpp +++ b/server/FFmpegSource.cpp @@ -198,7 +198,8 @@ void FFmpegSource::startTimer(int timeout_ms) { //同步查找流 if (!src) { //流不在线,重新拉流 - if(strongSelf->_replay_ticker.elapsedTime() > 10 * 1000){ + //@子悦,这里原先是10秒超时,实际发现10秒不够,我改成20秒了 + if(strongSelf->_replay_ticker.elapsedTime() > 20 * 1000){ //上次重试时间超过10秒,那么再重试FFmpeg拉流 strongSelf->_replay_ticker.resetTime(); strongSelf->play(strongSelf->_src_url, strongSelf->_dst_url, timeout_ms, [](const SockException &) {}); diff --git a/server/WebHook.cpp b/server/WebHook.cpp index e2d1adf1..9f359d20 100644 --- a/server/WebHook.cpp +++ b/server/WebHook.cpp @@ -158,6 +158,8 @@ static void do_http_hook(const string &url,const ArgsType &body,const function