summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2009-10-06 10:03:12 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2009-10-06 10:03:12 -0700
commit9563e4284869dfb2d4c8d33bae313fcf7f755afb (patch)
tree38abf4cc60ceebaf8b3548f28978fb92eb945a74 /include/media
parent6d710778613dbae8956b70fd179cb41ca3ac3248 (diff)
parent10dbb8e97e7a81ca4867663b5517f048820b3094 (diff)
downloadframeworks_av-9563e4284869dfb2d4c8d33bae313fcf7f755afb.zip
frameworks_av-9563e4284869dfb2d4c8d33bae313fcf7f755afb.tar.gz
frameworks_av-9563e4284869dfb2d4c8d33bae313fcf7f755afb.tar.bz2
am a97402e1: am c39d2e3c: Music visualizer support hack. This currently assumes 44k stereo (won\'t crash on other formats, but won\'t give the correct results either), and links statically with libspeex to get FFT data, increasing the size of libmedia by about 45kb.
Merge commit 'a97402e1cbadbdc874afa9ffdbd23f1c62fb8177' into eclair-mr2-plus-aosp * commit 'a97402e1cbadbdc874afa9ffdbd23f1c62fb8177': Music visualizer support hack.
Diffstat (limited to 'include/media')
-rw-r--r--include/media/IMediaPlayerService.h4
-rw-r--r--include/media/mediaplayer.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/include/media/IMediaPlayerService.h b/include/media/IMediaPlayerService.h
index 39b5e57..303444c 100644
--- a/include/media/IMediaPlayerService.h
+++ b/include/media/IMediaPlayerService.h
@@ -43,6 +43,10 @@ public:
virtual sp<IMemory> decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, int* pFormat) = 0;
virtual sp<IMemory> decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, int* pFormat) = 0;
virtual sp<IOMX> createOMX() = 0;
+
+ // Take a peek at currently playing audio, for visualization purposes.
+ // This returns a buffer of 16 bit mono PCM data, or NULL if no visualization buffer is currently available.
+ virtual sp<IMemory> snoop() = 0;
};
// ----------------------------------------------------------------------------
diff --git a/include/media/mediaplayer.h b/include/media/mediaplayer.h
index 3e1b1bf..7132b18 100644
--- a/include/media/mediaplayer.h
+++ b/include/media/mediaplayer.h
@@ -153,6 +153,7 @@ public:
void notify(int msg, int ext1, int ext2);
static sp<IMemory> decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, int* pFormat);
static sp<IMemory> decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, int* pFormat);
+ static int snoop(short *data, int len, int kind);
status_t invoke(const Parcel& request, Parcel *reply);
status_t setMetadataFilter(const Parcel& filter);
status_t getMetadata(bool update_only, bool apply_filter, Parcel *metadata);