From 8092cb446e446472559688d27c26edda56ec03b3 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Tue, 9 Jul 2019 14:30:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9on=5Fstream=5Fnot=5Ffound?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/WebApi.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/server/WebApi.cpp b/server/WebApi.cpp index 836d381c..cdb9b810 100644 --- a/server/WebApi.cpp +++ b/server/WebApi.cpp @@ -612,7 +612,7 @@ void installWebApi() { #if !defined(_WIN32) - API_REGIST_INVOKER(hook,on_stream_not_found,{ + API_REGIST_INVOKER(hook,on_stream_not_found_ffmpeg,{ //媒体未找到事件,我们都及时拉流hks作为替代品,目的是为了测试按需拉流 CHECK_SECRET(); CHECK_ARGS("vhost","app","stream"); @@ -640,8 +640,7 @@ void installWebApi() { invoker("200 OK", headerOut, val.toStyledString()); }); }); - -#else +#endif//!defined(_WIN32) API_REGIST_INVOKER(hook,on_stream_not_found,{ //媒体未找到事件,我们都及时拉流hks作为替代品,目的是为了测试按需拉流 @@ -652,8 +651,8 @@ void installWebApi() { allArgs["app"], allArgs["stream"], /** 支持rtsp和rtmp方式拉流 ,rtsp支持h265/h264/aac,rtmp仅支持h264/aac **/ - "rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov",//rtmp://live.hkstv.hk.lxdns.com/live/hks2 - false, + "rtmp://live.hkstv.hk.lxdns.com/live/hks2",//"rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov" + true, false, 0,//rtp over tcp方式拉流 [invoker,val,headerOut](const SockException &ex,const string &key){ @@ -666,7 +665,6 @@ void installWebApi() { invoker("200 OK", headerOut, val.toStyledString()); }); }); -#endif // !defined(_WIN32) API_REGIST(hook,on_record_mp4,{ //录制mp4分片完毕事件