Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.cc

Issue 2994633002: Renamed fields in rtp_rtcp_defines.h/RTCPReportBlock (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 if (result.updated) 84 if (result.updated)
85 bitrate_controller_->OnDelayBasedBweResult(result); 85 bitrate_controller_->OnDelayBasedBweResult(result);
86 86
87 if (has_received_ack_) { 87 if (has_received_ack_) {
88 int expected_packets = fb.packet_feedback_vector().back().sequence_number - 88 int expected_packets = fb.packet_feedback_vector().back().sequence_number -
89 last_acked_seq_num_; 89 last_acked_seq_num_;
90 // Assuming no reordering for now. 90 // Assuming no reordering for now.
91 if (expected_packets > 0) { 91 if (expected_packets > 0) {
92 int lost_packets = expected_packets - 92 int lost_packets = expected_packets -
93 static_cast<int>(fb.packet_feedback_vector().size()); 93 static_cast<int>(fb.packet_feedback_vector().size());
94 report_block_.fractionLost = (lost_packets << 8) / expected_packets; 94 report_block_.fraction_lost = (lost_packets << 8) / expected_packets;
95 report_block_.cumulativeLost += lost_packets; 95 report_block_.packets_lost += lost_packets;
96 uint32_t unwrapped = seq_num_unwrapper_.Unwrap( 96 uint32_t unwrapped = seq_num_unwrapper_.Unwrap(
97 packet_feedback_vector.back().sequence_number); 97 packet_feedback_vector.back().sequence_number);
98 report_block_.extendedHighSeqNum = 98 report_block_.extended_highest_sequence_number =
99 std::max(unwrapped, report_block_.extendedHighSeqNum); 99 std::max(unwrapped, report_block_.extended_highest_sequence_number);
100 ReportBlockList report_blocks; 100 ReportBlockList report_blocks;
101 report_blocks.push_back(report_block_); 101 report_blocks.push_back(report_block_);
102 feedback_observer_->OnReceivedRtcpReceiverReport( 102 feedback_observer_->OnReceivedRtcpReceiverReport(
103 report_blocks, rtt_ms, clock_->TimeInMilliseconds()); 103 report_blocks, rtt_ms, clock_->TimeInMilliseconds());
104 } 104 }
105 bitrate_controller_->Process(); 105 bitrate_controller_->Process();
106 106
107 last_acked_seq_num_ = LatestSequenceNumber( 107 last_acked_seq_num_ = LatestSequenceNumber(
108 packet_feedback_vector.back().sequence_number, last_acked_seq_num_); 108 packet_feedback_vector.back().sequence_number, last_acked_seq_num_);
109 } else { 109 } else {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 packet_feedback_vector_.back().arrival_time_ms; 169 packet_feedback_vector_.back().arrival_time_ms;
170 FeedbackPacket* fb = new SendSideBweFeedback( 170 FeedbackPacket* fb = new SendSideBweFeedback(
171 flow_id_, now_ms * 1000, corrected_send_time_ms, packet_feedback_vector_); 171 flow_id_, now_ms * 1000, corrected_send_time_ms, packet_feedback_vector_);
172 packet_feedback_vector_.clear(); 172 packet_feedback_vector_.clear();
173 return fb; 173 return fb;
174 } 174 }
175 175
176 } // namespace bwe 176 } // namespace bwe
177 } // namespace testing 177 } // namespace testing
178 } // namespace webrtc 178 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698