diff options
author | Andreas Huber <andih@google.com> | 2010-10-29 15:47:52 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-11-01 09:35:36 -0700 |
commit | 02a1db7dc1de2f2df306ec10bab992bc8bbaaca8 (patch) | |
tree | f9530443ff87183929d4f997fcc108b0cfa02ce5 /media/libstagefright/AwesomePlayer.cpp | |
parent | 81509a7383ee6c564978afe4e3a0fa1363b88b1e (diff) | |
download | frameworks_av-02a1db7dc1de2f2df306ec10bab992bc8bbaaca8.zip frameworks_av-02a1db7dc1de2f2df306ec10bab992bc8bbaaca8.tar.gz frameworks_av-02a1db7dc1de2f2df306ec10bab992bc8bbaaca8.tar.bz2 |
After seeking display the first new video frame right away without concern for A/V sync. This looks much more responsive to the user.
related-to-bug: 3152363
Change-Id: Ia097bf61ca05e01365357cb23ff83e2ad417f3fd
Diffstat (limited to 'media/libstagefright/AwesomePlayer.cpp')
-rw-r--r-- | media/libstagefright/AwesomePlayer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index 60a41bf..6954e36 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -1298,6 +1298,7 @@ void AwesomePlayer::onVideoEvent() { mVideoTimeUs = timeUs; } + bool wasSeeking = mSeeking; finishSeekIfNecessary(timeUs); TimeSource *ts = (mFlags & AUDIO_AT_EOS) ? &mSystemTimeSource : mTimeSource; @@ -1318,6 +1319,11 @@ void AwesomePlayer::onVideoEvent() { int64_t latenessUs = nowUs - timeUs; + if (wasSeeking) { + // Let's display the first frame after seeking right away. + latenessUs = 0; + } + if (mRTPSession != NULL) { // We'll completely ignore timestamps for gtalk videochat // and we'll play incoming video as fast as we get it. |