添加配置项 mediaServerId

This commit is contained in:
xiongziliang 2020-10-01 20:58:19 +08:00
parent c968769a13
commit 6a8268f323
2 changed files with 3 additions and 1 deletions

View File

@ -52,6 +52,8 @@ mergeWriteMS=0
#会直接影响rtsp/rtmp/hls/mp4/flv等协议的时间戳
#同协议情况下不影响(例如rtsp/rtmp推流那么播放rtsp/rtmp时不会影响时间戳)
modifyStamp=0
#服务器唯一id用于触发hook时区别是哪台服务器
mediaServerId=your_server_id
[hls]
#hls写文件的buf大小调整参数可以提高文件io性能

View File

@ -130,7 +130,7 @@ const char *getContentType(const HttpArgs &value){
static void do_http_hook(const string &url,const ArgsType &body,const function<void(const Value &,const string &)> &fun){
GET_CONFIG(string,mediaServerId,General::kMediaServerId);
const_cast<ArgsType &>(body)["mediaserverid"] = mediaServerId;
const_cast<ArgsType &>(body)["mediaServerId"] = mediaServerId;
GET_CONFIG(float,hook_timeoutSec,Hook::kTimeoutSec);
HttpRequester::Ptr requester(new HttpRequester);