summaryrefslogtreecommitdiffstats
path: root/include/media/stagefright/AudioSource.h
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2010-09-01 18:48:35 -0700
committerJames Dong <jdong@google.com>2010-09-01 20:45:39 -0700
commit4c23815c3986e50f0cfad3976d748e600f1befa2 (patch)
tree839a922dfe31849499ed1989ad6723a7700d4ae2 /include/media/stagefright/AudioSource.h
parent3424c02e6b931a8bbd651ae75217bebd008b2605 (diff)
downloadframeworks_base-4c23815c3986e50f0cfad3976d748e600f1befa2.zip
frameworks_base-4c23815c3986e50f0cfad3976d748e600f1befa2.tar.gz
frameworks_base-4c23815c3986e50f0cfad3976d748e600f1befa2.tar.bz2
Calculate audio media drift time from AudioSource
The problem was that the time to receive an output buffer from an audio encoder is different because the encoder does not need to read from the source for all output buffers. This leads to large fluctuation in terms of wall clock duration between two neighboring audio sample outputs from the audio encoder. As a result, the media time for the video track after adjustment using the drifting changes wildly sometimes. This patch addresses this issue by only updating the media drift time when an audio source input buffer is read. the wall clock for the audio track is also calculated at the same time when the input audio buffer is read at AudioSource. bug - 2959800 Change-Id: I3174aa182f744784b540f0a7198524d4eee8bd7b
Diffstat (limited to 'include/media/stagefright/AudioSource.h')
-rw-r--r--include/media/stagefright/AudioSource.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/media/stagefright/AudioSource.h b/include/media/stagefright/AudioSource.h
index 1af4254..a5cec78 100644
--- a/include/media/stagefright/AudioSource.h
+++ b/include/media/stagefright/AudioSource.h
@@ -72,6 +72,7 @@ private:
int64_t mPrevSampleTimeUs;
int64_t mTotalLostFrames;
int64_t mPrevLostBytes;
+ int64_t mInitialReadTimeUs;
MediaBufferGroup *mGroup;