From 0e8928bf4f2b01b783f6da97d15e8f1abb0fd7d7 Mon Sep 17 00:00:00 2001 From: Marco Nelissen Date: Thu, 8 Jan 2015 13:40:53 -0800 Subject: Replace MidiFile player with a Midi extractor This gets rids of a bunch of special midi handling and replaces it with an extractor that works with NuPlayer and MediaMetadataRetriever. Change-Id: I8d0f5bbdde2ca24267cf4d62ab26afe9630e0217 --- include/media/MediaPlayerInterface.h | 2 -- include/media/MidiIoWrapper.h | 4 ++++ include/media/stagefright/MediaDefs.h | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/media/MediaPlayerInterface.h b/include/media/MediaPlayerInterface.h index cf18a45..0f38c16 100644 --- a/include/media/MediaPlayerInterface.h +++ b/include/media/MediaPlayerInterface.h @@ -43,8 +43,6 @@ class IGraphicBufferProducer; template class SortedVector; enum player_type { - PV_PLAYER = 1, - SONIVOX_PLAYER = 2, STAGEFRIGHT_PLAYER = 3, NU_PLAYER = 4, // Test players are available only in the 'test' and 'eng' builds. diff --git a/include/media/MidiIoWrapper.h b/include/media/MidiIoWrapper.h index caf1d75..e6f8cf7 100644 --- a/include/media/MidiIoWrapper.h +++ b/include/media/MidiIoWrapper.h @@ -19,12 +19,15 @@ #include +#include "media/stagefright/DataSource.h" + namespace android { class MidiIoWrapper : public RefBase { public: MidiIoWrapper(const char *path); MidiIoWrapper(int fd, off64_t offset, int64_t size); + MidiIoWrapper(const sp &source); ~MidiIoWrapper(); @@ -37,6 +40,7 @@ private: int mFd; off64_t mBase; int64_t mLength; + sp mDataSource; EAS_FILE mEasFile; }; diff --git a/include/media/stagefright/MediaDefs.h b/include/media/stagefright/MediaDefs.h index e67d4d5..1f9ff45 100644 --- a/include/media/stagefright/MediaDefs.h +++ b/include/media/stagefright/MediaDefs.h @@ -36,6 +36,7 @@ extern const char *MEDIA_MIMETYPE_AUDIO_AMR_WB; extern const char *MEDIA_MIMETYPE_AUDIO_MPEG; // layer III extern const char *MEDIA_MIMETYPE_AUDIO_MPEG_LAYER_I; extern const char *MEDIA_MIMETYPE_AUDIO_MPEG_LAYER_II; +extern const char *MEDIA_MIMETYPE_AUDIO_MIDI; extern const char *MEDIA_MIMETYPE_AUDIO_AAC; extern const char *MEDIA_MIMETYPE_AUDIO_QCELP; extern const char *MEDIA_MIMETYPE_AUDIO_VORBIS; -- cgit v1.1