From b2afae0e8a41fa91ff452c11885621656a374b11 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Wed, 7 Apr 2021 21:02:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E6=97=B6=E5=B1=8F=E8=94=BD=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtcp/Rtcp.cpp | 5 +++++ webrtc/WebRtcTransport.cpp | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Rtcp/Rtcp.cpp b/src/Rtcp/Rtcp.cpp index 86af2821..912999b9 100644 --- a/src/Rtcp/Rtcp.cpp +++ b/src/Rtcp/Rtcp.cpp @@ -133,6 +133,11 @@ void RtcpHeader::net2Host(size_t len){ bye->net2Host(len); break; } + + case RtcpType::RTCP_RTPFB: { + //todo 支持rtcp-fb相关功能 + break; + } default: throw std::runtime_error(StrPrinter << "未处理的rtcp包:" << rtcpTypeToStr((RtcpType) this->pt)); } } diff --git a/webrtc/WebRtcTransport.cpp b/webrtc/WebRtcTransport.cpp index 7d6548b6..4084c610 100644 --- a/webrtc/WebRtcTransport.cpp +++ b/webrtc/WebRtcTransport.cpp @@ -533,7 +533,7 @@ void WebRtcTransportImp::onRtcp(const char *buf, size_t len) { break; } case RtcpType::RTCP_PSFB: { -// InfoL << rtcp->dumpString(); + //todo 支持pli等更多类型的rtcp break; } default: break; @@ -561,11 +561,10 @@ void WebRtcTransportImp::onRtp(const char *buf, size_t len) { void WebRtcTransportImp::onSortedRtp(const RtpPayloadInfo &info, RtpPacket::Ptr rtp) { if(!info.is_common_rtp){ //todo rtx/red/ulpfec类型的rtp先未处理 - WarnL; return; } if (_pli_ticker.elapsedTime() > 2000) { - //todo 定期发送pli + //定期发送pli请求关键帧,方便非rtc等协议 _pli_ticker.resetTime(); auto pli = RtcpPli::create(); pli->ssrc = htonl(0);