From 8db01651fe36293e75c869e3f83d1425211161d7 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sat, 12 Mar 2022 14:39:59 +0800 Subject: [PATCH] =?UTF-8?q?on=5Fpublish=20hook=E6=96=B0=E5=A2=9Ertsp/rtmp/?= =?UTF-8?q?ts/fmp4=E8=BD=AC=E5=8D=8F=E8=AE=AE=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/WebHook.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/server/WebHook.cpp b/server/WebHook.cpp index e8dc521f..b1313288 100755 --- a/server/WebHook.cpp +++ b/server/WebHook.cpp @@ -286,7 +286,6 @@ void installWebHook(){ ProtocolOption option; if (err.empty()) { //推流鉴权成功 - //兼容用户不传递enableHls、enableMP4参数 if (obj.isMember("enable_hls")) { option.enable_hls = obj["enable_hls"].asBool(); } @@ -308,6 +307,18 @@ void installWebHook(){ if (obj.isMember("hls_save_path")) { option.hls_save_path = obj["hls_save_path"].asString(); } + if (obj.isMember("enable_rtsp")) { + option.enable_rtsp = obj["enable_rtsp"].asBool(); + } + if (obj.isMember("enable_rtmp")) { + option.enable_rtmp = obj["enable_rtmp"].asBool(); + } + if (obj.isMember("enable_ts")) { + option.enable_ts = obj["enable_ts"].asBool(); + } + if (obj.isMember("enable_fmp4")) { + option.enable_fmp4 = obj["enable_fmp4"].asBool(); + } invoker(err, option); } else { //推流鉴权失败