summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/include/NuCachedSource2.h
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-10-12 11:34:37 -0700
committerAndreas Huber <andih@google.com>2010-10-12 14:32:10 -0700
commitbff07d0b22a5ee2d9f044f6cb5e4be1532017ab0 (patch)
tree3377ef036c87095609a0969dbf0b5c93450b8903 /media/libstagefright/include/NuCachedSource2.h
parent2bc940b4f961e588459c83862b2c6bea314a4027 (diff)
downloadframeworks_av-bff07d0b22a5ee2d9f044f6cb5e4be1532017ab0.zip
frameworks_av-bff07d0b22a5ee2d9f044f6cb5e4be1532017ab0.tar.gz
frameworks_av-bff07d0b22a5ee2d9f044f6cb5e4be1532017ab0.tar.bz2
HTTP Live content that are tagged as complete are now seekable.
Change-Id: I9d0d2f009f883e5baf3e9de8c5c0aa05760e4bde related-to-bug: 2368598
Diffstat (limited to 'media/libstagefright/include/NuCachedSource2.h')
-rw-r--r--media/libstagefright/include/NuCachedSource2.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/media/libstagefright/include/NuCachedSource2.h b/media/libstagefright/include/NuCachedSource2.h
index 3a20c16..1fb2088 100644
--- a/media/libstagefright/include/NuCachedSource2.h
+++ b/media/libstagefright/include/NuCachedSource2.h
@@ -42,6 +42,9 @@ struct NuCachedSource2 : public DataSource {
size_t cachedSize();
size_t approxDataRemaining(bool *eos);
+ void suspend();
+ void clearCacheAndResume();
+
protected:
virtual ~NuCachedSource2();
@@ -61,6 +64,7 @@ private:
enum {
kWhatFetchMore = 'fetc',
kWhatRead = 'read',
+ kWhatSuspend = 'susp',
};
sp<DataSource> mSource;
@@ -78,10 +82,12 @@ private:
sp<AMessage> mAsyncResult;
bool mFetching;
int64_t mLastFetchTimeUs;
+ bool mSuspended;
void onMessageReceived(const sp<AMessage> &msg);
void onFetch();
void onRead(const sp<AMessage> &msg);
+ void onSuspend();
void fetchInternal();
ssize_t readInternal(off_t offset, void *data, size_t size);