diff options
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/stagefright/CachingDataSource.h | 2 | ||||
-rw-r--r-- | include/media/stagefright/DataSource.h | 8 | ||||
-rw-r--r-- | include/media/stagefright/HTTPDataSource.h | 6 |
3 files changed, 16 insertions, 0 deletions
diff --git a/include/media/stagefright/CachingDataSource.h b/include/media/stagefright/CachingDataSource.h index b0fc4b2..30b7ad9 100644 --- a/include/media/stagefright/CachingDataSource.h +++ b/include/media/stagefright/CachingDataSource.h @@ -33,6 +33,8 @@ public: virtual ssize_t readAt(off_t offset, void *data, size_t size); + virtual uint32_t flags(); + protected: virtual ~CachingDataSource(); diff --git a/include/media/stagefright/DataSource.h b/include/media/stagefright/DataSource.h index f88666a..0c0ace0 100644 --- a/include/media/stagefright/DataSource.h +++ b/include/media/stagefright/DataSource.h @@ -31,6 +31,10 @@ class String8; class DataSource : public RefBase { public: + enum Flags { + kWantsPrefetching = 1, + }; + static sp<DataSource> CreateFromURI(const char *uri); DataSource() {} @@ -45,6 +49,10 @@ public: // May return ERROR_UNSUPPORTED. virtual status_t getSize(off_t *size); + virtual uint32_t flags() { + return 0; + } + //////////////////////////////////////////////////////////////////////////// bool sniff(String8 *mimeType, float *confidence); diff --git a/include/media/stagefright/HTTPDataSource.h b/include/media/stagefright/HTTPDataSource.h index d5dc9e6..3075f1c 100644 --- a/include/media/stagefright/HTTPDataSource.h +++ b/include/media/stagefright/HTTPDataSource.h @@ -33,6 +33,10 @@ public: virtual ssize_t readAt(off_t offset, void *data, size_t size); + virtual uint32_t flags() { + return kWantsPrefetching; + } + protected: virtual ~HTTPDataSource(); @@ -52,6 +56,8 @@ private: status_t mInitCheck; + ssize_t sendRangeRequest(size_t offset); + HTTPDataSource(const HTTPDataSource &); HTTPDataSource &operator=(const HTTPDataSource &); }; |