From 62f7ffe106a7126ef31b199552c5cfc6599bc3d1 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Thu, 6 May 2010 10:18:05 -0700 Subject: Disable vorbis seek when streaming from localhost. Change-Id: Icda523ae1c89e26482f1c1767fe3a8b9222bb30f related-to-bug: 2654400 --- include/media/stagefright/DataSource.h | 3 ++- include/media/stagefright/HTTPDataSource.h | 4 +--- include/media/stagefright/MediaExtractor.h | 10 ++++++++++ 3 files changed, 13 insertions(+), 4 deletions(-) (limited to 'include/media') diff --git a/include/media/stagefright/DataSource.h b/include/media/stagefright/DataSource.h index 913da47..6f7dc38 100644 --- a/include/media/stagefright/DataSource.h +++ b/include/media/stagefright/DataSource.h @@ -33,7 +33,8 @@ class String8; class DataSource : public RefBase { public: enum Flags { - kWantsPrefetching = 1, + kWantsPrefetching = 1, + kStreamedFromLocalHost = 2, }; static sp CreateFromURI( diff --git a/include/media/stagefright/HTTPDataSource.h b/include/media/stagefright/HTTPDataSource.h index ea31942..f3b44fd 100644 --- a/include/media/stagefright/HTTPDataSource.h +++ b/include/media/stagefright/HTTPDataSource.h @@ -45,9 +45,7 @@ public: virtual status_t getSize(off_t *size); - virtual uint32_t flags() { - return kWantsPrefetching; - } + virtual uint32_t flags(); protected: virtual ~HTTPDataSource(); diff --git a/include/media/stagefright/MediaExtractor.h b/include/media/stagefright/MediaExtractor.h index 0ed7b40..21338ca 100644 --- a/include/media/stagefright/MediaExtractor.h +++ b/include/media/stagefright/MediaExtractor.h @@ -44,6 +44,16 @@ public: // returns an empty metadata object. virtual sp getMetaData(); + enum Flags { + CAN_SEEK_BACKWARD = 1, + CAN_SEEK_FORWARD = 2, + CAN_PAUSE = 4, + }; + + // If subclasses do _not_ override this, the default is + // CAN_SEEK_BACKWARD | CAN_SEEK_FORWARD | CAN_PAUSE + virtual uint32_t flags() const; + protected: MediaExtractor() {} virtual ~MediaExtractor() {} -- cgit v1.1