Revert of Remove VCMQmRobustness. (patchset #1 id:1 of https://codereview.webrtc.org/1917083003/ )

Reason for revert:
Speculative revert for perf regression.

Original issue's description:
> Remove VCMQmRobustness.
>
> Class contained a lot of not-really-wired-up functionality that ended up
> being complicated ways of saying return 1; or return false;. This
> removes this dependency that complicates code readability significantly.
>
> BUG=webrtc:5066
> R=marpan@google.com, marpan@webrtc.org
> TBR=stefan@webrtc.org
>
> Committed: https://crrev.com/73894369791cb5eedc8788baf918ec07d11d351d
> Cr-Commit-Position: refs/heads/master@{#12516}

TBR=marpan@webrtc.org,stefan@webrtc.org,marpan@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:5066, chromium:607838

Review-Url: https://codereview.webrtc.org/1935753002
Cr-Commit-Position: refs/heads/master@{#12572}
This commit is contained in:
pbos
2016-04-29 16:10:27 -07:00
committed by Commit bot
parent 8d37d2941e
commit 602316c3cd
9 changed files with 135 additions and 9 deletions

View File

@ -33,6 +33,13 @@ void UpdateProtectionCallback(
// Get the FEC code rate for Delta frames (set to 0 when NA).
delta_fec_params.fec_rate = selected_method->RequiredProtectionFactorD();
// Get the FEC-UEP protection status for Key frames: UEP on/off.
key_fec_params.use_uep_protection = selected_method->RequiredUepProtectionK();
// Get the FEC-UEP protection status for Delta frames: UEP on/off.
delta_fec_params.use_uep_protection =
selected_method->RequiredUepProtectionD();
// The RTP module currently requires the same |max_fec_frames| for both
// key and delta frames.
delta_fec_params.max_fec_frames = selected_method->MaxFramesFec();
@ -222,6 +229,9 @@ uint32_t MediaOptimization::SetTargetRates(
// Update protection settings, when applicable.
float sent_video_rate_kbps = 0.0f;
if (loss_prot_logic_->SelectedType() != kNone) {
// Update protection method with content metrics.
selected_method->UpdateContentMetrics(content_->ShortTermAvgData());
// Update method will compute the robustness settings for the given
// protection method and the overhead cost
// the protection method is set by the user via SetVideoProtection.