diff options
author | Praveen Chavan <pchavan@codeaurora.org> | 2015-09-01 16:38:10 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:24:54 -0600 |
commit | 64559c9a180c3f17722c9849bf8b6bc50cbd989b (patch) | |
tree | df944b3c967460150bf03d0146f65676e0a63fe6 /media/libstagefright/CameraSourceTimeLapse.cpp | |
parent | 4a3c3a9ae68cec2193b724a56faf36863d5bc681 (diff) | |
download | frameworks_av-64559c9a180c3f17722c9849bf8b6bc50cbd989b.zip frameworks_av-64559c9a180c3f17722c9849bf8b6bc50cbd989b.tar.gz frameworks_av-64559c9a180c3f17722c9849bf8b6bc50cbd989b.tar.bz2 |
Stagefright: Update start-time once input-time reaches expected start-time
Not doing so will result in CameraSource always dropping frames since
updated-timestamp (0-based) will never intersect start-timestamp (based
on system-time).
Change-Id: I696aef51398ed59be0bad7e0e6f9a85504c1f408
CRs-Fixed: 899460
Diffstat (limited to 'media/libstagefright/CameraSourceTimeLapse.cpp')
-rw-r--r-- | media/libstagefright/CameraSourceTimeLapse.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp index 873e473..926e95c 100644 --- a/media/libstagefright/CameraSourceTimeLapse.cpp +++ b/media/libstagefright/CameraSourceTimeLapse.cpp @@ -295,6 +295,12 @@ bool CameraSourceTimeLapse::skipFrameAndModifyTimeStamp(int64_t *timestampUs) { mLastTimeLapseFrameRealTimestampUs = *timestampUs; *timestampUs = mLastFrameTimestampUs + mTimeBetweenTimeLapseVideoFramesUs; + // Update start-time once the captured-time reaches the expected start-time. + // Not doing so will result in CameraSource always dropping frames since + // updated-timestamp will never intersect start-timestamp + if ((mNumFramesReceived == 0 && mLastTimeLapseFrameRealTimestampUs >= mStartTimeUs)) { + mStartTimeUs = *timestampUs; + } return false; } return false; |