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 | 70d10c0156f5d2d1c639d0ebe62de8ec950d4306 (patch) | |
tree | a30b9816f4aa7185d44cd852e217b2fda2303187 /include/media | |
parent | 3c4a1ebc19abba06af565071c243e55ba6eef585 (diff) | |
download | frameworks_base-70d10c0156f5d2d1c639d0ebe62de8ec950d4306.zip frameworks_base-70d10c0156f5d2d1c639d0ebe62de8ec950d4306.tar.gz frameworks_base-70d10c0156f5d2d1c639d0ebe62de8ec950d4306.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/media')
-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); |