diff options
author | Surajit Podder <spodder@codeaurora.org> | 2016-02-01 13:51:18 +0530 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2016-03-08 22:38:03 -0800 |
commit | c3902bb77957a98082d03ec1cf8ff938495a674a (patch) | |
tree | 48e0d1c5d1c40c5178f4da0c777dc56bbe6edab1 /include/media/stagefright | |
parent | 69714d42dc65906f2a94a5e47bea6219ead6fe23 (diff) | |
download | frameworks_av-c3902bb77957a98082d03ec1cf8ff938495a674a.zip frameworks_av-c3902bb77957a98082d03ec1cf8ff938495a674a.tar.gz frameworks_av-c3902bb77957a98082d03ec1cf8ff938495a674a.tar.bz2 |
video: Add metadata support for DataSource
Add meta() API to query and update DataSource
metadata.
Change-Id: Ibc99fbb6b9bdd6ca6a9d0b25883ba5907946a81d
Diffstat (limited to 'include/media/stagefright')
-rw-r--r-- | include/media/stagefright/DataSource.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/media/stagefright/DataSource.h b/include/media/stagefright/DataSource.h index de5ddd3..d627fec 100644 --- a/include/media/stagefright/DataSource.h +++ b/include/media/stagefright/DataSource.h @@ -27,10 +27,10 @@ #include <utils/RefBase.h> #include <utils/threads.h> #include <drm/DrmManagerClient.h> +#include <media/stagefright/foundation/AMessage.h> namespace android { -struct AMessage; struct AString; class IDataSource; struct IMediaHTTPService; @@ -57,7 +57,7 @@ public: static sp<DataSource> CreateMediaHTTP(const sp<IMediaHTTPService> &httpService); static sp<DataSource> CreateFromIDataSource(const sp<IDataSource> &source); - DataSource() {} + DataSource() : mMeta(new AMessage) {} virtual status_t initCheck() const = 0; @@ -108,10 +108,14 @@ public: virtual String8 getMIMEType() const; + virtual sp<AMessage> meta() { return mMeta; } + protected: virtual ~DataSource() {} private: + sp<AMessage> mMeta; + static Mutex gSnifferMutex; static List<SnifferFunc> gSniffers; static List<SnifferFunc> gExtraSniffers; |