summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rotord/src/ffmpeg-fas_wrapper.h15
-rw-r--r--rotord/src/ffmpeg_fas.h5
-rw-r--r--rotord/src/graph.cpp4
-rw-r--r--rotord/src/graph.h7
-rw-r--r--rotord/src/rendercontext.cpp2
5 files changed, 28 insertions, 5 deletions
diff --git a/rotord/src/ffmpeg-fas_wrapper.h b/rotord/src/ffmpeg-fas_wrapper.h
index b70cd2d..dedff62 100644
--- a/rotord/src/ffmpeg-fas_wrapper.h
+++ b/rotord/src/ffmpeg-fas_wrapper.h
@@ -1,5 +1,16 @@
-#ifndef ffmpeg-fas_wrapper_H
-#define ffmpeg-fas_wrapper_H
+#ifndef ffmpeg_fas_wrapper_H
+#define ffmpeg_fas_wrapper_H
+#include <string>
+#include "ffmpeg_fas.h"
+
+namespace ffmpeg_fas {
+ class decoder
+ {
+ public:
+ bool open(std::string& fileName);
+ fas_raw_image_type frame;
+ };
+}
#endif
diff --git a/rotord/src/ffmpeg_fas.h b/rotord/src/ffmpeg_fas.h
index 953c8b4..0c51103 100644
--- a/rotord/src/ffmpeg_fas.h
+++ b/rotord/src/ffmpeg_fas.h
@@ -29,6 +29,11 @@
#define __extern extern
#endif
+
+#ifndef UINT64_C
+#define UINT64_C(c) (c ## ULL)
+#endif
+
#include "seek_indices.h"
#include <libswscale/swscale.h>
diff --git a/rotord/src/graph.cpp b/rotord/src/graph.cpp
index ed8c188..03d0a4b 100644
--- a/rotord/src/graph.cpp
+++ b/rotord/src/graph.cpp
@@ -277,7 +277,7 @@ bool Graph::parseJson(string &data,string &media_path){
return false;
}
//we know the json validates so clear the existing graph
- nodes.clear();
+ clear();
check_audio(root["audio"].asString(),media_path);
init(root["ID"].asString(),root["description"].asString());
Json::Value jnodes = root["nodeDefinitions"];
@@ -392,7 +392,7 @@ bool Graph::parseJson(string &data,string &media_path){
return true;
}
bool Graph::parseXml(string media_path){
- nodes.clear();
+ clear();
check_audio(xml.getAttribute("patchbay","audio","",0),media_path);
init(xml.getAttribute("patchbay","ID","",0),xml.getValue("patchbay","",0));
if(xml.pushTag("patchbay")) {
diff --git a/rotord/src/graph.h b/rotord/src/graph.h
index 231d784..4c68eab 100644
--- a/rotord/src/graph.h
+++ b/rotord/src/graph.h
@@ -24,6 +24,13 @@ namespace Rotor {
framerate=25.0f;
cancelled=false;
};
+ ~Graph(){ clear(); };
+ void clear(){
+ for (auto n: nodes) {
+ delete n.second;
+ }
+ nodes.clear();
+ }
string uid; //every version of a graph has a UUID, no particular need to actually read its data(?)
//?? is it faster than using strings??
string description;
diff --git a/rotord/src/rendercontext.cpp b/rotord/src/rendercontext.cpp
index 8b4053f..c1cef59 100644
--- a/rotord/src/rendercontext.cpp
+++ b/rotord/src/rendercontext.cpp
@@ -227,7 +227,7 @@ void Render_context::session_command(const Session_command& command,xmlIO& XML,H
}
if (command.method=="DELETE") {
//for now
- graph=Graph();
+ graph.clear();
logger.information("graph deleted");
XML.addValue("status","graph deleted");
status=HTTPResponse::HTTP_OK;