mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-25 12:11:36 +08:00
修复whip delete_webrtc未注销流 (#2688)
bug触发条件: 1、obs whip 推流到zlm 2、关闭推流 3、zlm 未注销流
This commit is contained in:
parent
19d6f1a003
commit
eb382c3fc9
@ -149,7 +149,7 @@ void WebRtcPusher::onRtcConfigure(RtcConfigure &configure) const {
|
||||
configure.audio.direction = configure.video.direction = RtpDirection::recvonly;
|
||||
}
|
||||
|
||||
float WebRtcPusher::getLossRate(MediaSource &sender,TrackType type){
|
||||
float WebRtcPusher::getLossRate(MediaSource &sender,TrackType type) {
|
||||
return WebRtcTransportImp::getLossRate(type);
|
||||
}
|
||||
|
||||
@ -159,8 +159,13 @@ void WebRtcPusher::OnDtlsTransportClosed(const RTC::DtlsTransport *dtlsTransport
|
||||
WebRtcTransportImp::OnDtlsTransportClosed(dtlsTransport);
|
||||
}
|
||||
|
||||
void WebRtcPusher::onRtcpBye(){
|
||||
void WebRtcPusher::onRtcpBye() {
|
||||
WebRtcTransportImp::onRtcpBye();
|
||||
}
|
||||
|
||||
void WebRtcPusher::onShutdown(const SockException &ex) {
|
||||
_push_src = nullptr;
|
||||
WebRtcTransportImp::onShutdown(ex);
|
||||
}
|
||||
|
||||
}// namespace mediakit
|
@ -23,12 +23,14 @@ public:
|
||||
static Ptr create(const EventPoller::Ptr &poller, const RtspMediaSource::Ptr &src,
|
||||
const std::shared_ptr<void> &ownership, const MediaInfo &info, const ProtocolOption &option, bool preferred_tcp = false);
|
||||
|
||||
|
||||
protected:
|
||||
///////WebRtcTransportImp override///////
|
||||
void onStartWebRTC() override;
|
||||
void onDestory() override;
|
||||
void onRtcConfigure(RtcConfigure &configure) const override;
|
||||
void onRecvRtp(MediaTrack &track, const std::string &rid, RtpPacket::Ptr rtp) override;
|
||||
void onShutdown(const SockException &ex) override;
|
||||
void onRtcpBye() override;
|
||||
//// dtls相关的回调 ////
|
||||
void OnDtlsTransportClosed(const RTC::DtlsTransport *dtlsTransport) override;
|
||||
|
Loading…
Reference in New Issue
Block a user