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

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

Issue 2126793002: Reset InterArrival if arrival time clock makes a jump. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix a few test issues. Created 4 years, 5 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
11 #include "webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.h" 11 #include "webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.h"
12 12
13 #include "webrtc/base/logging.h" 13 #include "webrtc/base/logging.h"
14 #include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_s end_time.h" 14 #include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_s end_time.h"
15 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h" 15 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h"
16 16
17 namespace webrtc { 17 namespace webrtc {
18 namespace testing { 18 namespace testing {
19 namespace bwe { 19 namespace bwe {
20 20
21 const int kFeedbackIntervalMs = 50; 21 const int kFeedbackIntervalMs = 50;
22 22
23 FullBweSender::FullBweSender(int kbps, BitrateObserver* observer, Clock* clock) 23 FullBweSender::FullBweSender(int kbps, BitrateObserver* observer, Clock* clock)
24 : bitrate_controller_( 24 : bitrate_controller_(
25 BitrateController::CreateBitrateController(clock, 25 BitrateController::CreateBitrateController(clock,
26 observer, 26 observer,
27 &event_log_)), 27 &event_log_)),
28 rbe_(new RemoteBitrateEstimatorAbsSendTime(this)), 28 rbe_(new RemoteBitrateEstimatorAbsSendTime(this, clock)),
29 feedback_observer_(bitrate_controller_->CreateRtcpBandwidthObserver()), 29 feedback_observer_(bitrate_controller_->CreateRtcpBandwidthObserver()),
30 clock_(clock), 30 clock_(clock),
31 send_time_history_(clock_, 10000), 31 send_time_history_(clock_, 10000),
32 has_received_ack_(false), 32 has_received_ack_(false),
33 last_acked_seq_num_(0), 33 last_acked_seq_num_(0),
34 last_log_time_ms_(0) { 34 last_log_time_ms_(0) {
35 assert(kbps >= kMinBitrateKbps); 35 assert(kbps >= kMinBitrateKbps);
36 assert(kbps <= kMaxBitrateKbps); 36 assert(kbps <= kMaxBitrateKbps);
37 bitrate_controller_->SetStartBitrate(1000 * kbps); 37 bitrate_controller_->SetStartBitrate(1000 * kbps);
38 bitrate_controller_->SetMinMaxBitrate(1000 * kMinBitrateKbps, 38 bitrate_controller_->SetMinMaxBitrate(1000 * kMinBitrateKbps,
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 packet_feedback_vector_.back().arrival_time_ms; 150 packet_feedback_vector_.back().arrival_time_ms;
151 FeedbackPacket* fb = new SendSideBweFeedback( 151 FeedbackPacket* fb = new SendSideBweFeedback(
152 flow_id_, now_ms * 1000, corrected_send_time_ms, packet_feedback_vector_); 152 flow_id_, now_ms * 1000, corrected_send_time_ms, packet_feedback_vector_);
153 packet_feedback_vector_.clear(); 153 packet_feedback_vector_.clear();
154 return fb; 154 return fb;
155 } 155 }
156 156
157 } // namespace bwe 157 } // namespace bwe
158 } // namespace testing 158 } // namespace testing
159 } // namespace webrtc 159 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698