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 |
11 #include "webrtc/modules/rtp_rtcp/source/rtcp_receiver_help.h" | 11 #include "webrtc/modules/rtp_rtcp/source/rtcp_receiver_help.h" |
12 | 12 |
13 #include <assert.h> // assert | 13 #include <assert.h> // assert |
14 #include <string.h> // memset | 14 #include <string.h> // memset |
15 | 15 |
| 16 #include "webrtc/modules/rtp_rtcp/source/report_block_information.h" |
16 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h" | 17 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h" |
17 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" | 18 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" |
18 | 19 |
19 namespace webrtc { | 20 namespace webrtc { |
20 namespace RTCPHelp { | 21 namespace RTCPHelp { |
21 | 22 |
22 RTCPPacketInformation::RTCPPacketInformation() | 23 RTCPPacketInformation::RTCPPacketInformation() |
23 : rtcpPacketTypeFlags(0), | 24 : rtcpPacketTypeFlags(0), |
24 remoteSSRC(0), | 25 remoteSSRC(0), |
25 nackSequenceNumbers(), | 26 nackSequenceNumbers(), |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 86 |
86 void | 87 void |
87 RTCPPacketInformation::AddNACKPacket(const uint16_t packetID) | 88 RTCPPacketInformation::AddNACKPacket(const uint16_t packetID) |
88 { | 89 { |
89 if (nackSequenceNumbers.size() >= kSendSideNackListSizeSanity) { | 90 if (nackSequenceNumbers.size() >= kSendSideNackListSizeSanity) { |
90 return; | 91 return; |
91 } | 92 } |
92 nackSequenceNumbers.push_back(packetID); | 93 nackSequenceNumbers.push_back(packetID); |
93 } | 94 } |
94 | 95 |
95 void | 96 void RTCPPacketInformation::AddReportInfo( |
96 RTCPPacketInformation::AddReportInfo( | 97 const rtcp::ReportBlockInformation& report_block_info) { |
97 const RTCPReportBlockInformation& report_block_info) | 98 this->rtt = report_block_info.LastRttMs(); |
98 { | 99 report_blocks.push_back(report_block_info.LastBlock()); |
99 this->rtt = report_block_info.RTT; | |
100 report_blocks.push_back(report_block_info.remoteReceiveBlock); | |
101 } | |
102 | |
103 RTCPReportBlockInformation::RTCPReportBlockInformation(): | |
104 remoteReceiveBlock(), | |
105 remoteMaxJitter(0), | |
106 RTT(0), | |
107 minRTT(0), | |
108 maxRTT(0), | |
109 avgRTT(0), | |
110 numAverageCalcs(0) | |
111 { | |
112 memset(&remoteReceiveBlock,0,sizeof(remoteReceiveBlock)); | |
113 } | |
114 | |
115 RTCPReportBlockInformation::~RTCPReportBlockInformation() | |
116 { | |
117 } | 100 } |
118 | 101 |
119 RTCPReceiveInformation::RTCPReceiveInformation() | 102 RTCPReceiveInformation::RTCPReceiveInformation() |
120 : lastTimeReceived(0), | 103 : lastTimeReceived(0), |
121 lastFIRSequenceNumber(-1), | 104 lastFIRSequenceNumber(-1), |
122 lastFIRRequest(0), | 105 lastFIRRequest(0), |
123 readyForDelete(false) { | 106 readyForDelete(false) { |
124 } | 107 } |
125 | 108 |
126 RTCPReceiveInformation::~RTCPReceiveInformation() { | 109 RTCPReceiveInformation::~RTCPReceiveInformation() { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 TmmbrSet.Ssrc(sourceIdx)); | 168 TmmbrSet.Ssrc(sourceIdx)); |
186 return 0; | 169 return 0; |
187 } | 170 } |
188 | 171 |
189 void RTCPReceiveInformation::VerifyAndAllocateBoundingSet( | 172 void RTCPReceiveInformation::VerifyAndAllocateBoundingSet( |
190 const uint32_t minimumSize) { | 173 const uint32_t minimumSize) { |
191 TmmbnBoundingSet.VerifyAndAllocateSet(minimumSize); | 174 TmmbnBoundingSet.VerifyAndAllocateSet(minimumSize); |
192 } | 175 } |
193 } // namespace RTCPHelp | 176 } // namespace RTCPHelp |
194 } // namespace webrtc | 177 } // namespace webrtc |
OLD | NEW |