summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/DataSource.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2014-01-29 11:13:26 -0800
committerAndreas Huber <andih@google.com>2014-02-04 15:11:53 -0800
commit1b86fe063badb5f28c467ade39be0f4008688947 (patch)
treed88660112d407540184ad8e1292ed8aa98fae317 /media/libstagefright/DataSource.cpp
parent5ce88270eb2d41462de8c4155673b802b2ca48cb (diff)
downloadframeworks_av-1b86fe063badb5f28c467ade39be0f4008688947.zip
frameworks_av-1b86fe063badb5f28c467ade39be0f4008688947.tar.gz
frameworks_av-1b86fe063badb5f28c467ade39be0f4008688947.tar.bz2
FINAL ATTEMPT: HTTP services are now provided from JAVA and made available to media code
Change-Id: I9f74a86e70422187c9cf0ca1318a29019700192d
Diffstat (limited to 'media/libstagefright/DataSource.cpp')
-rw-r--r--media/libstagefright/DataSource.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/media/libstagefright/DataSource.cpp b/media/libstagefright/DataSource.cpp
index 97987e2..9ff9ca2 100644
--- a/media/libstagefright/DataSource.cpp
+++ b/media/libstagefright/DataSource.cpp
@@ -35,10 +35,13 @@
#include "matroska/MatroskaExtractor.h"
+#include <media/IMediaHTTPConnection.h>
+#include <media/IMediaHTTPService.h>
#include <media/stagefright/foundation/AMessage.h>
#include <media/stagefright/DataSource.h>
#include <media/stagefright/FileSource.h>
#include <media/stagefright/MediaErrors.h>
+#include <media/stagefright/MediaHTTP.h>
#include <utils/String8.h>
#include <cutils/properties.h>
@@ -180,7 +183,9 @@ void DataSource::RegisterDefaultSniffers() {
// static
sp<DataSource> DataSource::CreateFromURI(
- const char *uri, const KeyedVector<String8, String8> *headers) {
+ const sp<IMediaHTTPService> &httpService,
+ const char *uri,
+ const KeyedVector<String8, String8> *headers) {
bool isWidevine = !strncasecmp("widevine://", uri, 11);
sp<DataSource> source;
@@ -189,7 +194,7 @@ sp<DataSource> DataSource::CreateFromURI(
} else if (!strncasecmp("http://", uri, 7)
|| !strncasecmp("https://", uri, 8)
|| isWidevine) {
- sp<HTTPBase> httpSource = HTTPBase::Create();
+ sp<HTTPBase> httpSource = new MediaHTTP(httpService->makeHTTPConnection());
String8 tmp;
if (isWidevine) {