From bff07d0b22a5ee2d9f044f6cb5e4be1532017ab0 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Tue, 12 Oct 2010 11:34:37 -0700 Subject: HTTP Live content that are tagged as complete are now seekable. Change-Id: I9d0d2f009f883e5baf3e9de8c5c0aa05760e4bde related-to-bug: 2368598 --- media/libstagefright/include/NuCachedSource2.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'media/libstagefright/include/NuCachedSource2.h') 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 mSource; @@ -78,10 +82,12 @@ private: sp mAsyncResult; bool mFetching; int64_t mLastFetchTimeUs; + bool mSuspended; void onMessageReceived(const sp &msg); void onFetch(); void onRead(const sp &msg); + void onSuspend(); void fetchInternal(); ssize_t readInternal(off_t offset, void *data, size_t size); -- cgit v1.1