diff options
| -rw-r--r-- | rotord/rotor.cpp | 4 | ||||
| -rwxr-xr-x | rotord/rotor.h | 4 | ||||
| -rwxr-xr-x | rotord/rotord.h | 3 |
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); } |
