Move logic for calculating needed bitrate overhead used by NACK and FEC to VideoSender.

This cl split the class MediaOptimization into two parts. One that deals with frame dropping and stats and one new class called ProtectionBitrateCalculator that deals with  calculating the needed FEC parameters and how much of the estimated network bitrate that can be used by an encoder

Note that the logic of how FEC and the needed bitrates is not changed.

BUG=webrtc:5687
R=asapersson@webrtc.org, stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1972083002 .

Cr-Commit-Position: refs/heads/master@{#13018}
This commit is contained in:
Per
2016-06-02 15:45:42 +02:00
parent 58d4fe7be9
commit 69b332df83
19 changed files with 447 additions and 277 deletions

View File

@ -79,9 +79,9 @@ class VideoSender : public Module {
int32_t SetChannelParameters(uint32_t target_bitrate, // bits/s.
uint8_t lossRate,
int64_t rtt);
// Deprecated:
// TODO(perkj): Remove once no projects use it.
int32_t RegisterProtectionCallback(VCMProtectionCallback* protection);
void SetVideoProtection(VCMVideoProtection videoProtection);
int32_t AddVideoFrame(const VideoFrame& videoFrame,
const CodecSpecificInfo* codecSpecificInfo);
@ -114,7 +114,6 @@ class VideoSender : public Module {
VideoCodec current_codec_;
rtc::ThreadChecker main_thread_;
VCMProtectionCallback* protection_callback_;
rtc::CriticalSection params_crit_;
EncoderParameters encoder_params_ GUARDED_BY(params_crit_);