diff options
| author | John Grossman <johngro@google.com> | 2012-09-06 12:37:21 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2012-09-06 12:37:21 -0700 |
| commit | 2f8ecbd1d2fab208067d9fa025946e42cf16336e (patch) | |
| tree | d33ed1c72f1c1f337fc9ef94f1796b7c2550e3c6 /media/libmediaplayerservice | |
| parent | 74cc7e8617df27653028f5e5a66471275f1f2355 (diff) | |
| parent | bdfb020790f92a6ab055be9a5eda4646ed197ff3 (diff) | |
| download | frameworks_av-2f8ecbd1d2fab208067d9fa025946e42cf16336e.zip frameworks_av-2f8ecbd1d2fab208067d9fa025946e42cf16336e.tar.gz frameworks_av-2f8ecbd1d2fab208067d9fa025946e42cf16336e.tar.bz2 | |
am bdfb0207: am 2e5f22e8: Add a small hook to support gapless in AAH.
* commit 'bdfb020790f92a6ab055be9a5eda4646ed197ff3':
Add a small hook to support gapless in AAH.
Diffstat (limited to 'media/libmediaplayerservice')
| -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); |
