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

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

Issue 2005313003: Propagate probing cluster id to SendTimeHistory. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Test probe_cluster_id in PacketRouterTest. Created 4 years, 6 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } else { 85 } else {
86 last_acked_seq_num_ = packet_feedback_vector.back().sequence_number; 86 last_acked_seq_num_ = packet_feedback_vector.back().sequence_number;
87 has_received_ack_ = true; 87 has_received_ack_ = true;
88 } 88 }
89 } 89 }
90 90
91 void FullBweSender::OnPacketsSent(const Packets& packets) { 91 void FullBweSender::OnPacketsSent(const Packets& packets) {
92 for (Packet* packet : packets) { 92 for (Packet* packet : packets) {
93 if (packet->GetPacketType() == Packet::kMedia) { 93 if (packet->GetPacketType() == Packet::kMedia) {
94 MediaPacket* media_packet = static_cast<MediaPacket*>(packet); 94 MediaPacket* media_packet = static_cast<MediaPacket*>(packet);
95 send_time_history_.AddAndRemoveOld(media_packet->header().sequenceNumber, 95 // TODO(philipel): Add probe_cluster_id to Packet class in order
96 media_packet->payload_size(), 96 // to create tests for probing using cluster ids.
97 packet->paced()); 97 send_time_history_.AddAndRemoveOld(
98 media_packet->header().sequenceNumber, media_packet->payload_size(),
99 packet->paced(), PacketInfo::kNotAProbe);
98 send_time_history_.OnSentPacket(media_packet->header().sequenceNumber, 100 send_time_history_.OnSentPacket(media_packet->header().sequenceNumber,
99 media_packet->sender_timestamp_ms()); 101 media_packet->sender_timestamp_ms());
100 } 102 }
101 } 103 }
102 } 104 }
103 105
104 void FullBweSender::OnReceiveBitrateChanged(const std::vector<uint32_t>& ssrcs, 106 void FullBweSender::OnReceiveBitrateChanged(const std::vector<uint32_t>& ssrcs,
105 uint32_t bitrate) { 107 uint32_t bitrate) {
106 feedback_observer_->OnReceivedEstimatedBitrate(bitrate); 108 feedback_observer_->OnReceivedEstimatedBitrate(bitrate);
107 } 109 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 packet_feedback_vector_.back().arrival_time_ms; 143 packet_feedback_vector_.back().arrival_time_ms;
142 FeedbackPacket* fb = new SendSideBweFeedback( 144 FeedbackPacket* fb = new SendSideBweFeedback(
143 flow_id_, now_ms * 1000, corrected_send_time_ms, packet_feedback_vector_); 145 flow_id_, now_ms * 1000, corrected_send_time_ms, packet_feedback_vector_);
144 packet_feedback_vector_.clear(); 146 packet_feedback_vector_.clear();
145 return fb; 147 return fb;
146 } 148 }
147 149
148 } // namespace bwe 150 } // namespace bwe
149 } // namespace testing 151 } // namespace testing
150 } // namespace webrtc 152 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698