From 66a62531600ea73b7742302e787283b4241c76ce Mon Sep 17 00:00:00 2001 From: ljx0305 Date: Fri, 22 Mar 2024 20:42:02 +0800 Subject: [PATCH] Fix compilation error issues (#3385) --- server/VideoStack.cpp | 8 ++++---- server/WebApi.h | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/server/VideoStack.cpp b/server/VideoStack.cpp index 6b860fe5..ff4804f1 100644 --- a/server/VideoStack.cpp +++ b/server/VideoStack.cpp @@ -180,7 +180,7 @@ void StackPlayer::play() self->onFrame(frame); }); - videoTrack->addDelegate((std::function)[decoder](const mediakit::Frame::Ptr& frame) { + videoTrack->addDelegate([decoder](const mediakit::Frame::Ptr& frame) { return decoder->inputFrame(frame, false, true); }); } @@ -467,8 +467,8 @@ Params VideoStackManager::parseParams(const Json::Value& json, float gaph = json["gaph"].asFloat(); //水平间距 //单个间距 - int gaphPix = static_cast(std::round(width * gaph)); - int gapvPix = static_cast(std::round(height * gapv)); + int gaphPix = static_cast(round(width * gaph)); + int gapvPix = static_cast(round(height * gapv)); // 根据间距计算格子宽高 int gridWidth = cols > 1 ? (width - gaphPix * (cols - 1)) / cols : width; @@ -587,4 +587,4 @@ StackPlayer::Ptr VideoStackManager::createPlayer(const std::string& id) return player; } -#endif \ No newline at end of file +#endif diff --git a/server/WebApi.h b/server/WebApi.h index eff4c93f..1d1be694 100755 --- a/server/WebApi.h +++ b/server/WebApi.h @@ -234,8 +234,6 @@ void unInstallWebApi(); #if defined(ENABLE_RTPPROXY) uint16_t openRtpServer(uint16_t local_port, const std::string &stream_id, int tcp_mode, const std::string &local_ip, bool re_use_port, uint32_t ssrc, int only_track, bool multiplex=false); -void connectRtpServer(const std::string &stream_id, const std::string &dst_url, uint16_t dst_port, const std::function &cb); -bool closeRtpServer(const std::string &stream_id); #endif Json::Value makeMediaSourceJson(mediakit::MediaSource &media);