summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2013-09-24 14:11:46 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-09-24 14:11:46 -0700
commitc666b8f16310fc826471c0fb6ee3f7e4d3a2d067 (patch)
tree50aff85e062cf2016ed3a835a02350dc8e420635 /include/media
parentaab58d138ab3baccbf1badd6cfda1de1bfc24681 (diff)
parent8ee02943b61e0a7dd78e5596720261b185a223d5 (diff)
downloadframeworks_av-c666b8f16310fc826471c0fb6ee3f7e4d3a2d067.zip
frameworks_av-c666b8f16310fc826471c0fb6ee3f7e4d3a2d067.tar.gz
frameworks_av-c666b8f16310fc826471c0fb6ee3f7e4d3a2d067.tar.bz2
am 8ee02943: am 1c7f35d1: Merge "soundpool: allocate shared memory heap by client" into klp-dev
* commit '8ee02943b61e0a7dd78e5596720261b185a223d5': soundpool: allocate shared memory heap by client
Diffstat (limited to 'include/media')
-rw-r--r--include/media/IMediaPlayerService.h8
-rw-r--r--include/media/SoundPool.h3
-rw-r--r--include/media/mediaplayer.h8
3 files changed, 15 insertions, 4 deletions
diff --git a/include/media/IMediaPlayerService.h b/include/media/IMediaPlayerService.h
index fef7af2..2998b37 100644
--- a/include/media/IMediaPlayerService.h
+++ b/include/media/IMediaPlayerService.h
@@ -49,8 +49,12 @@ public:
virtual sp<IMediaMetadataRetriever> createMetadataRetriever() = 0;
virtual sp<IMediaPlayer> create(const sp<IMediaPlayerClient>& client, int audioSessionId = 0) = 0;
- virtual sp<IMemory> decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, audio_format_t* pFormat) = 0;
- virtual sp<IMemory> decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, audio_format_t* pFormat) = 0;
+ virtual status_t decode(const char* url, uint32_t *pSampleRate, int* pNumChannels,
+ audio_format_t* pFormat,
+ const sp<IMemoryHeap>& heap, size_t *pSize) = 0;
+ virtual status_t decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate,
+ int* pNumChannels, audio_format_t* pFormat,
+ const sp<IMemoryHeap>& heap, size_t *pSize) = 0;
virtual sp<IOMX> getOMX() = 0;
virtual sp<ICrypto> makeCrypto() = 0;
virtual sp<IDrm> makeDrm() = 0;
diff --git a/include/media/SoundPool.h b/include/media/SoundPool.h
index 9e5654f..2dd78cc 100644
--- a/include/media/SoundPool.h
+++ b/include/media/SoundPool.h
@@ -22,6 +22,8 @@
#include <utils/Vector.h>
#include <utils/KeyedVector.h>
#include <media/AudioTrack.h>
+#include <binder/MemoryHeapBase.h>
+#include <binder/MemoryBase.h>
namespace android {
@@ -85,6 +87,7 @@ private:
int64_t mLength;
char* mUrl;
sp<IMemory> mData;
+ sp<MemoryHeapBase> mHeap;
};
// stores pending events for stolen channels
diff --git a/include/media/mediaplayer.h b/include/media/mediaplayer.h
index 923c8b2..2177c4c 100644
--- a/include/media/mediaplayer.h
+++ b/include/media/mediaplayer.h
@@ -223,8 +223,12 @@ public:
bool isLooping();
status_t setVolume(float leftVolume, float rightVolume);
void notify(int msg, int ext1, int ext2, const Parcel *obj = NULL);
- static sp<IMemory> decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, audio_format_t* pFormat);
- static sp<IMemory> decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, audio_format_t* pFormat);
+ static status_t decode(const char* url, uint32_t *pSampleRate, int* pNumChannels,
+ audio_format_t* pFormat,
+ const sp<IMemoryHeap>& heap, size_t *pSize);
+ static status_t decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate,
+ int* pNumChannels, audio_format_t* pFormat,
+ const sp<IMemoryHeap>& heap, size_t *pSize);
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);