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

Side by Side Diff: webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller.h

Issue 2703353002: Change frame length on very low bandwidth. (Closed)
Patch Set: Responsd to comments. Created 3 years, 10 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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 14 matching lines...) Expand all
25 public: 25 public:
26 struct Config { 26 struct Config {
27 struct FrameLengthChange { 27 struct FrameLengthChange {
28 FrameLengthChange(int from_frame_length_ms, int to_frame_length_ms); 28 FrameLengthChange(int from_frame_length_ms, int to_frame_length_ms);
29 bool operator<(const FrameLengthChange& rhs) const; 29 bool operator<(const FrameLengthChange& rhs) const;
30 int from_frame_length_ms; 30 int from_frame_length_ms;
31 int to_frame_length_ms; 31 int to_frame_length_ms;
32 }; 32 };
33 Config(const std::vector<int>& encoder_frame_lengths_ms, 33 Config(const std::vector<int>& encoder_frame_lengths_ms,
34 int initial_frame_length_ms, 34 int initial_frame_length_ms,
35 int min_encoder_bitrate_bps,
35 float fl_increasing_packet_loss_fraction, 36 float fl_increasing_packet_loss_fraction,
36 float fl_decreasing_packet_loss_fraction, 37 float fl_decreasing_packet_loss_fraction,
37 std::map<FrameLengthChange, int> fl_changing_bandwidths_bps); 38 std::map<FrameLengthChange, int> fl_changing_bandwidths_bps);
38 Config(const Config& other); 39 Config(const Config& other);
39 ~Config(); 40 ~Config();
40 std::vector<int> encoder_frame_lengths_ms; 41 std::vector<int> encoder_frame_lengths_ms;
41 int initial_frame_length_ms; 42 int initial_frame_length_ms;
43 int min_encoder_bitrate_bps;
42 // Uplink packet loss fraction below which frame length can increase. 44 // Uplink packet loss fraction below which frame length can increase.
43 float fl_increasing_packet_loss_fraction; 45 float fl_increasing_packet_loss_fraction;
44 // Uplink packet loss fraction below which frame length should decrease. 46 // Uplink packet loss fraction below which frame length should decrease.
45 float fl_decreasing_packet_loss_fraction; 47 float fl_decreasing_packet_loss_fraction;
46 std::map<FrameLengthChange, int> fl_changing_bandwidths_bps; 48 std::map<FrameLengthChange, int> fl_changing_bandwidths_bps;
47 }; 49 };
48 50
49 explicit FrameLengthController(const Config& config); 51 explicit FrameLengthController(const Config& config);
50 52
51 ~FrameLengthController() override; 53 ~FrameLengthController() override;
(...skipping 10 matching lines...) Expand all
62 const AudioNetworkAdaptor::EncoderRuntimeConfig& config) const; 64 const AudioNetworkAdaptor::EncoderRuntimeConfig& config) const;
63 65
64 const Config config_; 66 const Config config_;
65 67
66 std::vector<int>::const_iterator frame_length_ms_; 68 std::vector<int>::const_iterator frame_length_ms_;
67 69
68 rtc::Optional<int> uplink_bandwidth_bps_; 70 rtc::Optional<int> uplink_bandwidth_bps_;
69 71
70 rtc::Optional<float> uplink_packet_loss_fraction_; 72 rtc::Optional<float> uplink_packet_loss_fraction_;
71 73
74 rtc::Optional<size_t> overhead_bytes_per_packet_;
75
72 RTC_DISALLOW_COPY_AND_ASSIGN(FrameLengthController); 76 RTC_DISALLOW_COPY_AND_ASSIGN(FrameLengthController);
73 }; 77 };
74 78
75 } // namespace webrtc 79 } // namespace webrtc
76 80
77 #endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_FRAME_LENGTH_CONTRO LLER_H_ 81 #endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_FRAME_LENGTH_CONTRO LLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698