Removing OutputDebugString from rtp_rtcp module
This is in response to WebRTC issue 167. BUG=http://code.google.com/p/webrtc/issues/detail?id=167 Review URL: http://webrtc-codereview.appspot.com/301013 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1119 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
44ef3774ce
commit
bf86c33b0e
@ -216,49 +216,6 @@ bool OverUseDetector::Update(const WebRtcRTPHeader& rtpHeader,
|
||||
|
||||
BandwidthUsage OverUseDetector::State() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
char logStr[256];
|
||||
static BandwidthUsage oldState = kBwNormal;
|
||||
if (_hypothesis != oldState)
|
||||
{
|
||||
switch(_hypothesis)
|
||||
{
|
||||
case kBwOverusing:
|
||||
{
|
||||
#ifdef _WIN32
|
||||
_snprintf(logStr,256, "State: OVER-USING\n");
|
||||
#else
|
||||
snprintf(logStr,256, "State: OVER-USING\n");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
case kBwUnderUsing:
|
||||
{
|
||||
#ifdef _WIN32
|
||||
_snprintf(logStr,256, "State: UNDER-USING\n");
|
||||
#else
|
||||
snprintf(logStr,256, "State: UNDER-USING\n");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
case kBwNormal:
|
||||
{
|
||||
#ifdef _WIN32
|
||||
_snprintf(logStr,256, "State: NORMAL\n");
|
||||
#else
|
||||
snprintf(logStr,256, "State: NORMAL\n");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
#ifdef _WIN32
|
||||
OutputDebugStringA(logStr);
|
||||
#else
|
||||
//TODO
|
||||
#endif
|
||||
oldState = _hypothesis;
|
||||
}
|
||||
#endif
|
||||
return _hypothesis;
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include "module_common_types.h"
|
||||
#include "typedefs.h"
|
||||
#include "list_wrapper.h"
|
||||
#include <stdio.h>
|
||||
|
||||
//#define DEBUG_FILE
|
||||
|
||||
|
@ -211,16 +211,9 @@ WebRtc_UWord32 RemoteRateControl::ChangeBitRate(WebRtc_UWord32 currentBitRate,
|
||||
ChangeRegion(kRcAboveMax);
|
||||
}
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
char logStr[256];
|
||||
#ifdef _WIN32
|
||||
_snprintf(logStr,256, "Response time: %f + %i + 10*33\n", _avgChangePeriod, RTT);
|
||||
OutputDebugStringA(logStr);
|
||||
#else
|
||||
snprintf(logStr,256, "Response time: %f + %i + 10*33\n", _avgChangePeriod, RTT);
|
||||
//TODO
|
||||
#endif
|
||||
#endif
|
||||
WEBRTC_TRACE(kTraceStream, kTraceRtpRtcp, -1,
|
||||
"BWE: Response time: %f + %i + 10*33\n",
|
||||
_avgChangePeriod, RTT);
|
||||
const WebRtc_UWord32 responseTime = static_cast<WebRtc_UWord32>(_avgChangePeriod + 0.5f) + RTT + 300;
|
||||
double alpha = RateIncreaseFactor(nowMS, _lastBitRateChange,
|
||||
responseTime, noiseVar);
|
||||
@ -242,18 +235,6 @@ WebRtc_UWord32 RemoteRateControl::ChangeBitRate(WebRtc_UWord32 currentBitRate,
|
||||
_maxHoldRate = 0;
|
||||
WEBRTC_TRACE(kTraceStream, kTraceRtpRtcp, -1,
|
||||
"BWE: Increase rate to currentBitRate = %u kbps", currentBitRate/1000);
|
||||
#ifdef _DEBUG
|
||||
//char logStr[256];
|
||||
#ifdef _WIN32
|
||||
_snprintf(logStr,256, "New bitRate: %lu\n",
|
||||
static_cast<long unsigned int> (currentBitRate / 1000));
|
||||
OutputDebugStringA(logStr);
|
||||
#else
|
||||
snprintf(logStr,256, "New bitRate: %lu\n",
|
||||
static_cast<long unsigned int> (currentBitRate / 1000));
|
||||
//TODO
|
||||
#endif
|
||||
#endif
|
||||
_lastBitRateChange = nowMS;
|
||||
break;
|
||||
}
|
||||
@ -461,25 +442,16 @@ void RemoteRateControl::ChangeState(RateControlState newState)
|
||||
{
|
||||
_cameFromState = _rcState;
|
||||
_rcState = newState;
|
||||
#ifdef _DEBUG
|
||||
char logStr[256];
|
||||
char state1[15];
|
||||
char state2[15];
|
||||
char state3[15];
|
||||
StateStr(_cameFromState, state1);
|
||||
StateStr(_rcState, state2);
|
||||
StateStr(_currentInput._bwState, state3);
|
||||
#ifdef _WIN32
|
||||
_snprintf(logStr,256, "\t%s => %s due to %s\n", state1, state2, state3);
|
||||
OutputDebugStringA(logStr);
|
||||
#else
|
||||
snprintf(logStr,256, "\t%s => %s due to %s\n", state1, state2, state3);
|
||||
//TODO
|
||||
#endif
|
||||
#endif
|
||||
WEBRTC_TRACE(kTraceStream, kTraceRtpRtcp, -1,
|
||||
"\t%s => %s due to %s\n", state1, state2, state3);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void RemoteRateControl::StateStr(RateControlState state, char* str)
|
||||
{
|
||||
switch (state)
|
||||
@ -517,6 +489,5 @@ void RemoteRateControl::StateStr(BandwidthUsage state, char* str)
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace webrtc
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include "bwe_defines.h"
|
||||
#include "typedefs.h"
|
||||
#include "list_wrapper.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef MATLAB
|
||||
#include "../test/BWEStandAlone/MatlabPlot.h"
|
||||
@ -43,10 +42,8 @@ private:
|
||||
void ChangeState(const RateControlInput& input, WebRtc_Word64 nowMs);
|
||||
void ChangeState(RateControlState newState);
|
||||
void ChangeRegion(RateControlRegion region);
|
||||
#ifdef _DEBUG
|
||||
static void StateStr(RateControlState state, char* str);
|
||||
static void StateStr(BandwidthUsage state, char* str);
|
||||
#endif
|
||||
|
||||
WebRtc_UWord32 _minConfiguredBitRate;
|
||||
WebRtc_UWord32 _maxConfiguredBitRate;
|
||||
|
Loading…
x
Reference in New Issue
Block a user