Bugfix issue 533. Client does not handle NACK or PLI requests received from far end if a RTCP report from it has not been processed when RFC 5506 is enabled.
Review URL: https://webrtc-codereview.appspot.com/569020 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2263 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
1bca6d2437
commit
b2179c20f0
@ -721,14 +721,6 @@ RTCPReceiver::HandleNACK(RTCPUtility::RTCPParserV2& rtcpParser,
|
|||||||
RTCPPacketInformation& rtcpPacketInformation)
|
RTCPPacketInformation& rtcpPacketInformation)
|
||||||
{
|
{
|
||||||
const RTCPUtility::RTCPPacket& rtcpPacket = rtcpParser.Packet();
|
const RTCPUtility::RTCPPacket& rtcpPacket = rtcpParser.Packet();
|
||||||
|
|
||||||
RTCPReceiveInformation* ptrReceiveInfo = GetReceiveInformation(rtcpPacket.NACK.SenderSSRC);
|
|
||||||
if (ptrReceiveInfo == NULL)
|
|
||||||
{
|
|
||||||
// This remote SSRC must be saved before.
|
|
||||||
rtcpParser.Iterate();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (_SSRC != rtcpPacket.NACK.MediaSSRC)
|
if (_SSRC != rtcpPacket.NACK.MediaSSRC)
|
||||||
{
|
{
|
||||||
// Not to us.
|
// Not to us.
|
||||||
@ -846,27 +838,14 @@ RTCPReceiver::HandleXRVOIPMetric(RTCPUtility::RTCPParserV2& rtcpParser,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// no need for critsect we have _criticalSectionRTCPReceiver
|
// no need for critsect we have _criticalSectionRTCPReceiver
|
||||||
void
|
void RTCPReceiver::HandlePLI(RTCPUtility::RTCPParserV2& rtcpParser,
|
||||||
RTCPReceiver::HandlePLI(RTCPUtility::RTCPParserV2& rtcpParser,
|
RTCPPacketInformation& rtcpPacketInformation) {
|
||||||
RTCPPacketInformation& rtcpPacketInformation)
|
const RTCPUtility::RTCPPacket& rtcpPacket = rtcpParser.Packet();
|
||||||
{
|
if (_SSRC == rtcpPacket.PLI.MediaSSRC) {
|
||||||
const RTCPUtility::RTCPPacket& rtcpPacket = rtcpParser.Packet();
|
// Received a signal that we need to send a new key frame.
|
||||||
|
rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpPli;
|
||||||
RTCPReceiveInformation* ptrReceiveInfo = GetReceiveInformation(rtcpPacket.PLI.SenderSSRC);
|
}
|
||||||
if (ptrReceiveInfo == NULL)
|
rtcpParser.Iterate();
|
||||||
{
|
|
||||||
// This remote SSRC must be saved before.
|
|
||||||
rtcpParser.Iterate();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (_SSRC != rtcpPacket.PLI.MediaSSRC)
|
|
||||||
{
|
|
||||||
// Not to us.
|
|
||||||
rtcpParser.Iterate();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpPli; // received signal that we need to send a new key frame
|
|
||||||
rtcpParser.Iterate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// no need for critsect we have _criticalSectionRTCPReceiver
|
// no need for critsect we have _criticalSectionRTCPReceiver
|
||||||
@ -990,15 +969,6 @@ RTCPReceiver::HandleSLI(RTCPUtility::RTCPParserV2& rtcpParser,
|
|||||||
RTCPPacketInformation& rtcpPacketInformation)
|
RTCPPacketInformation& rtcpPacketInformation)
|
||||||
{
|
{
|
||||||
const RTCPUtility::RTCPPacket& rtcpPacket = rtcpParser.Packet();
|
const RTCPUtility::RTCPPacket& rtcpPacket = rtcpParser.Packet();
|
||||||
|
|
||||||
RTCPReceiveInformation* ptrReceiveInfo = GetReceiveInformation(rtcpPacket.SLI.SenderSSRC);
|
|
||||||
if (ptrReceiveInfo == NULL)
|
|
||||||
{
|
|
||||||
// This remote SSRC must be saved before.
|
|
||||||
rtcpParser.Iterate();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
RTCPUtility::RTCPPacketTypes pktType = rtcpParser.Iterate();
|
RTCPUtility::RTCPPacketTypes pktType = rtcpParser.Iterate();
|
||||||
while (pktType == RTCPUtility::kRtcpPsfbSliItemCode)
|
while (pktType == RTCPUtility::kRtcpPsfbSliItemCode)
|
||||||
{
|
{
|
||||||
@ -1022,14 +992,6 @@ RTCPReceiver::HandleRPSI(RTCPUtility::RTCPParserV2& rtcpParser,
|
|||||||
RTCPHelp::RTCPPacketInformation& rtcpPacketInformation)
|
RTCPHelp::RTCPPacketInformation& rtcpPacketInformation)
|
||||||
{
|
{
|
||||||
const RTCPUtility::RTCPPacket& rtcpPacket = rtcpParser.Packet();
|
const RTCPUtility::RTCPPacket& rtcpPacket = rtcpParser.Packet();
|
||||||
|
|
||||||
RTCPReceiveInformation* ptrReceiveInfo = GetReceiveInformation(rtcpPacket.RPSI.SenderSSRC);
|
|
||||||
if (ptrReceiveInfo == NULL)
|
|
||||||
{
|
|
||||||
// This remote SSRC must be saved before.
|
|
||||||
rtcpParser.Iterate();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
RTCPUtility::RTCPPacketTypes pktType = rtcpParser.Iterate();
|
RTCPUtility::RTCPPacketTypes pktType = rtcpParser.Iterate();
|
||||||
if(pktType == RTCPUtility::kRtcpPsfbRpsiCode)
|
if(pktType == RTCPUtility::kRtcpPsfbRpsiCode)
|
||||||
{
|
{
|
||||||
@ -1101,55 +1063,47 @@ void RTCPReceiver::HandleREMBItem(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// no need for critsect we have _criticalSectionRTCPReceiver
|
// no need for critsect we have _criticalSectionRTCPReceiver
|
||||||
void
|
void RTCPReceiver::HandleFIR(RTCPUtility::RTCPParserV2& rtcpParser,
|
||||||
RTCPReceiver::HandleFIR(RTCPUtility::RTCPParserV2& rtcpParser,
|
RTCPPacketInformation& rtcpPacketInformation) {
|
||||||
RTCPPacketInformation& rtcpPacketInformation)
|
const RTCPUtility::RTCPPacket& rtcpPacket = rtcpParser.Packet();
|
||||||
{
|
RTCPReceiveInformation* ptrReceiveInfo =
|
||||||
const RTCPUtility::RTCPPacket& rtcpPacket = rtcpParser.Packet();
|
GetReceiveInformation(rtcpPacket.FIR.SenderSSRC);
|
||||||
|
|
||||||
RTCPReceiveInformation* ptrReceiveInfo = GetReceiveInformation(rtcpPacket.FIR.SenderSSRC);
|
RTCPUtility::RTCPPacketTypes pktType = rtcpParser.Iterate();
|
||||||
if (ptrReceiveInfo == NULL)
|
while (pktType == RTCPUtility::kRtcpPsfbFirItemCode) {
|
||||||
{
|
HandleFIRItem(ptrReceiveInfo, rtcpPacket, rtcpPacketInformation);
|
||||||
// This remote SSRC must be saved before.
|
pktType = rtcpParser.Iterate();
|
||||||
rtcpParser.Iterate();
|
}
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
RTCPUtility::RTCPPacketTypes pktType = rtcpParser.Iterate();
|
|
||||||
while (pktType == RTCPUtility::kRtcpPsfbFirItemCode)
|
|
||||||
{
|
|
||||||
HandleFIRItem(*ptrReceiveInfo, rtcpPacket, rtcpPacketInformation);
|
|
||||||
pktType = rtcpParser.Iterate();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// no need for critsect we have _criticalSectionRTCPReceiver
|
// no need for critsect we have _criticalSectionRTCPReceiver
|
||||||
void
|
void RTCPReceiver::HandleFIRItem(RTCPReceiveInformation* receiveInfo,
|
||||||
RTCPReceiver::HandleFIRItem(RTCPReceiveInformation& receiveInfo,
|
const RTCPUtility::RTCPPacket& rtcpPacket,
|
||||||
const RTCPUtility::RTCPPacket& rtcpPacket,
|
RTCPPacketInformation& rtcpPacketInformation) {
|
||||||
RTCPPacketInformation& rtcpPacketInformation)
|
// Is it our sender that is requested to generate a new keyframe
|
||||||
{
|
if (_SSRC != rtcpPacket.FIRItem.SSRC) {
|
||||||
if (_SSRC == rtcpPacket.FIRItem.SSRC) // is it our sender that is requested to generate a new keyframe
|
return;
|
||||||
{
|
}
|
||||||
// rtcpPacket.FIR.MediaSSRC SHOULD be 0 but we ignore to check it
|
// rtcpPacket.FIR.MediaSSRC SHOULD be 0 but we ignore to check it
|
||||||
// we don't know who this originate from
|
// we don't know who this originate from
|
||||||
|
if (receiveInfo) {
|
||||||
// check if we have reported this FIRSequenceNumber before
|
// check if we have reported this FIRSequenceNumber before
|
||||||
if (rtcpPacket.FIRItem.CommandSequenceNumber != receiveInfo.lastFIRSequenceNumber)
|
if (rtcpPacket.FIRItem.CommandSequenceNumber !=
|
||||||
{
|
receiveInfo->lastFIRSequenceNumber) {
|
||||||
//
|
WebRtc_UWord32 now = _clock.GetTimeInMS();
|
||||||
WebRtc_UWord32 now = _clock.GetTimeInMS();
|
// sanity; don't go crazy with the callbacks
|
||||||
|
if ((now - receiveInfo->lastFIRRequest) > RTCP_MIN_FRAME_LENGTH_MS) {
|
||||||
// extra sanity don't go crazy with the callbacks
|
receiveInfo->lastFIRRequest = now;
|
||||||
if( (now - receiveInfo.lastFIRRequest) > RTCP_MIN_FRAME_LENGTH_MS)
|
receiveInfo->lastFIRSequenceNumber =
|
||||||
{
|
rtcpPacket.FIRItem.CommandSequenceNumber;
|
||||||
receiveInfo.lastFIRRequest = now;
|
// received signal that we need to send a new key frame
|
||||||
receiveInfo.lastFIRSequenceNumber = rtcpPacket.FIRItem.CommandSequenceNumber;
|
rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpFir;
|
||||||
|
}
|
||||||
rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpFir; // received signal that we need to send a new key frame
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// received signal that we need to send a new key frame
|
||||||
|
rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpFir;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -175,7 +175,7 @@ protected:
|
|||||||
void HandleFIR(RTCPUtility::RTCPParserV2& rtcpParser,
|
void HandleFIR(RTCPUtility::RTCPParserV2& rtcpParser,
|
||||||
RTCPHelp::RTCPPacketInformation& rtcpPacketInformation);
|
RTCPHelp::RTCPPacketInformation& rtcpPacketInformation);
|
||||||
|
|
||||||
void HandleFIRItem(RTCPHelp::RTCPReceiveInformation& receiveInfo,
|
void HandleFIRItem(RTCPHelp::RTCPReceiveInformation* receiveInfo,
|
||||||
const RTCPUtility::RTCPPacket& rtcpPacket,
|
const RTCPUtility::RTCPPacket& rtcpPacket,
|
||||||
RTCPHelp::RTCPPacketInformation& rtcpPacketInformation);
|
RTCPHelp::RTCPPacketInformation& rtcpPacketInformation);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user