From 676000e355a839ad8f9af4523913d64c533152f6 Mon Sep 17 00:00:00 2001 From: xtxxtx Date: Sat, 18 Oct 2025 12:11:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DENABLE=5FWEBRTC=E3=80=81ENABL?= =?UTF-8?q?E=5FOPENSSL=E5=85=B3=E9=97=AD=E6=97=B6=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98=20(#4501)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复:当ENABLE_WEBRTC=OFF且ENABLE_OPENSSL=OFF时,编译报错:找不到ssl.h --- api/source/mk_webrtc.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/api/source/mk_webrtc.cpp b/api/source/mk_webrtc.cpp index 0aa089d6..2945bf16 100644 --- a/api/source/mk_webrtc.cpp +++ b/api/source/mk_webrtc.cpp @@ -25,16 +25,19 @@ #include "Http/HttpSession.h" #include "Shell/ShellSession.h" #include "Player/PlayerProxy.h" -#include "webrtc/WebRtcProxyPlayer.h" -#include "webrtc/WebRtcProxyPlayerImp.h" -#include "../webrtc/WebRtcSignalingPeer.h" -#include "../webrtc/WebRtcSignalingSession.h" + using namespace std; using namespace toolkit; using namespace mediakit; #ifdef ENABLE_WEBRTC -#include "../webrtc/WebRtcSession.h" + +#include "webrtc/WebRtcProxyPlayer.h" +#include "webrtc/WebRtcProxyPlayerImp.h" +#include "webrtc/WebRtcSignalingPeer.h" +#include "webrtc/WebRtcSignalingSession.h" +#include "webrtc/WebRtcSession.h" + static UdpServer::Ptr rtcServer_udp; static TcpServer::Ptr rtcServer_tcp; class WebRtcArgsUrl : public mediakit::WebRtcArgs { @@ -184,4 +187,4 @@ API_EXPORT void API_CALL mk_webrtc_list_rooms(on_mk_webrtc_room_keeper_data_cb c #else WarnL << "未启用webrtc功能, 编译时请开启ENABLE_WEBRTC"; #endif -} \ No newline at end of file +}