OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 } | 131 } |
132 | 132 |
133 void RembReceiver::OnReceiveBitrateChanged(const std::vector<uint32_t>& ssrcs, | 133 void RembReceiver::OnReceiveBitrateChanged(const std::vector<uint32_t>& ssrcs, |
134 uint32_t bitrate) {} | 134 uint32_t bitrate) {} |
135 | 135 |
136 RTCPReportBlock RembReceiver::BuildReportBlock( | 136 RTCPReportBlock RembReceiver::BuildReportBlock( |
137 StreamStatistician* statistician) { | 137 StreamStatistician* statistician) { |
138 RTCPReportBlock report_block; | 138 RTCPReportBlock report_block; |
139 RtcpStatistics stats; | 139 RtcpStatistics stats; |
140 RTC_DCHECK(statistician->GetStatistics(&stats, true)); | 140 RTC_DCHECK(statistician->GetStatistics(&stats, true)); |
141 report_block.fractionLost = stats.fraction_lost; | 141 report_block.fraction_lost = stats.fraction_lost; |
142 report_block.cumulativeLost = stats.packets_lost; | 142 report_block.packets_lost = stats.packets_lost; |
143 report_block.extendedHighSeqNum = stats.extended_highest_sequence_number; | 143 report_block.extended_highest_sequence_number = |
| 144 stats.extended_highest_sequence_number; |
144 report_block.jitter = stats.jitter; | 145 report_block.jitter = stats.jitter; |
145 return report_block; | 146 return report_block; |
146 } | 147 } |
147 | 148 |
148 bool RembReceiver::LatestEstimate(uint32_t* estimate_bps) { | 149 bool RembReceiver::LatestEstimate(uint32_t* estimate_bps) { |
149 if (latest_estimate_bps_ < 0) { | 150 if (latest_estimate_bps_ < 0) { |
150 std::vector<uint32_t> ssrcs; | 151 std::vector<uint32_t> ssrcs; |
151 uint32_t bps = 0; | 152 uint32_t bps = 0; |
152 if (!estimator_->LatestEstimate(&ssrcs, &bps)) { | 153 if (!estimator_->LatestEstimate(&ssrcs, &bps)) { |
153 return false; | 154 return false; |
154 } | 155 } |
155 latest_estimate_bps_ = bps; | 156 latest_estimate_bps_ = bps; |
156 } | 157 } |
157 *estimate_bps = latest_estimate_bps_; | 158 *estimate_bps = latest_estimate_bps_; |
158 return true; | 159 return true; |
159 } | 160 } |
160 | 161 |
161 } // namespace bwe | 162 } // namespace bwe |
162 } // namespace testing | 163 } // namespace testing |
163 } // namespace webrtc | 164 } // namespace webrtc |
OLD | NEW |