diff options
author | Andreas Huber <andih@google.com> | 2010-02-03 11:37:29 -0800 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-02-03 13:24:26 -0800 |
commit | 1862a33b246249630b654182afb5914da3480d4c (patch) | |
tree | 60a1a9875e6c6a1b64aa7685021c18e6ef540884 /include | |
parent | 2eeabb1f98d162786b45a09659674025a0559251 (diff) | |
download | frameworks_av-1862a33b246249630b654182afb5914da3480d4c.zip frameworks_av-1862a33b246249630b654182afb5914da3480d4c.tar.gz frameworks_av-1862a33b246249630b654182afb5914da3480d4c.tar.bz2 |
Fix a deadlock caused by the AudioPlayer notifying the observer that the stream had ended at the same time the observer was shutting down the AudioPlayer.
related-to-bug: 2414536
Diffstat (limited to 'include')
-rw-r--r-- | include/media/stagefright/AudioPlayer.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/include/media/stagefright/AudioPlayer.h b/include/media/stagefright/AudioPlayer.h index 26fcc95..843e051 100644 --- a/include/media/stagefright/AudioPlayer.h +++ b/include/media/stagefright/AudioPlayer.h @@ -41,9 +41,6 @@ public: // Caller retains ownership of "source". void setSource(const sp<MediaSource> &source); - void setListenerCallback( - void (*notify)(void *cookie, int what), void *cookie); - // Return time in us. virtual int64_t getRealTimeUs(); @@ -63,6 +60,9 @@ public: status_t seekTo(int64_t time_us); + bool isSeeking(); + bool reachedEOS(); + private: sp<MediaSource> mSource; AudioTrack *mAudioTrack; @@ -80,13 +80,11 @@ private: int64_t mPositionTimeRealUs; bool mSeeking; + bool mReachedEOS; int64_t mSeekTimeUs; bool mStarted; - void (*mListenerCallback)(void *cookie, int what); - void *mListenerCookie; - sp<MediaPlayerBase::AudioSink> mAudioSink; static void AudioCallback(int event, void *user, void *info); |