diff options
author | Preetam Singh Ranawat <apranawat@codeaurora.org> | 2015-04-30 16:56:51 +0530 |
---|---|---|
committer | Haynes Mathew George <hgeorge@codeaurora.org> | 2015-10-09 19:10:29 -0700 |
commit | 380d397b261d7a12d7d1be10756dc93670aeb017 (patch) | |
tree | 3ebaa75d6158e860cbc2b81e7cf361ff76d0047a /media/libmediaplayerservice/nuplayer/NuPlayer.cpp | |
parent | b3f0834aa448d6b4bf8dbddaff4fbcefa3ede422 (diff) | |
download | frameworks_av-380d397b261d7a12d7d1be10756dc93670aeb017.zip frameworks_av-380d397b261d7a12d7d1be10756dc93670aeb017.tar.gz frameworks_av-380d397b261d7a12d7d1be10756dc93670aeb017.tar.bz2 |
NuPlayer: Fix for PCM offload fallback on BT
-Start the Decoded PCM offload playback on speaker or headset and
connect BT, audio is not played on BT.
-During tear down event on BT connection, instantiation of decoder
is initated before actual shut down of decoder completes.So
decoder is not getting instantiated again after tear down event.
It is a race condition between instantiation of Decoder and
shut down of decoder.
-Defer the instantiation of decoder in intermediate state
CRs-Fixed: 916643, 829392
Change-Id: Ic346cb7bb7b1babe21618daa8f8746c00f4b61b3
Diffstat (limited to 'media/libmediaplayerservice/nuplayer/NuPlayer.cpp')
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayer.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp index 86c35e2..aaf6b9e 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp @@ -131,6 +131,23 @@ private: DISALLOW_EVIL_CONSTRUCTORS(FlushDecoderAction); }; +struct NuPlayer::InstantiateDecoderAction : public Action { + InstantiateDecoderAction(bool audio, sp<DecoderBase> *decoder) + : mAudio(audio), + mdecoder(decoder) { + } + + virtual void execute(NuPlayer *player) { + player->instantiateDecoder(mAudio, mdecoder); + } + +private: + bool mAudio; + sp<DecoderBase> *mdecoder; + + DISALLOW_EVIL_CONSTRUCTORS(InstantiateDecoderAction); +}; + struct NuPlayer::PostMessageAction : public Action { PostMessageAction(const sp<AMessage> &msg) : mMessage(msg) { |