diff options
Diffstat (limited to 'rotord')
| -rw-r--r--[-rwxr-xr-x] | rotord/src/libavwrapper.cpp | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | rotord/src/libavwrapper.h | 0 | ||||
| -rw-r--r-- | rotord/src/rendercontext.cpp | 39 | ||||
| -rw-r--r--[-rwxr-xr-x] | rotord/src/rotor.cpp | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | rotord/src/rotor.h | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | rotord/src/rotord.cpp | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | rotord/src/rotord.h | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | rotord/src/tinyxml.cpp | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | rotord/src/tinyxml.h | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | rotord/src/tinyxmlerror.cpp | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | rotord/src/tinyxmlparser.cpp | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | rotord/src/xmlIO.cpp | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | rotord/src/xmlIO.h | 0 |
13 files changed, 18 insertions, 21 deletions
diff --git a/rotord/src/libavwrapper.cpp b/rotord/src/libavwrapper.cpp index b97467b..b97467b 100755..100644 --- a/rotord/src/libavwrapper.cpp +++ b/rotord/src/libavwrapper.cpp diff --git a/rotord/src/libavwrapper.h b/rotord/src/libavwrapper.h index 7f3d549..7f3d549 100755..100644 --- a/rotord/src/libavwrapper.h +++ b/rotord/src/libavwrapper.h diff --git a/rotord/src/rendercontext.cpp b/rotord/src/rendercontext.cpp index c1cef59..62c60c0 100644 --- a/rotord/src/rendercontext.cpp +++ b/rotord/src/rendercontext.cpp @@ -175,21 +175,8 @@ void Render_context::session_command(const Session_command& command,xmlIO& XML,H //should interrupt whatever is happening? //before begining to load from xml if (state==IDLE) { //eventually not like this - if (graph.load(command.body,media_dir)) { - status=HTTPResponse::HTTP_OK; - logger.information("Loaded graph from http PUT body"); - XML.addValue("status","Loaded graph from PUT body"); - if (graph.audio_loaded) { - add_queue(Session_task(command.uid,ANALYSE_AUDIO)); - status=HTTPResponse::HTTP_OK; - logger.information("Starting audio analysis for graph: "+command.commands[0]); - XML.addValue("status","Starting audio analysis for graph: "+command.commands[0]); - } - } - else { - string graph_filename=graph_dir+command.body; - Poco::File f=Poco::File(graph_filename); - if (f.exists()) { + if (Poco::File(graph_dir+command.body).exists()) { + string graph_filename=graph_dir+command.body; if (graph.loadFile(graph_filename,media_dir)) { status=HTTPResponse::HTTP_OK; //XML.addValue("patchbay",graph.toString()); @@ -208,16 +195,26 @@ void Render_context::session_command(const Session_command& command,xmlIO& XML,H } else { status=HTTPResponse::HTTP_INTERNAL_SERVER_ERROR; //~/sources/poco-1.4.6-all/Net/include/Poco/Net/HTTPResponse.h - logger.error("ERROR: graph not loaded: check XML"); - XML.addValue("error","graph not loaded: check XML"); + logger.error("ERROR: graph not loaded: check file"); + XML.addValue("error","graph not loaded: check file"); } } - else { - status=HTTPResponse::HTTP_NOT_FOUND; - logger.error("ERROR: "+command.body+" not found"); - XML.addValue("error",command.body+" not found"); + else if (graph.load(command.body,media_dir)) { + status=HTTPResponse::HTTP_OK; + logger.information("Loaded graph from http PUT body"); + XML.addValue("status","Loaded graph from PUT body"); + if (graph.audio_loaded) { + add_queue(Session_task(command.uid,ANALYSE_AUDIO)); + status=HTTPResponse::HTTP_OK; + logger.information("Starting audio analysis for graph: "+command.commands[0]); + XML.addValue("status","Starting audio analysis for graph: "+command.commands[0]); } } + else { + status=HTTPResponse::HTTP_INTERNAL_SERVER_ERROR; //~/sources/poco-1.4.6-all/Net/include/Poco/Net/HTTPResponse.h + logger.error("ERROR: graph unreadable"); + XML.addValue("error","graph unreadable"); + } } else { logger.error("ERROR: Session busy"); diff --git a/rotord/src/rotor.cpp b/rotord/src/rotor.cpp index ee18dbd..ee18dbd 100755..100644 --- a/rotord/src/rotor.cpp +++ b/rotord/src/rotor.cpp diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h index a247c66..a247c66 100755..100644 --- a/rotord/src/rotor.h +++ b/rotord/src/rotor.h diff --git a/rotord/src/rotord.cpp b/rotord/src/rotord.cpp index cdc38fe..cdc38fe 100755..100644 --- a/rotord/src/rotord.cpp +++ b/rotord/src/rotord.cpp diff --git a/rotord/src/rotord.h b/rotord/src/rotord.h index 25ff3e3..25ff3e3 100755..100644 --- a/rotord/src/rotord.h +++ b/rotord/src/rotord.h diff --git a/rotord/src/tinyxml.cpp b/rotord/src/tinyxml.cpp index b5d0451..b5d0451 100755..100644 --- a/rotord/src/tinyxml.cpp +++ b/rotord/src/tinyxml.cpp diff --git a/rotord/src/tinyxml.h b/rotord/src/tinyxml.h index 7958de5..7958de5 100755..100644 --- a/rotord/src/tinyxml.h +++ b/rotord/src/tinyxml.h diff --git a/rotord/src/tinyxmlerror.cpp b/rotord/src/tinyxmlerror.cpp index d24f63b..d24f63b 100755..100644 --- a/rotord/src/tinyxmlerror.cpp +++ b/rotord/src/tinyxmlerror.cpp diff --git a/rotord/src/tinyxmlparser.cpp b/rotord/src/tinyxmlparser.cpp index c672283..c672283 100755..100644 --- a/rotord/src/tinyxmlparser.cpp +++ b/rotord/src/tinyxmlparser.cpp diff --git a/rotord/src/xmlIO.cpp b/rotord/src/xmlIO.cpp index f2abe27..f2abe27 100755..100644 --- a/rotord/src/xmlIO.cpp +++ b/rotord/src/xmlIO.cpp diff --git a/rotord/src/xmlIO.h b/rotord/src/xmlIO.h index 2048c8d..2048c8d 100755..100644 --- a/rotord/src/xmlIO.h +++ b/rotord/src/xmlIO.h |
