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

Unified Diff: modules/audio_coding/audio_network_adaptor/frame_length_controller.h

Issue 3013613002: Added configurable offsets to the per-packet overhead in ANA. (Closed)
Patch Set: Added conversion to size_t in DCHECK. Created 3 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 side-by-side diff with in-line comments
Download patch
Index: modules/audio_coding/audio_network_adaptor/frame_length_controller.h
diff --git a/modules/audio_coding/audio_network_adaptor/frame_length_controller.h b/modules/audio_coding/audio_network_adaptor/frame_length_controller.h
index bbda77ed525d5a122b47e2063cb9e3595678ada0..c254b3dcf664cbf61b2aff62b24fc353bd1bd80c 100644
--- a/modules/audio_coding/audio_network_adaptor/frame_length_controller.h
+++ b/modules/audio_coding/audio_network_adaptor/frame_length_controller.h
@@ -35,6 +35,8 @@ class FrameLengthController final : public Controller {
int min_encoder_bitrate_bps,
float fl_increasing_packet_loss_fraction,
float fl_decreasing_packet_loss_fraction,
+ int fl_increase_overhead_offset,
+ int fl_decrease_overhead_offset,
std::map<FrameLengthChange, int> fl_changing_bandwidths_bps);
Config(const Config& other);
~Config();
@@ -45,6 +47,10 @@ class FrameLengthController final : public Controller {
float fl_increasing_packet_loss_fraction;
// Uplink packet loss fraction below which frame length should decrease.
float fl_decreasing_packet_loss_fraction;
+ // Offset to apply to overhead calculation when increasing frame length.
+ int fl_increase_overhead_offset;
+ // Offset to apply to overhead calculation when decreasing frame length.
+ int fl_decrease_overhead_offset;
std::map<FrameLengthChange, int> fl_changing_bandwidths_bps;
};
@@ -73,6 +79,10 @@ class FrameLengthController final : public Controller {
rtc::Optional<size_t> overhead_bytes_per_packet_;
+ // True if the previous frame length decision was an increase, otherwise
+ // false.
+ bool prev_decision_increase_ = false;
+
RTC_DISALLOW_COPY_AND_ASSIGN(FrameLengthController);
};

Powered by Google App Engine
This is Rietveld 408576698