diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2011-08-29 18:16:03 -0700 |
---|---|---|
committer | Eino-Ville Talvala <etalvala@google.com> | 2011-08-30 10:49:15 -0700 |
commit | df4a59c61103e7e0e9332e167a0be67da5d82ff3 (patch) | |
tree | 2f87a701a3c76fc553c4383d1c913ba867d0bcfa /include/media/stagefright | |
parent | 1b5a697dc5435c76447eb5a2de373f5acdda119e (diff) | |
download | frameworks_av-df4a59c61103e7e0e9332e167a0be67da5d82ff3.zip frameworks_av-df4a59c61103e7e0e9332e167a0be67da5d82ff3.tar.gz frameworks_av-df4a59c61103e7e0e9332e167a0be67da5d82ff3.tar.bz2 |
Fix SurfaceMediaSource timestamp handling.
Was not basing timestamps on startTimeUs.
Now synchronizes properly with audio.
Bug: 4510826
Change-Id: I613db0aa91e51fc75d120e65540e742d8ab2ae43
Diffstat (limited to 'include/media/stagefright')
-rw-r--r-- | include/media/stagefright/SurfaceMediaSource.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/media/stagefright/SurfaceMediaSource.h b/include/media/stagefright/SurfaceMediaSource.h index 74d54d1..f7f0ed7 100644 --- a/include/media/stagefright/SurfaceMediaSource.h +++ b/include/media/stagefright/SurfaceMediaSource.h @@ -347,6 +347,13 @@ private: // encoder int mNumFramesEncoded; + // mFirstFrameTimestamp is the timestamp of the first received frame. + // It is used to offset the output timestamps so recording starts at time 0. + int64_t mFirstFrameTimestamp; + // mStartTimeNs is the start time passed into the source at start, used to + // offset timestamps. + int64_t mStartTimeNs; + // mFrameAvailableCondition condition used to indicate whether there // is a frame available for dequeuing Condition mFrameAvailableCondition; |