From cd454fa91e9e856bfa5dd161f8e1b4b9a9729eae Mon Sep 17 00:00:00 2001 From: James Dong Date: Thu, 19 May 2011 14:09:27 -0700 Subject: [PATCH] Revert "Add avg bandwidth estimate every 2 seconds - do not merge." This reverts commit ec78f551b575b0274cbe796f8e08a9df1a706680. --- media/libstagefright/NuHTTPDataSource.cpp | 11 ----------- media/libstagefright/include/NuHTTPDataSource.h | 1 - 2 files changed, 12 deletions(-) diff --git a/media/libstagefright/NuHTTPDataSource.cpp b/media/libstagefright/NuHTTPDataSource.cpp index 62fb732569874..bee0d5e030925 100644 --- a/media/libstagefright/NuHTTPDataSource.cpp +++ b/media/libstagefright/NuHTTPDataSource.cpp @@ -100,7 +100,6 @@ NuHTTPDataSource::NuHTTPDataSource(uint32_t flags) mNumBandwidthHistoryItems(0), mTotalTransferTimeUs(0), mTotalTransferBytes(0), - mPrevBandwidthMeasureTimeUs(0), mDecryptHandle(NULL), mDrmManagerClient(NULL) { } @@ -535,16 +534,6 @@ void NuHTTPDataSource::addBandwidthMeasurement_l( mTotalTransferBytes -= entry->mNumBytes; mBandwidthHistory.erase(mBandwidthHistory.begin()); --mNumBandwidthHistoryItems; - int64_t timeNowUs = ALooper::GetNowUs(); - if (timeNowUs - mPrevBandwidthMeasureTimeUs > 2000000LL) { - if (mPrevBandwidthMeasureTimeUs != 0) { - double estimatedBandwidth = - ((double)mTotalTransferBytes * 8E3 / mTotalTransferTimeUs); - LOGI("estimated avg bandwidth is %8.2f kbps in the past %lld us", - estimatedBandwidth, timeNowUs - mPrevBandwidthMeasureTimeUs); - } - mPrevBandwidthMeasureTimeUs = timeNowUs; - } } } diff --git a/media/libstagefright/include/NuHTTPDataSource.h b/media/libstagefright/include/NuHTTPDataSource.h index 0d682340515a4..25695688c6cf5 100644 --- a/media/libstagefright/include/NuHTTPDataSource.h +++ b/media/libstagefright/include/NuHTTPDataSource.h @@ -97,7 +97,6 @@ private: size_t mNumBandwidthHistoryItems; int64_t mTotalTransferTimeUs; size_t mTotalTransferBytes; - int64_t mPrevBandwidthMeasureTimeUs; DecryptHandle *mDecryptHandle; DrmManagerClient *mDrmManagerClient;