From aee3c6394a367abf283936cb8b8bd85ed028c050 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Mon, 11 Jan 2010 15:35:19 -0800 Subject: Squashed commit of the following: commit f81bb1dac5ef107bb0d7d5d756fb1ffa532ba2cc Author: Andreas Huber Date: Mon Jan 11 14:55:56 2010 -0800 Support for duration metadata, midi and ogg-vorbis files (in mediascanner) commit 0b1385a0dc156ce27985a1ff757c4c142fd7ec39 Author: Andreas Huber Date: Mon Jan 11 14:20:45 2010 -0800 Refactor meta data logic. Container specific metadata is now also returned by the MediaExtractor. commit f9818dfac39c96e5fefe8c8295e60580692d5990 Author: Andreas Huber Date: Fri Jan 8 14:26:09 2010 -0800 A first pass at supporting metadata through ID3 tags. commit 476e9e253633336ab790f943e2d6c0cd8991d76a Author: Andreas Huber Date: Thu Jan 7 15:48:44 2010 -0800 Initial checkin of ID3 (V2.2 and V2.3) parser for use in stagefright. related-to-bug: 2295456 --- include/media/stagefright/DataSource.h | 2 ++ include/media/stagefright/MediaExtractor.h | 4 ++++ include/media/stagefright/MetaData.h | 9 +++++++++ 3 files changed, 15 insertions(+) (limited to 'include') diff --git a/include/media/stagefright/DataSource.h b/include/media/stagefright/DataSource.h index b843cd9..f88666a 100644 --- a/include/media/stagefright/DataSource.h +++ b/include/media/stagefright/DataSource.h @@ -31,6 +31,8 @@ class String8; class DataSource : public RefBase { public: + static sp CreateFromURI(const char *uri); + DataSource() {} virtual status_t initCheck() const = 0; diff --git a/include/media/stagefright/MediaExtractor.h b/include/media/stagefright/MediaExtractor.h index d56d4b3..4bc996e 100644 --- a/include/media/stagefright/MediaExtractor.h +++ b/include/media/stagefright/MediaExtractor.h @@ -43,6 +43,10 @@ public: virtual sp getTrackMetaData( size_t index, uint32_t flags = 0) = 0; + // Return container specific meta-data. The default implementation + // returns an empty metadata object. + virtual sp getMetaData(); + protected: MediaExtractor() {} virtual ~MediaExtractor() {} diff --git a/include/media/stagefright/MetaData.h b/include/media/stagefright/MetaData.h index c6ac6c2..ef30b02 100644 --- a/include/media/stagefright/MetaData.h +++ b/include/media/stagefright/MetaData.h @@ -48,6 +48,15 @@ enum { kKeyBufferID = 'bfID', kKeyMaxInputSize = 'inpS', kKeyThumbnailTime = 'thbT', // int64_t (usecs) + + kKeyAlbum = 'albu', // cstring + kKeyArtist = 'arti', // cstring + kKeyComposer = 'comp', // cstring + kKeyGenre = 'genr', // cstring + kKeyTitle = 'titl', // cstring + kKeyYear = 'year', // cstring + kKeyAlbumArt = 'albA', // compressed image data + kKeyAlbumArtMIME = 'alAM', // cstring }; enum { -- cgit v1.1