diff options
author | Andreas Huber <andih@google.com> | 2010-10-10 19:13:48 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-10-10 19:13:48 -0700 |
commit | 250e051e564e3b6f5a88314379d5e145a2b5615f (patch) | |
tree | a74d98e42412b7b1b75df245c06087d1b3a05856 /media/libstagefright/AwesomePlayer.cpp | |
parent | e31aa743466972764f9db5a88a713621ff0a29ae (diff) | |
parent | b4ff90196e0bff3d80bb922933cd646381c2d1b4 (diff) | |
download | frameworks_av-250e051e564e3b6f5a88314379d5e145a2b5615f.zip frameworks_av-250e051e564e3b6f5a88314379d5e145a2b5615f.tar.gz frameworks_av-250e051e564e3b6f5a88314379d5e145a2b5615f.tar.bz2 |
am cac43e8a: am beffefa2: Merge "RTSP seeking is now asynchronous, MediaPlayer is not notified that the seek is complete until it actually is. Ignore seek requests on live streams." into gingerbread
Merge commit 'cac43e8a2ce59c1151d5a2028330b2a769591d22'
* commit 'cac43e8a2ce59c1151d5a2028330b2a769591d22':
RTSP seeking is now asynchronous, MediaPlayer is not notified that the seek is complete until it actually is. Ignore seek requests on live streams.
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 cd26bd6..fcc3e81 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -896,12 +896,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; } |