summaryrefslogtreecommitdiffstats
path: root/voip/jni/rtp/AudioGroup.cpp
diff options
context:
space:
mode:
authorrepo sync <chiachi@android.com>2010-09-23 05:46:01 +0800
committerrepo sync <chiachi@android.com>2010-09-23 05:46:01 +0800
commit7a69aeffda29bd1a7ebc5993eeb4e9ee224f096a (patch)
tree654939953b30ef5a609c1f7c61271a8bd974ae2e /voip/jni/rtp/AudioGroup.cpp
parent4033a67d0e99d422336574fc5c982d349632b117 (diff)
downloadframeworks_base-7a69aeffda29bd1a7ebc5993eeb4e9ee224f096a.zip
frameworks_base-7a69aeffda29bd1a7ebc5993eeb4e9ee224f096a.tar.gz
frameworks_base-7a69aeffda29bd1a7ebc5993eeb4e9ee224f096a.tar.bz2
RTP: Add log throttle for "no data".
Change-Id: I14d9886a40fa780514cbc6c5bac6fb2a670f55f4
Diffstat (limited to 'voip/jni/rtp/AudioGroup.cpp')
-rw-r--r--voip/jni/rtp/AudioGroup.cpp6
1 files changed, 5 insertions, 1 deletions
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;
}