diff options
author | Andreas Huber <andih@google.com> | 2011-04-01 13:27:42 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2011-04-01 13:27:42 -0700 |
commit | dab59b5a4956b7e9b1ffc64a0676e7990579934e (patch) | |
tree | a3e04ae54025ac2203337679ec0131e229fde609 /media | |
parent | b7006fcd08e263a8441f1030e5e39fd89dad0129 (diff) | |
download | frameworks_av-dab59b5a4956b7e9b1ffc64a0676e7990579934e.zip frameworks_av-dab59b5a4956b7e9b1ffc64a0676e7990579934e.tar.gz frameworks_av-dab59b5a4956b7e9b1ffc64a0676e7990579934e.tar.bz2 |
Remove legacy hack to only drop frames every other late frame
Change-Id: I197e568d292341c330efb394c41aa9af0e74b081
related-to-bug: 4203195
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/AwesomePlayer.cpp | 19 | ||||
-rw-r--r-- | media/libstagefright/include/AwesomePlayer.h | 1 |
2 files changed, 6 insertions, 14 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index 6b0b1b9..f25d498 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -55,7 +55,6 @@ #include <cutils/properties.h> #define USE_SURFACE_ALLOC 1 -#define FRAME_DROP_FREQ 0 namespace android { @@ -1440,7 +1439,6 @@ void AwesomePlayer::onVideoEvent() { if (mFlags & FIRST_FRAME) { mFlags &= ~FIRST_FRAME; - mSinceLastDropped = 0; mTimeSourceDeltaUs = ts->getRealTimeUs() - timeUs; } @@ -1487,17 +1485,13 @@ void AwesomePlayer::onVideoEvent() { if (latenessUs > 40000) { // We're more than 40ms late. - LOGV("we're late by %lld us (%.2f secs)", latenessUs, latenessUs / 1E6); - if ( mSinceLastDropped > FRAME_DROP_FREQ) - { - LOGV("we're late by %lld us (%.2f secs) dropping one after %d frames", latenessUs, latenessUs / 1E6, mSinceLastDropped); - mSinceLastDropped = 0; - mVideoBuffer->release(); - mVideoBuffer = NULL; + LOGV("we're late by %lld us (%.2f secs), dropping frame", + latenessUs, latenessUs / 1E6); + mVideoBuffer->release(); + mVideoBuffer = NULL; - postVideoEvent_l(); - return; - } + postVideoEvent_l(); + return; } if (latenessUs < -10000) { @@ -1515,7 +1509,6 @@ void AwesomePlayer::onVideoEvent() { } if (mVideoRenderer != NULL) { - mSinceLastDropped++; mVideoRenderer->render(mVideoBuffer); } diff --git a/media/libstagefright/include/AwesomePlayer.h b/media/libstagefright/include/AwesomePlayer.h index a9b7ae8..7fd7724 100644 --- a/media/libstagefright/include/AwesomePlayer.h +++ b/media/libstagefright/include/AwesomePlayer.h @@ -163,7 +163,6 @@ private: uint32_t mFlags; uint32_t mExtractorFlags; - uint32_t mSinceLastDropped; int64_t mTimeSourceDeltaUs; int64_t mVideoTimeUs; |