summaryrefslogtreecommitdiff
path: root/rotord/rotor.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@herge.(none)>2013-05-18 21:08:27 +0100
committerTim Redfern <tim@herge.(none)>2013-05-18 21:08:27 +0100
commitbf6cdebfb16122c33adcc912601c399e72a763ff (patch)
tree0e61f5f48b187a7f8f2ed0f449095724924fee14 /rotord/rotor.cpp
parentbcd9eeed1f60c594da11d93c1b52c4ec192280ce (diff)
removed gstreamer
Diffstat (limited to 'rotord/rotor.cpp')
-rwxr-xr-xrotord/rotor.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/rotord/rotor.cpp b/rotord/rotor.cpp
index 1768b8b..00fd465 100755
--- a/rotord/rotor.cpp
+++ b/rotord/rotor.cpp
@@ -18,7 +18,7 @@ Node_factory::Node_factory(){
add_type("video_cycler",new Video_cycler());
add_type("luma_levels",new Luma_levels());
add_type("echo_trails",new Echo_trails());
- add_type("track_time",new Track_time());
+ add_type("track_time",new Track_time());
add_type("comparison",new Comparison()); //TODO: alias to symbols
add_type("arithmetic",new Arithmetic()); //TODO: alias to symbols
}
@@ -45,7 +45,7 @@ bool Image_input::connect(Image_node* source) {
void Node::update_params(const Time_spec& time){ //compute connected parameters
for (auto p:parameter_inputs){
p->update(time);
- }
+ }
}
bool Signal_output::render(const float duration, const float framerate,string &xml_out){
//testing signal routes
@@ -239,12 +239,12 @@ bool Video_loader::load(const string &filename){
*/
Poco::Path path;
string uri="file://"+path.current()+filename;
-
- if (player.open(uri)){
+ isLoaded=player.open(uri);
+ if (isLoaded){
cerr<<"Rotor::Video_loader: "<<filename<<", "<<player.getNumberOfFrames()<<" frames "<<", "<<player.getWidth()<<"x"<<player.getHeight()<<endl;
return true;
}
-
+ cerr<<"Rotor::Video_loader: failed to load "<<filename<<endl;
return false;
}
Image* Video_loader::output(const Frame_spec &frame){
@@ -278,7 +278,7 @@ Image* Video_loader::output(const Frame_spec &frame){
}
*/
- if (player.isOpen){
+ if (isLoaded){
int wanted=((int) (frame.time*frame.framerate))%(player.getNumberOfFrames()-2); //-2??
player.fetchFrame(wanted);
image.setup_fromRGB(frame.w,frame.h,player.pFrameRGB->data[0]);