From 0a5baa9b411fe086013d2a5e9126ed63fbad046c Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Thu, 10 Jun 2010 11:17:50 -0700 Subject: 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 --- media/libstagefright/DataSource.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'media/libstagefright/DataSource.cpp') 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 #include #include -#include #include #include @@ -108,11 +108,11 @@ sp DataSource::CreateFromURI( if (!strncasecmp("file://", uri, 7)) { source = new FileSource(uri + 7); } else if (!strncasecmp("http://", uri, 7)) { - sp httpSource = new HTTPDataSource(uri, headers); - if (httpSource->connect() != OK) { + sp 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); -- cgit v1.1