summaryrefslogtreecommitdiff
path: root/rotord
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-08-28 16:03:20 +0100
committerTim Redfern <tim@eclectronics.org>2013-08-28 16:03:20 +0100
commitaa2ae6cdc3e808960f51238d9c1298d54d27e4ef (patch)
treefc96b1db5ac7487a7ac04d5ede406234e1e8cf9e /rotord
parentd601a85b50bbac9fc9c46321af64f1137aaf5af7 (diff)
added qm plugins to repo
Diffstat (limited to 'rotord')
-rw-r--r--rotord/src/graph.cpp5
-rw-r--r--rotord/src/rendercontext.cpp12
-rwxr-xr-xrotord/src/rotor.h2
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();