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

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/overuse_detector_unittest.cc

Issue 2296253002: Enable BWE logging to command line when rtc_enable_bwe_test_logging is set to true (Closed)
Patch Set: adding macro declaration Created 4 years, 3 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 void UpdateDetector(uint32_t rtp_timestamp, int64_t receive_time_ms, 93 void UpdateDetector(uint32_t rtp_timestamp, int64_t receive_time_ms,
94 size_t packet_size) { 94 size_t packet_size) {
95 uint32_t timestamp_delta; 95 uint32_t timestamp_delta;
96 int64_t time_delta; 96 int64_t time_delta;
97 int size_delta; 97 int size_delta;
98 if (inter_arrival_->ComputeDeltas( 98 if (inter_arrival_->ComputeDeltas(
99 rtp_timestamp, receive_time_ms, receive_time_ms, packet_size, 99 rtp_timestamp, receive_time_ms, receive_time_ms, packet_size,
100 &timestamp_delta, &time_delta, &size_delta)) { 100 &timestamp_delta, &time_delta, &size_delta)) {
101 double timestamp_delta_ms = timestamp_delta / 90.0; 101 double timestamp_delta_ms = timestamp_delta / 90.0;
102 overuse_estimator_->Update(time_delta, timestamp_delta_ms, size_delta, 102 overuse_estimator_->Update(time_delta, timestamp_delta_ms, size_delta,
103 overuse_detector_->State()); 103 overuse_detector_->State(), receive_time_ms);
104 overuse_detector_->Detect( 104 overuse_detector_->Detect(
105 overuse_estimator_->offset(), timestamp_delta_ms, 105 overuse_estimator_->offset(), timestamp_delta_ms,
106 overuse_estimator_->num_of_deltas(), receive_time_ms); 106 overuse_estimator_->num_of_deltas(), receive_time_ms);
107 } 107 }
108 } 108 }
109 109
110 int64_t now_ms_; 110 int64_t now_ms_;
111 int64_t receive_time_ms_; 111 int64_t receive_time_ms_;
112 uint32_t rtp_timestamp_; 112 uint32_t rtp_timestamp_;
113 OverUseDetectorOptions options_; 113 OverUseDetectorOptions options_;
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 if (overuse_state == kBwOverusing) { 771 if (overuse_state == kBwOverusing) {
772 overuse_detected = true; 772 overuse_detected = true;
773 } 773 }
774 ++num_deltas; 774 ++num_deltas;
775 now_ms += 5; 775 now_ms += 5;
776 } 776 }
777 EXPECT_TRUE(overuse_detected); 777 EXPECT_TRUE(overuse_detected);
778 } 778 }
779 } // namespace testing 779 } // namespace testing
780 } // namespace webrtc 780 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698