diff options
author | Andreas Huber <andih@google.com> | 2010-06-10 11:17:50 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-06-10 15:16:57 -0700 |
commit | 0a5baa9b411fe086013d2a5e9126ed63fbad046c (patch) | |
tree | d2f568256c27d816aa5cac3ef365ebe460536a3a /media/libstagefright/DataSource.cpp | |
parent | 28b6844dec4297b16777fd45fd77ff33aa495de2 (diff) | |
download | frameworks_av-0a5baa9b411fe086013d2a5e9126ed63fbad046c.zip frameworks_av-0a5baa9b411fe086013d2a5e9126ed63fbad046c.tar.gz frameworks_av-0a5baa9b411fe086013d2a5e9126ed63fbad046c.tar.bz2 |
Switch stagefright's approach to prefetching to the new model. The java MediaPlayer is now notified about rebuffering start/end via info messages.
Change-Id: If8185ba329ce8b6663b1ad39a4efb0ad3be81df2
Diffstat (limited to 'media/libstagefright/DataSource.cpp')
-rw-r--r-- | media/libstagefright/DataSource.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/media/libstagefright/DataSource.cpp b/media/libstagefright/DataSource.cpp index b569a6b..6e4f9df 100644 --- a/media/libstagefright/DataSource.cpp +++ b/media/libstagefright/DataSource.cpp @@ -20,13 +20,13 @@ #include "include/WAVExtractor.h" #include "include/OggExtractor.h" #include "include/MPEG2TSExtractor.h" +#include "include/NuCachedSource2.h" +#include "include/NuHTTPDataSource.h" #include "matroska/MatroskaExtractor.h" -#include <media/stagefright/CachingDataSource.h> #include <media/stagefright/DataSource.h> #include <media/stagefright/FileSource.h> -#include <media/stagefright/HTTPDataSource.h> #include <media/stagefright/MediaErrors.h> #include <utils/String8.h> @@ -108,11 +108,11 @@ sp<DataSource> DataSource::CreateFromURI( if (!strncasecmp("file://", uri, 7)) { source = new FileSource(uri + 7); } else if (!strncasecmp("http://", uri, 7)) { - sp<HTTPDataSource> httpSource = new HTTPDataSource(uri, headers); - if (httpSource->connect() != OK) { + sp<NuHTTPDataSource> httpSource = new NuHTTPDataSource; + if (httpSource->connect(uri /* , headers */) != OK) { return NULL; } - source = new CachingDataSource(httpSource, 64 * 1024, 10); + source = new NuCachedSource2(httpSource); } else { // Assume it's a filename. source = new FileSource(uri); |