From c5b73e39740be54bf505ac06d2f6e985d51c3d4e Mon Sep 17 00:00:00 2001 From: "stefan@webrtc.org" Date: Tue, 10 Jan 2012 16:42:09 +0000 Subject: [PATCH] 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 --- .../rtp_rtcp/source/overuse_detector.h | 73 ++++++++++--------- 1 file changed, 38 insertions(+), 35 deletions(-) diff --git a/src/modules/rtp_rtcp/source/overuse_detector.h b/src/modules/rtp_rtcp/source/overuse_detector.h index b6b6a147c0..67913785a9 100644 --- a/src/modules/rtp_rtcp/source/overuse_detector.h +++ b/src/modules/rtp_rtcp/source/overuse_detector.h @@ -23,15 +23,6 @@ namespace webrtc { enum RateControlRegion; -struct FrameSample -{ - FrameSample() : _size(0), _completeTimeMs(-1), _timestamp(-1) {} - - WebRtc_UWord32 _size; - WebRtc_Word64 _completeTimeMs; - WebRtc_Word64 _timestamp; -}; - class OverUseDetector { public: @@ -46,39 +37,51 @@ public: void SetRateControlRegion(RateControlRegion region); private: - 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); + struct FrameSample + { + 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); void UpdateNoiseEstimate(double residual, double tsDelta, bool stableState); BandwidthUsage Detect(double tsDelta); double CurrentDrift(); - bool _firstPacket; - FrameSample _currentFrame; - FrameSample _prevFrame; - - WebRtc_UWord16 _numOfDeltas; - double _slope; - double _offset; - double _E[2][2]; - double _processNoise[2]; - double _avgNoise; - double _varNoise; - double _varFsDelta; - double _threshold; - ListWrapper _tsDeltaHist; - - double _prevOffset; - double _timeOverUsing; - WebRtc_UWord16 _overUseCounter; - BandwidthUsage _hypothesis; + bool _firstPacket; + FrameSample _currentFrame; + FrameSample _prevFrame; + WebRtc_UWord16 _numOfDeltas; + double _slope; + double _offset; + double _E[2][2]; + double _processNoise[2]; + double _avgNoise; + double _varNoise; + double _threshold; + ListWrapper _tsDeltaHist; + double _prevOffset; + double _timeOverUsing; + WebRtc_UWord16 _overUseCounter; + BandwidthUsage _hypothesis; #ifdef WEBRTC_BWE_MATLAB - MatlabPlot *_plot1; - MatlabPlot *_plot2; - MatlabPlot *_plot3; - MatlabPlot *_plot4; + MatlabPlot* _plot1; + MatlabPlot* _plot2; + MatlabPlot* _plot3; + MatlabPlot* _plot4; #endif }; } // namespace webrtc