summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/NuCachedSource2.cpp
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-05-25 19:37:03 -0700
committerJames Dong <jdong@google.com>2011-05-31 15:23:25 -0700
commit5b1b8a93a07326f1cbc627f09e02988375189e0a (patch)
tree1da7ba8c401fb96b4de5fab790fba8e51eea78f6 /media/libstagefright/NuCachedSource2.cpp
parent65580f9adf6c4d98449ad0716488f9fe3869aa5a (diff)
downloadframeworks_av-5b1b8a93a07326f1cbc627f09e02988375189e0a.zip
frameworks_av-5b1b8a93a07326f1cbc627f09e02988375189e0a.tar.gz
frameworks_av-5b1b8a93a07326f1cbc627f09e02988375189e0a.tar.bz2
Send estimated bandwidth value as informational event when cache fetcher pauses
o Application can make informed decision about the available network bandwidth when cache fetcher pauses. o Application can also adjust how frequently the bandwidth is estimated within a range from one second to one minute. Change-Id: I90068001343e79da1886de03c565537787e1580b
Diffstat (limited to 'media/libstagefright/NuCachedSource2.cpp')
-rw-r--r--media/libstagefright/NuCachedSource2.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/media/libstagefright/NuCachedSource2.cpp b/media/libstagefright/NuCachedSource2.cpp
index 81f2e47..b2ed427 100644
--- a/media/libstagefright/NuCachedSource2.cpp
+++ b/media/libstagefright/NuCachedSource2.cpp
@@ -19,6 +19,7 @@
#include <utils/Log.h>
#include "include/NuCachedSource2.h"
+#include "include/HTTPBase.h"
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/foundation/AMessage.h>
@@ -201,6 +202,16 @@ NuCachedSource2::~NuCachedSource2() {
mCache = NULL;
}
+status_t NuCachedSource2::getEstimatedBandwidthKbps(int32_t *kbps) {
+ HTTPBase* source = static_cast<HTTPBase *>(mSource.get());
+ return source->getEstimatedBandwidthKbps(kbps);
+}
+
+status_t NuCachedSource2::setCacheStatCollectFreq(int32_t freqMs) {
+ HTTPBase *source = static_cast<HTTPBase *>(mSource.get());
+ return source->setBandwidthStatCollectFreq(freqMs);
+}
+
status_t NuCachedSource2::initCheck() const {
return mSource->initCheck();
}