diff options
author | Andreas Huber <andih@google.com> | 2010-10-08 15:21:08 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-10-08 15:25:19 -0700 |
commit | 0dcd837af4169bdb6fb2a0c384722dc4f57433c6 (patch) | |
tree | 44e53d1d603e1d52315add06cc998c2e9fbecc7b /media/libstagefright/AwesomePlayer.cpp | |
parent | c68a48c474f609df3eeb7d9738675d6ac8835e0a (diff) | |
download | frameworks_av-0dcd837af4169bdb6fb2a0c384722dc4f57433c6.zip frameworks_av-0dcd837af4169bdb6fb2a0c384722dc4f57433c6.tar.gz frameworks_av-0dcd837af4169bdb6fb2a0c384722dc4f57433c6.tar.bz2 |
RTSP seeking is now asynchronous, MediaPlayer is not notified that the seek is complete until it actually is. Ignore seek requests on live streams.
Change-Id: Ie61230cd60dd6c682baf72529100369ad6291189
related-to-bug: 3073955
Diffstat (limited to 'media/libstagefright/AwesomePlayer.cpp')
-rw-r--r-- | media/libstagefright/AwesomePlayer.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index 53543b3..ff28f3b 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -876,12 +876,19 @@ status_t AwesomePlayer::seekTo(int64_t timeUs) { return OK; } +// static +void AwesomePlayer::OnRTSPSeekDoneWrapper(void *cookie) { + static_cast<AwesomePlayer *>(cookie)->onRTSPSeekDone(); +} + +void AwesomePlayer::onRTSPSeekDone() { + notifyListener_l(MEDIA_SEEK_COMPLETE); + mSeekNotificationSent = true; +} + status_t AwesomePlayer::seekTo_l(int64_t timeUs) { if (mRTSPController != NULL) { - mRTSPController->seek(timeUs); - - notifyListener_l(MEDIA_SEEK_COMPLETE); - mSeekNotificationSent = true; + mRTSPController->seekAsync(timeUs, OnRTSPSeekDoneWrapper, this); return OK; } |