diff options
author | Andreas Huber <andih@google.com> | 2011-11-17 13:20:16 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-11-17 13:20:16 -0800 |
commit | aa25761114b143ed3182d97004ec1366c2ae850e (patch) | |
tree | 60f713214ef7835ae2815115e017d83b50c2b001 /media | |
parent | a93a7d6d15295e36b54b928bc57f0b5ca239714a (diff) | |
parent | 624efe45671131903fb5165f6133ba39486092ab (diff) | |
download | frameworks_base-aa25761114b143ed3182d97004ec1366c2ae850e.zip frameworks_base-aa25761114b143ed3182d97004ec1366c2ae850e.tar.gz frameworks_base-aa25761114b143ed3182d97004ec1366c2ae850e.tar.bz2 |
am 624efe45: am c1b1709b: Merge "Make sure not to cancel pending seek/EOS notifications on a cache underrun..." into ics-mr1
* commit '624efe45671131903fb5165f6133ba39486092ab':
Make sure not to cancel pending seek/EOS notifications on a cache underrun...
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/AwesomePlayer.cpp | 15 | ||||
-rw-r--r-- | media/libstagefright/include/AwesomePlayer.h | 2 |
2 files changed, 9 insertions, 8 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index d254449..1f225a7 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -224,17 +224,18 @@ AwesomePlayer::~AwesomePlayer() { mClient.disconnect(); } -void AwesomePlayer::cancelPlayerEvents(bool keepBufferingGoing) { +void AwesomePlayer::cancelPlayerEvents(bool keepNotifications) { mQueue.cancelEvent(mVideoEvent->eventID()); mVideoEventPending = false; - mQueue.cancelEvent(mStreamDoneEvent->eventID()); - mStreamDoneEventPending = false; - mQueue.cancelEvent(mCheckAudioStatusEvent->eventID()); - mAudioStatusEventPending = false; mQueue.cancelEvent(mVideoLagEvent->eventID()); mVideoLagEventPending = false; - if (!keepBufferingGoing) { + if (!keepNotifications) { + mQueue.cancelEvent(mStreamDoneEvent->eventID()); + mStreamDoneEventPending = false; + mQueue.cancelEvent(mCheckAudioStatusEvent->eventID()); + mAudioStatusEventPending = false; + mQueue.cancelEvent(mBufferingEvent->eventID()); mBufferingEventPending = false; } @@ -1095,7 +1096,7 @@ status_t AwesomePlayer::pause_l(bool at_eos) { return OK; } - cancelPlayerEvents(true /* keepBufferingGoing */); + cancelPlayerEvents(true /* keepNotifications */); if (mAudioPlayer != NULL && (mFlags & AUDIO_RUNNING)) { if (at_eos) { diff --git a/media/libstagefright/include/AwesomePlayer.h b/media/libstagefright/include/AwesomePlayer.h index c13d6cb..0985f47 100644 --- a/media/libstagefright/include/AwesomePlayer.h +++ b/media/libstagefright/include/AwesomePlayer.h @@ -250,7 +250,7 @@ private: void notifyVideoSize_l(); void seekAudioIfNecessary_l(); - void cancelPlayerEvents(bool keepBufferingGoing = false); + void cancelPlayerEvents(bool keepNotifications = false); void setAudioSource(sp<MediaSource> source); status_t initAudioDecoder(); |