summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/include/NuCachedSource2.h
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-06-22 08:57:34 -0700
committerAndreas Huber <andih@google.com>2010-06-22 09:54:58 -0700
commita5273ebd1746368662a597643d6701a5046d5c7b (patch)
tree02a0ae5c66fd970081552a4f91511344d51d4a60 /media/libstagefright/include/NuCachedSource2.h
parentc7fa90a661dd9f6107af6a1d9e6dcaa1cb9a34e3 (diff)
downloadframeworks_av-a5273ebd1746368662a597643d6701a5046d5c7b.zip
frameworks_av-a5273ebd1746368662a597643d6701a5046d5c7b.tar.gz
frameworks_av-a5273ebd1746368662a597643d6701a5046d5c7b.tar.bz2
Make the prefetcher read packets from the network after a keep-alive timeout expires regardless of whether its currently actively fetching data or not.
Change-Id: I7d022ac494e1cecdd7f656806b7ed45979c02840
Diffstat (limited to 'media/libstagefright/include/NuCachedSource2.h')
-rw-r--r--media/libstagefright/include/NuCachedSource2.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/media/libstagefright/include/NuCachedSource2.h b/media/libstagefright/include/NuCachedSource2.h
index c30f029..f73e837 100644
--- a/media/libstagefright/include/NuCachedSource2.h
+++ b/media/libstagefright/include/NuCachedSource2.h
@@ -49,9 +49,13 @@ private:
friend struct AHandlerReflector<NuCachedSource2>;
enum {
- kPageSize = 16384,
- kHighWaterThreshold = 3 * 1024 * 1024,
- kLowWaterThreshold = 512 * 1024,
+ kPageSize = 16384,
+ kHighWaterThreshold = 3 * 1024 * 1024,
+ kLowWaterThreshold = 512 * 1024,
+
+ // Read data after a 15 sec timeout whether we're actively
+ // fetching or not.
+ kKeepAliveIntervalUs = 15000000,
};
enum {
@@ -73,6 +77,7 @@ private:
off_t mLastAccessPos;
sp<AMessage> mAsyncResult;
bool mFetching;
+ int64_t mLastFetchTimeUs;
void onMessageReceived(const sp<AMessage> &msg);
void onFetch();