1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

refine the bandwidth server-side, use kbps limit and sample. 0.9.157

This commit is contained in:
winlin 2014-07-13 10:59:26 +08:00
parent e220596675
commit 539b595604
5 changed files with 34 additions and 56 deletions

View file

@ -53,6 +53,7 @@ public:
* the plan, interval for each check/test packet, in ms
*/
int interval_ms;
public:
/**
* the actual test duration, in ms.
*/
@ -70,9 +71,11 @@ public:
virtual ~SrsBandwidthSample();
public:
/**
* use current sample data to calc the kbps.
* update the bytes and actual duration, then calc the kbps.
* @param _bytes update the sample bytes.
* @param _duration update the actual duration, in ms.
*/
virtual void calc_kbps();
virtual void calc_kbps(int _bytes, int _duration);
};
/**