From 408a678ade2100a2dcf8126968f3ae3b418142cd Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sat, 21 Nov 2020 22:32:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=9A#584?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/WebApi.cpp | 3 +-- src/Rtp/RtpCache.cpp | 4 ++++ src/Rtp/RtpCache.h | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/server/WebApi.cpp b/server/WebApi.cpp index 3eb6ef90..eee13997 100644 --- a/server/WebApi.cpp +++ b/server/WebApi.cpp @@ -1155,8 +1155,6 @@ void installWebApi() { } void unInstallWebApi(){ - RtpSelector::Instance().clear(); - { lock_guard lck(s_proxyMapMtx); s_proxyMap.clear(); @@ -1169,6 +1167,7 @@ void unInstallWebApi(){ { #if defined(ENABLE_RTPPROXY) + RtpSelector::Instance().clear(); lock_guard lck(s_rtpServerMapMtx); s_rtpServerMap.clear(); #endif diff --git a/src/Rtp/RtpCache.cpp b/src/Rtp/RtpCache.cpp index 59ce4294..3069d306 100644 --- a/src/Rtp/RtpCache.cpp +++ b/src/Rtp/RtpCache.cpp @@ -10,6 +10,8 @@ #include "RtpCache.h" +#if defined(ENABLE_RTPPROXY) + namespace mediakit{ RtpCache::RtpCache(onFlushed cb) { @@ -31,3 +33,5 @@ void RtpCachePS::onRTP(Buffer::Ptr buffer) { } }//namespace mediakit + +#endif//#if defined(ENABLE_RTPPROXY) \ No newline at end of file diff --git a/src/Rtp/RtpCache.h b/src/Rtp/RtpCache.h index b6d00e6a..d0e94517 100644 --- a/src/Rtp/RtpCache.h +++ b/src/Rtp/RtpCache.h @@ -11,6 +11,8 @@ #ifndef ZLMEDIAKIT_RTPCACHE_H #define ZLMEDIAKIT_RTPCACHE_H +#if defined(ENABLE_RTPPROXY) + #include "PSEncoder.h" #include "Extension/CommonRtp.h" @@ -46,4 +48,5 @@ protected: }; }//namespace mediakit +#endif//ENABLE_RTPPROXY #endif //ZLMEDIAKIT_RTPCACHE_H