diff options
author | Andreas Huber <andih@google.com> | 2010-10-14 23:22:21 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-10-14 23:22:21 -0700 |
commit | d6119356f45c9c57cac812357d969ecc3001087e (patch) | |
tree | 571a3fd12bab8ff32a863507d4e907e750456af9 /media/libstagefright/AwesomePlayer.cpp | |
parent | 11b72e19970f620adfb1aa458b45ff06cec77f10 (diff) | |
parent | 43024e1f4953d9b8891b7b72f10e76f11812e772 (diff) | |
download | frameworks_av-d6119356f45c9c57cac812357d969ecc3001087e.zip frameworks_av-d6119356f45c9c57cac812357d969ecc3001087e.tar.gz frameworks_av-d6119356f45c9c57cac812357d969ecc3001087e.tar.bz2 |
am 28b93967: am 165c6579: Merge "HTTP Live content that are tagged as complete are now seekable." into gingerbread
Merge commit '28b93967d0e702304c7edec854a29d5ab88bfce0'
* commit '28b93967d0e702304c7edec854a29d5ab88bfce0':
HTTP Live content that are tagged as complete are now seekable.
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 fcc3e81..7b4dd1c 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" @@ -509,8 +510,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)) { @@ -1365,14 +1366,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) { |