summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/DataSource.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-01-27 16:49:05 -0800
committerAndreas Huber <andih@google.com>2010-01-28 13:04:28 -0800
commit5561ccf4a8db88a2e44eac1b3ed13b4ff53a7f20 (patch)
tree0a98e19ea4a0721f2cc0e763203a69565eea6e2e /media/libstagefright/DataSource.cpp
parent2db8455d8f4468a637109d31f319ce02d9d743ec (diff)
downloadframeworks_av-5561ccf4a8db88a2e44eac1b3ed13b4ff53a7f20.zip
frameworks_av-5561ccf4a8db88a2e44eac1b3ed13b4ff53a7f20.tar.gz
frameworks_av-5561ccf4a8db88a2e44eac1b3ed13b4ff53a7f20.tar.bz2
Support the specification of additional HTTP headers in the creation of a DataSource.
related-to-bug: 2393577
Diffstat (limited to 'media/libstagefright/DataSource.cpp')
-rw-r--r--media/libstagefright/DataSource.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/media/libstagefright/DataSource.cpp b/media/libstagefright/DataSource.cpp
index 741e5e0..1696eb9 100644
--- a/media/libstagefright/DataSource.cpp
+++ b/media/libstagefright/DataSource.cpp
@@ -95,12 +95,13 @@ void DataSource::RegisterDefaultSniffers() {
}
// static
-sp<DataSource> DataSource::CreateFromURI(const char *uri) {
+sp<DataSource> DataSource::CreateFromURI(
+ const char *uri, const KeyedVector<String8, String8> *headers) {
sp<DataSource> source;
if (!strncasecmp("file://", uri, 7)) {
source = new FileSource(uri + 7);
} else if (!strncasecmp("http://", uri, 7)) {
- source = new HTTPDataSource(uri);
+ source = new HTTPDataSource(uri, headers);
source = new CachingDataSource(source, 64 * 1024, 10);
} else {
// Assume it's a filename.