diff options
author | Lajos Molnar <lajos@google.com> | 2015-01-28 21:38:38 -0800 |
---|---|---|
committer | Lajos Molnar <lajos@google.com> | 2015-01-28 21:52:09 -0800 |
commit | f0d689934e70d3e5b3784265e890377db04c7c1d (patch) | |
tree | 92a7f9bf2304a7b1ced4e34c7cca6ddc569b2e55 /media/libstagefright/httplive/LiveSession.cpp | |
parent | c84bc78d4244987268cbe621cecdfb72cbd48dc7 (diff) | |
download | frameworks_av-f0d689934e70d3e5b3784265e890377db04c7c1d.zip frameworks_av-f0d689934e70d3e5b3784265e890377db04c7c1d.tar.gz frameworks_av-f0d689934e70d3e5b3784265e890377db04c7c1d.tar.bz2 |
Revert "HLS: QCom enhancements"
This is to restore patch attributions
This reverts commit f580806d893c4631f5324ff0af5c2db68a40ef42.
Bug: 18821145
Change-Id: Idc49385fffccfde2a3915388fe3fe4e2b740d787
Diffstat (limited to 'media/libstagefright/httplive/LiveSession.cpp')
-rw-r--r-- | media/libstagefright/httplive/LiveSession.cpp | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/media/libstagefright/httplive/LiveSession.cpp b/media/libstagefright/httplive/LiveSession.cpp index 9daab3b..0b18666 100644 --- a/media/libstagefright/httplive/LiveSession.cpp +++ b/media/libstagefright/httplive/LiveSession.cpp @@ -49,9 +49,6 @@ namespace android { -// Number of recently-read bytes to use for bandwidth estimation -const size_t LiveSession::kBandwidthHistoryBytes = 200 * 1024; - LiveSession::LiveSession( const sp<AMessage> ¬ify, uint32_t flags, const sp<IMediaHTTPService> &httpService) @@ -87,13 +84,6 @@ LiveSession::LiveSession( mPacketSources2.add(indexToType(i), new AnotherPacketSource(NULL /* meta */)); mBuffering[i] = false; } - - size_t numHistoryItems = kBandwidthHistoryBytes / - PlaylistFetcher::kDownloadBlockSize + 1; - if (numHistoryItems < 5) { - numHistoryItems = 5; - } - mHTTPDataSource->setBandwidthHistorySize(numHistoryItems); } LiveSession::~LiveSession() { @@ -155,24 +145,10 @@ status_t LiveSession::dequeueAccessUnit( } } - int32_t targetDuration = 0; - sp<AMessage> meta = packetSource->getLatestEnqueuedMeta(); - if (meta != NULL) { - meta->findInt32("targetDuration", &targetDuration); - } - - int64_t targetDurationUs = targetDuration * 1000000ll; - if (targetDurationUs == 0 || - targetDurationUs > PlaylistFetcher::kMinBufferedDurationUs) { - // Fetchers limit buffering to - // min(3 * targetDuration, kMinBufferedDurationUs) - targetDurationUs = PlaylistFetcher::kMinBufferedDurationUs; - } - if (mBuffering[idx]) { if (mSwitchInProgress || packetSource->isFinished(0) - || packetSource->getEstimatedDurationUs() > targetDurationUs) { + || packetSource->getEstimatedDurationUs() > 10000000ll) { mBuffering[idx] = false; } } @@ -883,11 +859,7 @@ ssize_t LiveSession::fetchFile( // Only resize when we don't know the size. size_t bufferRemaining = buffer->capacity() - buffer->size(); if (bufferRemaining == 0 && getSizeErr != OK) { - size_t bufferIncrement = buffer->size() / 2; - if (bufferIncrement < 32768) { - bufferIncrement = 32768; - } - bufferRemaining = bufferIncrement; + bufferRemaining = 32768; ALOGV("increasing download buffer to %zu bytes", buffer->size() + bufferRemaining); |