diff options
author | Andreas Huber <andih@google.com> | 2014-02-05 17:12:38 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-02-05 17:12:38 +0000 |
commit | 412d4744efae64083e4f99a664e3efaba031af48 (patch) | |
tree | 8b139d3c83c554f181e3b4cb93ca4a74e0655c94 /media/libstagefright/DataSource.cpp | |
parent | 4a25471795b05ffcfcc079e9f9cb5ed549023d14 (diff) | |
parent | 1b86fe063badb5f28c467ade39be0f4008688947 (diff) | |
download | frameworks_av-412d4744efae64083e4f99a664e3efaba031af48.zip frameworks_av-412d4744efae64083e4f99a664e3efaba031af48.tar.gz frameworks_av-412d4744efae64083e4f99a664e3efaba031af48.tar.bz2 |
Merge "FINAL ATTEMPT: HTTP services are now provided from JAVA and made available to media code"
Diffstat (limited to 'media/libstagefright/DataSource.cpp')
-rw-r--r-- | media/libstagefright/DataSource.cpp | 9 |
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) { |