From 96774d9ca9b5234e9b911871418175a817d3e608 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Thu, 20 Aug 2009 15:35:39 -0700 Subject: [PATCH] Enable specification of http:// urls in stagefright commandline tool. --- cmds/stagefright/stagefright.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index 185e6ac0213c..6b2d8ad37002 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -23,6 +23,8 @@ #include #include #include +#include +#include #include #include #include @@ -191,7 +193,13 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) { const char *filename = argv[k]; - sp dataSource = new MmapSource(filename); + sp dataSource; + if (!strncasecmp("http://", filename, 7)) { + dataSource = new HTTPDataSource(filename); + dataSource = new CachingDataSource(dataSource, 64 * 1024, 10); + } else { + dataSource = new MmapSource(filename); + } bool isJPEG = false; -- 2.11.0