summaryrefslogtreecommitdiff
path: root/rotord/rotor.h
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/rotor.h')
-rwxr-xr-xrotord/rotor.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/rotord/rotor.h b/rotord/rotor.h
index c3886d8..186d25b 100755
--- a/rotord/rotor.h
+++ b/rotord/rotor.h
@@ -63,7 +63,6 @@ extern "C" {
#include "xmlIO.h"
#include "libavaudioloader.h"
#include "libavexporter.h"
-#include "gstvideoloader.h"
#include "utils.h" //fequal
#include "libavwrapper.h"
@@ -594,22 +593,23 @@ namespace Rotor {
if (inputs[0]->connection) {
if (fgreater_or_equal(1.0f,(((Signal_node*)inputs[0]->connection)->get_output((Time_spec)frame)))) {
Image *in=(((Image_node*)image_inputs[0]->connection)->get_output(frame));
- image->setup(frame.w,frame.h);
- for (int i=0;i<in->w*in->h*3;i++) {
- image->RGBdata[i]=255-in->RGBdata[i];
+ if (in){
+ image->setup(frame.w,frame.h);
+ for (int i=0;i<in->w*in->h*3;i++) {
+ image->RGBdata[i]=255-in->RGBdata[i];
+ }
+ return image;
}
- return image;
-
}
}
return (((Image_node*)image_inputs[0]->connection)->get_output(frame));
}
- return nullptr;
+
}
if (image_inputs[0]->connection) {
-
+ return image;
}
- return image;
+ return nullptr;
}
private:
Image *image; //is an image generator
@@ -647,6 +647,7 @@ namespace Rotor {
base_settings(settings);
//player=new ofGstVideoPlayer();
//image=new Image();
+ isLoaded=false;
};
~Video_loader(){};
bool load(const string &filename);
@@ -656,6 +657,7 @@ namespace Rotor {
//ofGstVideoPlayer *player;
libav::decoder player;
Image image;
+ bool isLoaded;
};
class Video_cycler: public Image_node {
//cycles through video inputs in order