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
commit2c3dc14acb7308570b9d695ba9ac904a9502b043 (patch)
tree56a0b0e4cc5f2cd3a27275d9d0cd34c4401df241 /include/media
parent3f25987d331b1d3585e32131b05351b86ec14b70 (diff)
parenta97402e1cbadbdc874afa9ffdbd23f1c62fb8177 (diff)
downloadframeworks_base-2c3dc14acb7308570b9d695ba9ac904a9502b043.zip
frameworks_base-2c3dc14acb7308570b9d695ba9ac904a9502b043.tar.gz
frameworks_base-2c3dc14acb7308570b9d695ba9ac904a9502b043.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);