rtc stop push unregister mediasource

This commit is contained in:
xiongguangjie
2022-09-07 19:10:06 +08:00
parent 6ca736f88a
commit 7f86299c80
4 changed files with 19 additions and 0 deletions

View File

@@ -150,4 +150,15 @@ void WebRtcPusher::onRtcConfigure(RtcConfigure &configure) const {
float WebRtcPusher::getLossRate(MediaSource &sender,mediakit::TrackType type){
return WebRtcTransportImp::getLossRate(type);
}
void WebRtcPusher::OnDtlsTransportClosed(const RTC::DtlsTransport *dtlsTransport) {
//主动关闭推流,那么不等待重推
_push_src = nullptr;
WebRtcTransportImp::OnDtlsTransportClosed(dtlsTransport);
}
void WebRtcPusher::onRtcpBye(){
_push_src = nullptr;
WebRtcTransportImp::onRtcpBye();
}