From 7a69aeffda29bd1a7ebc5993eeb4e9ee224f096a Mon Sep 17 00:00:00 2001 From: repo sync Date: Thu, 23 Sep 2010 05:46:01 +0800 Subject: RTP: Add log throttle for "no data". Change-Id: I14d9886a40fa780514cbc6c5bac6fb2a670f55f4 --- voip/jni/rtp/AudioGroup.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'voip/jni/rtp/AudioGroup.cpp') diff --git a/voip/jni/rtp/AudioGroup.cpp b/voip/jni/rtp/AudioGroup.cpp index 726e98b..7cf0613 100644 --- a/voip/jni/rtp/AudioGroup.cpp +++ b/voip/jni/rtp/AudioGroup.cpp @@ -104,6 +104,7 @@ private: int mSampleRate; int mSampleCount; int mInterval; + int mLogThrottle; int16_t *mBuffer; int mBufferMask; @@ -278,7 +279,10 @@ void AudioStream::encode(int tick, AudioStream *chain) chain = chain->mNext; } if (!mixed) { - LOGD("stream[%d] no data", mSocket); + if ((mTick ^ mLogThrottle) >> 10) { + mLogThrottle = mTick; + LOGD("stream[%d] no data", mSocket); + } return; } -- cgit v1.1