summaryrefslogtreecommitdiff
path: root/rotord
diff options
context:
space:
mode:
Diffstat (limited to 'rotord')
-rwxr-xr-xrotord/01.xml16
-rw-r--r--rotord/ofxMovieExporter.cpp4
-rw-r--r--rotord/ofxMovieExporter.h12
-rwxr-xr-xrotord/rotor.cpp4
4 files changed, 25 insertions, 11 deletions
diff --git a/rotord/01.xml b/rotord/01.xml
index f3abb80..03f3f0b 100755
--- a/rotord/01.xml
+++ b/rotord/01.xml
@@ -5,7 +5,21 @@
<node ID="02" type="audio_analysis" soname="qm-vamp-plugins" id="qm-segmenter" output="signal">segmenter
</node>
<node ID="03" type="divide" amount="2.0" output="signal">signal divide
- <signal_input from="01">signal to divide</signal_input>
+ <signal_input from="01">signal 1 to divide</signal_input>
+ <signal_input from="02" interface="hslider">amount
+ <interface type="hslider">2.0</interface>
+ </signal_input>
+ </node>
+ <node ID="04" type="colour picker">
+ <signal_input from="01" interface="hslider">red
+ <interface type="hslider">0.5</interface>
+ </signal_input>
+ <signal_input from="02" interface="hslider">green
+ <interface type="hslider">0.5</interface>
+ </signal_input>
+ <signal_input from="03" interface="hslider">blue
+ <interface type="hslider">0.5</interface>
+ </signal_input>
</node>
<node ID="04" type="bang" output="signal">outputs a single 1 every time signal enters a new number
<signal_input from="03">signal to analyse</signal_input>
diff --git a/rotord/ofxMovieExporter.cpp b/rotord/ofxMovieExporter.cpp
index b33352f..eae289c 100644
--- a/rotord/ofxMovieExporter.cpp
+++ b/rotord/ofxMovieExporter.cpp
@@ -86,8 +86,8 @@
recording = false;
numCaptures = 0;
- this->inW = outW;
- this->inH = outH;
+inW=outW;
+inH=outH;
convertCtx = sws_getContext(inW, inH, PIX_FMT_RGB24, outW, outH, PIX_FMT_YUV420P, SWS_BICUBIC, NULL, NULL, NULL);
diff --git a/rotord/ofxMovieExporter.h b/rotord/ofxMovieExporter.h
index 82c574c..ebd794c 100644
--- a/rotord/ofxMovieExporter.h
+++ b/rotord/ofxMovieExporter.h
@@ -122,18 +122,18 @@ class ofxMovieExporter
// set an external pixel source, assumes 3 Byte RGB
// also sets the recording size but does not crop to the recording area
void setPixelSource(unsigned char* pixels, int w, int h);
-
+
// get the number files that have been captured so far
int getNumCaptures();
-
+
// reset the filename counter back to 0
void resetNumCaptures();
-
+
// get the recording size
inline int getRecordingWidth() {return outW;}
inline int getRecordingHeight() {return outH;}
- void encodeFrame(char *pixels);
+ void encodeFrame(unsigned char *pixels,int w,int h);
private:
//#ifdef _THREAD_CAPTURE
@@ -148,7 +148,7 @@ class ofxMovieExporter
void clearMemory();
void encodeFrame();
-
+
std::string container;
AVCodecID codecId;
@@ -181,7 +181,7 @@ class ofxMovieExporter
int posX, posY;
int inW, inH;
int outW, outH;
-
+
bool usePixelSource;
unsigned char* pixelSource;
};
diff --git a/rotord/rotor.cpp b/rotord/rotor.cpp
index ab02298..7ad1488 100755
--- a/rotord/rotor.cpp
+++ b/rotord/rotor.cpp
@@ -767,7 +767,7 @@ bool Video_output::render(const float duration, const float framerate,const stri
int outH=480;
int bitRate=4000000;
int frameRate=25;
- AVCodecID codecId=AV_CODEC_ID_H264;
+ AVCodecID codecId=AV_CODEC_ID_MPEG4;
std::string container ="mov";
@@ -778,7 +778,7 @@ bool Video_output::render(const float duration, const float framerate,const stri
float step=1.0f/framerate;
float v=0.0f;
for (float f=0.0f;f<duration;f+=step) {
- exporter->encodeFrame(get_output(Frame_spec(f,framerate,outW,outH))->RGBdata);
+ exporter->encodeFrame(get_output(Frame_spec(f,framerate,outW,outH))->RGBdata,outW,outH);
}
exporter->finishRecord();
return true;