diff options
author | John Grossman <johngro@google.com> | 2012-08-24 14:47:25 -0700 |
---|---|---|
committer | John Grossman <johngro@google.com> | 2012-09-06 12:33:35 -0700 |
commit | 2e5f22e85d177b34e790f832789d03aee438a7db (patch) | |
tree | 1e41eb4b82919725fcab038d5c158189ef9abf63 /media/libmediaplayerservice/MediaPlayerService.cpp | |
parent | c56857b4cd12cd4bc3361e375f5b7554277ce9d7 (diff) | |
download | frameworks_av-2e5f22e85d177b34e790f832789d03aee438a7db.zip frameworks_av-2e5f22e85d177b34e790f832789d03aee438a7db.tar.gz frameworks_av-2e5f22e85d177b34e790f832789d03aee438a7db.tar.bz2 |
Add a small hook to support gapless in AAH.
Change-Id: Ie07eca6b45142bdd83412ee0e38d732a4c355630
Diffstat (limited to 'media/libmediaplayerservice/MediaPlayerService.cpp')
-rw-r--r-- | media/libmediaplayerservice/MediaPlayerService.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp index 423d6ce..6b57c48 100644 --- a/media/libmediaplayerservice/MediaPlayerService.cpp +++ b/media/libmediaplayerservice/MediaPlayerService.cpp @@ -922,15 +922,22 @@ status_t MediaPlayerService::Client::setNextPlayer(const sp<IMediaPlayer>& playe Mutex::Autolock l(mLock); sp<Client> c = static_cast<Client*>(player.get()); mNextClient = c; - if (mAudioOutput != NULL && c != NULL) { - mAudioOutput->setNextOutput(c->mAudioOutput); - } else { - ALOGE("no current audio output"); + + if (c != NULL) { + if (mAudioOutput != NULL) { + mAudioOutput->setNextOutput(c->mAudioOutput); + } else if ((mPlayer != NULL) && !mPlayer->hardwareOutput()) { + ALOGE("no current audio output"); + } + + if ((mPlayer != NULL) && (mNextClient->getPlayer() != NULL)) { + mPlayer->setNextPlayer(mNextClient->getPlayer()); + } } + return OK; } - status_t MediaPlayerService::Client::seekTo(int msec) { ALOGV("[%d] seekTo(%d)", mConnId, msec); |