summaryrefslogtreecommitdiff
path: root/rotord/rotor.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@herge.(none)>2013-07-04 17:40:56 +0100
committerTim Redfern <tim@herge.(none)>2013-07-04 17:40:56 +0100
commitafaf35edbad11bc7d71a6793116c229dcfc38f92 (patch)
treec5831004589b5368de766fb3e3a06e4ef2f04767 /rotord/rotor.cpp
parentd80323174f5be46051dd494308a92cfe12e2c1f5 (diff)
echo trails improvements
Diffstat (limited to 'rotord/rotor.cpp')
-rwxr-xr-xrotord/rotor.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/rotord/rotor.cpp b/rotord/rotor.cpp
index 2d33755..3166de8 100755
--- a/rotord/rotor.cpp
+++ b/rotord/rotor.cpp
@@ -379,16 +379,22 @@ Image* Video_loader::output(const Frame_spec &frame){
*/
if (isLoaded){
- int wanted=(((int) ((frame.time*frame.framerate)+0.5))%(player.getNumberOfFrames()))+1; //+1 is necessary because 1st frame in a video is number 1?
+ int wanted=(((int) ((frame.time*frame.framerate)+0.5))%(player.getNumberOfFrames())); //+1 is necessary because 1st frame in a video is number 1?
//if (wanted==99){
// cerr<<"videoloader: near the end"<<endl;
//}
- //cerr<<"videoloader: getting frame "<<wanted<<endl;
+ //cerr<<"videoloader: requesting frame "<<wanted<<endl;
+ //if (wanted==68) {
+ // int nothing=0;
+ //}
- if (!player.fetchFrame(frame.w,frame.h,wanted)) { cerr<<"Rotor: frame returned false"<<endl; return nullptr; };
+ if (!player.fetchFrame(frame.w,frame.h,wanted)) {
+ cerr<<"Rotor: frame returned false"<<endl;
+ return nullptr;
+ };
image.setup_fromRGB(frame.w,frame.h,player.pFrameRGB->data[0]);
return &image;
}