am c1b1709b: Merge "Make sure not to cancel pending seek/EOS notifications on a cache underrun..." into ics-mr1
* commit 'c1b1709b2faa985fb9c2b273ca2191b5bfba5fdd': Make sure not to cancel pending seek/EOS notifications on a cache underrun...
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user