mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-05-06 23:33:47 +08:00
修正ENABLE_RTPPROXY未启用时编译失败问题 (#4384)
This commit is contained in:
@@ -195,7 +195,7 @@ std::string MultiMediaSourceMuxer::shortUrl() const {
|
||||
}
|
||||
return _tuple.shortUrl();
|
||||
}
|
||||
|
||||
#if defined(ENABLE_RTPPROXY)
|
||||
void MultiMediaSourceMuxer::forEachRtpSender(const std::function<void(const std::string &ssrc, const RtpSender &sender)> &cb) const {
|
||||
for (auto &pr : _rtp_sender) {
|
||||
auto sender = std::get<1>(pr.second).lock();
|
||||
@@ -204,7 +204,7 @@ void MultiMediaSourceMuxer::forEachRtpSender(const std::function<void(const std:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // ENABLE_RTPPROXY
|
||||
MultiMediaSourceMuxer::MultiMediaSourceMuxer(const MediaTuple& tuple, float dur_sec, const ProtocolOption &option): _tuple(tuple) {
|
||||
if (!option.stream_replace.empty()) {
|
||||
// 支持在on_publish hook中替换stream_id [AUTO-TRANSLATED:375eb2ff]
|
||||
@@ -605,7 +605,9 @@ bool MultiMediaSourceMuxer::close(MediaSource &sender) {
|
||||
_mp4 = nullptr;
|
||||
_hls = nullptr;
|
||||
_hls_fmp4 = nullptr;
|
||||
#if defined(ENABLE_RTPPROXY)
|
||||
_rtp_sender.clear();
|
||||
#endif // ENABLE_RTPPROXY
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -208,9 +208,9 @@ public:
|
||||
const ProtocolOption &getOption() const;
|
||||
const MediaTuple &getMediaTuple() const;
|
||||
std::string shortUrl() const;
|
||||
|
||||
#if defined(ENABLE_RTPPROXY)
|
||||
void forEachRtpSender(const std::function<void(const std::string &ssrc, const RtpSender &sender)> &cb) const;
|
||||
|
||||
#endif // ENABLE_RTPPROXY
|
||||
protected:
|
||||
/////////////////////////////////MediaSink override/////////////////////////////////
|
||||
|
||||
@@ -260,7 +260,9 @@ private:
|
||||
toolkit::Ticker _last_check;
|
||||
std::unordered_map<int, Stamp> _stamps;
|
||||
std::weak_ptr<Listener> _track_listener;
|
||||
#if defined(ENABLE_RTPPROXY)
|
||||
std::unordered_multimap<std::string, std::tuple<RingType::RingReader::Ptr, std::weak_ptr<RtpSender>>> _rtp_sender;
|
||||
#endif // ENABLE_RTPPROXY
|
||||
FMP4MediaSourceMuxer::Ptr _fmp4;
|
||||
RtmpMediaSourceMuxer::Ptr _rtmp;
|
||||
RtspMediaSourceMuxer::Ptr _rtsp;
|
||||
|
||||
Reference in New Issue
Block a user