diff options
author | Andreas Huber <andih@google.com> | 2010-10-29 15:47:52 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-11-30 11:46:38 -0800 |
commit | 0fb258d6c360c1fca42c594527792314e358ce93 (patch) | |
tree | a871909509998aa45f45908a08ea1ddc95f08f88 | |
parent | b690e55d3f713d68c6ed9654a05a5370bda731d5 (diff) | |
download | frameworks_base-0fb258d6c360c1fca42c594527792314e358ce93.zip frameworks_base-0fb258d6c360c1fca42c594527792314e358ce93.tar.gz frameworks_base-0fb258d6c360c1fca42c594527792314e358ce93.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.
Change-Id: Ifb1f8c91e95a5cafe30ae1035973316c210b98a5
related-to-bug: 3152363
-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 5c423c0..08cf515 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -1248,6 +1248,7 @@ void AwesomePlayer::onVideoEvent() { mVideoTimeUs = timeUs; } + bool wasSeeking = mSeeking; finishSeekIfNecessary(timeUs); TimeSource *ts = (mFlags & AUDIO_AT_EOS) ? &mSystemTimeSource : mTimeSource; @@ -1268,6 +1269,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. |