summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-09-28 11:56:39 -0700
committerAndreas Huber <andih@google.com>2010-09-28 11:56:39 -0700
commit2b359ed5b5ba4775609c13408b2cf1336c2cc45b (patch)
tree4d8d85f3ab02bf47e197f645470e48340ce806c7 /include
parent38ae220bb7c06e3cc82f96dada769c6b12a79d09 (diff)
downloadframeworks_base-2b359ed5b5ba4775609c13408b2cf1336c2cc45b.zip
frameworks_base-2b359ed5b5ba4775609c13408b2cf1336c2cc45b.tar.gz
frameworks_base-2b359ed5b5ba4775609c13408b2cf1336c2cc45b.tar.bz2
Instead of constantly polling the AudioPlayer to see if it reached EOS or finished seeking, initiate the notification from the AudioPlayer when the event happens.
Change-Id: I43875b6adaf96d4e982ef3dfc3d6c8f7034ac51d related-to-bug: 3036592
Diffstat (limited to 'include')
-rw-r--r--include/media/stagefright/AudioPlayer.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/media/stagefright/AudioPlayer.h b/include/media/stagefright/AudioPlayer.h
index 9a09586..ed2f7d7 100644
--- a/include/media/stagefright/AudioPlayer.h
+++ b/include/media/stagefright/AudioPlayer.h
@@ -27,6 +27,7 @@ namespace android {
class MediaSource;
class AudioTrack;
+class AwesomePlayer;
class AudioPlayer : public TimeSource {
public:
@@ -35,7 +36,9 @@ public:
SEEK_COMPLETE
};
- AudioPlayer(const sp<MediaPlayerBase::AudioSink> &audioSink);
+ AudioPlayer(const sp<MediaPlayerBase::AudioSink> &audioSink,
+ AwesomePlayer *audioObserver = NULL);
+
virtual ~AudioPlayer();
// Caller retains ownership of "source".
@@ -91,6 +94,7 @@ private:
MediaBuffer *mFirstBuffer;
sp<MediaPlayerBase::AudioSink> mAudioSink;
+ AwesomePlayer *mObserver;
static void AudioCallback(int event, void *user, void *info);
void AudioCallback(int event, void *info);