summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/include/NuCachedSource2.h
diff options
context:
space:
mode:
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);