video_coding: changing the UpdateMethod function (protection settings).
Review URL: http://webrtc-codereview.appspot.com/126002 git-svn-id: http://webrtc.googlecode.com/svn/trunk@423 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
12f1fc4fe5
commit
06ad81fd58
@ -844,42 +844,14 @@ VCMLossProtectionLogic::UpdateMethod(VCMProtectionMethod *newMethod /*=NULL */)
|
||||
_currentParameters.codecWidth = _codecWidth;
|
||||
_currentParameters.codecHeight = _codecHeight;
|
||||
|
||||
if (newMethod == NULL)
|
||||
// Update to new method, if not NULL
|
||||
if (newMethod != NULL)
|
||||
{
|
||||
VCMProtectionMethod *method;
|
||||
ListItem *item;
|
||||
for (item = _availableMethods.First(); item != NULL;
|
||||
item = _availableMethods.Next(item))
|
||||
{
|
||||
method = static_cast<VCMProtectionMethod *> (item->GetItem());
|
||||
if (method != NULL)
|
||||
{
|
||||
if (method->Type() == kFEC)
|
||||
{
|
||||
_selectedMethod = method;
|
||||
}
|
||||
if (method->Type() == kNACK)
|
||||
{
|
||||
_selectedMethod = method;
|
||||
}
|
||||
if (method->Type() == kNackFec)
|
||||
{
|
||||
_selectedMethod = method;
|
||||
}
|
||||
method->UpdateParameters(&_currentParameters);
|
||||
}
|
||||
}
|
||||
if (_selectedMethod != NULL && _selectedMethod->Type() != kFEC)
|
||||
{
|
||||
_selectedMethod = method;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_selectedMethod = newMethod;
|
||||
_selectedMethod->UpdateParameters(&_currentParameters);
|
||||
}
|
||||
return true;
|
||||
_selectedMethod = newMethod;
|
||||
_selectedMethod->UpdateParameters(&_currentParameters);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
VCMProtectionMethod*
|
||||
|
@ -339,8 +339,7 @@ public:
|
||||
_fecRateDelta = fecRateDelta; }
|
||||
|
||||
// Update the protection methods with the current VCMProtectionParameters
|
||||
// and choose the best method available. The update involves computing the
|
||||
// robustness settings for the protection method.
|
||||
// and set the requested protection settings.
|
||||
//
|
||||
// Input:
|
||||
// - newMethod : If not NULL, this method will be selected.
|
||||
|
Loading…
Reference in New Issue
Block a user