From b7848f1c442bc8c71020957948d1b003a62a25b7 Mon Sep 17 00:00:00 2001 From: Marco Nelissen Date: Thu, 4 Dec 2014 08:57:56 -0800 Subject: Remove MediaPlayerService::decode() and make SoundPool use MediaCodec for decoding files to PCM. Bug: 18239054 Change-Id: Ia144fc1bbb0d2787638ee972e2224339b4965310 --- media/libmedia/mediaplayer.cpp | 41 ----------------------------------------- 1 file changed, 41 deletions(-) (limited to 'media/libmedia/mediaplayer.cpp') diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp index 9611ac7..05c89ed 100644 --- a/media/libmedia/mediaplayer.cpp +++ b/media/libmedia/mediaplayer.cpp @@ -835,53 +835,12 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) } } -/*static*/ status_t MediaPlayer::decode( - const sp &httpService, - const char* url, - uint32_t *pSampleRate, - int* pNumChannels, - audio_format_t* pFormat, - const sp& heap, - size_t *pSize) -{ - ALOGV("decode(%s)", url); - status_t status; - const sp& service = getMediaPlayerService(); - if (service != 0) { - status = service->decode(httpService, url, pSampleRate, pNumChannels, pFormat, heap, pSize); - } else { - ALOGE("Unable to locate media service"); - status = DEAD_OBJECT; - } - return status; - -} - void MediaPlayer::died() { ALOGV("died"); notify(MEDIA_ERROR, MEDIA_ERROR_SERVER_DIED, 0); } -/*static*/ status_t MediaPlayer::decode(int fd, int64_t offset, int64_t length, - uint32_t *pSampleRate, int* pNumChannels, - audio_format_t* pFormat, - const sp& heap, size_t *pSize) -{ - ALOGV("decode(%d, %" PRId64 ", %" PRId64 ")", fd, offset, length); - status_t status; - const sp& service = getMediaPlayerService(); - if (service != 0) { - status = service->decode(fd, offset, length, pSampleRate, - pNumChannels, pFormat, heap, pSize); - } else { - ALOGE("Unable to locate media service"); - status = DEAD_OBJECT; - } - return status; - -} - status_t MediaPlayer::setNextMediaPlayer(const sp& next) { if (mPlayer == NULL) { return NO_INIT; -- cgit v1.1