 Chromium Code Reviews
 Chromium Code Reviews Issue 2669733002:
  Add 120ms frame ability to ANA  (Closed)
    
  
    Issue 2669733002:
  Add 120ms frame ability to ANA  (Closed) 
  | Index: webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller.h | 
| diff --git a/webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller.h b/webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller.h | 
| index ba0c1c2ab2d09a2c76f568d9d925b2974f3ffefe..ef02dfacce651f17fc10043f810b1c01f3d7e1ea 100644 | 
| --- a/webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller.h | 
| +++ b/webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller.h | 
| @@ -24,12 +24,18 @@ namespace webrtc { | 
| class FrameLengthController final : public Controller { | 
| public: | 
| struct Config { | 
| + struct FrameLengthChange { | 
| + FrameLengthChange(int from_frame_length_ms, int to_frame_length_ms); | 
| + ~FrameLengthChange(); | 
| 
kwiberg-webrtc
2017/02/02 12:34:02
This class should have a trivial destructor---remo
 
michaelt
2017/02/02 13:04:34
Done.
 | 
| + bool operator<(const FrameLengthChange& rhs) const; | 
| + int from_frame_length_ms; | 
| + int to_frame_length_ms; | 
| + }; | 
| Config(const std::vector<int>& encoder_frame_lengths_ms, | 
| int initial_frame_length_ms, | 
| float fl_increasing_packet_loss_fraction, | 
| float fl_decreasing_packet_loss_fraction, | 
| - int fl_20ms_to_60ms_bandwidth_bps, | 
| - int fl_60ms_to_20ms_bandwidth_bps); | 
| + const std::map<FrameLengthChange, int>& fl_changing_bandwidths_bps); | 
| Config(const Config& other); | 
| ~Config(); | 
| std::vector<int> encoder_frame_lengths_ms; | 
| @@ -38,11 +44,7 @@ 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; | 
| - // Uplink bandwidth below which frame length can switch from 20ms to 60ms. | 
| - int fl_20ms_to_60ms_bandwidth_bps; | 
| - // Uplink bandwidth above which frame length should switch from 60ms to | 
| - // 20ms. | 
| - int fl_60ms_to_20ms_bandwidth_bps; | 
| + std::map<FrameLengthChange, int> fl_changing_bandwidths_bps; | 
| }; | 
| explicit FrameLengthController(const Config& config); | 
| @@ -54,16 +56,6 @@ class FrameLengthController final : public Controller { | 
| void MakeDecision(AudioNetworkAdaptor::EncoderRuntimeConfig* config) override; | 
| private: | 
| - friend class FrameLengthControllerForTest; | 
| - | 
| - struct FrameLengthChange { | 
| - FrameLengthChange(int from_frame_length_ms, int to_frame_length_ms); | 
| - ~FrameLengthChange(); | 
| - bool operator<(const FrameLengthChange& rhs) const; | 
| - int from_frame_length_ms; | 
| - int to_frame_length_ms; | 
| - }; | 
| - | 
| bool FrameLengthIncreasingDecision( | 
| const AudioNetworkAdaptor::EncoderRuntimeConfig& config) const; | 
| @@ -74,8 +66,6 @@ class FrameLengthController final : public Controller { | 
| std::vector<int>::const_iterator frame_length_ms_; | 
| - std::map<FrameLengthChange, int> frame_length_change_criteria_; | 
| - | 
| rtc::Optional<int> uplink_bandwidth_bps_; | 
| rtc::Optional<float> uplink_packet_loss_fraction_; |