diff options
author | Jeff Tinker <jtinker@google.com> | 2012-10-01 12:57:48 -0700 |
---|---|---|
committer | Jeff Tinker <jtinker@google.com> | 2012-10-01 13:10:54 -0700 |
commit | a3fafcb4ee6d6344f2b5b602d095a4ffebc8dbb7 (patch) | |
tree | db3023f0669d7fa7a0f198931188da91c3cc23a1 /media/libstagefright/AwesomePlayer.cpp | |
parent | 23f74017a2c457a25382677b6e696c4cfa06cef5 (diff) | |
download | frameworks_av-a3fafcb4ee6d6344f2b5b602d095a4ffebc8dbb7.zip frameworks_av-a3fafcb4ee6d6344f2b5b602d095a4ffebc8dbb7.tar.gz frameworks_av-a3fafcb4ee6d6344f2b5b602d095a4ffebc8dbb7.tar.bz2 |
[WVDRM] Fix for stuttering on low bandwidth
Reintroduces the play/pause rebuffering logic we eliminated
in JB zero day to fix double spins and slow startup - but
activates that logic only based on a comparison of the
current bandwidth measurement and the lowest bitrate track
in the movie.
Needs to be submitted with related changes in /vendor/widevine
bug: 7230071
Change-Id: If4f5ecda36c4858ce8bf5c4abb722f90a329ecdb
Diffstat (limited to 'media/libstagefright/AwesomePlayer.cpp')
-rw-r--r-- | media/libstagefright/AwesomePlayer.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index 9f069ae..0cb378d 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -755,22 +755,18 @@ void AwesomePlayer::onBufferingUpdate() { if ((mFlags & PLAYING) && !eos && (cachedDurationUs < kLowWaterMarkUs)) { modifyFlags(CACHE_UNDERRUN, SET); - if (mWVMExtractor == NULL) { - ALOGI("cache is running low (%.2f secs) , pausing.", - cachedDurationUs / 1E6); - pause_l(); - ensureCacheIsFetching_l(); - } + ALOGI("cache is running low (%.2f secs) , pausing.", + cachedDurationUs / 1E6); + pause_l(); + ensureCacheIsFetching_l(); sendCacheStats(); notifyListener_l(MEDIA_INFO, MEDIA_INFO_BUFFERING_START); } else if (eos || cachedDurationUs > kHighWaterMarkUs) { if (mFlags & CACHE_UNDERRUN) { modifyFlags(CACHE_UNDERRUN, CLEAR); - if (mWVMExtractor == NULL) { - ALOGI("cache has filled up (%.2f secs), resuming.", - cachedDurationUs / 1E6); - play_l(); - } + ALOGI("cache has filled up (%.2f secs), resuming.", + cachedDurationUs / 1E6); + play_l(); } else if (mFlags & PREPARING) { ALOGV("cache has filled up (%.2f secs), prepare is done", cachedDurationUs / 1E6); |