From 728dd3ec3c0132b173ec05782412c19dd6e59d07 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Thu, 1 Oct 2020 14:37:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6pr:#509?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/FFmpegSource.cpp | 3 +-- server/WebHook.cpp | 15 +++------------ src/Common/config.cpp | 21 +-------------------- 3 files changed, 5 insertions(+), 34 deletions(-) diff --git a/server/FFmpegSource.cpp b/server/FFmpegSource.cpp index 4c3a1df2..af4807ed 100644 --- a/server/FFmpegSource.cpp +++ b/server/FFmpegSource.cpp @@ -197,8 +197,7 @@ void FFmpegSource::startTimer(int timeout_ms) { strongSelf->findAsync(0, [&](const MediaSource::Ptr &src) { //同步查找流 if (!src) { - //流不在线,重新拉流 - //@子悦,这里原先是10秒超时,实际发现10秒不够,我改成20秒了 + //流不在线,重新拉流, 这里原先是10秒超时,实际发现10秒不够,改成20秒了 if(strongSelf->_replay_ticker.elapsedTime() > 20 * 1000){ //上次重试时间超过10秒,那么再重试FFmpeg拉流 strongSelf->_replay_ticker.resetTime(); diff --git a/server/WebHook.cpp b/server/WebHook.cpp index 9f359d20..4d8aae39 100644 --- a/server/WebHook.cpp +++ b/server/WebHook.cpp @@ -129,6 +129,9 @@ const char *getContentType(const HttpArgs &value){ } static void do_http_hook(const string &url,const ArgsType &body,const function &fun){ + GET_CONFIG(string,mediaServerId,General::kMediaServerId); + const_cast(body)["mediaserverid"] = mediaServerId; + GET_CONFIG(float,hook_timeoutSec,Hook::kTimeoutSec); HttpRequester::Ptr requester(new HttpRequester); requester->setMethod("POST"); @@ -158,8 +161,6 @@ static void do_http_hook(const string &url,const ArgsType &body,const function