diff options
author | Andreas Huber <andih@google.com> | 2010-10-12 11:34:37 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-10-12 14:32:10 -0700 |
commit | bff07d0b22a5ee2d9f044f6cb5e4be1532017ab0 (patch) | |
tree | 3377ef036c87095609a0969dbf0b5c93450b8903 /media/libstagefright/AwesomePlayer.cpp | |
parent | 2bc940b4f961e588459c83862b2c6bea314a4027 (diff) | |
download | frameworks_av-bff07d0b22a5ee2d9f044f6cb5e4be1532017ab0.zip frameworks_av-bff07d0b22a5ee2d9f044f6cb5e4be1532017ab0.tar.gz frameworks_av-bff07d0b22a5ee2d9f044f6cb5e4be1532017ab0.tar.bz2 |
HTTP Live content that are tagged as complete are now seekable.
Change-Id: I9d0d2f009f883e5baf3e9de8c5c0aa05760e4bde
related-to-bug: 2368598
Diffstat (limited to 'media/libstagefright/AwesomePlayer.cpp')
-rw-r--r-- | media/libstagefright/AwesomePlayer.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index ff28f3b..69389f5 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -26,6 +26,7 @@ #include "include/SoftwareRenderer.h" #include "include/NuCachedSource2.h" #include "include/ThrottledSource.h" +#include "include/MPEG2TSExtractor.h" #include "ARTPSession.h" #include "APacketSource.h" @@ -506,8 +507,8 @@ void AwesomePlayer::onBufferingUpdate() { // We don't know the bitrate of the stream, use absolute size // limits to maintain the cache. - const size_t kLowWaterMarkBytes = 400000; - const size_t kHighWaterMarkBytes = 1000000; + const size_t kLowWaterMarkBytes = 40000; + const size_t kHighWaterMarkBytes = 200000; if ((mFlags & PLAYING) && !eos && (cachedDataRemaining < kLowWaterMarkBytes)) { @@ -1343,14 +1344,17 @@ status_t AwesomePlayer::finishSetDataSource_l() { String8 uri("http://"); uri.append(mUri.string() + 11); - dataSource = new LiveSource(uri.string()); + sp<LiveSource> liveSource = new LiveSource(uri.string()); - mCachedSource = new NuCachedSource2(dataSource); + mCachedSource = new NuCachedSource2(liveSource); dataSource = mCachedSource; sp<MediaExtractor> extractor = MediaExtractor::Create(dataSource, MEDIA_MIMETYPE_CONTAINER_MPEG2TS); + static_cast<MPEG2TSExtractor *>(extractor.get()) + ->setLiveSource(liveSource); + return setDataSource_l(extractor); } else if (!strncmp("rtsp://gtalk/", mUri.string(), 13)) { if (mLooper == NULL) { |