From e58976901dfc4e3e826956d5aa7edd9fcddea9b2 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Sat, 23 Feb 2013 17:49:44 +0000 Subject: [PATCH] added analyzerconsole --- src/buffer.cpp | 15 +++++++++++++++ src/buffer.h | 1 + src/channel.h | 3 +++ src/client.h | 3 ++- 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/buffer.cpp b/src/buffer.cpp index 381d8009..8a59f6ea 100755 --- a/src/buffer.cpp +++ b/src/buffer.cpp @@ -135,6 +135,21 @@ CNetBufWithStats::CNetBufWithStats() : } } +void CNetBufWithStats::GetErrorRates ( CVector& vecErrRates, + double& dLimit ) +{ + // get all the averages of the error statistic + vecErrRates.Init ( NUM_STAT_SIMULATION_BUFFERS ); + + for ( int i = 0; i < NUM_STAT_SIMULATION_BUFFERS; i++ ) + { + vecErrRates[i] = ErrorRateStatistic[i].GetAverage(); + } + + // get the limit for decision + dLimit = ERROR_RATE_BOUND; +} + void CNetBufWithStats::Init ( const int iNewBlockSize, const int iNewNumBlocks, const bool bPreserve ) diff --git a/src/buffer.h b/src/buffer.h index 630dcbb8..a21879d1 100755 --- a/src/buffer.h +++ b/src/buffer.h @@ -401,6 +401,7 @@ public: virtual bool Get ( CVector& vecbyData ); int GetAutoSetting() { return iCurAutoBufferSizeSetting; } + void GetErrorRates ( CVector& vecErrRates, double& dLimit ); protected: void UpdateAutoSetting(); diff --git a/src/channel.h b/src/channel.h index 6e4a9db8..da01dad6 100755 --- a/src/channel.h +++ b/src/channel.h @@ -123,6 +123,9 @@ Protocol.CreateChanNameMes ( ChInfo.strName ); int GetNetwFrameSizeFact() const { return iNetwFrameSizeFact; } int GetNetwFrameSize() const { return iNetwFrameSize; } + void GetBufErrorRates ( CVector& vecErrRates, double& dLimit ) + { SockBuf.GetErrorRates ( vecErrRates, dLimit ); } + EAudComprType GetAudioCompressionType() { return eAudioCompressionType; } int GetNumAudioChannels() const { return iNumAudioChannels; } diff --git a/src/client.h b/src/client.h index 722b2fa3..15345ddb 100755 --- a/src/client.h +++ b/src/client.h @@ -238,7 +238,8 @@ public: int EstimatedOverallDelay ( const int iPingTimeMs ); - CChannel* GetChannel() { return &Channel; } + void GetBufErrorRates ( CVector& vecErrRates, double& dLimit ) + { Channel.GetBufErrorRates ( vecErrRates, dLimit ); } // settings CVector vstrIPAddress;