summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2012-03-06 10:53:39 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-03-06 10:53:39 -0800
commitd1f0023ddf1633eb5d9aa98995086b0fe3080a85 (patch)
tree08770f77620aa707234dfca50e081a8f3dde5b04 /media/libstagefright
parent54682583ba809a315ac1e5437d7f74483e6c7ab8 (diff)
parent380b70592458ebab017c6521e4b6738955ba48ba (diff)
downloadframeworks_base-d1f0023ddf1633eb5d9aa98995086b0fe3080a85.zip
frameworks_base-d1f0023ddf1633eb5d9aa98995086b0fe3080a85.tar.gz
frameworks_base-d1f0023ddf1633eb5d9aa98995086b0fe3080a85.tar.bz2
Merge "MediaPlayerService: fix AudioSink latency"
Diffstat (limited to 'media/libstagefright')
-rw-r--r--media/libstagefright/AudioPlayer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/media/libstagefright/AudioPlayer.cpp b/media/libstagefright/AudioPlayer.cpp
index 9427ef7..650b6c4 100644
--- a/media/libstagefright/AudioPlayer.cpp
+++ b/media/libstagefright/AudioPlayer.cpp
@@ -427,6 +427,12 @@ size_t AudioPlayer::fillBuffer(void *data, size_t size) {
break;
}
+ if (mAudioSink != NULL) {
+ mLatencyUs = (int64_t)mAudioSink->latency() * 1000;
+ } else {
+ mLatencyUs = (int64_t)mAudioTrack->latency() * 1000;
+ }
+
CHECK(mInputBuffer->meta_data()->findInt64(
kKeyTime, &mPositionTimeMediaUs));