summaryrefslogtreecommitdiff
path: root/rotord
diff options
context:
space:
mode:
authorTim Redfern <tim@herge.(none)>2013-05-16 17:10:08 +0100
committerTim Redfern <tim@herge.(none)>2013-05-16 17:10:08 +0100
commitfad2c7236e70faf0669dde3e6cbd51986fdbc6ee (patch)
tree3e639c8ccb12ab8289326eaa657abd96fa108f21 /rotord
parent8d88180d523d82e5c6535ea03ef22791d0cbd9d0 (diff)
major leakage
Diffstat (limited to 'rotord')
-rw-r--r--rotord/02.xml15
-rw-r--r--rotord/libavexporter.h6
-rwxr-xr-xrotord/rotor.h13
-rwxr-xr-xrotord/rotord.cpp4
4 files changed, 21 insertions, 17 deletions
diff --git a/rotord/02.xml b/rotord/02.xml
index dfc13df..3af92e1 100644
--- a/rotord/02.xml
+++ b/rotord/02.xml
@@ -1,16 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<patchbay ID="0f7aa258-7c2f-11e2-abbd-133252267708">Off and on template ©Rotor 2013
- <node ID="01" type="audio_analysis" soname="qm-vamp-plugins" id="qm-tempotracker" output="signal">beats
- </node>
- <node ID="02" type="audio_analysis" soname="qm-vamp-plugins" id="qm-segmenter" output="signal">segmenter
- </node>
- <node ID="04" type="bang" output="signal">outputs 0 except when signal first passes a new integer: then 1
- <signal_input from="01">signal to analyse</signal_input>
- </node>
- <node ID="05" type="signal_output">outputs data when changed
- <signal_input from="04">signal to output</signal_input>
- </node>
- <node ID="06" type="video_output">renders the video
- <image_input from="04">video to output</image_input>
+ <node ID="01" type="testcard" output="image"></node>
+ <node ID="02" type="video_output">renders the video
+ <image_input from="01">video to output</image_input>
</node>
</patchbay>
diff --git a/rotord/libavexporter.h b/rotord/libavexporter.h
index d9d6f38..c5e66e3 100644
--- a/rotord/libavexporter.h
+++ b/rotord/libavexporter.h
@@ -224,7 +224,7 @@ namespace libav {
//?? why is ffmpeg reporting fltp as the sample format??? doesn't seem to have an effect to change this though
ret = avcodec_encode_audio2(c, &pkt, frame, &got_packet);
if (!samples) {
- free(sampleptr);
+ delete[] sampleptr;
}
if (ret < 0) {
//fprintf(stderr, "Error encoding audio frame: %s\n", av_err2str(ret));
@@ -464,6 +464,8 @@ namespace libav {
exit(1);
}
frame_count++;
+
+ //avcodec_free_frame(&frame);
}
static void close_video(AVFormatContext *oc, AVStream *st)
@@ -472,7 +474,7 @@ namespace libav {
av_free(src_picture.data[0]);
av_free(dst_picture.data[0]);
av_free(frame);
- //av_free(outPixels); SIGSEV here
+ av_free(outPixels); //SIGSEV here???
}
class Exporter {
diff --git a/rotord/rotor.h b/rotord/rotor.h
index e128fd5..d8ee021 100755
--- a/rotord/rotor.h
+++ b/rotord/rotor.h
@@ -486,7 +486,7 @@ namespace Rotor {
base_settings(settings);
divide_amount=ofToFloat(find_setting(settings,"amount"));
for (auto p:parameter_inputs){
- if (p->parameter=="divide_amount") p->receiver=&divide_amount;
+ if (p->parameter=="amount") p->receiver=&divide_amount;
}
};
Signal_divide* clone(map<string,string> &_settings) { return new Signal_divide(_settings);};
@@ -789,7 +789,10 @@ namespace Rotor {
if (p->parameter=="mode") p->receiver=&mode;
}
};
- ~Echo_trails(){if (image) {delete image;} };
+ //~Echo_trails(){if (image) {delete image;} };
+ ~Echo_trails(){
+ for (auto i:images) {delete i.second;}
+ };
Image *output(const Frame_spec &frame){
//check if cache is valid
if (frame.w!=image->w||frame.h!=image->h){ //or framerate changed?
@@ -857,7 +860,7 @@ namespace Rotor {
return nullptr;
}
Echo_trails* clone(map<string,string> &_settings) { return new Echo_trails(_settings);};
- private:
+ protected:
float duration,fadeto;
int number;
int interval,total,lastframe; //number of frames between displayed echoes
@@ -868,6 +871,9 @@ namespace Rotor {
class Node_factory{
public:
Node_factory();
+ ~Node_factory(){
+ for (auto t:type_map) delete t.second;
+ }
void add_type(string type,Node* proto){
type_map[type]=proto;
};
@@ -938,6 +944,7 @@ namespace Rotor {
output_framerate=25.0f;
audio_loaded=false;
};
+ ~Render_context(){delete audio_thumb;};
void runTask();
void add_queue(int item);
Command_response session_command(const std::vector<std::string>& command);
diff --git a/rotord/rotord.cpp b/rotord/rotord.cpp
index 1a68638..bf1be02 100755
--- a/rotord/rotord.cpp
+++ b/rotord/rotord.cpp
@@ -188,6 +188,9 @@ HTTPRequestHandler* RotorRequestHandlerFactory::createRequestHandler(const HTTPS
content="<status>Rotor: bad request</status>\n";
}
}
+ else if (command[0]=="exit") {
+ exit(0);
+ }
else {
bool found=false;
for (auto& task: manager.taskList()) { //c++11
@@ -290,3 +293,4 @@ int RotorServer::main(const std::vector<std::string>& args){
}
return Application::EXIT_OK;
}
+ \ No newline at end of file