summaryrefslogtreecommitdiff
path: root/rotord
diff options
context:
space:
mode:
Diffstat (limited to 'rotord')
-rw-r--r--rotord/Makefile2
-rwxr-xr-xrotord/rotor.h16
-rwxr-xr-xrotord/rotord.cpp6
3 files changed, 14 insertions, 10 deletions
diff --git a/rotord/Makefile b/rotord/Makefile
index 36c2ac8..05c2243 100644
--- a/rotord/Makefile
+++ b/rotord/Makefile
@@ -3,7 +3,7 @@
#http://docs.gstreamer.com/display/GstSDK/Installing+on+Linux
#MY_CFLAGS = -fpermissive -std=c++11 -Wno-error -I /opt/gstreamer-sdk/include/gstreamer-0.10/ -I /opt/gstreamer-sdk/include/glib-2.0 -I /opt/gstreamer-sdk/lib/glib-2.0/include -I /opt/gstreamer-sdk/include/libxml2 $(shell pkg-config gstreamer-0.10 gstreamer-video-0.10 gstreamer-base-0.10 --cflags)
-MY_CFLAGS = -fpermissive -std=c++11
+MY_CFLAGS = -fpermissive -std=c++11 -I /usr/include/opencv
#-Wno-error $(shell pkg-config gstreamer-0.10 gstreamer-video-0.10 gstreamer-base-0.10 --cflags)
# -I ../ffmpeg
diff --git a/rotord/rotor.h b/rotord/rotor.h
index 7409f19..63ac886 100755
--- a/rotord/rotor.h
+++ b/rotord/rotor.h
@@ -546,12 +546,12 @@ namespace Rotor {
};
class Testcard: public Image_node {
public:
- Testcard(){};
+ Testcard(){image=nullptr;};
Testcard(map<string,string> &settings) {
base_settings(settings);
image=new Image();
};
- ~Testcard(){ delete image;};
+ ~Testcard(){ if (image) delete image;};
Testcard* clone(map<string,string> &_settings) { return new Testcard(_settings);};
Image *output(const Frame_spec &frame){
if (image->setup(frame.w,frame.h)) {
@@ -576,12 +576,12 @@ namespace Rotor {
};
class Invert: public Image_node {
public:
- Invert(){};
+ Invert(){image=nullptr;};
Invert(map<string,string> &settings) {
base_settings(settings);
image=new Image();
};
- ~Invert(){ delete image;};
+ ~Invert(){ if (image) delete image;};
Invert* clone(map<string,string> &_settings) { return new Invert(_settings);};
Image *output(const Frame_spec &frame){
if (image_inputs.size()) {
@@ -746,7 +746,7 @@ namespace Rotor {
class Image_arithmetic: public Image_node {
//Draws signal bars in greyscale
public:
- Image_arithmetic(){};
+ Image_arithmetic(){image=nullptr;};
Image_arithmetic(map<string,string> &settings) {
base_settings(settings);
value=find_setting(settings,"value",0.0f);
@@ -886,7 +886,7 @@ namespace Rotor {
//or is it actually best to use alpha keying after all!
public:
- Echo_trails(){};
+ Echo_trails(){image=nullptr;};
Echo_trails(map<string,string> &settings) {
base_settings(settings);
//duration=find_setting(settings,"duration",1.0f);
@@ -1004,7 +1004,7 @@ namespace Rotor {
#define BLEND_blend 3
class Blend: public Image_node {
public:
- Blend(){};
+ Blend(){image=nullptr;};
Blend(map<string,string> &settings) {
base_settings(settings);
image=nullptr;
@@ -1063,7 +1063,7 @@ namespace Rotor {
#define MIRROR_vertR 4
class Mirror: public Image_node {
public:
- Mirror(){};
+ Mirror(){image=nullptr;};
Mirror(map<string,string> &settings) {
base_settings(settings);
image=nullptr;
diff --git a/rotord/rotord.cpp b/rotord/rotord.cpp
index 65ab6bd..8790d39 100755
--- a/rotord/rotord.cpp
+++ b/rotord/rotord.cpp
@@ -187,11 +187,15 @@ int RotorServer::main(const std::vector<std::string>& args){
unsigned short port;
+ Logger& logger = Logger::get("Rotor");
+
xmlIO xml;
if(xml.loadFile("settings.xml") ){
port=xml.getAttribute("Rotor","port",9000,0);
}
- else cerr<<"Rotord: settings.xml not found, using defaults"<<endl;
+ else logger.information("settings.xml not found, using defaults");
+
+ logger.information("rotord running on port "+ofToString(port));
port = (unsigned short) config().getInt("port", port); //override from command line