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

Unified Diff: webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc

Issue 2688613003: Introduce ThresholdCurve (avoids code duplication between PLR/RPLR-based FecController) (Closed)
Patch Set: . Created 3 years, 9 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
Index: webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc
diff --git a/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc b/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc
index 3e4aa2b5414624b7227f358418fbc151295b1dcd..b0d4aed63bc4838d37688b999365f898b39f208c 100644
--- a/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc
+++ b/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc
@@ -20,6 +20,7 @@
#include "webrtc/modules/audio_coding/audio_network_adaptor/fec_controller_plr_based.h"
#include "webrtc/modules/audio_coding/audio_network_adaptor/fec_controller_rplr_based.h"
#include "webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller.h"
+#include "webrtc/modules/audio_coding/audio_network_adaptor/util/threshold_curve.h"
#include "webrtc/system_wrappers/include/clock.h"
#ifdef WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP
@@ -61,16 +62,14 @@ std::unique_ptr<FecControllerPlrBased> CreateFecControllerPlrBased(
return std::unique_ptr<FecControllerPlrBased>(
new FecControllerPlrBased(FecControllerPlrBased::Config(
initial_fec_enabled,
- FecControllerPlrBased::Config::Threshold(
- fec_enabling_threshold.low_bandwidth_bps(),
- fec_enabling_threshold.low_bandwidth_packet_loss(),
- fec_enabling_threshold.high_bandwidth_bps(),
- fec_enabling_threshold.high_bandwidth_packet_loss()),
- FecControllerPlrBased::Config::Threshold(
- fec_disabling_threshold.low_bandwidth_bps(),
- fec_disabling_threshold.low_bandwidth_packet_loss(),
- fec_disabling_threshold.high_bandwidth_bps(),
- fec_disabling_threshold.high_bandwidth_packet_loss()),
+ ThresholdCurve(fec_enabling_threshold.low_bandwidth_bps(),
+ fec_enabling_threshold.low_bandwidth_packet_loss(),
+ fec_enabling_threshold.high_bandwidth_bps(),
+ fec_enabling_threshold.high_bandwidth_packet_loss()),
+ ThresholdCurve(fec_disabling_threshold.low_bandwidth_bps(),
+ fec_disabling_threshold.low_bandwidth_packet_loss(),
+ fec_disabling_threshold.high_bandwidth_bps(),
+ fec_disabling_threshold.high_bandwidth_packet_loss()),
config.time_constant_ms(), clock)));
}
@@ -98,12 +97,12 @@ std::unique_ptr<FecControllerRplrBased> CreateFecControllerRplrBased(
return std::unique_ptr<FecControllerRplrBased>(
new FecControllerRplrBased(FecControllerRplrBased::Config(
initial_fec_enabled,
- FecControllerRplrBased::Config::Threshold(
+ ThresholdCurve(
fec_enabling_threshold.low_bandwidth_bps(),
fec_enabling_threshold.low_bandwidth_recoverable_packet_loss(),
fec_enabling_threshold.high_bandwidth_bps(),
fec_enabling_threshold.high_bandwidth_recoverable_packet_loss()),
- FecControllerRplrBased::Config::Threshold(
+ ThresholdCurve(
fec_disabling_threshold.low_bandwidth_bps(),
fec_disabling_threshold.low_bandwidth_recoverable_packet_loss(),
fec_disabling_threshold.high_bandwidth_bps(),
« no previous file with comments | « webrtc/modules/audio_coding/BUILD.gn ('k') | webrtc/modules/audio_coding/audio_network_adaptor/fec_controller_plr_based.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698