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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 double estimated_kbps = static_cast<double>(estimated_bps) / 1000.0; | 121 double estimated_kbps = static_cast<double>(estimated_bps) / 1000.0; |
122 RTC_UNUSED(estimated_kbps); | 122 RTC_UNUSED(estimated_kbps); |
123 if (plot_estimate_) { | 123 if (plot_estimate_) { |
124 BWE_TEST_LOGGING_PLOT(0, estimate_log_prefix_, | 124 BWE_TEST_LOGGING_PLOT(0, estimate_log_prefix_, |
125 clock_.TimeInMilliseconds(), estimated_kbps); | 125 clock_.TimeInMilliseconds(), estimated_kbps); |
126 } | 126 } |
127 } | 127 } |
128 return feedback; | 128 return feedback; |
129 } | 129 } |
130 | 130 |
131 void RembReceiver::OnReceiveBitrateChanged( | 131 void RembReceiver::OnReceiveBitrateChanged(const std::vector<uint32_t>& ssrcs, |
132 const std::vector<unsigned int>& ssrcs, | 132 uint32_t bitrate) {} |
133 unsigned int bitrate) { | |
134 } | |
135 | 133 |
136 RTCPReportBlock RembReceiver::BuildReportBlock( | 134 RTCPReportBlock RembReceiver::BuildReportBlock( |
137 StreamStatistician* statistician) { | 135 StreamStatistician* statistician) { |
138 RTCPReportBlock report_block; | 136 RTCPReportBlock report_block; |
139 RtcpStatistics stats; | 137 RtcpStatistics stats; |
140 if (!statistician->GetStatistics(&stats, true)) | 138 if (!statistician->GetStatistics(&stats, true)) |
141 return report_block; | 139 return report_block; |
142 report_block.fractionLost = stats.fraction_lost; | 140 report_block.fractionLost = stats.fraction_lost; |
143 report_block.cumulativeLost = stats.cumulative_lost; | 141 report_block.cumulativeLost = stats.cumulative_lost; |
144 report_block.extendedHighSeqNum = stats.extended_max_sequence_number; | 142 report_block.extendedHighSeqNum = stats.extended_max_sequence_number; |
145 report_block.jitter = stats.jitter; | 143 report_block.jitter = stats.jitter; |
146 return report_block; | 144 return report_block; |
147 } | 145 } |
148 | 146 |
149 bool RembReceiver::LatestEstimate(uint32_t* estimate_bps) { | 147 bool RembReceiver::LatestEstimate(uint32_t* estimate_bps) { |
150 if (latest_estimate_bps_ < 0) { | 148 if (latest_estimate_bps_ < 0) { |
151 std::vector<unsigned int> ssrcs; | 149 std::vector<uint32_t> ssrcs; |
152 unsigned int bps = 0; | 150 uint32_t bps = 0; |
153 if (!estimator_->LatestEstimate(&ssrcs, &bps)) { | 151 if (!estimator_->LatestEstimate(&ssrcs, &bps)) { |
154 return false; | 152 return false; |
155 } | 153 } |
156 latest_estimate_bps_ = bps; | 154 latest_estimate_bps_ = bps; |
157 } | 155 } |
158 *estimate_bps = latest_estimate_bps_; | 156 *estimate_bps = latest_estimate_bps_; |
159 return true; | 157 return true; |
160 } | 158 } |
161 | 159 |
162 } // namespace bwe | 160 } // namespace bwe |
163 } // namespace testing | 161 } // namespace testing |
164 } // namespace webrtc | 162 } // namespace webrtc |
OLD | NEW |