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

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 ++total_probes_received_; 306 ++total_probes_received_;
307 // Make sure that a probe which updated the bitrate immediately has an 307 // Make sure that a probe which updated the bitrate immediately has an
308 // effect by calling the OnReceiveBitrateChanged callback. 308 // effect by calling the OnReceiveBitrateChanged callback.
309 if (ProcessClusters(now_ms) == ProbeResult::kBitrateUpdated) 309 if (ProcessClusters(now_ms) == ProbeResult::kBitrateUpdated)
310 update_estimate = true; 310 update_estimate = true;
311 } 311 }
312 if (inter_arrival_->ComputeDeltas(timestamp, arrival_time_ms, now_ms, 312 if (inter_arrival_->ComputeDeltas(timestamp, arrival_time_ms, now_ms,
313 payload_size, &ts_delta, &t_delta, 313 payload_size, &ts_delta, &t_delta,
314 &size_delta)) { 314 &size_delta)) {
315 double ts_delta_ms = (1000.0 * ts_delta) / (1 << kInterArrivalShift); 315 double ts_delta_ms = (1000.0 * ts_delta) / (1 << kInterArrivalShift);
316 estimator_->Update(t_delta, ts_delta_ms, size_delta, detector_.State()); 316 estimator_->Update(t_delta, ts_delta_ms, size_delta, detector_.State(),
317 arrival_time_ms);
317 detector_.Detect(estimator_->offset(), ts_delta_ms, 318 detector_.Detect(estimator_->offset(), ts_delta_ms,
318 estimator_->num_of_deltas(), arrival_time_ms); 319 estimator_->num_of_deltas(), arrival_time_ms);
319 } 320 }
320 321
321 if (!update_estimate) { 322 if (!update_estimate) {
322 // Check if it's time for a periodic update or if we should update because 323 // Check if it's time for a periodic update or if we should update because
323 // of an over-use. 324 // of an over-use.
324 if (last_update_ms_ == -1 || 325 if (last_update_ms_ == -1 ||
325 now_ms - last_update_ms_ > remote_rate_.GetFeedbackInterval()) { 326 now_ms - last_update_ms_ > remote_rate_.GetFeedbackInterval()) {
326 update_estimate = true; 327 update_estimate = true;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 return true; 413 return true;
413 } 414 }
414 415
415 void RemoteBitrateEstimatorAbsSendTime::SetMinBitrate(int min_bitrate_bps) { 416 void RemoteBitrateEstimatorAbsSendTime::SetMinBitrate(int min_bitrate_bps) {
416 // Called from both the configuration thread and the network thread. Shouldn't 417 // Called from both the configuration thread and the network thread. Shouldn't
417 // be called from the network thread in the future. 418 // be called from the network thread in the future.
418 rtc::CritScope lock(&crit_); 419 rtc::CritScope lock(&crit_);
419 remote_rate_.SetMinBitrate(min_bitrate_bps); 420 remote_rate_.SetMinBitrate(min_bitrate_bps);
420 } 421 }
421 } // namespace webrtc 422 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698