mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-29 21:38:22 +08:00
确保断连续推功能开启后流能正常强制关闭 (#4287)
This commit is contained in:
@@ -513,6 +513,18 @@ EventPoller::Ptr MultiMediaSourceMuxer::getOwnerPoller(MediaSource &sender) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MultiMediaSourceMuxer::close(MediaSource &sender) {
|
||||||
|
_rtmp = nullptr;
|
||||||
|
_rtsp = nullptr;
|
||||||
|
_fmp4 = nullptr;
|
||||||
|
_ts = nullptr;
|
||||||
|
_mp4 = nullptr;
|
||||||
|
_hls = nullptr;
|
||||||
|
_hls_fmp4 = nullptr;
|
||||||
|
_rtp_sender.clear();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
std::shared_ptr<MultiMediaSourceMuxer> MultiMediaSourceMuxer::getMuxer(MediaSource &sender) const {
|
std::shared_ptr<MultiMediaSourceMuxer> MultiMediaSourceMuxer::getMuxer(MediaSource &sender) const {
|
||||||
return const_cast<MultiMediaSourceMuxer*>(this)->shared_from_this();
|
return const_cast<MultiMediaSourceMuxer*>(this)->shared_from_this();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,6 +181,12 @@ public:
|
|||||||
* [AUTO-TRANSLATED:a4dc847e]
|
* [AUTO-TRANSLATED:a4dc847e]
|
||||||
*/
|
*/
|
||||||
toolkit::EventPoller::Ptr getOwnerPoller(MediaSource &sender) override;
|
toolkit::EventPoller::Ptr getOwnerPoller(MediaSource &sender) override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关闭流
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
bool close(MediaSource &sender) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取本对象
|
* 获取本对象
|
||||||
|
|||||||
Reference in New Issue
Block a user