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

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 const BandwidthUsage prior_state = estimator->detector.State(); 117 const BandwidthUsage prior_state = estimator->detector.State();
118 uint32_t timestamp_delta = 0; 118 uint32_t timestamp_delta = 0;
119 int64_t time_delta = 0; 119 int64_t time_delta = 0;
120 int size_delta = 0; 120 int size_delta = 0;
121 if (estimator->inter_arrival.ComputeDeltas( 121 if (estimator->inter_arrival.ComputeDeltas(
122 rtp_timestamp, arrival_time_ms, now_ms, payload_size, 122 rtp_timestamp, arrival_time_ms, now_ms, payload_size,
123 &timestamp_delta, &time_delta, &size_delta)) { 123 &timestamp_delta, &time_delta, &size_delta)) {
124 double timestamp_delta_ms = timestamp_delta * kTimestampToMs; 124 double timestamp_delta_ms = timestamp_delta * kTimestampToMs;
125 estimator->estimator.Update(time_delta, timestamp_delta_ms, size_delta, 125 estimator->estimator.Update(time_delta, timestamp_delta_ms, size_delta,
126 estimator->detector.State()); 126 estimator->detector.State(), now_ms);
127 estimator->detector.Detect(estimator->estimator.offset(), 127 estimator->detector.Detect(estimator->estimator.offset(),
128 timestamp_delta_ms, 128 timestamp_delta_ms,
129 estimator->estimator.num_of_deltas(), now_ms); 129 estimator->estimator.num_of_deltas(), now_ms);
130 } 130 }
131 if (estimator->detector.State() == kBwOverusing) { 131 if (estimator->detector.State() == kBwOverusing) {
132 rtc::Optional<uint32_t> incoming_bitrate_bps = 132 rtc::Optional<uint32_t> incoming_bitrate_bps =
133 incoming_bitrate_.Rate(now_ms); 133 incoming_bitrate_.Rate(now_ms);
134 if (incoming_bitrate_bps && 134 if (incoming_bitrate_bps &&
135 (prior_state != kBwOverusing || 135 (prior_state != kBwOverusing ||
136 remote_rate_->TimeToReduceFurther(now_ms, *incoming_bitrate_bps))) { 136 remote_rate_->TimeToReduceFurther(now_ms, *incoming_bitrate_bps))) {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 (*ssrcs)[i] = it->first; 249 (*ssrcs)[i] = it->first;
250 } 250 }
251 } 251 }
252 252
253 void RemoteBitrateEstimatorSingleStream::SetMinBitrate(int min_bitrate_bps) { 253 void RemoteBitrateEstimatorSingleStream::SetMinBitrate(int min_bitrate_bps) {
254 CriticalSectionScoped cs(crit_sect_.get()); 254 CriticalSectionScoped cs(crit_sect_.get());
255 remote_rate_->SetMinBitrate(min_bitrate_bps); 255 remote_rate_->SetMinBitrate(min_bitrate_bps);
256 } 256 }
257 257
258 } // namespace webrtc 258 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698