diff options
author | Chong Zhang <chz@google.com> | 2014-08-05 20:54:44 -0700 |
---|---|---|
committer | Chong Zhang <chz@google.com> | 2014-08-06 15:23:54 -0700 |
commit | 3de157dd8f9cd45bf9b0406268f5830887105ae1 (patch) | |
tree | 4c3423bb8c2005aac32ab3519ad73978d144b8ad /include | |
parent | 92ce4715315bddd158c7d4028556632f0547e3b9 (diff) | |
download | frameworks_av-3de157dd8f9cd45bf9b0406268f5830887105ae1.zip frameworks_av-3de157dd8f9cd45bf9b0406268f5830887105ae1.tar.gz frameworks_av-3de157dd8f9cd45bf9b0406268f5830887105ae1.tar.bz2 |
some fixes for crash when extractor creation fails
- prefetch data for sniffing
- notify error instead of crashing if extractor is NULL
Bug: 16818302
Change-Id: I56ff4996d99ac2811d19d141f7ff7acdd7c1da17
Diffstat (limited to 'include')
-rw-r--r-- | include/media/stagefright/DataSource.h | 8 | ||||
-rw-r--r-- | include/media/stagefright/MediaExtractor.h | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/media/stagefright/DataSource.h b/include/media/stagefright/DataSource.h index f8787dd..3fb9e36 100644 --- a/include/media/stagefright/DataSource.h +++ b/include/media/stagefright/DataSource.h @@ -31,6 +31,7 @@ namespace android { struct AMessage; +struct AString; struct IMediaHTTPService; class String8; @@ -46,7 +47,8 @@ public: static sp<DataSource> CreateFromURI( const sp<IMediaHTTPService> &httpService, const char *uri, - const KeyedVector<String8, String8> *headers = NULL); + const KeyedVector<String8, String8> *headers = NULL, + AString *sniffedMIME = NULL); DataSource() {} @@ -100,6 +102,10 @@ protected: virtual ~DataSource() {} private: + enum { + kDefaultMetaSize = 200000, + }; + static Mutex gSnifferMutex; static List<SnifferFunc> gSniffers; static bool gSniffersRegistered; diff --git a/include/media/stagefright/MediaExtractor.h b/include/media/stagefright/MediaExtractor.h index 3076a96..183933a 100644 --- a/include/media/stagefright/MediaExtractor.h +++ b/include/media/stagefright/MediaExtractor.h @@ -65,6 +65,8 @@ public: virtual char* getDrmTrackInfo(size_t trackID, int *len) { return NULL; } + virtual void setUID(uid_t uid) { + } protected: MediaExtractor() : mIsDrm(false) {} |