From 0dd229bb306df68b88e7419b3cc11fc6175be1da Mon Sep 17 00:00:00 2001 From: Robert Shih Date: Fri, 6 Mar 2015 16:45:59 -0800 Subject: AnotherPacketSource: make getBufferedDurationUs more discontinuity-aware The new getBufferedDurationUs implementation obsoletes the purpose of getEstimatedDurationUs; remove getEstimatedDurationUs and its associated member variables. Finally replace calls to getEstimatedDurationUs with getBufferedDurationUs. Change-Id: I38f20df8e177ffbfe299b203d99076fc98dcd274 --- media/libstagefright/httplive/LiveSession.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'media/libstagefright/httplive') diff --git a/media/libstagefright/httplive/LiveSession.cpp b/media/libstagefright/httplive/LiveSession.cpp index ab5bb3a..9ac764c 100644 --- a/media/libstagefright/httplive/LiveSession.cpp +++ b/media/libstagefright/httplive/LiveSession.cpp @@ -2262,8 +2262,9 @@ bool LiveSession::checkBuffering( continue; } + status_t finalResult; int64_t bufferedDurationUs = - mPacketSources[i]->getEstimatedDurationUs(); + mPacketSources[i]->getBufferedDurationUs(&finalResult); ALOGV("[%s] buffered %lld us", getNameForStream(mPacketSources.keyAt(i)), (long long)bufferedDurationUs); -- cgit v1.1