| 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 |
| 11 #include <algorithm> | 11 #include <algorithm> |
| 12 | 12 |
| 13 #include "webrtc/modules/remote_bitrate_estimator/test/estimators/remb.h" | 13 #include "webrtc/modules/remote_bitrate_estimator/test/estimators/remb.h" |
| 14 | 14 |
| 15 #include "webrtc/base/common.h" | |
| 16 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" | 15 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" |
| 17 #include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_s
end_time.h" | 16 #include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_s
end_time.h" |
| 18 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h" | 17 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h" |
| 19 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" | 18 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" |
| 20 #include "webrtc/test/gtest.h" | 19 #include "webrtc/test/gtest.h" |
| 21 | 20 |
| 22 namespace webrtc { | 21 namespace webrtc { |
| 23 namespace testing { | 22 namespace testing { |
| 24 namespace bwe { | 23 namespace bwe { |
| 25 | 24 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 StatisticianMap statisticians = recv_stats_->GetActiveStatisticians(); | 112 StatisticianMap statisticians = recv_stats_->GetActiveStatisticians(); |
| 114 RTCPReportBlock report_block; | 113 RTCPReportBlock report_block; |
| 115 if (!statisticians.empty()) { | 114 if (!statisticians.empty()) { |
| 116 latest_report_block_ = BuildReportBlock(statisticians.begin()->second); | 115 latest_report_block_ = BuildReportBlock(statisticians.begin()->second); |
| 117 } | 116 } |
| 118 | 117 |
| 119 feedback = new RembFeedback(flow_id_, now_ms * 1000, last_feedback_ms_, | 118 feedback = new RembFeedback(flow_id_, now_ms * 1000, last_feedback_ms_, |
| 120 estimated_bps, latest_report_block_); | 119 estimated_bps, latest_report_block_); |
| 121 last_feedback_ms_ = now_ms; | 120 last_feedback_ms_ = now_ms; |
| 122 | 121 |
| 122 #if BWE_TEST_LOGGING_COMPILE_TIME_ENABLE |
| 123 double estimated_kbps = static_cast<double>(estimated_bps) / 1000.0; | 123 double estimated_kbps = static_cast<double>(estimated_bps) / 1000.0; |
| 124 RTC_UNUSED(estimated_kbps); | |
| 125 if (plot_estimate_) { | 124 if (plot_estimate_) { |
| 126 BWE_TEST_LOGGING_PLOT(0, estimate_log_prefix_, | 125 BWE_TEST_LOGGING_PLOT(0, estimate_log_prefix_, |
| 127 clock_.TimeInMilliseconds(), estimated_kbps); | 126 clock_.TimeInMilliseconds(), estimated_kbps); |
| 128 } | 127 } |
| 128 #endif |
| 129 } | 129 } |
| 130 return feedback; | 130 return feedback; |
| 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; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 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 |