Commit 626c57fd authored by Francois Cartegnie's avatar Francois Cartegnie

Revert "demux: adaptative: add inertia to rate based logic"

Fast switching should behave better with async commands

This reverts commit 63506d5a.
parent b31df501
......@@ -21,9 +21,6 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#define __STDC_CONSTANT_MACROS
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
......@@ -43,8 +40,6 @@ RateBasedAdaptationLogic::RateBasedAdaptationLogic (int w, int h) :
{
width = w;
height = h;
cumulatedTime = 0;
stabilizer = 16;
}
BaseRepresentation *RateBasedAdaptationLogic::getCurrentRepresentation(BaseAdaptationSet *adaptSet) const
......@@ -81,21 +76,7 @@ void RateBasedAdaptationLogic::updateDownloadRate(size_t size, mtime_t time)
bpsRemainder = (bpsAvg - current) % bpsSamplecount;
}
cumulatedTime += time;
if(cumulatedTime > 4 * CLOCK_FREQ / stabilizer)
{
if( currentBps <= bpsAvg * 3/4 && stabilizer < 16 )
{
stabilizer++;
}
else if( currentBps > bpsAvg * 3/4 && stabilizer > 1 )
{
stabilizer /= 2;
}
currentBps = bpsAvg * 3/4;
cumulatedTime = 0;
}
currentBps = bpsAvg * 3/4;
}
FixedRateAdaptationLogic::FixedRateAdaptationLogic(size_t bps) :
......
......@@ -49,8 +49,6 @@ namespace adaptative
size_t bpsRemainder;
size_t bpsSamplecount;
size_t currentBps;
mtime_t cumulatedTime;
int stabilizer;
};
class FixedRateAdaptationLogic : public AbstractAdaptationLogic
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment