summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/CameraSourceTimeLapse.cpp
diff options
context:
space:
mode:
authorPraveen Chavan <pchavan@codeaurora.org>2015-07-27 20:01:35 -0700
committerLinux Build Service Account <lnxbuild@localhost>2015-10-06 03:24:24 -0600
commitc22f84212a7ac2398069fa56b91e1d4d668e8c6e (patch)
treeaf903a94375e2dfb0bbbb98828424845327bd6cd /media/libstagefright/CameraSourceTimeLapse.cpp
parent9c7d957b70a4daa29af48cb4c695bae64eb5bcf1 (diff)
downloadframeworks_av-c22f84212a7ac2398069fa56b91e1d4d668e8c6e.zip
frameworks_av-c22f84212a7ac2398069fa56b91e1d4d668e8c6e.tar.gz
frameworks_av-c22f84212a7ac2398069fa56b91e1d4d668e8c6e.tar.bz2
Stagefright: Do not skip frames in time-lapse-source for high-speed
Avoid the frame-skip logic in time-lapse source if capture-rate exceeds video-fps. Not doing so will drop frames and also cause retrograde timestamps and an assertion in CameraSource. Change-Id: I8420e44ab96484f0d6301c366a24eefc8efeaf0f
Diffstat (limited to 'media/libstagefright/CameraSourceTimeLapse.cpp')
-rw-r--r--media/libstagefright/CameraSourceTimeLapse.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp
index 0acd9d0..873e473 100644
--- a/media/libstagefright/CameraSourceTimeLapse.cpp
+++ b/media/libstagefright/CameraSourceTimeLapse.cpp
@@ -279,7 +279,8 @@ bool CameraSourceTimeLapse::skipFrameAndModifyTimeStamp(int64_t *timestampUs) {
// The first 2 output frames from the encoder are: decoder specific info and
// the compressed video frame data for the first input video frame.
if (mNumFramesEncoded >= 1 && *timestampUs <
- (mLastTimeLapseFrameRealTimestampUs + mTimeBetweenFrameCaptureUs)) {
+ (mLastTimeLapseFrameRealTimestampUs + mTimeBetweenFrameCaptureUs) &&
+ (mTimeBetweenFrameCaptureUs > mTimeBetweenTimeLapseVideoFramesUs + 1)) {
// Skip all frames from last encoded frame until
// sufficient time (mTimeBetweenFrameCaptureUs) has passed.
// Tell the camera to release its recording frame and return.