diff options
Diffstat (limited to 'rotord')
| -rw-r--r-- | rotord/src/graph.cpp | 5 | ||||
| -rw-r--r-- | rotord/src/rendercontext.cpp | 12 | ||||
| -rwxr-xr-x | rotord/src/rotor.h | 2 |
3 files changed, 13 insertions, 6 deletions
diff --git a/rotord/src/graph.cpp b/rotord/src/graph.cpp index e67d6f3..dc3e13e 100644 --- a/rotord/src/graph.cpp +++ b/rotord/src/graph.cpp @@ -33,7 +33,10 @@ bool Graph::signal_render(string &signal_xml,const float framerate) { return false; } */ -bool Graph::preview(xmlIO &XML,int w,int h){ +bool Graph::preview(xmlIO &XML,string node,int w,int h){ + // + //bool imencode(const string& ext, InputArray img, vector<uchar>& buf, const vector<int>& params=vector<int>()) + return true; } diff --git a/rotord/src/rendercontext.cpp b/rotord/src/rendercontext.cpp index 77adc71..a5bb54f 100644 --- a/rotord/src/rendercontext.cpp +++ b/rotord/src/rendercontext.cpp @@ -312,10 +312,14 @@ void Render_context::session_command(const Session_command& command,xmlIO& XML,H int frame=root["frame"].asInt(); int width=root["width"].asInt(); int height=root["height"].asInt(); - string resolution=root["resolution"].asString(); - cerr<<"preview: "<<frame<<" "<<width<<" "<<height<<" "<<resolution<<endl; - //if (graph.preview(XML,frame,resolution)) - status=HTTPResponse::HTTP_OK; + if (graph.preview(XML,preview_node,width,height)) { + status=HTTPResponse::HTTP_OK; + } + else { + status=HTTPResponse::HTTP_BAD_REQUEST; + logger.error("ERROR: Could not create preview"); + XML.addValue("error","Could not preview node '"+preview_node+"', frame "+ofToString(frame)+" at "+ofToString(width)+"x"+ofToString(height)); + } } else { std::cout << "Failed to parse preview request\n" diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h index 85124ce..f52c212 100755 --- a/rotord/src/rotor.h +++ b/rotord/src/rotor.h @@ -1213,7 +1213,7 @@ namespace Rotor { bool parseXml(string media_path); bool parseJson(string &data,string &media_path); bool set_resolution(int w,int h); - bool preview(xmlIO &XML,int w,int h); + bool preview(xmlIO &XML,string node,int w,int h); bool loaded; float duration; const string toString(); |
