Refactor MediaOptimization protection methods.
Makes MediaOptimization::EnableProtectionMethod significantly less confusing. Also removing some dead methods in VideoSender. BUG= R=mflodman@webrtc.org TBR=stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/42339004 Cr-Commit-Position: refs/heads/master@{#8693} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8693 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -321,15 +321,11 @@ uint32_t MediaOptimization::SetTargetRates(
|
||||
void MediaOptimization::EnableProtectionMethod(bool enable,
|
||||
VCMProtectionMethodEnum method) {
|
||||
CriticalSectionScoped lock(crit_sect_.get());
|
||||
bool updated = false;
|
||||
if (enable) {
|
||||
updated = loss_prot_logic_->SetMethod(method);
|
||||
} else {
|
||||
loss_prot_logic_->RemoveMethod(method);
|
||||
}
|
||||
if (updated) {
|
||||
loss_prot_logic_->UpdateMethod();
|
||||
}
|
||||
if (!enable && loss_prot_logic_->SelectedType() != method)
|
||||
return;
|
||||
if (!enable)
|
||||
method = kNone;
|
||||
loss_prot_logic_->SetMethod(method);
|
||||
}
|
||||
|
||||
uint32_t MediaOptimization::InputFrameRate() {
|
||||
|
Reference in New Issue
Block a user