diff options
author | Andreas Huber <andih@google.com> | 2010-01-26 16:20:10 -0800 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-01-26 16:20:10 -0800 |
commit | b9e63830c69231c53dc23a5e29f5b58a1d9d3668 (patch) | |
tree | af36731b61a292c4ad027159b36d090a6b109fba /include/media | |
parent | 03b58bdf0e97f9e3bd247cb731b69fa87a845eeb (diff) | |
download | frameworks_base-b9e63830c69231c53dc23a5e29f5b58a1d9d3668.zip frameworks_base-b9e63830c69231c53dc23a5e29f5b58a1d9d3668.tar.gz frameworks_base-b9e63830c69231c53dc23a5e29f5b58a1d9d3668.tar.bz2 |
Better support for HTTP streaming media content, fixes to the way HTTPDataSource streams the data, prefetcher implementation.
related-to-bug: 2295438
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 &); }; |