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

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

Issue 2628563003: Propagate packet pacing information to SenTimeHistory (Closed)
Patch Set: Rebase Created 3 years, 10 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 106
107 void SendSideBweSender::OnPacketsSent(const Packets& packets) { 107 void SendSideBweSender::OnPacketsSent(const Packets& packets) {
108 for (Packet* packet : packets) { 108 for (Packet* packet : packets) {
109 if (packet->GetPacketType() == Packet::kMedia) { 109 if (packet->GetPacketType() == Packet::kMedia) {
110 MediaPacket* media_packet = static_cast<MediaPacket*>(packet); 110 MediaPacket* media_packet = static_cast<MediaPacket*>(packet);
111 // TODO(philipel): Add probe_cluster_id to Packet class in order 111 // TODO(philipel): Add probe_cluster_id to Packet class in order
112 // to create tests for probing using cluster ids. 112 // to create tests for probing using cluster ids.
113 send_time_history_.AddAndRemoveOld(media_packet->header().sequenceNumber, 113 send_time_history_.AddAndRemoveOld(media_packet->header().sequenceNumber,
114 media_packet->payload_size(), 114 media_packet->payload_size(),
115 PacketInfo::kNotAProbe); 115 PacedPacketInfo::kNotAProbe);
116 send_time_history_.OnSentPacket(media_packet->header().sequenceNumber, 116 send_time_history_.OnSentPacket(media_packet->header().sequenceNumber,
117 media_packet->sender_timestamp_ms()); 117 media_packet->sender_timestamp_ms());
118 } 118 }
119 } 119 }
120 } 120 }
121 121
122 void SendSideBweSender::OnReceiveBitrateChanged( 122 void SendSideBweSender::OnReceiveBitrateChanged(
123 const std::vector<uint32_t>& ssrcs, 123 const std::vector<uint32_t>& ssrcs,
124 uint32_t bitrate) { 124 uint32_t bitrate) {
125 feedback_observer_->OnReceivedEstimatedBitrate(bitrate); 125 feedback_observer_->OnReceivedEstimatedBitrate(bitrate);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 packet_feedback_vector_.back().arrival_time_ms; 159 packet_feedback_vector_.back().arrival_time_ms;
160 FeedbackPacket* fb = new SendSideBweFeedback( 160 FeedbackPacket* fb = new SendSideBweFeedback(
161 flow_id_, now_ms * 1000, corrected_send_time_ms, packet_feedback_vector_); 161 flow_id_, now_ms * 1000, corrected_send_time_ms, packet_feedback_vector_);
162 packet_feedback_vector_.clear(); 162 packet_feedback_vector_.clear();
163 return fb; 163 return fb;
164 } 164 }
165 165
166 } // namespace bwe 166 } // namespace bwe
167 } // namespace testing 167 } // namespace testing
168 } // namespace webrtc 168 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698