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

Unified Diff: webrtc/voice_engine/network_predictor.cc

Issue 2390883004: Hooking up audio network adaptor to VoE. (Closed)
Patch Set: adding a comment Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/voice_engine/network_predictor.h ('k') | webrtc/voice_engine/network_predictor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/network_predictor.cc
diff --git a/webrtc/voice_engine/network_predictor.cc b/webrtc/voice_engine/network_predictor.cc
deleted file mode 100644
index f8fa2e315c6fcade77d838292a716f74c6645aea..0000000000000000000000000000000000000000
--- a/webrtc/voice_engine/network_predictor.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "webrtc/voice_engine/network_predictor.h"
-
-namespace webrtc {
-namespace voe {
-
-NetworkPredictor::NetworkPredictor(Clock* clock)
- : clock_(clock),
- last_loss_rate_update_time_ms_(clock_->TimeInMilliseconds()),
- loss_rate_filter_(new rtc::ExpFilter(0.9999f)) {
-}
-
-uint8_t NetworkPredictor::GetLossRate() {
- float value = loss_rate_filter_->filtered();
- return (value == rtc::ExpFilter::kValueUndefined) ? 0 :
- static_cast<uint8_t>(value + 0.5);
-}
-
-void NetworkPredictor::UpdatePacketLossRate(uint8_t loss_rate) {
- int64_t now_ms = clock_->TimeInMilliseconds();
- // Update the recursive average filter.
- loss_rate_filter_->Apply(
- static_cast<float>(now_ms - last_loss_rate_update_time_ms_),
- static_cast<float>(loss_rate));
- last_loss_rate_update_time_ms_ = now_ms;
-}
-
-} // namespace voe
-} // namespace webrtc
« no previous file with comments | « webrtc/voice_engine/network_predictor.h ('k') | webrtc/voice_engine/network_predictor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698