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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 clock_.AdvanceTimeMilliseconds(arrival_time_ms - clock_.TimeInMilliseconds()); | 101 clock_.AdvanceTimeMilliseconds(arrival_time_ms - clock_.TimeInMilliseconds()); |
102 ASSERT_TRUE(arrival_time_ms == clock_.TimeInMilliseconds()); | 102 ASSERT_TRUE(arrival_time_ms == clock_.TimeInMilliseconds()); |
103 | 103 |
104 // Log received packet information. | 104 // Log received packet information. |
105 BweReceiver::ReceivePacket(arrival_time_ms, media_packet); | 105 BweReceiver::ReceivePacket(arrival_time_ms, media_packet); |
106 } | 106 } |
107 | 107 |
108 FeedbackPacket* RembReceiver::GetFeedback(int64_t now_ms) { | 108 FeedbackPacket* RembReceiver::GetFeedback(int64_t now_ms) { |
109 BWE_TEST_LOGGING_CONTEXT("Remb"); | 109 BWE_TEST_LOGGING_CONTEXT("Remb"); |
110 uint32_t estimated_bps = 0; | 110 uint32_t estimated_bps = 0; |
111 RembFeedback* feedback = NULL; | 111 RembFeedback* feedback = nullptr; |
112 if (LatestEstimate(&estimated_bps)) { | 112 if (LatestEstimate(&estimated_bps)) { |
113 StatisticianMap statisticians = recv_stats_->GetActiveStatisticians(); | 113 StatisticianMap statisticians = recv_stats_->GetActiveStatisticians(); |
114 RTCPReportBlock report_block; | 114 RTCPReportBlock report_block; |
115 if (!statisticians.empty()) { | 115 if (!statisticians.empty()) { |
116 latest_report_block_ = BuildReportBlock(statisticians.begin()->second); | 116 latest_report_block_ = BuildReportBlock(statisticians.begin()->second); |
117 } | 117 } |
118 | 118 |
119 feedback = new RembFeedback(flow_id_, now_ms * 1000, last_feedback_ms_, | 119 feedback = new RembFeedback(flow_id_, now_ms * 1000, last_feedback_ms_, |
120 estimated_bps, latest_report_block_); | 120 estimated_bps, latest_report_block_); |
121 last_feedback_ms_ = now_ms; | 121 last_feedback_ms_ = now_ms; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |