| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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.fractionLost = stats.fraction_lost; |
| 142 report_block.cumulativeLost = stats.cumulative_lost; | 142 report_block.cumulativeLost = stats.packets_lost; |
| 143 report_block.extendedHighSeqNum = stats.extended_max_sequence_number; | 143 report_block.extendedHighSeqNum = stats.extended_highest_sequence_number; |
| 144 report_block.jitter = stats.jitter; | 144 report_block.jitter = stats.jitter; |
| 145 return report_block; | 145 return report_block; |
| 146 } | 146 } |
| 147 | 147 |
| 148 bool RembReceiver::LatestEstimate(uint32_t* estimate_bps) { | 148 bool RembReceiver::LatestEstimate(uint32_t* estimate_bps) { |
| 149 if (latest_estimate_bps_ < 0) { | 149 if (latest_estimate_bps_ < 0) { |
| 150 std::vector<uint32_t> ssrcs; | 150 std::vector<uint32_t> ssrcs; |
| 151 uint32_t bps = 0; | 151 uint32_t bps = 0; |
| 152 if (!estimator_->LatestEstimate(&ssrcs, &bps)) { | 152 if (!estimator_->LatestEstimate(&ssrcs, &bps)) { |
| 153 return false; | 153 return false; |
| 154 } | 154 } |
| 155 latest_estimate_bps_ = bps; | 155 latest_estimate_bps_ = bps; |
| 156 } | 156 } |
| 157 *estimate_bps = latest_estimate_bps_; | 157 *estimate_bps = latest_estimate_bps_; |
| 158 return true; | 158 return true; |
| 159 } | 159 } |
| 160 | 160 |
| 161 } // namespace bwe | 161 } // namespace bwe |
| 162 } // namespace testing | 162 } // namespace testing |
| 163 } // namespace webrtc | 163 } // namespace webrtc |
| OLD | NEW |