| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1094 rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpSli; // received signal that
we need to refresh a slice | 1094 rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpSli; // received signal that
we need to refresh a slice |
| 1095 rtcpPacketInformation.sliPictureId = rtcpPacket.SLIItem.PictureId; | 1095 rtcpPacketInformation.sliPictureId = rtcpPacket.SLIItem.PictureId; |
| 1096 } | 1096 } |
| 1097 | 1097 |
| 1098 void | 1098 void |
| 1099 RTCPReceiver::HandleRPSI(RTCPUtility::RTCPParserV2& rtcpParser, | 1099 RTCPReceiver::HandleRPSI(RTCPUtility::RTCPParserV2& rtcpParser, |
| 1100 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | 1100 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
| 1101 { | 1101 { |
| 1102 const RTCPUtility::RTCPPacket& rtcpPacket = rtcpParser.Packet(); | 1102 const RTCPUtility::RTCPPacket& rtcpPacket = rtcpParser.Packet(); |
| 1103 RTCPUtility::RTCPPacketTypes pktType = rtcpParser.Iterate(); | 1103 RTCPUtility::RTCPPacketTypes pktType = rtcpParser.Iterate(); |
| 1104 if (pktType == RTCPPacketTypes::kPsfbRpsi) { | 1104 if (pktType == RTCPPacketTypes::kPsfbRpsiItem) { |
| 1105 rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpRpsi; // received sign
al that we have a confirmed reference picture | |
| 1106 if(rtcpPacket.RPSI.NumberOfValidBits%8 != 0) | 1105 if(rtcpPacket.RPSI.NumberOfValidBits%8 != 0) |
| 1107 { | 1106 { |
| 1108 // to us unknown | 1107 // to us unknown |
| 1109 // continue | 1108 // continue |
| 1110 rtcpParser.Iterate(); | 1109 rtcpParser.Iterate(); |
| 1111 return; | 1110 return; |
| 1112 } | 1111 } |
| 1112 // Received signal that we have a confirmed reference picture. |
| 1113 rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpRpsi; |
| 1113 rtcpPacketInformation.rpsiPictureId = 0; | 1114 rtcpPacketInformation.rpsiPictureId = 0; |
| 1114 | 1115 |
| 1115 // convert NativeBitString to rpsiPictureId | 1116 // convert NativeBitString to rpsiPictureId |
| 1116 uint8_t numberOfBytes = rtcpPacket.RPSI.NumberOfValidBits /8; | 1117 uint8_t numberOfBytes = rtcpPacket.RPSI.NumberOfValidBits /8; |
| 1117 for(uint8_t n = 0; n < (numberOfBytes-1); n++) | 1118 for(uint8_t n = 0; n < (numberOfBytes-1); n++) |
| 1118 { | 1119 { |
| 1119 rtcpPacketInformation.rpsiPictureId += (rtcpPacket.RPSI.NativeBitStr
ing[n] & 0x7f); | 1120 rtcpPacketInformation.rpsiPictureId += (rtcpPacket.RPSI.NativeBitStr
ing[n] & 0x7f); |
| 1120 rtcpPacketInformation.rpsiPictureId <<= 7; // prepare next | 1121 rtcpPacketInformation.rpsiPictureId <<= 7; // prepare next |
| 1121 } | 1122 } |
| 1122 rtcpPacketInformation.rpsiPictureId += (rtcpPacket.RPSI.NativeBitString[
numberOfBytes-1] & 0x7f); | 1123 rtcpPacketInformation.rpsiPictureId += (rtcpPacket.RPSI.NativeBitString[
numberOfBytes-1] & 0x7f); |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1443 return -1; | 1444 return -1; |
| 1444 } | 1445 } |
| 1445 num += receiveInfo->TmmbrSet.lengthOfSet(); | 1446 num += receiveInfo->TmmbrSet.lengthOfSet(); |
| 1446 receiveInfoIt++; | 1447 receiveInfoIt++; |
| 1447 } | 1448 } |
| 1448 } | 1449 } |
| 1449 return num; | 1450 return num; |
| 1450 } | 1451 } |
| 1451 | 1452 |
| 1452 } // namespace webrtc | 1453 } // namespace webrtc |
| OLD | NEW |