diff options
author | Andreas Huber <andih@google.com> | 2010-01-13 11:25:10 -0800 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-01-13 11:30:34 -0800 |
commit | 1cb02bf661807ffc6525dcc13e16d7ce027bef00 (patch) | |
tree | 989ddb8cf9e9f62e1b3579bac37bab052d996686 /media/libstagefright/WAVExtractor.cpp | |
parent | 5a2ade33fa21dc866a52005c1bbdb8ba7d768ae9 (diff) | |
download | frameworks_base-1cb02bf661807ffc6525dcc13e16d7ce027bef00.zip frameworks_base-1cb02bf661807ffc6525dcc13e16d7ce027bef00.tar.gz frameworks_base-1cb02bf661807ffc6525dcc13e16d7ce027bef00.tar.bz2 |
Support for determining the mime type of media via metadata extraction.
Diffstat (limited to 'media/libstagefright/WAVExtractor.cpp')
-rw-r--r-- | media/libstagefright/WAVExtractor.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/media/libstagefright/WAVExtractor.cpp b/media/libstagefright/WAVExtractor.cpp index 542c764..959a767 100644 --- a/media/libstagefright/WAVExtractor.cpp +++ b/media/libstagefright/WAVExtractor.cpp @@ -82,6 +82,18 @@ WAVExtractor::WAVExtractor(const sp<DataSource> &source) WAVExtractor::~WAVExtractor() { } +sp<MetaData> WAVExtractor::getMetaData() { + sp<MetaData> meta = new MetaData; + + if (mInitCheck != OK) { + return meta; + } + + meta->setCString(kKeyMIMEType, "audio/x-wav"); + + return meta; +} + size_t WAVExtractor::countTracks() { return mInitCheck == OK ? 1 : 0; } |