Further cleanup of OverUseDetector. Removed member no longer used.
BUG= TEST= Review URL: http://webrtc-codereview.appspot.com/344007 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1377 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -23,15 +23,6 @@
|
|||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
enum RateControlRegion;
|
enum RateControlRegion;
|
||||||
|
|
||||||
struct FrameSample
|
|
||||||
{
|
|
||||||
FrameSample() : _size(0), _completeTimeMs(-1), _timestamp(-1) {}
|
|
||||||
|
|
||||||
WebRtc_UWord32 _size;
|
|
||||||
WebRtc_Word64 _completeTimeMs;
|
|
||||||
WebRtc_Word64 _timestamp;
|
|
||||||
};
|
|
||||||
|
|
||||||
class OverUseDetector
|
class OverUseDetector
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -46,39 +37,51 @@ public:
|
|||||||
void SetRateControlRegion(RateControlRegion region);
|
void SetRateControlRegion(RateControlRegion region);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void CompensatedTimeDelta(const FrameSample& currentFrame, const FrameSample& prevFrame, WebRtc_Word64& tDelta,
|
struct FrameSample
|
||||||
double& tsDelta, bool wrapped);
|
{
|
||||||
void UpdateKalman(WebRtc_Word64 tDelta, double tsDelta, WebRtc_UWord32 frameSize, WebRtc_UWord32 prevFrameSize);
|
FrameSample() : _size(0), _completeTimeMs(-1), _timestamp(-1) {}
|
||||||
|
|
||||||
|
WebRtc_UWord32 _size;
|
||||||
|
WebRtc_Word64 _completeTimeMs;
|
||||||
|
WebRtc_Word64 _timestamp;
|
||||||
|
};
|
||||||
|
|
||||||
|
void CompensatedTimeDelta(const FrameSample& currentFrame,
|
||||||
|
const FrameSample& prevFrame,
|
||||||
|
WebRtc_Word64& tDelta,
|
||||||
|
double& tsDelta,
|
||||||
|
bool wrapped);
|
||||||
|
void UpdateKalman(WebRtc_Word64 tDelta,
|
||||||
|
double tsDelta,
|
||||||
|
WebRtc_UWord32 frameSize,
|
||||||
|
WebRtc_UWord32 prevFrameSize);
|
||||||
double UpdateMinFramePeriod(double tsDelta);
|
double UpdateMinFramePeriod(double tsDelta);
|
||||||
void UpdateNoiseEstimate(double residual, double tsDelta, bool stableState);
|
void UpdateNoiseEstimate(double residual, double tsDelta, bool stableState);
|
||||||
BandwidthUsage Detect(double tsDelta);
|
BandwidthUsage Detect(double tsDelta);
|
||||||
double CurrentDrift();
|
double CurrentDrift();
|
||||||
|
|
||||||
bool _firstPacket;
|
bool _firstPacket;
|
||||||
FrameSample _currentFrame;
|
FrameSample _currentFrame;
|
||||||
FrameSample _prevFrame;
|
FrameSample _prevFrame;
|
||||||
|
WebRtc_UWord16 _numOfDeltas;
|
||||||
WebRtc_UWord16 _numOfDeltas;
|
double _slope;
|
||||||
double _slope;
|
double _offset;
|
||||||
double _offset;
|
double _E[2][2];
|
||||||
double _E[2][2];
|
double _processNoise[2];
|
||||||
double _processNoise[2];
|
double _avgNoise;
|
||||||
double _avgNoise;
|
double _varNoise;
|
||||||
double _varNoise;
|
double _threshold;
|
||||||
double _varFsDelta;
|
ListWrapper _tsDeltaHist;
|
||||||
double _threshold;
|
double _prevOffset;
|
||||||
ListWrapper _tsDeltaHist;
|
double _timeOverUsing;
|
||||||
|
WebRtc_UWord16 _overUseCounter;
|
||||||
double _prevOffset;
|
BandwidthUsage _hypothesis;
|
||||||
double _timeOverUsing;
|
|
||||||
WebRtc_UWord16 _overUseCounter;
|
|
||||||
BandwidthUsage _hypothesis;
|
|
||||||
|
|
||||||
#ifdef WEBRTC_BWE_MATLAB
|
#ifdef WEBRTC_BWE_MATLAB
|
||||||
MatlabPlot *_plot1;
|
MatlabPlot* _plot1;
|
||||||
MatlabPlot *_plot2;
|
MatlabPlot* _plot2;
|
||||||
MatlabPlot *_plot3;
|
MatlabPlot* _plot3;
|
||||||
MatlabPlot *_plot4;
|
MatlabPlot* _plot4;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|||||||
Reference in New Issue
Block a user