summaryrefslogtreecommitdiff
path: root/rotord
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2013-03-08 01:02:07 +0000
committerComment <tim@gray.(none)>2013-03-08 01:02:07 +0000
commit8e1d11383ed4ef2e41b11fa88b475014c8c2ba5c (patch)
treed365b70fa20417a72654a3756f8d1b22e2458219 /rotord
parent4c2f390a7a47d396e9581e122633313f6a4295a9 (diff)
net stream files
Diffstat (limited to 'rotord')
-rw-r--r--rotord/rotor.cpp4
-rwxr-xr-xrotord/rotor.h4
-rwxr-xr-xrotord/rotord.h3
3 files changed, 10 insertions, 1 deletions
diff --git a/rotord/rotor.cpp b/rotord/rotor.cpp
index c894e04..02f4675 100644
--- a/rotord/rotor.cpp
+++ b/rotord/rotor.cpp
@@ -75,7 +75,9 @@ Command_response Render_context::session_command(const std::vector<std::string>&
if (command.size()>2) {
if (state==IDLE) {
//check file exists
- Poco::File f=Poco::File(command[3]);
+ //Poco::File f=Poco::File(command[3]);
+ std::auto_ptr<std::istream> pStr(URIStreamOpener::defaultOpener().open(command[3]));
+
if (f.exists()) {
//pass to worker thread ??if engine is ready?? ??what if engine has finished but results aren't read??
audio_filename=command[3]; //for now, store session variables in memory
diff --git a/rotord/rotor.h b/rotord/rotor.h
index 9f847f6..d79c9e2 100755
--- a/rotord/rotor.h
+++ b/rotord/rotor.h
@@ -57,11 +57,15 @@ next - build signal_output and make a working chain with dummy data
#include "Poco/Random.h"
#include "Poco/AutoPtr.h"
#include "Poco/File.h"
+#include "Poco/Net/HTTPStreamFactory.h"
+#include "Poco/URIStreamOpener.h"
+#include <memory>
#include <iostream>
using Poco::UUID;
using Poco::UUIDGenerator;
using Poco::Net::HTTPResponse;
+using Poco::URIStreamOpener;
#include "vampHost.h"
#include "xmlIO.h"
diff --git a/rotord/rotord.h b/rotord/rotord.h
index f0f24ac..0eb7c76 100755
--- a/rotord/rotord.h
+++ b/rotord/rotord.h
@@ -19,6 +19,7 @@
#include "Poco/Util/OptionSet.h"
#include "Poco/Util/HelpFormatter.h"
#include "Poco/FileStream.h"
+#include "Poco/Net/HTTPStreamFactory.h"
#include <iostream>
#include <sstream>
@@ -43,6 +44,7 @@ using Poco::Util::Option;
using Poco::Util::OptionSet;
using Poco::Util::OptionCallback;
using Poco::Util::HelpFormatter;
+using Poco::Net::HTTPStreamFactory;
//#include "avCodec.h"
@@ -105,6 +107,7 @@ class RotorServer: public Poco::Util::ServerApplication
int main(int argc, char** argv)
{
+ HTTPStreamFactory::registerFactory();
RotorServer app;
return app.run(argc, argv);
}